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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.21+2722e1b - Dropdown
2
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Dropdown
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -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
 
@@ -26,11 +26,11 @@
26
26
 
27
27
  moduleSelector = $allModules.selector || '',
28
28
 
29
- time = new Date().getTime(),
29
+ time = Date.now(),
30
30
  performance = [],
31
31
 
32
32
  query = arguments[0],
33
- methodInvoked = (typeof query == 'string'),
33
+ methodInvoked = (typeof query === 'string'),
34
34
  queryArguments = [].slice.call(arguments, 1),
35
35
  returnedValue
36
36
  ;
@@ -361,7 +361,7 @@
361
361
  .addClass(className.search)
362
362
  .prop('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
363
363
  ;
364
- if (labelNode.length) {
364
+ if (labelNode.length > 0) {
365
365
  if (!labelNode.attr('id')) {
366
366
  labelNode.attr('id', '_' + module.get.id() + '_formLabel');
367
367
  }
@@ -727,7 +727,7 @@
727
727
  if (module.is.multiple()) {
728
728
  module.filterActive();
729
729
  }
730
- if (query || (!query && module.get.activeItem().length == 0)) {
730
+ if (query || (!query && module.get.activeItem().length === 0)) {
731
731
  module.select.firstUnfiltered();
732
732
  }
733
733
  if (module.has.allResultsFiltered()) {
@@ -942,7 +942,7 @@
942
942
  // Dividers which are direct siblings are considered a group
943
943
  var $lastDivider = $(this).nextUntil(selector.item);
944
944
 
945
- return ($lastDivider.length ? $lastDivider : $(this))
945
+ return ($lastDivider.length > 0 ? $lastDivider : $(this))
946
946
  // Count all non-filtered items until the next divider (or end of the dropdown)
947
947
  .nextUntil(selector.divider)
948
948
  .filter(selector.item + ':not(.' + className.filtered + ')')
@@ -967,17 +967,22 @@
967
967
  if (queryLength === termLength) {
968
968
  return (query === term);
969
969
  }
970
- search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
970
+ for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
971
971
  var
972
+ continueSearch = false,
972
973
  queryCharacter = query.charCodeAt(characterIndex)
973
974
  ;
974
975
  while (nextCharacterIndex < termLength) {
975
976
  if (term.charCodeAt(nextCharacterIndex++) === queryCharacter) {
976
- continue search;
977
+ continueSearch = true;
978
+
979
+ break;
977
980
  }
978
981
  }
979
982
 
980
- return false;
983
+ if (!continueSearch) {
984
+ return false;
985
+ }
981
986
  }
982
987
 
983
988
  return true;
@@ -1604,19 +1609,20 @@
1604
1609
  event.preventDefault();
1605
1610
 
1606
1611
  return;
1607
- } else {
1608
- module.verbose('Up key pressed, changing active item');
1609
- $selectedItem
1610
- .removeClass(className.selected)
1611
- ;
1612
- $nextItem
1613
- .addClass(className.selected)
1614
- ;
1615
- module.set.scrollPosition($nextItem);
1616
- if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
1617
- module.set.selectedItem($nextItem);
1618
- }
1619
1612
  }
1613
+
1614
+ module.verbose('Up key pressed, changing active item');
1615
+ $selectedItem
1616
+ .removeClass(className.selected)
1617
+ ;
1618
+ $nextItem
1619
+ .addClass(className.selected)
1620
+ ;
1621
+ module.set.scrollPosition($nextItem);
1622
+ if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
1623
+ module.set.selectedItem($nextItem);
1624
+ }
1625
+
1620
1626
  event.preventDefault();
1621
1627
  }
1622
1628
 
@@ -1630,19 +1636,20 @@
1630
1636
  event.preventDefault();
1631
1637
 
1632
1638
  return;
1633
- } else {
1634
- module.verbose('Down key pressed, changing active item');
1635
- $item
1636
- .removeClass(className.selected)
1637
- ;
1638
- $nextItem
1639
- .addClass(className.selected)
1640
- ;
1641
- module.set.scrollPosition($nextItem);
1642
- if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
1643
- module.set.selectedItem($nextItem);
1644
- }
1645
1639
  }
1640
+
1641
+ module.verbose('Down key pressed, changing active item');
1642
+ $item
1643
+ .removeClass(className.selected)
1644
+ ;
1645
+ $nextItem
1646
+ .addClass(className.selected)
1647
+ ;
1648
+ module.set.scrollPosition($nextItem);
1649
+ if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
1650
+ module.set.selectedItem($nextItem);
1651
+ }
1652
+
1646
1653
  event.preventDefault();
1647
1654
  }
1648
1655
 
@@ -1725,11 +1732,11 @@
1725
1732
  callback();
1726
1733
 
1727
1734
  return true;
1728
- } else {
1729
- module.verbose('Event occurred in dropdown, canceling callback');
1730
-
1731
- return false;
1732
1735
  }
1736
+
1737
+ module.verbose('Event occurred in dropdown, canceling callback');
1738
+
1739
+ return false;
1733
1740
  },
1734
1741
  eventOnElement: function (event, callback) {
1735
1742
  var
@@ -1747,11 +1754,11 @@
1747
1754
  callback();
1748
1755
 
1749
1756
  return true;
1750
- } else {
1751
- module.verbose('Event occurred in dropdown menu, canceling callback');
1752
-
1753
- return false;
1754
1757
  }
1758
+
1759
+ module.verbose('Event occurred in dropdown menu, canceling callback');
1760
+
1761
+ return false;
1755
1762
  },
1756
1763
  },
1757
1764
 
@@ -1809,7 +1816,7 @@
1809
1816
  return $module.data(metadata.defaultValue);
1810
1817
  },
1811
1818
  placeholderText: function () {
1812
- if (settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
1819
+ if (settings.placeholder != 'auto' && typeof settings.placeholder === 'string') {
1813
1820
  return settings.placeholder;
1814
1821
  }
1815
1822
 
@@ -1880,7 +1887,8 @@
1880
1887
  ;
1881
1888
  if (returnEndPos && 'selectionEnd' in input) {
1882
1889
  return input.selectionEnd;
1883
- } else if (!returnEndPos && 'selectionStart' in input) {
1890
+ }
1891
+ if (!returnEndPos && 'selectionStart' in input) {
1884
1892
  return input.selectionStart;
1885
1893
  }
1886
1894
  if (document.selection) {
@@ -1917,7 +1925,7 @@
1917
1925
  }
1918
1926
 
1919
1927
  return (!module.has.selectInput() && module.is.multiple())
1920
- ? (typeof value == 'string') // delimited string
1928
+ ? (typeof value === 'string') // delimited string
1921
1929
  ? (raw ? value : module.escape.htmlEntities(value)).split(settings.delimiter)
1922
1930
  : ''
1923
1931
  : value;
@@ -1928,7 +1936,7 @@
1928
1936
  remoteValues = false
1929
1937
  ;
1930
1938
  if (values) {
1931
- if (typeof values == 'string') {
1939
+ if (typeof values === 'string') {
1932
1940
  values = [values];
1933
1941
  }
1934
1942
  $.each(values, function (index, value) {
@@ -2119,9 +2127,7 @@
2119
2127
  return;
2120
2128
  }
2121
2129
  if (isMultiple) {
2122
- if ($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(function (v) {
2123
- return String(v);
2124
- })) !== -1) {
2130
+ if ($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(String)) !== -1) {
2125
2131
  $selectedItem = ($selectedItem)
2126
2132
  ? $selectedItem.add($choice)
2127
2133
  : $choice;
@@ -2170,16 +2176,16 @@
2170
2176
  }
2171
2177
 
2172
2178
  return true;
2173
- } else {
2174
- module.verbose('No longer at maximum selection count');
2175
- module.remove.message();
2176
- module.remove.filteredItem();
2177
- if (module.is.searchSelection()) {
2178
- module.filterItems();
2179
- }
2179
+ }
2180
2180
 
2181
- return false;
2181
+ module.verbose('No longer at maximum selection count');
2182
+ module.remove.message();
2183
+ module.remove.filteredItem();
2184
+ if (module.is.searchSelection()) {
2185
+ module.filterItems();
2182
2186
  }
2187
+
2188
+ return false;
2183
2189
  }
2184
2190
 
2185
2191
  return true;
@@ -2878,7 +2884,7 @@
2878
2884
  var
2879
2885
  $addition = $menu.children(selector.addition),
2880
2886
  $existingItem = module.get.item(value),
2881
- alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length,
2887
+ alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length > 0,
2882
2888
  hasUserSuggestion = $addition.length > 0,
2883
2889
  html
2884
2890
  ;
@@ -3203,7 +3209,7 @@
3203
3209
  }
3204
3210
  },
3205
3211
  diacritics: function (text) {
3206
- return settings.ignoreDiacritics ? text.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : text;
3212
+ return settings.ignoreDiacritics ? text.normalize('NFD').replace(/[\u0300-\u036F]/g, '') : text;
3207
3213
  },
3208
3214
  },
3209
3215
 
@@ -3262,7 +3268,7 @@
3262
3268
  return ($currentMenu || $menu).find(selector.menu).length > 0;
3263
3269
  },
3264
3270
  message: function () {
3265
- return ($menu.children(selector.message).length !== 0);
3271
+ return ($menu.children(selector.message).length > 0);
3266
3272
  },
3267
3273
  label: function (value) {
3268
3274
  var
@@ -3304,9 +3310,7 @@
3304
3310
  : (values == value)
3305
3311
  ;
3306
3312
 
3307
- return (hasValue)
3308
- ? true
3309
- : false;
3313
+ return !!(hasValue);
3310
3314
  },
3311
3315
  valueIgnoringCase: function (value) {
3312
3316
  var
@@ -3723,8 +3727,8 @@
3723
3727
  },
3724
3728
  htmlEntities: function (string) {
3725
3729
  var
3726
- badChars = /[<>"'`]/g,
3727
- shouldEscape = /[&<>"'`]/,
3730
+ badChars = /["'<>`]/g,
3731
+ shouldEscape = /["&'<>`]/,
3728
3732
  escape = {
3729
3733
  '<': '&lt;',
3730
3734
  '>': '&gt;',
@@ -3737,7 +3741,7 @@
3737
3741
  }
3738
3742
  ;
3739
3743
  if (shouldEscape.test(string)) {
3740
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
3744
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
3741
3745
 
3742
3746
  return string.replace(badChars, escapedChar);
3743
3747
  }
@@ -3803,7 +3807,7 @@
3803
3807
  previousTime
3804
3808
  ;
3805
3809
  if (settings.performance) {
3806
- currentTime = new Date().getTime();
3810
+ currentTime = Date.now();
3807
3811
  previousTime = time || currentTime;
3808
3812
  executionTime = currentTime - previousTime;
3809
3813
  time = currentTime;
@@ -3854,8 +3858,8 @@
3854
3858
  ;
3855
3859
  passedArguments = passedArguments || queryArguments;
3856
3860
  context = context || element;
3857
- if (typeof query == 'string' && object !== undefined) {
3858
- query = query.split(/[\. ]/);
3861
+ if (typeof query === 'string' && object !== undefined) {
3862
+ query = query.split(/[ .]/);
3859
3863
  maxDepth = query.length - 1;
3860
3864
  $.each(query, function (depth, value) {
3861
3865
  var camelCaseValue = (depth != maxDepth)
@@ -4039,7 +4043,7 @@
4039
4043
  },
4040
4044
 
4041
4045
  regExp: {
4042
- escape: /[-[\]{}()*+?.,\\^$|#\s:=@]/g,
4046
+ escape: /[\s#$()*+,.:=?@[\\\]^{|}-]/g,
4043
4047
  quote: /"/g,
4044
4048
  },
4045
4049
 
@@ -4155,8 +4159,8 @@
4155
4159
  return string;
4156
4160
  }
4157
4161
  var
4158
- badChars = /[<>"'`]/g,
4159
- shouldEscape = /[&<>"'`]/,
4162
+ badChars = /["'<>`]/g,
4163
+ shouldEscape = /["&'<>`]/,
4160
4164
  escape = {
4161
4165
  '<': '&lt;',
4162
4166
  '>': '&gt;',
@@ -4169,7 +4173,7 @@
4169
4173
  }
4170
4174
  ;
4171
4175
  if (shouldEscape.test(string)) {
4172
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
4176
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
4173
4177
 
4174
4178
  return string.replace(badChars, escapedChar);
4175
4179
  }
@@ -4185,11 +4189,9 @@
4185
4189
  deQuote = $.fn.dropdown.settings.templates.deQuote
4186
4190
  ;
4187
4191
  html += '<i class="dropdown icon"></i>';
4188
- if (placeholder) {
4189
- html += '<div class="default text">' + escape(placeholder, preserveHTML) + '</div>';
4190
- } else {
4191
- html += '<div class="text"></div>';
4192
- }
4192
+ html += placeholder
4193
+ ? '<div class="default text">' + escape(placeholder, preserveHTML) + '</div>'
4194
+ : '<div class="text"></div>';
4193
4195
  html += '<div class="' + deQuote(className.menu) + '">';
4194
4196
  html += $.fn.dropdown.settings.templates.menu(select, fields, preserveHTML, className);
4195
4197
  html += '</div>';
@@ -4207,9 +4209,7 @@
4207
4209
  ;
4208
4210
  $.each(values, function (index, option) {
4209
4211
  var
4210
- itemType = (option[fields.type])
4211
- ? option[fields.type]
4212
- : 'item',
4212
+ itemType = option[fields.type] || 'item',
4213
4213
  isMenu = itemType.indexOf('menu') !== -1
4214
4214
  ;
4215
4215
 
@@ -4229,15 +4229,15 @@
4229
4229
  : '',
4230
4230
  hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
4231
4231
  ;
4232
- html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? option[fields.class] : className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
4232
+ html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
4233
4233
  if (isMenu) {
4234
4234
  html += '<i class="' + (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
4235
4235
  }
4236
4236
  if (option[fields.image]) {
4237
- html += '<img class="' + deQuote(option[fields.imageClass] ? option[fields.imageClass] : className.image) + '" src="' + deQuote(option[fields.image]) + '">';
4237
+ html += '<img class="' + deQuote(option[fields.imageClass] || className.image) + '" src="' + deQuote(option[fields.image]) + '">';
4238
4238
  }
4239
4239
  if (option[fields.icon]) {
4240
- html += '<i class="' + deQuote(option[fields.icon] + ' ' + (option[fields.iconClass] ? option[fields.iconClass] : className.icon)) + '"></i>';
4240
+ html += '<i class="' + deQuote(option[fields.icon] + ' ' + (option[fields.iconClass] || className.icon)) + '"></i>';
4241
4241
  }
4242
4242
  if (hasDescription) {
4243
4243
  html += '<span class="' + deQuote(className.description) + '">' + escape(option[fields.description] || '', preserveHTML) + '</span>';
@@ -4259,12 +4259,12 @@
4259
4259
  } else if (itemType === 'header') {
4260
4260
  var
4261
4261
  groupName = escape(option[fields.name] || '', preserveHTML),
4262
- groupIcon = deQuote(option[fields.icon] ? option[fields.icon] : className.groupIcon)
4262
+ groupIcon = deQuote(option[fields.icon] || className.groupIcon)
4263
4263
  ;
4264
4264
  if (groupName !== '' || groupIcon !== '') {
4265
- html += '<div class="' + deQuote(option[fields.class] ? option[fields.class] : className.header) + '">';
4265
+ html += '<div class="' + deQuote(option[fields.class] || className.header) + '">';
4266
4266
  if (groupIcon !== '') {
4267
- html += '<i class="' + deQuote(groupIcon + ' ' + (option[fields.iconClass] ? option[fields.iconClass] : className.icon)) + '"></i>';
4267
+ html += '<i class="' + deQuote(groupIcon + ' ' + (option[fields.iconClass] || className.icon)) + '"></i>';
4268
4268
  }
4269
4269
  html += groupName;
4270
4270
  html += '</div>';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.21+2722e1b - Dropdown
2
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Dropdown
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *