fomantic-ui 2.10.0-beta.62 → 2.10.0-beta.64

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 (209) hide show
  1. package/.eslintrc.js +0 -1
  2. package/changelog-setup.js +10 -10
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +40 -41
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +2 -2
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +57 -61
  10. package/dist/components/api.min.js +2 -2
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +1 -1
  16. package/dist/components/calendar.js +186 -187
  17. package/dist/components/calendar.min.css +1 -1
  18. package/dist/components/calendar.min.js +2 -2
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +29 -30
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +2 -2
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +22 -23
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +2 -2
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +293 -337
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +33 -35
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +74 -81
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +2 -2
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +141 -146
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +2 -2
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +80 -81
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +2 -2
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +27 -28
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +2 -2
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +62 -72
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +2 -2
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +51 -55
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +2 -2
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +33 -34
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +2 -2
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +96 -109
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +2 -2
  111. package/dist/components/segment.css +1 -1
  112. package/dist/components/segment.min.css +1 -1
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +44 -45
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +2 -2
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +56 -64
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +2 -2
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +16 -17
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +2 -2
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +143 -148
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +2 -2
  129. package/dist/components/state.js +24 -25
  130. package/dist/components/state.min.js +2 -2
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +42 -43
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +2 -2
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +57 -66
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +2 -2
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +32 -33
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +2 -2
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +38 -45
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +2 -2
  155. package/dist/components/visibility.js +76 -77
  156. package/dist/components/visibility.min.js +2 -2
  157. package/dist/semantic.css +53 -53
  158. package/dist/semantic.js +1753 -1884
  159. package/dist/semantic.min.css +1 -1
  160. package/dist/semantic.min.js +2 -2
  161. package/package.json +1 -1
  162. package/scripts/nightly-version.js +3 -3
  163. package/src/definitions/behaviors/api.js +56 -60
  164. package/src/definitions/behaviors/form.js +140 -145
  165. package/src/definitions/behaviors/state.js +23 -24
  166. package/src/definitions/behaviors/visibility.js +75 -76
  167. package/src/definitions/globals/site.js +15 -16
  168. package/src/definitions/modules/accordion.js +39 -40
  169. package/src/definitions/modules/calendar.js +185 -186
  170. package/src/definitions/modules/checkbox.js +28 -29
  171. package/src/definitions/modules/dimmer.js +21 -22
  172. package/src/definitions/modules/dropdown.js +292 -336
  173. package/src/definitions/modules/embed.js +32 -34
  174. package/src/definitions/modules/flyout.js +73 -80
  175. package/src/definitions/modules/modal.js +79 -80
  176. package/src/definitions/modules/nag.js +26 -27
  177. package/src/definitions/modules/popup.js +61 -71
  178. package/src/definitions/modules/progress.js +50 -54
  179. package/src/definitions/modules/rating.js +32 -33
  180. package/src/definitions/modules/search.js +95 -108
  181. package/src/definitions/modules/shape.js +43 -44
  182. package/src/definitions/modules/sidebar.js +55 -63
  183. package/src/definitions/modules/slider.js +142 -147
  184. package/src/definitions/modules/sticky.js +41 -42
  185. package/src/definitions/modules/tab.js +56 -65
  186. package/src/definitions/modules/toast.js +31 -32
  187. package/src/definitions/modules/transition.js +37 -44
  188. package/tasks/admin/components/create.js +11 -11
  189. package/tasks/admin/components/init.js +11 -12
  190. package/tasks/admin/components/update.js +19 -20
  191. package/tasks/admin/distributions/create.js +24 -36
  192. package/tasks/admin/distributions/init.js +11 -12
  193. package/tasks/admin/distributions/update.js +18 -19
  194. package/tasks/admin/register.js +7 -7
  195. package/tasks/build/assets.js +1 -1
  196. package/tasks/build/css.js +1 -1
  197. package/tasks/build/javascript.js +1 -1
  198. package/tasks/config/admin/github.js +1 -1
  199. package/tasks/config/admin/templates/css-package.js +1 -1
  200. package/tasks/config/admin/templates/less-package.js +1 -1
  201. package/tasks/config/project/config.js +6 -6
  202. package/tasks/config/project/install.js +12 -12
  203. package/tasks/config/project/release.js +5 -11
  204. package/tasks/config/tasks.js +5 -5
  205. package/tasks/config/user.js +1 -4
  206. package/tasks/docs/metadata.js +11 -12
  207. package/tasks/install.js +9 -9
  208. package/test/meteor/assets.js +1 -1
  209. package/test/modules/module.spec.js +18 -18
@@ -20,31 +20,31 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.shape = function (...args) {
23
- let $allModules = $(this);
23
+ const $allModules = $(this);
24
24
 
25
25
  let time = Date.now();
26
26
  let performance = [];
27
27
 
28
- let parameters = args[0];
29
- let methodInvoked = typeof parameters === 'string';
30
- let queryArguments = args.slice(1);
28
+ const parameters = args[0];
29
+ const methodInvoked = typeof parameters === 'string';
30
+ const queryArguments = args.slice(1);
31
31
 
32
32
  let returnedValue;
33
33
 
34
34
  $allModules.each(function () {
35
- let settings = $.isPlainObject(parameters)
35
+ const settings = $.isPlainObject(parameters)
36
36
  ? $.extend(true, {}, $.fn.shape.settings, parameters)
37
37
  : $.extend({}, $.fn.shape.settings);
38
38
 
39
39
  // internal aliases
40
- let namespace = settings.namespace;
41
- let selector = settings.selector;
42
- let error = settings.error;
43
- let className = settings.className;
40
+ const namespace = settings.namespace;
41
+ const selector = settings.selector;
42
+ const error = settings.error;
43
+ const className = settings.className;
44
44
 
45
45
  // define namespaces for modules
46
- let eventNamespace = '.' + namespace;
47
- let moduleNamespace = 'module-' + namespace;
46
+ const eventNamespace = '.' + namespace;
47
+ const moduleNamespace = 'module-' + namespace;
48
48
 
49
49
  // selector cache
50
50
  let $module = $(this);
@@ -57,11 +57,10 @@
57
57
  let $nextSide;
58
58
 
59
59
  // standard module
60
- let element = this;
60
+ const element = this;
61
61
  let instance = $module.data(moduleNamespace);
62
- let module;
63
62
 
64
- module = {
63
+ const module = {
65
64
 
66
65
  initialize: function () {
67
66
  module.verbose('Initializing module for', element);
@@ -92,8 +91,8 @@
92
91
 
93
92
  repaint: function () {
94
93
  module.verbose('Forcing repaint event');
95
- let shape = $sides[0] || document.createElement('div');
96
- let fakeAssignment = shape.offsetWidth;
94
+ const shape = $sides[0] || document.createElement('div');
95
+ const fakeAssignment = shape.offsetWidth;
97
96
  },
98
97
 
99
98
  animate: function (propertyObject, callback) {
@@ -191,9 +190,9 @@
191
190
  },
192
191
 
193
192
  currentStageSize: function () {
194
- let $activeSide = $side.filter('.' + className.active);
195
- let width = $activeSide.outerWidth(true);
196
- let height = $activeSide.outerHeight(true);
193
+ const $activeSide = $side.filter('.' + className.active);
194
+ const width = $activeSide.outerWidth(true);
195
+ const height = $activeSide.outerHeight(true);
197
196
  $module
198
197
  .css({
199
198
  width: width,
@@ -202,20 +201,20 @@
202
201
  },
203
202
 
204
203
  stageSize: function () {
205
- let $clone = $module.clone().addClass(className.loading);
206
- let $side = $clone.find('>' + selector.sides + '>' + selector.side);
207
- let $activeSide = $side.filter('.' + className.active);
208
- let $nextSide = nextIndex
204
+ const $clone = $module.clone().addClass(className.loading);
205
+ const $side = $clone.find('>' + selector.sides + '>' + selector.side);
206
+ const $activeSide = $side.filter('.' + className.active);
207
+ const $nextSide = nextIndex
209
208
  ? $side.eq(nextIndex)
210
209
  : ($activeSide.next(selector.side).length > 0
211
210
  ? $activeSide.next(selector.side)
212
211
  : $side.first());
213
- let newWidth = settings.width === 'next'
212
+ const newWidth = settings.width === 'next'
214
213
  ? $nextSide.outerWidth(true)
215
214
  : (settings.width === 'initial'
216
215
  ? $module.width()
217
216
  : settings.width);
218
- let newHeight = settings.height === 'next'
217
+ const newHeight = settings.height === 'next'
219
218
  ? $nextSide.outerHeight(true)
220
219
  : (settings.height === 'initial'
221
220
  ? $module.height()
@@ -268,7 +267,7 @@
268
267
 
269
268
  return;
270
269
  }
271
- let transform = module.get.transform[type]();
270
+ const transform = module.get.transform[type]();
272
271
  if (!module.is.animating()) {
273
272
  module.debug('Flipping ' + type, $nextSide);
274
273
  module.set.stageSize();
@@ -309,8 +308,8 @@
309
308
 
310
309
  transform: {
311
310
  up: function () {
312
- let translateZ = $activeSide.outerHeight(true) / 2;
313
- let translateY = $nextSide.outerHeight(true) - translateZ;
311
+ const translateZ = $activeSide.outerHeight(true) / 2;
312
+ const translateY = $nextSide.outerHeight(true) - translateZ;
314
313
 
315
314
  return {
316
315
  transform: 'translateY(' + translateY + 'px) translateZ(-' + translateZ + 'px) rotateX(-90deg)',
@@ -318,7 +317,7 @@
318
317
  },
319
318
 
320
319
  down: function () {
321
- let translate = {
320
+ const translate = {
322
321
  z: $activeSide.outerHeight(true) / 2,
323
322
  };
324
323
 
@@ -328,8 +327,8 @@
328
327
  },
329
328
 
330
329
  left: function () {
331
- let translateZ = $activeSide.outerWidth(true) / 2;
332
- let translateX = $nextSide.outerWidth(true) - translateZ;
330
+ const translateZ = $activeSide.outerWidth(true) / 2;
331
+ const translateX = $nextSide.outerWidth(true) - translateZ;
333
332
 
334
333
  return {
335
334
  transform: 'translateX(' + translateX + 'px) translateZ(-' + translateZ + 'px) rotateY(90deg)',
@@ -337,7 +336,7 @@
337
336
  },
338
337
 
339
338
  right: function () {
340
- let translate = {
339
+ const translate = {
341
340
  z: $activeSide.outerWidth(true) / 2,
342
341
  };
343
342
 
@@ -347,7 +346,7 @@
347
346
  },
348
347
 
349
348
  over: function () {
350
- let translate = {
349
+ const translate = {
351
350
  x: -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),
352
351
  };
353
352
 
@@ -357,7 +356,7 @@
357
356
  },
358
357
 
359
358
  back: function () {
360
- let translate = {
359
+ const translate = {
361
360
  x: -(($activeSide.outerWidth(true) - $nextSide.outerWidth(true)) / 2),
362
361
  };
363
362
 
@@ -378,7 +377,7 @@
378
377
  stage: {
379
378
 
380
379
  above: function () {
381
- let box = {
380
+ const box = {
382
381
  origin: ($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2,
383
382
  depth: {
384
383
  active: $nextSide.outerHeight(true) / 2,
@@ -399,7 +398,7 @@
399
398
  },
400
399
 
401
400
  below: function () {
402
- let box = {
401
+ const box = {
403
402
  origin: ($activeSide.outerHeight(true) - $nextSide.outerHeight(true)) / 2,
404
403
  depth: {
405
404
  active: $nextSide.outerHeight(true) / 2,
@@ -420,11 +419,11 @@
420
419
  },
421
420
 
422
421
  left: function () {
423
- let height = {
422
+ const height = {
424
423
  active: $activeSide.outerWidth(true),
425
424
  next: $nextSide.outerWidth(true),
426
425
  };
427
- let box = {
426
+ const box = {
428
427
  origin: (height.active - height.next) / 2,
429
428
  depth: {
430
429
  active: height.next / 2,
@@ -445,11 +444,11 @@
445
444
  },
446
445
 
447
446
  right: function () {
448
- let height = {
447
+ const height = {
449
448
  active: $activeSide.outerWidth(true),
450
449
  next: $nextSide.outerWidth(true),
451
450
  };
452
- let box = {
451
+ const box = {
453
452
  origin: (height.active - height.next) / 2,
454
453
  depth: {
455
454
  active: height.next / 2,
@@ -470,11 +469,11 @@
470
469
  },
471
470
 
472
471
  behind: function () {
473
- let height = {
472
+ const height = {
474
473
  active: $activeSide.outerWidth(true),
475
474
  next: $nextSide.outerWidth(true),
476
475
  };
477
- let box = {
476
+ const box = {
478
477
  origin: (height.active - height.next) / 2,
479
478
  depth: {
480
479
  active: height.next / 2,
@@ -594,7 +593,7 @@
594
593
  query = query.split(/[ .]/);
595
594
  maxDepth = query.length - 1;
596
595
  $.each(query, function (depth, value) {
597
- let camelCaseValue = depth !== maxDepth
596
+ const camelCaseValue = depth !== maxDepth
598
597
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
599
598
  : query;
600
599
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
@@ -637,7 +636,7 @@
637
636
  if (instance === undefined) {
638
637
  module.initialize();
639
638
  }
640
- let $inputs = $module.find('input');
639
+ const $inputs = $module.find('input');
641
640
  if ($inputs.length > 0) {
642
641
  $inputs.trigger('blur');
643
642
  setTimeout(function () {
@@ -20,20 +20,20 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.sidebar = function (...args) {
23
- let $allModules = $(this);
24
- let $window = $(window);
25
- let $document = $(document);
26
- let $body = $('body');
27
- let $html = $('html');
28
- let $head = $('head');
23
+ const $allModules = $(this);
24
+ const $window = $(window);
25
+ const $document = $(document);
26
+ const $body = $('body');
27
+ const $html = $('html');
28
+ const $head = $('head');
29
29
 
30
30
  let time = Date.now();
31
31
  let performance = [];
32
32
 
33
- let parameters = args[0];
34
- let methodInvoked = typeof parameters === 'string';
35
- let queryArguments = args.slice(1);
36
- let contextCheck = function (context, win) {
33
+ const parameters = args[0];
34
+ const methodInvoked = typeof parameters === 'string';
35
+ const queryArguments = args.slice(1);
36
+ const contextCheck = function (context, win) {
37
37
  let $context;
38
38
  if ([window, document].includes(context)) {
39
39
  $context = $body;
@@ -49,29 +49,29 @@
49
49
  let returnedValue;
50
50
 
51
51
  $allModules.each(function () {
52
- let settings = $.isPlainObject(parameters)
52
+ const settings = $.isPlainObject(parameters)
53
53
  ? $.extend(true, {}, $.fn.sidebar.settings, parameters)
54
54
  : $.extend({}, $.fn.sidebar.settings);
55
55
 
56
- let selector = settings.selector;
57
- let className = settings.className;
58
- let namespace = settings.namespace;
59
- let regExp = settings.regExp;
60
- let error = settings.error;
56
+ const selector = settings.selector;
57
+ const className = settings.className;
58
+ const namespace = settings.namespace;
59
+ const regExp = settings.regExp;
60
+ const error = settings.error;
61
61
 
62
- let eventNamespace = '.' + namespace;
63
- let moduleNamespace = 'module-' + namespace;
62
+ const eventNamespace = '.' + namespace;
63
+ const moduleNamespace = 'module-' + namespace;
64
64
 
65
- let $module = $(this);
65
+ const $module = $(this);
66
66
  let $context = contextCheck(settings.context, window);
67
- let isBody = $context[0] === $body[0];
67
+ const isBody = $context[0] === $body[0];
68
68
 
69
69
  let $sidebars = $module.children(selector.sidebar);
70
70
  let $fixed = $context.children(selector.fixed);
71
71
  let $pusher = $context.children(selector.pusher);
72
72
  let $style;
73
73
 
74
- let element = this;
74
+ const element = this;
75
75
  let instance = $module.data(moduleNamespace);
76
76
 
77
77
  let elementNamespace;
@@ -82,9 +82,7 @@
82
82
  let tempBodyMargin = 0;
83
83
  let hadScrollbar = false;
84
84
 
85
- let module;
86
-
87
- module = {
85
+ const module = {
88
86
 
89
87
  initialize: function () {
90
88
  module.debug('Initializing sidebar', parameters);
@@ -134,8 +132,8 @@
134
132
  event: {
135
133
  clickaway: function (event) {
136
134
  if (settings.closable) {
137
- let clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target);
138
- let clickedContext = $context.is(event.target);
135
+ const clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target);
136
+ const clickedContext = $context.is(event.target);
139
137
  if (clickedInPusher) {
140
138
  module.verbose('User clicked on dimmed page');
141
139
  module.hide();
@@ -206,11 +204,11 @@
206
204
 
207
205
  add: {
208
206
  inlineCSS: function () {
209
- let width = module.cache.width || $module.outerWidth();
210
- let height = module.cache.height || $module.outerHeight();
211
- let isRTL = module.is.rtl();
212
- let direction = module.get.direction();
213
- let distance = {
207
+ const width = module.cache.width || $module.outerWidth();
208
+ const height = module.cache.height || $module.outerHeight();
209
+ const isRTL = module.is.rtl();
210
+ const direction = module.get.direction();
211
+ const distance = {
214
212
  left: width,
215
213
  right: -width,
216
214
  top: height,
@@ -265,7 +263,7 @@
265
263
  repaint: function () {
266
264
  module.verbose('Forcing repaint event');
267
265
  element.style.display = 'none';
268
- let ignored = element.offsetHeight;
266
+ const ignored = element.offsetHeight;
269
267
  element.scrollTop = element.scrollTop; // eslint-disable-line no-self-assign
270
268
  element.style.display = '';
271
269
  },
@@ -302,7 +300,7 @@
302
300
  },
303
301
 
304
302
  attachEvents: function (selector, event) {
305
- let $toggle = $(selector);
303
+ const $toggle = $(selector);
306
304
  event = isFunction(module[event])
307
305
  ? module[event]
308
306
  : module.toggle;
@@ -327,7 +325,7 @@
327
325
  bodyMargin: function () {
328
326
  initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
329
327
  initialBodyMarginInt = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10);
330
- let bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
328
+ const bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
331
329
  tempBodyMargin = initialBodyMarginInt + bodyScrollbarWidth;
332
330
  },
333
331
  },
@@ -398,13 +396,13 @@
398
396
  },
399
397
 
400
398
  hideOthers: function (callback = function () {}) {
401
- let $otherSidebars = $sidebars.not($module).filter('.' + className.visible);
402
- let sidebarCount = $otherSidebars.length;
399
+ const $otherSidebars = $sidebars.not($module).filter('.' + className.visible);
400
+ const sidebarCount = $otherSidebars.length;
403
401
  let callbackCount = 0;
404
402
  $otherSidebars
405
403
  .sidebar('hide', function () {
406
404
  callbackCount++;
407
- if (callbackCount === sidebarCount) {
405
+ if (callbackCount === sidebarCount && isFunction(callback)) {
408
406
  callback();
409
407
  }
410
408
  });
@@ -420,13 +418,10 @@
420
418
  },
421
419
 
422
420
  pushPage: function (callback) {
423
- let transition = module.get.transition();
424
- let $transition = transition === 'overlay' || module.othersActive()
421
+ const transition = module.get.transition();
422
+ const $transition = transition === 'overlay' || module.othersActive()
425
423
  ? $module
426
424
  : $pusher;
427
- let animate;
428
- let dim;
429
- let transitionEnd;
430
425
  callback = isFunction(callback)
431
426
  ? callback
432
427
  : function () {};
@@ -439,16 +434,16 @@
439
434
  module.bind.scrollLock();
440
435
  module.set.transition(transition);
441
436
  module.repaint();
442
- animate = function () {
437
+ const animate = function () {
443
438
  module.bind.clickaway();
444
439
  module.add.inlineCSS();
445
440
  module.set.animating();
446
441
  module.set.visible();
447
442
  };
448
- dim = function () {
443
+ const dim = function () {
449
444
  module.set.dimmed();
450
445
  };
451
- transitionEnd = function (event) {
446
+ const transitionEnd = function (event) {
452
447
  if (event.target === $transition[0]) {
453
448
  $transition.off('transitionend' + elementNamespace, transitionEnd);
454
449
  module.remove.animating();
@@ -464,12 +459,10 @@
464
459
  },
465
460
 
466
461
  pullPage: function (callback) {
467
- let transition = module.get.transition();
468
- let $transition = transition === 'overlay' || module.othersActive()
462
+ const transition = module.get.transition();
463
+ const $transition = transition === 'overlay' || module.othersActive()
469
464
  ? $module
470
465
  : $pusher;
471
- let animate;
472
- let transitionEnd;
473
466
  callback = isFunction(callback)
474
467
  ? callback
475
468
  : function () {};
@@ -478,7 +471,7 @@
478
471
  module.unbind.clickaway();
479
472
  module.unbind.scrollLock();
480
473
 
481
- animate = function () {
474
+ const animate = function () {
482
475
  module.set.transition(transition);
483
476
  module.set.animating();
484
477
  if (settings.dimPage && !module.othersVisible()) {
@@ -486,7 +479,7 @@
486
479
  }
487
480
  module.remove.visible();
488
481
  };
489
- transitionEnd = function (event) {
482
+ const transitionEnd = function (event) {
490
483
  if (event.target === $transition[0]) {
491
484
  $transition.off('transitionend' + elementNamespace, transitionEnd);
492
485
  module.remove.animating();
@@ -527,11 +520,11 @@
527
520
 
528
521
  set: {
529
522
  bodyMargin: function () {
530
- let position = module.can.leftBodyScrollbar() ? 'left' : 'right';
523
+ const position = module.can.leftBodyScrollbar() ? 'left' : 'right';
531
524
  $context.css((isBody ? 'margin-' : 'padding-') + position, tempBodyMargin + 'px');
532
525
  $context.find(selector.bodyFixed.replace('right', position)).each(function () {
533
- let el = $(this);
534
- let attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
526
+ const el = $(this);
527
+ const attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
535
528
  el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
536
529
  });
537
530
  },
@@ -621,11 +614,11 @@
621
614
  },
622
615
  restore: {
623
616
  bodyMargin: function () {
624
- let position = module.can.leftBodyScrollbar() ? 'left' : 'right';
617
+ const position = module.can.leftBodyScrollbar() ? 'left' : 'right';
625
618
  $context.css((isBody ? 'margin-' : 'padding-') + position, initialBodyMarginInt === 0 ? '' : initialBodyMargin);
626
619
  $context.find(selector.bodyFixed.replace('right', position)).each(function () {
627
- let el = $(this);
628
- let attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
620
+ const el = $(this);
621
+ const attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
629
622
  el.css(attribute, '');
630
623
  });
631
624
  },
@@ -645,9 +638,8 @@
645
638
  return className.left;
646
639
  },
647
640
  transition: function () {
648
- let direction = module.get.direction();
649
- let transition;
650
- transition = module.is.mobile()
641
+ const direction = module.get.direction();
642
+ const transition = module.is.mobile()
651
643
  ? (settings.mobileTransition === 'auto'
652
644
  ? settings.defaultTransition.mobile[direction]
653
645
  : settings.mobileTransition)
@@ -683,8 +675,8 @@
683
675
  return !(self === top);
684
676
  },
685
677
  mobile: function () {
686
- let userAgent = navigator.userAgent;
687
- let isMobile = userAgent.match(regExp.mobile);
678
+ const userAgent = navigator.userAgent;
679
+ const isMobile = userAgent.match(regExp.mobile);
688
680
  if (isMobile) {
689
681
  module.verbose('Browser was found to be mobile', userAgent);
690
682
 
@@ -820,7 +812,7 @@
820
812
  query = query.split(/[ .]/);
821
813
  maxDepth = query.length - 1;
822
814
  $.each(query, function (depth, value) {
823
- let camelCaseValue = depth !== maxDepth
815
+ const camelCaseValue = depth !== maxDepth
824
816
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
825
817
  : query;
826
818
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {