|
7 | 7 | * Released under the MIT license. |
8 | 8 | '*/ |
9 | 9 | (function (global, factory) { |
10 | | - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('toastr'), require('lodash'), require('vue-typed'), require('moment'), require('sweetalert')) : |
11 | | - typeof define === 'function' && define.amd ? define(['exports', 'vue', 'toastr', 'lodash', 'vue-typed', 'moment', 'sweetalert'], factory) : |
12 | | - (factory((global.VueTypedUI = global.VueTypedUI || {}),global.Vue,global.toastr,global._,global.vueTyped,global.moment,global.swal)); |
| 10 | + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('toastr'), require('lodash'), require('vue-typed'), require('moment'), require('sweetalert')) : |
| 11 | + typeof define === 'function' && define.amd ? define(['exports', 'vue', 'toastr', 'lodash', 'vue-typed', 'moment', 'sweetalert'], factory) : |
| 12 | + (factory((global.VueTypedUI = global.VueTypedUI || {}),global.Vue,global.toastr,global._,global.vueTyped,global.moment,global.swal)); |
13 | 13 | }(this, (function (exports,Vue,toastr,_,vueTyped,moment,swal) { 'use strict'; |
14 | 14 |
|
15 | 15 | function __$styleInject(css, returnValue) { |
@@ -2047,6 +2047,162 @@ Segment = __decorate([vueTyped.Component({ |
2047 | 2047 | template: '<div class="ui segment"><slot></slot></div>' |
2048 | 2048 | })], Segment); |
2049 | 2049 |
|
| 2050 | +var _AccordionBase = function (_Vue) { |
| 2051 | + inherits(_AccordionBase, _Vue); |
| 2052 | + |
| 2053 | + function _AccordionBase() { |
| 2054 | + classCallCheck(this, _AccordionBase); |
| 2055 | + |
| 2056 | + /** |
| 2057 | + * Only allow one section open at a time |
| 2058 | + * |
| 2059 | + * @default true |
| 2060 | + * @type {boolean} |
| 2061 | + */ |
| 2062 | + var _this = possibleConstructorReturn(this, (_AccordionBase.__proto__ || Object.getPrototypeOf(_AccordionBase)).apply(this, arguments)); |
| 2063 | + |
| 2064 | + _this.exclusive = true; |
| 2065 | + /** |
| 2066 | + * Event on title that will cause accordion to open |
| 2067 | + * |
| 2068 | + * @default 'click' |
| 2069 | + * @type {string} |
| 2070 | + */ |
| 2071 | + _this.on = 'click'; |
| 2072 | + /** |
| 2073 | + * Whether child content opacity should be animated (may cause performance issues with many child elements) |
| 2074 | + * |
| 2075 | + * @default true |
| 2076 | + * @type {boolean} |
| 2077 | + */ |
| 2078 | + _this.animateChildren = true; |
| 2079 | + /** |
| 2080 | + * Duration in ms of opening animation |
| 2081 | + * |
| 2082 | + * @default 500 |
| 2083 | + * @type {number} |
| 2084 | + */ |
| 2085 | + _this.duration = 500; |
| 2086 | + /** |
| 2087 | + * Close open nested accordion content when an element closes |
| 2088 | + * |
| 2089 | + * @default true |
| 2090 | + * @type {boolean} |
| 2091 | + */ |
| 2092 | + _this.closeNested = true; |
| 2093 | + /** |
| 2094 | + * Allow active sections to collapse |
| 2095 | + * |
| 2096 | + * @default true |
| 2097 | + * @type {boolean} |
| 2098 | + */ |
| 2099 | + _this.collapsible = true; |
| 2100 | + return _this; |
| 2101 | + } |
| 2102 | + |
| 2103 | + return _AccordionBase; |
| 2104 | +}(Vue); |
| 2105 | + |
| 2106 | +__decorate([vueTyped.Prop({ |
| 2107 | + type: Boolean |
| 2108 | +})], _AccordionBase.prototype, "exclusive", void 0); |
| 2109 | +__decorate([vueTyped.Prop({ |
| 2110 | + type: String |
| 2111 | +})], _AccordionBase.prototype, "on", void 0); |
| 2112 | +__decorate([vueTyped.Prop({ |
| 2113 | + type: Boolean |
| 2114 | +})], _AccordionBase.prototype, "animateChildren", void 0); |
| 2115 | +__decorate([vueTyped.Prop({ |
| 2116 | + type: Number |
| 2117 | +})], _AccordionBase.prototype, "duration", void 0); |
| 2118 | +__decorate([vueTyped.Prop({ |
| 2119 | + type: Boolean |
| 2120 | +})], _AccordionBase.prototype, "closeNested", void 0); |
| 2121 | +__decorate([vueTyped.Prop({ |
| 2122 | + type: Boolean |
| 2123 | +})], _AccordionBase.prototype, "collapsible", void 0); |
| 2124 | + |
| 2125 | +var Accordion = function (_AccordionBase2) { |
| 2126 | + inherits(Accordion, _AccordionBase2); |
| 2127 | + |
| 2128 | + function Accordion() { |
| 2129 | + classCallCheck(this, Accordion); |
| 2130 | + return possibleConstructorReturn(this, (Accordion.__proto__ || Object.getPrototypeOf(Accordion)).apply(this, arguments)); |
| 2131 | + } |
| 2132 | + |
| 2133 | + createClass(Accordion, [{ |
| 2134 | + key: 'mounted', |
| 2135 | + value: function mounted() { |
| 2136 | + var self = this; |
| 2137 | + $(this.$el).accordion({ |
| 2138 | + exclusive: this.exclusive, |
| 2139 | + on: this.on, |
| 2140 | + animateChildren: this.animateChildren, |
| 2141 | + closeNested: this.closeNested, |
| 2142 | + collapsible: this.collapsible, |
| 2143 | + duration: this.duration, |
| 2144 | + onOpening: function onOpening() { |
| 2145 | + self.$emit('opening', this); |
| 2146 | + }, |
| 2147 | + onOpen: function onOpen() { |
| 2148 | + self.$emit('open', this); |
| 2149 | + }, |
| 2150 | + onClosing: function onClosing() { |
| 2151 | + self.$emit('closing', this); |
| 2152 | + }, |
| 2153 | + onClose: function onClose() { |
| 2154 | + self.$emit('close', this); |
| 2155 | + }, |
| 2156 | + onChange: function onChange() { |
| 2157 | + self.$emit('change', this); |
| 2158 | + } |
| 2159 | + }); |
| 2160 | + } |
| 2161 | + }]); |
| 2162 | + return Accordion; |
| 2163 | +}(_AccordionBase); |
| 2164 | +Accordion = __decorate([vueTyped.Component({ |
| 2165 | + template: '<div class="ui accordion"><slot></slot></div>' |
| 2166 | +})], Accordion); |
| 2167 | + |
| 2168 | +var _AccordionItemBase = function (_Vue) { |
| 2169 | + inherits(_AccordionItemBase, _Vue); |
| 2170 | + |
| 2171 | + function _AccordionItemBase() { |
| 2172 | + classCallCheck(this, _AccordionItemBase); |
| 2173 | + return possibleConstructorReturn(this, (_AccordionItemBase.__proto__ || Object.getPrototypeOf(_AccordionItemBase)).apply(this, arguments)); |
| 2174 | + } |
| 2175 | + |
| 2176 | + return _AccordionItemBase; |
| 2177 | +}(Vue); |
| 2178 | + |
| 2179 | +__decorate([vueTyped.Prop({ |
| 2180 | + type: String |
| 2181 | +})], _AccordionItemBase.prototype, "title", void 0); |
| 2182 | +__decorate([vueTyped.Prop({ |
| 2183 | + type: Boolean |
| 2184 | +})], _AccordionItemBase.prototype, "active", void 0); |
| 2185 | + |
| 2186 | +var AccordionItem = function (_AccordionItemBase2) { |
| 2187 | + inherits(AccordionItem, _AccordionItemBase2); |
| 2188 | + |
| 2189 | + function AccordionItem() { |
| 2190 | + classCallCheck(this, AccordionItem); |
| 2191 | + return possibleConstructorReturn(this, (AccordionItem.__proto__ || Object.getPrototypeOf(AccordionItem)).apply(this, arguments)); |
| 2192 | + } |
| 2193 | + |
| 2194 | + createClass(AccordionItem, [{ |
| 2195 | + key: 'activeCss', |
| 2196 | + get: function get() { |
| 2197 | + return this.active ? ' active' : ''; |
| 2198 | + } |
| 2199 | + }]); |
| 2200 | + return AccordionItem; |
| 2201 | +}(_AccordionItemBase); |
| 2202 | +AccordionItem = __decorate([vueTyped.Component({ |
| 2203 | + template: '<span>\n\t\t<div :class="activeCss + \'title\'">\n\t\t\t<i class="dropdown icon"></i> {{title}}\n\t\t</div>\n\t\t<div :class="activeCss + \'content\'">\n\t\t\t<slot></slot>\n\t\t</div>\n\t</span>' |
| 2204 | +})], AccordionItem); |
| 2205 | + |
2050 | 2206 | var _MenuBaseBase = function (_Vue) { |
2051 | 2207 | inherits(_MenuBaseBase, _Vue); |
2052 | 2208 |
|
@@ -2838,6 +2994,8 @@ var components = Object.freeze({ |
2838 | 2994 | get TabItem () { return TabItem; }, |
2839 | 2995 | get Pusher () { return Pusher; }, |
2840 | 2996 | get Segment () { return Segment; }, |
| 2997 | + get Accordion () { return Accordion; }, |
| 2998 | + get AccordionItem () { return AccordionItem; }, |
2841 | 2999 | get MenuVertical () { return MenuVertical; }, |
2842 | 3000 | get MenuHorizontal () { return MenuHorizontal; }, |
2843 | 3001 | get MenuItem () { return MenuItem; }, |
|
0 commit comments