rails-active-ui 0.1.0

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.
Files changed (167) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +6 -0
  3. data/app/assets/stylesheets.css +73555 -0
  4. data/app/components/accordion_component.rb +34 -0
  5. data/app/components/ad_component.rb +28 -0
  6. data/app/components/api_component.rb +24 -0
  7. data/app/components/breadcrumb_component.rb +26 -0
  8. data/app/components/button_component.rb +49 -0
  9. data/app/components/calendar_component.rb +34 -0
  10. data/app/components/card_component.rb +56 -0
  11. data/app/components/checkbox_component.rb +41 -0
  12. data/app/components/column_component.rb +62 -0
  13. data/app/components/comment_component.rb +45 -0
  14. data/app/components/concerns/alignable.rb +21 -0
  15. data/app/components/concerns/attachable.rb +16 -0
  16. data/app/components/concerns/orientable.rb +21 -0
  17. data/app/components/concerns/positionable.rb +21 -0
  18. data/app/components/concerns/sizeable.rb +18 -0
  19. data/app/components/container_component.rb +23 -0
  20. data/app/components/dimmer_component.rb +30 -0
  21. data/app/components/divider_component.rb +30 -0
  22. data/app/components/dropdown_component.rb +63 -0
  23. data/app/components/embed_component.rb +32 -0
  24. data/app/components/emoji_component.rb +15 -0
  25. data/app/components/feed_component.rb +22 -0
  26. data/app/components/flag_component.rb +15 -0
  27. data/app/components/flyout_component.rb +41 -0
  28. data/app/components/form_component.rb +39 -0
  29. data/app/components/grid_component.rb +85 -0
  30. data/app/components/h_stack_component.rb +67 -0
  31. data/app/components/header_component.rb +60 -0
  32. data/app/components/icon_component.rb +41 -0
  33. data/app/components/image_component.rb +46 -0
  34. data/app/components/input_component.rb +52 -0
  35. data/app/components/item_component.rb +39 -0
  36. data/app/components/item_group_component.rb +30 -0
  37. data/app/components/label_component.rb +49 -0
  38. data/app/components/link_component.rb +23 -0
  39. data/app/components/list_component.rb +39 -0
  40. data/app/components/loader_component.rb +33 -0
  41. data/app/components/menu_component.rb +64 -0
  42. data/app/components/menu_item_component.rb +52 -0
  43. data/app/components/message_component.rb +54 -0
  44. data/app/components/modal_component.rb +50 -0
  45. data/app/components/nag_component.rb +25 -0
  46. data/app/components/overlay_component.rb +16 -0
  47. data/app/components/placeholder_component.rb +39 -0
  48. data/app/components/popup_component.rb +31 -0
  49. data/app/components/progress_component.rb +48 -0
  50. data/app/components/pusher_component.rb +18 -0
  51. data/app/components/rail_component.rb +31 -0
  52. data/app/components/rating_component.rb +41 -0
  53. data/app/components/reset_component.rb +12 -0
  54. data/app/components/reveal_component.rb +39 -0
  55. data/app/components/row_component.rb +39 -0
  56. data/app/components/search_component.rb +44 -0
  57. data/app/components/segment_component.rb +57 -0
  58. data/app/components/segment_group_component.rb +36 -0
  59. data/app/components/shape_component.rb +25 -0
  60. data/app/components/sidebar_component.rb +33 -0
  61. data/app/components/site_component.rb +12 -0
  62. data/app/components/slider_component.rb +46 -0
  63. data/app/components/state_component.rb +25 -0
  64. data/app/components/statistic_component.rb +43 -0
  65. data/app/components/step_component.rb +56 -0
  66. data/app/components/step_group_component.rb +38 -0
  67. data/app/components/sticky_component.rb +22 -0
  68. data/app/components/sub_header_component.rb +15 -0
  69. data/app/components/sub_menu_component.rb +24 -0
  70. data/app/components/tab_component.rb +24 -0
  71. data/app/components/table_cell_component.rb +60 -0
  72. data/app/components/table_component.rb +160 -0
  73. data/app/components/table_row_component.rb +43 -0
  74. data/app/components/text_component.rb +73 -0
  75. data/app/components/toast_component.rb +36 -0
  76. data/app/components/transition_component.rb +32 -0
  77. data/app/components/v_stack_component.rb +31 -0
  78. data/app/components/visibility_component.rb +22 -0
  79. data/app/helpers/component_helper.rb +109 -0
  80. data/app/helpers/fui_helper.rb +53 -0
  81. data/app/javascript/accordion.js +547 -0
  82. data/app/javascript/accordion.min.js +11 -0
  83. data/app/javascript/api.js +1112 -0
  84. data/app/javascript/api.min.js +11 -0
  85. data/app/javascript/calendar.js +1960 -0
  86. data/app/javascript/calendar.min.js +11 -0
  87. data/app/javascript/checkbox.js +819 -0
  88. data/app/javascript/checkbox.min.js +11 -0
  89. data/app/javascript/dimmer.js +686 -0
  90. data/app/javascript/dimmer.min.js +11 -0
  91. data/app/javascript/dropdown.js +4019 -0
  92. data/app/javascript/dropdown.min.js +11 -0
  93. data/app/javascript/embed.js +646 -0
  94. data/app/javascript/embed.min.js +11 -0
  95. data/app/javascript/flyout.js +1405 -0
  96. data/app/javascript/flyout.min.js +11 -0
  97. data/app/javascript/form.js +2070 -0
  98. data/app/javascript/form.min.js +11 -0
  99. data/app/javascript/jquery.js +10716 -0
  100. data/app/javascript/jquery.min.js +2 -0
  101. data/app/javascript/modal.js +1507 -0
  102. data/app/javascript/modal.min.js +11 -0
  103. data/app/javascript/nag.js +522 -0
  104. data/app/javascript/nag.min.js +11 -0
  105. data/app/javascript/popup.js +1457 -0
  106. data/app/javascript/popup.min.js +11 -0
  107. data/app/javascript/progress.js +922 -0
  108. data/app/javascript/progress.min.js +11 -0
  109. data/app/javascript/rating.js +496 -0
  110. data/app/javascript/rating.min.js +11 -0
  111. data/app/javascript/search.js +1519 -0
  112. data/app/javascript/search.min.js +11 -0
  113. data/app/javascript/shape.js +721 -0
  114. data/app/javascript/shape.min.js +11 -0
  115. data/app/javascript/sidebar.js +952 -0
  116. data/app/javascript/sidebar.min.js +11 -0
  117. data/app/javascript/site.js +415 -0
  118. data/app/javascript/site.min.js +11 -0
  119. data/app/javascript/slider.js +1449 -0
  120. data/app/javascript/slider.min.js +11 -0
  121. data/app/javascript/state.js +653 -0
  122. data/app/javascript/state.min.js +11 -0
  123. data/app/javascript/sticky.js +852 -0
  124. data/app/javascript/sticky.min.js +11 -0
  125. data/app/javascript/tab.js +867 -0
  126. data/app/javascript/tab.min.js +11 -0
  127. data/app/javascript/toast.js +916 -0
  128. data/app/javascript/toast.min.js +11 -0
  129. data/app/javascript/transition.js +955 -0
  130. data/app/javascript/transition.min.js +11 -0
  131. data/app/javascript/ui/controllers/fui_accordion_controller.js +45 -0
  132. data/app/javascript/ui/controllers/fui_api_controller.js +80 -0
  133. data/app/javascript/ui/controllers/fui_calendar_controller.js +66 -0
  134. data/app/javascript/ui/controllers/fui_checkbox_controller.js +48 -0
  135. data/app/javascript/ui/controllers/fui_dimmer_controller.js +45 -0
  136. data/app/javascript/ui/controllers/fui_dropdown_controller.js +68 -0
  137. data/app/javascript/ui/controllers/fui_embed_controller.js +49 -0
  138. data/app/javascript/ui/controllers/fui_flyout_controller.js +49 -0
  139. data/app/javascript/ui/controllers/fui_form_controller.js +62 -0
  140. data/app/javascript/ui/controllers/fui_modal_controller.js +61 -0
  141. data/app/javascript/ui/controllers/fui_nag_controller.js +52 -0
  142. data/app/javascript/ui/controllers/fui_popup_controller.js +58 -0
  143. data/app/javascript/ui/controllers/fui_progress_controller.js +60 -0
  144. data/app/javascript/ui/controllers/fui_rating_controller.js +49 -0
  145. data/app/javascript/ui/controllers/fui_search_controller.js +76 -0
  146. data/app/javascript/ui/controllers/fui_shape_controller.js +45 -0
  147. data/app/javascript/ui/controllers/fui_sidebar_controller.js +48 -0
  148. data/app/javascript/ui/controllers/fui_site_controller.js +29 -0
  149. data/app/javascript/ui/controllers/fui_slider_controller.js +53 -0
  150. data/app/javascript/ui/controllers/fui_state_controller.js +63 -0
  151. data/app/javascript/ui/controllers/fui_sticky_controller.js +50 -0
  152. data/app/javascript/ui/controllers/fui_tab_controller.js +57 -0
  153. data/app/javascript/ui/controllers/fui_toast_controller.js +60 -0
  154. data/app/javascript/ui/controllers/fui_transition_controller.js +60 -0
  155. data/app/javascript/ui/controllers/fui_visibility_controller.js +55 -0
  156. data/app/javascript/ui/index.js +114 -0
  157. data/app/javascript/visibility.js +1196 -0
  158. data/app/javascript/visibility.min.js +11 -0
  159. data/app/lib/component.rb +63 -0
  160. data/config/importmap.rb +27 -0
  161. data/config/initializers/ruby_template_handler.rb +31 -0
  162. data/config/routes.rb +2 -0
  163. data/lib/tasks/ui_tasks.rake +4 -0
  164. data/lib/ui/engine.rb +27 -0
  165. data/lib/ui/version.rb +3 -0
  166. data/lib/ui.rb +6 -0
  167. metadata +220 -0
@@ -0,0 +1,547 @@
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 (...args) {
23
+ const $allModules = $(this);
24
+
25
+ let time = Date.now();
26
+ let performance = [];
27
+
28
+ const parameters = args[0];
29
+ const methodInvoked = typeof parameters === 'string';
30
+ const queryArguments = args.slice(1);
31
+
32
+ let returnedValue;
33
+ $allModules.each(function () {
34
+ const settings = $.isPlainObject(parameters)
35
+ ? $.extend(true, {}, $.fn.accordion.settings, parameters)
36
+ : $.extend({}, $.fn.accordion.settings);
37
+
38
+ const className = settings.className;
39
+ const namespace = settings.namespace;
40
+ const selector = settings.selector;
41
+ const error = settings.error;
42
+
43
+ const eventNamespace = '.' + namespace;
44
+ const moduleNamespace = 'module-' + namespace;
45
+
46
+ const $module = $(this);
47
+ let $title = $module.find(selector.title);
48
+ let $content = $module.find(selector.content);
49
+
50
+ const element = this;
51
+ let instance = $module.data(moduleNamespace);
52
+ let observer;
53
+
54
+ const module = {
55
+
56
+ initialize: function () {
57
+ module.debug('Initializing', $module);
58
+ module.bind.events();
59
+ if (settings.observeChanges) {
60
+ module.observeChanges();
61
+ }
62
+ module.instantiate();
63
+ },
64
+
65
+ instantiate: function () {
66
+ instance = module;
67
+ $module
68
+ .data(moduleNamespace, module);
69
+ },
70
+
71
+ destroy: function () {
72
+ module.debug('Destroying previous instance', $module);
73
+ $module
74
+ .off(eventNamespace)
75
+ .removeData(moduleNamespace);
76
+ },
77
+
78
+ refresh: function () {
79
+ $title = $module.find(selector.title);
80
+ $content = $module.find(selector.content);
81
+ },
82
+
83
+ observeChanges: function () {
84
+ observer = new MutationObserver(function (mutations) {
85
+ module.debug('DOM tree modified, updating selector cache');
86
+ module.refresh();
87
+ });
88
+ observer.observe(element, {
89
+ childList: true,
90
+ subtree: true,
91
+ });
92
+ module.debug('Setting up mutation observer', observer);
93
+ },
94
+
95
+ bind: {
96
+ events: function () {
97
+ module.debug('Binding delegated events');
98
+ $module
99
+ .on(settings.on + eventNamespace, selector.trigger, module.event.click);
100
+ },
101
+ },
102
+
103
+ event: {
104
+ click: function (event) {
105
+ if ($(event.target).closest(selector.ignore).length === 0) {
106
+ module.toggle.call(this);
107
+ }
108
+ },
109
+ },
110
+
111
+ toggle: function (query) {
112
+ const $activeTitle = query !== undefined
113
+ ? (typeof query === 'number'
114
+ ? $title.eq(query)
115
+ : $(query).closest(selector.title))
116
+ : $(this).closest(selector.title);
117
+ const $activeContent = $activeTitle.next($content);
118
+ const isAnimating = $activeContent.hasClass(className.animating);
119
+ const isActive = $activeContent.hasClass(className.active);
120
+ const isOpen = isActive && !isAnimating;
121
+ const isOpening = !isActive && isAnimating;
122
+ module.debug('Toggling visibility of content', $activeTitle);
123
+ if (isOpen || isOpening) {
124
+ if (settings.collapsible) {
125
+ module.close.call($activeTitle);
126
+ } else {
127
+ module.debug('Cannot close accordion content collapsing is disabled');
128
+ }
129
+ } else {
130
+ module.open.call($activeTitle);
131
+ }
132
+ },
133
+
134
+ open: function (query) {
135
+ const $activeTitle = query !== undefined
136
+ ? (typeof query === 'number'
137
+ ? $title.eq(query)
138
+ : $(query).closest(selector.title))
139
+ : $(this).closest(selector.title);
140
+ const $activeContent = $activeTitle.next($content);
141
+ const isAnimating = $activeContent.hasClass(className.animating);
142
+ const isActive = $activeContent.hasClass(className.active);
143
+ const isOpen = isActive || isAnimating;
144
+ if (isOpen) {
145
+ module.debug('Accordion already open, skipping', $activeContent);
146
+
147
+ return;
148
+ }
149
+ module.debug('Opening accordion content', $activeTitle);
150
+ settings.onOpening.call($activeContent);
151
+ settings.onChanging.call($activeContent);
152
+ if (settings.exclusive) {
153
+ module.closeOthers.call($activeTitle);
154
+ }
155
+ $activeTitle
156
+ .addClass(className.active);
157
+ $activeContent
158
+ .stop(true, true)
159
+ .addClass(className.animating);
160
+ if (settings.animateChildren) {
161
+ if ($.fn.transition !== undefined) {
162
+ $activeContent
163
+ .children()
164
+ .transition({
165
+ animation: 'fade in',
166
+ queue: false,
167
+ useFailSafe: true,
168
+ debug: settings.debug,
169
+ verbose: settings.verbose,
170
+ silent: settings.silent,
171
+ duration: settings.duration,
172
+ skipInlineHidden: true,
173
+ onComplete: function () {
174
+ $activeContent.children().removeClass(className.transition);
175
+ },
176
+ });
177
+ } else {
178
+ $activeContent
179
+ .children()
180
+ .stop(true, true)
181
+ .animate({
182
+ opacity: 1,
183
+ }, settings.duration, module.resetOpacity);
184
+ }
185
+ }
186
+ $activeContent
187
+ .slideDown(settings.duration, settings.easing, function () {
188
+ $activeContent
189
+ .removeClass(className.animating)
190
+ .addClass(className.active);
191
+ module.reset.display.call(this);
192
+ settings.onOpen.call(this);
193
+ settings.onChange.call(this);
194
+ });
195
+ },
196
+
197
+ close: function (query) {
198
+ const $activeTitle = query !== undefined
199
+ ? (typeof query === 'number'
200
+ ? $title.eq(query)
201
+ : $(query).closest(selector.title))
202
+ : $(this).closest(selector.title);
203
+ const $activeContent = $activeTitle.next($content);
204
+ const isAnimating = $activeContent.hasClass(className.animating);
205
+ const isActive = $activeContent.hasClass(className.active);
206
+ const isOpening = !isActive && isAnimating;
207
+ const isClosing = isActive && isAnimating;
208
+ if ((isActive || isOpening) && !isClosing) {
209
+ module.debug('Closing accordion content', $activeContent);
210
+ settings.onClosing.call($activeContent);
211
+ settings.onChanging.call($activeContent);
212
+ $activeTitle
213
+ .removeClass(className.active);
214
+ $activeContent
215
+ .stop(true, true)
216
+ .addClass(className.animating);
217
+ if (settings.animateChildren) {
218
+ if ($.fn.transition !== undefined) {
219
+ $activeContent
220
+ .children()
221
+ .transition({
222
+ animation: 'fade out',
223
+ queue: false,
224
+ useFailSafe: true,
225
+ debug: settings.debug,
226
+ verbose: settings.verbose,
227
+ silent: settings.silent,
228
+ duration: settings.duration,
229
+ skipInlineHidden: true,
230
+ });
231
+ } else {
232
+ $activeContent
233
+ .children()
234
+ .stop(true, true)
235
+ .animate({
236
+ opacity: 0,
237
+ }, settings.duration, module.resetOpacity);
238
+ }
239
+ }
240
+ $activeContent
241
+ .slideUp(settings.duration, settings.easing, function () {
242
+ $activeContent
243
+ .removeClass(className.animating)
244
+ .removeClass(className.active);
245
+ module.reset.display.call(this);
246
+ settings.onClose.call(this);
247
+ settings.onChange.call(this);
248
+ });
249
+ }
250
+ },
251
+
252
+ closeOthers: function (index) {
253
+ const $activeTitle = index !== undefined
254
+ ? $title.eq(index)
255
+ : $(this).closest(selector.title);
256
+ const $parentTitles = $activeTitle.parents(selector.content).prev(selector.title);
257
+ const $activeAccordion = $activeTitle.closest(selector.accordion);
258
+ const activeSelector = selector.title + '.' + className.active + ':visible';
259
+ const activeContent = selector.content + '.' + className.active + ':visible';
260
+ let $openTitles;
261
+ let $nestedTitles;
262
+ let $openContents;
263
+ if (settings.closeNested) {
264
+ $openTitles = $activeAccordion.find(activeSelector).not($parentTitles);
265
+ $openContents = $openTitles.next($content);
266
+ } else {
267
+ $openTitles = $activeAccordion.find(activeSelector).not($parentTitles);
268
+ $nestedTitles = $activeAccordion.find(activeContent).find(activeSelector).not($parentTitles);
269
+ $openTitles = $openTitles.not($nestedTitles);
270
+ $openContents = $openTitles.next($content);
271
+ }
272
+ if ($openTitles.length > 0) {
273
+ module.debug('Exclusive enabled, closing other content', $openTitles);
274
+ $openTitles
275
+ .removeClass(className.active);
276
+ $openContents
277
+ .removeClass(className.animating)
278
+ .stop(true, true);
279
+ if (settings.animateChildren) {
280
+ if ($.fn.transition !== undefined) {
281
+ $openContents
282
+ .children()
283
+ .transition({
284
+ animation: 'fade out',
285
+ useFailSafe: true,
286
+ debug: settings.debug,
287
+ verbose: settings.verbose,
288
+ silent: settings.silent,
289
+ duration: settings.duration,
290
+ skipInlineHidden: true,
291
+ });
292
+ } else {
293
+ $openContents
294
+ .children()
295
+ .stop(true, true)
296
+ .animate({
297
+ opacity: 0,
298
+ }, settings.duration, module.resetOpacity);
299
+ }
300
+ }
301
+ $openContents
302
+ .slideUp(settings.duration, settings.easing, function () {
303
+ $(this).removeClass(className.active);
304
+ module.reset.display.call(this);
305
+ });
306
+ }
307
+ },
308
+
309
+ reset: {
310
+
311
+ display: function () {
312
+ module.verbose('Removing inline display from element', this);
313
+ const $element = $(this);
314
+ $element.css('display', '');
315
+ if ($element.attr('style') === '') {
316
+ $element
317
+ .attr('style', '')
318
+ .removeAttr('style');
319
+ }
320
+ },
321
+
322
+ opacity: function () {
323
+ module.verbose('Removing inline opacity from element', this);
324
+ const $element = $(this);
325
+ $element.css('opacity', '');
326
+ if ($element.attr('style') === '') {
327
+ $element
328
+ .attr('style', '')
329
+ .removeAttr('style');
330
+ }
331
+ },
332
+
333
+ },
334
+
335
+ setting: function (name, value) {
336
+ module.debug('Changing setting', name, value);
337
+ if ($.isPlainObject(name)) {
338
+ $.extend(true, settings, name);
339
+ } else if (value !== undefined) {
340
+ if ($.isPlainObject(settings[name])) {
341
+ $.extend(true, settings[name], value);
342
+ } else {
343
+ settings[name] = value;
344
+ }
345
+ } else {
346
+ return settings[name];
347
+ }
348
+ },
349
+ internal: function (name, value) {
350
+ module.debug('Changing internal', name, value);
351
+ if (value !== undefined) {
352
+ if ($.isPlainObject(name)) {
353
+ $.extend(true, module, name);
354
+ } else {
355
+ module[name] = value;
356
+ }
357
+ } else {
358
+ return module[name];
359
+ }
360
+ },
361
+ debug: function (...args) {
362
+ if (!settings.silent && settings.debug) {
363
+ if (settings.performance) {
364
+ module.performance.log(args);
365
+ } else {
366
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
367
+ module.debug.apply(console, args);
368
+ }
369
+ }
370
+ },
371
+ verbose: function (...args) {
372
+ if (!settings.silent && settings.verbose && settings.debug) {
373
+ if (settings.performance) {
374
+ module.performance.log(args);
375
+ } else {
376
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
377
+ module.verbose.apply(console, args);
378
+ }
379
+ }
380
+ },
381
+ error: function (...args) {
382
+ if (!settings.silent) {
383
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
384
+ module.error.apply(console, args);
385
+ }
386
+ },
387
+ performance: {
388
+ log: function (message) {
389
+ let currentTime;
390
+ let executionTime;
391
+ let previousTime;
392
+ if (settings.performance) {
393
+ currentTime = Date.now();
394
+ previousTime = time || currentTime;
395
+ executionTime = currentTime - previousTime;
396
+ time = currentTime;
397
+ performance.push({
398
+ Name: message[0],
399
+ Arguments: message.slice(1),
400
+ Element: element,
401
+ 'Execution Time': executionTime,
402
+ });
403
+ }
404
+ clearTimeout(module.performance.timer);
405
+ module.performance.timer = setTimeout(function () {
406
+ module.performance.display();
407
+ }, 500);
408
+ },
409
+ display: function () {
410
+ let title = settings.name + ':';
411
+ let totalTime = 0;
412
+ time = false;
413
+ clearTimeout(module.performance.timer);
414
+ $.each(performance, function (index, data) {
415
+ totalTime += data['Execution Time'];
416
+ });
417
+ title += ' ' + totalTime + 'ms';
418
+ if (performance.length > 0) {
419
+ console.groupCollapsed(title);
420
+ console.table(performance);
421
+ console.groupEnd();
422
+ }
423
+ performance = [];
424
+ },
425
+ },
426
+ invoke: function (query, passedArguments = queryArguments, context = element) {
427
+ let object = instance;
428
+ let maxDepth;
429
+ let found;
430
+ let response;
431
+ if (typeof query === 'string' && object !== undefined) {
432
+ query = query.split(/[ .]/);
433
+ maxDepth = query.length - 1;
434
+ $.each(query, function (depth, value) {
435
+ const camelCaseValue = depth !== maxDepth
436
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
437
+ : query;
438
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
439
+ object = object[camelCaseValue];
440
+ } else if (object[camelCaseValue] !== undefined) {
441
+ found = object[camelCaseValue];
442
+
443
+ return false;
444
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
445
+ object = object[value];
446
+ } else if (object[value] !== undefined) {
447
+ found = object[value];
448
+
449
+ return false;
450
+ } else {
451
+ module.error(error.method, query);
452
+
453
+ return false;
454
+ }
455
+ });
456
+ }
457
+ if (isFunction(found)) {
458
+ response = found.apply(context, passedArguments);
459
+ } else if (found !== undefined) {
460
+ response = found;
461
+ }
462
+ if (Array.isArray(returnedValue)) {
463
+ returnedValue.push(response);
464
+ } else if (returnedValue !== undefined) {
465
+ returnedValue = [returnedValue, response];
466
+ } else if (response !== undefined) {
467
+ returnedValue = response;
468
+ }
469
+
470
+ return found;
471
+ },
472
+ };
473
+ if (methodInvoked) {
474
+ if (instance === undefined) {
475
+ module.initialize();
476
+ }
477
+ module.invoke(parameters);
478
+ } else {
479
+ if (instance !== undefined) {
480
+ instance.invoke('destroy');
481
+ }
482
+ module.initialize();
483
+ }
484
+ });
485
+
486
+ return returnedValue !== undefined
487
+ ? returnedValue
488
+ : this;
489
+ };
490
+
491
+ $.fn.accordion.settings = {
492
+
493
+ name: 'Accordion',
494
+ namespace: 'accordion',
495
+
496
+ silent: false,
497
+ debug: false,
498
+ verbose: false,
499
+ performance: true,
500
+
501
+ on: 'click', // event on title that opens accordion
502
+
503
+ observeChanges: true, // whether accordion should automatically refresh on DOM insertion
504
+
505
+ exclusive: true, // whether a single accordion content panel should be open at once
506
+ collapsible: true, // whether accordion content can be closed
507
+ closeNested: false, // whether nested content should be closed when a panel is closed
508
+ animateChildren: true, // whether children opacity should be animated
509
+
510
+ duration: 350, // duration of animation
511
+ easing: 'easeOutQuad', // easing equation for animation
512
+
513
+ onOpening: function () {}, // callback before open animation
514
+ onClosing: function () {}, // callback before closing animation
515
+ onChanging: function () {}, // callback before closing or opening animation
516
+
517
+ onOpen: function () {}, // callback after open animation
518
+ onClose: function () {}, // callback after closing animation
519
+ onChange: function () {}, // callback after closing or opening animation
520
+
521
+ error: {
522
+ method: 'The method you called is not defined',
523
+ },
524
+
525
+ className: {
526
+ active: 'active',
527
+ animating: 'animating',
528
+ transition: 'transition',
529
+ },
530
+
531
+ selector: {
532
+ accordion: '.accordion',
533
+ title: '.title',
534
+ trigger: '.title',
535
+ ignore: '.ui.dropdown',
536
+ content: '.content',
537
+ },
538
+
539
+ };
540
+
541
+ // Adds easing
542
+ $.extend($.easing, {
543
+ easeOutQuad: function (x) {
544
+ return 1 - (1 - x) * (1 - x);
545
+ },
546
+ });
547
+ })(jQuery, window, document);
@@ -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 2026 Contributors
7
+ * Released under the MIT license
8
+ * https://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ !function(C,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,C.fn.accordion=function(...e){const n=C(this);let s=Date.now(),a=[];const m=e[0],h="string"==typeof m,b=e.slice(1);let y;return n.each(function(){const l=C.isPlainObject(m)?C.extend(!0,{},C.fn.accordion.settings,m):C.extend({},C.fn.accordion.settings),c=l.className;var e=l.namespace;const r=l.selector,d=l.error,n="."+e,t="module-"+e,i=C(this);let u=i.find(r.title),g=i.find(r.content);const f=this;let p=i.data(t),o;const v={initialize:function(){v.debug("Initializing",i),v.bind.events(),l.observeChanges&&v.observeChanges(),v.instantiate()},instantiate:function(){p=v,i.data(t,v)},destroy:function(){v.debug("Destroying previous instance",i),i.off(n).removeData(t)},refresh:function(){u=i.find(r.title),g=i.find(r.content)},observeChanges:function(){(o=new MutationObserver(function(e){v.debug("DOM tree modified, updating selector cache"),v.refresh()})).observe(f,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",o)},bind:{events:function(){v.debug("Binding delegated events"),i.on(l.on+n,r.trigger,v.event.click)}},event:{click:function(e){0===C(e.target).closest(r.ignore).length&&v.toggle.call(this)}},toggle:function(e){const n=void 0!==e?"number"==typeof e?u.eq(e):C(e).closest(r.title):C(this).closest(r.title),t=n.next(g);var e=t.hasClass(c.animating),i=t.hasClass(c.active),o=i&&!e,i=!i&&e;v.debug("Toggling visibility of content",n),o||i?l.collapsible?v.close.call(n):v.debug("Cannot close accordion content collapsing is disabled"):v.open.call(n)},open:function(e){const n=void 0!==e?"number"==typeof e?u.eq(e):C(e).closest(r.title):C(this).closest(r.title),t=n.next(g);e=t.hasClass(c.animating);t.hasClass(c.active)||e?v.debug("Accordion already open, skipping",t):(v.debug("Opening accordion content",n),l.onOpening.call(t),l.onChanging.call(t),l.exclusive&&v.closeOthers.call(n),n.addClass(c.active),t.stop(!0,!0).addClass(c.animating),l.animateChildren&&(void 0!==C.fn.transition?t.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,skipInlineHidden:!0,onComplete:function(){t.children().removeClass(c.transition)}}):t.children().stop(!0,!0).animate({opacity:1},l.duration,v.resetOpacity)),t.slideDown(l.duration,l.easing,function(){t.removeClass(c.animating).addClass(c.active),v.reset.display.call(this),l.onOpen.call(this),l.onChange.call(this)}))},close:function(e){const n=void 0!==e?"number"==typeof e?u.eq(e):C(e).closest(r.title):C(this).closest(r.title),t=n.next(g);var e=t.hasClass(c.animating),i=t.hasClass(c.active);!i&&!(!i&&e)||i&&e||(v.debug("Closing accordion content",t),l.onClosing.call(t),l.onChanging.call(t),n.removeClass(c.active),t.stop(!0,!0).addClass(c.animating),l.animateChildren&&(void 0!==C.fn.transition?t.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,skipInlineHidden:!0}):t.children().stop(!0,!0).animate({opacity:0},l.duration,v.resetOpacity)),t.slideUp(l.duration,l.easing,function(){t.removeClass(c.animating).removeClass(c.active),v.reset.display.call(this),l.onClose.call(this),l.onChange.call(this)}))},closeOthers:function(e){const n=void 0!==e?u.eq(e):C(this).closest(r.title);e=n.parents(r.content).prev(r.title);const t=n.closest(r.accordion);var i=r.title+"."+c.active+":visible",o=r.content+"."+c.active+":visible";let s,a;a=(s=l.closeNested?t.find(i).not(e):(s=t.find(i).not(e),o=t.find(o).find(i).not(e),s.not(o))).next(g),0<s.length&&(v.debug("Exclusive enabled, closing other content",s),s.removeClass(c.active),a.removeClass(c.animating).stop(!0,!0),l.animateChildren&&(void 0!==C.fn.transition?a.children().transition({animation:"fade out",useFailSafe:!0,debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,skipInlineHidden:!0}):a.children().stop(!0,!0).animate({opacity:0},l.duration,v.resetOpacity)),a.slideUp(l.duration,l.easing,function(){C(this).removeClass(c.active),v.reset.display.call(this)}))},reset:{display:function(){v.verbose("Removing inline display from element",this);const e=C(this);e.css("display",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")},opacity:function(){v.verbose("Removing inline opacity from element",this);const e=C(this);e.css("opacity",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")}},setting:function(e,n){if(v.debug("Changing setting",e,n),C.isPlainObject(e))C.extend(!0,l,e);else{if(void 0===n)return l[e];C.isPlainObject(l[e])?C.extend(!0,l[e],n):l[e]=n}},internal:function(e,n){if(v.debug("Changing internal",e,n),void 0===n)return v[e];C.isPlainObject(e)?C.extend(!0,v,e):v[e]=n},debug:function(...e){!l.silent&&l.debug&&(l.performance?v.performance.log(e):(v.debug=Function.prototype.bind.call(console.info,console,l.name+":"),v.debug.apply(console,e)))},verbose:function(...e){!l.silent&&l.verbose&&l.debug&&(l.performance?v.performance.log(e):(v.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),v.verbose.apply(console,e)))},error:function(...e){l.silent||(v.error=Function.prototype.bind.call(console.error,console,l.name+":"),v.error.apply(console,e))},performance:{log:function(e){var n,t;l.performance&&(t=(n=Date.now())-(s||n),s=n,a.push({Name:e[0],Arguments:e.slice(1),Element:f,"Execution Time":t})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(function(){v.performance.display()},500)},display:function(){var e=l.name+":";let t=0;s=!1,clearTimeout(v.performance.timer),C.each(a,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",0<a.length&&(console.groupCollapsed(e),console.table(a),console.groupEnd()),a=[]}},invoke:function(i,e=b,n=f){let o=p,s,a,t;var l;return"string"==typeof i&&void 0!==o&&(i=i.split(/[ .]/),s=i.length-1,C.each(i,function(e,n){var t=e!==s?n+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(C.isPlainObject(o[t])&&e!==s)o=o[t];else{if(void 0!==o[t])return a=o[t],!1;{if(!C.isPlainObject(o[n])||e===s)return void 0!==o[n]?a=o[n]:v.error(d.method,i),!1;o=o[n]}}})),"function"==typeof(l=a)&&"number"!=typeof l.nodeType?t=a.apply(n,e):void 0!==a&&(t=a),Array.isArray(y)?y.push(t):void 0!==y?y=[y,t]:void 0!==t&&(y=t),a}};h?(void 0===p&&v.initialize(),v.invoke(m)):(void 0!==p&&p.invoke("destroy"),v.initialize())}),void 0!==y?y:this},C.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"}},C.extend(C.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);