fomantic-ui-sass 2.9.0 → 2.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/app/assets/fonts/semantic-ui/Lato-Bold.woff +0 -0
  4. data/app/assets/fonts/semantic-ui/Lato-Bold.woff2 +0 -0
  5. data/app/assets/fonts/semantic-ui/Lato-BoldItalic.woff +0 -0
  6. data/app/assets/fonts/semantic-ui/Lato-BoldItalic.woff2 +0 -0
  7. data/app/assets/fonts/semantic-ui/Lato-Italic.woff +0 -0
  8. data/app/assets/fonts/semantic-ui/Lato-Italic.woff2 +0 -0
  9. data/app/assets/fonts/semantic-ui/Lato-Regular.woff +0 -0
  10. data/app/assets/fonts/semantic-ui/Lato-Regular.woff2 +0 -0
  11. data/app/assets/fonts/semantic-ui/LatoLatin-Bold.woff +0 -0
  12. data/app/assets/fonts/semantic-ui/LatoLatin-Bold.woff2 +0 -0
  13. data/app/assets/fonts/semantic-ui/LatoLatin-BoldItalic.woff +0 -0
  14. data/app/assets/fonts/semantic-ui/LatoLatin-BoldItalic.woff2 +0 -0
  15. data/app/assets/fonts/semantic-ui/LatoLatin-Italic.woff +0 -0
  16. data/app/assets/fonts/semantic-ui/LatoLatin-Italic.woff2 +0 -0
  17. data/app/assets/fonts/semantic-ui/LatoLatin-Regular.woff +0 -0
  18. data/app/assets/fonts/semantic-ui/LatoLatin-Regular.woff2 +0 -0
  19. data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
  20. data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
  21. data/app/assets/fonts/semantic-ui/icons.woff +0 -0
  22. data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
  23. data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
  24. data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
  25. data/app/assets/javascripts/semantic-ui/accordion.js +569 -596
  26. data/app/assets/javascripts/semantic-ui/api.js +1158 -1180
  27. data/app/assets/javascripts/semantic-ui/calendar.js +1935 -1810
  28. data/app/assets/javascripts/semantic-ui/checkbox.js +843 -842
  29. data/app/assets/javascripts/semantic-ui/dimmer.js +707 -738
  30. data/app/assets/javascripts/semantic-ui/dropdown.js +4196 -4237
  31. data/app/assets/javascripts/semantic-ui/embed.js +646 -676
  32. data/app/assets/javascripts/semantic-ui/flyout.js +1503 -1466
  33. data/app/assets/javascripts/semantic-ui/form.js +2035 -2007
  34. data/app/assets/javascripts/semantic-ui/modal.js +1552 -1487
  35. data/app/assets/javascripts/semantic-ui/nag.js +521 -527
  36. data/app/assets/javascripts/semantic-ui/popup.js +1469 -1457
  37. data/app/assets/javascripts/semantic-ui/progress.js +944 -998
  38. data/app/assets/javascripts/semantic-ui/rating.js +508 -524
  39. data/app/assets/javascripts/semantic-ui/search.js +1521 -1535
  40. data/app/assets/javascripts/semantic-ui/shape.js +762 -811
  41. data/app/assets/javascripts/semantic-ui/sidebar.js +1042 -1100
  42. data/app/assets/javascripts/semantic-ui/site.js +437 -477
  43. data/app/assets/javascripts/semantic-ui/slider.js +1311 -1312
  44. data/app/assets/javascripts/semantic-ui/state.js +639 -658
  45. data/app/assets/javascripts/semantic-ui/sticky.js +848 -902
  46. data/app/assets/javascripts/semantic-ui/tab.js +903 -967
  47. data/app/assets/javascripts/semantic-ui/toast.js +911 -885
  48. data/app/assets/javascripts/semantic-ui/transition.js +998 -1078
  49. data/app/assets/javascripts/semantic-ui/visibility.js +1214 -1246
  50. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +7 -7
  51. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +311 -377
  52. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +191 -331
  53. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +302 -439
  54. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +127 -199
  55. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +549 -776
  56. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +711 -1123
  57. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +9 -8
  58. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +45 -63
  59. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +3558 -3558
  60. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +272 -270
  61. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +120 -144
  62. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +667 -747
  63. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +41 -65
  64. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +416 -300
  65. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +361 -412
  66. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +51 -72
  67. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +69 -157
  68. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +24 -44
  69. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +17 -22
  70. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +46 -85
  71. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +173 -227
  72. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +79 -152
  73. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +34 -34
  74. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +10 -15
  75. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +29 -51
  76. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +37 -55
  77. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +26 -29
  78. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +159 -230
  79. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +55 -174
  80. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +261 -393
  81. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +21 -32
  82. data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +97 -143
  83. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +122 -156
  84. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +55 -65
  85. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +573 -206
  86. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +108 -213
  87. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +83 -124
  88. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +71 -100
  89. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +16 -32
  90. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +105 -208
  91. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +102 -127
  92. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +3 -7
  93. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +12 -16
  94. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +71 -149
  95. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +371 -1282
  96. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +36 -47
  97. data/app/assets/stylesheets/semantic-ui/views/_card.scss +221 -367
  98. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +43 -61
  99. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +37 -59
  100. data/app/assets/stylesheets/semantic-ui/views/_item.scss +87 -134
  101. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +77 -118
  102. data/lib/fomantic/ui/sass/version.rb +2 -2
  103. data/tasks/converter.rb +1 -1
  104. metadata +17 -1
@@ -1,493 +1,453 @@
1
1
  /*!
2
2
  * # Fomantic-UI - Site
3
- * http://github.com/fomantic/Fomantic-UI/
3
+ * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
6
6
  * Released under the MIT license
7
- * http://opensource.org/licenses/MIT
7
+ * https://opensource.org/licenses/MIT
8
8
  *
9
9
  */
10
10
 
11
- ;(function ($, window, document, undefined) {
12
-
13
- $.isFunction = $.isFunction || function(obj) {
14
- return typeof obj === "function" && typeof obj.nodeType !== "number";
15
- };
16
-
17
- $.site = $.fn.site = function(parameters) {
18
- var
19
- time = new Date().getTime(),
20
- performance = [],
21
-
22
- query = arguments[0],
23
- methodInvoked = (typeof query == 'string'),
24
- queryArguments = [].slice.call(arguments, 1),
25
-
26
- settings = ( $.isPlainObject(parameters) )
27
- ? $.extend(true, {}, $.site.settings, parameters)
28
- : $.extend({}, $.site.settings),
29
-
30
- namespace = settings.namespace,
31
- error = settings.error,
32
-
33
- moduleNamespace = 'module-' + namespace,
34
-
35
- $document = $(document),
36
- $module = $document,
37
- element = this,
38
- instance = $module.data(moduleNamespace),
39
-
40
- module,
41
- returnedValue
42
- ;
43
- module = {
44
-
45
- initialize: function() {
46
- module.instantiate();
47
- },
48
-
49
- instantiate: function() {
50
- module.verbose('Storing instance of site', module);
51
- instance = module;
52
- $module
53
- .data(moduleNamespace, module)
54
- ;
55
- },
56
-
57
- normalize: function() {
58
- module.fix.console();
59
- module.fix.requestAnimationFrame();
60
- },
61
-
62
- fix: {
63
- console: function() {
64
- module.debug('Normalizing window.console');
65
- if (console === undefined || console.log === undefined) {
66
- module.verbose('Console not available, normalizing events');
67
- module.disable.console();
68
- }
69
- if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') {
70
- module.verbose('Console group not available, normalizing events');
71
- window.console.group = function() {};
72
- window.console.groupEnd = function() {};
73
- window.console.groupCollapsed = function() {};
74
- }
75
- if (typeof console.markTimeline == 'undefined') {
76
- module.verbose('Mark timeline not available, normalizing events');
77
- window.console.markTimeline = function() {};
78
- }
79
- },
80
- consoleClear: function() {
81
- module.debug('Disabling programmatic console clearing');
82
- window.console.clear = function() {};
83
- },
84
- requestAnimationFrame: function() {
85
- module.debug('Normalizing requestAnimationFrame');
86
- if(window.requestAnimationFrame === undefined) {
87
- module.debug('RequestAnimationFrame not available, normalizing event');
88
- window.requestAnimationFrame = window.requestAnimationFrame
89
- || window.mozRequestAnimationFrame
90
- || window.webkitRequestAnimationFrame
91
- || window.msRequestAnimationFrame
92
- || function(callback) { setTimeout(callback, 0); }
93
- ;
94
- }
95
- }
96
- },
11
+ (function ($, window, document) {
12
+ 'use strict';
13
+
14
+ function isFunction(obj) {
15
+ return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
+ }
97
17
 
98
- moduleExists: function(name) {
99
- return ($.fn[name] !== undefined && $.fn[name].settings !== undefined);
100
- },
18
+ window = window !== undefined && window.Math === Math
19
+ ? window
20
+ : globalThis;
101
21
 
102
- enabled: {
103
- modules: function(modules) {
104
- var
105
- enabledModules = []
106
- ;
107
- modules = modules || settings.modules;
108
- $.each(modules, function(index, name) {
109
- if(module.moduleExists(name)) {
110
- enabledModules.push(name);
111
- }
112
- });
113
- return enabledModules;
114
- }
115
- },
116
-
117
- disabled: {
118
- modules: function(modules) {
22
+ $.fn.site = function (parameters) {
119
23
  var
120
- disabledModules = []
121
- ;
122
- modules = modules || settings.modules;
123
- $.each(modules, function(index, name) {
124
- if(!module.moduleExists(name)) {
125
- disabledModules.push(name);
126
- }
127
- });
128
- return disabledModules;
129
- }
130
- },
131
-
132
- change: {
133
- setting: function(setting, value, modules, modifyExisting) {
134
- modules = (typeof modules === 'string')
135
- ? (modules === 'all')
136
- ? settings.modules
137
- : [modules]
138
- : modules || settings.modules
139
- ;
140
- modifyExisting = (modifyExisting !== undefined)
141
- ? modifyExisting
142
- : true
24
+ time = Date.now(),
25
+ performance = [],
26
+
27
+ query = arguments[0],
28
+ methodInvoked = typeof query === 'string',
29
+ queryArguments = [].slice.call(arguments, 1),
30
+
31
+ settings = $.isPlainObject(parameters)
32
+ ? $.extend(true, {}, $.site.settings, parameters)
33
+ : $.extend({}, $.site.settings),
34
+
35
+ namespace = settings.namespace,
36
+ error = settings.error,
37
+
38
+ moduleNamespace = 'module-' + namespace,
39
+
40
+ $document = $(document),
41
+ $module = $document,
42
+ element = this,
43
+ instance = $module.data(moduleNamespace),
44
+
45
+ module,
46
+ returnedValue
143
47
  ;
144
- $.each(modules, function(index, name) {
145
- var
146
- namespace = (module.moduleExists(name))
147
- ? $.fn[name].settings.namespace || false
148
- : true,
149
- $existingModules
150
- ;
151
- if(module.moduleExists(name)) {
152
- module.verbose('Changing default setting', setting, value, name);
153
- $.fn[name].settings[setting] = value;
154
- if(modifyExisting && namespace) {
155
- $existingModules = $(':data(module-' + namespace + ')');
156
- if($existingModules.length > 0) {
157
- module.verbose('Modifying existing settings', $existingModules);
158
- $existingModules[name]('setting', setting, value);
159
- }
48
+ module = {
49
+
50
+ initialize: function () {
51
+ module.instantiate();
52
+ },
53
+
54
+ instantiate: function () {
55
+ module.verbose('Storing instance of site', module);
56
+ instance = module;
57
+ $module
58
+ .data(moduleNamespace, module)
59
+ ;
60
+ },
61
+
62
+ normalize: function () {
63
+ // keep the function for backward compatibility
64
+ // eslint-disable-next-line no-useless-return
65
+ return;
66
+ },
67
+
68
+ fix: {
69
+ consoleClear: function () {
70
+ module.debug('Disabling programmatic console clearing');
71
+ window.console.clear = function () {};
72
+ },
73
+ },
74
+
75
+ moduleExists: function (name) {
76
+ return $.fn[name] !== undefined && $.fn[name].settings !== undefined;
77
+ },
78
+
79
+ enabled: {
80
+ modules: function (modules) {
81
+ var
82
+ enabledModules = []
83
+ ;
84
+ modules = modules || settings.modules;
85
+ $.each(modules, function (index, name) {
86
+ if (module.moduleExists(name)) {
87
+ enabledModules.push(name);
88
+ }
89
+ });
90
+
91
+ return enabledModules;
92
+ },
93
+ },
94
+
95
+ disabled: {
96
+ modules: function (modules) {
97
+ var
98
+ disabledModules = []
99
+ ;
100
+ modules = modules || settings.modules;
101
+ $.each(modules, function (index, name) {
102
+ if (!module.moduleExists(name)) {
103
+ disabledModules.push(name);
104
+ }
105
+ });
106
+
107
+ return disabledModules;
108
+ },
109
+ },
110
+
111
+ change: {
112
+ setting: function (setting, value, modules, modifyExisting) {
113
+ modules = typeof modules === 'string'
114
+ ? (modules === 'all'
115
+ ? settings.modules
116
+ : [modules])
117
+ : modules || settings.modules;
118
+ modifyExisting = modifyExisting !== undefined
119
+ ? modifyExisting
120
+ : true;
121
+ $.each(modules, function (index, name) {
122
+ var
123
+ namespace = module.moduleExists(name)
124
+ ? $.fn[name].settings.namespace || false
125
+ : true,
126
+ $existingModules
127
+ ;
128
+ if (module.moduleExists(name)) {
129
+ module.verbose('Changing default setting', setting, value, name);
130
+ $.fn[name].settings[setting] = value;
131
+ if (modifyExisting && namespace) {
132
+ $existingModules = $(':data(module-' + namespace + ')');
133
+ if ($existingModules.length > 0) {
134
+ module.verbose('Modifying existing settings', $existingModules);
135
+ $existingModules[name]('setting', setting, value);
136
+ }
137
+ }
138
+ }
139
+ });
140
+ },
141
+ settings: function (newSettings, modules, modifyExisting) {
142
+ modules = typeof modules === 'string'
143
+ ? [modules]
144
+ : modules || settings.modules;
145
+ modifyExisting = modifyExisting !== undefined
146
+ ? modifyExisting
147
+ : true;
148
+ $.each(modules, function (index, name) {
149
+ var
150
+ $existingModules
151
+ ;
152
+ if (module.moduleExists(name)) {
153
+ module.verbose('Changing default setting', newSettings, name);
154
+ $.extend(true, $.fn[name].settings, newSettings);
155
+ if (modifyExisting && namespace) {
156
+ $existingModules = $(':data(module-' + namespace + ')');
157
+ if ($existingModules.length > 0) {
158
+ module.verbose('Modifying existing settings', $existingModules);
159
+ $existingModules[name]('setting', newSettings);
160
+ }
161
+ }
162
+ }
163
+ });
164
+ },
165
+ },
166
+
167
+ enable: {
168
+ console: function () {
169
+ module.console(true);
170
+ },
171
+ debug: function (modules, modifyExisting) {
172
+ modules = modules || settings.modules;
173
+ module.debug('Enabling debug for modules', modules);
174
+ module.change.setting('debug', true, modules, modifyExisting);
175
+ },
176
+ verbose: function (modules, modifyExisting) {
177
+ modules = modules || settings.modules;
178
+ module.debug('Enabling verbose debug for modules', modules);
179
+ module.change.setting('verbose', true, modules, modifyExisting);
180
+ },
181
+ },
182
+ disable: {
183
+ console: function () {
184
+ module.console(false);
185
+ },
186
+ debug: function (modules, modifyExisting) {
187
+ modules = modules || settings.modules;
188
+ module.debug('Disabling debug for modules', modules);
189
+ module.change.setting('debug', false, modules, modifyExisting);
190
+ },
191
+ verbose: function (modules, modifyExisting) {
192
+ modules = modules || settings.modules;
193
+ module.debug('Disabling verbose debug for modules', modules);
194
+ module.change.setting('verbose', false, modules, modifyExisting);
195
+ },
196
+ },
197
+
198
+ console: function (enable) {
199
+ if (enable) {
200
+ if (instance.cache.console === undefined) {
201
+ module.error(error.console);
202
+
203
+ return;
204
+ }
205
+ module.debug('Restoring console function');
206
+ window.console = instance.cache.console;
207
+ } else {
208
+ module.debug('Disabling console function');
209
+ instance.cache.console = window.console;
210
+ window.console = {
211
+ clear: function () {},
212
+ error: function () {},
213
+ group: function () {},
214
+ groupCollapsed: function () {},
215
+ groupEnd: function () {},
216
+ info: function () {},
217
+ log: function () {},
218
+ table: function () {},
219
+ warn: function () {},
220
+ };
221
+ }
222
+ },
223
+
224
+ destroy: function () {
225
+ module.verbose('Destroying previous site for', $module);
226
+ $module
227
+ .removeData(moduleNamespace)
228
+ ;
229
+ },
230
+
231
+ cache: {},
232
+
233
+ setting: function (name, value) {
234
+ if ($.isPlainObject(name)) {
235
+ $.extend(true, settings, name);
236
+ } else if (value !== undefined) {
237
+ settings[name] = value;
238
+ } else {
239
+ return settings[name];
240
+ }
241
+ },
242
+ internal: function (name, value) {
243
+ if ($.isPlainObject(name)) {
244
+ $.extend(true, module, name);
245
+ } else if (value !== undefined) {
246
+ module[name] = value;
247
+ } else {
248
+ return module[name];
249
+ }
250
+ },
251
+ debug: function () {
252
+ if (settings.debug) {
253
+ if (settings.performance) {
254
+ module.performance.log(arguments);
255
+ } else {
256
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
257
+ module.debug.apply(console, arguments);
258
+ }
259
+ }
260
+ },
261
+ verbose: function () {
262
+ if (settings.verbose && settings.debug) {
263
+ if (settings.performance) {
264
+ module.performance.log(arguments);
265
+ } else {
266
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
267
+ module.verbose.apply(console, arguments);
268
+ }
269
+ }
270
+ },
271
+ error: function () {
272
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
273
+ module.error.apply(console, arguments);
274
+ },
275
+ performance: {
276
+ log: function (message) {
277
+ var
278
+ currentTime,
279
+ executionTime,
280
+ previousTime
281
+ ;
282
+ if (settings.performance) {
283
+ currentTime = Date.now();
284
+ previousTime = time || currentTime;
285
+ executionTime = currentTime - previousTime;
286
+ time = currentTime;
287
+ performance.push({
288
+ Element: element,
289
+ Name: message[0],
290
+ Arguments: [].slice.call(message, 1) || '',
291
+ 'Execution Time': executionTime,
292
+ });
293
+ }
294
+ clearTimeout(module.performance.timer);
295
+ module.performance.timer = setTimeout(module.performance.display, 500);
296
+ },
297
+ display: function () {
298
+ var
299
+ title = settings.name + ':',
300
+ totalTime = 0
301
+ ;
302
+ time = false;
303
+ clearTimeout(module.performance.timer);
304
+ $.each(performance, function (index, data) {
305
+ totalTime += data['Execution Time'];
306
+ });
307
+ title += ' ' + totalTime + 'ms';
308
+ if (performance.length > 0) {
309
+ console.groupCollapsed(title);
310
+ if (console.table) {
311
+ console.table(performance);
312
+ } else {
313
+ $.each(performance, function (index, data) {
314
+ console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
315
+ });
316
+ }
317
+ console.groupEnd();
318
+ }
319
+ performance = [];
320
+ },
321
+ },
322
+ invoke: function (query, passedArguments, context) {
323
+ var
324
+ object = instance,
325
+ maxDepth,
326
+ found,
327
+ response
328
+ ;
329
+ passedArguments = passedArguments || queryArguments;
330
+ context = context || element;
331
+ if (typeof query === 'string' && object !== undefined) {
332
+ query = query.split(/[ .]/);
333
+ maxDepth = query.length - 1;
334
+ $.each(query, function (depth, value) {
335
+ var camelCaseValue = depth !== maxDepth
336
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
337
+ : query
338
+ ;
339
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
340
+ object = object[camelCaseValue];
341
+ } else if (object[camelCaseValue] !== undefined) {
342
+ found = object[camelCaseValue];
343
+
344
+ return false;
345
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
346
+ object = object[value];
347
+ } else if (object[value] !== undefined) {
348
+ found = object[value];
349
+
350
+ return false;
351
+ } else {
352
+ module.error(error.method, query);
353
+
354
+ return false;
355
+ }
356
+ });
357
+ }
358
+ if (isFunction(found)) {
359
+ response = found.apply(context, passedArguments);
360
+ } else if (found !== undefined) {
361
+ response = found;
362
+ }
363
+ if (Array.isArray(returnedValue)) {
364
+ returnedValue.push(response);
365
+ } else if (returnedValue !== undefined) {
366
+ returnedValue = [returnedValue, response];
367
+ } else if (response !== undefined) {
368
+ returnedValue = response;
369
+ }
370
+
371
+ return found;
372
+ },
373
+ };
374
+
375
+ if (methodInvoked) {
376
+ if (instance === undefined) {
377
+ module.initialize();
160
378
  }
161
- }
162
- });
163
- },
164
- settings: function(newSettings, modules, modifyExisting) {
165
- modules = (typeof modules === 'string')
166
- ? [modules]
167
- : modules || settings.modules
168
- ;
169
- modifyExisting = (modifyExisting !== undefined)
170
- ? modifyExisting
171
- : true
172
- ;
173
- $.each(modules, function(index, name) {
174
- var
175
- $existingModules
176
- ;
177
- if(module.moduleExists(name)) {
178
- module.verbose('Changing default setting', newSettings, name);
179
- $.extend(true, $.fn[name].settings, newSettings);
180
- if(modifyExisting && namespace) {
181
- $existingModules = $(':data(module-' + namespace + ')');
182
- if($existingModules.length > 0) {
183
- module.verbose('Modifying existing settings', $existingModules);
184
- $existingModules[name]('setting', newSettings);
185
- }
379
+ module.invoke(query);
380
+ } else {
381
+ if (instance !== undefined) {
382
+ module.destroy();
186
383
  }
187
- }
188
- });
189
- }
190
- },
191
-
192
- enable: {
193
- console: function() {
194
- module.console(true);
195
- },
196
- debug: function(modules, modifyExisting) {
197
- modules = modules || settings.modules;
198
- module.debug('Enabling debug for modules', modules);
199
- module.change.setting('debug', true, modules, modifyExisting);
200
- },
201
- verbose: function(modules, modifyExisting) {
202
- modules = modules || settings.modules;
203
- module.debug('Enabling verbose debug for modules', modules);
204
- module.change.setting('verbose', true, modules, modifyExisting);
205
- }
206
- },
207
- disable: {
208
- console: function() {
209
- module.console(false);
210
- },
211
- debug: function(modules, modifyExisting) {
212
- modules = modules || settings.modules;
213
- module.debug('Disabling debug for modules', modules);
214
- module.change.setting('debug', false, modules, modifyExisting);
215
- },
216
- verbose: function(modules, modifyExisting) {
217
- modules = modules || settings.modules;
218
- module.debug('Disabling verbose debug for modules', modules);
219
- module.change.setting('verbose', false, modules, modifyExisting);
220
- }
221
- },
222
-
223
- console: function(enable) {
224
- if(enable) {
225
- if(instance.cache.console === undefined) {
226
- module.error(error.console);
227
- return;
228
- }
229
- module.debug('Restoring console function');
230
- window.console = instance.cache.console;
231
- }
232
- else {
233
- module.debug('Disabling console function');
234
- instance.cache.console = window.console;
235
- window.console = {
236
- clear : function(){},
237
- error : function(){},
238
- group : function(){},
239
- groupCollapsed : function(){},
240
- groupEnd : function(){},
241
- info : function(){},
242
- log : function(){},
243
- markTimeline : function(){},
244
- warn : function(){}
245
- };
246
- }
247
- },
248
-
249
- destroy: function() {
250
- module.verbose('Destroying previous site for', $module);
251
- $module
252
- .removeData(moduleNamespace)
253
- ;
254
- },
255
-
256
- cache: {},
257
-
258
- setting: function(name, value) {
259
- if( $.isPlainObject(name) ) {
260
- $.extend(true, settings, name);
261
- }
262
- else if(value !== undefined) {
263
- settings[name] = value;
264
- }
265
- else {
266
- return settings[name];
267
- }
268
- },
269
- internal: function(name, value) {
270
- if( $.isPlainObject(name) ) {
271
- $.extend(true, module, name);
272
- }
273
- else if(value !== undefined) {
274
- module[name] = value;
275
- }
276
- else {
277
- return module[name];
278
- }
279
- },
280
- debug: function() {
281
- if(settings.debug) {
282
- if(settings.performance) {
283
- module.performance.log(arguments);
284
- }
285
- else {
286
- module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
287
- module.debug.apply(console, arguments);
288
- }
289
- }
290
- },
291
- verbose: function() {
292
- if(settings.verbose && settings.debug) {
293
- if(settings.performance) {
294
- module.performance.log(arguments);
384
+ module.initialize();
295
385
  }
296
- else {
297
- module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
298
- module.verbose.apply(console, arguments);
299
- }
300
- }
301
- },
302
- error: function() {
303
- module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
304
- module.error.apply(console, arguments);
305
- },
306
- performance: {
307
- log: function(message) {
308
- var
309
- currentTime,
310
- executionTime,
311
- previousTime
312
- ;
313
- if(settings.performance) {
314
- currentTime = new Date().getTime();
315
- previousTime = time || currentTime;
316
- executionTime = currentTime - previousTime;
317
- time = currentTime;
318
- performance.push({
319
- 'Element' : element,
320
- 'Name' : message[0],
321
- 'Arguments' : [].slice.call(message, 1) || '',
322
- 'Execution Time' : executionTime
323
- });
324
- }
325
- clearTimeout(module.performance.timer);
326
- module.performance.timer = setTimeout(module.performance.display, 500);
327
- },
328
- display: function() {
329
- var
330
- title = settings.name + ':',
331
- totalTime = 0
332
- ;
333
- time = false;
334
- clearTimeout(module.performance.timer);
335
- $.each(performance, function(index, data) {
336
- totalTime += data['Execution Time'];
337
- });
338
- title += ' ' + totalTime + 'ms';
339
- if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
340
- console.groupCollapsed(title);
341
- if(console.table) {
342
- console.table(performance);
343
- }
344
- else {
345
- $.each(performance, function(index, data) {
346
- console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
347
- });
348
- }
349
- console.groupEnd();
350
- }
351
- performance = [];
352
- }
353
- },
354
- invoke: function(query, passedArguments, context) {
355
- var
356
- object = instance,
357
- maxDepth,
358
- found,
359
- response
360
- ;
361
- passedArguments = passedArguments || queryArguments;
362
- context = context || element;
363
- if(typeof query == 'string' && object !== undefined) {
364
- query = query.split(/[\. ]/);
365
- maxDepth = query.length - 1;
366
- $.each(query, function(depth, value) {
367
- var camelCaseValue = (depth != maxDepth)
368
- ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
369
- : query
370
- ;
371
- if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
372
- object = object[camelCaseValue];
373
- }
374
- else if( object[camelCaseValue] !== undefined ) {
375
- found = object[camelCaseValue];
376
- return false;
377
- }
378
- else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
379
- object = object[value];
380
- }
381
- else if( object[value] !== undefined ) {
382
- found = object[value];
383
- return false;
384
- }
385
- else {
386
- module.error(error.method, query);
387
- return false;
388
- }
389
- });
390
- }
391
- if ( $.isFunction( found ) ) {
392
- response = found.apply(context, passedArguments);
393
- }
394
- else if(found !== undefined) {
395
- response = found;
396
- }
397
- if(Array.isArray(returnedValue)) {
398
- returnedValue.push(response);
399
- }
400
- else if(returnedValue !== undefined) {
401
- returnedValue = [returnedValue, response];
402
- }
403
- else if(response !== undefined) {
404
- returnedValue = response;
405
- }
406
- return found;
407
- }
408
- };
409
-
410
- if(methodInvoked) {
411
- if(instance === undefined) {
412
- module.initialize();
413
- }
414
- module.invoke(query);
415
- }
416
- else {
417
- if(instance !== undefined) {
418
- module.destroy();
419
- }
420
- module.initialize();
421
- }
422
- return (returnedValue !== undefined)
423
- ? returnedValue
424
- : this
425
- ;
426
- };
427
-
428
- $.site.settings = {
429
-
430
- name : 'Site',
431
- namespace : 'site',
432
-
433
- error : {
434
- console : 'Console cannot be restored, most likely it was overwritten outside of module',
435
- method : 'The method you called is not defined.'
436
- },
437
-
438
- debug : false,
439
- verbose : false,
440
- performance : true,
441
-
442
- modules: [
443
- 'accordion',
444
- 'api',
445
- 'calendar',
446
- 'checkbox',
447
- 'dimmer',
448
- 'dropdown',
449
- 'embed',
450
- 'form',
451
- 'modal',
452
- 'nag',
453
- 'popup',
454
- 'slider',
455
- 'rating',
456
- 'shape',
457
- 'sidebar',
458
- 'state',
459
- 'sticky',
460
- 'tab',
461
- 'toast',
462
- 'transition',
463
- 'visibility',
464
- 'visit'
465
- ],
466
-
467
- siteNamespace : 'site',
468
- namespaceStub : {
469
- cache : {},
470
- config : {},
471
- sections : {},
472
- section : {},
473
- utilities : {}
474
- }
475
-
476
- };
477
-
478
- // allows for selection of elements with data attributes
479
- $.extend($.expr[ ":" ], {
480
- data: ($.expr.createPseudo)
481
- ? $.expr.createPseudo(function(dataName) {
482
- return function(elem) {
483
- return !!$.data(elem, dataName);
484
- };
485
- })
486
- : function(elem, i, match) {
487
- // support: jQuery < 1.8
488
- return !!$.data(elem, match[ 3 ]);
489
- }
490
- });
491
-
492
386
 
493
- })( jQuery, window, document );
387
+ return returnedValue !== undefined
388
+ ? returnedValue
389
+ : this;
390
+ };
391
+ $.site = $.fn.site;
392
+
393
+ $.site.settings = {
394
+
395
+ name: 'Site',
396
+ namespace: 'site',
397
+
398
+ error: {
399
+ console: 'Console cannot be restored, most likely it was overwritten outside of module',
400
+ method: 'The method you called is not defined.',
401
+ },
402
+
403
+ debug: false,
404
+ verbose: false,
405
+ performance: true,
406
+
407
+ modules: [
408
+ 'accordion',
409
+ 'api',
410
+ 'calendar',
411
+ 'checkbox',
412
+ 'dimmer',
413
+ 'dropdown',
414
+ 'embed',
415
+ 'flyout',
416
+ 'form',
417
+ 'modal',
418
+ 'nag',
419
+ 'popup',
420
+ 'progress',
421
+ 'rating',
422
+ 'search',
423
+ 'shape',
424
+ 'sidebar',
425
+ 'slider',
426
+ 'state',
427
+ 'sticky',
428
+ 'tab',
429
+ 'toast',
430
+ 'transition',
431
+ 'visibility',
432
+ ],
433
+
434
+ siteNamespace: 'site',
435
+ namespaceStub: {
436
+ cache: {},
437
+ config: {},
438
+ sections: {},
439
+ section: {},
440
+ utilities: {},
441
+ },
442
+
443
+ };
444
+
445
+ // allows for selection of elements with data attributes
446
+ $.extend($.expr.pseudos, {
447
+ data: $.expr.createPseudo(function (dataName) {
448
+ return function (elem) {
449
+ return !!$.data(elem, dataName);
450
+ };
451
+ }),
452
+ });
453
+ })(jQuery, window, document);