rails-active-ui 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/javascript/ui/controllers/turbo_modal_controller.js +36 -0
- data/config/importmap.rb +1 -0
- data/formantic-ui/components/accordion.css +369 -0
- data/formantic-ui/components/accordion.js +595 -0
- data/formantic-ui/components/accordion.min.css +9 -0
- data/formantic-ui/components/accordion.min.js +11 -0
- data/formantic-ui/components/ad.css +264 -0
- data/formantic-ui/components/ad.min.css +10 -0
- data/formantic-ui/components/api.js +1225 -0
- data/formantic-ui/components/api.min.js +11 -0
- data/formantic-ui/components/breadcrumb.css +135 -0
- data/formantic-ui/components/breadcrumb.min.css +9 -0
- data/formantic-ui/components/button.css +4058 -0
- data/formantic-ui/components/button.min.css +9 -0
- data/formantic-ui/components/calendar.css +327 -0
- data/formantic-ui/components/calendar.js +2045 -0
- data/formantic-ui/components/calendar.min.css +9 -0
- data/formantic-ui/components/calendar.min.js +11 -0
- data/formantic-ui/components/card.css +1881 -0
- data/formantic-ui/components/card.min.css +9 -0
- data/formantic-ui/components/checkbox.css +785 -0
- data/formantic-ui/components/checkbox.js +888 -0
- data/formantic-ui/components/checkbox.min.css +9 -0
- data/formantic-ui/components/checkbox.min.js +11 -0
- data/formantic-ui/components/comment.css +283 -0
- data/formantic-ui/components/comment.min.css +9 -0
- data/formantic-ui/components/container.css +300 -0
- data/formantic-ui/components/container.min.css +9 -0
- data/formantic-ui/components/dimmer.css +367 -0
- data/formantic-ui/components/dimmer.js +732 -0
- data/formantic-ui/components/dimmer.min.css +9 -0
- data/formantic-ui/components/dimmer.min.js +11 -0
- data/formantic-ui/components/divider.css +287 -0
- data/formantic-ui/components/divider.min.css +9 -0
- data/formantic-ui/components/dropdown.css +2087 -0
- data/formantic-ui/components/dropdown.js +4432 -0
- data/formantic-ui/components/dropdown.min.css +9 -0
- data/formantic-ui/components/dropdown.min.js +11 -0
- data/formantic-ui/components/embed.css +155 -0
- data/formantic-ui/components/embed.js +688 -0
- data/formantic-ui/components/embed.min.css +9 -0
- data/formantic-ui/components/embed.min.js +11 -0
- data/formantic-ui/components/emoji.css +15311 -0
- data/formantic-ui/components/emoji.min.css +9 -0
- data/formantic-ui/components/feed.css +799 -0
- data/formantic-ui/components/feed.min.css +9 -0
- data/formantic-ui/components/flag.css +1149 -0
- data/formantic-ui/components/flag.min.css +9 -0
- data/formantic-ui/components/flyout.css +546 -0
- data/formantic-ui/components/flyout.js +1551 -0
- data/formantic-ui/components/flyout.min.css +9 -0
- data/formantic-ui/components/flyout.min.js +11 -0
- data/formantic-ui/components/form.css +1885 -0
- data/formantic-ui/components/form.js +2199 -0
- data/formantic-ui/components/form.min.css +9 -0
- data/formantic-ui/components/form.min.js +11 -0
- data/formantic-ui/components/grid.css +1952 -0
- data/formantic-ui/components/grid.min.css +9 -0
- data/formantic-ui/components/header.css +778 -0
- data/formantic-ui/components/header.min.css +9 -0
- data/formantic-ui/components/icon.css +7066 -0
- data/formantic-ui/components/icon.min.css +9 -0
- data/formantic-ui/components/image.css +315 -0
- data/formantic-ui/components/image.min.css +9 -0
- data/formantic-ui/components/input.css +1566 -0
- data/formantic-ui/components/input.min.css +9 -0
- data/formantic-ui/components/item.css +534 -0
- data/formantic-ui/components/item.min.css +9 -0
- data/formantic-ui/components/label.css +2114 -0
- data/formantic-ui/components/label.min.css +9 -0
- data/formantic-ui/components/list.css +955 -0
- data/formantic-ui/components/list.min.css +9 -0
- data/formantic-ui/components/loader.css +787 -0
- data/formantic-ui/components/loader.min.css +9 -0
- data/formantic-ui/components/menu.css +2131 -0
- data/formantic-ui/components/menu.min.css +9 -0
- data/formantic-ui/components/message.css +619 -0
- data/formantic-ui/components/message.min.css +9 -0
- data/formantic-ui/components/modal.css +779 -0
- data/formantic-ui/components/modal.js +1637 -0
- data/formantic-ui/components/modal.min.css +9 -0
- data/formantic-ui/components/modal.min.js +11 -0
- data/formantic-ui/components/nag.css +290 -0
- data/formantic-ui/components/nag.js +566 -0
- data/formantic-ui/components/nag.min.css +9 -0
- data/formantic-ui/components/nag.min.js +11 -0
- data/formantic-ui/components/placeholder.css +228 -0
- data/formantic-ui/components/placeholder.min.css +9 -0
- data/formantic-ui/components/popup.css +1184 -0
- data/formantic-ui/components/popup.js +1561 -0
- data/formantic-ui/components/popup.min.css +9 -0
- data/formantic-ui/components/popup.min.js +11 -0
- data/formantic-ui/components/progress.css +761 -0
- data/formantic-ui/components/progress.js +979 -0
- data/formantic-ui/components/progress.min.css +9 -0
- data/formantic-ui/components/progress.min.js +11 -0
- data/formantic-ui/components/rail.css +147 -0
- data/formantic-ui/components/rail.min.css +9 -0
- data/formantic-ui/components/rating.css +414 -0
- data/formantic-ui/components/rating.js +540 -0
- data/formantic-ui/components/rating.min.css +9 -0
- data/formantic-ui/components/rating.min.js +11 -0
- data/formantic-ui/components/reset.css +386 -0
- data/formantic-ui/components/reset.min.css +9 -0
- data/formantic-ui/components/reveal.css +277 -0
- data/formantic-ui/components/reveal.min.css +9 -0
- data/formantic-ui/components/search.css +541 -0
- data/formantic-ui/components/search.js +1641 -0
- data/formantic-ui/components/search.min.css +9 -0
- data/formantic-ui/components/search.min.js +11 -0
- data/formantic-ui/components/segment.css +1053 -0
- data/formantic-ui/components/segment.min.css +9 -0
- data/formantic-ui/components/shape.css +144 -0
- data/formantic-ui/components/shape.js +797 -0
- data/formantic-ui/components/shape.min.css +9 -0
- data/formantic-ui/components/shape.min.js +11 -0
- data/formantic-ui/components/sidebar.css +539 -0
- data/formantic-ui/components/sidebar.js +1054 -0
- data/formantic-ui/components/sidebar.min.css +9 -0
- data/formantic-ui/components/sidebar.min.js +11 -0
- data/formantic-ui/components/site.css +286 -0
- data/formantic-ui/components/site.js +455 -0
- data/formantic-ui/components/site.min.css +9 -0
- data/formantic-ui/components/site.min.js +11 -0
- data/formantic-ui/components/slider.css +926 -0
- data/formantic-ui/components/slider.js +1546 -0
- data/formantic-ui/components/slider.min.css +9 -0
- data/formantic-ui/components/slider.min.js +11 -0
- data/formantic-ui/components/state.js +697 -0
- data/formantic-ui/components/state.min.js +11 -0
- data/formantic-ui/components/statistic.css +586 -0
- data/formantic-ui/components/statistic.min.css +9 -0
- data/formantic-ui/components/step.css +1538 -0
- data/formantic-ui/components/step.min.css +9 -0
- data/formantic-ui/components/sticky.css +73 -0
- data/formantic-ui/components/sticky.js +917 -0
- data/formantic-ui/components/sticky.min.css +9 -0
- data/formantic-ui/components/sticky.min.js +11 -0
- data/formantic-ui/components/tab.css +84 -0
- data/formantic-ui/components/tab.js +967 -0
- data/formantic-ui/components/tab.min.css +9 -0
- data/formantic-ui/components/tab.min.js +11 -0
- data/formantic-ui/components/table.css +3473 -0
- data/formantic-ui/components/table.min.css +9 -0
- data/formantic-ui/components/text.css +155 -0
- data/formantic-ui/components/text.min.css +9 -0
- data/formantic-ui/components/toast.css +751 -0
- data/formantic-ui/components/toast.js +964 -0
- data/formantic-ui/components/toast.min.css +9 -0
- data/formantic-ui/components/toast.min.js +11 -0
- data/formantic-ui/components/transition.css +1148 -0
- data/formantic-ui/components/transition.js +1034 -0
- data/formantic-ui/components/transition.min.css +9 -0
- data/formantic-ui/components/transition.min.js +11 -0
- data/formantic-ui/components/visibility.js +1292 -0
- data/formantic-ui/components/visibility.min.js +11 -0
- data/formantic-ui/semantic.css +78485 -0
- data/formantic-ui/semantic.js +31036 -0
- data/formantic-ui/semantic.min.css +11 -0
- data/formantic-ui/semantic.min.js +11 -0
- data/formantic-ui/themes/basic/assets/fonts/LICENSE.txt +91 -0
- data/formantic-ui/themes/basic/assets/fonts/icons.woff +0 -0
- data/formantic-ui/themes/basic/assets/fonts/icons.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
- data/formantic-ui/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/brand-icons.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/brand-icons.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/icons.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/icons.woff2 +0 -0
- data/formantic-ui/themes/default/assets/fonts/outline-icons.woff +0 -0
- data/formantic-ui/themes/default/assets/fonts/outline-icons.woff2 +0 -0
- data/formantic-ui/themes/famfamfam/assets/images/flags.png +0 -0
- data/formantic-ui/themes/github/assets/fonts/LICENSE.txt +94 -0
- data/formantic-ui/themes/github/assets/fonts/octicons.woff +0 -0
- data/formantic-ui/themes/github/assets/fonts/octicons.woff2 +0 -0
- data/formantic-ui/themes/material/assets/fonts/LICENSE.txt +202 -0
- data/formantic-ui/themes/material/assets/fonts/icons.woff +0 -0
- data/formantic-ui/themes/material/assets/fonts/icons.woff2 +0 -0
- data/lib/ui/version.rb +1 -1
- metadata +194 -1
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* # Fomantic-UI 2.9.4 - Accordion
|
|
3
|
+
* https://github.com/fomantic/Fomantic-UI/
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://opensource.org/licenses/MIT
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
(function ($, window, document) {
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
function isFunction(obj) {
|
|
15
|
+
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
window = window !== undefined && window.Math === Math
|
|
19
|
+
? window
|
|
20
|
+
: globalThis;
|
|
21
|
+
|
|
22
|
+
$.fn.accordion = function (parameters) {
|
|
23
|
+
var
|
|
24
|
+
$allModules = $(this),
|
|
25
|
+
|
|
26
|
+
time = Date.now(),
|
|
27
|
+
performance = [],
|
|
28
|
+
|
|
29
|
+
query = arguments[0],
|
|
30
|
+
methodInvoked = typeof query === 'string',
|
|
31
|
+
queryArguments = [].slice.call(arguments, 1),
|
|
32
|
+
|
|
33
|
+
returnedValue
|
|
34
|
+
;
|
|
35
|
+
$allModules.each(function () {
|
|
36
|
+
var
|
|
37
|
+
settings = $.isPlainObject(parameters)
|
|
38
|
+
? $.extend(true, {}, $.fn.accordion.settings, parameters)
|
|
39
|
+
: $.extend({}, $.fn.accordion.settings),
|
|
40
|
+
|
|
41
|
+
className = settings.className,
|
|
42
|
+
namespace = settings.namespace,
|
|
43
|
+
selector = settings.selector,
|
|
44
|
+
error = settings.error,
|
|
45
|
+
|
|
46
|
+
eventNamespace = '.' + namespace,
|
|
47
|
+
moduleNamespace = 'module-' + namespace,
|
|
48
|
+
|
|
49
|
+
$module = $(this),
|
|
50
|
+
$title = $module.find(selector.title),
|
|
51
|
+
$content = $module.find(selector.content),
|
|
52
|
+
|
|
53
|
+
element = this,
|
|
54
|
+
instance = $module.data(moduleNamespace),
|
|
55
|
+
observer,
|
|
56
|
+
module
|
|
57
|
+
;
|
|
58
|
+
|
|
59
|
+
module = {
|
|
60
|
+
|
|
61
|
+
initialize: function () {
|
|
62
|
+
module.debug('Initializing', $module);
|
|
63
|
+
module.bind.events();
|
|
64
|
+
if (settings.observeChanges) {
|
|
65
|
+
module.observeChanges();
|
|
66
|
+
}
|
|
67
|
+
module.instantiate();
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
instantiate: function () {
|
|
71
|
+
instance = module;
|
|
72
|
+
$module
|
|
73
|
+
.data(moduleNamespace, module)
|
|
74
|
+
;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
destroy: function () {
|
|
78
|
+
module.debug('Destroying previous instance', $module);
|
|
79
|
+
$module
|
|
80
|
+
.off(eventNamespace)
|
|
81
|
+
.removeData(moduleNamespace)
|
|
82
|
+
;
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
refresh: function () {
|
|
86
|
+
$title = $module.find(selector.title);
|
|
87
|
+
$content = $module.find(selector.content);
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
observeChanges: function () {
|
|
91
|
+
if ('MutationObserver' in window) {
|
|
92
|
+
observer = new MutationObserver(function (mutations) {
|
|
93
|
+
module.debug('DOM tree modified, updating selector cache');
|
|
94
|
+
module.refresh();
|
|
95
|
+
});
|
|
96
|
+
observer.observe(element, {
|
|
97
|
+
childList: true,
|
|
98
|
+
subtree: true,
|
|
99
|
+
});
|
|
100
|
+
module.debug('Setting up mutation observer', observer);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
bind: {
|
|
105
|
+
events: function () {
|
|
106
|
+
module.debug('Binding delegated events');
|
|
107
|
+
$module
|
|
108
|
+
.on(settings.on + eventNamespace, selector.trigger, module.event.click)
|
|
109
|
+
;
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
event: {
|
|
114
|
+
click: function (event) {
|
|
115
|
+
if ($(event.target).closest(selector.ignore).length === 0) {
|
|
116
|
+
module.toggle.call(this);
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
toggle: function (query) {
|
|
122
|
+
var
|
|
123
|
+
$activeTitle = query !== undefined
|
|
124
|
+
? (typeof query === 'number'
|
|
125
|
+
? $title.eq(query)
|
|
126
|
+
: $(query).closest(selector.title))
|
|
127
|
+
: $(this).closest(selector.title),
|
|
128
|
+
$activeContent = $activeTitle.next($content),
|
|
129
|
+
isAnimating = $activeContent.hasClass(className.animating),
|
|
130
|
+
isActive = $activeContent.hasClass(className.active),
|
|
131
|
+
isOpen = isActive && !isAnimating,
|
|
132
|
+
isOpening = !isActive && isAnimating
|
|
133
|
+
;
|
|
134
|
+
module.debug('Toggling visibility of content', $activeTitle);
|
|
135
|
+
if (isOpen || isOpening) {
|
|
136
|
+
if (settings.collapsible) {
|
|
137
|
+
module.close.call($activeTitle);
|
|
138
|
+
} else {
|
|
139
|
+
module.debug('Cannot close accordion content collapsing is disabled');
|
|
140
|
+
}
|
|
141
|
+
} else {
|
|
142
|
+
module.open.call($activeTitle);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
open: function (query) {
|
|
147
|
+
var
|
|
148
|
+
$activeTitle = query !== undefined
|
|
149
|
+
? (typeof query === 'number'
|
|
150
|
+
? $title.eq(query)
|
|
151
|
+
: $(query).closest(selector.title))
|
|
152
|
+
: $(this).closest(selector.title),
|
|
153
|
+
$activeContent = $activeTitle.next($content),
|
|
154
|
+
isAnimating = $activeContent.hasClass(className.animating),
|
|
155
|
+
isActive = $activeContent.hasClass(className.active),
|
|
156
|
+
isOpen = isActive || isAnimating
|
|
157
|
+
;
|
|
158
|
+
if (isOpen) {
|
|
159
|
+
module.debug('Accordion already open, skipping', $activeContent);
|
|
160
|
+
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
module.debug('Opening accordion content', $activeTitle);
|
|
164
|
+
settings.onOpening.call($activeContent);
|
|
165
|
+
settings.onChanging.call($activeContent);
|
|
166
|
+
if (settings.exclusive) {
|
|
167
|
+
module.closeOthers.call($activeTitle);
|
|
168
|
+
}
|
|
169
|
+
$activeTitle
|
|
170
|
+
.addClass(className.active)
|
|
171
|
+
;
|
|
172
|
+
$activeContent
|
|
173
|
+
.stop(true, true)
|
|
174
|
+
.addClass(className.animating)
|
|
175
|
+
;
|
|
176
|
+
if (settings.animateChildren) {
|
|
177
|
+
if ($.fn.transition !== undefined) {
|
|
178
|
+
$activeContent
|
|
179
|
+
.children()
|
|
180
|
+
.transition({
|
|
181
|
+
animation: 'fade in',
|
|
182
|
+
queue: false,
|
|
183
|
+
useFailSafe: true,
|
|
184
|
+
debug: settings.debug,
|
|
185
|
+
verbose: settings.verbose,
|
|
186
|
+
silent: settings.silent,
|
|
187
|
+
duration: settings.duration,
|
|
188
|
+
skipInlineHidden: true,
|
|
189
|
+
onComplete: function () {
|
|
190
|
+
$activeContent.children().removeClass(className.transition);
|
|
191
|
+
},
|
|
192
|
+
})
|
|
193
|
+
;
|
|
194
|
+
} else {
|
|
195
|
+
$activeContent
|
|
196
|
+
.children()
|
|
197
|
+
.stop(true, true)
|
|
198
|
+
.animate({
|
|
199
|
+
opacity: 1,
|
|
200
|
+
}, settings.duration, module.resetOpacity);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
$activeContent
|
|
204
|
+
.slideDown(settings.duration, settings.easing, function () {
|
|
205
|
+
$activeContent
|
|
206
|
+
.removeClass(className.animating)
|
|
207
|
+
.addClass(className.active)
|
|
208
|
+
;
|
|
209
|
+
module.reset.display.call(this);
|
|
210
|
+
settings.onOpen.call(this);
|
|
211
|
+
settings.onChange.call(this);
|
|
212
|
+
})
|
|
213
|
+
;
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
close: function (query) {
|
|
217
|
+
var
|
|
218
|
+
$activeTitle = query !== undefined
|
|
219
|
+
? (typeof query === 'number'
|
|
220
|
+
? $title.eq(query)
|
|
221
|
+
: $(query).closest(selector.title))
|
|
222
|
+
: $(this).closest(selector.title),
|
|
223
|
+
$activeContent = $activeTitle.next($content),
|
|
224
|
+
isAnimating = $activeContent.hasClass(className.animating),
|
|
225
|
+
isActive = $activeContent.hasClass(className.active),
|
|
226
|
+
isOpening = !isActive && isAnimating,
|
|
227
|
+
isClosing = isActive && isAnimating
|
|
228
|
+
;
|
|
229
|
+
if ((isActive || isOpening) && !isClosing) {
|
|
230
|
+
module.debug('Closing accordion content', $activeContent);
|
|
231
|
+
settings.onClosing.call($activeContent);
|
|
232
|
+
settings.onChanging.call($activeContent);
|
|
233
|
+
$activeTitle
|
|
234
|
+
.removeClass(className.active)
|
|
235
|
+
;
|
|
236
|
+
$activeContent
|
|
237
|
+
.stop(true, true)
|
|
238
|
+
.addClass(className.animating)
|
|
239
|
+
;
|
|
240
|
+
if (settings.animateChildren) {
|
|
241
|
+
if ($.fn.transition !== undefined) {
|
|
242
|
+
$activeContent
|
|
243
|
+
.children()
|
|
244
|
+
.transition({
|
|
245
|
+
animation: 'fade out',
|
|
246
|
+
queue: false,
|
|
247
|
+
useFailSafe: true,
|
|
248
|
+
debug: settings.debug,
|
|
249
|
+
verbose: settings.verbose,
|
|
250
|
+
silent: settings.silent,
|
|
251
|
+
duration: settings.duration,
|
|
252
|
+
skipInlineHidden: true,
|
|
253
|
+
})
|
|
254
|
+
;
|
|
255
|
+
} else {
|
|
256
|
+
$activeContent
|
|
257
|
+
.children()
|
|
258
|
+
.stop(true, true)
|
|
259
|
+
.animate({
|
|
260
|
+
opacity: 0,
|
|
261
|
+
}, settings.duration, module.resetOpacity);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
$activeContent
|
|
265
|
+
.slideUp(settings.duration, settings.easing, function () {
|
|
266
|
+
$activeContent
|
|
267
|
+
.removeClass(className.animating)
|
|
268
|
+
.removeClass(className.active)
|
|
269
|
+
;
|
|
270
|
+
module.reset.display.call(this);
|
|
271
|
+
settings.onClose.call(this);
|
|
272
|
+
settings.onChange.call(this);
|
|
273
|
+
})
|
|
274
|
+
;
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
closeOthers: function (index) {
|
|
279
|
+
var
|
|
280
|
+
$activeTitle = index !== undefined
|
|
281
|
+
? $title.eq(index)
|
|
282
|
+
: $(this).closest(selector.title),
|
|
283
|
+
$parentTitles = $activeTitle.parents(selector.content).prev(selector.title),
|
|
284
|
+
$activeAccordion = $activeTitle.closest(selector.accordion),
|
|
285
|
+
activeSelector = selector.title + '.' + className.active + ':visible',
|
|
286
|
+
activeContent = selector.content + '.' + className.active + ':visible',
|
|
287
|
+
$openTitles,
|
|
288
|
+
$nestedTitles,
|
|
289
|
+
$openContents
|
|
290
|
+
;
|
|
291
|
+
if (settings.closeNested) {
|
|
292
|
+
$openTitles = $activeAccordion.find(activeSelector).not($parentTitles);
|
|
293
|
+
$openContents = $openTitles.next($content);
|
|
294
|
+
} else {
|
|
295
|
+
$openTitles = $activeAccordion.find(activeSelector).not($parentTitles);
|
|
296
|
+
$nestedTitles = $activeAccordion.find(activeContent).find(activeSelector).not($parentTitles);
|
|
297
|
+
$openTitles = $openTitles.not($nestedTitles);
|
|
298
|
+
$openContents = $openTitles.next($content);
|
|
299
|
+
}
|
|
300
|
+
if ($openTitles.length > 0) {
|
|
301
|
+
module.debug('Exclusive enabled, closing other content', $openTitles);
|
|
302
|
+
$openTitles
|
|
303
|
+
.removeClass(className.active)
|
|
304
|
+
;
|
|
305
|
+
$openContents
|
|
306
|
+
.removeClass(className.animating)
|
|
307
|
+
.stop(true, true)
|
|
308
|
+
;
|
|
309
|
+
if (settings.animateChildren) {
|
|
310
|
+
if ($.fn.transition !== undefined) {
|
|
311
|
+
$openContents
|
|
312
|
+
.children()
|
|
313
|
+
.transition({
|
|
314
|
+
animation: 'fade out',
|
|
315
|
+
useFailSafe: true,
|
|
316
|
+
debug: settings.debug,
|
|
317
|
+
verbose: settings.verbose,
|
|
318
|
+
silent: settings.silent,
|
|
319
|
+
duration: settings.duration,
|
|
320
|
+
skipInlineHidden: true,
|
|
321
|
+
})
|
|
322
|
+
;
|
|
323
|
+
} else {
|
|
324
|
+
$openContents
|
|
325
|
+
.children()
|
|
326
|
+
.stop(true, true)
|
|
327
|
+
.animate({
|
|
328
|
+
opacity: 0,
|
|
329
|
+
}, settings.duration, module.resetOpacity);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
$openContents
|
|
333
|
+
.slideUp(settings.duration, settings.easing, function () {
|
|
334
|
+
$(this).removeClass(className.active);
|
|
335
|
+
module.reset.display.call(this);
|
|
336
|
+
})
|
|
337
|
+
;
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
reset: {
|
|
342
|
+
|
|
343
|
+
display: function () {
|
|
344
|
+
module.verbose('Removing inline display from element', this);
|
|
345
|
+
var $element = $(this);
|
|
346
|
+
$element.css('display', '');
|
|
347
|
+
if ($element.attr('style') === '') {
|
|
348
|
+
$element
|
|
349
|
+
.attr('style', '')
|
|
350
|
+
.removeAttr('style')
|
|
351
|
+
;
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
opacity: function () {
|
|
356
|
+
module.verbose('Removing inline opacity from element', this);
|
|
357
|
+
var $element = $(this);
|
|
358
|
+
$element.css('opacity', '');
|
|
359
|
+
if ($element.attr('style') === '') {
|
|
360
|
+
$element
|
|
361
|
+
.attr('style', '')
|
|
362
|
+
.removeAttr('style')
|
|
363
|
+
;
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
setting: function (name, value) {
|
|
370
|
+
module.debug('Changing setting', name, value);
|
|
371
|
+
if ($.isPlainObject(name)) {
|
|
372
|
+
$.extend(true, settings, name);
|
|
373
|
+
} else if (value !== undefined) {
|
|
374
|
+
if ($.isPlainObject(settings[name])) {
|
|
375
|
+
$.extend(true, settings[name], value);
|
|
376
|
+
} else {
|
|
377
|
+
settings[name] = value;
|
|
378
|
+
}
|
|
379
|
+
} else {
|
|
380
|
+
return settings[name];
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
internal: function (name, value) {
|
|
384
|
+
module.debug('Changing internal', name, value);
|
|
385
|
+
if (value !== undefined) {
|
|
386
|
+
if ($.isPlainObject(name)) {
|
|
387
|
+
$.extend(true, module, name);
|
|
388
|
+
} else {
|
|
389
|
+
module[name] = value;
|
|
390
|
+
}
|
|
391
|
+
} else {
|
|
392
|
+
return module[name];
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
debug: function () {
|
|
396
|
+
if (!settings.silent && settings.debug) {
|
|
397
|
+
if (settings.performance) {
|
|
398
|
+
module.performance.log(arguments);
|
|
399
|
+
} else {
|
|
400
|
+
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
|
401
|
+
module.debug.apply(console, arguments);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
verbose: function () {
|
|
406
|
+
if (!settings.silent && settings.verbose && settings.debug) {
|
|
407
|
+
if (settings.performance) {
|
|
408
|
+
module.performance.log(arguments);
|
|
409
|
+
} else {
|
|
410
|
+
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
|
411
|
+
module.verbose.apply(console, arguments);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
error: function () {
|
|
416
|
+
if (!settings.silent) {
|
|
417
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
|
418
|
+
module.error.apply(console, arguments);
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
performance: {
|
|
422
|
+
log: function (message) {
|
|
423
|
+
var
|
|
424
|
+
currentTime,
|
|
425
|
+
executionTime,
|
|
426
|
+
previousTime
|
|
427
|
+
;
|
|
428
|
+
if (settings.performance) {
|
|
429
|
+
currentTime = Date.now();
|
|
430
|
+
previousTime = time || currentTime;
|
|
431
|
+
executionTime = currentTime - previousTime;
|
|
432
|
+
time = currentTime;
|
|
433
|
+
performance.push({
|
|
434
|
+
Name: message[0],
|
|
435
|
+
Arguments: [].slice.call(message, 1) || '',
|
|
436
|
+
Element: element,
|
|
437
|
+
'Execution Time': executionTime,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
clearTimeout(module.performance.timer);
|
|
441
|
+
module.performance.timer = setTimeout(function () {
|
|
442
|
+
module.performance.display();
|
|
443
|
+
}, 500);
|
|
444
|
+
},
|
|
445
|
+
display: function () {
|
|
446
|
+
var
|
|
447
|
+
title = settings.name + ':',
|
|
448
|
+
totalTime = 0
|
|
449
|
+
;
|
|
450
|
+
time = false;
|
|
451
|
+
clearTimeout(module.performance.timer);
|
|
452
|
+
$.each(performance, function (index, data) {
|
|
453
|
+
totalTime += data['Execution Time'];
|
|
454
|
+
});
|
|
455
|
+
title += ' ' + totalTime + 'ms';
|
|
456
|
+
if (performance.length > 0) {
|
|
457
|
+
console.groupCollapsed(title);
|
|
458
|
+
if (console.table) {
|
|
459
|
+
console.table(performance);
|
|
460
|
+
} else {
|
|
461
|
+
$.each(performance, function (index, data) {
|
|
462
|
+
console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
console.groupEnd();
|
|
466
|
+
}
|
|
467
|
+
performance = [];
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
invoke: function (query, passedArguments, context) {
|
|
471
|
+
var
|
|
472
|
+
object = instance,
|
|
473
|
+
maxDepth,
|
|
474
|
+
found,
|
|
475
|
+
response
|
|
476
|
+
;
|
|
477
|
+
passedArguments = passedArguments || queryArguments;
|
|
478
|
+
context = context || element;
|
|
479
|
+
if (typeof query === 'string' && object !== undefined) {
|
|
480
|
+
query = query.split(/[ .]/);
|
|
481
|
+
maxDepth = query.length - 1;
|
|
482
|
+
$.each(query, function (depth, value) {
|
|
483
|
+
var camelCaseValue = depth !== maxDepth
|
|
484
|
+
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
|
485
|
+
: query;
|
|
486
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
|
487
|
+
object = object[camelCaseValue];
|
|
488
|
+
} else if (object[camelCaseValue] !== undefined) {
|
|
489
|
+
found = object[camelCaseValue];
|
|
490
|
+
|
|
491
|
+
return false;
|
|
492
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
|
493
|
+
object = object[value];
|
|
494
|
+
} else if (object[value] !== undefined) {
|
|
495
|
+
found = object[value];
|
|
496
|
+
|
|
497
|
+
return false;
|
|
498
|
+
} else {
|
|
499
|
+
module.error(error.method, query);
|
|
500
|
+
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
if (isFunction(found)) {
|
|
506
|
+
response = found.apply(context, passedArguments);
|
|
507
|
+
} else if (found !== undefined) {
|
|
508
|
+
response = found;
|
|
509
|
+
}
|
|
510
|
+
if (Array.isArray(returnedValue)) {
|
|
511
|
+
returnedValue.push(response);
|
|
512
|
+
} else if (returnedValue !== undefined) {
|
|
513
|
+
returnedValue = [returnedValue, response];
|
|
514
|
+
} else if (response !== undefined) {
|
|
515
|
+
returnedValue = response;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return found;
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
if (methodInvoked) {
|
|
522
|
+
if (instance === undefined) {
|
|
523
|
+
module.initialize();
|
|
524
|
+
}
|
|
525
|
+
module.invoke(query);
|
|
526
|
+
} else {
|
|
527
|
+
if (instance !== undefined) {
|
|
528
|
+
instance.invoke('destroy');
|
|
529
|
+
}
|
|
530
|
+
module.initialize();
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
return returnedValue !== undefined
|
|
535
|
+
? returnedValue
|
|
536
|
+
: this;
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
$.fn.accordion.settings = {
|
|
540
|
+
|
|
541
|
+
name: 'Accordion',
|
|
542
|
+
namespace: 'accordion',
|
|
543
|
+
|
|
544
|
+
silent: false,
|
|
545
|
+
debug: false,
|
|
546
|
+
verbose: false,
|
|
547
|
+
performance: true,
|
|
548
|
+
|
|
549
|
+
on: 'click', // event on title that opens accordion
|
|
550
|
+
|
|
551
|
+
observeChanges: true, // whether accordion should automatically refresh on DOM insertion
|
|
552
|
+
|
|
553
|
+
exclusive: true, // whether a single accordion content panel should be open at once
|
|
554
|
+
collapsible: true, // whether accordion content can be closed
|
|
555
|
+
closeNested: false, // whether nested content should be closed when a panel is closed
|
|
556
|
+
animateChildren: true, // whether children opacity should be animated
|
|
557
|
+
|
|
558
|
+
duration: 350, // duration of animation
|
|
559
|
+
easing: 'easeOutQuad', // easing equation for animation
|
|
560
|
+
|
|
561
|
+
onOpening: function () {}, // callback before open animation
|
|
562
|
+
onClosing: function () {}, // callback before closing animation
|
|
563
|
+
onChanging: function () {}, // callback before closing or opening animation
|
|
564
|
+
|
|
565
|
+
onOpen: function () {}, // callback after open animation
|
|
566
|
+
onClose: function () {}, // callback after closing animation
|
|
567
|
+
onChange: function () {}, // callback after closing or opening animation
|
|
568
|
+
|
|
569
|
+
error: {
|
|
570
|
+
method: 'The method you called is not defined',
|
|
571
|
+
},
|
|
572
|
+
|
|
573
|
+
className: {
|
|
574
|
+
active: 'active',
|
|
575
|
+
animating: 'animating',
|
|
576
|
+
transition: 'transition',
|
|
577
|
+
},
|
|
578
|
+
|
|
579
|
+
selector: {
|
|
580
|
+
accordion: '.accordion',
|
|
581
|
+
title: '.title',
|
|
582
|
+
trigger: '.title',
|
|
583
|
+
ignore: '.ui.dropdown',
|
|
584
|
+
content: '.content',
|
|
585
|
+
},
|
|
586
|
+
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
// Adds easing
|
|
590
|
+
$.extend($.easing, {
|
|
591
|
+
easeOutQuad: function (x) {
|
|
592
|
+
return 1 - (1 - x) * (1 - x);
|
|
593
|
+
},
|
|
594
|
+
});
|
|
595
|
+
})(jQuery, window, document);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* # Fomantic-UI 2.9.4 - Accordion
|
|
3
|
+
* https://github.com/fomantic/Fomantic-UI/
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://opensource.org/licenses/MIT
|
|
8
|
+
*
|
|
9
|
+
*/.ui.accordion,.ui.accordion .accordion{max-width:100%}.ui.accordion .accordion{margin:1em 0 0;padding:0}.ui.accordion .accordion>.title,.ui.accordion.menu .item>.title,.ui.accordion>.title{cursor:pointer;padding:.5em 0;font-family:Lato,system-ui,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1em;color:rgba(0,0,0,.87);list-style:none;line-height:1}.ui.accordion:not(.styled) .accordion .title~.content,.ui.accordion:not(.styled) .title~.content{margin:"";padding:.5em 0 1em}.ui.accordion:not(.styled) .title~.content:last-child{padding-bottom:0}.ui.accordion .accordion .title>.dropdown.icon,.ui.accordion .title>.dropdown.icon,.ui.accordion .ui.header>.dropdown.icon{display:inline-block;float:none;opacity:1;width:1.25em;height:1em;margin:0 .25rem 0 0;padding:0;font-size:1em;transition:transform .1s ease,opacity .1s ease;vertical-align:baseline;transform:none}.ui.accordion .accordion .title>.dropdown.icon.right,.ui.accordion .title>.dropdown.icon.right,.ui.accordion .ui.header>.dropdown.icon.right{float:right;transform:rotate(180deg)}.ui.accordion.menu .item .title{display:block;padding:0}.ui.accordion.menu .item .title>.dropdown.icon{float:right;margin:0 .25rem 0 0;transform:rotate(180deg)}.ui.accordion .ui.header>.dropdown.icon{font-size:1em;margin:0 .25rem 0 0}.ui.accordion .accordion .active.title>.dropdown.icon,.ui.accordion .accordion[open]>.title>.dropdown.icon,.ui.accordion .active.title>.dropdown.icon,.ui.accordion[open]>.title>.dropdown.icon{transform:rotate(90deg)}.ui.accordion.menu .item .active.title>.dropdown.icon{transform:rotate(90deg)}.ui.styled.accordion{width:600px}.ui.styled.accordion,.ui.styled.accordion .accordion{border-radius:.28571429rem;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15)}.ui.styled.accordion .accordion>.title,.ui.styled.accordion>.title{margin:0;padding:.75em 1em;color:rgba(0,0,0,.4);font-weight:700;border-top:1px solid rgba(34,36,38,.15);transition:background .1s ease,color .1s ease}.ui.styled.accordion .accordion>.title:first-child,.ui.styled.accordion>.title:first-child{border-top:none}.ui.styled.accordion>.content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion>.content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion>.title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .accordion>.title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .active.title,.ui.styled.accordion[open]>.title{background:0 0;color:rgba(0,0,0,.95)}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion[open]>.title{background:0 0;color:rgba(0,0,0,.95)}.ui.compact.accordion:not(.styled) .accordion>.title,.ui.compact.accordion:not(.styled)>.title{padding:.25em 0}.ui.compact.accordion:not(.styled) .accordion .title~.content,.ui.compact.accordion:not(.styled) .title~.content{padding:.25em 0 .5em}.ui.compact.styled.accordion .accordion>.title,.ui.compact.styled.accordion>.title{padding:.375em .5em}.ui.compact.styled.accordion .accordion .title~.content,.ui.compact.styled.accordion .title~.content{padding:.25em .5em .75em}.ui[class*="very compact"].accordion:not(.styled) .accordion>.title,.ui[class*="very compact"].accordion:not(.styled)>.title{padding:.125em 0}.ui[class*="very compact"].accordion:not(.styled) .accordion .title~.content,.ui[class*="very compact"].accordion:not(.styled) .title~.content{padding:.125em 0 .25em}.ui[class*="very compact"].styled.accordion .accordion>.title,.ui[class*="very compact"].styled.accordion>.title{padding:.1875em .25em}.ui[class*="very compact"].styled.accordion .accordion .title~.content,.ui[class*="very compact"].styled.accordion .title~.content{padding:.125em .25em .375em}.ui.accordion .accordion:not(details) .title~.content:not(.active),.ui.accordion:not(details) .title~.content:not(.active){display:none}.ui.fluid.accordion,.ui.fluid.accordion .accordion{width:100%}.ui.inverted.accordion .accordion>.title,.ui.inverted.accordion.menu .item>.title,.ui.inverted.accordion>.title{color:rgba(255,255,255,.9)}.ui.inverted.styled.accordion,.ui.inverted.styled.accordion .accordion{background:#1b1c1d;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(255,255,255,.1)}.ui.inverted.styled.accordion .accordion>.title,.ui.inverted.styled.accordion>.title{color:rgba(255,255,255,.5);border-top:1px solid rgba(255,255,255,.1)}.ui.inverted.styled.accordion>.title:hover{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.styled.accordion .accordion>.title:hover{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.styled.accordion .active.title,.ui.inverted.styled.accordion[open]>.title{background:0 0;color:#fff}.ui.inverted.styled.accordion .accordion .active.title,.ui.inverted.styled.accordion .accordion[open]>.title{background:0 0;color:#fff}.ui.basic.styled.accordion,.ui.basic.styled.accordion .accordion{background:0 0;box-shadow:none}.ui.basic.styled.accordion .accordion>.title,.ui.basic.styled.accordion>.title{border:none;color:rgba(0,0,0,.6)}.ui.basic.styled.accordion .accordion>.title:hover,.ui.basic.styled.accordion>.title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.basic.styled.accordion .accordion .active.title,.ui.basic.styled.accordion .accordion[open]>.title,.ui.basic.styled.accordion .active.title,.ui.basic.styled.accordion[open]>.title{background:0 0;color:rgba(0,0,0,.95)}.ui.inverted.basic.styled.accordion .accordion>.title,.ui.inverted.basic.styled.accordion>.title{background:0 0;color:rgba(255,255,255,.8)}.ui.inverted.basic.styled.accordion .accordion>.title:hover,.ui.inverted.basic.styled.accordion>.title:hover{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.basic.styled.accordion .accordion .active.title,.ui.inverted.basic.styled.accordion .accordion[open]>.title,.ui.inverted.basic.styled.accordion .active.title,.ui.inverted.basic.styled.accordion[open]>.title{background:0 0;color:#fff}.ui.tree.accordion:not(.styled) .accordion .title~.content,.ui.tree.accordion:not(.styled) .title~.content{padding:0}.ui.tree.accordion .accordion>.content,.ui.tree.accordion>.content{margin-left:1.7em}.ui.tree.accordion .accordion{margin-top:0}@font-face{font-family:Accordion;src:url(data:application/font-woff;base64,d09GRk9UVE8AAAREAAsAAAAABkAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAC7AAAAQoAAAE/j/fxwUZGVE0AAAQUAAAAHAAAAByNqvxQR0RFRgAAA/gAAAAcAAAAIAAnABhPUy8yAAABYAAAAEIAAABgTadW5mNtYXAAAAKMAAAAUQAAAWAFZuKDaGVhZAAAAQgAAAAyAAAANg8zT8toaGVhAAABPAAAABoAAAAkApkA5mhtdHgAAAQwAAAAEwAAABYBtwASbWF4cAAAAVgAAAAGAAAABgAGUABuYW1lAAABpAAAAOYAAAGq/HAhWXBvc3QAAALgAAAADAAAACAAAwAAeJxjYGRgYADi8KWRsvH8Nl8ZuJkYQOD838XvQPT9hGxNIOXJsJ0xD0hzMIClARzsCcoAAHicY2BkYGB88P8BkGQAg+0wBhywAgBgjgOAAAAAAFAAAAYAAHicY2BmOM84gYGVgYHRhzGNgYHBHUp/ZZBkaGFABYwCSJyANNcUBgcGhg+3GB/8fwCUfMCgAFIDV6AAhIwARVcMJwAAeJx1jrFOwzAURU/SNKgFIVgQ6uSRKWolZjaQOnQBqQNb2lpRpMqW3HTowhew8U9I/BU37WOjtmyfd/3utYEbvsn4G7lxRsmtcc4FD8YD6U/GhfjNeMglybjU/DQeM+FHrqwY2QsnzrgSnTjnmnvjgfSpcSF+Nh5yx7txKf3DeMwjX31soqajJdCoqLs26HzFq9yz1WVS6Zv9tk5nmv8Vl0pI7CRHXThmVPofS592bQxuVk3PGF+Ohk6WRhHhGNO3eTbSVhy0z1mra6HV91YyxdC5xgevFL9xq4Obr+MixlDxC/HTOrsAAHicY2BgYGaAYBkGRgYQiALyGMF8FgY7IM3FwMHABISMDAofbv3/+/8/WJXCh5tgNuP/x2A+RC8bUC0DUB8rWIgNiJkY8AJm/NJDHgAALqoOxgAAAHicY2BmwAsAAH0ABHicPY7BSsNAEIZnkk2zlhg1JKAYxOrJi6RepMdC8SKefAJP4kVBzCtkNw7ZjeK1j9C38Rn6CO5CDrppigwMM8P/f/8gMAaIGL4+vD09PwJ6gLCwp2AnaM88e+7bQ0aRTxE7GcPRffJL9D9EIX2bW+sFOXzu5QD7OSwPcuA5Xiew05N8CIDDLiSQuTqGSVmU0/KqKG+Kxaxv8+llMURvHwBAgRJrfEeCEaLns9HdRxzHP/FqaV4yaptWK25SkwZKu4Va0rUSWjYVVbz7CqmqhZBSiNodqGqk5l2vFqrW1PJ4tWbGqZxVKa31htA6gmN2aTBwBobzuYsU1YYkGheyZVBqLjKKxn8cSmvuAAB4nGNgZGBg4AFiAQYJBiYgzQLEIJoRggEFbQBAAAAAAQAAAADeTO04AAAAAM/9o+4AAAAA32BrKXicY2BAAEYQsZ1BiIEBAAPpAMsA) format("woff");font-weight:400;font-style:normal}.ui.accordion .accordion .title>.dropdown.icon,.ui.accordion .title>.dropdown.icon,.ui.accordion .ui.header>.dropdown.icon{font-family:Accordion;line-height:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.accordion .accordion .title>.dropdown.icon::before,.ui.accordion .title>.dropdown.icon::before,.ui.accordion .ui.header>.dropdown.icon::before{content:"\f0da"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* # Fomantic UI - 2.9.4
|
|
3
|
+
* https://github.com/fomantic/Fomantic-UI
|
|
4
|
+
* https://fomantic-ui.com/
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2025 Contributors
|
|
7
|
+
* Released under the MIT license
|
|
8
|
+
* https://opensource.org/licenses/MIT
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
!function(O,x){"use strict";x=void 0!==x&&x.Math===Math?x:globalThis,O.fn.accordion=function(v){var p,e=O(this),m=Date.now(),h=[],b=v,y="string"==typeof b,C=[].slice.call(arguments,1);return e.each(function(){var e,a=O.isPlainObject(v)?O.extend(!0,{},O.fn.accordion.settings,v):O.extend({},O.fn.accordion.settings),s=a.className,n=a.namespace,l=a.selector,c=a.error,i="."+n,t="module-"+n,o=O(this),r=o.find(l.title),d=o.find(l.content),u=this,g=o.data(t),f={initialize:function(){f.debug("Initializing",o),f.bind.events(),a.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){g=f,o.data(t,f)},destroy:function(){f.debug("Destroying previous instance",o),o.off(i).removeData(t)},refresh:function(){r=o.find(l.title),d=o.find(l.content)},observeChanges:function(){"MutationObserver"in x&&((e=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()})).observe(u,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",e))},bind:{events:function(){f.debug("Binding delegated events"),o.on(a.on+i,l.trigger,f.event.click)}},event:{click:function(e){0===O(e.target).closest(l.ignore).length&&f.toggle.call(this)}},toggle:function(e){var e=void 0!==e?"number"==typeof e?r.eq(e):O(e).closest(l.title):O(this).closest(l.title),n=e.next(d),i=n.hasClass(s.animating),n=n.hasClass(s.active),t=n&&!i,n=!n&&i;f.debug("Toggling visibility of content",e),t||n?a.collapsible?f.close.call(e):f.debug("Cannot close accordion content collapsing is disabled"):f.open.call(e)},open:function(e){var e=void 0!==e?"number"==typeof e?r.eq(e):O(e).closest(l.title):O(this).closest(l.title),n=e.next(d),i=n.hasClass(s.animating);n.hasClass(s.active)||i?f.debug("Accordion already open, skipping",n):(f.debug("Opening accordion content",e),a.onOpening.call(n),a.onChanging.call(n),a.exclusive&&f.closeOthers.call(e),e.addClass(s.active),n.stop(!0,!0).addClass(s.animating),a.animateChildren&&(void 0!==O.fn.transition?n.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0,onComplete:function(){n.children().removeClass(s.transition)}}):n.children().stop(!0,!0).animate({opacity:1},a.duration,f.resetOpacity)),n.slideDown(a.duration,a.easing,function(){n.removeClass(s.animating).addClass(s.active),f.reset.display.call(this),a.onOpen.call(this),a.onChange.call(this)}))},close:function(e){var e=void 0!==e?"number"==typeof e?r.eq(e):O(e).closest(l.title):O(this).closest(l.title),n=e.next(d),i=n.hasClass(s.animating),t=n.hasClass(s.active);!t&&!(!t&&i)||t&&i||(f.debug("Closing accordion content",n),a.onClosing.call(n),a.onChanging.call(n),e.removeClass(s.active),n.stop(!0,!0).addClass(s.animating),a.animateChildren&&(void 0!==O.fn.transition?n.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):n.children().stop(!0,!0).animate({opacity:0},a.duration,f.resetOpacity)),n.slideUp(a.duration,a.easing,function(){n.removeClass(s.animating).removeClass(s.active),f.reset.display.call(this),a.onClose.call(this),a.onChange.call(this)}))},closeOthers:function(e){var n,e=void 0!==e?r.eq(e):O(this).closest(l.title),i=e.parents(l.content).prev(l.title),e=e.closest(l.accordion),t=l.title+"."+s.active+":visible",o=l.content+"."+s.active+":visible",o=a.closeNested?(n=e.find(t).not(i)).next(d):(n=e.find(t).not(i),e=e.find(o).find(t).not(i),(n=n.not(e)).next(d));0<n.length&&(f.debug("Exclusive enabled, closing other content",n),n.removeClass(s.active),o.removeClass(s.animating).stop(!0,!0),a.animateChildren&&(void 0!==O.fn.transition?o.children().transition({animation:"fade out",useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},a.duration,f.resetOpacity)),o.slideUp(a.duration,a.easing,function(){O(this).removeClass(s.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this);var e=O(this);e.css("display",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this);var e=O(this);e.css("opacity",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")}},setting:function(e,n){if(f.debug("Changing setting",e,n),O.isPlainObject(e))O.extend(!0,a,e);else{if(void 0===n)return a[e];O.isPlainObject(a[e])?O.extend(!0,a[e],n):a[e]=n}},internal:function(e,n){if(f.debug("Changing internal",e,n),void 0===n)return f[e];O.isPlainObject(e)?O.extend(!0,f,e):f[e]=n},debug:function(){!a.silent&&a.debug&&(a.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,a.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),f.verbose.apply(console,arguments)))},error:function(){a.silent||(f.error=Function.prototype.bind.call(console.error,console,a.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var n,i;a.performance&&(i=(n=Date.now())-(m||n),m=n,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(function(){f.performance.display()},500)},display:function(){var e=a.name+":",i=0;m=!1,clearTimeout(f.performance.timer),O.each(h,function(e,n){i+=n["Execution Time"]}),e+=" "+i+"ms",0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):O.each(h,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(t,e,n){var o,a,i,s,l=g;return e=e||C,n=n||u,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),o=t.length-1,O.each(t,function(e,n){var i=e!==o?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(O.isPlainObject(l[i])&&e!==o)l=l[i];else{if(void 0!==l[i])return a=l[i],!1;{if(!O.isPlainObject(l[n])||e===o)return void 0!==l[n]?a=l[n]:f.error(c.method,t),!1;l=l[n]}}})),"function"==typeof(s=a)&&"number"!=typeof s.nodeType?i=a.apply(n,e):void 0!==a&&(i=a),Array.isArray(p)?p.push(i):void 0!==p?p=[p,i]:void 0!==i&&(p=i),a}};y?(void 0===g&&f.initialize(),f.invoke(b)):(void 0!==g&&g.invoke("destroy"),f.initialize())}),void 0!==p?p:this},O.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",ignore:".ui.dropdown",content:".content"}},O.extend(O.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
|