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

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 (258) hide show
  1. package/.eslintrc.js +95 -75
  2. package/.github/workflows/ci.yml +2 -2
  3. package/.github/workflows/nightly.yml +1 -1
  4. package/.github/workflows/release.yml +1 -1
  5. package/.stylelintrc.js +6 -7
  6. package/dist/components/accordion.css +1 -1
  7. package/dist/components/accordion.js +7 -7
  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 +54 -53
  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 +3 -3
  19. package/dist/components/calendar.js +119 -99
  20. package/dist/components/calendar.min.css +2 -2
  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 +8 -8
  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 +16 -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 +87 -87
  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 +17 -23
  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 +2 -2
  51. package/dist/components/flyout.js +32 -30
  52. package/dist/components/flyout.min.css +1 -1
  53. package/dist/components/flyout.min.js +2 -2
  54. package/dist/components/form.css +2 -2
  55. package/dist/components/form.js +113 -89
  56. package/dist/components/form.min.css +2 -2
  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 +22 -22
  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 +18 -16
  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 +30 -30
  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 +23 -21
  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 +8 -8
  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 +41 -46
  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 +9 -9
  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 +21 -19
  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 +11 -10
  122. package/dist/components/site.min.css +1 -1
  123. package/dist/components/site.min.js +2 -2
  124. package/dist/components/slider.js +39 -42
  125. package/dist/components/slider.min.js +2 -2
  126. package/dist/components/state.js +7 -7
  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 +7 -7
  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 +36 -38
  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 +20 -17
  146. package/dist/components/toast.min.css +1 -1
  147. package/dist/components/toast.min.js +2 -2
  148. package/dist/components/transition.css +7 -7
  149. package/dist/components/transition.js +27 -21
  150. package/dist/components/transition.min.css +1 -1
  151. package/dist/components/transition.min.js +2 -2
  152. package/dist/components/visibility.js +8 -8
  153. package/dist/components/visibility.min.js +2 -2
  154. package/dist/semantic.css +60 -60
  155. package/dist/semantic.js +780 -735
  156. package/dist/semantic.min.css +2 -2
  157. package/dist/semantic.min.js +2 -2
  158. package/examples/.eslintrc.js +6 -0
  159. package/examples/responsive.html +1 -1
  160. package/gulpfile.js +1 -1
  161. package/package.json +5 -4
  162. package/scripts/nightly-version.js +3 -3
  163. package/src/definitions/behaviors/api.js +53 -52
  164. package/src/definitions/behaviors/form.js +112 -88
  165. package/src/definitions/behaviors/state.js +6 -6
  166. package/src/definitions/behaviors/visibility.js +7 -7
  167. package/src/definitions/collections/menu.less +2 -2
  168. package/src/definitions/elements/button.less +2 -2
  169. package/src/definitions/elements/loader.less +4 -4
  170. package/src/definitions/elements/step.less +1 -1
  171. package/src/definitions/globals/site.js +10 -9
  172. package/src/definitions/modules/accordion.js +6 -6
  173. package/src/definitions/modules/calendar.js +118 -98
  174. package/src/definitions/modules/calendar.less +2 -2
  175. package/src/definitions/modules/checkbox.js +7 -7
  176. package/src/definitions/modules/dimmer.js +15 -17
  177. package/src/definitions/modules/dimmer.less +10 -10
  178. package/src/definitions/modules/dropdown.js +86 -86
  179. package/src/definitions/modules/embed.js +16 -22
  180. package/src/definitions/modules/flyout.js +31 -29
  181. package/src/definitions/modules/flyout.less +1 -1
  182. package/src/definitions/modules/modal.js +21 -21
  183. package/src/definitions/modules/nag.js +17 -15
  184. package/src/definitions/modules/popup.js +29 -29
  185. package/src/definitions/modules/progress.js +22 -20
  186. package/src/definitions/modules/rating.js +7 -7
  187. package/src/definitions/modules/search.js +40 -45
  188. package/src/definitions/modules/shape.js +8 -8
  189. package/src/definitions/modules/sidebar.js +20 -18
  190. package/src/definitions/modules/slider.js +38 -41
  191. package/src/definitions/modules/sticky.js +6 -6
  192. package/src/definitions/modules/tab.js +35 -37
  193. package/src/definitions/modules/toast.js +19 -16
  194. package/src/definitions/modules/transition.js +26 -20
  195. package/src/themes/amazon/elements/button.overrides +7 -7
  196. package/src/themes/default/collections/form.variables +1 -1
  197. package/src/themes/default/elements/reveal.variables +1 -1
  198. package/src/themes/default/globals/site.variables +1 -1
  199. package/src/themes/default/modules/dimmer.variables +6 -6
  200. package/src/themes/default/modules/modal.variables +1 -1
  201. package/src/themes/default/modules/slider.variables +4 -4
  202. package/src/themes/default/modules/toast.variables +2 -2
  203. package/src/themes/default/modules/transition.overrides +12 -12
  204. package/src/themes/flat/collections/form.overrides +2 -2
  205. package/src/themes/flat/globals/site.variables +1 -1
  206. package/src/themes/github/collections/form.overrides +2 -2
  207. package/src/themes/github/collections/menu.variables +1 -1
  208. package/src/themes/github/collections/message.overrides +3 -3
  209. package/src/themes/github/elements/input.overrides +2 -2
  210. package/src/themes/timeline/views/feed.overrides +3 -3
  211. package/src/themes/twitter/elements/button.overrides +2 -2
  212. package/tasks/.eslintrc.js +9 -0
  213. package/tasks/README.md +1 -3
  214. package/tasks/admin/components/create.js +9 -16
  215. package/tasks/admin/components/init.js +7 -7
  216. package/tasks/admin/components/update.js +7 -7
  217. package/tasks/admin/distributions/create.js +15 -17
  218. package/tasks/admin/distributions/init.js +7 -7
  219. package/tasks/admin/distributions/update.js +7 -7
  220. package/tasks/admin/publish.js +1 -1
  221. package/tasks/admin/register.js +2 -2
  222. package/tasks/admin/release.js +1 -1
  223. package/tasks/build/assets.js +2 -2
  224. package/tasks/build/css.js +8 -3
  225. package/tasks/build/javascript.js +3 -1
  226. package/tasks/build.js +1 -1
  227. package/tasks/check-install.js +1 -1
  228. package/tasks/clean.js +1 -1
  229. package/tasks/collections/README.md +3 -5
  230. package/tasks/collections/admin.js +1 -1
  231. package/tasks/collections/docs.js +1 -1
  232. package/tasks/collections/install.js +1 -1
  233. package/tasks/collections/rtl.js +1 -1
  234. package/tasks/collections/various.js +1 -1
  235. package/tasks/config/admin/github.js +5 -6
  236. package/tasks/config/admin/templates/css-package.js +1 -1
  237. package/tasks/config/admin/templates/less-package.js +1 -1
  238. package/tasks/config/npm/gulpfile.js +7 -7
  239. package/tasks/config/project/config.js +9 -16
  240. package/tasks/config/project/install.js +26 -25
  241. package/tasks/config/project/release.js +12 -14
  242. package/tasks/config/tasks.js +17 -19
  243. package/tasks/config/user.js +1 -1
  244. package/tasks/docs/build.js +5 -3
  245. package/tasks/docs/metadata.js +7 -8
  246. package/tasks/docs/serve.js +5 -3
  247. package/tasks/install.js +38 -38
  248. package/tasks/rtl/build.js +1 -1
  249. package/tasks/rtl/watch.js +1 -1
  250. package/tasks/version.js +1 -1
  251. package/tasks/watch.js +1 -1
  252. package/test/.eslintrc.js +23 -0
  253. package/test/meteor/assets.js +1 -1
  254. package/test/modules/module.spec.js +15 -15
  255. package/test/modules/popup.spec.js +1 -1
  256. package/test/modules/search.spec.js +1 -1
  257. package/test/modules/tab.spec.js +1 -1
  258. package/test/modules/transition.spec.js +1 -1
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (typeof window != 'undefined' && window.Math == Math)
18
+ window = (window !== undefined && window.Math === Math)
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -27,11 +27,11 @@
27
27
 
28
28
  moduleSelector = $allModules.selector || '',
29
29
 
30
- time = new Date().getTime(),
30
+ time = Date.now(),
31
31
  performance = [],
32
32
 
33
33
  query = arguments[0],
34
- methodInvoked = (typeof query == 'string'),
34
+ methodInvoked = (typeof query === 'string'),
35
35
  queryArguments = [].slice.call(arguments, 1),
36
36
 
37
37
  alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
@@ -138,7 +138,7 @@
138
138
  if ($module.attr('tabindex') === undefined) {
139
139
  $module.attr('tabindex', 0);
140
140
  }
141
- if ($module.find('.inner').length == 0) {
141
+ if ($module.find('.inner').length === 0) {
142
142
  $module.append("<div class='inner'>"
143
143
  + "<div class='track'></div>"
144
144
  + "<div class='track-fill'></div>"
@@ -149,7 +149,7 @@
149
149
  $thumb = $module.find('.thumb:not(.second)');
150
150
  $currThumb = $thumb;
151
151
  if (module.is.range()) {
152
- if ($module.find('.thumb.second').length == 0) {
152
+ if ($module.find('.thumb.second').length === 0) {
153
153
  $module.find('.inner').append("<div class='thumb second'></div>");
154
154
  }
155
155
  $secondThumb = $module.find('.thumb.second');
@@ -161,7 +161,7 @@
161
161
  labels: function () {
162
162
  if (module.is.labeled()) {
163
163
  $labels = $module.find('.labels:not(.auto)');
164
- if ($labels.length != 0) {
164
+ if ($labels.length > 0) {
165
165
  module.setup.customLabel();
166
166
  } else {
167
167
  module.setup.autoLabel();
@@ -196,7 +196,7 @@
196
196
  },
197
197
  autoLabel: function () {
198
198
  $labels = $module.find('.labels');
199
- if ($labels.length != 0) {
199
+ if ($labels.length > 0) {
200
200
  $labels.empty();
201
201
  } else {
202
202
  $labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
@@ -523,23 +523,23 @@
523
523
  trackOffset: function () {
524
524
  if (module.is.vertical()) {
525
525
  return $track.offset().top;
526
- } else {
527
- return $track.offset().left;
528
526
  }
527
+
528
+ return $track.offset().left;
529
529
  },
530
530
  trackLength: function () {
531
531
  if (module.is.vertical()) {
532
532
  return $track.height();
533
- } else {
534
- return $track.width();
535
533
  }
534
+
535
+ return $track.width();
536
536
  },
537
537
  trackLeft: function () {
538
538
  if (module.is.vertical()) {
539
539
  return $track.position().top;
540
- } else {
541
- return $track.position().left;
542
540
  }
541
+
542
+ return $track.position().left;
543
543
  },
544
544
  trackStartPos: function () {
545
545
  return module.is.reversed() ? module.get.trackLeft() + module.get.trackLength() : module.get.trackLeft();
@@ -574,11 +574,7 @@
574
574
  ;
575
575
  if (step != 0) {
576
576
  var split = String(step).split('.');
577
- if (split.length == 2) {
578
- decimalPlaces = split[1].length;
579
- } else {
580
- decimalPlaces = 0;
581
- }
577
+ decimalPlaces = split.length == 2 ? split[1].length : 0;
582
578
  } else {
583
579
  decimalPlaces = settings.decimalPlaces;
584
580
  }
@@ -637,12 +633,12 @@
637
633
  case 'second':
638
634
  if (module.is.range()) {
639
635
  return module.secondThumbVal;
640
- } else {
641
- module.error(error.notrange);
642
-
643
- break;
644
636
  }
645
- case 'first':
637
+
638
+ module.error(error.notrange);
639
+
640
+ break;
641
+
646
642
  default:
647
643
  return module.thumbVal;
648
644
  }
@@ -655,12 +651,12 @@
655
651
  case 'second':
656
652
  if (module.is.range()) {
657
653
  return secondPos;
658
- } else {
659
- module.error(error.notrange);
660
-
661
- break;
662
654
  }
663
- case 'first':
655
+
656
+ module.error(error.notrange);
657
+
658
+ break;
659
+
664
660
  default:
665
661
  return position;
666
662
  }
@@ -852,15 +848,18 @@
852
848
  ;
853
849
  if (key == downArrow || key == leftArrow) {
854
850
  return SINGLE_BACKSTEP;
855
- } else if (key == upArrow || key == rightArrow) {
851
+ }
852
+ if (key == upArrow || key == rightArrow) {
856
853
  return SINGLE_STEP;
857
- } else if (key == keys.pageDown) {
854
+ }
855
+ if (key == keys.pageDown) {
858
856
  return BIG_BACKSTEP;
859
- } else if (key == keys.pageUp) {
857
+ }
858
+ if (key == keys.pageUp) {
860
859
  return BIG_STEP;
861
- } else {
862
- return NO_STEP;
863
860
  }
861
+
862
+ return NO_STEP;
864
863
  },
865
864
  },
866
865
 
@@ -1009,8 +1008,8 @@
1009
1008
  thumbPosValue,
1010
1009
  min = module.get.min(),
1011
1010
  max = module.get.max(),
1012
- thumbPosPercent = 100 * (newValue - min) / (max - min),
1013
- trackStartPosPercent = 100 * (Math.min(thumbVal, secondThumbVal) - min) / (max - min),
1011
+ thumbPosPercent = 100 * ((newValue - min) / (max - min)),
1012
+ trackStartPosPercent = 100 * ((Math.min(thumbVal, secondThumbVal) - min) / (max - min)),
1014
1013
  trackEndPosPercent = 100 * (1 - (Math.max(thumbVal, secondThumbVal) - min) / (max - min))
1015
1014
  ;
1016
1015
  if (module.is.vertical()) {
@@ -1146,7 +1145,7 @@
1146
1145
  previousTime
1147
1146
  ;
1148
1147
  if (settings.performance) {
1149
- currentTime = new Date().getTime();
1148
+ currentTime = Date.now();
1150
1149
  previousTime = time || currentTime;
1151
1150
  executionTime = currentTime - previousTime;
1152
1151
  time = currentTime;
@@ -1198,8 +1197,8 @@
1198
1197
  ;
1199
1198
  passedArguments = passedArguments || queryArguments;
1200
1199
  context = context || element;
1201
- if (typeof query == 'string' && object !== undefined) {
1202
- query = query.split(/[\. ]/);
1200
+ if (typeof query === 'string' && object !== undefined) {
1201
+ query = query.split(/[ .]/);
1203
1202
  maxDepth = query.length - 1;
1204
1203
  $.each(query, function (depth, value) {
1205
1204
  var camelCaseValue = (depth != maxDepth)
@@ -1300,9 +1299,7 @@
1300
1299
  // page up/down multiplier. How many more times the steps to take on page up/down press
1301
1300
  pageMultiplier: 2,
1302
1301
 
1303
- selector: {
1304
-
1305
- },
1302
+ selector: {},
1306
1303
 
1307
1304
  className: {
1308
1305
  reversed: 'reversed',
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (typeof window != 'undefined' && window.Math == Math)
18
+ window = (window !== undefined && window.Math === Math)
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -25,11 +25,11 @@
25
25
  $document = $(document),
26
26
  moduleSelector = $allModules.selector || '',
27
27
 
28
- time = new Date().getTime(),
28
+ time = Date.now(),
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
  returnedValue
35
35
  ;
@@ -740,7 +740,7 @@
740
740
  previousTime
741
741
  ;
742
742
  if (settings.performance) {
743
- currentTime = new Date().getTime();
743
+ currentTime = Date.now();
744
744
  previousTime = time || currentTime;
745
745
  executionTime = currentTime - previousTime;
746
746
  time = currentTime;
@@ -791,8 +791,8 @@
791
791
  ;
792
792
  passedArguments = passedArguments || queryArguments;
793
793
  context = context || element;
794
- if (typeof query == 'string' && object !== undefined) {
795
- query = query.split(/[\. ]/);
794
+ if (typeof query === 'string' && object !== undefined) {
795
+ query = query.split(/[ .]/);
796
796
  maxDepth = query.length - 1;
797
797
  $.each(query, function (depth, value) {
798
798
  var camelCaseValue = (depth != maxDepth)
@@ -19,7 +19,7 @@
19
19
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
20
20
  }
21
21
 
22
- window = (typeof window != 'undefined' && window.Math == Math)
22
+ window = (window !== undefined && window.Math === Math)
23
23
  ? window
24
24
  : globalThis;
25
25
 
@@ -31,11 +31,11 @@
31
31
  : $(this),
32
32
  $document = $(document),
33
33
  moduleSelector = $allModules.selector || '',
34
- time = new Date().getTime(),
34
+ time = Date.now(),
35
35
  performance = [],
36
36
 
37
37
  query = arguments[0],
38
- methodInvoked = (typeof query == 'string'),
38
+ methodInvoked = (typeof query === 'string'),
39
39
  queryArguments = [].slice.call(arguments, 1),
40
40
 
41
41
  initializedHistory = false,
@@ -44,7 +44,6 @@
44
44
 
45
45
  $allModules.each(function () {
46
46
  var
47
-
48
47
  settings = ($.isPlainObject(parameters))
49
48
  ? $.extend(true, {}, $.fn.tab.settings, parameters)
50
49
  : $.extend({}, $.fn.tab.settings),
@@ -193,25 +192,24 @@
193
192
  module.error(error.state);
194
193
 
195
194
  return false;
196
- } else {
197
- if (settings.historyType == 'state') {
198
- module.debug('Using HTML5 to manage state');
199
- if (settings.path !== false) {
200
- $.address
201
- .history(true)
202
- .state(settings.path)
203
- ;
204
- $(window).trigger('popstate');
205
- } else {
206
- module.error(error.path);
195
+ }
196
+ if (settings.historyType == 'state') {
197
+ module.debug('Using HTML5 to manage state');
198
+ if (settings.path !== false) {
199
+ $.address
200
+ .history(true)
201
+ .state(settings.path)
202
+ ;
203
+ $(window).trigger('popstate');
204
+ } else {
205
+ module.error(error.path);
207
206
 
208
- return false;
209
- }
207
+ return false;
210
208
  }
211
- $.address
212
- .bind('change', module.event.history.change)
213
- ;
214
209
  }
210
+ $.address
211
+ .bind('change', module.event.history.change)
212
+ ;
215
213
  },
216
214
 
217
215
  event: {
@@ -288,7 +286,7 @@
288
286
  set: {
289
287
  auto: function () {
290
288
  var
291
- url = (typeof settings.path == 'string')
289
+ url = (typeof settings.path === 'string')
292
290
  ? settings.path.replace(/\/$/, '') + '/{$tab}'
293
291
  : '/{$tab}'
294
292
  ;
@@ -384,16 +382,16 @@
384
382
  }
385
383
 
386
384
  return false;
387
- } else {
388
- module.debug('Opened local tab', currentPath);
389
- module.activate.all(currentPath);
390
- if (!module.cache.read(currentPath)) {
391
- module.cache.add(currentPath, true);
392
- module.debug('First time tab loaded calling tab init');
393
- settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);
394
- }
395
- settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);
396
385
  }
386
+
387
+ module.debug('Opened local tab', currentPath);
388
+ module.activate.all(currentPath);
389
+ if (!module.cache.read(currentPath)) {
390
+ module.cache.add(currentPath, true);
391
+ module.debug('First time tab loaded calling tab init');
392
+ settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);
393
+ }
394
+ settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);
397
395
  } else if (tabPath.search('/') == -1 && tabPath !== '') {
398
396
  // look for in page anchor
399
397
  tabPath = module.escape.string(tabPath);
@@ -452,7 +450,7 @@
452
450
  evaluateScripts = (evaluateScripts !== undefined)
453
451
  ? evaluateScripts
454
452
  : settings.evaluateScripts;
455
- if (typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') {
453
+ if (typeof settings.cacheType === 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') {
456
454
  $tab
457
455
  .empty()
458
456
  .append($(html).clone(true))
@@ -498,7 +496,7 @@
498
496
 
499
497
  if (settings.loadOnce) {
500
498
  module.cache.add(fullTabPath, true);
501
- } else if (typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) {
499
+ } else if (typeof settings.cacheType === 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) {
502
500
  setTimeout(function () {
503
501
  var
504
502
  $clone = $tab.children().clone(true)
@@ -716,7 +714,7 @@
716
714
  pathName = activeTabPath;
717
715
  }
718
716
 
719
- return typeof pathName == 'string'
717
+ return typeof pathName === 'string'
720
718
  ? pathName.split('/')
721
719
  : [pathName];
722
720
  },
@@ -784,7 +782,7 @@
784
782
  previousTime
785
783
  ;
786
784
  if (settings.performance) {
787
- currentTime = new Date().getTime();
785
+ currentTime = Date.now();
788
786
  previousTime = time || currentTime;
789
787
  executionTime = currentTime - previousTime;
790
788
  time = currentTime;
@@ -835,8 +833,8 @@
835
833
  ;
836
834
  passedArguments = passedArguments || queryArguments;
837
835
  context = context || element;
838
- if (typeof query == 'string' && object !== undefined) {
839
- query = query.split(/[\. ]/);
836
+ if (typeof query === 'string' && object !== undefined) {
837
+ query = query.split(/[ .]/);
840
838
  maxDepth = query.length - 1;
841
839
  $.each(query, function (depth, value) {
842
840
  var camelCaseValue = (depth != maxDepth)
@@ -955,7 +953,7 @@
955
953
  },
956
954
 
957
955
  regExp: {
958
- escape: /[-[\]{}()*+?.,\\^$|#\s:=@]/g,
956
+ escape: /[\s#$()*+,.:=?@[\\\]^{|}-]/g,
959
957
  },
960
958
 
961
959
  metadata: {
@@ -15,20 +15,20 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (typeof window != 'undefined' && window.Math == Math)
18
+ window = (window !== undefined && window.Math === Math)
19
19
  ? window
20
20
  : globalThis;
21
21
 
22
- $.toast = $.fn.toast = function (parameters) {
22
+ $.fn.toast = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
25
  moduleSelector = $allModules.selector || '',
26
26
 
27
- time = new Date().getTime(),
27
+ time = Date.now(),
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
  ;
@@ -272,7 +272,7 @@
272
272
  }
273
273
  }
274
274
  if (settings.displayTime === 'auto') {
275
- settings.displayTime = Math.max(settings.minDisplayTime, $toast.text().split(' ').length / settings.wordsPerMinute * 60000);
275
+ settings.displayTime = Math.max(settings.minDisplayTime, ($toast.text().split(' ').length / settings.wordsPerMinute) * 60000);
276
276
  }
277
277
  $toastBox.append($toast);
278
278
 
@@ -309,7 +309,7 @@
309
309
  }
310
310
  if (settings.displayTime > 0) {
311
311
  var progressingClass = className.progressing + ' ' + (settings.pauseOnHover ? className.pausable : '');
312
- if (!!settings.showProgress) {
312
+ if (settings.showProgress) {
313
313
  $progress = $('<div/>', {
314
314
  class: className.progress + ' ' + (settings.classProgress || settings.class),
315
315
  'data-percent': '',
@@ -569,8 +569,8 @@
569
569
  return string;
570
570
  }
571
571
  var
572
- badChars = /[<>"'`]/g,
573
- shouldEscape = /[&<>"'`]/,
572
+ badChars = /["'<>`]/g,
573
+ shouldEscape = /["&'<>`]/,
574
574
  escape = {
575
575
  '<': '&lt;',
576
576
  '>': '&gt;',
@@ -583,7 +583,7 @@
583
583
  }
584
584
  ;
585
585
  if (shouldEscape.test(string)) {
586
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
586
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
587
587
 
588
588
  return string.replace(badChars, escapedChar);
589
589
  }
@@ -660,7 +660,7 @@
660
660
  previousTime
661
661
  ;
662
662
  if (settings.performance) {
663
- currentTime = new Date().getTime();
663
+ currentTime = Date.now();
664
664
  previousTime = time || currentTime;
665
665
  executionTime = currentTime - previousTime;
666
666
  time = currentTime;
@@ -711,8 +711,8 @@
711
711
  ;
712
712
  passedArguments = passedArguments || queryArguments;
713
713
  context = context || element;
714
- if (typeof query == 'string' && object !== undefined) {
715
- query = query.split(/[\. ]/);
714
+ if (typeof query === 'string' && object !== undefined) {
715
+ query = query.split(/[ .]/);
716
716
  maxDepth = query.length - 1;
717
717
  $.each(query, function (depth, value) {
718
718
  var camelCaseValue = (depth != maxDepth)
@@ -773,6 +773,7 @@
773
773
  ? returnedValue
774
774
  : this;
775
775
  };
776
+ $.toast = $.fn.toast;
776
777
 
777
778
  $.fn.toast.settings = {
778
779
 
@@ -910,13 +911,15 @@
910
911
  ;
911
912
  if (x < 1 / d1) {
912
913
  return n1 * x * x;
913
- } else if (x < 2 / d1) {
914
+ }
915
+ if (x < 2 / d1) {
914
916
  return n1 * (x -= 1.5 / d1) * x + 0.75;
915
- } else if (x < 2.5 / d1) {
917
+ }
918
+ if (x < 2.5 / d1) {
916
919
  return n1 * (x -= 2.25 / d1) * x + 0.9375;
917
- } else {
918
- return n1 * (x -= 2.625 / d1) * x + 0.984375;
919
920
  }
921
+
922
+ return n1 * (x -= 2.625 / d1) * x + 0.984375;
920
923
  },
921
924
  easeOutCubic: function (t) {
922
925
  return (--t) * t * t + 1;
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (typeof window != 'undefined' && window.Math == Math)
18
+ window = (window !== undefined && window.Math === Math)
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -24,7 +24,7 @@
24
24
  $allModules = $(this),
25
25
  moduleSelector = $allModules.selector || '',
26
26
 
27
- time = new Date().getTime(),
27
+ time = Date.now(),
28
28
  performance = [],
29
29
 
30
30
  moduleArguments = arguments,
@@ -167,14 +167,15 @@
167
167
  }
168
168
 
169
169
  return false;
170
- } else if (!settings.allowRepeats && module.is.occurring()) {
170
+ }
171
+ if (!settings.allowRepeats && module.is.occurring()) {
171
172
  module.debug('Animation is already occurring, will not execute repeated animation', settings.animation);
172
173
 
173
174
  return false;
174
- } else {
175
- module.debug('New animation started, completing previous early', settings.animation);
176
- instance.complete();
177
175
  }
176
+
177
+ module.debug('New animation started, completing previous early', settings.animation);
178
+ instance.complete();
178
179
  }
179
180
  if (module.can.animate()) {
180
181
  module.set.animating(settings.animation);
@@ -314,7 +315,7 @@
314
315
  },
315
316
  duration: function (animationName, duration) {
316
317
  duration = duration || settings.duration;
317
- duration = (typeof duration == 'number')
318
+ duration = (typeof duration === 'number')
318
319
  ? duration + 'ms'
319
320
  : duration;
320
321
  if (duration || duration === 0) {
@@ -488,33 +489,38 @@
488
489
  },
489
490
  get: {
490
491
  settings: function (animation, duration, onComplete) {
491
- if (typeof animation == 'object') { // single settings object
492
+ if (typeof animation === 'object') { // single settings object
492
493
  return $.extend(true, {}, $.fn.transition.settings, animation);
493
- } else if (typeof onComplete == 'function') { // all arguments provided
494
+ }
495
+ if (typeof onComplete === 'function') { // all arguments provided
494
496
  return $.extend({}, $.fn.transition.settings, {
495
497
  animation: animation,
496
498
  onComplete: onComplete,
497
499
  duration: duration,
498
500
  });
499
- } else if (typeof duration == 'string' || typeof duration == 'number') { // only duration provided
501
+ }
502
+ if (typeof duration === 'string' || typeof duration === 'number') { // only duration provided
500
503
  return $.extend({}, $.fn.transition.settings, {
501
504
  animation: animation,
502
505
  duration: duration,
503
506
  });
504
- } else if (typeof duration == 'object') { // duration is actually settings object
507
+ }
508
+ if (typeof duration === 'object') { // duration is actually settings object
505
509
  return $.extend({}, $.fn.transition.settings, duration, {
506
510
  animation: animation,
507
511
  });
508
- } else if (typeof duration == 'function') { // duration is actually callback
512
+ }
513
+ if (typeof duration === 'function') { // duration is actually callback
509
514
  return $.extend({}, $.fn.transition.settings, {
510
515
  animation: animation,
511
516
  onComplete: duration,
512
517
  });
513
- } else { // only animation provided
514
- return $.extend({}, $.fn.transition.settings, {
515
- animation: animation,
516
- });
517
518
  }
519
+
520
+ // only animation provided
521
+ return $.extend({}, $.fn.transition.settings, {
522
+ animation: animation,
523
+ });
518
524
  },
519
525
  animationClass: function (animation) {
520
526
  var
@@ -878,7 +884,7 @@
878
884
  previousTime
879
885
  ;
880
886
  if (settings.performance) {
881
- currentTime = new Date().getTime();
887
+ currentTime = Date.now();
882
888
  previousTime = time || currentTime;
883
889
  executionTime = currentTime - previousTime;
884
890
  time = currentTime;
@@ -907,7 +913,7 @@
907
913
  title += ' \'' + moduleSelector + '\'';
908
914
  }
909
915
  if ($allModules.length > 1) {
910
- title += ' ' + '(' + $allModules.length + ')';
916
+ title += ' (' + $allModules.length + ')';
911
917
  }
912
918
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
913
919
  console.groupCollapsed(title);
@@ -933,8 +939,8 @@
933
939
  ;
934
940
  passedArguments = passedArguments || queryArguments;
935
941
  context = context || element;
936
- if (typeof query == 'string' && object !== undefined) {
937
- query = query.split(/[\. ]/);
942
+ if (typeof query === 'string' && object !== undefined) {
943
+ query = query.split(/[ .]/);
938
944
  maxDepth = query.length - 1;
939
945
  $.each(query, function (depth, value) {
940
946
  var camelCaseValue = (depth != maxDepth)
@@ -1,23 +1,23 @@
1
1
  .ui.button {
2
- background-image: linear-gradient(center top, #F7F8FA, #E7E9EC) repeat scroll 0 0 rgba(0, 0, 0, 0);
2
+ background-image: linear-gradient(center top, #f7f8fa, #e7e9ec) repeat scroll 0 0 rgba(0, 0, 0, 0);
3
3
  }
4
4
 
5
5
  .ui.primary.button {
6
- color: #111111;
6
+ color: #111;
7
7
  border: 1px solid;
8
- border-color: #C59F43 #AA8326 #957321;
8
+ border-color: #c59f43 #aa8326 #957321;
9
9
  }
10
10
  .ui.primary.button:hover {
11
- border-color: #C59F43 #AA8326 #957321;
12
- color: #111111;
11
+ border-color: #c59f43 #aa8326 #957321;
12
+ color: #111;
13
13
  }
14
14
 
15
15
  .ui.secondary.button {
16
16
  border: 1px solid;
17
- border-color: #3D444C #2F353B #2C3137;
17
+ border-color: #3d444c #2f353b #2c3137;
18
18
  }
19
19
  .ui.secondary.button:hover {
20
- border-color: #32373E #24282D #212429;
20
+ border-color: #32373e #24282d #212429;
21
21
  }
22
22
 
23
23
  .ui.labeled.icon.buttons .button > .icon,