fomantic-ui 2.9.3-beta.3 → 2.9.3-beta.30

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 (263) hide show
  1. package/.github/workflows/ci.yml +2 -2
  2. package/dist/components/accordion.css +1 -1
  3. package/dist/components/accordion.js +2 -2
  4. package/dist/components/accordion.min.css +1 -1
  5. package/dist/components/accordion.min.js +2 -2
  6. package/dist/components/ad.css +1 -1
  7. package/dist/components/ad.min.css +1 -1
  8. package/dist/components/api.js +3 -3
  9. package/dist/components/api.min.js +2 -2
  10. package/dist/components/breadcrumb.css +1 -1
  11. package/dist/components/breadcrumb.min.css +1 -1
  12. package/dist/components/button.css +2 -2
  13. package/dist/components/button.min.css +2 -2
  14. package/dist/components/calendar.css +1 -1
  15. package/dist/components/calendar.js +2 -2
  16. package/dist/components/calendar.min.css +1 -1
  17. package/dist/components/calendar.min.js +2 -2
  18. package/dist/components/card.css +1 -1
  19. package/dist/components/card.min.css +1 -1
  20. package/dist/components/checkbox.css +1 -1
  21. package/dist/components/checkbox.js +2 -2
  22. package/dist/components/checkbox.min.css +1 -1
  23. package/dist/components/checkbox.min.js +2 -2
  24. package/dist/components/comment.css +6 -1
  25. package/dist/components/comment.min.css +2 -2
  26. package/dist/components/container.css +62 -1
  27. package/dist/components/container.min.css +2 -2
  28. package/dist/components/dimmer.css +3 -3
  29. package/dist/components/dimmer.js +2 -2
  30. package/dist/components/dimmer.min.css +2 -2
  31. package/dist/components/dimmer.min.js +2 -2
  32. package/dist/components/divider.css +1 -1
  33. package/dist/components/divider.min.css +1 -1
  34. package/dist/components/dropdown.css +42 -4
  35. package/dist/components/dropdown.js +18 -15
  36. package/dist/components/dropdown.min.css +2 -2
  37. package/dist/components/dropdown.min.js +2 -2
  38. package/dist/components/embed.css +1 -1
  39. package/dist/components/embed.js +2 -2
  40. package/dist/components/embed.min.css +1 -1
  41. package/dist/components/embed.min.js +2 -2
  42. package/dist/components/emoji.css +1 -1
  43. package/dist/components/emoji.min.css +1 -1
  44. package/dist/components/feed.css +1 -1
  45. package/dist/components/feed.min.css +1 -1
  46. package/dist/components/flag.css +3 -2
  47. package/dist/components/flag.min.css +2 -2
  48. package/dist/components/flyout.css +1 -1
  49. package/dist/components/flyout.js +5 -3
  50. package/dist/components/flyout.min.css +1 -1
  51. package/dist/components/flyout.min.js +2 -2
  52. package/dist/components/form.css +53 -20
  53. package/dist/components/form.js +54 -28
  54. package/dist/components/form.min.css +2 -2
  55. package/dist/components/form.min.js +2 -2
  56. package/dist/components/grid.css +107 -107
  57. package/dist/components/grid.min.css +2 -2
  58. package/dist/components/header.css +1 -1
  59. package/dist/components/header.min.css +1 -1
  60. package/dist/components/icon.css +1 -1
  61. package/dist/components/icon.min.css +1 -1
  62. package/dist/components/image.css +1 -1
  63. package/dist/components/image.min.css +1 -1
  64. package/dist/components/input.css +3 -27
  65. package/dist/components/input.min.css +2 -2
  66. package/dist/components/item.css +6 -1
  67. package/dist/components/item.min.css +2 -2
  68. package/dist/components/label.css +21 -2
  69. package/dist/components/label.min.css +2 -2
  70. package/dist/components/list.css +13 -13
  71. package/dist/components/list.min.css +2 -2
  72. package/dist/components/loader.css +282 -282
  73. package/dist/components/loader.min.css +2 -2
  74. package/dist/components/menu.css +13 -7
  75. package/dist/components/menu.min.css +2 -2
  76. package/dist/components/message.css +1 -1
  77. package/dist/components/message.min.css +1 -1
  78. package/dist/components/modal.css +10 -3
  79. package/dist/components/modal.js +10 -10
  80. package/dist/components/modal.min.css +2 -2
  81. package/dist/components/modal.min.js +2 -2
  82. package/dist/components/nag.css +1 -1
  83. package/dist/components/nag.js +3 -3
  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 +41 -40
  89. package/dist/components/popup.js +11 -9
  90. package/dist/components/popup.min.css +2 -2
  91. package/dist/components/popup.min.js +2 -2
  92. package/dist/components/progress.css +1 -1
  93. package/dist/components/progress.js +2 -2
  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 +2 -2
  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 +26 -1
  107. package/dist/components/search.js +5 -4
  108. package/dist/components/search.min.css +2 -2
  109. package/dist/components/search.min.js +2 -2
  110. package/dist/components/segment.css +159 -33
  111. package/dist/components/segment.min.css +2 -2
  112. package/dist/components/shape.css +1 -1
  113. package/dist/components/shape.js +2 -2
  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 +2 -2
  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 +2 -2
  122. package/dist/components/site.min.css +1 -1
  123. package/dist/components/site.min.js +2 -2
  124. package/dist/components/slider.css +1 -1
  125. package/dist/components/slider.js +123 -27
  126. package/dist/components/slider.min.css +1 -1
  127. package/dist/components/slider.min.js +2 -2
  128. package/dist/components/state.js +2 -2
  129. package/dist/components/state.min.js +2 -2
  130. package/dist/components/statistic.css +1 -1
  131. package/dist/components/statistic.min.css +1 -1
  132. package/dist/components/step.css +1 -1
  133. package/dist/components/step.min.css +1 -1
  134. package/dist/components/sticky.css +1 -1
  135. package/dist/components/sticky.js +2 -2
  136. package/dist/components/sticky.min.css +1 -1
  137. package/dist/components/sticky.min.js +2 -2
  138. package/dist/components/tab.css +1 -1
  139. package/dist/components/tab.js +2 -2
  140. package/dist/components/tab.min.css +1 -1
  141. package/dist/components/tab.min.js +2 -2
  142. package/dist/components/table.css +65 -1
  143. package/dist/components/table.min.css +2 -2
  144. package/dist/components/text.css +1 -1
  145. package/dist/components/text.min.css +1 -1
  146. package/dist/components/toast.css +6 -1
  147. package/dist/components/toast.js +2 -2
  148. package/dist/components/toast.min.css +2 -2
  149. package/dist/components/toast.min.js +2 -2
  150. package/dist/components/transition.css +1 -1
  151. package/dist/components/transition.js +3 -3
  152. package/dist/components/transition.min.css +1 -1
  153. package/dist/components/transition.min.js +2 -2
  154. package/dist/components/visibility.js +2 -2
  155. package/dist/components/visibility.min.js +2 -2
  156. package/dist/semantic.css +1077 -592
  157. package/dist/semantic.js +266 -136
  158. package/dist/semantic.min.css +2 -2
  159. package/dist/semantic.min.js +2 -2
  160. package/package.json +1 -1
  161. package/src/definitions/behaviors/api.js +2 -2
  162. package/src/definitions/behaviors/form.js +53 -27
  163. package/src/definitions/behaviors/state.js +1 -1
  164. package/src/definitions/behaviors/visibility.js +1 -1
  165. package/src/definitions/collections/breadcrumb.less +2 -1
  166. package/src/definitions/collections/form.less +27 -13
  167. package/src/definitions/collections/grid.less +108 -107
  168. package/src/definitions/collections/menu.less +31 -23
  169. package/src/definitions/collections/message.less +2 -1
  170. package/src/definitions/collections/table.less +68 -1
  171. package/src/definitions/elements/button.less +4 -2
  172. package/src/definitions/elements/container.less +65 -1
  173. package/src/definitions/elements/divider.less +2 -1
  174. package/src/definitions/elements/emoji.less +2 -1
  175. package/src/definitions/elements/flag.less +2 -1
  176. package/src/definitions/elements/header.less +2 -1
  177. package/src/definitions/elements/icon.less +2 -1
  178. package/src/definitions/elements/image.less +2 -1
  179. package/src/definitions/elements/input.less +4 -3
  180. package/src/definitions/elements/label.less +23 -2
  181. package/src/definitions/elements/list.less +14 -13
  182. package/src/definitions/elements/loader.less +73 -72
  183. package/src/definitions/elements/placeholder.less +2 -1
  184. package/src/definitions/elements/rail.less +2 -1
  185. package/src/definitions/elements/reveal.less +2 -1
  186. package/src/definitions/elements/segment.less +112 -14
  187. package/src/definitions/elements/step.less +2 -1
  188. package/src/definitions/elements/text.less +2 -1
  189. package/src/definitions/globals/reset.less +2 -1
  190. package/src/definitions/globals/site.js +1 -1
  191. package/src/definitions/globals/site.less +2 -1
  192. package/src/definitions/modules/accordion.js +1 -1
  193. package/src/definitions/modules/accordion.less +2 -1
  194. package/src/definitions/modules/calendar.js +1 -1
  195. package/src/definitions/modules/calendar.less +2 -1
  196. package/src/definitions/modules/checkbox.js +1 -1
  197. package/src/definitions/modules/checkbox.less +2 -1
  198. package/src/definitions/modules/dimmer.js +1 -1
  199. package/src/definitions/modules/dimmer.less +4 -3
  200. package/src/definitions/modules/dropdown.js +17 -14
  201. package/src/definitions/modules/dropdown.less +55 -4
  202. package/src/definitions/modules/embed.js +1 -1
  203. package/src/definitions/modules/embed.less +2 -1
  204. package/src/definitions/modules/flyout.js +4 -2
  205. package/src/definitions/modules/flyout.less +2 -1
  206. package/src/definitions/modules/modal.js +9 -9
  207. package/src/definitions/modules/modal.less +13 -3
  208. package/src/definitions/modules/nag.js +2 -2
  209. package/src/definitions/modules/nag.less +3 -1
  210. package/src/definitions/modules/popup.js +10 -8
  211. package/src/definitions/modules/popup.less +42 -39
  212. package/src/definitions/modules/progress.js +1 -1
  213. package/src/definitions/modules/progress.less +2 -1
  214. package/src/definitions/modules/rating.js +1 -1
  215. package/src/definitions/modules/rating.less +2 -1
  216. package/src/definitions/modules/search.js +4 -3
  217. package/src/definitions/modules/search.less +33 -1
  218. package/src/definitions/modules/shape.js +1 -1
  219. package/src/definitions/modules/shape.less +2 -1
  220. package/src/definitions/modules/sidebar.js +1 -1
  221. package/src/definitions/modules/sidebar.less +2 -1
  222. package/src/definitions/modules/slider.js +122 -26
  223. package/src/definitions/modules/slider.less +2 -1
  224. package/src/definitions/modules/sticky.js +1 -1
  225. package/src/definitions/modules/sticky.less +2 -1
  226. package/src/definitions/modules/tab.js +1 -1
  227. package/src/definitions/modules/tab.less +2 -1
  228. package/src/definitions/modules/toast.js +1 -1
  229. package/src/definitions/modules/toast.less +9 -1
  230. package/src/definitions/modules/transition.js +2 -2
  231. package/src/definitions/modules/transition.less +2 -1
  232. package/src/definitions/views/ad.less +2 -1
  233. package/src/definitions/views/card.less +2 -1
  234. package/src/definitions/views/comment.less +9 -1
  235. package/src/definitions/views/feed.less +2 -1
  236. package/src/definitions/views/item.less +9 -1
  237. package/src/definitions/views/statistic.less +2 -1
  238. package/src/overrides.less +7 -0
  239. package/src/theme.less +7 -6
  240. package/src/themes/amazon/elements/button.variables +5 -1
  241. package/src/themes/bootstrap3/elements/button.variables +5 -1
  242. package/src/themes/chubby/elements/header.variables +6 -1
  243. package/src/themes/default/collections/message.variables +3 -9
  244. package/src/themes/default/collections/table.variables +3 -0
  245. package/src/themes/default/elements/button.variables +1 -3
  246. package/src/themes/default/elements/container.variables +3 -0
  247. package/src/themes/default/elements/flag.variables +1 -1
  248. package/src/themes/default/elements/label.variables +5 -0
  249. package/src/themes/default/elements/segment.variables +8 -0
  250. package/src/themes/default/globals/site.variables +20 -1
  251. package/src/themes/default/globals/variation.variables +10 -1
  252. package/src/themes/default/modules/dropdown.variables +6 -0
  253. package/src/themes/default/modules/modal.variables +4 -0
  254. package/src/themes/default/modules/popup.variables +3 -1
  255. package/src/themes/default/modules/search.variables +3 -0
  256. package/src/themes/default/modules/toast.variables +1 -0
  257. package/src/themes/default/views/card.variables +4 -12
  258. package/src/themes/github/elements/button.variables +5 -1
  259. package/src/themes/twitter/elements/button.variables +5 -1
  260. package/tasks/admin/distributions/create.js +8 -3
  261. package/tasks/config/project/install.js +3 -0
  262. package/tasks/config/tasks.js +1 -8
  263. package/tasks/install.js +15 -5
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.3-beta.3+880333c
2
+ * # Fomantic UI - 2.9.3-beta.30+139eccc
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.3-beta.3+880333c - Site
12
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Site
13
13
  * https://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -302,7 +302,7 @@
302
302
  });
303
303
  }
304
304
  clearTimeout(module.performance.timer);
305
- module.performance.timer = setTimeout(module.performance.display, 500);
305
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
306
306
  },
307
307
  display: function () {
308
308
  var
@@ -463,7 +463,7 @@
463
463
  })(jQuery, window, document);
464
464
 
465
465
  /*!
466
- * # Fomantic-UI 2.9.3-beta.3+880333c - Form Validation
466
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Form Validation
467
467
  * https://github.com/fomantic/Fomantic-UI/
468
468
  *
469
469
  *
@@ -541,6 +541,7 @@
541
541
  initialize: function () {
542
542
  // settings grabbed at run time
543
543
  module.get.settings();
544
+ $module.addClass(className.initial);
544
545
  if (methodInvoked) {
545
546
  if (instance === undefined) {
546
547
  module.instantiate();
@@ -594,10 +595,13 @@
594
595
  module.bindEvents();
595
596
  },
596
597
 
597
- submit: function () {
598
+ submit: function (event) {
598
599
  module.verbose('Submitting form', $module);
599
600
  submitting = true;
600
601
  $module.trigger('submit');
602
+ if (event) {
603
+ event.preventDefault();
604
+ }
601
605
  },
602
606
 
603
607
  attachEvents: function (selector, action) {
@@ -623,6 +627,7 @@
623
627
  .on('click' + eventNamespace, selector.reset, module.reset)
624
628
  .on('click' + eventNamespace, selector.clear, module.clear)
625
629
  ;
630
+ $field.on('invalid' + eventNamespace, module.event.field.invalid);
626
631
  if (settings.keyboardShortcuts) {
627
632
  $module.on('keydown' + eventNamespace, selector.field, module.event.field.keydown);
628
633
  }
@@ -738,8 +743,12 @@
738
743
  var
739
744
  allValid = true
740
745
  ;
741
- $.each(validation, function (fieldName, field) {
742
- if (!module.validate.field(field, fieldName, true)) {
746
+ $field.each(function (index, el) {
747
+ var $el = $(el),
748
+ validation = module.get.validation($el) || {},
749
+ identifier = module.get.identifier(validation, $el)
750
+ ;
751
+ if (!module.validate.field(validation, identifier, true)) {
743
752
  allValid = false;
744
753
  }
745
754
  });
@@ -895,9 +904,8 @@
895
904
  if (!event.ctrlKey && key === keyCode.enter && isInput && !isInDropdown && !isCheckbox) {
896
905
  if (!keyHeldDown) {
897
906
  $field.one('keyup' + eventNamespace, module.event.field.keyup);
898
- module.submit();
907
+ module.submit(event);
899
908
  module.debug('Enter pressed on input submitting form');
900
- event.preventDefault();
901
909
  }
902
910
  keyHeldDown = true;
903
911
  }
@@ -905,15 +913,18 @@
905
913
  keyup: function () {
906
914
  keyHeldDown = false;
907
915
  },
916
+ invalid: function (event) {
917
+ event.preventDefault();
918
+ },
908
919
  blur: function (event) {
909
920
  var
910
921
  $field = $(this),
911
- $fieldGroup = $field.closest($group),
912
- validationRules = module.get.validation($field)
922
+ validationRules = module.get.validation($field) || {},
923
+ identifier = module.get.identifier(validationRules, $field)
913
924
  ;
914
- if (validationRules && (settings.on === 'blur' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
925
+ if (settings.on === 'blur' || (!$module.hasClass(className.initial) && settings.revalidate)) {
915
926
  module.debug('Revalidating field', $field, validationRules);
916
- module.validate.field(validationRules);
927
+ module.validate.field(validationRules, identifier);
917
928
  if (!settings.inline) {
918
929
  module.validate.form(false, true);
919
930
  }
@@ -922,14 +933,14 @@
922
933
  change: function (event) {
923
934
  var
924
935
  $field = $(this),
925
- $fieldGroup = $field.closest($group),
926
- validationRules = module.get.validation($field)
936
+ validationRules = module.get.validation($field) || {},
937
+ identifier = module.get.identifier(validationRules, $field)
927
938
  ;
928
- if (validationRules && (settings.on === 'change' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
939
+ if (settings.on === 'change' || (!$module.hasClass(className.initial) && settings.revalidate)) {
929
940
  clearTimeout(module.timer);
930
941
  module.timer = setTimeout(function () {
931
942
  module.debug('Revalidating field', $field, validationRules);
932
- module.validate.field(validationRules);
943
+ module.validate.field(validationRules, identifier);
933
944
  if (!settings.inline) {
934
945
  module.validate.form(false, true);
935
946
  }
@@ -995,6 +1006,9 @@
995
1006
 
996
1007
  return fullFields;
997
1008
  },
1009
+ identifier: function (validation, $el) {
1010
+ return validation.identifier || $el.attr('id') || $el.attr('name') || $el.data(metadata.validate);
1011
+ },
998
1012
  prompt: function (rule, field) {
999
1013
  var
1000
1014
  ruleName = module.get.ruleName(rule),
@@ -1107,7 +1121,7 @@
1107
1121
  var $field = typeof identifier === 'string'
1108
1122
  ? module.get.field(identifier)
1109
1123
  : identifier,
1110
- $label = $field.closest(selector.group).find('label').eq(0)
1124
+ $label = $field.closest(selector.group).find('label:not(:empty)').eq(0)
1111
1125
  ;
1112
1126
 
1113
1127
  return $label.length === 1
@@ -1438,7 +1452,7 @@
1438
1452
  $message.empty();
1439
1453
  },
1440
1454
  states: function () {
1441
- $module.removeClass(className.error).removeClass(className.success);
1455
+ $module.removeClass(className.error).removeClass(className.success).addClass(className.initial);
1442
1456
  if (!settings.inline) {
1443
1457
  module.remove.errors();
1444
1458
  }
@@ -1675,7 +1689,7 @@
1675
1689
  return rule.type === 'empty';
1676
1690
  }) !== 0
1677
1691
  : false,
1678
- identifier = validation.identifier || $el.attr('id') || $el.attr('name') || $el.data(metadata.validate)
1692
+ identifier = module.get.identifier(validation, $el)
1679
1693
  ;
1680
1694
  if (isRequired && !isDisabled && !hasEmptyRule && identifier !== undefined) {
1681
1695
  if (isCheckbox) {
@@ -1707,7 +1721,7 @@
1707
1721
  if (keyHeldDown) {
1708
1722
  return false;
1709
1723
  }
1710
-
1724
+ $module.removeClass(className.initial);
1711
1725
  // reset errors
1712
1726
  formErrors = [];
1713
1727
  if (module.determine.isValid()) {
@@ -1779,13 +1793,25 @@
1779
1793
  ? module.get.field(field.depends)
1780
1794
  : false,
1781
1795
  fieldValid = true,
1782
- fieldErrors = []
1796
+ fieldErrors = [],
1797
+ isDisabled = $field.filter(':not(:disabled)').length === 0,
1798
+ validationMessage = $field[0].validationMessage,
1799
+ errorLimit
1783
1800
  ;
1784
1801
  if (!field.identifier) {
1785
1802
  module.debug('Using field name as identifier', identifier);
1786
1803
  field.identifier = identifier;
1787
1804
  }
1788
- var isDisabled = $field.filter(':not(:disabled)').length === 0;
1805
+ if (validationMessage) {
1806
+ module.debug('Field is natively invalid', identifier);
1807
+ fieldErrors.push(validationMessage);
1808
+ fieldValid = false;
1809
+ if (showErrors) {
1810
+ $field.closest($group).addClass(className.error);
1811
+ }
1812
+ } else if (showErrors) {
1813
+ $field.closest($group).removeClass(className.error);
1814
+ }
1789
1815
  if (isDisabled) {
1790
1816
  module.debug('Field is disabled. Skipping', identifier);
1791
1817
  } else if (field.optional && module.is.blank($field)) {
@@ -1793,11 +1819,9 @@
1793
1819
  } else if (field.depends && module.is.empty($dependsField)) {
1794
1820
  module.debug('Field depends on another value that is not present or empty. Skipping', $dependsField);
1795
1821
  } else if (field.rules !== undefined) {
1796
- if (showErrors) {
1797
- $field.closest($group).removeClass(className.error);
1798
- }
1822
+ errorLimit = field.errorLimit || settings.errorLimit;
1799
1823
  $.each(field.rules, function (index, rule) {
1800
- if (module.has.field(identifier)) {
1824
+ if (module.has.field(identifier) && (!errorLimit || fieldErrors.length < errorLimit)) {
1801
1825
  var invalidFields = module.validate.rule(field, rule, true) || [];
1802
1826
  if (invalidFields.length > 0) {
1803
1827
  module.debug('Field is invalid', identifier, rule.type);
@@ -1812,7 +1836,7 @@
1812
1836
  }
1813
1837
  if (fieldValid) {
1814
1838
  if (showErrors) {
1815
- module.remove.prompt(identifier, fieldErrors);
1839
+ module.remove.prompt(identifier);
1816
1840
  settings.onValid.call($field);
1817
1841
  }
1818
1842
  } else {
@@ -1934,7 +1958,7 @@
1934
1958
  });
1935
1959
  }
1936
1960
  clearTimeout(module.performance.timer);
1937
- module.performance.timer = setTimeout(module.performance.display, 500);
1961
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1938
1962
  },
1939
1963
  display: function () {
1940
1964
  var
@@ -2049,6 +2073,7 @@
2049
2073
  preventLeaving: false,
2050
2074
  errorFocus: true,
2051
2075
  dateHandling: 'date', // 'date', 'input', 'formatter'
2076
+ errorLimit: 0,
2052
2077
 
2053
2078
  onValid: function () {},
2054
2079
  onInvalid: function () {},
@@ -2102,8 +2127,8 @@
2102
2127
  isExactly: '{name} must be exactly "{ruleValue}"',
2103
2128
  not: '{name} cannot be set to "{ruleValue}"',
2104
2129
  notExactly: '{name} cannot be set to exactly "{ruleValue}"',
2105
- contain: '{name} must contain "{ruleValue}"',
2106
- containExactly: '{name} must contain exactly "{ruleValue}"',
2130
+ contains: '{name} must contain "{ruleValue}"',
2131
+ containsExactly: '{name} must contain exactly "{ruleValue}"',
2107
2132
  doesntContain: '{name} cannot contain "{ruleValue}"',
2108
2133
  doesntContainExactly: '{name} cannot contain exactly "{ruleValue}"',
2109
2134
  minLength: '{name} must be at least {ruleValue} characters',
@@ -2137,6 +2162,7 @@
2137
2162
  },
2138
2163
 
2139
2164
  className: {
2165
+ initial: 'initial',
2140
2166
  error: 'error',
2141
2167
  label: 'ui basic red pointing prompt label',
2142
2168
  pressed: 'down',
@@ -2577,7 +2603,7 @@
2577
2603
  })(jQuery, window, document);
2578
2604
 
2579
2605
  /*!
2580
- * # Fomantic-UI 2.9.3-beta.3+880333c - Accordion
2606
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Accordion
2581
2607
  * https://github.com/fomantic/Fomantic-UI/
2582
2608
  *
2583
2609
  *
@@ -3016,7 +3042,7 @@
3016
3042
  });
3017
3043
  }
3018
3044
  clearTimeout(module.performance.timer);
3019
- module.performance.timer = setTimeout(module.performance.display, 500);
3045
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
3020
3046
  },
3021
3047
  display: function () {
3022
3048
  var
@@ -3171,7 +3197,7 @@
3171
3197
  })(jQuery, window, document);
3172
3198
 
3173
3199
  /*!
3174
- * # Fomantic-UI 2.9.3-beta.3+880333c - Calendar
3200
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Calendar
3175
3201
  * https://github.com/fomantic/Fomantic-UI/
3176
3202
  *
3177
3203
  *
@@ -4651,7 +4677,7 @@
4651
4677
  });
4652
4678
  }
4653
4679
  clearTimeout(module.performance.timer);
4654
- module.performance.timer = setTimeout(module.performance.display, 500);
4680
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
4655
4681
  },
4656
4682
  display: function () {
4657
4683
  var
@@ -5182,7 +5208,7 @@
5182
5208
  })(jQuery, window, document);
5183
5209
 
5184
5210
  /*!
5185
- * # Fomantic-UI 2.9.3-beta.3+880333c - Checkbox
5211
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Checkbox
5186
5212
  * https://github.com/fomantic/Fomantic-UI/
5187
5213
  *
5188
5214
  *
@@ -5906,7 +5932,7 @@
5906
5932
  });
5907
5933
  }
5908
5934
  clearTimeout(module.performance.timer);
5909
- module.performance.timer = setTimeout(module.performance.display, 500);
5935
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
5910
5936
  },
5911
5937
  display: function () {
5912
5938
  var
@@ -6063,7 +6089,7 @@
6063
6089
  })(jQuery, window, document);
6064
6090
 
6065
6091
  /*!
6066
- * # Fomantic-UI 2.9.3-beta.3+880333c - Dimmer
6092
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Dimmer
6067
6093
  * https://github.com/fomantic/Fomantic-UI/
6068
6094
  *
6069
6095
  *
@@ -6592,7 +6618,7 @@
6592
6618
  });
6593
6619
  }
6594
6620
  clearTimeout(module.performance.timer);
6595
- module.performance.timer = setTimeout(module.performance.display, 500);
6621
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
6596
6622
  },
6597
6623
  display: function () {
6598
6624
  var
@@ -6794,7 +6820,7 @@
6794
6820
  })(jQuery, window, document);
6795
6821
 
6796
6822
  /*!
6797
- * # Fomantic-UI 2.9.3-beta.3+880333c - Dropdown
6823
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Dropdown
6798
6824
  * https://github.com/fomantic/Fomantic-UI/
6799
6825
  *
6800
6826
  *
@@ -7892,8 +7918,8 @@
7892
7918
  notFoundTokens = []
7893
7919
  ;
7894
7920
  tokens.forEach(function (value) {
7895
- if (module.set.selected(module.escape.htmlEntities(value.trim()), null, true, true) === false) {
7896
- notFoundTokens.push(value);
7921
+ if (module.set.selected(module.escape.htmlEntities(value.trim()), null, false, true) === false) {
7922
+ notFoundTokens.push(value.trim());
7897
7923
  }
7898
7924
  });
7899
7925
  event.preventDefault();
@@ -8026,7 +8052,7 @@
8026
8052
  module.set.filtered();
8027
8053
  }
8028
8054
  clearTimeout(module.timer);
8029
- module.timer = setTimeout(module.search, settings.delay.search);
8055
+ module.timer = setTimeout(function () { module.search(); }, settings.delay.search);
8030
8056
  },
8031
8057
  label: {
8032
8058
  click: function (event) {
@@ -8202,11 +8228,13 @@
8202
8228
  if (settings.allowAdditions) {
8203
8229
  module.remove.userAddition();
8204
8230
  }
8205
- module.remove.filteredItem();
8231
+ if (!settings.keepSearchTerm) {
8232
+ module.remove.filteredItem();
8233
+ module.remove.searchTerm();
8234
+ }
8206
8235
  if (!module.is.visible() && $target.length > 0) {
8207
8236
  module.show();
8208
8237
  }
8209
- module.remove.searchTerm();
8210
8238
  if (!module.is.focusedOnSearch() && skipRefocus !== true) {
8211
8239
  module.focusSearch(true);
8212
8240
  }
@@ -8392,7 +8420,9 @@
8392
8420
  module.verbose('Selecting item from keyboard shortcut', $selectedItem);
8393
8421
  module.event.item.click.call($selectedItem, event);
8394
8422
  if (module.is.searchSelection()) {
8395
- module.remove.searchTerm();
8423
+ if (!settings.keepSearchTerm) {
8424
+ module.remove.searchTerm();
8425
+ }
8396
8426
  if (module.is.multiple()) {
8397
8427
  $search.trigger('focus');
8398
8428
  }
@@ -8609,7 +8639,7 @@
8609
8639
  ? value
8610
8640
  : text;
8611
8641
  if (module.can.activate($(element))) {
8612
- module.set.selected(value, $(element));
8642
+ module.set.selected(value, $(element), false, settings.keepSearchTerm);
8613
8643
  if (!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
8614
8644
  module.hideAndClear();
8615
8645
  }
@@ -9259,7 +9289,7 @@
9259
9289
  valueIsSet = searchValue !== ''
9260
9290
  ;
9261
9291
  if (isMultiple && hasSearchValue) {
9262
- module.verbose('Adjusting input width', searchWidth, settings.glyphWidth);
9292
+ module.verbose('Adjusting input width', searchWidth);
9263
9293
  $search.css('width', searchWidth + 'px');
9264
9294
  }
9265
9295
  if (hasSearchValue || (isSearchMultiple && valueIsSet)) {
@@ -9558,7 +9588,7 @@
9558
9588
  return false;
9559
9589
  }
9560
9590
  module.debug('Setting selected menu item to', $selectedItem);
9561
- if (module.is.multiple()) {
9591
+ if (module.is.multiple() && !keepSearchTerm) {
9562
9592
  module.remove.searchWidth();
9563
9593
  }
9564
9594
  if (module.is.single()) {
@@ -10533,12 +10563,12 @@
10533
10563
  show: function () {
10534
10564
  module.verbose('Delaying show event to ensure user intent');
10535
10565
  clearTimeout(module.timer);
10536
- module.timer = setTimeout(module.show, settings.delay.show);
10566
+ module.timer = setTimeout(function () { module.show(); }, settings.delay.show);
10537
10567
  },
10538
10568
  hide: function () {
10539
10569
  module.verbose('Delaying hide event to ensure user intent');
10540
10570
  clearTimeout(module.timer);
10541
- module.timer = setTimeout(module.hide, settings.delay.hide);
10571
+ module.timer = setTimeout(function () { module.hide(); }, settings.delay.hide);
10542
10572
  },
10543
10573
  },
10544
10574
 
@@ -10664,7 +10694,7 @@
10664
10694
  });
10665
10695
  }
10666
10696
  clearTimeout(module.performance.timer);
10667
- module.performance.timer = setTimeout(module.performance.display, 500);
10697
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
10668
10698
  },
10669
10699
  display: function () {
10670
10700
  var
@@ -10801,6 +10831,7 @@
10801
10831
  forceSelection: false, // force a choice on blur with search selection
10802
10832
 
10803
10833
  allowAdditions: false, // whether multiple select should allow user added values
10834
+ keepSearchTerm: false, // whether the search value should be kept and menu stays filtered on item selection
10804
10835
  ignoreCase: false, // whether to consider case sensitivity when creating labels
10805
10836
  ignoreSearchCase: true, // whether to consider case sensitivity when filtering items
10806
10837
  hideAdditions: true, // whether or not to hide special message prompting a user they can enter a value
@@ -10820,8 +10851,6 @@
10820
10851
  duration: 200, // duration of transition
10821
10852
  displayType: false, // displayType of transition
10822
10853
 
10823
- glyphWidth: 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width
10824
-
10825
10854
  headerDivider: true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
10826
10855
 
10827
10856
  collapseOnActionable: true, // whether the dropdown should collapse upon selection of an actionable item
@@ -11144,7 +11173,7 @@
11144
11173
  })(jQuery, window, document);
11145
11174
 
11146
11175
  /*!
11147
- * # Fomantic-UI 2.9.3-beta.3+880333c - Embed
11176
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Embed
11148
11177
  * https://github.com/fomantic/Fomantic-UI/
11149
11178
  *
11150
11179
  *
@@ -11585,7 +11614,7 @@
11585
11614
  });
11586
11615
  }
11587
11616
  clearTimeout(module.performance.timer);
11588
- module.performance.timer = setTimeout(module.performance.display, 500);
11617
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
11589
11618
  },
11590
11619
  display: function () {
11591
11620
  var
@@ -11823,7 +11852,7 @@
11823
11852
  })(jQuery, window, document);
11824
11853
 
11825
11854
  /*!
11826
- * # Fomantic-UI 2.9.3-beta.3+880333c - Flyout
11855
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Flyout
11827
11856
  * https://github.com/fomantic/Fomantic-UI/
11828
11857
  *
11829
11858
  *
@@ -12349,7 +12378,9 @@
12349
12378
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
12350
12379
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
12351
12380
  shouldRefreshInputs = true;
12352
- ignoreAutofocus = false;
12381
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
12382
+ ignoreAutofocus = false;
12383
+ }
12353
12384
  }
12354
12385
  }
12355
12386
 
@@ -13069,7 +13100,7 @@
13069
13100
  });
13070
13101
  }
13071
13102
  clearTimeout(module.performance.timer);
13072
- module.performance.timer = setTimeout(module.performance.display, 500);
13103
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
13073
13104
  },
13074
13105
  display: function () {
13075
13106
  var
@@ -13402,7 +13433,7 @@
13402
13433
  })(jQuery, window, document);
13403
13434
 
13404
13435
  /*!
13405
- * # Fomantic-UI 2.9.3-beta.3+880333c - Modal
13436
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Modal
13406
13437
  * https://github.com/fomantic/Fomantic-UI/
13407
13438
  *
13408
13439
  *
@@ -13693,7 +13724,9 @@
13693
13724
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
13694
13725
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
13695
13726
  shouldRefreshInputs = true;
13696
- ignoreAutofocus = false;
13727
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
13728
+ ignoreAutofocus = false;
13729
+ }
13697
13730
  }
13698
13731
  }
13699
13732
 
@@ -13928,7 +13961,7 @@
13928
13961
  },
13929
13962
  debounce: function (method, delay) {
13930
13963
  clearTimeout(module.timer);
13931
- module.timer = setTimeout(method, delay);
13964
+ module.timer = setTimeout(function () { method(); }, delay);
13932
13965
  },
13933
13966
  keyboard: function (event) {
13934
13967
  var
@@ -14023,7 +14056,7 @@
14023
14056
  ignoreRepeatedEvents = false;
14024
14057
  if (settings.allowMultiple) {
14025
14058
  if (module.others.active()) {
14026
- $otherModals.filter('.' + className.active).find(selector.dimmer).addClass('active');
14059
+ $otherModals.filter('.' + className.active).find(selector.dimmer).removeClass('out').addClass('transition fade in active');
14027
14060
  }
14028
14061
 
14029
14062
  if (settings.detachable) {
@@ -14095,6 +14128,8 @@
14095
14128
  onStart: function () {
14096
14129
  if (!module.others.active() && !module.others.animating() && !keepDimmed) {
14097
14130
  module.hideDimmer();
14131
+ } else if (settings.allowMultiple) {
14132
+ (hideOthersToo ? $allModals : $previousModal).find(selector.dimmer).removeClass('in').addClass('out');
14098
14133
  }
14099
14134
  if (settings.keyboardShortcuts && !module.others.active()) {
14100
14135
  module.remove.keyboardShortcuts();
@@ -14107,11 +14142,7 @@
14107
14142
  $previousModal.addClass(className.front);
14108
14143
  $module.removeClass(className.front);
14109
14144
 
14110
- if (hideOthersToo) {
14111
- $allModals.find(selector.dimmer).removeClass('active');
14112
- } else {
14113
- $previousModal.find(selector.dimmer).removeClass('active');
14114
- }
14145
+ (hideOthersToo ? $allModals : $previousModal).find(selector.dimmer).removeClass('active');
14115
14146
  }
14116
14147
  if (isFunction(settings.onHidden)) {
14117
14148
  settings.onHidden.call(element);
@@ -14676,7 +14707,7 @@
14676
14707
  });
14677
14708
  }
14678
14709
  clearTimeout(module.performance.timer);
14679
- module.performance.timer = setTimeout(module.performance.display, 500);
14710
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
14680
14711
  },
14681
14712
  display: function () {
14682
14713
  var
@@ -15036,7 +15067,7 @@
15036
15067
  })(jQuery, window, document);
15037
15068
 
15038
15069
  /*!
15039
- * # Fomantic-UI 2.9.3-beta.3+880333c - Nag
15070
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Nag
15040
15071
  * https://github.com/fomantic/Fomantic-UI/
15041
15072
  *
15042
15073
  *
@@ -15125,7 +15156,7 @@
15125
15156
  }
15126
15157
 
15127
15158
  if (settings.displayTime > 0) {
15128
- setTimeout(module.hide, settings.displayTime);
15159
+ setTimeout(function () { module.hide(); }, settings.displayTime);
15129
15160
  }
15130
15161
  module.show();
15131
15162
  },
@@ -15414,7 +15445,7 @@
15414
15445
  });
15415
15446
  }
15416
15447
  clearTimeout(module.performance.timer);
15417
- module.performance.timer = setTimeout(module.performance.display, 500);
15448
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
15418
15449
  },
15419
15450
  display: function () {
15420
15451
  var
@@ -15597,7 +15628,7 @@
15597
15628
  })(jQuery, window, document);
15598
15629
 
15599
15630
  /*!
15600
- * # Fomantic-UI 2.9.3-beta.3+880333c - Popup
15631
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Popup
15601
15632
  * https://github.com/fomantic/Fomantic-UI/
15602
15633
  *
15603
15634
  *
@@ -15792,7 +15823,7 @@
15792
15823
  ;
15793
15824
  clearTimeout(module.hideTimer);
15794
15825
  if (!openedWithTouch || (openedWithTouch && settings.addTouchEvents)) {
15795
- module.showTimer = setTimeout(module.show, delay);
15826
+ module.showTimer = setTimeout(function () { module.show(); }, delay);
15796
15827
  }
15797
15828
  },
15798
15829
  end: function () {
@@ -15802,7 +15833,7 @@
15802
15833
  : settings.delay
15803
15834
  ;
15804
15835
  clearTimeout(module.showTimer);
15805
- module.hideTimer = setTimeout(module.hide, delay);
15836
+ module.hideTimer = setTimeout(function () { module.hide(); }, delay);
15806
15837
  },
15807
15838
  touchstart: function (event) {
15808
15839
  openedWithTouch = true;
@@ -15846,9 +15877,11 @@
15846
15877
  // generates popup html from metadata
15847
15878
  create: function () {
15848
15879
  var
15880
+ targetSibling = $target.next(selector.popup),
15881
+ contentFallback = !settings.popup && targetSibling.length === 0 ? $module.attr('title') : false,
15849
15882
  html = module.get.html(),
15850
15883
  title = module.get.title(),
15851
- content = module.get.content()
15884
+ content = module.get.content(contentFallback)
15852
15885
  ;
15853
15886
 
15854
15887
  if (html || content || title) {
@@ -15889,10 +15922,10 @@
15889
15922
  if (settings.hoverable) {
15890
15923
  module.bind.popup();
15891
15924
  }
15892
- } else if ($target.next(selector.popup).length > 0) {
15925
+ } else if (targetSibling.length > 0) {
15893
15926
  module.verbose('Pre-existing popup found');
15894
15927
  settings.inline = true;
15895
- settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
15928
+ settings.popup = targetSibling.data(metadata.activator, $module);
15896
15929
  module.refresh();
15897
15930
  if (settings.hoverable) {
15898
15931
  module.bind.popup();
@@ -16082,10 +16115,10 @@
16082
16115
 
16083
16116
  return $module.data(metadata.title) || settings.title;
16084
16117
  },
16085
- content: function () {
16118
+ content: function (fallback) {
16086
16119
  $module.removeData(metadata.content);
16087
16120
 
16088
- return $module.data(metadata.content) || settings.content || $module.attr('title');
16121
+ return $module.data(metadata.content) || settings.content || fallback;
16089
16122
  },
16090
16123
  variation: function () {
16091
16124
  $module.removeData(metadata.variation);
@@ -16840,7 +16873,7 @@
16840
16873
  });
16841
16874
  }
16842
16875
  clearTimeout(module.performance.timer);
16843
- module.performance.timer = setTimeout(module.performance.display, 500);
16876
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
16844
16877
  },
16845
16878
  display: function () {
16846
16879
  var
@@ -17151,7 +17184,7 @@
17151
17184
  })(jQuery, window, document);
17152
17185
 
17153
17186
  /*!
17154
- * # Fomantic-UI 2.9.3-beta.3+880333c - Progress
17187
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Progress
17155
17188
  * https://github.com/fomantic/Fomantic-UI/
17156
17189
  *
17157
17190
  *
@@ -17943,7 +17976,7 @@
17943
17976
  });
17944
17977
  }
17945
17978
  clearTimeout(module.performance.timer);
17946
- module.performance.timer = setTimeout(module.performance.display, 500);
17979
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
17947
17980
  },
17948
17981
  display: function () {
17949
17982
  var
@@ -18129,7 +18162,7 @@
18129
18162
  })(jQuery, window, document);
18130
18163
 
18131
18164
  /*!
18132
- * # Fomantic-UI 2.9.3-beta.3+880333c - Slider
18165
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Slider
18133
18166
  * https://github.com/fomantic/Fomantic-UI/
18134
18167
  *
18135
18168
  *
@@ -18233,9 +18266,7 @@
18233
18266
  module.setup.layout();
18234
18267
  module.setup.labels();
18235
18268
 
18236
- if (!module.is.disabled()) {
18237
- module.bind.events();
18238
- }
18269
+ module.bind.events();
18239
18270
 
18240
18271
  module.read.metadata();
18241
18272
  module.read.settings();
@@ -18267,20 +18298,32 @@
18267
18298
  $module.attr('tabindex', 0);
18268
18299
  }
18269
18300
  if ($module.find('.inner').length === 0) {
18270
- $module.append("<div class='inner'>"
18271
- + "<div class='track'></div>"
18272
- + "<div class='track-fill'></div>"
18273
- + "<div class='thumb'></div>"
18301
+ $module.append('<div class="inner">'
18302
+ + '<div class="track"></div>'
18303
+ + '<div class="track-fill"></div>'
18304
+ + '<div class="thumb"></div>'
18274
18305
  + '</div>');
18275
18306
  }
18276
18307
  precision = module.get.precision();
18277
18308
  $thumb = $module.find('.thumb:not(.second)');
18309
+ if (settings.showThumbTooltip) {
18310
+ $thumb
18311
+ .attr('data-position', settings.tooltipConfig.position)
18312
+ .attr('data-variation', settings.tooltipConfig.variation)
18313
+ ;
18314
+ }
18278
18315
  $currThumb = $thumb;
18279
18316
  if (module.is.range()) {
18280
18317
  if ($module.find('.thumb.second').length === 0) {
18281
- $module.find('.inner').append("<div class='thumb second'></div>");
18318
+ $module.find('.inner').append('<div class="thumb second"></div>');
18282
18319
  }
18283
18320
  $secondThumb = $module.find('.thumb.second');
18321
+ if (settings.showThumbTooltip) {
18322
+ $secondThumb
18323
+ .attr('data-position', settings.tooltipConfig.position)
18324
+ .attr('data-variation', settings.tooltipConfig.variation)
18325
+ ;
18326
+ }
18284
18327
  }
18285
18328
  $track = $module.find('.track');
18286
18329
  $trackFill = $module.find('.track-fill');
@@ -18334,9 +18377,10 @@
18334
18377
  for (var i = 0, len = module.get.numLabels(); i <= len; i++) {
18335
18378
  var
18336
18379
  labelText = module.get.label(i),
18337
- $label = labelText !== ''
18380
+ showLabel = settings.restrictedLabels.length === 0 || settings.restrictedLabels.indexOf(labelText) >= 0,
18381
+ $label = labelText !== '' && (showLabel || settings.showLabelTicks === 'always')
18338
18382
  ? (!(i % module.get.gapRatio())
18339
- ? $('<li class="label">' + labelText + '</li>')
18383
+ ? $('<li class="label">' + (showLabel ? labelText : '') + '</li>')
18340
18384
  : $('<li class="halftick label"></li>'))
18341
18385
  : null,
18342
18386
  ratio = i / len
@@ -18480,6 +18524,18 @@
18480
18524
  ;
18481
18525
  $currThumb = initialPosition > newPos ? $thumb : $secondThumb;
18482
18526
  }
18527
+ if (module.is.range() && (settings.minRange || settings.maxRange)) {
18528
+ var currentRangeDiff = module.get.currentRangeDiff(value),
18529
+ isSecondThumb = $currThumb.hasClass('second')
18530
+ ;
18531
+ if ((settings.minRange && currentRangeDiff < settings.minRange)
18532
+ || (settings.maxRange && currentRangeDiff > settings.maxRange)
18533
+ || (settings.preventCrossover && !isSecondThumb && value > module.secondThumbVal)
18534
+ || (settings.preventCrossover && isSecondThumb && value < module.thumbVal)
18535
+ ) {
18536
+ return;
18537
+ }
18538
+ }
18483
18539
  if (module.get.step() === 0 || module.is.smooth()) {
18484
18540
  var
18485
18541
  thumbVal = module.thumbVal,
@@ -18515,6 +18571,17 @@
18515
18571
  return;
18516
18572
  }
18517
18573
  var value = module.determine.valueFromEvent(event);
18574
+ if (module.is.range() && (settings.minRange || settings.maxRange)) {
18575
+ if ($currThumb === undefined) {
18576
+ $currThumb = value <= module.get.currentThumbValue() ? $thumb : $secondThumb;
18577
+ }
18578
+ var currentRangeDiff = module.get.currentRangeDiff(value);
18579
+ if (settings.minRange && currentRangeDiff < settings.minRange) {
18580
+ value = module.get.edgeValue(value, settings.minRange);
18581
+ } else if (settings.maxRange && currentRangeDiff > settings.maxRange) {
18582
+ value = module.get.edgeValue(value, settings.maxRange);
18583
+ }
18584
+ }
18518
18585
  module.set.value(value);
18519
18586
  module.unbind.slidingEvents();
18520
18587
  touchIdentifier = undefined;
@@ -18531,6 +18598,9 @@
18531
18598
  }
18532
18599
  },
18533
18600
  keydown: function (event, first) {
18601
+ if (module.is.disabled()) {
18602
+ return;
18603
+ }
18534
18604
  if (settings.preventCrossover && module.is.range() && module.thumbVal === module.secondThumbVal) {
18535
18605
  $currThumb = undefined;
18536
18606
  }
@@ -18567,7 +18637,7 @@
18567
18637
  }
18568
18638
  },
18569
18639
  activateFocus: function (event) {
18570
- if (!module.is.focused() && module.is.hover() && module.determine.keyMovement(event) !== NO_STEP) {
18640
+ if (!module.is.disabled() && !module.is.focused() && module.is.hover() && module.determine.keyMovement(event) !== NO_STEP) {
18571
18641
  event.preventDefault();
18572
18642
  module.event.keydown(event, true);
18573
18643
  $module.trigger('focus');
@@ -18632,7 +18702,13 @@
18632
18702
 
18633
18703
  is: {
18634
18704
  range: function () {
18635
- return $module.hasClass(settings.className.range);
18705
+ var isRange = $module.hasClass(className.range);
18706
+ if (!isRange && (settings.minRange || settings.maxRange)) {
18707
+ $module.addClass(className.range);
18708
+ isRange = true;
18709
+ }
18710
+
18711
+ return isRange;
18636
18712
  },
18637
18713
  hover: function () {
18638
18714
  return isHover;
@@ -18641,23 +18717,56 @@
18641
18717
  return $module.is(':focus');
18642
18718
  },
18643
18719
  disabled: function () {
18644
- return $module.hasClass(settings.className.disabled);
18720
+ return $module.hasClass(className.disabled);
18645
18721
  },
18646
18722
  labeled: function () {
18647
- return $module.hasClass(settings.className.labeled);
18723
+ var isLabeled = $module.hasClass(className.labeled);
18724
+ if (!isLabeled && (settings.restrictedLabels.length > 0 || settings.showLabelTicks !== false)) {
18725
+ $module.addClass(className.labeled);
18726
+ isLabeled = true;
18727
+ }
18728
+
18729
+ return isLabeled;
18648
18730
  },
18649
18731
  reversed: function () {
18650
- return $module.hasClass(settings.className.reversed);
18732
+ return $module.hasClass(className.reversed);
18651
18733
  },
18652
18734
  vertical: function () {
18653
- return $module.hasClass(settings.className.vertical);
18735
+ return $module.hasClass(className.vertical);
18654
18736
  },
18655
18737
  smooth: function () {
18656
- return settings.smooth || $module.hasClass(settings.className.smooth);
18738
+ return settings.smooth || $module.hasClass(className.smooth);
18657
18739
  },
18658
18740
  },
18659
18741
 
18660
18742
  get: {
18743
+ currentRangeDiff: function (value) {
18744
+ var currentRangeDiff;
18745
+ if ($currThumb.hasClass('second')) {
18746
+ currentRangeDiff = module.thumbVal < value
18747
+ ? value - module.thumbVal
18748
+ : module.thumbVal - value;
18749
+ } else {
18750
+ currentRangeDiff = module.secondThumbVal > value
18751
+ ? module.secondThumbVal - value
18752
+ : value - module.secondThumbVal;
18753
+ }
18754
+
18755
+ return currentRangeDiff;
18756
+ },
18757
+ edgeValue: function (value, edgeValue) {
18758
+ if ($currThumb.hasClass('second')) {
18759
+ value = module.thumbVal < value
18760
+ ? module.thumbVal + edgeValue
18761
+ : module.thumbVal - edgeValue;
18762
+ } else {
18763
+ value = module.secondThumbVal < value
18764
+ ? module.secondThumbVal + edgeValue
18765
+ : module.secondThumbVal - edgeValue;
18766
+ }
18767
+
18768
+ return value;
18769
+ },
18661
18770
  trackOffset: function () {
18662
18771
  if (module.is.vertical()) {
18663
18772
  return $track.offset().top;
@@ -18861,13 +18970,10 @@
18861
18970
  return thumbDelta <= secondThumbDelta ? thumbPos : secondThumbPos;
18862
18971
  },
18863
18972
  thumbPos: function ($element) {
18864
- var
18865
- pos = module.is.vertical()
18866
- ? (module.is.reversed() ? $element.css('bottom') : $element.css('top'))
18867
- : (module.is.reversed() ? $element.css('right') : $element.css('left'))
18973
+ return module.is.vertical()
18974
+ ? (module.is.reversed() ? $element.css('bottom') : $element.css('top'))
18975
+ : (module.is.reversed() ? $element.css('right') : $element.css('left'))
18868
18976
  ;
18869
-
18870
- return pos;
18871
18977
  },
18872
18978
  positionFromValue: function (val) {
18873
18979
  var
@@ -18891,6 +18997,7 @@
18891
18997
  position = Math.round(ratio * trackLength),
18892
18998
  adjustedPos = step === 0 ? position : Math.round(position / step) * step
18893
18999
  ;
19000
+ module.verbose('Determined position: ' + position + ' from ratio: ' + ratio);
18894
19001
 
18895
19002
  return adjustedPos;
18896
19003
  },
@@ -19114,12 +19221,12 @@
19114
19221
  }
19115
19222
  if (!$currThumb.hasClass('second')) {
19116
19223
  if (settings.preventCrossover && module.is.range()) {
19117
- newValue = Math.min(module.secondThumbVal, newValue);
19224
+ newValue = Math.min(module.secondThumbVal - (settings.minRange || 0), newValue);
19118
19225
  }
19119
19226
  module.thumbVal = newValue;
19120
19227
  } else {
19121
19228
  if (settings.preventCrossover && module.is.range()) {
19122
- newValue = Math.max(module.thumbVal, newValue);
19229
+ newValue = Math.max(module.thumbVal + (settings.minRange || 0), newValue);
19123
19230
  }
19124
19231
  module.secondThumbVal = newValue;
19125
19232
  }
@@ -19138,6 +19245,10 @@
19138
19245
  thumbVal = module.thumbVal || module.get.min(),
19139
19246
  secondThumbVal = module.secondThumbVal || module.get.min()
19140
19247
  ;
19248
+ if (settings.showThumbTooltip) {
19249
+ var precision = module.get.precision();
19250
+ $targetThumb.attr('data-tooltip', Math.round(newValue * precision) / precision);
19251
+ }
19141
19252
  if (module.is.range()) {
19142
19253
  if (!$targetThumb.hasClass('second')) {
19143
19254
  position = newPos;
@@ -19226,6 +19337,14 @@
19226
19337
  settings: function () {
19227
19338
  if (settings.start !== false) {
19228
19339
  if (module.is.range()) {
19340
+ var rangeDiff = settings.end - settings.start;
19341
+ if (rangeDiff < 0
19342
+ || (settings.minRange && rangeDiff < settings.minRange)
19343
+ || (settings.maxRange && rangeDiff > settings.maxRange)
19344
+ || (settings.minRange && settings.maxRange && settings.minRange > settings.maxRange)
19345
+ ) {
19346
+ module.error(error.invalidRanges, settings.start, settings.end, settings.minRange, settings.maxRange);
19347
+ }
19229
19348
  module.debug('Start position set from settings', settings.start, settings.end);
19230
19349
  module.set.rangeValue(settings.start, settings.end);
19231
19350
  } else {
@@ -19306,7 +19425,7 @@
19306
19425
  });
19307
19426
  }
19308
19427
  clearTimeout(module.performance.timer);
19309
- module.performance.timer = setTimeout(module.performance.display, 500);
19428
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
19310
19429
  },
19311
19430
  display: function () {
19312
19431
  var
@@ -19418,6 +19537,7 @@
19418
19537
  error: {
19419
19538
  method: 'The method you called is not defined.',
19420
19539
  notrange: 'This slider is not a range slider',
19540
+ invalidRanges: 'Invalid range settings (start/end/minRange/maxRange)',
19421
19541
  },
19422
19542
 
19423
19543
  metadata: {
@@ -19430,6 +19550,8 @@
19430
19550
  step: 1,
19431
19551
  start: 0,
19432
19552
  end: 20,
19553
+ minRange: false,
19554
+ maxRange: false,
19433
19555
  labelType: 'number',
19434
19556
  showLabelTicks: false,
19435
19557
  smooth: false,
@@ -19466,6 +19588,13 @@
19466
19588
  downArrow: 40,
19467
19589
  },
19468
19590
 
19591
+ restrictedLabels: [],
19592
+ showThumbTooltip: false,
19593
+ tooltipConfig: {
19594
+ position: 'top center',
19595
+ variation: 'tiny black',
19596
+ },
19597
+
19469
19598
  labelTypes: {
19470
19599
  number: 'number',
19471
19600
  letter: 'letter',
@@ -19477,7 +19606,7 @@
19477
19606
  })(jQuery, window, document);
19478
19607
 
19479
19608
  /*!
19480
- * # Fomantic-UI 2.9.3-beta.3+880333c - Rating
19609
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Rating
19481
19610
  * https://github.com/fomantic/Fomantic-UI/
19482
19611
  *
19483
19612
  *
@@ -19846,7 +19975,7 @@
19846
19975
  });
19847
19976
  }
19848
19977
  clearTimeout(module.performance.timer);
19849
- module.performance.timer = setTimeout(module.performance.display, 500);
19978
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
19850
19979
  },
19851
19980
  display: function () {
19852
19981
  var
@@ -20016,7 +20145,7 @@
20016
20145
  })(jQuery, window, document);
20017
20146
 
20018
20147
  /*!
20019
- * # Fomantic-UI 2.9.3-beta.3+880333c - Search
20148
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Search
20020
20149
  * https://github.com/fomantic/Fomantic-UI/
20021
20150
  *
20022
20151
  *
@@ -20186,7 +20315,7 @@
20186
20315
  callback = function () {
20187
20316
  module.cancel.query();
20188
20317
  module.remove.focus();
20189
- module.timer = setTimeout(module.hideResults, settings.hideDelay);
20318
+ module.timer = setTimeout(function () { module.hideResults(); }, settings.hideDelay);
20190
20319
  }
20191
20320
  ;
20192
20321
  if (pageLostFocus) {
@@ -20578,6 +20707,7 @@
20578
20707
  if (cache) {
20579
20708
  module.debug('Reading result from cache', searchTerm);
20580
20709
  module.save.results(cache.results);
20710
+ settings.onResults.call(element, cache.results, true);
20581
20711
  module.addResults(cache.html);
20582
20712
  module.inject.id(cache.results);
20583
20713
  callback();
@@ -21187,7 +21317,7 @@
21187
21317
  });
21188
21318
  }
21189
21319
  clearTimeout(module.performance.timer);
21190
- module.performance.timer = setTimeout(module.performance.display, 500);
21320
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
21191
21321
  },
21192
21322
  display: function () {
21193
21323
  var
@@ -21362,7 +21492,7 @@
21362
21492
  onResultsAdd: false,
21363
21493
 
21364
21494
  onSearchQuery: function (query) {},
21365
- onResults: function (response) {},
21495
+ onResults: function (response, fromCache) {},
21366
21496
 
21367
21497
  onResultsOpen: function () {},
21368
21498
  onResultsClose: function () {},
@@ -21593,7 +21723,7 @@
21593
21723
  })(jQuery, window, document);
21594
21724
 
21595
21725
  /*!
21596
- * # Fomantic-UI 2.9.3-beta.3+880333c - Shape
21726
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Shape
21597
21727
  * https://github.com/fomantic/Fomantic-UI/
21598
21728
  *
21599
21729
  *
@@ -22217,7 +22347,7 @@
22217
22347
  });
22218
22348
  }
22219
22349
  clearTimeout(module.performance.timer);
22220
- module.performance.timer = setTimeout(module.performance.display, 500);
22350
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
22221
22351
  },
22222
22352
  display: function () {
22223
22353
  var
@@ -22389,7 +22519,7 @@
22389
22519
  })(jQuery, window, document);
22390
22520
 
22391
22521
  /*!
22392
- * # Fomantic-UI 2.9.3-beta.3+880333c - Sidebar
22522
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Sidebar
22393
22523
  * https://github.com/fomantic/Fomantic-UI/
22394
22524
  *
22395
22525
  *
@@ -23288,7 +23418,7 @@
23288
23418
  });
23289
23419
  }
23290
23420
  clearTimeout(module.performance.timer);
23291
- module.performance.timer = setTimeout(module.performance.display, 500);
23421
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
23292
23422
  },
23293
23423
  display: function () {
23294
23424
  var
@@ -23472,7 +23602,7 @@
23472
23602
  })(jQuery, window, document);
23473
23603
 
23474
23604
  /*!
23475
- * # Fomantic-UI 2.9.3-beta.3+880333c - Sticky
23605
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Sticky
23476
23606
  * https://github.com/fomantic/Fomantic-UI/
23477
23607
  *
23478
23608
  *
@@ -24219,7 +24349,7 @@
24219
24349
  });
24220
24350
  }
24221
24351
  clearTimeout(module.performance.timer);
24222
- module.performance.timer = setTimeout(module.performance.display, 0);
24352
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 0);
24223
24353
  },
24224
24354
  display: function () {
24225
24355
  var
@@ -24388,7 +24518,7 @@
24388
24518
  })(jQuery, window, document);
24389
24519
 
24390
24520
  /*!
24391
- * # Fomantic-UI 2.9.3-beta.3+880333c - Tab
24521
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Tab
24392
24522
  * https://github.com/fomantic/Fomantic-UI/
24393
24523
  *
24394
24524
  *
@@ -25175,7 +25305,7 @@
25175
25305
  });
25176
25306
  }
25177
25307
  clearTimeout(module.performance.timer);
25178
- module.performance.timer = setTimeout(module.performance.display, 500);
25308
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
25179
25309
  },
25180
25310
  display: function () {
25181
25311
  var
@@ -25352,7 +25482,7 @@
25352
25482
  })(jQuery, window, document);
25353
25483
 
25354
25484
  /*!
25355
- * # Fomantic-UI 2.9.3-beta.3+880333c - Toast
25485
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Toast
25356
25486
  * https://github.com/fomantic/Fomantic-UI/
25357
25487
  *
25358
25488
  *
@@ -26055,7 +26185,7 @@
26055
26185
  });
26056
26186
  }
26057
26187
  clearTimeout(module.performance.timer);
26058
- module.performance.timer = setTimeout(module.performance.display, 500);
26188
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
26059
26189
  },
26060
26190
  display: function () {
26061
26191
  var
@@ -26313,7 +26443,7 @@
26313
26443
  })(jQuery, window, document);
26314
26444
 
26315
26445
  /*!
26316
- * # Fomantic-UI 2.9.3-beta.3+880333c - Transition
26446
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Transition
26317
26447
  * https://github.com/fomantic/Fomantic-UI/
26318
26448
  *
26319
26449
  *
@@ -26456,7 +26586,7 @@
26456
26586
  ? ($allModules.length - index) * interval
26457
26587
  : index * interval;
26458
26588
  module.debug('Delaying animation by', delay);
26459
- setTimeout(module.animate, delay);
26589
+ setTimeout(function () { module.animate(); }, delay);
26460
26590
  },
26461
26591
 
26462
26592
  animate: function (overrideSettings) {
@@ -27163,7 +27293,7 @@
27163
27293
  });
27164
27294
  }
27165
27295
  clearTimeout(module.performance.timer);
27166
- module.performance.timer = setTimeout(module.performance.display, 500);
27296
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
27167
27297
  },
27168
27298
  display: function () {
27169
27299
  var
@@ -27344,7 +27474,7 @@
27344
27474
  })(jQuery, window, document);
27345
27475
 
27346
27476
  /*!
27347
- * # Fomantic-UI 2.9.3-beta.3+880333c - API
27477
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - API
27348
27478
  * https://github.com/fomantic/Fomantic-UI/
27349
27479
  *
27350
27480
  *
@@ -27991,7 +28121,7 @@
27991
28121
  module.debug('Adding error state');
27992
28122
  module.set.error();
27993
28123
  if (module.should.removeError()) {
27994
- setTimeout(module.remove.error, settings.errorDuration);
28124
+ setTimeout(function () { module.remove.error(); }, settings.errorDuration);
27995
28125
  }
27996
28126
  }
27997
28127
  module.debug('API Request failed', errorMessage, xhr);
@@ -28315,7 +28445,7 @@
28315
28445
  });
28316
28446
  }
28317
28447
  clearTimeout(module.performance.timer);
28318
- module.performance.timer = setTimeout(module.performance.display, 500);
28448
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
28319
28449
  },
28320
28450
  display: function () {
28321
28451
  var
@@ -28565,7 +28695,7 @@
28565
28695
  })(jQuery, window, document);
28566
28696
 
28567
28697
  /*!
28568
- * # Fomantic-UI 2.9.3-beta.3+880333c - State
28698
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - State
28569
28699
  * https://github.com/fomantic/Fomantic-UI/
28570
28700
  *
28571
28701
  *
@@ -29048,7 +29178,7 @@
29048
29178
  });
29049
29179
  }
29050
29180
  clearTimeout(module.performance.timer);
29051
- module.performance.timer = setTimeout(module.performance.display, 500);
29181
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
29052
29182
  },
29053
29183
  display: function () {
29054
29184
  var
@@ -29261,7 +29391,7 @@
29261
29391
  })(jQuery, window, document);
29262
29392
 
29263
29393
  /*!
29264
- * # Fomantic-UI 2.9.3-beta.3+880333c - Visibility
29394
+ * # Fomantic-UI 2.9.3-beta.30+139eccc - Visibility
29265
29395
  * https://github.com/fomantic/Fomantic-UI/
29266
29396
  *
29267
29397
  *
@@ -30350,7 +30480,7 @@
30350
30480
  });
30351
30481
  }
30352
30482
  clearTimeout(module.performance.timer);
30353
- module.performance.timer = setTimeout(module.performance.display, 500);
30483
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
30354
30484
  },
30355
30485
  display: function () {
30356
30486
  var