fomantic-ui 2.9.4-beta.7 → 2.9.4-beta.70

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 (265) hide show
  1. package/.all-contributorsrc +20 -1
  2. package/.eslintrc.js +17 -0
  3. package/.github/FUNDING.yml +1 -1
  4. package/.github/workflows/ci.yml +5 -5
  5. package/.github/workflows/depsreview.yml +14 -0
  6. package/.github/workflows/nightly.yml +1 -1
  7. package/.github/workflows/release.yml +1 -1
  8. package/CONTRIBUTORS.md +2 -0
  9. package/README.md +2 -12
  10. package/dist/components/accordion.css +1 -1
  11. package/dist/components/accordion.js +4 -2
  12. package/dist/components/accordion.min.css +1 -1
  13. package/dist/components/accordion.min.js +2 -2
  14. package/dist/components/ad.css +1 -1
  15. package/dist/components/ad.min.css +1 -1
  16. package/dist/components/api.js +7 -3
  17. package/dist/components/api.min.js +2 -2
  18. package/dist/components/breadcrumb.css +1 -1
  19. package/dist/components/breadcrumb.min.css +1 -1
  20. package/dist/components/button.css +21 -3
  21. package/dist/components/button.min.css +2 -2
  22. package/dist/components/calendar.css +1 -1
  23. package/dist/components/calendar.js +15 -3
  24. package/dist/components/calendar.min.css +1 -1
  25. package/dist/components/calendar.min.js +3 -3
  26. package/dist/components/card.css +1 -1
  27. package/dist/components/card.min.css +1 -1
  28. package/dist/components/checkbox.css +1 -1
  29. package/dist/components/checkbox.js +10 -4
  30. package/dist/components/checkbox.min.css +1 -1
  31. package/dist/components/checkbox.min.js +3 -3
  32. package/dist/components/comment.css +1 -1
  33. package/dist/components/comment.min.css +1 -1
  34. package/dist/components/container.css +1 -1
  35. package/dist/components/container.min.css +1 -1
  36. package/dist/components/dimmer.css +7 -3
  37. package/dist/components/dimmer.js +4 -2
  38. package/dist/components/dimmer.min.css +2 -2
  39. package/dist/components/dimmer.min.js +2 -2
  40. package/dist/components/divider.css +1 -1
  41. package/dist/components/divider.min.css +1 -1
  42. package/dist/components/dropdown.css +46 -38
  43. package/dist/components/dropdown.js +104 -33
  44. package/dist/components/dropdown.min.css +2 -2
  45. package/dist/components/dropdown.min.js +3 -3
  46. package/dist/components/embed.css +1 -1
  47. package/dist/components/embed.js +17 -7
  48. package/dist/components/embed.min.css +1 -1
  49. package/dist/components/embed.min.js +3 -3
  50. package/dist/components/emoji.css +1 -1
  51. package/dist/components/emoji.min.css +1 -1
  52. package/dist/components/feed.css +12 -1
  53. package/dist/components/feed.min.css +2 -2
  54. package/dist/components/flag.css +1 -1
  55. package/dist/components/flag.min.css +1 -1
  56. package/dist/components/flyout.css +1 -1
  57. package/dist/components/flyout.js +4 -2
  58. package/dist/components/flyout.min.css +1 -1
  59. package/dist/components/flyout.min.js +2 -2
  60. package/dist/components/form.css +15 -3
  61. package/dist/components/form.js +66 -23
  62. package/dist/components/form.min.css +2 -2
  63. package/dist/components/form.min.js +3 -3
  64. package/dist/components/grid.css +5 -5
  65. package/dist/components/grid.min.css +2 -2
  66. package/dist/components/header.css +1 -1
  67. package/dist/components/header.min.css +1 -1
  68. package/dist/components/icon.css +1 -1
  69. package/dist/components/icon.min.css +1 -1
  70. package/dist/components/image.css +1 -1
  71. package/dist/components/image.min.css +1 -1
  72. package/dist/components/input.css +1 -1
  73. package/dist/components/input.min.css +1 -1
  74. package/dist/components/item.css +1 -1
  75. package/dist/components/item.min.css +1 -1
  76. package/dist/components/label.css +1 -1
  77. package/dist/components/label.min.css +1 -1
  78. package/dist/components/list.css +1 -1
  79. package/dist/components/list.min.css +1 -1
  80. package/dist/components/loader.css +1 -1
  81. package/dist/components/loader.min.css +1 -1
  82. package/dist/components/menu.css +1 -1
  83. package/dist/components/menu.min.css +1 -1
  84. package/dist/components/message.css +2 -1
  85. package/dist/components/message.min.css +2 -2
  86. package/dist/components/modal.css +1 -1
  87. package/dist/components/modal.js +7 -3
  88. package/dist/components/modal.min.css +1 -1
  89. package/dist/components/modal.min.js +2 -2
  90. package/dist/components/nag.css +1 -1
  91. package/dist/components/nag.js +11 -5
  92. package/dist/components/nag.min.css +1 -1
  93. package/dist/components/nag.min.js +3 -3
  94. package/dist/components/placeholder.css +1 -1
  95. package/dist/components/placeholder.min.css +1 -1
  96. package/dist/components/popup.css +1 -1
  97. package/dist/components/popup.js +10 -4
  98. package/dist/components/popup.min.css +1 -1
  99. package/dist/components/popup.min.js +2 -2
  100. package/dist/components/progress.css +15 -6
  101. package/dist/components/progress.js +4 -2
  102. package/dist/components/progress.min.css +2 -2
  103. package/dist/components/progress.min.js +2 -2
  104. package/dist/components/rail.css +1 -1
  105. package/dist/components/rail.min.css +1 -1
  106. package/dist/components/rating.css +1 -1
  107. package/dist/components/rating.js +4 -2
  108. package/dist/components/rating.min.css +1 -1
  109. package/dist/components/rating.min.js +2 -2
  110. package/dist/components/reset.css +1 -1
  111. package/dist/components/reset.min.css +1 -1
  112. package/dist/components/reveal.css +1 -1
  113. package/dist/components/reveal.min.css +1 -1
  114. package/dist/components/search.css +1 -1
  115. package/dist/components/search.js +67 -14
  116. package/dist/components/search.min.css +1 -1
  117. package/dist/components/search.min.js +3 -3
  118. package/dist/components/segment.css +1 -1
  119. package/dist/components/segment.min.css +1 -1
  120. package/dist/components/shape.css +1 -1
  121. package/dist/components/shape.js +7 -5
  122. package/dist/components/shape.min.css +1 -1
  123. package/dist/components/shape.min.js +3 -3
  124. package/dist/components/sidebar.css +1 -1
  125. package/dist/components/sidebar.js +4 -2
  126. package/dist/components/sidebar.min.css +1 -1
  127. package/dist/components/sidebar.min.js +2 -2
  128. package/dist/components/site.css +14 -6
  129. package/dist/components/site.js +4 -2
  130. package/dist/components/site.min.css +2 -2
  131. package/dist/components/site.min.js +2 -2
  132. package/dist/components/slider.css +1 -1
  133. package/dist/components/slider.js +4 -2
  134. package/dist/components/slider.min.css +1 -1
  135. package/dist/components/slider.min.js +2 -2
  136. package/dist/components/state.js +4 -2
  137. package/dist/components/state.min.js +2 -2
  138. package/dist/components/statistic.css +1 -1
  139. package/dist/components/statistic.min.css +1 -1
  140. package/dist/components/step.css +1 -1
  141. package/dist/components/step.min.css +1 -1
  142. package/dist/components/sticky.css +1 -1
  143. package/dist/components/sticky.js +4 -2
  144. package/dist/components/sticky.min.css +1 -1
  145. package/dist/components/sticky.min.js +2 -2
  146. package/dist/components/tab.css +1 -1
  147. package/dist/components/tab.js +4 -2
  148. package/dist/components/tab.min.css +1 -1
  149. package/dist/components/tab.min.js +2 -2
  150. package/dist/components/table.css +32 -21
  151. package/dist/components/table.min.css +2 -2
  152. package/dist/components/text.css +1 -1
  153. package/dist/components/text.min.css +1 -1
  154. package/dist/components/toast.css +1 -1
  155. package/dist/components/toast.js +7 -3
  156. package/dist/components/toast.min.css +1 -1
  157. package/dist/components/toast.min.js +3 -3
  158. package/dist/components/transition.css +1 -1
  159. package/dist/components/transition.js +7 -3
  160. package/dist/components/transition.min.css +1 -1
  161. package/dist/components/transition.min.js +2 -2
  162. package/dist/components/visibility.js +4 -2
  163. package/dist/components/visibility.min.js +2 -2
  164. package/dist/semantic.css +234 -132
  165. package/dist/semantic.js +385 -136
  166. package/dist/semantic.min.css +3 -3
  167. package/dist/semantic.min.js +3 -3
  168. package/dist/themes/basic/assets/fonts/LICENSE.txt +91 -0
  169. package/dist/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
  170. package/dist/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  171. package/dist/themes/github/assets/fonts/LICENSE.txt +94 -0
  172. package/dist/themes/material/assets/fonts/LICENSE.txt +202 -0
  173. package/package.json +14 -14
  174. package/src/definitions/behaviors/api.js +6 -2
  175. package/src/definitions/behaviors/form.js +65 -22
  176. package/src/definitions/behaviors/state.js +3 -1
  177. package/src/definitions/behaviors/visibility.js +3 -1
  178. package/src/definitions/collections/form.less +9 -2
  179. package/src/definitions/collections/grid.less +4 -4
  180. package/src/definitions/collections/message.less +1 -0
  181. package/src/definitions/collections/table.less +69 -54
  182. package/src/definitions/elements/button.less +27 -3
  183. package/src/definitions/globals/site.js +3 -1
  184. package/src/definitions/globals/site.less +17 -12
  185. package/src/definitions/modules/accordion.js +3 -1
  186. package/src/definitions/modules/calendar.js +14 -2
  187. package/src/definitions/modules/checkbox.js +9 -3
  188. package/src/definitions/modules/dimmer.js +3 -1
  189. package/src/definitions/modules/dimmer.less +8 -5
  190. package/src/definitions/modules/dropdown.js +103 -32
  191. package/src/definitions/modules/dropdown.less +43 -29
  192. package/src/definitions/modules/embed.js +16 -6
  193. package/src/definitions/modules/flyout.js +3 -1
  194. package/src/definitions/modules/modal.js +6 -2
  195. package/src/definitions/modules/nag.js +10 -4
  196. package/src/definitions/modules/popup.js +9 -3
  197. package/src/definitions/modules/progress.js +3 -1
  198. package/src/definitions/modules/progress.less +17 -5
  199. package/src/definitions/modules/rating.js +3 -1
  200. package/src/definitions/modules/search.js +66 -13
  201. package/src/definitions/modules/search.less +9 -2
  202. package/src/definitions/modules/shape.js +6 -4
  203. package/src/definitions/modules/sidebar.js +3 -1
  204. package/src/definitions/modules/slider.js +3 -1
  205. package/src/definitions/modules/sticky.js +3 -1
  206. package/src/definitions/modules/tab.js +3 -1
  207. package/src/definitions/modules/toast.js +6 -2
  208. package/src/definitions/modules/transition.js +6 -2
  209. package/src/definitions/views/feed.less +11 -0
  210. package/src/themes/basic/assets/fonts/LICENSE.txt +91 -0
  211. package/src/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
  212. package/src/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  213. package/src/themes/default/elements/button.variables +3 -0
  214. package/src/themes/default/globals/site.variables +3 -0
  215. package/src/themes/default/globals/variation.variables +3 -0
  216. package/src/themes/default/modules/dropdown.variables +3 -0
  217. package/src/themes/default/modules/progress.variables +1 -1
  218. package/src/themes/default/modules/search.variables +3 -0
  219. package/src/themes/default/views/feed.variables +3 -0
  220. package/src/themes/github/assets/fonts/LICENSE.txt +94 -0
  221. package/src/themes/material/assets/fonts/LICENSE.txt +202 -0
  222. package/tasks/admin/components/create.js +4 -4
  223. package/tasks/admin/components/init.js +2 -2
  224. package/tasks/admin/components/update.js +3 -3
  225. package/tasks/admin/distributions/create.js +3 -3
  226. package/tasks/admin/distributions/init.js +2 -2
  227. package/tasks/admin/distributions/update.js +4 -4
  228. package/tasks/build/assets.js +1 -1
  229. package/tasks/build/css.js +19 -10
  230. package/tasks/build/javascript.js +12 -5
  231. package/tasks/check-install.js +1 -1
  232. package/tasks/config/defaults.js +2 -0
  233. package/tasks/config/tasks.js +1 -1
  234. package/tasks/docs/build.js +3 -3
  235. package/tasks/docs/metadata.js +1 -1
  236. package/tasks/docs/serve.js +3 -1
  237. package/tasks/install.js +2 -2
  238. package/tasks/watch.js +1 -1
  239. package/types/fomantic-ui-accordion.d.ts +1 -1
  240. package/types/fomantic-ui-api.d.ts +9 -3
  241. package/types/fomantic-ui-calendar.d.ts +110 -9
  242. package/types/fomantic-ui-checkbox.d.ts +14 -4
  243. package/types/fomantic-ui-dimmer.d.ts +1 -1
  244. package/types/fomantic-ui-dropdown.d.ts +76 -44
  245. package/types/fomantic-ui-embed.d.ts +19 -2
  246. package/types/fomantic-ui-flyout.d.ts +25 -11
  247. package/types/fomantic-ui-form.d.ts +123 -15
  248. package/types/fomantic-ui-modal.d.ts +101 -5
  249. package/types/fomantic-ui-nag.d.ts +4 -4
  250. package/types/fomantic-ui-popup.d.ts +38 -12
  251. package/types/fomantic-ui-progress.d.ts +12 -6
  252. package/types/fomantic-ui-rating.d.ts +1 -1
  253. package/types/fomantic-ui-search.d.ts +138 -22
  254. package/types/fomantic-ui-shape.d.ts +2 -2
  255. package/types/fomantic-ui-sidebar.d.ts +4 -4
  256. package/types/fomantic-ui-slider.d.ts +2 -2
  257. package/types/fomantic-ui-sticky.d.ts +1 -1
  258. package/types/fomantic-ui-tab.d.ts +6 -6
  259. package/types/fomantic-ui-toast.d.ts +14 -2
  260. package/types/fomantic-ui-transition.d.ts +41 -7
  261. package/types/fomantic-ui-visibility.d.ts +3 -3
  262. package/types/index.d.ts +25 -25
  263. package/types/tests.ts +188 -0
  264. package/types/tsconfig.json +1 -1
  265. package/types/fomantic-ui-tests.ts +0 -25
package/dist/semantic.js CHANGED
@@ -1,15 +1,15 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.4-beta.7+74bca06
2
+ * # Fomantic UI - 2.9.4-beta.70+6ca9e03
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
6
- * Copyright 2023 Contributors
6
+ * Copyright 2024 Contributors
7
7
  * Released under the MIT license
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Site
12
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Site
13
13
  * https://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -302,7 +302,9 @@
302
302
  });
303
303
  }
304
304
  clearTimeout(module.performance.timer);
305
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
305
+ module.performance.timer = setTimeout(function () {
306
+ module.performance.display();
307
+ }, 500);
306
308
  },
307
309
  display: function () {
308
310
  var
@@ -463,7 +465,7 @@
463
465
  })(jQuery, window, document);
464
466
 
465
467
  /*!
466
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Form Validation
468
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Form Validation
467
469
  * https://github.com/fomantic/Fomantic-UI/
468
470
  *
469
471
  *
@@ -502,6 +504,7 @@
502
504
  element = this,
503
505
 
504
506
  formErrors = [],
507
+ formErrorsTracker = {},
505
508
  keyHeldDown = false,
506
509
 
507
510
  // set at run-time
@@ -1002,6 +1005,13 @@
1002
1005
  fullFields[name].rules.push({ type: rule });
1003
1006
  });
1004
1007
  }
1008
+
1009
+ $.each(fullFields[name].rules, function (index, rule) {
1010
+ var ruleName = module.get.ruleName(rule);
1011
+ if (ruleName === 'empty') {
1012
+ module.warn('*** DEPRECATED *** : Rule "empty" for field "' + name + '" will be removed in a future version. -> Use "notEmpty" rule instead.');
1013
+ }
1014
+ });
1005
1015
  });
1006
1016
 
1007
1017
  return fullFields;
@@ -1015,9 +1025,10 @@
1015
1025
  ancillary = module.get.ancillaryValue(rule),
1016
1026
  $field = module.get.field(field.identifier),
1017
1027
  value = $field.val(),
1018
- prompt = isFunction(rule.prompt)
1019
- ? rule.prompt(value)
1020
- : rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,
1028
+ promptCheck = rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,
1029
+ prompt = String(isFunction(promptCheck)
1030
+ ? promptCheck.call($field[0], value)
1031
+ : promptCheck),
1021
1032
  requiresValue = prompt.search('{value}') !== -1,
1022
1033
  requiresName = prompt.search('{name}') !== -1,
1023
1034
  parts,
@@ -1055,10 +1066,10 @@
1055
1066
  },
1056
1067
  settings: function () {
1057
1068
  if ($.isPlainObject(parameters)) {
1058
- if (parameters.fields) {
1059
- parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
1060
- }
1061
1069
  settings = $.extend(true, {}, $.fn.form.settings, parameters);
1070
+ if (settings.fields) {
1071
+ settings.fields = module.get.fieldsFromShorthand(settings.fields);
1072
+ }
1062
1073
  validation = $.extend(true, {}, $.fn.form.settings.defaults, settings.fields);
1063
1074
  module.verbose('Extending settings', validation, settings);
1064
1075
  } else {
@@ -1175,7 +1186,7 @@
1175
1186
  var
1176
1187
  $field = $(field),
1177
1188
  $calendar = $field.closest(selector.uiCalendar),
1178
- name = $field.prop('name'),
1189
+ name = $field.prop('name') || $field.prop('id'),
1179
1190
  value = $field.val(),
1180
1191
  isCheckbox = $field.is(selector.checkbox),
1181
1192
  isRadio = $field.is(selector.radio),
@@ -1404,7 +1415,7 @@
1404
1415
  $prompt.css('display', 'none');
1405
1416
  }
1406
1417
  $prompt
1407
- .appendTo($fieldGroup)
1418
+ .appendTo($fieldGroup.filter('.' + className.error))
1408
1419
  ;
1409
1420
  }
1410
1421
  $prompt
@@ -1701,20 +1712,20 @@
1701
1712
  isRequired = $el.prop('required') || $elGroup.hasClass(className.required) || $elGroup.parent().hasClass(className.required),
1702
1713
  isDisabled = $el.is(':disabled') || $elGroup.hasClass(className.disabled) || $elGroup.parent().hasClass(className.disabled),
1703
1714
  validation = module.get.validation($el),
1704
- hasEmptyRule = validation
1715
+ hasNotEmptyRule = validation
1705
1716
  ? $.grep(validation.rules, function (rule) {
1706
- return rule.type === 'empty';
1707
- }) !== 0
1717
+ return ['notEmpty', 'checked', 'empty'].indexOf(rule.type) >= 0;
1718
+ }).length > 0
1708
1719
  : false,
1709
1720
  identifier = module.get.identifier(validation, $el)
1710
1721
  ;
1711
- if (isRequired && !isDisabled && !hasEmptyRule && identifier !== undefined) {
1722
+ if (isRequired && !isDisabled && !hasNotEmptyRule && identifier !== undefined) {
1712
1723
  if (isCheckbox) {
1713
1724
  module.verbose("Adding 'checked' rule on field", identifier);
1714
1725
  module.add.rule(identifier, 'checked');
1715
1726
  } else {
1716
- module.verbose("Adding 'empty' rule on field", identifier);
1717
- module.add.rule(identifier, 'empty');
1727
+ module.verbose("Adding 'notEmpty' rule on field", identifier);
1728
+ module.add.rule(identifier, 'notEmpty');
1718
1729
  }
1719
1730
  }
1720
1731
  });
@@ -1741,6 +1752,7 @@
1741
1752
  $module.removeClass(className.initial);
1742
1753
  // reset errors
1743
1754
  formErrors = [];
1755
+ formErrorsTracker = {};
1744
1756
  if (module.determine.isValid()) {
1745
1757
  module.debug('Form has no validation errors, submitting');
1746
1758
  module.set.success();
@@ -1806,28 +1818,30 @@
1806
1818
  var
1807
1819
  identifier = field.identifier || fieldName,
1808
1820
  $field = module.get.field(identifier),
1821
+ $fieldGroup = $field.closest($group),
1809
1822
  $dependsField = field.depends
1810
1823
  ? module.get.field(field.depends)
1811
1824
  : false,
1812
1825
  fieldValid = true,
1813
1826
  fieldErrors = [],
1814
- isDisabled = $field.filter(':not(:disabled)').length === 0,
1827
+ isDisabled = $field.filter(':not(:disabled)').length === 0 || $fieldGroup.hasClass(className.disabled) || $fieldGroup.parent().hasClass(className.disabled),
1815
1828
  validationMessage = $field[0].validationMessage,
1829
+ noNativeValidation = field.noNativeValidation || settings.noNativeValidation || $field.filter('[formnovalidate],[novalidate]').length > 0 || $module.filter('[novalidate]').length > 0,
1816
1830
  errorLimit
1817
1831
  ;
1818
1832
  if (!field.identifier) {
1819
1833
  module.debug('Using field name as identifier', identifier);
1820
1834
  field.identifier = identifier;
1821
1835
  }
1822
- if (validationMessage) {
1836
+ if (validationMessage && !noNativeValidation && !isDisabled) {
1823
1837
  module.debug('Field is natively invalid', identifier);
1824
1838
  fieldErrors.push(validationMessage);
1825
1839
  fieldValid = false;
1826
1840
  if (showErrors) {
1827
- $field.closest($group).addClass(className.error);
1841
+ $fieldGroup.addClass(className.error);
1828
1842
  }
1829
1843
  } else if (showErrors) {
1830
- $field.closest($group).removeClass(className.error);
1844
+ $fieldGroup.removeClass(className.error);
1831
1845
  }
1832
1846
  if (isDisabled) {
1833
1847
  module.debug('Field is disabled. Skipping', identifier);
@@ -1842,7 +1856,22 @@
1842
1856
  var invalidFields = module.validate.rule(field, rule, true) || [];
1843
1857
  if (invalidFields.length > 0) {
1844
1858
  module.debug('Field is invalid', identifier, rule.type);
1845
- fieldErrors.push(module.get.prompt(rule, field));
1859
+ var fieldError = module.get.prompt(rule, field);
1860
+ if (!settings.inline) {
1861
+ if (
1862
+ // Always allow the first error prompt for new field identifiers
1863
+ (!(identifier in formErrorsTracker)
1864
+ // Also allow multiple error prompts per field identifier but make sure each prompt is unique
1865
+ || formErrorsTracker[identifier].indexOf(fieldError) === -1)
1866
+ // Limit the number of unique error prompts for every field identifier if specified
1867
+ && (!errorLimit || (formErrorsTracker[identifier] || []).length < errorLimit)
1868
+ ) {
1869
+ fieldErrors.push(fieldError);
1870
+ (formErrorsTracker[identifier] = formErrorsTracker[identifier] || []).push(fieldError);
1871
+ }
1872
+ } else {
1873
+ fieldErrors.push(fieldError);
1874
+ }
1846
1875
  fieldValid = false;
1847
1876
  if (showErrors) {
1848
1877
  $(invalidFields).closest($group).addClass(className.error);
@@ -1857,7 +1886,7 @@
1857
1886
  settings.onValid.call($field);
1858
1887
  }
1859
1888
  } else {
1860
- if (showErrors) {
1889
+ if (showErrors && fieldErrors.length > 0) {
1861
1890
  formErrors = formErrors.concat(fieldErrors);
1862
1891
  module.add.prompt(identifier, fieldErrors, true);
1863
1892
  settings.onInvalid.call($field, fieldErrors);
@@ -1955,6 +1984,12 @@
1955
1984
  module.error.apply(console, arguments);
1956
1985
  }
1957
1986
  },
1987
+ warn: function () {
1988
+ if (!settings.silent) {
1989
+ module.warn = Function.prototype.bind.call(console.warn, console, settings.name + ':');
1990
+ module.warn.apply(console, arguments);
1991
+ }
1992
+ },
1958
1993
  performance: {
1959
1994
  log: function (message) {
1960
1995
  var
@@ -1975,7 +2010,9 @@
1975
2010
  });
1976
2011
  }
1977
2012
  clearTimeout(module.performance.timer);
1978
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
2013
+ module.performance.timer = setTimeout(function () {
2014
+ module.performance.display();
2015
+ }, 500);
1979
2016
  },
1980
2017
  display: function () {
1981
2018
  var
@@ -2069,6 +2106,7 @@
2069
2106
  name: 'Form',
2070
2107
  namespace: 'form',
2071
2108
 
2109
+ silent: false,
2072
2110
  debug: false,
2073
2111
  verbose: false,
2074
2112
  performance: true,
@@ -2091,6 +2129,7 @@
2091
2129
  errorFocus: true,
2092
2130
  dateHandling: 'date', // 'date', 'input', 'formatter'
2093
2131
  errorLimit: 0,
2132
+ noNativeValidation: false,
2094
2133
 
2095
2134
  onValid: function () {},
2096
2135
  onInvalid: function () {},
@@ -2133,6 +2172,7 @@
2133
2172
  maxValue: '{name} must have a maximum value of {ruleValue}',
2134
2173
  minValue: '{name} must have a minimum value of {ruleValue}',
2135
2174
  empty: '{name} must have a value',
2175
+ notEmpty: '{name} must have a value',
2136
2176
  checked: '{name} must be checked',
2137
2177
  email: '{name} must be a valid e-mail',
2138
2178
  url: '{name} must be a valid url',
@@ -2265,10 +2305,15 @@
2265
2305
  rules: {
2266
2306
 
2267
2307
  // is not empty or blank string
2268
- empty: function (value) {
2308
+ notEmpty: function (value) {
2269
2309
  return !(value === undefined || value === '' || (Array.isArray(value) && value.length === 0));
2270
2310
  },
2271
2311
 
2312
+ /* Deprecated */
2313
+ empty: function (value) {
2314
+ return $.fn.form.settings.rules.notEmpty(value);
2315
+ },
2316
+
2272
2317
  // checkbox checked
2273
2318
  checked: function () {
2274
2319
  return $(this).filter(':checked').length > 0;
@@ -2620,7 +2665,7 @@
2620
2665
  })(jQuery, window, document);
2621
2666
 
2622
2667
  /*!
2623
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Accordion
2668
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Accordion
2624
2669
  * https://github.com/fomantic/Fomantic-UI/
2625
2670
  *
2626
2671
  *
@@ -3059,7 +3104,9 @@
3059
3104
  });
3060
3105
  }
3061
3106
  clearTimeout(module.performance.timer);
3062
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
3107
+ module.performance.timer = setTimeout(function () {
3108
+ module.performance.display();
3109
+ }, 500);
3063
3110
  },
3064
3111
  display: function () {
3065
3112
  var
@@ -3214,7 +3261,7 @@
3214
3261
  })(jQuery, window, document);
3215
3262
 
3216
3263
  /*!
3217
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Calendar
3264
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Calendar
3218
3265
  * https://github.com/fomantic/Fomantic-UI/
3219
3266
  *
3220
3267
  *
@@ -3317,7 +3364,17 @@
3317
3364
 
3318
3365
  destroy: function () {
3319
3366
  module.verbose('Destroying previous calendar for', element);
3320
- $module.removeData(moduleNamespace);
3367
+ $module.removeData([
3368
+ metadata.date,
3369
+ metadata.focusDate,
3370
+ metadata.startDate,
3371
+ metadata.endDate,
3372
+ metadata.minDate,
3373
+ metadata.maxDate,
3374
+ metadata.mode,
3375
+ metadata.monthOffset,
3376
+ moduleNamespace,
3377
+ ]);
3321
3378
  module.unbind.events();
3322
3379
  module.disconnect.classObserver();
3323
3380
  },
@@ -4694,7 +4751,9 @@
4694
4751
  });
4695
4752
  }
4696
4753
  clearTimeout(module.performance.timer);
4697
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
4754
+ module.performance.timer = setTimeout(function () {
4755
+ module.performance.display();
4756
+ }, 500);
4698
4757
  },
4699
4758
  display: function () {
4700
4759
  var
@@ -5225,7 +5284,7 @@
5225
5284
  })(jQuery, window, document);
5226
5285
 
5227
5286
  /*!
5228
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Checkbox
5287
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Checkbox
5229
5288
  * https://github.com/fomantic/Fomantic-UI/
5230
5289
  *
5231
5290
  *
@@ -5436,7 +5495,7 @@
5436
5495
  ;
5437
5496
 
5438
5497
  var
5439
- r = module.get.radios(),
5498
+ r = module.get.radios().not(selector.disabled),
5440
5499
  rIndex = r.index($module),
5441
5500
  rLen = r.length,
5442
5501
  checkIndex = false
@@ -5454,7 +5513,10 @@
5454
5513
 
5455
5514
  return false;
5456
5515
  }
5457
- if (settings.beforeChecked.apply($(r[checkIndex]).children(selector.input)[0]) === false) {
5516
+ var nextOption = $(r[checkIndex]),
5517
+ nextInput = nextOption.children(selector.input),
5518
+ disallowOption = nextOption.hasClass(className.readOnly) || nextInput.prop('readonly');
5519
+ if (disallowOption || settings.beforeChecked.apply(nextInput[0]) === false) {
5458
5520
  module.verbose('Next option should not allow check, cancelling key navigation');
5459
5521
 
5460
5522
  return false;
@@ -5951,7 +6013,9 @@
5951
6013
  });
5952
6014
  }
5953
6015
  clearTimeout(module.performance.timer);
5954
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
6016
+ module.performance.timer = setTimeout(function () {
6017
+ module.performance.display();
6018
+ }, 500);
5955
6019
  },
5956
6020
  display: function () {
5957
6021
  var
@@ -6099,6 +6163,7 @@
6099
6163
 
6100
6164
  selector: {
6101
6165
  checkbox: '.ui.checkbox',
6166
+ disabled: '.disabled, :has(input[disabled])',
6102
6167
  label: 'label',
6103
6168
  input: 'input[type="checkbox"], input[type="radio"]',
6104
6169
  link: 'a[href]',
@@ -6108,7 +6173,7 @@
6108
6173
  })(jQuery, window, document);
6109
6174
 
6110
6175
  /*!
6111
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Dimmer
6176
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Dimmer
6112
6177
  * https://github.com/fomantic/Fomantic-UI/
6113
6178
  *
6114
6179
  *
@@ -6637,7 +6702,9 @@
6637
6702
  });
6638
6703
  }
6639
6704
  clearTimeout(module.performance.timer);
6640
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
6705
+ module.performance.timer = setTimeout(function () {
6706
+ module.performance.display();
6707
+ }, 500);
6641
6708
  },
6642
6709
  display: function () {
6643
6710
  var
@@ -6839,7 +6906,7 @@
6839
6906
  })(jQuery, window, document);
6840
6907
 
6841
6908
  /*!
6842
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Dropdown
6909
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Dropdown
6843
6910
  * https://github.com/fomantic/Fomantic-UI/
6844
6911
  *
6845
6912
  *
@@ -6966,6 +7033,8 @@
6966
7033
  module.set.initialLoad();
6967
7034
  module.change.values(settings.values);
6968
7035
  module.remove.initialLoad();
7036
+ } else if (module.get.placeholderText() !== '') {
7037
+ module.set.placeholderText();
6969
7038
  }
6970
7039
 
6971
7040
  module.refreshData();
@@ -7633,7 +7702,7 @@
7633
7702
  }
7634
7703
  if (module.is.multiple()) {
7635
7704
  $.each(preSelected, function (index, value) {
7636
- $item.filter('[data-value="' + value + '"]')
7705
+ $item.filter('[data-' + metadata.value + '="' + value + '"]')
7637
7706
  .addClass(className.filtered)
7638
7707
  ;
7639
7708
  });
@@ -7730,11 +7799,13 @@
7730
7799
  ? query
7731
7800
  : module.get.query()
7732
7801
  ),
7733
- results = null,
7734
- escapedTerm = module.escape.string(searchTerm),
7735
- regExpFlags = (settings.ignoreSearchCase ? 'i' : '') + 'gm',
7802
+ results = null,
7803
+ escapedTerm = module.escape.string(searchTerm),
7804
+ regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
7805
+ regExpFlags = regExpIgnore + 'gm',
7736
7806
  beginsWithRegExp = new RegExp('^' + escapedTerm, regExpFlags)
7737
7807
  ;
7808
+ module.remove.filteredItem();
7738
7809
  // avoid loop if we're matching nothing
7739
7810
  if (module.has.query()) {
7740
7811
  results = [];
@@ -7778,12 +7849,34 @@
7778
7849
  ;
7779
7850
  }
7780
7851
  module.debug('Showing only matched items', searchTerm);
7781
- module.remove.filteredItem();
7782
7852
  if (results) {
7783
7853
  $item
7784
7854
  .not(results)
7785
7855
  .addClass(className.filtered)
7786
7856
  ;
7857
+ if (settings.highlightMatches && (settings.match === 'both' || settings.match === 'text')) {
7858
+ var querySplit = query.split(''),
7859
+ diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
7860
+ htmlReg = '(?![^<]*>)',
7861
+ markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
7862
+ markedReplacer = function () {
7863
+ var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
7864
+ return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
7865
+ });
7866
+
7867
+ return args.join('');
7868
+ }
7869
+ ;
7870
+ $.each(results, function (index, result) {
7871
+ var $result = $(result),
7872
+ markedHTML = module.get.choiceText($result, true)
7873
+ ;
7874
+ if (settings.ignoreDiacritics) {
7875
+ markedHTML = markedHTML.normalize('NFD');
7876
+ }
7877
+ $result.html(markedHTML.replace(markedRegExp, markedReplacer));
7878
+ });
7879
+ }
7787
7880
  }
7788
7881
 
7789
7882
  if (!module.has.query()) {
@@ -7819,8 +7912,10 @@
7819
7912
  termLength = term.length,
7820
7913
  queryLength = query.length
7821
7914
  ;
7822
- query = settings.ignoreSearchCase ? query.toLowerCase() : query;
7823
- term = settings.ignoreSearchCase ? term.toLowerCase() : term;
7915
+ if (settings.ignoreSearchCase) {
7916
+ query = query.toLowerCase();
7917
+ term = term.toLowerCase();
7918
+ }
7824
7919
  if (queryLength > termLength) {
7825
7920
  return false;
7826
7921
  }
@@ -8027,7 +8122,7 @@
8027
8122
  if (!itemActivated && !pageLostFocus) {
8028
8123
  if (settings.forceSelection) {
8029
8124
  module.forceSelection();
8030
- } else if (!settings.allowAdditions) {
8125
+ } else if (!settings.allowAdditions && !settings.keepSearchTerm && !module.has.menuSearch()) {
8031
8126
  module.remove.searchTerm();
8032
8127
  }
8033
8128
  module.hide();
@@ -8076,7 +8171,9 @@
8076
8171
  module.set.filtered();
8077
8172
  }
8078
8173
  clearTimeout(module.timer);
8079
- module.timer = setTimeout(function () { module.search(); }, settings.delay.search);
8174
+ module.timer = setTimeout(function () {
8175
+ module.search();
8176
+ }, settings.delay.search);
8080
8177
  },
8081
8178
  label: {
8082
8179
  click: function (event) {
@@ -8253,7 +8350,9 @@
8253
8350
  module.remove.userAddition();
8254
8351
  }
8255
8352
  if (!settings.keepSearchTerm) {
8256
- module.remove.filteredItem();
8353
+ if (module.is.multiple()) {
8354
+ module.remove.filteredItem();
8355
+ }
8257
8356
  module.remove.searchTerm();
8258
8357
  }
8259
8358
  if (!module.is.visible() && $target.length > 0) {
@@ -9427,7 +9526,7 @@
9427
9526
  } else {
9428
9527
  $combo.text(text);
9429
9528
  }
9430
- } else if (settings.action === 'activate') {
9529
+ } else if (settings.action === 'activate' || isFunction(settings.action)) {
9431
9530
  if (text !== module.get.placeholderText() || isNotPlaceholder) {
9432
9531
  $text.removeClass(className.placeholder);
9433
9532
  }
@@ -9487,7 +9586,7 @@
9487
9586
  module.set.scrollPosition($nextValue);
9488
9587
  $selectedItem.removeClass(className.selected);
9489
9588
  $nextValue.addClass(className.selected);
9490
- if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
9589
+ if (settings.selectOnKeydown && module.is.single() && (!$nextItem || !$nextItem.hasClass(className.actionable))) {
9491
9590
  module.set.selectedItem($nextValue);
9492
9591
  }
9493
9592
  }
@@ -9608,19 +9707,27 @@
9608
9707
  $selectedItem = settings.allowAdditions
9609
9708
  ? $selectedItem || module.get.itemWithAdditions(value)
9610
9709
  : $selectedItem || module.get.item(value);
9611
- if (!$selectedItem) {
9710
+ if (!$selectedItem && value !== undefined) {
9612
9711
  return false;
9613
9712
  }
9614
- module.debug('Setting selected menu item to', $selectedItem);
9615
- if (module.is.multiple() && !keepSearchTerm) {
9616
- module.remove.searchWidth();
9617
- }
9618
- if (module.is.single()) {
9713
+ if (isMultiple) {
9714
+ if (!keepSearchTerm) {
9715
+ module.remove.searchWidth();
9716
+ }
9717
+ if (settings.useLabels) {
9718
+ module.remove.selectedItem();
9719
+ if (value === undefined) {
9720
+ module.remove.labels($module.find(selector.label), true);
9721
+ }
9722
+ }
9723
+ } else {
9619
9724
  module.remove.activeItem();
9620
9725
  module.remove.selectedItem();
9621
- } else if (settings.useLabels) {
9622
- module.remove.selectedItem();
9623
9726
  }
9727
+ if (!$selectedItem) {
9728
+ return false;
9729
+ }
9730
+ module.debug('Setting selected menu item to', $selectedItem);
9624
9731
  // select each item
9625
9732
  $selectedItem
9626
9733
  .each(function () {
@@ -9920,6 +10027,12 @@
9920
10027
  $item.removeClass(className.active);
9921
10028
  },
9922
10029
  filteredItem: function () {
10030
+ if (settings.highlightMatches) {
10031
+ $.each($item, function (index, item) {
10032
+ var $markItem = $(item);
10033
+ $markItem.html($markItem.html().replace(/<\/?mark>/g, ''));
10034
+ });
10035
+ }
9923
10036
  if (settings.useLabels && module.has.maxSelections()) {
9924
10037
  return;
9925
10038
  }
@@ -10264,7 +10377,12 @@
10264
10377
  return $selectedMenu.hasClass(className.leftward);
10265
10378
  },
10266
10379
  clearable: function () {
10267
- return $module.hasClass(className.clearable) || settings.clearable;
10380
+ var hasClearableClass = $module.hasClass(className.clearable);
10381
+ if (!hasClearableClass && settings.clearable) {
10382
+ $module.addClass(className.clearable);
10383
+ }
10384
+
10385
+ return hasClearableClass || settings.clearable;
10268
10386
  },
10269
10387
  disabled: function () {
10270
10388
  return $module.hasClass(className.disabled);
@@ -10587,12 +10705,16 @@
10587
10705
  show: function () {
10588
10706
  module.verbose('Delaying show event to ensure user intent');
10589
10707
  clearTimeout(module.timer);
10590
- module.timer = setTimeout(function () { module.show(); }, settings.delay.show);
10708
+ module.timer = setTimeout(function () {
10709
+ module.show();
10710
+ }, settings.delay.show);
10591
10711
  },
10592
10712
  hide: function () {
10593
10713
  module.verbose('Delaying hide event to ensure user intent');
10594
10714
  clearTimeout(module.timer);
10595
- module.timer = setTimeout(function () { module.hide(); }, settings.delay.hide);
10715
+ module.timer = setTimeout(function () {
10716
+ module.hide();
10717
+ }, settings.delay.hide);
10596
10718
  },
10597
10719
  },
10598
10720
 
@@ -10625,6 +10747,7 @@
10625
10747
  return text.replace(regExp.escape, '\\$&');
10626
10748
  },
10627
10749
  htmlEntities: function (string, forceAmpersand) {
10750
+ forceAmpersand = typeof forceAmpersand === 'number' ? false : forceAmpersand;
10628
10751
  var
10629
10752
  badChars = /["'<>`]/g,
10630
10753
  shouldEscape = /["&'<>`]/,
@@ -10641,8 +10764,7 @@
10641
10764
  ;
10642
10765
  if (shouldEscape.test(string)) {
10643
10766
  string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&amp;');
10644
-
10645
- return string.replace(badChars, escapedChar);
10767
+ string = string.replace(badChars, escapedChar);
10646
10768
  }
10647
10769
 
10648
10770
  return string;
@@ -10718,7 +10840,9 @@
10718
10840
  });
10719
10841
  }
10720
10842
  clearTimeout(module.performance.timer);
10721
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
10843
+ module.performance.timer = setTimeout(function () {
10844
+ module.performance.display();
10845
+ }, 500);
10722
10846
  },
10723
10847
  display: function () {
10724
10848
  var
@@ -10845,6 +10969,7 @@
10845
10969
 
10846
10970
  match: 'both', // what to match against with search selection (both, text, or label)
10847
10971
  fullTextSearch: 'exact', // search anywhere in value (set to 'exact' to require exact matches)
10972
+ highlightMatches: false, // Whether search result should highlight matching strings
10848
10973
  ignoreDiacritics: false, // match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
10849
10974
  hideDividers: false, // Whether to hide any divider elements (specified in selector.divider) that are sibling to any items when searched (set to true will hide all dividers, set to 'empty' will hide them when they are not followed by a visible item)
10850
10975
 
@@ -10960,9 +11085,11 @@
10960
11085
  descriptionVertical: 'descriptionVertical', // whether description should be vertical
10961
11086
  value: 'value', // actual dropdown value
10962
11087
  text: 'text', // displayed text when selected
11088
+ data: 'data', // custom data attributes
10963
11089
  type: 'type', // type of dropdown element
10964
11090
  image: 'image', // optional image path
10965
11091
  imageClass: 'imageClass', // optional individual class for image
11092
+ alt: 'alt', // optional alt text for image
10966
11093
  icon: 'icon', // optional icon name
10967
11094
  iconClass: 'iconClass', // optional individual class for icon (for example to use flag instead)
10968
11095
  class: 'class', // optional individual class for item/header
@@ -11069,8 +11196,7 @@
11069
11196
  ;
11070
11197
  if (shouldEscape.test(string)) {
11071
11198
  string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
11072
-
11073
- return string.replace(badChars, escapedChar);
11199
+ string = string.replace(badChars, escapedChar);
11074
11200
  }
11075
11201
 
11076
11202
  return string;
@@ -11105,9 +11231,21 @@
11105
11231
  $.each(values, function (index, option) {
11106
11232
  var
11107
11233
  itemType = option[fields.type] || 'item',
11108
- isMenu = itemType.indexOf('menu') !== -1
11234
+ isMenu = itemType.indexOf('menu') !== -1,
11235
+ maybeData = '',
11236
+ dataObject = option[fields.data]
11109
11237
  ;
11110
-
11238
+ if (dataObject) {
11239
+ var dataKey,
11240
+ dataKeyEscaped
11241
+ ;
11242
+ for (dataKey in dataObject) {
11243
+ dataKeyEscaped = String(dataKey).replace(/\W/g, '');
11244
+ if (Object.prototype.hasOwnProperty.call(dataObject, dataKey) && ['text', 'value'].indexOf(dataKeyEscaped.toLowerCase()) === -1) {
11245
+ maybeData += ' data-' + dataKeyEscaped + '="' + deQuote(String(dataObject[dataKey])) + '"';
11246
+ }
11247
+ }
11248
+ }
11111
11249
  if (itemType === 'item' || isMenu) {
11112
11250
  var
11113
11251
  maybeText = option[fields.text]
@@ -11124,12 +11262,12 @@
11124
11262
  : '',
11125
11263
  hasDescription = escape(option[fields.description] || '', preserveHTML) !== ''
11126
11264
  ;
11127
- html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
11265
+ html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + maybeData + '>';
11128
11266
  if (isMenu) {
11129
11267
  html += '<i class="' + (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
11130
11268
  }
11131
11269
  if (option[fields.image]) {
11132
- html += '<img class="' + deQuote(option[fields.imageClass] || className.image) + '" src="' + deQuote(option[fields.image]) + '">';
11270
+ html += '<img class="' + deQuote(option[fields.imageClass] || className.image) + '" src="' + deQuote(option[fields.image]) + (option[fields.alt] ? '" alt="' + deQuote(option[fields.alt]) : '') + '">';
11133
11271
  }
11134
11272
  if (option[fields.icon]) {
11135
11273
  html += '<i class="' + deQuote(option[fields.icon] + ' ' + (option[fields.iconClass] || className.icon)) + '"></i>';
@@ -11197,7 +11335,7 @@
11197
11335
  })(jQuery, window, document);
11198
11336
 
11199
11337
  /*!
11200
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Embed
11338
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Embed
11201
11339
  * https://github.com/fomantic/Fomantic-UI/
11202
11340
  *
11203
11341
  *
@@ -11317,11 +11455,12 @@
11317
11455
 
11318
11456
  createPlaceholder: function (placeholder) {
11319
11457
  var
11320
- icon = module.get.icon()
11458
+ icon = module.get.icon(),
11459
+ alt = module.get.alt()
11321
11460
  ;
11322
11461
  placeholder = placeholder || module.get.placeholder();
11323
- $module.html(templates.placeholder(placeholder, icon));
11324
- module.debug('Creating placeholder for embed', placeholder, icon);
11462
+ $module.html(templates.placeholder(placeholder, icon, alt));
11463
+ module.debug('Creating placeholder for embed', placeholder, icon, alt);
11325
11464
  },
11326
11465
 
11327
11466
  createEmbed: function (url) {
@@ -11401,6 +11540,9 @@
11401
11540
  placeholder: function () {
11402
11541
  return settings.placeholder || $module.data(metadata.placeholder);
11403
11542
  },
11543
+ alt: function () {
11544
+ return settings.alt || $module.data(metadata.alt);
11545
+ },
11404
11546
  icon: function () {
11405
11547
  return settings.icon || ($module.data(metadata.icon) !== undefined
11406
11548
  ? $module.data(metadata.icon)
@@ -11486,6 +11628,7 @@
11486
11628
  .removeData(metadata.id)
11487
11629
  .removeData(metadata.icon)
11488
11630
  .removeData(metadata.placeholder)
11631
+ .removeData(metadata.alt)
11489
11632
  .removeData(metadata.source)
11490
11633
  .removeData(metadata.url)
11491
11634
  ;
@@ -11638,7 +11781,9 @@
11638
11781
  });
11639
11782
  }
11640
11783
  clearTimeout(module.performance.timer);
11641
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
11784
+ module.performance.timer = setTimeout(function () {
11785
+ module.performance.display();
11786
+ }, 500);
11642
11787
  },
11643
11788
  display: function () {
11644
11789
  var
@@ -11753,6 +11898,8 @@
11753
11898
  source: false,
11754
11899
  url: false,
11755
11900
  id: false,
11901
+ placeholder: false,
11902
+ alt: false,
11756
11903
 
11757
11904
  // standard video settings
11758
11905
  autoplay: 'auto',
@@ -11775,6 +11922,7 @@
11775
11922
  id: 'id',
11776
11923
  icon: 'icon',
11777
11924
  placeholder: 'placeholder',
11925
+ alt: 'alt',
11778
11926
  source: 'source',
11779
11927
  url: 'url',
11780
11928
  },
@@ -11850,7 +11998,7 @@
11850
11998
  + ' width="100%" height="100%"'
11851
11999
  + ' msallowFullScreen allowFullScreen></iframe>';
11852
12000
  },
11853
- placeholder: function (image, icon) {
12001
+ placeholder: function (image, icon, alt) {
11854
12002
  var
11855
12003
  html = '',
11856
12004
  deQuote = $.fn.embed.settings.templates.deQuote
@@ -11859,7 +12007,7 @@
11859
12007
  html += '<i class="' + deQuote(icon) + ' icon"></i>';
11860
12008
  }
11861
12009
  if (image) {
11862
- html += '<img class="placeholder" src="' + deQuote(image) + '">';
12010
+ html += '<img class="placeholder" src="' + deQuote(image) + (alt ? '" alt="' + deQuote(alt) : '') + '">';
11863
12011
  }
11864
12012
 
11865
12013
  return html;
@@ -11876,7 +12024,7 @@
11876
12024
  })(jQuery, window, document);
11877
12025
 
11878
12026
  /*!
11879
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Flyout
12027
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Flyout
11880
12028
  * https://github.com/fomantic/Fomantic-UI/
11881
12029
  *
11882
12030
  *
@@ -13096,7 +13244,9 @@
13096
13244
  });
13097
13245
  }
13098
13246
  clearTimeout(module.performance.timer);
13099
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
13247
+ module.performance.timer = setTimeout(function () {
13248
+ module.performance.display();
13249
+ }, 500);
13100
13250
  },
13101
13251
  display: function () {
13102
13252
  var
@@ -13426,7 +13576,7 @@
13426
13576
  })(jQuery, window, document);
13427
13577
 
13428
13578
  /*!
13429
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Modal
13579
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Modal
13430
13580
  * https://github.com/fomantic/Fomantic-UI/
13431
13581
  *
13432
13582
  *
@@ -13954,7 +14104,9 @@
13954
14104
  },
13955
14105
  debounce: function (method, delay) {
13956
14106
  clearTimeout(module.timer);
13957
- module.timer = setTimeout(function () { method(); }, delay);
14107
+ module.timer = setTimeout(function () {
14108
+ method();
14109
+ }, delay);
13958
14110
  },
13959
14111
  keyboard: function (event) {
13960
14112
  var
@@ -14700,7 +14852,9 @@
14700
14852
  });
14701
14853
  }
14702
14854
  clearTimeout(module.performance.timer);
14703
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
14855
+ module.performance.timer = setTimeout(function () {
14856
+ module.performance.display();
14857
+ }, 500);
14704
14858
  },
14705
14859
  display: function () {
14706
14860
  var
@@ -15060,7 +15214,7 @@
15060
15214
  })(jQuery, window, document);
15061
15215
 
15062
15216
  /*!
15063
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Nag
15217
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Nag
15064
15218
  * https://github.com/fomantic/Fomantic-UI/
15065
15219
  *
15066
15220
  *
@@ -15149,7 +15303,9 @@
15149
15303
  }
15150
15304
 
15151
15305
  if (settings.displayTime > 0) {
15152
- setTimeout(function () { module.hide(); }, settings.displayTime);
15306
+ setTimeout(function () {
15307
+ module.hide();
15308
+ }, settings.displayTime);
15153
15309
  }
15154
15310
  module.show();
15155
15311
  },
@@ -15205,8 +15361,10 @@
15205
15361
  module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
15206
15362
  module.storage.set(settings.key, settings.value);
15207
15363
  }
15208
- event.stopImmediatePropagation();
15209
- event.preventDefault();
15364
+ if (event) {
15365
+ event.stopImmediatePropagation();
15366
+ event.preventDefault();
15367
+ }
15210
15368
  },
15211
15369
 
15212
15370
  should: {
@@ -15438,7 +15596,9 @@
15438
15596
  });
15439
15597
  }
15440
15598
  clearTimeout(module.performance.timer);
15441
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
15599
+ module.performance.timer = setTimeout(function () {
15600
+ module.performance.display();
15601
+ }, 500);
15442
15602
  },
15443
15603
  display: function () {
15444
15604
  var
@@ -15621,7 +15781,7 @@
15621
15781
  })(jQuery, window, document);
15622
15782
 
15623
15783
  /*!
15624
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Popup
15784
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Popup
15625
15785
  * https://github.com/fomantic/Fomantic-UI/
15626
15786
  *
15627
15787
  *
@@ -15816,7 +15976,9 @@
15816
15976
  ;
15817
15977
  clearTimeout(module.hideTimer);
15818
15978
  if (!openedWithTouch || (openedWithTouch && settings.addTouchEvents)) {
15819
- module.showTimer = setTimeout(function () { module.show(); }, delay);
15979
+ module.showTimer = setTimeout(function () {
15980
+ module.show();
15981
+ }, delay);
15820
15982
  }
15821
15983
  },
15822
15984
  end: function () {
@@ -15826,7 +15988,9 @@
15826
15988
  : settings.delay
15827
15989
  ;
15828
15990
  clearTimeout(module.showTimer);
15829
- module.hideTimer = setTimeout(function () { module.hide(); }, delay);
15991
+ module.hideTimer = setTimeout(function () {
15992
+ module.hide();
15993
+ }, delay);
15830
15994
  },
15831
15995
  touchstart: function (event) {
15832
15996
  openedWithTouch = true;
@@ -16866,7 +17030,9 @@
16866
17030
  });
16867
17031
  }
16868
17032
  clearTimeout(module.performance.timer);
16869
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
17033
+ module.performance.timer = setTimeout(function () {
17034
+ module.performance.display();
17035
+ }, 500);
16870
17036
  },
16871
17037
  display: function () {
16872
17038
  var
@@ -17177,7 +17343,7 @@
17177
17343
  })(jQuery, window, document);
17178
17344
 
17179
17345
  /*!
17180
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Progress
17346
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Progress
17181
17347
  * https://github.com/fomantic/Fomantic-UI/
17182
17348
  *
17183
17349
  *
@@ -17969,7 +18135,9 @@
17969
18135
  });
17970
18136
  }
17971
18137
  clearTimeout(module.performance.timer);
17972
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
18138
+ module.performance.timer = setTimeout(function () {
18139
+ module.performance.display();
18140
+ }, 500);
17973
18141
  },
17974
18142
  display: function () {
17975
18143
  var
@@ -18155,7 +18323,7 @@
18155
18323
  })(jQuery, window, document);
18156
18324
 
18157
18325
  /*!
18158
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Slider
18326
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Slider
18159
18327
  * https://github.com/fomantic/Fomantic-UI/
18160
18328
  *
18161
18329
  *
@@ -19423,7 +19591,9 @@
19423
19591
  });
19424
19592
  }
19425
19593
  clearTimeout(module.performance.timer);
19426
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
19594
+ module.performance.timer = setTimeout(function () {
19595
+ module.performance.display();
19596
+ }, 500);
19427
19597
  },
19428
19598
  display: function () {
19429
19599
  var
@@ -19604,7 +19774,7 @@
19604
19774
  })(jQuery, window, document);
19605
19775
 
19606
19776
  /*!
19607
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Rating
19777
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Rating
19608
19778
  * https://github.com/fomantic/Fomantic-UI/
19609
19779
  *
19610
19780
  *
@@ -19973,7 +20143,9 @@
19973
20143
  });
19974
20144
  }
19975
20145
  clearTimeout(module.performance.timer);
19976
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
20146
+ module.performance.timer = setTimeout(function () {
20147
+ module.performance.display();
20148
+ }, 500);
19977
20149
  },
19978
20150
  display: function () {
19979
20151
  var
@@ -20143,7 +20315,7 @@
20143
20315
  })(jQuery, window, document);
20144
20316
 
20145
20317
  /*!
20146
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Search
20318
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Search
20147
20319
  * https://github.com/fomantic/Fomantic-UI/
20148
20320
  *
20149
20321
  *
@@ -20279,7 +20451,10 @@
20279
20451
  // this makes sure $.extend does not add specified search fields to default fields
20280
20452
  // this is the only setting which should not extend defaults
20281
20453
  if (parameters && parameters.searchFields !== undefined) {
20282
- settings.searchFields = parameters.searchFields;
20454
+ settings.searchFields = Array.isArray(parameters.searchFields)
20455
+ ? parameters.searchFields
20456
+ : [parameters.searchFields]
20457
+ ;
20283
20458
  }
20284
20459
  },
20285
20460
  },
@@ -20313,7 +20488,9 @@
20313
20488
  callback = function () {
20314
20489
  module.cancel.query();
20315
20490
  module.remove.focus();
20316
- module.timer = setTimeout(function () { module.hideResults(); }, settings.hideDelay);
20491
+ module.timer = setTimeout(function () {
20492
+ module.hideResults();
20493
+ }, settings.hideDelay);
20317
20494
  }
20318
20495
  ;
20319
20496
  if (pageLostFocus) {
@@ -20773,7 +20950,7 @@
20773
20950
  exactResults = [],
20774
20951
  fuzzyResults = [],
20775
20952
  searchExp = searchTerm.replace(regExp.escape, '\\$&'),
20776
- matchRegExp = new RegExp(regExp.beginsWith + searchExp, 'i'),
20953
+ matchRegExp = new RegExp(regExp.beginsWith + searchExp, settings.ignoreSearchCase ? 'i' : ''),
20777
20954
 
20778
20955
  // avoid duplicates when pushing results
20779
20956
  addResult = function (array, result) {
@@ -20809,13 +20986,14 @@
20809
20986
  var concatenatedContent = [];
20810
20987
  $.each(searchFields, function (index, field) {
20811
20988
  var
20812
- fieldExists = (typeof content[field] === 'string') || (typeof content[field] === 'number')
20989
+ fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
20813
20990
  ;
20814
20991
  if (fieldExists) {
20815
20992
  var text;
20816
20993
  text = typeof content[field] === 'string'
20817
20994
  ? module.remove.diacritics(content[field])
20818
20995
  : content[field].toString();
20996
+ text = $('<div/>', { html: text }).text().trim();
20819
20997
  if (settings.fullTextSearch === 'all') {
20820
20998
  concatenatedContent.push(text);
20821
20999
  if (index < lastSearchFieldIndex) {
@@ -20846,8 +21024,10 @@
20846
21024
  },
20847
21025
  },
20848
21026
  exactSearch: function (query, term) {
20849
- query = query.toLowerCase();
20850
- term = term.toLowerCase();
21027
+ if (settings.ignoreSearchCase) {
21028
+ query = query.toLowerCase();
21029
+ term = term.toLowerCase();
21030
+ }
20851
21031
 
20852
21032
  return term.indexOf(query) > -1;
20853
21033
  },
@@ -20874,8 +21054,10 @@
20874
21054
  if (typeof query !== 'string') {
20875
21055
  return false;
20876
21056
  }
20877
- query = query.toLowerCase();
20878
- term = term.toLowerCase();
21057
+ if (settings.ignoreSearchCase) {
21058
+ query = query.toLowerCase();
21059
+ term = term.toLowerCase();
21060
+ }
20879
21061
  if (queryLength > termLength) {
20880
21062
  return false;
20881
21063
  }
@@ -21230,6 +21412,39 @@
21230
21412
  response[fields.results] = response[fields.results].slice(0, settings.maxResults);
21231
21413
  }
21232
21414
  }
21415
+ if (settings.highlightMatches) {
21416
+ var results = response[fields.results],
21417
+ regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
21418
+ querySplit = module.get.value().split(''),
21419
+ diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
21420
+ htmlReg = '(?![^<]*>)',
21421
+ markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
21422
+ markedReplacer = function () {
21423
+ var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
21424
+ return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
21425
+ });
21426
+
21427
+ return args.join('');
21428
+ }
21429
+ ;
21430
+ $.each(results, function (label, content) {
21431
+ $.each(settings.searchFields, function (index, field) {
21432
+ var
21433
+ fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
21434
+ ;
21435
+ if (fieldExists) {
21436
+ var markedHTML = typeof content[field] === 'string'
21437
+ ? content[field]
21438
+ : content[field].toString();
21439
+ if (settings.ignoreDiacritics) {
21440
+ markedHTML = markedHTML.normalize('NFD');
21441
+ }
21442
+ markedHTML = markedHTML.replace(/<\/?mark>/g, '');
21443
+ response[fields.results][label][field] = markedHTML.replace(markedRegExp, markedReplacer);
21444
+ }
21445
+ });
21446
+ });
21447
+ }
21233
21448
  if (isFunction(template)) {
21234
21449
  html = template(response, fields, settings.preserveHTML);
21235
21450
  } else {
@@ -21315,7 +21530,9 @@
21315
21530
  });
21316
21531
  }
21317
21532
  clearTimeout(module.performance.timer);
21318
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
21533
+ module.performance.timer = setTimeout(function () {
21534
+ module.performance.display();
21535
+ }, 500);
21319
21536
  },
21320
21537
  display: function () {
21321
21538
  var
@@ -21456,9 +21673,15 @@
21456
21673
  // search anywhere in value (set to 'exact' to require exact matches
21457
21674
  fullTextSearch: 'exact',
21458
21675
 
21676
+ // Whether search result should highlight matching strings
21677
+ highlightMatches: false,
21678
+
21459
21679
  // match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
21460
21680
  ignoreDiacritics: false,
21461
21681
 
21682
+ // whether to consider case sensitivity on local searching
21683
+ ignoreSearchCase: true,
21684
+
21462
21685
  // whether to add events to prompt automatically
21463
21686
  automatic: true,
21464
21687
 
@@ -21537,6 +21760,7 @@
21537
21760
  categoryResults: 'results', // array of results (category view)
21538
21761
  description: 'description', // result description
21539
21762
  image: 'image', // result image
21763
+ alt: 'alt', // result alt text for image
21540
21764
  price: 'price', // result price
21541
21765
  results: 'results', // array of results (standard)
21542
21766
  title: 'title', // result title
@@ -21576,8 +21800,9 @@
21576
21800
  };
21577
21801
  if (shouldEscape.test(string)) {
21578
21802
  string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
21579
-
21580
- return string.replace(badChars, escapedChar);
21803
+ string = string.replace(badChars, escapedChar);
21804
+ // FUI controlled HTML is still allowed
21805
+ string = string.replace(/&lt;(\/)*mark&gt;/g, '<$1mark>');
21581
21806
  }
21582
21807
 
21583
21808
  return string;
@@ -21623,7 +21848,7 @@
21623
21848
  if (result[fields.image] !== undefined) {
21624
21849
  html += ''
21625
21850
  + '<div class="image">'
21626
- + ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
21851
+ + ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
21627
21852
  + '</div>';
21628
21853
  }
21629
21854
  html += '<div class="content">';
@@ -21676,7 +21901,7 @@
21676
21901
  if (result[fields.image] !== undefined) {
21677
21902
  html += ''
21678
21903
  + '<div class="image">'
21679
- + ' <img src="' + result[fields.image].replace(/"/g, '') + '">'
21904
+ + ' <img src="' + result[fields.image].replace(/"/g, '') + (result[fields.alt] ? '" alt="' + result[fields.alt].replace(/"/g, '') : '') + '">'
21680
21905
  + '</div>';
21681
21906
  }
21682
21907
  html += '<div class="content">';
@@ -21721,7 +21946,7 @@
21721
21946
  })(jQuery, window, document);
21722
21947
 
21723
21948
  /*!
21724
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Shape
21949
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Shape
21725
21950
  * https://github.com/fomantic/Fomantic-UI/
21726
21951
  *
21727
21952
  *
@@ -21907,7 +22132,7 @@
21907
22132
  set: {
21908
22133
 
21909
22134
  defaultSide: function () {
21910
- $activeSide = $side.filter('.' + settings.className.active);
22135
+ $activeSide = $side.filter('.' + className.active);
21911
22136
  $nextSide = $activeSide.next(selector.side).length > 0
21912
22137
  ? $activeSide.next(selector.side)
21913
22138
  : $side.first();
@@ -21933,7 +22158,7 @@
21933
22158
 
21934
22159
  currentStageSize: function () {
21935
22160
  var
21936
- $activeSide = $side.filter('.' + settings.className.active),
22161
+ $activeSide = $side.filter('.' + className.active),
21937
22162
  width = $activeSide.outerWidth(true),
21938
22163
  height = $activeSide.outerHeight(true)
21939
22164
  ;
@@ -21949,7 +22174,7 @@
21949
22174
  var
21950
22175
  $clone = $module.clone().addClass(className.loading),
21951
22176
  $side = $clone.find('>' + selector.sides + '>' + selector.side),
21952
- $activeSide = $side.filter('.' + settings.className.active),
22177
+ $activeSide = $side.filter('.' + className.active),
21953
22178
  $nextSide = nextIndex
21954
22179
  ? $side.eq(nextIndex)
21955
22180
  : ($activeSide.next(selector.side).length > 0
@@ -22345,7 +22570,9 @@
22345
22570
  });
22346
22571
  }
22347
22572
  clearTimeout(module.performance.timer);
22348
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
22573
+ module.performance.timer = setTimeout(function () {
22574
+ module.performance.display();
22575
+ }, 500);
22349
22576
  },
22350
22577
  display: function () {
22351
22578
  var
@@ -22517,7 +22744,7 @@
22517
22744
  })(jQuery, window, document);
22518
22745
 
22519
22746
  /*!
22520
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Sidebar
22747
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Sidebar
22521
22748
  * https://github.com/fomantic/Fomantic-UI/
22522
22749
  *
22523
22750
  *
@@ -23389,7 +23616,9 @@
23389
23616
  });
23390
23617
  }
23391
23618
  clearTimeout(module.performance.timer);
23392
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
23619
+ module.performance.timer = setTimeout(function () {
23620
+ module.performance.display();
23621
+ }, 500);
23393
23622
  },
23394
23623
  display: function () {
23395
23624
  var
@@ -23570,7 +23799,7 @@
23570
23799
  })(jQuery, window, document);
23571
23800
 
23572
23801
  /*!
23573
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Sticky
23802
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Sticky
23574
23803
  * https://github.com/fomantic/Fomantic-UI/
23575
23804
  *
23576
23805
  *
@@ -24317,7 +24546,9 @@
24317
24546
  });
24318
24547
  }
24319
24548
  clearTimeout(module.performance.timer);
24320
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 0);
24549
+ module.performance.timer = setTimeout(function () {
24550
+ module.performance.display();
24551
+ }, 0);
24321
24552
  },
24322
24553
  display: function () {
24323
24554
  var
@@ -24486,7 +24717,7 @@
24486
24717
  })(jQuery, window, document);
24487
24718
 
24488
24719
  /*!
24489
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Tab
24720
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Tab
24490
24721
  * https://github.com/fomantic/Fomantic-UI/
24491
24722
  *
24492
24723
  *
@@ -25275,7 +25506,9 @@
25275
25506
  });
25276
25507
  }
25277
25508
  clearTimeout(module.performance.timer);
25278
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
25509
+ module.performance.timer = setTimeout(function () {
25510
+ module.performance.display();
25511
+ }, 500);
25279
25512
  },
25280
25513
  display: function () {
25281
25514
  var
@@ -25452,7 +25685,7 @@
25452
25685
  })(jQuery, window, document);
25453
25686
 
25454
25687
  /*!
25455
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Toast
25688
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Toast
25456
25689
  * https://github.com/fomantic/Fomantic-UI/
25457
25690
  *
25458
25691
  *
@@ -25636,6 +25869,7 @@
25636
25869
  $toast.append($('<img>', {
25637
25870
  class: className.image + ' ' + settings.classImage,
25638
25871
  src: settings.showImage,
25872
+ alt: settings.alt || '',
25639
25873
  }));
25640
25874
  }
25641
25875
  if (settings.title !== '') {
@@ -25681,7 +25915,7 @@
25681
25915
  $toast.find(selector.icon).attr('class', iconClass + ' ' + className.icon);
25682
25916
  }
25683
25917
  if (settings.showImage) {
25684
- $toast.find(selector.image).attr('src', settings.showImage);
25918
+ $toast.find(selector.image).attr('src', settings.showImage).attr('alt', settings.alt || '');
25685
25919
  }
25686
25920
  if (settings.title !== '') {
25687
25921
  $toast.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML));
@@ -26155,7 +26389,9 @@
26155
26389
  });
26156
26390
  }
26157
26391
  clearTimeout(module.performance.timer);
26158
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
26392
+ module.performance.timer = setTimeout(function () {
26393
+ module.performance.display();
26394
+ }, 500);
26159
26395
  },
26160
26396
  display: function () {
26161
26397
  var
@@ -26292,6 +26528,7 @@
26292
26528
  actions: false,
26293
26529
  preserveHTML: true,
26294
26530
  showImage: false,
26531
+ alt: false,
26295
26532
 
26296
26533
  // transition settings
26297
26534
  transition: {
@@ -26413,7 +26650,7 @@
26413
26650
  })(jQuery, window, document);
26414
26651
 
26415
26652
  /*!
26416
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Transition
26653
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Transition
26417
26654
  * https://github.com/fomantic/Fomantic-UI/
26418
26655
  *
26419
26656
  *
@@ -26556,7 +26793,9 @@
26556
26793
  ? ($allModules.length - index) * interval
26557
26794
  : index * interval;
26558
26795
  module.debug('Delaying animation by', delay);
26559
- setTimeout(function () { module.animate(); }, delay);
26796
+ setTimeout(function () {
26797
+ module.animate();
26798
+ }, delay);
26560
26799
  },
26561
26800
 
26562
26801
  animate: function (overrideSettings) {
@@ -27263,7 +27502,9 @@
27263
27502
  });
27264
27503
  }
27265
27504
  clearTimeout(module.performance.timer);
27266
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
27505
+ module.performance.timer = setTimeout(function () {
27506
+ module.performance.display();
27507
+ }, 500);
27267
27508
  },
27268
27509
  display: function () {
27269
27510
  var
@@ -27444,7 +27685,7 @@
27444
27685
  })(jQuery, window, document);
27445
27686
 
27446
27687
  /*!
27447
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - API
27688
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - API
27448
27689
  * https://github.com/fomantic/Fomantic-UI/
27449
27690
  *
27450
27691
  *
@@ -28092,7 +28333,9 @@
28092
28333
  module.debug('Adding error state');
28093
28334
  module.set.error();
28094
28335
  if (module.should.removeError()) {
28095
- setTimeout(function () { module.remove.error(); }, settings.errorDuration);
28336
+ setTimeout(function () {
28337
+ module.remove.error();
28338
+ }, settings.errorDuration);
28096
28339
  }
28097
28340
  }
28098
28341
  module.debug('API Request failed', errorMessage, xhr);
@@ -28416,7 +28659,9 @@
28416
28659
  });
28417
28660
  }
28418
28661
  clearTimeout(module.performance.timer);
28419
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
28662
+ module.performance.timer = setTimeout(function () {
28663
+ module.performance.display();
28664
+ }, 500);
28420
28665
  },
28421
28666
  display: function () {
28422
28667
  var
@@ -28666,7 +28911,7 @@
28666
28911
  })(jQuery, window, document);
28667
28912
 
28668
28913
  /*!
28669
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - State
28914
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - State
28670
28915
  * https://github.com/fomantic/Fomantic-UI/
28671
28916
  *
28672
28917
  *
@@ -29149,7 +29394,9 @@
29149
29394
  });
29150
29395
  }
29151
29396
  clearTimeout(module.performance.timer);
29152
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
29397
+ module.performance.timer = setTimeout(function () {
29398
+ module.performance.display();
29399
+ }, 500);
29153
29400
  },
29154
29401
  display: function () {
29155
29402
  var
@@ -29362,7 +29609,7 @@
29362
29609
  })(jQuery, window, document);
29363
29610
 
29364
29611
  /*!
29365
- * # Fomantic-UI 2.9.4-beta.7+74bca06 - Visibility
29612
+ * # Fomantic-UI 2.9.4-beta.70+6ca9e03 - Visibility
29366
29613
  * https://github.com/fomantic/Fomantic-UI/
29367
29614
  *
29368
29615
  *
@@ -30451,7 +30698,9 @@
30451
30698
  });
30452
30699
  }
30453
30700
  clearTimeout(module.performance.timer);
30454
- module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
30701
+ module.performance.timer = setTimeout(function () {
30702
+ module.performance.display();
30703
+ }, 500);
30455
30704
  },
30456
30705
  display: function () {
30457
30706
  var