fomantic-ui 2.9.1-beta.23 → 2.9.1-beta.25

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 (216) hide show
  1. package/.eslint/eqeqeq-rule.js +18 -0
  2. package/.eslint/index.js +26 -0
  3. package/.eslint/no-extra-parens-rule.js +17 -0
  4. package/.eslint/package.json +11 -0
  5. package/.eslintrc.js +7 -13
  6. package/dist/components/accordion.css +1 -1
  7. package/dist/components/accordion.js +24 -24
  8. package/dist/components/accordion.min.css +1 -1
  9. package/dist/components/accordion.min.js +2 -2
  10. package/dist/components/ad.css +1 -1
  11. package/dist/components/ad.min.css +1 -1
  12. package/dist/components/api.js +58 -58
  13. package/dist/components/api.min.js +2 -2
  14. package/dist/components/breadcrumb.css +1 -1
  15. package/dist/components/breadcrumb.min.css +1 -1
  16. package/dist/components/button.css +1 -1
  17. package/dist/components/button.min.css +1 -1
  18. package/dist/components/calendar.css +1 -1
  19. package/dist/components/calendar.js +84 -72
  20. package/dist/components/calendar.min.css +1 -1
  21. package/dist/components/calendar.min.js +2 -2
  22. package/dist/components/card.css +1 -1
  23. package/dist/components/card.min.css +1 -1
  24. package/dist/components/checkbox.css +1 -1
  25. package/dist/components/checkbox.js +17 -17
  26. package/dist/components/checkbox.min.css +1 -1
  27. package/dist/components/checkbox.min.js +2 -2
  28. package/dist/components/comment.css +1 -1
  29. package/dist/components/comment.min.css +1 -1
  30. package/dist/components/container.css +1 -1
  31. package/dist/components/container.min.css +1 -1
  32. package/dist/components/dimmer.css +1 -1
  33. package/dist/components/dimmer.js +18 -18
  34. package/dist/components/dimmer.min.css +1 -1
  35. package/dist/components/dimmer.min.js +2 -2
  36. package/dist/components/divider.css +1 -1
  37. package/dist/components/divider.min.css +1 -1
  38. package/dist/components/dropdown.css +1 -1
  39. package/dist/components/dropdown.js +264 -254
  40. package/dist/components/dropdown.min.css +1 -1
  41. package/dist/components/dropdown.min.js +2 -2
  42. package/dist/components/embed.css +1 -1
  43. package/dist/components/embed.js +19 -19
  44. package/dist/components/embed.min.css +1 -1
  45. package/dist/components/embed.min.js +2 -2
  46. package/dist/components/feed.css +1 -1
  47. package/dist/components/feed.min.css +1 -1
  48. package/dist/components/flag.css +1 -1
  49. package/dist/components/flag.min.css +1 -1
  50. package/dist/components/flyout.css +1 -1
  51. package/dist/components/flyout.js +29 -25
  52. package/dist/components/flyout.min.css +1 -1
  53. package/dist/components/flyout.min.js +2 -2
  54. package/dist/components/form.css +1 -1
  55. package/dist/components/form.js +158 -141
  56. package/dist/components/form.min.css +1 -1
  57. package/dist/components/form.min.js +2 -2
  58. package/dist/components/grid.css +1 -1
  59. package/dist/components/grid.min.css +1 -1
  60. package/dist/components/header.css +1 -1
  61. package/dist/components/header.min.css +1 -1
  62. package/dist/components/icon.css +1 -1
  63. package/dist/components/icon.min.css +1 -1
  64. package/dist/components/image.css +1 -1
  65. package/dist/components/image.min.css +1 -1
  66. package/dist/components/input.css +1 -1
  67. package/dist/components/input.min.css +1 -1
  68. package/dist/components/item.css +1 -1
  69. package/dist/components/item.min.css +1 -1
  70. package/dist/components/label.css +1 -1
  71. package/dist/components/label.min.css +1 -1
  72. package/dist/components/list.css +1 -1
  73. package/dist/components/list.min.css +1 -1
  74. package/dist/components/loader.css +1 -1
  75. package/dist/components/loader.min.css +1 -1
  76. package/dist/components/message.css +1 -1
  77. package/dist/components/message.min.css +1 -1
  78. package/dist/components/modal.css +1 -1
  79. package/dist/components/modal.js +32 -28
  80. package/dist/components/modal.min.css +1 -1
  81. package/dist/components/modal.min.js +2 -2
  82. package/dist/components/nag.css +1 -1
  83. package/dist/components/nag.js +10 -10
  84. package/dist/components/nag.min.css +1 -1
  85. package/dist/components/nag.min.js +2 -2
  86. package/dist/components/placeholder.css +1 -1
  87. package/dist/components/placeholder.min.css +1 -1
  88. package/dist/components/popup.css +1 -1
  89. package/dist/components/popup.js +79 -71
  90. package/dist/components/popup.min.css +1 -1
  91. package/dist/components/popup.min.js +2 -2
  92. package/dist/components/progress.css +1 -1
  93. package/dist/components/progress.js +40 -42
  94. package/dist/components/progress.min.css +1 -1
  95. package/dist/components/progress.min.js +2 -2
  96. package/dist/components/rail.css +1 -1
  97. package/dist/components/rail.min.css +1 -1
  98. package/dist/components/rating.css +1 -1
  99. package/dist/components/rating.js +13 -13
  100. package/dist/components/rating.min.css +1 -1
  101. package/dist/components/rating.min.js +2 -2
  102. package/dist/components/reset.css +1 -1
  103. package/dist/components/reset.min.css +1 -1
  104. package/dist/components/reveal.css +1 -1
  105. package/dist/components/reveal.min.css +1 -1
  106. package/dist/components/search.css +1 -1
  107. package/dist/components/search.js +42 -42
  108. package/dist/components/search.min.css +1 -1
  109. package/dist/components/search.min.js +2 -2
  110. package/dist/components/segment.css +1 -1
  111. package/dist/components/segment.min.css +1 -1
  112. package/dist/components/shape.css +1 -1
  113. package/dist/components/shape.js +36 -36
  114. package/dist/components/shape.min.css +1 -1
  115. package/dist/components/shape.min.js +2 -2
  116. package/dist/components/sidebar.css +1 -1
  117. package/dist/components/sidebar.js +29 -29
  118. package/dist/components/sidebar.min.css +1 -1
  119. package/dist/components/sidebar.min.js +2 -2
  120. package/dist/components/site.css +1 -1
  121. package/dist/components/site.js +16 -16
  122. package/dist/components/site.min.css +1 -1
  123. package/dist/components/site.min.js +2 -2
  124. package/dist/components/slider.js +79 -58
  125. package/dist/components/slider.min.js +2 -2
  126. package/dist/components/state.js +14 -14
  127. package/dist/components/state.min.js +2 -2
  128. package/dist/components/statistic.css +1 -1
  129. package/dist/components/statistic.min.css +1 -1
  130. package/dist/components/step.css +1 -1
  131. package/dist/components/step.min.css +1 -1
  132. package/dist/components/sticky.css +1 -1
  133. package/dist/components/sticky.js +25 -25
  134. package/dist/components/sticky.min.css +1 -1
  135. package/dist/components/sticky.min.js +2 -2
  136. package/dist/components/tab.css +1 -1
  137. package/dist/components/tab.js +34 -34
  138. package/dist/components/tab.min.css +1 -1
  139. package/dist/components/tab.min.js +2 -2
  140. package/dist/components/table.css +1 -1
  141. package/dist/components/table.min.css +1 -1
  142. package/dist/components/text.css +1 -1
  143. package/dist/components/text.min.css +1 -1
  144. package/dist/components/toast.css +1 -1
  145. package/dist/components/toast.js +43 -19
  146. package/dist/components/toast.min.css +1 -1
  147. package/dist/components/toast.min.js +2 -2
  148. package/dist/components/transition.css +1 -1
  149. package/dist/components/transition.js +26 -26
  150. package/dist/components/transition.min.css +1 -1
  151. package/dist/components/transition.min.js +2 -2
  152. package/dist/components/visibility.js +29 -29
  153. package/dist/components/visibility.min.js +2 -2
  154. package/dist/semantic.css +50 -50
  155. package/dist/semantic.js +1218 -1120
  156. package/dist/semantic.min.css +1 -1
  157. package/dist/semantic.min.js +2 -2
  158. package/gulpfile.js +1 -1
  159. package/package.json +2 -1
  160. package/scripts/nightly-version.js +3 -1
  161. package/src/definitions/behaviors/api.js +57 -57
  162. package/src/definitions/behaviors/form.js +157 -140
  163. package/src/definitions/behaviors/state.js +13 -13
  164. package/src/definitions/behaviors/visibility.js +28 -28
  165. package/src/definitions/globals/site.js +15 -15
  166. package/src/definitions/modules/accordion.js +23 -23
  167. package/src/definitions/modules/calendar.js +83 -71
  168. package/src/definitions/modules/checkbox.js +16 -16
  169. package/src/definitions/modules/dimmer.js +17 -17
  170. package/src/definitions/modules/dropdown.js +263 -253
  171. package/src/definitions/modules/embed.js +18 -18
  172. package/src/definitions/modules/flyout.js +28 -24
  173. package/src/definitions/modules/modal.js +31 -27
  174. package/src/definitions/modules/nag.js +9 -9
  175. package/src/definitions/modules/popup.js +78 -70
  176. package/src/definitions/modules/progress.js +39 -41
  177. package/src/definitions/modules/rating.js +12 -12
  178. package/src/definitions/modules/search.js +41 -41
  179. package/src/definitions/modules/shape.js +35 -35
  180. package/src/definitions/modules/sidebar.js +28 -28
  181. package/src/definitions/modules/slider.js +78 -57
  182. package/src/definitions/modules/sticky.js +24 -24
  183. package/src/definitions/modules/tab.js +33 -33
  184. package/src/definitions/modules/toast.js +42 -18
  185. package/src/definitions/modules/transition.js +25 -25
  186. package/tasks/admin/components/create.js +1 -1
  187. package/tasks/admin/components/init.js +2 -2
  188. package/tasks/admin/components/update.js +4 -4
  189. package/tasks/admin/distributions/create.js +6 -7
  190. package/tasks/admin/distributions/init.js +2 -2
  191. package/tasks/admin/distributions/update.js +4 -4
  192. package/tasks/admin/publish.js +1 -3
  193. package/tasks/admin/register.js +5 -5
  194. package/tasks/admin/release.js +1 -3
  195. package/tasks/build/assets.js +1 -1
  196. package/tasks/build.js +1 -1
  197. package/tasks/check-install.js +1 -1
  198. package/tasks/clean.js +1 -1
  199. package/tasks/collections/admin.js +1 -1
  200. package/tasks/collections/rtl.js +1 -1
  201. package/tasks/config/admin/github.js +3 -4
  202. package/tasks/config/npm/gulpfile.js +1 -1
  203. package/tasks/config/project/config.js +10 -8
  204. package/tasks/config/project/install.js +14 -14
  205. package/tasks/config/project/release.js +3 -2
  206. package/tasks/config/tasks.js +4 -4
  207. package/tasks/config/user.js +5 -3
  208. package/tasks/docs/build.js +1 -1
  209. package/tasks/docs/metadata.js +2 -2
  210. package/tasks/docs/serve.js +2 -1
  211. package/tasks/install.js +3 -3
  212. package/tasks/rtl/build.js +1 -3
  213. package/tasks/rtl/watch.js +1 -3
  214. package/tasks/version.js +1 -3
  215. package/tasks/watch.js +1 -1
  216. package/test/modules/module.spec.js +1 -1
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (window !== undefined && window.Math === Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -29,14 +29,14 @@
29
29
  performance = [],
30
30
 
31
31
  query = arguments[0],
32
- methodInvoked = (typeof query === 'string'),
32
+ methodInvoked = typeof query === 'string',
33
33
  queryArguments = [].slice.call(arguments, 1),
34
34
 
35
35
  returnedValue
36
36
  ;
37
37
  $allModules.each(function () {
38
38
  var
39
- settings = ($.isPlainObject(parameters))
39
+ settings = $.isPlainObject(parameters)
40
40
  ? $.extend(true, {}, $.fn.state.settings, parameters)
41
41
  : $.extend({}, $.fn.state.settings),
42
42
 
@@ -130,7 +130,7 @@
130
130
  return $module.hasClass(className.loading);
131
131
  },
132
132
  inactive: function () {
133
- return !($module.hasClass(className.active));
133
+ return !$module.hasClass(className.active);
134
134
  },
135
135
  state: function (state) {
136
136
  if (className[state] === undefined) {
@@ -141,13 +141,13 @@
141
141
  },
142
142
 
143
143
  enabled: function () {
144
- return !($module.is(settings.filter.active));
144
+ return !$module.is(settings.filter.active);
145
145
  },
146
146
  disabled: function () {
147
- return ($module.is(settings.filter.active));
147
+ return $module.is(settings.filter.active);
148
148
  },
149
149
  textEnabled: function () {
150
- return !($module.is(settings.filter.text));
150
+ return !$module.is(settings.filter.text);
151
151
  },
152
152
 
153
153
  // definitions for automatic type detection
@@ -233,7 +233,7 @@
233
233
  }
234
234
  $.when(apiRequest)
235
235
  .then(function () {
236
- if (apiRequest.state() == 'resolved') {
236
+ if (apiRequest.state() === 'resolved') {
237
237
  module.debug('API request succeeded');
238
238
  settings.activateTest = function () {
239
239
  return true;
@@ -339,7 +339,7 @@
339
339
 
340
340
  get: {
341
341
  text: function () {
342
- return (settings.selector.text)
342
+ return settings.selector.text
343
343
  ? $module.find(settings.selector.text).text()
344
344
  : $module.html();
345
345
  },
@@ -519,17 +519,17 @@
519
519
  query = query.split(/[ .]/);
520
520
  maxDepth = query.length - 1;
521
521
  $.each(query, function (depth, value) {
522
- var camelCaseValue = (depth != maxDepth)
522
+ var camelCaseValue = depth !== maxDepth
523
523
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
524
524
  : query
525
525
  ;
526
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
526
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
527
527
  object = object[camelCaseValue];
528
528
  } else if (object[camelCaseValue] !== undefined) {
529
529
  found = object[camelCaseValue];
530
530
 
531
531
  return false;
532
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
532
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
533
533
  object = object[value];
534
534
  } else if (object[value] !== undefined) {
535
535
  found = object[value];
@@ -572,7 +572,7 @@
572
572
  }
573
573
  });
574
574
 
575
- return (returnedValue !== undefined)
575
+ return returnedValue !== undefined
576
576
  ? returnedValue
577
577
  : this;
578
578
  };
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (window !== undefined && window.Math === Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -28,7 +28,7 @@
28
28
  performance = [],
29
29
 
30
30
  query = arguments[0],
31
- methodInvoked = (typeof query === 'string'),
31
+ methodInvoked = typeof query === 'string',
32
32
  queryArguments = [].slice.call(arguments, 1),
33
33
  returnedValue,
34
34
 
@@ -38,7 +38,7 @@
38
38
 
39
39
  $allModules.each(function () {
40
40
  var
41
- settings = ($.isPlainObject(parameters))
41
+ settings = $.isPlainObject(parameters)
42
42
  ? $.extend(true, {}, $.fn.visibility.settings, parameters)
43
43
  : $.extend({}, $.fn.visibility.settings),
44
44
 
@@ -83,10 +83,10 @@
83
83
  module.setup.cache();
84
84
 
85
85
  if (module.should.trackChanges()) {
86
- if (settings.type == 'image') {
86
+ if (settings.type === 'image') {
87
87
  module.setup.image();
88
88
  }
89
- if (settings.type == 'fixed') {
89
+ if (settings.type === 'fixed') {
90
90
  module.setup.fixed();
91
91
  }
92
92
 
@@ -131,7 +131,7 @@
131
131
  .off('scroll' + eventNamespace, module.event.scroll)
132
132
  .off('scrollchange' + eventNamespace, module.event.scrollchange)
133
133
  ;
134
- if (settings.type == 'fixed') {
134
+ if (settings.type === 'fixed') {
135
135
  module.resetFixed();
136
136
  module.remove.placeholder();
137
137
  }
@@ -189,7 +189,7 @@
189
189
  [].forEach.call(mutations, function (mutation) {
190
190
  if (mutation.removedNodes) {
191
191
  [].forEach.call(mutation.removedNodes, function (node) {
192
- if (node == element || $(node).find(element).length > 0) {
192
+ if (node === element || $(node).find(element).length > 0) {
193
193
  module.debug('Element removed from DOM, tearing down events');
194
194
  module.destroy();
195
195
  }
@@ -227,7 +227,7 @@
227
227
  },
228
228
 
229
229
  precache: function (images, callback) {
230
- if (!(Array.isArray(images))) {
230
+ if (!Array.isArray(images)) {
231
231
  images = [images];
232
232
  }
233
233
  var
@@ -299,7 +299,7 @@
299
299
  module.precache(src, function () {
300
300
  module.set.image(src, function () {
301
301
  loadedCount++;
302
- if (loadedCount == moduleCount) {
302
+ if (loadedCount === moduleCount) {
303
303
  settings.onAllLoaded.call(this);
304
304
  }
305
305
  settings.onLoad.call(this);
@@ -427,27 +427,27 @@
427
427
  },
428
428
  verticallyScrollableContext: function () {
429
429
  var
430
- overflowY = ($context[0] !== window)
430
+ overflowY = $context[0] !== window
431
431
  ? $context.css('overflow-y')
432
432
  : false
433
433
  ;
434
434
 
435
- return (overflowY == 'auto' || overflowY == 'scroll');
435
+ return overflowY === 'auto' || overflowY === 'scroll';
436
436
  },
437
437
  horizontallyScrollableContext: function () {
438
438
  var
439
- overflowX = ($context[0] !== window)
439
+ overflowX = $context[0] !== window
440
440
  ? $context.css('overflow-x')
441
441
  : false
442
442
  ;
443
443
 
444
- return (overflowX == 'auto' || overflowX == 'scroll');
444
+ return overflowX === 'auto' || overflowX === 'scroll';
445
445
  },
446
446
  },
447
447
 
448
448
  refresh: function () {
449
449
  module.debug('Refreshing constants (width/height)');
450
- if (settings.type == 'fixed') {
450
+ if (settings.type === 'fixed') {
451
451
  module.resetFixed();
452
452
  }
453
453
  module.reset();
@@ -515,7 +515,7 @@
515
515
  if (amount && newCallback) {
516
516
  settings.onPassed[amount] = newCallback;
517
517
  } else if (amount !== undefined) {
518
- return (module.get.pixelsPassed(amount) > calculations.pixelsPassed);
518
+ return module.get.pixelsPassed(amount) > calculations.pixelsPassed;
519
519
  } else if (calculations.passing) {
520
520
  $.each(settings.onPassed, function (amount, callback) {
521
521
  if (calculations.bottomVisible || calculations.pixelsPassed > module.get.pixelsPassed(amount)) {
@@ -873,7 +873,7 @@
873
873
  ;
874
874
  module.verbose('Saving element position');
875
875
  // (quicker than $.extend)
876
- element.fits = (element.height < screen.height);
876
+ element.fits = element.height < screen.height;
877
877
  element.offset = $module.offset();
878
878
  element.width = $module.outerWidth();
879
879
  element.height = $module.outerHeight();
@@ -907,21 +907,21 @@
907
907
  }
908
908
 
909
909
  // visibility
910
- element.topPassed = (screen.top >= element.top);
911
- element.bottomPassed = (screen.top >= element.bottom);
910
+ element.topPassed = screen.top >= element.top;
911
+ element.bottomPassed = screen.top >= element.bottom;
912
912
  element.topVisible = (screen.bottom >= element.top) && !element.topPassed;
913
913
  element.bottomVisible = (screen.bottom >= element.bottom) && !element.bottomPassed;
914
914
  element.pixelsPassed = 0;
915
915
  element.percentagePassed = 0;
916
916
 
917
917
  // meta calculations
918
- element.onScreen = ((element.topVisible || element.passing) && !element.bottomPassed);
919
- element.passing = (element.topPassed && !element.bottomPassed);
920
- element.offScreen = (!element.onScreen);
918
+ element.onScreen = (element.topVisible || element.passing) && !element.bottomPassed;
919
+ element.passing = element.topPassed && !element.bottomPassed;
920
+ element.offScreen = !element.onScreen;
921
921
 
922
922
  // passing calculations
923
923
  if (element.passing) {
924
- element.pixelsPassed = (screen.top - element.top);
924
+ element.pixelsPassed = screen.top - element.top;
925
925
  element.percentagePassed = (screen.top - element.top) / element.height;
926
926
  }
927
927
  module.cache.element = element;
@@ -957,13 +957,13 @@
957
957
  element = module.get.elementCalculations()
958
958
  ;
959
959
  if (amount.search('%') > -1) {
960
- return (element.height * (parseInt(amount, 10) / 100));
960
+ return element.height * (parseInt(amount, 10) / 100);
961
961
  }
962
962
 
963
963
  return parseInt(amount, 10);
964
964
  },
965
965
  occurred: function (callback) {
966
- return (module.cache.occurred !== undefined)
966
+ return module.cache.occurred !== undefined
967
967
  ? module.cache.occurred[callback] || false
968
968
  : false;
969
969
  },
@@ -1127,17 +1127,17 @@
1127
1127
  query = query.split(/[ .]/);
1128
1128
  maxDepth = query.length - 1;
1129
1129
  $.each(query, function (depth, value) {
1130
- var camelCaseValue = (depth != maxDepth)
1130
+ var camelCaseValue = depth !== maxDepth
1131
1131
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1132
1132
  : query
1133
1133
  ;
1134
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
1134
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
1135
1135
  object = object[camelCaseValue];
1136
1136
  } else if (object[camelCaseValue] !== undefined) {
1137
1137
  found = object[camelCaseValue];
1138
1138
 
1139
1139
  return false;
1140
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
1140
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
1141
1141
  object = object[value];
1142
1142
  } else if (object[value] !== undefined) {
1143
1143
  found = object[value];
@@ -1182,7 +1182,7 @@
1182
1182
  }
1183
1183
  });
1184
1184
 
1185
- return (returnedValue !== undefined)
1185
+ return returnedValue !== undefined
1186
1186
  ? returnedValue
1187
1187
  : this;
1188
1188
  };
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (window !== undefined && window.Math === Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -25,10 +25,10 @@
25
25
  performance = [],
26
26
 
27
27
  query = arguments[0],
28
- methodInvoked = (typeof query === 'string'),
28
+ methodInvoked = typeof query === 'string',
29
29
  queryArguments = [].slice.call(arguments, 1),
30
30
 
31
- settings = ($.isPlainObject(parameters))
31
+ settings = $.isPlainObject(parameters)
32
32
  ? $.extend(true, {}, $.site.settings, parameters)
33
33
  : $.extend({}, $.site.settings),
34
34
 
@@ -102,7 +102,7 @@
102
102
  },
103
103
 
104
104
  moduleExists: function (name) {
105
- return ($.fn[name] !== undefined && $.fn[name].settings !== undefined);
105
+ return $.fn[name] !== undefined && $.fn[name].settings !== undefined;
106
106
  },
107
107
 
108
108
  enabled: {
@@ -139,17 +139,17 @@
139
139
 
140
140
  change: {
141
141
  setting: function (setting, value, modules, modifyExisting) {
142
- modules = (typeof modules === 'string')
143
- ? (modules === 'all')
142
+ modules = typeof modules === 'string'
143
+ ? (modules === 'all'
144
144
  ? settings.modules
145
- : [modules]
145
+ : [modules])
146
146
  : modules || settings.modules;
147
- modifyExisting = (modifyExisting !== undefined)
147
+ modifyExisting = modifyExisting !== undefined
148
148
  ? modifyExisting
149
149
  : true;
150
150
  $.each(modules, function (index, name) {
151
151
  var
152
- namespace = (module.moduleExists(name))
152
+ namespace = module.moduleExists(name)
153
153
  ? $.fn[name].settings.namespace || false
154
154
  : true,
155
155
  $existingModules
@@ -168,10 +168,10 @@
168
168
  });
169
169
  },
170
170
  settings: function (newSettings, modules, modifyExisting) {
171
- modules = (typeof modules === 'string')
171
+ modules = typeof modules === 'string'
172
172
  ? [modules]
173
173
  : modules || settings.modules;
174
- modifyExisting = (modifyExisting !== undefined)
174
+ modifyExisting = modifyExisting !== undefined
175
175
  ? modifyExisting
176
176
  : true;
177
177
  $.each(modules, function (index, name) {
@@ -361,17 +361,17 @@
361
361
  query = query.split(/[ .]/);
362
362
  maxDepth = query.length - 1;
363
363
  $.each(query, function (depth, value) {
364
- var camelCaseValue = (depth != maxDepth)
364
+ var camelCaseValue = depth !== maxDepth
365
365
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
366
366
  : query
367
367
  ;
368
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
368
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
369
369
  object = object[camelCaseValue];
370
370
  } else if (object[camelCaseValue] !== undefined) {
371
371
  found = object[camelCaseValue];
372
372
 
373
373
  return false;
374
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
374
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
375
375
  object = object[value];
376
376
  } else if (object[value] !== undefined) {
377
377
  found = object[value];
@@ -413,7 +413,7 @@
413
413
  module.initialize();
414
414
  }
415
415
 
416
- return (returnedValue !== undefined)
416
+ return returnedValue !== undefined
417
417
  ? returnedValue
418
418
  : this;
419
419
  };
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (window !== undefined && window.Math === Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -27,14 +27,14 @@
27
27
  performance = [],
28
28
 
29
29
  query = arguments[0],
30
- methodInvoked = (typeof query === 'string'),
30
+ methodInvoked = typeof query === 'string',
31
31
  queryArguments = [].slice.call(arguments, 1),
32
32
 
33
33
  returnedValue
34
34
  ;
35
35
  $allModules.each(function () {
36
36
  var
37
- settings = ($.isPlainObject(parameters))
37
+ settings = $.isPlainObject(parameters)
38
38
  ? $.extend(true, {}, $.fn.accordion.settings, parameters)
39
39
  : $.extend({}, $.fn.accordion.settings),
40
40
 
@@ -121,16 +121,16 @@
121
121
 
122
122
  toggle: function (query) {
123
123
  var
124
- $activeTitle = (query !== undefined)
125
- ? (typeof query === 'number')
124
+ $activeTitle = query !== undefined
125
+ ? (typeof query === 'number'
126
126
  ? $title.eq(query)
127
- : $(query).closest(selector.title)
127
+ : $(query).closest(selector.title))
128
128
  : $(this).closest(selector.title),
129
129
  $activeContent = $activeTitle.next($content),
130
130
  isAnimating = $activeContent.hasClass(className.animating),
131
131
  isActive = $activeContent.hasClass(className.active),
132
- isOpen = (isActive && !isAnimating),
133
- isOpening = (!isActive && isAnimating)
132
+ isOpen = isActive && !isAnimating,
133
+ isOpening = !isActive && isAnimating
134
134
  ;
135
135
  module.debug('Toggling visibility of content', $activeTitle);
136
136
  if (isOpen || isOpening) {
@@ -146,15 +146,15 @@
146
146
 
147
147
  open: function (query) {
148
148
  var
149
- $activeTitle = (query !== undefined)
150
- ? (typeof query === 'number')
149
+ $activeTitle = query !== undefined
150
+ ? (typeof query === 'number'
151
151
  ? $title.eq(query)
152
- : $(query).closest(selector.title)
152
+ : $(query).closest(selector.title))
153
153
  : $(this).closest(selector.title),
154
154
  $activeContent = $activeTitle.next($content),
155
155
  isAnimating = $activeContent.hasClass(className.animating),
156
156
  isActive = $activeContent.hasClass(className.active),
157
- isOpen = (isActive || isAnimating)
157
+ isOpen = isActive || isAnimating
158
158
  ;
159
159
  if (isOpen) {
160
160
  module.debug('Accordion already open, skipping', $activeContent);
@@ -216,16 +216,16 @@
216
216
 
217
217
  close: function (query) {
218
218
  var
219
- $activeTitle = (query !== undefined)
220
- ? (typeof query === 'number')
219
+ $activeTitle = query !== undefined
220
+ ? (typeof query === 'number'
221
221
  ? $title.eq(query)
222
- : $(query).closest(selector.title)
222
+ : $(query).closest(selector.title))
223
223
  : $(this).closest(selector.title),
224
224
  $activeContent = $activeTitle.next($content),
225
225
  isAnimating = $activeContent.hasClass(className.animating),
226
226
  isActive = $activeContent.hasClass(className.active),
227
- isOpening = (!isActive && isAnimating),
228
- isClosing = (isActive && isAnimating)
227
+ isOpening = !isActive && isAnimating,
228
+ isClosing = isActive && isAnimating
229
229
  ;
230
230
  if ((isActive || isOpening) && !isClosing) {
231
231
  module.debug('Closing accordion content', $activeContent);
@@ -278,7 +278,7 @@
278
278
 
279
279
  closeOthers: function (index) {
280
280
  var
281
- $activeTitle = (index !== undefined)
281
+ $activeTitle = index !== undefined
282
282
  ? $title.eq(index)
283
283
  : $(this).closest(selector.title),
284
284
  $parentTitles = $activeTitle.parents(selector.content).prev(selector.title),
@@ -298,7 +298,7 @@
298
298
  $openTitles = $openTitles.not($nestedTitles);
299
299
  $openContents = $openTitles.next($content);
300
300
  }
301
- if (($openTitles.length > 0)) {
301
+ if ($openTitles.length > 0) {
302
302
  module.debug('Exclusive enabled, closing other content', $openTitles);
303
303
  $openTitles
304
304
  .removeClass(className.active)
@@ -482,16 +482,16 @@
482
482
  query = query.split(/[ .]/);
483
483
  maxDepth = query.length - 1;
484
484
  $.each(query, function (depth, value) {
485
- var camelCaseValue = (depth != maxDepth)
485
+ var camelCaseValue = depth !== maxDepth
486
486
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
487
487
  : query;
488
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
488
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
489
489
  object = object[camelCaseValue];
490
490
  } else if (object[camelCaseValue] !== undefined) {
491
491
  found = object[camelCaseValue];
492
492
 
493
493
  return false;
494
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
494
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
495
495
  object = object[value];
496
496
  } else if (object[value] !== undefined) {
497
497
  found = object[value];
@@ -533,7 +533,7 @@
533
533
  }
534
534
  });
535
535
 
536
- return (returnedValue !== undefined)
536
+ return returnedValue !== undefined
537
537
  ? returnedValue
538
538
  : this;
539
539
  };