fomantic-ui 2.9.2-beta.0 → 2.9.2-beta.10

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 (220) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/dist/components/accordion.css +1 -1
  3. package/dist/components/accordion.js +4 -4
  4. package/dist/components/accordion.min.css +1 -1
  5. package/dist/components/accordion.min.js +2 -2
  6. package/dist/components/ad.css +2 -2
  7. package/dist/components/ad.min.css +1 -1
  8. package/dist/components/api.js +1 -1
  9. package/dist/components/api.min.js +1 -1
  10. package/dist/components/breadcrumb.css +1 -1
  11. package/dist/components/breadcrumb.min.css +1 -1
  12. package/dist/components/button.css +1 -1
  13. package/dist/components/button.min.css +1 -1
  14. package/dist/components/calendar.css +7 -1
  15. package/dist/components/calendar.js +1 -1
  16. package/dist/components/calendar.min.css +1 -1
  17. package/dist/components/calendar.min.js +1 -1
  18. package/dist/components/card.css +2 -2
  19. package/dist/components/card.min.css +1 -1
  20. package/dist/components/checkbox.css +40 -40
  21. package/dist/components/checkbox.js +1 -1
  22. package/dist/components/checkbox.min.css +2 -2
  23. package/dist/components/checkbox.min.js +1 -1
  24. package/dist/components/comment.css +2 -2
  25. package/dist/components/comment.min.css +1 -1
  26. package/dist/components/container.css +1 -1
  27. package/dist/components/container.min.css +1 -1
  28. package/dist/components/dimmer.css +1 -1
  29. package/dist/components/dimmer.js +3 -3
  30. package/dist/components/dimmer.min.css +1 -1
  31. package/dist/components/dimmer.min.js +2 -2
  32. package/dist/components/divider.css +1 -1
  33. package/dist/components/divider.min.css +1 -1
  34. package/dist/components/dropdown.css +8 -6
  35. package/dist/components/dropdown.js +3 -3
  36. package/dist/components/dropdown.min.css +2 -2
  37. package/dist/components/dropdown.min.js +2 -2
  38. package/dist/components/embed.css +2 -2
  39. package/dist/components/embed.js +2 -2
  40. package/dist/components/embed.min.css +2 -2
  41. package/dist/components/embed.min.js +2 -2
  42. package/dist/components/emoji.css +6 -0
  43. package/dist/components/feed.css +2 -2
  44. package/dist/components/feed.min.css +1 -1
  45. package/dist/components/flag.css +1 -1
  46. package/dist/components/flag.min.css +1 -1
  47. package/dist/components/flyout.css +7 -1
  48. package/dist/components/flyout.js +18 -30
  49. package/dist/components/flyout.min.css +1 -1
  50. package/dist/components/flyout.min.js +2 -2
  51. package/dist/components/form.css +66 -37
  52. package/dist/components/form.js +102 -94
  53. package/dist/components/form.min.css +2 -2
  54. package/dist/components/form.min.js +2 -2
  55. package/dist/components/grid.css +1 -1
  56. package/dist/components/grid.min.css +1 -1
  57. package/dist/components/header.css +1 -1
  58. package/dist/components/header.min.css +1 -1
  59. package/dist/components/icon.css +1 -1
  60. package/dist/components/icon.min.css +1 -1
  61. package/dist/components/image.css +1 -1
  62. package/dist/components/image.min.css +1 -1
  63. package/dist/components/input.css +59 -25
  64. package/dist/components/input.min.css +2 -2
  65. package/dist/components/item.css +3 -3
  66. package/dist/components/item.min.css +2 -2
  67. package/dist/components/label.css +1 -1
  68. package/dist/components/label.min.css +1 -1
  69. package/dist/components/list.css +2 -2
  70. package/dist/components/list.min.css +1 -1
  71. package/dist/components/loader.css +1 -1
  72. package/dist/components/loader.min.css +1 -1
  73. package/dist/components/menu.css +31 -7
  74. package/dist/components/menu.min.css +9 -1
  75. package/dist/components/message.css +2 -2
  76. package/dist/components/message.min.css +1 -1
  77. package/dist/components/modal.css +1 -1
  78. package/dist/components/modal.js +15 -8
  79. package/dist/components/modal.min.css +1 -1
  80. package/dist/components/modal.min.js +2 -2
  81. package/dist/components/nag.css +1 -1
  82. package/dist/components/nag.js +1 -1
  83. package/dist/components/nag.min.css +1 -1
  84. package/dist/components/nag.min.js +1 -1
  85. package/dist/components/placeholder.css +7 -1
  86. package/dist/components/placeholder.min.css +1 -1
  87. package/dist/components/popup.css +148 -3
  88. package/dist/components/popup.js +20 -8
  89. package/dist/components/popup.min.css +2 -2
  90. package/dist/components/popup.min.js +2 -2
  91. package/dist/components/progress.css +1 -1
  92. package/dist/components/progress.js +3 -29
  93. package/dist/components/progress.min.css +1 -1
  94. package/dist/components/progress.min.js +2 -2
  95. package/dist/components/rail.css +1 -1
  96. package/dist/components/rail.min.css +1 -1
  97. package/dist/components/rating.css +1 -1
  98. package/dist/components/rating.js +1 -1
  99. package/dist/components/rating.min.css +1 -1
  100. package/dist/components/rating.min.js +1 -1
  101. package/dist/components/reset.css +1 -1
  102. package/dist/components/reset.min.css +1 -1
  103. package/dist/components/reveal.css +1 -1
  104. package/dist/components/reveal.min.css +1 -1
  105. package/dist/components/search.css +1 -1
  106. package/dist/components/search.js +2 -2
  107. package/dist/components/search.min.css +1 -1
  108. package/dist/components/search.min.js +2 -2
  109. package/dist/components/segment.css +3 -3
  110. package/dist/components/segment.min.css +2 -2
  111. package/dist/components/shape.css +1 -1
  112. package/dist/components/shape.js +15 -37
  113. package/dist/components/shape.min.css +1 -1
  114. package/dist/components/shape.min.js +2 -2
  115. package/dist/components/sidebar.css +1 -1
  116. package/dist/components/sidebar.js +7 -27
  117. package/dist/components/sidebar.min.css +1 -1
  118. package/dist/components/sidebar.min.js +2 -2
  119. package/dist/components/site.css +1 -10
  120. package/dist/components/site.js +1 -1
  121. package/dist/components/site.min.css +2 -2
  122. package/dist/components/site.min.js +1 -1
  123. package/dist/components/slider.css +6 -0
  124. package/dist/components/slider.js +1 -1
  125. package/dist/components/slider.min.js +1 -1
  126. package/dist/components/state.js +1 -1
  127. package/dist/components/state.min.js +1 -1
  128. package/dist/components/statistic.css +2 -2
  129. package/dist/components/statistic.min.css +1 -1
  130. package/dist/components/step.css +4 -4
  131. package/dist/components/step.min.css +2 -2
  132. package/dist/components/sticky.css +1 -1
  133. package/dist/components/sticky.js +1 -1
  134. package/dist/components/sticky.min.css +1 -1
  135. package/dist/components/sticky.min.js +1 -1
  136. package/dist/components/tab.css +1 -1
  137. package/dist/components/tab.js +1 -1
  138. package/dist/components/tab.min.css +1 -1
  139. package/dist/components/tab.min.js +1 -1
  140. package/dist/components/table.css +2 -2
  141. package/dist/components/table.min.css +2 -2
  142. package/dist/components/text.css +7 -1
  143. package/dist/components/text.min.css +1 -1
  144. package/dist/components/toast.css +7 -1
  145. package/dist/components/toast.js +3 -3
  146. package/dist/components/toast.min.css +1 -1
  147. package/dist/components/toast.min.js +2 -2
  148. package/dist/components/transition.css +1 -1
  149. package/dist/components/transition.js +10 -61
  150. package/dist/components/transition.min.css +1 -1
  151. package/dist/components/transition.min.js +2 -2
  152. package/dist/components/visibility.js +1 -1
  153. package/dist/components/visibility.min.js +1 -1
  154. package/dist/semantic.css +512 -196
  155. package/dist/semantic.js +220 -324
  156. package/dist/semantic.min.css +2 -2
  157. package/dist/semantic.min.js +2 -2
  158. package/package.json +1 -1
  159. package/src/_site/collections/breadcrumb.variables +1 -1
  160. package/src/_site/collections/message.overrides +1 -1
  161. package/src/_site/elements/emoji.overrides +3 -0
  162. package/src/_site/{modules/chatroom.variables → elements/emoji.variables} +0 -0
  163. package/src/_site/elements/flag.variables +3 -3
  164. package/src/_site/elements/list.overrides +1 -1
  165. package/src/_site/elements/placeholder.overrides +3 -0
  166. package/src/_site/elements/placeholder.variables +3 -0
  167. package/src/_site/elements/text.overrides +3 -0
  168. package/src/_site/elements/text.variables +3 -0
  169. package/src/_site/modules/{chatroom.overrides → calendar.overrides} +0 -0
  170. package/src/_site/modules/calendar.variables +3 -0
  171. package/src/_site/modules/flyout.overrides +3 -0
  172. package/src/_site/modules/flyout.variables +3 -0
  173. package/src/_site/modules/modal.variables +1 -1
  174. package/src/_site/modules/rating.variables +1 -1
  175. package/src/_site/modules/search.variables +1 -1
  176. package/src/_site/modules/sidebar.variables +1 -1
  177. package/src/_site/modules/slider.overrides +3 -0
  178. package/src/_site/modules/slider.variables +3 -0
  179. package/src/_site/modules/sticky.variables +1 -1
  180. package/src/_site/modules/toast.overrides +3 -0
  181. package/src/_site/modules/toast.variables +3 -0
  182. package/src/_site/views/ad.overrides +1 -1
  183. package/src/_site/views/card.overrides +1 -1
  184. package/src/_site/views/comment.overrides +1 -1
  185. package/src/_site/views/feed.overrides +1 -1
  186. package/src/_site/views/item.overrides +1 -1
  187. package/src/_site/views/statistic.overrides +1 -1
  188. package/src/definitions/behaviors/form.js +101 -93
  189. package/src/definitions/collections/form.less +4 -14
  190. package/src/definitions/collections/menu.less +39 -6
  191. package/src/definitions/elements/input.less +6 -20
  192. package/src/definitions/globals/site.less +0 -18
  193. package/src/definitions/modules/accordion.js +3 -3
  194. package/src/definitions/modules/checkbox.less +39 -39
  195. package/src/definitions/modules/dimmer.js +2 -2
  196. package/src/definitions/modules/dropdown.js +2 -2
  197. package/src/definitions/modules/dropdown.less +6 -10
  198. package/src/definitions/modules/embed.js +1 -1
  199. package/src/definitions/modules/embed.less +1 -1
  200. package/src/definitions/modules/flyout.js +17 -29
  201. package/src/definitions/modules/modal.js +14 -7
  202. package/src/definitions/modules/popup.js +19 -7
  203. package/src/definitions/modules/popup.less +48 -4
  204. package/src/definitions/modules/progress.js +2 -28
  205. package/src/definitions/modules/search.js +1 -1
  206. package/src/definitions/modules/shape.js +14 -36
  207. package/src/definitions/modules/sidebar.js +6 -26
  208. package/src/definitions/modules/toast.js +2 -2
  209. package/src/definitions/modules/transition.js +9 -60
  210. package/src/theme.less +4 -12
  211. package/src/themes/default/collections/menu.variables +1 -3
  212. package/src/themes/default/collections/table.variables +1 -3
  213. package/src/themes/default/elements/segment.variables +1 -3
  214. package/src/themes/default/elements/step.variables +1 -1
  215. package/src/themes/default/globals/site.variables +1 -0
  216. package/src/themes/default/globals/variation.variables +2 -0
  217. package/src/themes/default/modules/popup.variables +8 -0
  218. package/src/themes/default/views/item.variables +1 -1
  219. package/tasks/config/project/install.js +1 -1
  220. package/tasks/install.js +8 -0
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.2-beta.0+b28e0cb
2
+ * # Fomantic UI - 2.9.2-beta.10+cf51e1c
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Site
12
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Site
13
13
  * https://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -463,7 +463,7 @@
463
463
  })(jQuery, window, document);
464
464
 
465
465
  /*!
466
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Form Validation
466
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Form Validation
467
467
  * https://github.com/fomantic/Fomantic-UI/
468
468
  *
469
469
  *
@@ -657,7 +657,7 @@
657
657
  $prompt = $fieldGroup.find(selector.prompt),
658
658
  $calendar = $field.closest(selector.uiCalendar),
659
659
  defaultValue = $field.data(metadata.defaultValue) || '',
660
- isCheckbox = $element.is(selector.uiCheckbox),
660
+ isCheckbox = $field.is(selector.checkbox),
661
661
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
662
662
  isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
663
663
  isErrored = $fieldGroup.hasClass(className.error)
@@ -691,7 +691,7 @@
691
691
  $calendar = $field.closest(selector.uiCalendar),
692
692
  $prompt = $fieldGroup.find(selector.prompt),
693
693
  defaultValue = $field.data(metadata.defaultValue),
694
- isCheckbox = $element.is(selector.uiCheckbox),
694
+ isCheckbox = $field.is(selector.checkbox),
695
695
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
696
696
  isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
697
697
  isErrored = $fieldGroup.hasClass(className.error)
@@ -708,7 +708,7 @@
708
708
  module.verbose('Resetting dropdown value', $element, defaultValue);
709
709
  $element.dropdown('restore defaults', true);
710
710
  } else if (isCheckbox) {
711
- module.verbose('Resetting checkbox value', $element, defaultValue);
711
+ module.verbose('Resetting checkbox value', $field, defaultValue);
712
712
  $field.prop('checked', defaultValue);
713
713
  } else if (isCalendar) {
714
714
  $calendar.calendar('set date', defaultValue);
@@ -997,8 +997,6 @@
997
997
  : rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,
998
998
  requiresValue = prompt.search('{value}') !== -1,
999
999
  requiresName = prompt.search('{name}') !== -1,
1000
- $label,
1001
- name,
1002
1000
  parts,
1003
1001
  suffixPrompt
1004
1002
  ;
@@ -1015,15 +1013,14 @@
1015
1013
  prompt = prompt.replace(/{min}/g, parts[0]);
1016
1014
  prompt = prompt.replace(/{max}/g, parts[1]);
1017
1015
  }
1016
+ if (ancillary && ['match', 'different'].indexOf(ruleName) >= 0) {
1017
+ prompt = prompt.replace(/{ruleValue}/g, module.get.fieldLabel(ancillary, true));
1018
+ }
1018
1019
  if (requiresValue) {
1019
1020
  prompt = prompt.replace(/{value}/g, $field.val());
1020
1021
  }
1021
1022
  if (requiresName) {
1022
- $label = $field.closest(selector.group).find('label').eq(0);
1023
- name = $label.length === 1
1024
- ? $label.text()
1025
- : $field.prop('placeholder') || settings.text.unspecifiedField;
1026
- prompt = prompt.replace(/{name}/g, name);
1023
+ prompt = prompt.replace(/{name}/g, module.get.fieldLabel($field));
1027
1024
  }
1028
1025
  prompt = prompt.replace(/{identifier}/g, field.identifier);
1029
1026
  prompt = prompt.replace(/{ruleValue}/g, ancillary);
@@ -1063,7 +1060,7 @@
1063
1060
  // refresh selector cache
1064
1061
  (instance || module).refresh();
1065
1062
  },
1066
- field: function (identifier) {
1063
+ field: function (identifier, strict) {
1067
1064
  module.verbose('Finding field with identifier', identifier);
1068
1065
  identifier = module.escape.string(identifier);
1069
1066
  var t;
@@ -1085,18 +1082,29 @@
1085
1082
  }
1086
1083
  module.error(error.noField.replace('{identifier}', identifier));
1087
1084
 
1088
- return $('<input/>');
1085
+ return strict ? $() : $('<input/>');
1089
1086
  },
1090
- fields: function (fields) {
1087
+ fields: function (fields, strict) {
1091
1088
  var
1092
1089
  $fields = $()
1093
1090
  ;
1094
1091
  $.each(fields, function (index, name) {
1095
- $fields = $fields.add(module.get.field(name));
1092
+ $fields = $fields.add(module.get.field(name, strict));
1096
1093
  });
1097
1094
 
1098
1095
  return $fields;
1099
1096
  },
1097
+ fieldLabel: function (identifier, useIdAsFallback) {
1098
+ var $field = typeof identifier === 'string'
1099
+ ? module.get.field(identifier)
1100
+ : identifier,
1101
+ $label = $field.closest(selector.group).find('label').eq(0)
1102
+ ;
1103
+
1104
+ return $label.length === 1
1105
+ ? $label.text()
1106
+ : $field.prop('placeholder') || (useIdAsFallback ? identifier : settings.text.unspecifiedField);
1107
+ },
1100
1108
  validation: function ($field) {
1101
1109
  var
1102
1110
  fieldValidation,
@@ -1119,20 +1127,22 @@
1119
1127
 
1120
1128
  return fieldValidation || false;
1121
1129
  },
1122
- value: function (field) {
1130
+ value: function (field, strict) {
1123
1131
  var
1124
1132
  fields = [],
1125
- results
1133
+ results,
1134
+ resultKeys
1126
1135
  ;
1127
1136
  fields.push(field);
1128
- results = module.get.values.call(element, fields);
1137
+ results = module.get.values.call(element, fields, strict);
1138
+ resultKeys = Object.keys(results);
1129
1139
 
1130
- return results[field];
1140
+ return resultKeys.length > 0 ? results[resultKeys[0]] : undefined;
1131
1141
  },
1132
- values: function (fields) {
1142
+ values: function (fields, strict) {
1133
1143
  var
1134
- $fields = Array.isArray(fields)
1135
- ? module.get.fields(fields)
1144
+ $fields = Array.isArray(fields) && fields.length > 0
1145
+ ? module.get.fields(fields, strict)
1136
1146
  : $field,
1137
1147
  values = {}
1138
1148
  ;
@@ -1250,16 +1260,8 @@
1250
1260
 
1251
1261
  field: function (identifier) {
1252
1262
  module.verbose('Checking for existence of a field with identifier', identifier);
1253
- identifier = module.escape.string(identifier);
1254
- if (typeof identifier !== 'string') {
1255
- module.error(error.identifier, identifier);
1256
- }
1257
1263
 
1258
- return (
1259
- $field.filter('#' + identifier).length > 0
1260
- || $field.filter('[name="' + identifier + '"]').length > 0
1261
- || $field.filter('[data-' + metadata.validate + '="' + identifier + '"]').length > 0
1262
- );
1264
+ return module.get.field(identifier, true).length > 0;
1263
1265
  },
1264
1266
 
1265
1267
  },
@@ -1283,6 +1285,22 @@
1283
1285
  },
1284
1286
  },
1285
1287
 
1288
+ checkErrors: function (errors, internal) {
1289
+ if (!errors || errors.length === 0) {
1290
+ if (!internal) {
1291
+ module.error(settings.error.noErrorMessage);
1292
+ }
1293
+
1294
+ return false;
1295
+ }
1296
+ if (!internal) {
1297
+ errors = typeof errors === 'string'
1298
+ ? [errors]
1299
+ : errors;
1300
+ }
1301
+
1302
+ return errors;
1303
+ },
1286
1304
  add: {
1287
1305
  // alias
1288
1306
  rule: function (name, rules) {
@@ -1326,15 +1344,16 @@
1326
1344
  module.refreshEvents();
1327
1345
  },
1328
1346
  prompt: function (identifier, errors, internal) {
1347
+ errors = module.checkErrors(errors);
1348
+ if (errors === false) {
1349
+ return;
1350
+ }
1329
1351
  var
1330
1352
  $field = module.get.field(identifier),
1331
1353
  $fieldGroup = $field.closest($group),
1332
1354
  $prompt = $fieldGroup.children(selector.prompt),
1333
1355
  promptExists = $prompt.length > 0
1334
1356
  ;
1335
- errors = typeof errors === 'string'
1336
- ? [errors]
1337
- : errors;
1338
1357
  module.verbose('Adding field error state', identifier);
1339
1358
  if (!internal) {
1340
1359
  $fieldGroup
@@ -1352,7 +1371,7 @@
1352
1371
  .html(settings.templates.prompt(errors))
1353
1372
  ;
1354
1373
  if (!promptExists) {
1355
- if (settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
1374
+ if (settings.transition && module.can.useElement('transition')) {
1356
1375
  module.verbose('Displaying error with css transition', settings.transition);
1357
1376
  $prompt.transition(settings.transition + ' in', settings.duration);
1358
1377
  } else {
@@ -1367,11 +1386,40 @@
1367
1386
  }
1368
1387
  },
1369
1388
  errors: function (errors) {
1389
+ errors = module.checkErrors(errors);
1390
+ if (errors === false) {
1391
+ return;
1392
+ }
1370
1393
  module.debug('Adding form error messages', errors);
1371
1394
  module.set.error();
1372
- $message
1373
- .html(settings.templates.error(errors))
1374
- ;
1395
+ var customErrors = [],
1396
+ tempErrors
1397
+ ;
1398
+ if ($.isPlainObject(errors)) {
1399
+ $.each(Object.keys(errors), function (i, id) {
1400
+ if (module.checkErrors(errors[id], true) !== false) {
1401
+ if (settings.inline) {
1402
+ module.add.prompt(id, errors[id]);
1403
+ } else {
1404
+ tempErrors = module.checkErrors(errors[id]);
1405
+ if (tempErrors !== false) {
1406
+ $.each(tempErrors, function (index, tempError) {
1407
+ customErrors.push(settings.prompt.addErrors
1408
+ .replace(/{name}/g, module.get.fieldLabel(id))
1409
+ .replace(/{error}/g, tempError));
1410
+ });
1411
+ }
1412
+ }
1413
+ }
1414
+ });
1415
+ } else {
1416
+ customErrors = errors;
1417
+ }
1418
+ if (customErrors.length > 0) {
1419
+ $message
1420
+ .html(settings.templates.error(customErrors))
1421
+ ;
1422
+ }
1375
1423
  },
1376
1424
  },
1377
1425
 
@@ -1448,7 +1496,7 @@
1448
1496
  ;
1449
1497
  if (settings.inline && $prompt.is(':visible')) {
1450
1498
  module.verbose('Removing prompt for field', identifier);
1451
- if (settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
1499
+ if (settings.transition && module.can.useElement('transition')) {
1452
1500
  $prompt.transition(settings.transition + ' out', settings.duration, function () {
1453
1501
  $prompt.remove();
1454
1502
  });
@@ -1476,15 +1524,19 @@
1476
1524
  $el = $(el),
1477
1525
  $parent = $el.parent(),
1478
1526
  isCheckbox = $el.filter(selector.checkbox).length > 0,
1479
- isDropdown = $parent.is(selector.uiDropdown) && module.can.useElement('dropdown'),
1480
- $calendar = $el.closest(selector.uiCalendar),
1481
- isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
1527
+ isDropdown = ($parent.is(selector.uiDropdown) || $el.is(selector.uiDropdown)) && module.can.useElement('dropdown'),
1528
+ $calendar = $el.closest(selector.uiCalendar),
1529
+ isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
1482
1530
  value = isCheckbox
1483
1531
  ? $el.is(':checked')
1484
1532
  : $el.val()
1485
1533
  ;
1486
1534
  if (isDropdown) {
1487
- $parent.dropdown('save defaults');
1535
+ if ($parent.is(selector.uiDropdown)) {
1536
+ $parent.dropdown('save defaults');
1537
+ } else {
1538
+ $el.dropdown('save defaults');
1539
+ }
1488
1540
  } else if (isCalendar) {
1489
1541
  $calendar.calendar('refresh');
1490
1542
  }
@@ -1784,7 +1836,7 @@
1784
1836
  ? String(value + '').trim()
1785
1837
  : String(value + ''));
1786
1838
 
1787
- return ruleFunction.call(field, value, ancillary, $module);
1839
+ return ruleFunction.call(field, value, ancillary, module);
1788
1840
  }
1789
1841
  ;
1790
1842
  if (!isFunction(ruleFunction)) {
@@ -2045,7 +2097,7 @@
2045
2097
  notExactly: '{name} cannot be set to exactly "{ruleValue}"',
2046
2098
  contain: '{name} must contain "{ruleValue}"',
2047
2099
  containExactly: '{name} must contain exactly "{ruleValue}"',
2048
- doesntContain: '{name} cannot contain "{ruleValue}"',
2100
+ doesntContain: '{name} cannot contain "{ruleValue}"',
2049
2101
  doesntContainExactly: '{name} cannot contain exactly "{ruleValue}"',
2050
2102
  minLength: '{name} must be at least {ruleValue} characters',
2051
2103
  exactLength: '{name} must be exactly {ruleValue} characters',
@@ -2056,6 +2108,7 @@
2056
2108
  minCount: '{name} must have at least {ruleValue} choices',
2057
2109
  exactCount: '{name} must have exactly {ruleValue} choices',
2058
2110
  maxCount: '{name} must have {ruleValue} or less choices',
2111
+ addErrors: '{name}: {error}',
2059
2112
  },
2060
2113
 
2061
2114
  selector: {
@@ -2084,11 +2137,11 @@
2084
2137
  },
2085
2138
 
2086
2139
  error: {
2087
- identifier: 'You must specify a string identifier for each field',
2088
2140
  method: 'The method you called is not defined.',
2089
2141
  noRule: 'There is no rule matching the one you specified',
2090
2142
  noField: 'Field identifier {identifier} not found',
2091
2143
  noElement: 'This module requires ui {element}',
2144
+ noErrorMessage: 'No error message provided',
2092
2145
  },
2093
2146
 
2094
2147
  templates: {
@@ -2345,30 +2398,8 @@
2345
2398
  },
2346
2399
 
2347
2400
  // matches another field
2348
- match: function (value, identifier, $module) {
2349
- var
2350
- matchingValue,
2351
- matchingElement
2352
- ;
2353
- matchingElement = $module.find('[data-validate="' + identifier + '"]');
2354
- if (matchingElement.length > 0) {
2355
- matchingValue = matchingElement.val();
2356
- } else {
2357
- matchingElement = $module.find('#' + identifier);
2358
- if (matchingElement.length > 0) {
2359
- matchingValue = matchingElement.val();
2360
- } else {
2361
- matchingElement = $module.find('[name="' + identifier + '"]');
2362
- if (matchingElement.length > 0) {
2363
- matchingValue = matchingElement.val();
2364
- } else {
2365
- matchingElement = $module.find('[name="' + identifier + '[]"]');
2366
- if (matchingElement.length > 0) {
2367
- matchingValue = matchingElement;
2368
- }
2369
- }
2370
- }
2371
- }
2401
+ match: function (value, identifier, module) {
2402
+ var matchingValue = module.get.value(identifier, true);
2372
2403
 
2373
2404
  return matchingValue !== undefined
2374
2405
  ? value.toString() === matchingValue.toString()
@@ -2376,31 +2407,8 @@
2376
2407
  },
2377
2408
 
2378
2409
  // different than another field
2379
- different: function (value, identifier, $module) {
2380
- // use either id or name of field
2381
- var
2382
- matchingValue,
2383
- matchingElement
2384
- ;
2385
- matchingElement = $module.find('[data-validate="' + identifier + '"]');
2386
- if (matchingElement.length > 0) {
2387
- matchingValue = matchingElement.val();
2388
- } else {
2389
- matchingElement = $module.find('#' + identifier);
2390
- if (matchingElement.length > 0) {
2391
- matchingValue = matchingElement.val();
2392
- } else {
2393
- matchingElement = $module.find('[name="' + identifier + '"]');
2394
- if (matchingElement.length > 0) {
2395
- matchingValue = matchingElement.val();
2396
- } else {
2397
- matchingElement = $module.find('[name="' + identifier + '[]"]');
2398
- if (matchingElement.length > 0) {
2399
- matchingValue = matchingElement;
2400
- }
2401
- }
2402
- }
2403
- }
2410
+ different: function (value, identifier, module) {
2411
+ var matchingValue = module.get.value(identifier, true);
2404
2412
 
2405
2413
  return matchingValue !== undefined
2406
2414
  ? value.toString() !== matchingValue.toString()
@@ -2559,7 +2567,7 @@
2559
2567
  })(jQuery, window, document);
2560
2568
 
2561
2569
  /*!
2562
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Accordion
2570
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Accordion
2563
2571
  * https://github.com/fomantic/Fomantic-UI/
2564
2572
  *
2565
2573
  *
@@ -2735,7 +2743,7 @@
2735
2743
  .addClass(className.animating)
2736
2744
  ;
2737
2745
  if (settings.animateChildren) {
2738
- if ($.fn.transition !== undefined && $module.transition('is supported')) {
2746
+ if ($.fn.transition !== undefined) {
2739
2747
  $activeContent
2740
2748
  .children()
2741
2749
  .transition({
@@ -2799,7 +2807,7 @@
2799
2807
  .addClass(className.animating)
2800
2808
  ;
2801
2809
  if (settings.animateChildren) {
2802
- if ($.fn.transition !== undefined && $module.transition('is supported')) {
2810
+ if ($.fn.transition !== undefined) {
2803
2811
  $activeContent
2804
2812
  .children()
2805
2813
  .transition({
@@ -2868,7 +2876,7 @@
2868
2876
  .stop(true, true)
2869
2877
  ;
2870
2878
  if (settings.animateChildren) {
2871
- if ($.fn.transition !== undefined && $module.transition('is supported')) {
2879
+ if ($.fn.transition !== undefined) {
2872
2880
  $openContents
2873
2881
  .children()
2874
2882
  .transition({
@@ -3157,7 +3165,7 @@
3157
3165
  })(jQuery, window, document);
3158
3166
 
3159
3167
  /*!
3160
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Calendar
3168
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Calendar
3161
3169
  * https://github.com/fomantic/Fomantic-UI/
3162
3170
  *
3163
3171
  *
@@ -5173,7 +5181,7 @@
5173
5181
  })(jQuery, window, document);
5174
5182
 
5175
5183
  /*!
5176
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Checkbox
5184
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Checkbox
5177
5185
  * https://github.com/fomantic/Fomantic-UI/
5178
5186
  *
5179
5187
  *
@@ -6058,7 +6066,7 @@
6058
6066
  })(jQuery, window, document);
6059
6067
 
6060
6068
  /*!
6061
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Dimmer
6069
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Dimmer
6062
6070
  * https://github.com/fomantic/Fomantic-UI/
6063
6071
  *
6064
6072
  *
@@ -6288,7 +6296,7 @@
6288
6296
  callback = isFunction(callback)
6289
6297
  ? callback
6290
6298
  : function () {};
6291
- if (settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
6299
+ if (settings.useCSS && $.fn.transition !== undefined) {
6292
6300
  if (settings.useFlex) {
6293
6301
  module.debug('Using flex dimmer');
6294
6302
  module.remove.legacy();
@@ -6347,7 +6355,7 @@
6347
6355
  callback = isFunction(callback)
6348
6356
  ? callback
6349
6357
  : function () {};
6350
- if (settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
6358
+ if (settings.useCSS && $.fn.transition !== undefined) {
6351
6359
  module.verbose('Hiding dimmer with css');
6352
6360
  $dimmer
6353
6361
  .transition({
@@ -6793,7 +6801,7 @@
6793
6801
  })(jQuery, window, document);
6794
6802
 
6795
6803
  /*!
6796
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Dropdown
6804
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Dropdown
6797
6805
  * https://github.com/fomantic/Fomantic-UI/
6798
6806
  *
6799
6807
  *
@@ -10431,7 +10439,7 @@
10431
10439
  displayType: module.get.displayType(),
10432
10440
  }).transition('show');
10433
10441
  callback.call(element);
10434
- } else if (module.can.useElement('transition') && $module.transition('is supported')) {
10442
+ } else if (module.can.useElement('transition')) {
10435
10443
  $currentMenu
10436
10444
  .transition({
10437
10445
  animation: transition + ' in',
@@ -10473,7 +10481,7 @@
10473
10481
  displayType: module.get.displayType(),
10474
10482
  }).transition('hide');
10475
10483
  callback.call(element);
10476
- } else if ($.fn.transition !== undefined && $module.transition('is supported')) {
10484
+ } else if ($.fn.transition !== undefined) {
10477
10485
  $currentMenu
10478
10486
  .transition({
10479
10487
  animation: transition + ' out',
@@ -11128,7 +11136,7 @@
11128
11136
  })(jQuery, window, document);
11129
11137
 
11130
11138
  /*!
11131
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Embed
11139
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Embed
11132
11140
  * https://github.com/fomantic/Fomantic-UI/
11133
11141
  *
11134
11142
  *
@@ -11784,7 +11792,7 @@
11784
11792
  return ''
11785
11793
  + '<iframe src="' + deQuote(src) + '"'
11786
11794
  + ' width="100%" height="100%"'
11787
- + ' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
11795
+ + ' msallowFullScreen allowFullScreen></iframe>';
11788
11796
  },
11789
11797
  placeholder: function (image, icon) {
11790
11798
  var
@@ -11812,7 +11820,7 @@
11812
11820
  })(jQuery, window, document);
11813
11821
 
11814
11822
  /*!
11815
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Flyout
11823
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Flyout
11816
11824
  * https://github.com/fomantic/Fomantic-UI/
11817
11825
  *
11818
11826
  *
@@ -11893,8 +11901,8 @@
11893
11901
  elementNamespace,
11894
11902
  id,
11895
11903
  observer,
11904
+ observeAttributes = false,
11896
11905
  currentScroll,
11897
- transitionEvent,
11898
11906
 
11899
11907
  module
11900
11908
  ;
@@ -11958,8 +11966,6 @@
11958
11966
  });
11959
11967
  }
11960
11968
 
11961
- transitionEvent = module.get.transitionEvent();
11962
-
11963
11969
  // avoids locking rendering if initialized in onReady
11964
11970
  if (settings.delaySetup) {
11965
11971
  requestAnimationFrame(module.setup.layout);
@@ -12311,7 +12317,7 @@
12311
12317
  ;
12312
12318
  mutations.every(function (mutation) {
12313
12319
  if (mutation.type === 'attributes') {
12314
- if (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input')) {
12320
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
12315
12321
  shouldRefreshInputs = true;
12316
12322
  }
12317
12323
  } else {
@@ -12362,13 +12368,14 @@
12362
12368
  if (!settings.dimPage) {
12363
12369
  return;
12364
12370
  }
12365
- $inputs = $module.find('[tabindex], :input:enabled').filter(':visible').filter(function () {
12371
+ $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
12366
12372
  return $(this).closest('.disabled').length === 0;
12367
12373
  });
12368
- $module.removeAttr('tabindex');
12369
12374
  if ($inputs.length === 0) {
12370
12375
  $inputs = $module;
12371
12376
  $module.attr('tabindex', -1);
12377
+ } else {
12378
+ $module.removeAttr('tabindex');
12372
12379
  }
12373
12380
  $inputs.first()
12374
12381
  .on('keydown' + elementNamespace, module.event.inputKeyDown.first)
@@ -12465,6 +12472,7 @@
12465
12472
  }
12466
12473
  }
12467
12474
  module.set.dimmerStyles();
12475
+ module.set.observeAttributes(false);
12468
12476
  module.pushPage(function () {
12469
12477
  callback.call(element);
12470
12478
  settings.onVisible.call(element);
@@ -12473,6 +12481,7 @@
12473
12481
  }
12474
12482
  module.save.focus();
12475
12483
  module.refreshInputs();
12484
+ requestAnimationFrame(module.set.observeAttributes);
12476
12485
  });
12477
12486
  settings.onChange.call(element);
12478
12487
  } else {
@@ -12493,6 +12502,7 @@
12493
12502
  if (module.is.visible() || module.is.animating()) {
12494
12503
  module.debug('Hiding flyout', callback);
12495
12504
  module.refreshFlyouts();
12505
+ module.set.observeAttributes(false);
12496
12506
  module.pullPage(function () {
12497
12507
  callback.call(element);
12498
12508
  if (isFunction(settings.onHidden)) {
@@ -12565,13 +12575,13 @@
12565
12575
  };
12566
12576
  transitionEnd = function (event) {
12567
12577
  if (event.target === $module[0]) {
12568
- $module.off(transitionEvent + elementNamespace, transitionEnd);
12578
+ $module.off('transitionend' + elementNamespace, transitionEnd);
12569
12579
  module.remove.animating();
12570
12580
  callback.call(element);
12571
12581
  }
12572
12582
  };
12573
- $module.off(transitionEvent + elementNamespace);
12574
- $module.on(transitionEvent + elementNamespace, transitionEnd);
12583
+ $module.off('transitionend' + elementNamespace);
12584
+ $module.on('transitionend' + elementNamespace, transitionEnd);
12575
12585
  requestAnimationFrame(animate);
12576
12586
  if (settings.dimPage && !module.othersVisible()) {
12577
12587
  requestAnimationFrame(dim);
@@ -12606,7 +12616,7 @@
12606
12616
  };
12607
12617
  transitionEnd = function (event) {
12608
12618
  if (event.target === $module[0]) {
12609
- $module.off(transitionEvent + elementNamespace, transitionEnd);
12619
+ $module.off('transitionend' + elementNamespace, transitionEnd);
12610
12620
  module.remove.animating();
12611
12621
  module.remove.closing();
12612
12622
  module.remove.overlay();
@@ -12620,8 +12630,8 @@
12620
12630
  callback.call(element);
12621
12631
  }
12622
12632
  };
12623
- $module.off(transitionEvent + elementNamespace);
12624
- $module.on(transitionEvent + elementNamespace, transitionEnd);
12633
+ $module.off('transitionend' + elementNamespace);
12634
+ $module.on('transitionend' + elementNamespace, transitionEnd);
12625
12635
  requestAnimationFrame(animate);
12626
12636
  },
12627
12637
 
@@ -12644,6 +12654,9 @@
12644
12654
  },
12645
12655
 
12646
12656
  set: {
12657
+ observeAttributes: function (state) {
12658
+ observeAttributes = state !== false;
12659
+ },
12647
12660
  autofocus: function () {
12648
12661
  var
12649
12662
  $autofocus = $inputs.filter('[autofocus]'),
@@ -12786,23 +12799,6 @@
12786
12799
 
12787
12800
  return className.left;
12788
12801
  },
12789
- transitionEvent: function () {
12790
- var
12791
- element = document.createElement('element'),
12792
- transitions = {
12793
- transition: 'transitionend',
12794
- OTransition: 'oTransitionEnd',
12795
- MozTransition: 'transitionend',
12796
- WebkitTransition: 'webkitTransitionEnd',
12797
- },
12798
- transition
12799
- ;
12800
- for (transition in transitions) {
12801
- if (element.style[transition] !== undefined) {
12802
- return transitions[transition];
12803
- }
12804
- }
12805
- },
12806
12802
  id: function () {
12807
12803
  return id;
12808
12804
  },
@@ -13392,7 +13388,7 @@
13392
13388
  })(jQuery, window, document);
13393
13389
 
13394
13390
  /*!
13395
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Modal
13391
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Modal
13396
13392
  * https://github.com/fomantic/Fomantic-UI/
13397
13393
  *
13398
13394
  *
@@ -13475,6 +13471,7 @@
13475
13471
  elementEventNamespace,
13476
13472
  id,
13477
13473
  observer,
13474
+ observeAttributes = false,
13478
13475
  module
13479
13476
  ;
13480
13477
  module = {
@@ -13658,7 +13655,7 @@
13658
13655
  ;
13659
13656
  mutations.every(function (mutation) {
13660
13657
  if (mutation.type === 'attributes') {
13661
- if (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input')) {
13658
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
13662
13659
  shouldRefreshInputs = true;
13663
13660
  }
13664
13661
  } else {
@@ -13717,10 +13714,11 @@
13717
13714
  $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
13718
13715
  return $(this).closest('.disabled').length === 0;
13719
13716
  });
13720
- $module.removeAttr('tabindex');
13721
13717
  if ($inputs.length === 0) {
13722
13718
  $inputs = $module;
13723
13719
  $module.attr('tabindex', -1);
13720
+ } else {
13721
+ $module.removeAttr('tabindex');
13724
13722
  }
13725
13723
  $inputs.first()
13726
13724
  .on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
@@ -13997,8 +13995,9 @@
13997
13995
  $module.detach().appendTo($dimmer);
13998
13996
  }
13999
13997
  }
14000
- if (settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
13998
+ if (settings.transition && $.fn.transition !== undefined) {
14001
13999
  module.debug('Showing modal with css animations');
14000
+ module.set.observeAttributes(false);
14002
14001
  $module
14003
14002
  .transition({
14004
14003
  debug: settings.debug,
@@ -14016,6 +14015,7 @@
14016
14015
  module.save.focus();
14017
14016
  module.set.active();
14018
14017
  module.refreshInputs();
14018
+ requestAnimationFrame(module.set.observeAttributes);
14019
14019
  callback();
14020
14020
  },
14021
14021
  })
@@ -14045,8 +14045,9 @@
14045
14045
 
14046
14046
  if (module.is.animating() || module.is.active()) {
14047
14047
  module.debug('Hiding modal');
14048
- if (settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
14048
+ if (settings.transition && $.fn.transition !== undefined) {
14049
14049
  module.remove.active();
14050
+ module.set.observeAttributes(false);
14050
14051
  $module
14051
14052
  .transition({
14052
14053
  debug: settings.debug,
@@ -14066,6 +14067,7 @@
14066
14067
  },
14067
14068
  onComplete: function () {
14068
14069
  module.unbind.scrollLock();
14070
+ module.remove.active();
14069
14071
  if (settings.allowMultiple) {
14070
14072
  $previousModal.addClass(className.front);
14071
14073
  $module.removeClass(className.front);
@@ -14381,9 +14383,7 @@
14381
14383
  return module.cache.isIE;
14382
14384
  },
14383
14385
  animating: function () {
14384
- return $module.transition('is supported')
14385
- ? $module.transition('is animating')
14386
- : $module.is(':visible');
14386
+ return $module.transition('is animating');
14387
14387
  },
14388
14388
  scrolling: function () {
14389
14389
  return $dimmable.hasClass(className.scrolling);
@@ -14426,6 +14426,9 @@
14426
14426
  },
14427
14427
 
14428
14428
  set: {
14429
+ observeAttributes: function (state) {
14430
+ observeAttributes = state !== false;
14431
+ },
14429
14432
  autofocus: function () {
14430
14433
  var
14431
14434
  $autofocus = $inputs.filter('[autofocus]'),
@@ -15007,7 +15010,7 @@
15007
15010
  })(jQuery, window, document);
15008
15011
 
15009
15012
  /*!
15010
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Nag
15013
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Nag
15011
15014
  * https://github.com/fomantic/Fomantic-UI/
15012
15015
  *
15013
15016
  *
@@ -15560,7 +15563,7 @@
15560
15563
  })(jQuery, window, document);
15561
15564
 
15562
15565
  /*!
15563
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Popup
15566
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Popup
15564
15567
  * https://github.com/fomantic/Fomantic-UI/
15565
15568
  *
15566
15569
  *
@@ -15686,9 +15689,9 @@
15686
15689
  }
15687
15690
  }
15688
15691
  if (settings.popup) {
15689
- $popup.addClass(className.loading);
15692
+ module.set.invisible();
15690
15693
  $offsetParent = module.get.offsetParent();
15691
- $popup.removeClass(className.loading);
15694
+ module.remove.invisible();
15692
15695
  if (settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
15693
15696
  module.debug('Moving popup to the same offset parent as target');
15694
15697
  $popup
@@ -15975,7 +15978,7 @@
15975
15978
  animate: {
15976
15979
  show: function (callback) {
15977
15980
  callback = isFunction(callback) ? callback : function () {};
15978
- if (settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
15981
+ if (settings.transition && module.can.useElement('transition')) {
15979
15982
  module.set.visible();
15980
15983
  $popup
15981
15984
  .transition({
@@ -15997,7 +16000,7 @@
15997
16000
  hide: function (callback) {
15998
16001
  callback = isFunction(callback) ? callback : function () {};
15999
16002
  module.debug('Hiding pop-up');
16000
- if (settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
16003
+ if (settings.transition && $.fn.transition !== undefined) {
16001
16004
  $popup
16002
16005
  .transition({
16003
16006
  animation: (settings.transition.hideMethod || settings.transition) + ' out',
@@ -16462,8 +16465,8 @@
16462
16465
  .css(positioning)
16463
16466
  .removeClass(className.position)
16464
16467
  .addClass(position)
16465
- .addClass(className.loading)
16466
16468
  ;
16469
+ module.set.invisible();
16467
16470
 
16468
16471
  popupOffset = module.get.popupOffset();
16469
16472
 
@@ -16487,7 +16490,7 @@
16487
16490
  module.debug('Popup could not find a position to display', $popup);
16488
16491
  module.error(error.cannotPlace, element);
16489
16492
  module.remove.attempts();
16490
- module.remove.loading();
16493
+ module.remove.invisible();
16491
16494
  module.reset();
16492
16495
  settings.onUnplaceable.call($popup, element);
16493
16496
 
@@ -16496,7 +16499,7 @@
16496
16499
  }
16497
16500
  module.debug('Position is on stage', position);
16498
16501
  module.remove.attempts();
16499
- module.remove.loading();
16502
+ module.remove.invisible();
16500
16503
  if (settings.setFluidWidth && module.is.fluid()) {
16501
16504
  module.set.fluidWidth(calculations);
16502
16505
  }
@@ -16510,6 +16513,14 @@
16510
16513
  $popup.css('width', calculations.container.width);
16511
16514
  },
16512
16515
 
16516
+ loading: function () {
16517
+ $popup.addClass(className.loading);
16518
+ },
16519
+
16520
+ invisible: function () {
16521
+ $popup.addClass(className.invisible);
16522
+ },
16523
+
16513
16524
  variation: function (variation) {
16514
16525
  variation = variation || module.get.variation();
16515
16526
  if (variation && module.has.popup()) {
@@ -16527,6 +16538,9 @@
16527
16538
  loading: function () {
16528
16539
  $popup.removeClass(className.loading);
16529
16540
  },
16541
+ invisible: function () {
16542
+ $popup.removeClass(className.invisible);
16543
+ },
16530
16544
  variation: function (variation) {
16531
16545
  variation = variation || module.get.variation();
16532
16546
  if (variation) {
@@ -17036,6 +17050,7 @@
17036
17050
  basic: 'basic',
17037
17051
  animating: 'animating',
17038
17052
  dropdown: 'dropdown',
17053
+ invisible: 'invisible',
17039
17054
  fluid: 'fluid',
17040
17055
  loading: 'loading',
17041
17056
  popup: 'ui popup',
@@ -17096,7 +17111,7 @@
17096
17111
  })(jQuery, window, document);
17097
17112
 
17098
17113
  /*!
17099
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Progress
17114
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Progress
17100
17115
  * https://github.com/fomantic/Fomantic-UI/
17101
17116
  *
17102
17117
  *
@@ -17156,7 +17171,6 @@
17156
17171
  instance = $module.data(moduleNamespace),
17157
17172
 
17158
17173
  animating = false,
17159
- transitionEnd,
17160
17174
  module
17161
17175
  ;
17162
17176
  module = {
@@ -17212,7 +17226,6 @@
17212
17226
 
17213
17227
  initialize: function () {
17214
17228
  module.set.duration();
17215
- module.set.transitionEvent();
17216
17229
  module.debug(element);
17217
17230
 
17218
17231
  module.read.metadata();
@@ -17292,17 +17305,14 @@
17292
17305
 
17293
17306
  bind: {
17294
17307
  transitionEnd: function (callback) {
17295
- var
17296
- transitionEnd = module.get.transitionEnd()
17297
- ;
17298
17308
  $bars
17299
- .one(transitionEnd + eventNamespace, function (event) {
17309
+ .one('transitionend' + eventNamespace, function (event) {
17300
17310
  clearTimeout(module.failSafeTimer);
17301
17311
  callback.call(this, event);
17302
17312
  })
17303
17313
  ;
17304
17314
  module.failSafeTimer = setTimeout(function () {
17305
- $bars.triggerHandler(transitionEnd);
17315
+ $bars.triggerHandler('transitionend');
17306
17316
  }, settings.duration + settings.failSafeDelay);
17307
17317
  module.verbose('Adding fail safe timer', module.timer);
17308
17318
  },
@@ -17427,24 +17437,6 @@
17427
17437
  : value;
17428
17438
  },
17429
17439
 
17430
- transitionEnd: function () {
17431
- var
17432
- element = document.createElement('element'),
17433
- transitions = {
17434
- transition: 'transitionend',
17435
- OTransition: 'oTransitionEnd',
17436
- MozTransition: 'transitionend',
17437
- WebkitTransition: 'webkitTransitionEnd',
17438
- },
17439
- transition
17440
- ;
17441
- for (transition in transitions) {
17442
- if (element.style[transition] !== undefined) {
17443
- return transitions[transition];
17444
- }
17445
- }
17446
- },
17447
-
17448
17440
  // gets current displayed percentage (if animating values this is the intermediary value)
17449
17441
  displayPercent: function (index) {
17450
17442
  var
@@ -17784,9 +17776,6 @@
17784
17776
  settings.onError.call(element, module.value, module.total);
17785
17777
  });
17786
17778
  },
17787
- transitionEvent: function () {
17788
- transitionEnd = module.get.transitionEnd();
17789
- },
17790
17779
  total: function (totalValue) {
17791
17780
  module.total = totalValue;
17792
17781
  },
@@ -18105,7 +18094,7 @@
18105
18094
  })(jQuery, window, document);
18106
18095
 
18107
18096
  /*!
18108
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Slider
18097
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Slider
18109
18098
  * https://github.com/fomantic/Fomantic-UI/
18110
18099
  *
18111
18100
  *
@@ -19458,7 +19447,7 @@
19458
19447
  })(jQuery, window, document);
19459
19448
 
19460
19449
  /*!
19461
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Rating
19450
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Rating
19462
19451
  * https://github.com/fomantic/Fomantic-UI/
19463
19452
  *
19464
19453
  *
@@ -20001,7 +19990,7 @@
20001
19990
  })(jQuery, window, document);
20002
19991
 
20003
19992
  /*!
20004
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Search
19993
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Search
20005
19994
  * https://github.com/fomantic/Fomantic-UI/
20006
19995
  *
20007
19996
  *
@@ -20410,7 +20399,7 @@
20410
20399
  return module.is.focused() && !module.is.visible() && !module.is.empty();
20411
20400
  },
20412
20401
  transition: function () {
20413
- return settings.transition && $.fn.transition !== undefined && $module.transition('is supported');
20402
+ return settings.transition && $.fn.transition !== undefined;
20414
20403
  },
20415
20404
  },
20416
20405
 
@@ -21582,7 +21571,7 @@
21582
21571
  })(jQuery, window, document);
21583
21572
 
21584
21573
  /*!
21585
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Shape
21574
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Shape
21586
21575
  * https://github.com/fomantic/Fomantic-UI/
21587
21576
  *
21588
21577
  *
@@ -21699,33 +21688,29 @@
21699
21688
  module.set.active();
21700
21689
  };
21701
21690
  settings.onBeforeChange.call($nextSide[0]);
21702
- if (module.get.transitionEvent()) {
21703
- module.verbose('Starting CSS animation');
21691
+ module.verbose('Starting CSS animation');
21692
+ $module
21693
+ .addClass(className.animating)
21694
+ ;
21695
+ $sides
21696
+ .css(propertyObject)
21697
+ .one('transitionend', callback)
21698
+ ;
21699
+ module.set.duration(settings.duration);
21700
+ requestAnimationFrame(function () {
21704
21701
  $module
21705
21702
  .addClass(className.animating)
21706
21703
  ;
21707
- $sides
21708
- .css(propertyObject)
21709
- .one(module.get.transitionEvent(), callback)
21704
+ $activeSide
21705
+ .addClass(className.hidden)
21710
21706
  ;
21711
- module.set.duration(settings.duration);
21712
- requestAnimationFrame(function () {
21713
- $module
21714
- .addClass(className.animating)
21715
- ;
21716
- $activeSide
21717
- .addClass(className.hidden)
21718
- ;
21719
- });
21720
- } else {
21721
- callback();
21722
- }
21707
+ });
21723
21708
  },
21724
21709
 
21725
21710
  queue: function (method) {
21726
21711
  module.debug('Queueing animation of', method);
21727
21712
  $sides
21728
- .one(module.get.transitionEvent(), function () {
21713
+ .one('transitionend', function () {
21729
21714
  module.debug('Executing queued animation');
21730
21715
  setTimeout(function () {
21731
21716
  $module.shape(method);
@@ -21995,24 +21980,6 @@
21995
21980
  },
21996
21981
  },
21997
21982
 
21998
- transitionEvent: function () {
21999
- var
22000
- element = document.createElement('element'),
22001
- transitions = {
22002
- transition: 'transitionend',
22003
- OTransition: 'oTransitionEnd',
22004
- MozTransition: 'transitionend',
22005
- WebkitTransition: 'webkitTransitionEnd',
22006
- },
22007
- transition
22008
- ;
22009
- for (transition in transitions) {
22010
- if (element.style[transition] !== undefined) {
22011
- return transitions[transition];
22012
- }
22013
- }
22014
- },
22015
-
22016
21983
  nextSide: function () {
22017
21984
  return $activeSide.next(selector.side).length > 0
22018
21985
  ? $activeSide.next(selector.side)
@@ -22404,7 +22371,7 @@
22404
22371
  })(jQuery, window, document);
22405
22372
 
22406
22373
  /*!
22407
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Sidebar
22374
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Sidebar
22408
22375
  * https://github.com/fomantic/Fomantic-UI/
22409
22376
  *
22410
22377
  *
@@ -22474,7 +22441,6 @@
22474
22441
  elementNamespace,
22475
22442
  id,
22476
22443
  currentScroll,
22477
- transitionEvent,
22478
22444
  initialBodyMargin = '',
22479
22445
  tempBodyMargin = '',
22480
22446
  hadScrollbar = false,
@@ -22489,8 +22455,6 @@
22489
22455
 
22490
22456
  module.create.id();
22491
22457
 
22492
- transitionEvent = module.get.transitionEvent();
22493
-
22494
22458
  // avoids locking rendering if initialized in onReady
22495
22459
  if (settings.delaySetup) {
22496
22460
  requestAnimationFrame(module.setup.layout);
@@ -22897,13 +22861,13 @@
22897
22861
  };
22898
22862
  transitionEnd = function (event) {
22899
22863
  if (event.target === $transition[0]) {
22900
- $transition.off(transitionEvent + elementNamespace, transitionEnd);
22864
+ $transition.off('transitionend' + elementNamespace, transitionEnd);
22901
22865
  module.remove.animating();
22902
22866
  callback.call(element);
22903
22867
  }
22904
22868
  };
22905
- $transition.off(transitionEvent + elementNamespace);
22906
- $transition.on(transitionEvent + elementNamespace, transitionEnd);
22869
+ $transition.off('transitionend' + elementNamespace);
22870
+ $transition.on('transitionend' + elementNamespace, transitionEnd);
22907
22871
  requestAnimationFrame(animate);
22908
22872
  if (settings.dimPage && !module.othersVisible()) {
22909
22873
  requestAnimationFrame(dim);
@@ -22937,7 +22901,7 @@
22937
22901
  };
22938
22902
  transitionEnd = function (event) {
22939
22903
  if (event.target === $transition[0]) {
22940
- $transition.off(transitionEvent + elementNamespace, transitionEnd);
22904
+ $transition.off('transitionend' + elementNamespace, transitionEnd);
22941
22905
  module.remove.animating();
22942
22906
  module.remove.closing();
22943
22907
  module.remove.transition();
@@ -22951,8 +22915,8 @@
22951
22915
  callback.call(element);
22952
22916
  }
22953
22917
  };
22954
- $transition.off(transitionEvent + elementNamespace);
22955
- $transition.on(transitionEvent + elementNamespace, transitionEnd);
22918
+ $transition.off('transitionend' + elementNamespace);
22919
+ $transition.on('transitionend' + elementNamespace, transitionEnd);
22956
22920
  requestAnimationFrame(animate);
22957
22921
  },
22958
22922
 
@@ -23127,23 +23091,6 @@
23127
23091
 
23128
23092
  return transition;
23129
23093
  },
23130
- transitionEvent: function () {
23131
- var
23132
- element = document.createElement('element'),
23133
- transitions = {
23134
- transition: 'transitionend',
23135
- OTransition: 'oTransitionEnd',
23136
- MozTransition: 'transitionend',
23137
- WebkitTransition: 'webkitTransitionEnd',
23138
- },
23139
- transition
23140
- ;
23141
- for (transition in transitions) {
23142
- if (element.style[transition] !== undefined) {
23143
- return transitions[transition];
23144
- }
23145
- }
23146
- },
23147
23094
  },
23148
23095
  has: {
23149
23096
  scrollbar: function () {
@@ -23500,7 +23447,7 @@
23500
23447
  })(jQuery, window, document);
23501
23448
 
23502
23449
  /*!
23503
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Sticky
23450
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Sticky
23504
23451
  * https://github.com/fomantic/Fomantic-UI/
23505
23452
  *
23506
23453
  *
@@ -24415,7 +24362,7 @@
24415
24362
  })(jQuery, window, document);
24416
24363
 
24417
24364
  /*!
24418
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Tab
24365
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Tab
24419
24366
  * https://github.com/fomantic/Fomantic-UI/
24420
24367
  *
24421
24368
  *
@@ -25371,7 +25318,7 @@
25371
25318
  })(jQuery, window, document);
25372
25319
 
25373
25320
  /*!
25374
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Toast
25321
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Toast
25375
25322
  * https://github.com/fomantic/Fomantic-UI/
25376
25323
  *
25377
25324
  *
@@ -25769,7 +25716,7 @@
25769
25716
  animate: {
25770
25717
  show: function (callback) {
25771
25718
  callback = isFunction(callback) ? callback : function () {};
25772
- if (settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
25719
+ if (settings.transition && module.can.useElement('transition')) {
25773
25720
  module.set.visible();
25774
25721
  $toastBox
25775
25722
  .transition({
@@ -25789,7 +25736,7 @@
25789
25736
  },
25790
25737
  close: function (callback) {
25791
25738
  callback = isFunction(callback) ? callback : function () {};
25792
- if (settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
25739
+ if (settings.transition && $.fn.transition !== undefined) {
25793
25740
  $toastBox
25794
25741
  .transition({
25795
25742
  animation: settings.transition.hideMethod + ' out',
@@ -26324,7 +26271,7 @@
26324
26271
  })(jQuery, window, document);
26325
26272
 
26326
26273
  /*!
26327
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Transition
26274
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Transition
26328
26275
  * https://github.com/fomantic/Fomantic-UI/
26329
26276
  *
26330
26277
  *
@@ -26371,7 +26318,6 @@
26371
26318
  error,
26372
26319
  className,
26373
26320
  metadata,
26374
- animationEnd,
26375
26321
 
26376
26322
  moduleNamespace,
26377
26323
  eventNamespace,
@@ -26394,9 +26340,6 @@
26394
26340
  moduleNamespace = 'module-' + settings.namespace;
26395
26341
  instance = $module.data(moduleNamespace) || module;
26396
26342
 
26397
- // get vendor specific events
26398
- animationEnd = module.get.animationEndEvent();
26399
-
26400
26343
  if (methodInvoked) {
26401
26344
  methodInvoked = module.invoke(query);
26402
26345
  }
@@ -26477,11 +26420,7 @@
26477
26420
 
26478
26421
  animate: function (overrideSettings) {
26479
26422
  settings = overrideSettings || settings;
26480
- if (!module.is.supported()) {
26481
- module.error(error.support);
26482
26423
 
26483
- return false;
26484
- }
26485
26424
  module.debug('Preparing animation', settings.animation);
26486
26425
  if (module.is.animating()) {
26487
26426
  if (settings.queue) {
@@ -26520,7 +26459,7 @@
26520
26459
  module.debug('Queueing animation of', animation);
26521
26460
  module.queuing = true;
26522
26461
  $module
26523
- .one(animationEnd + '.queue' + eventNamespace, function () {
26462
+ .one('animationend.queue' + eventNamespace, function () {
26524
26463
  module.queuing = false;
26525
26464
  module.repaint();
26526
26465
  module.animate.apply(this, settings);
@@ -26541,7 +26480,7 @@
26541
26480
  module.restore.conditions();
26542
26481
  module.hide();
26543
26482
  } else if (module.is.inward()) {
26544
- module.verbose('Animation is outward, showing element');
26483
+ module.verbose('Animation is inward, showing element');
26545
26484
  module.restore.conditions();
26546
26485
  module.show();
26547
26486
  } else {
@@ -26700,7 +26639,7 @@
26700
26639
  module.debug('Starting tween', animationClass);
26701
26640
  $module
26702
26641
  .addClass(animationClass)
26703
- .one(animationEnd + '.complete' + eventNamespace, module.complete)
26642
+ .one('animationend.complete' + eventNamespace, module.complete)
26704
26643
  ;
26705
26644
  if (settings.useFailSafe) {
26706
26645
  module.add.failSafe();
@@ -26749,7 +26688,7 @@
26749
26688
  duration = module.get.duration()
26750
26689
  ;
26751
26690
  module.timer = setTimeout(function () {
26752
- $module.triggerHandler(animationEnd);
26691
+ $module.triggerHandler('animationend');
26753
26692
  }, duration + settings.failSafeDelay);
26754
26693
  module.verbose('Adding fail safe timer', module.timer);
26755
26694
  },
@@ -26937,45 +26876,6 @@
26937
26876
  transitionExists: function (animation) {
26938
26877
  return $.fn.transition.exists[animation];
26939
26878
  },
26940
- animationStartEvent: function () {
26941
- var
26942
- element = document.createElement('div'),
26943
- animations = {
26944
- animation: 'animationstart',
26945
- OAnimation: 'oAnimationStart',
26946
- MozAnimation: 'mozAnimationStart',
26947
- WebkitAnimation: 'webkitAnimationStart',
26948
- },
26949
- animation
26950
- ;
26951
- for (animation in animations) {
26952
- if (element.style[animation] !== undefined) {
26953
- return animations[animation];
26954
- }
26955
- }
26956
-
26957
- return false;
26958
- },
26959
- animationEndEvent: function () {
26960
- var
26961
- element = document.createElement('div'),
26962
- animations = {
26963
- animation: 'animationend',
26964
- OAnimation: 'oAnimationEnd',
26965
- MozAnimation: 'mozAnimationEnd',
26966
- WebkitAnimation: 'webkitAnimationEnd',
26967
- },
26968
- animation
26969
- ;
26970
- for (animation in animations) {
26971
- if (element.style[animation] !== undefined) {
26972
- return animations[animation];
26973
- }
26974
- }
26975
-
26976
- return false;
26977
- },
26978
-
26979
26879
  },
26980
26880
 
26981
26881
  can: {
@@ -27075,7 +26975,8 @@
27075
26975
  return $module.css('visibility') === 'hidden';
27076
26976
  },
27077
26977
  supported: function () {
27078
- return animationEnd !== false;
26978
+ // keep method for backward compatibility until 2.10.0
26979
+ return true;
27079
26980
  },
27080
26981
  },
27081
26982
 
@@ -27126,13 +27027,13 @@
27126
27027
 
27127
27028
  stop: function () {
27128
27029
  module.debug('Stopping current animation');
27129
- $module.triggerHandler(animationEnd);
27030
+ $module.triggerHandler('animationend');
27130
27031
  },
27131
27032
 
27132
27033
  stopAll: function () {
27133
27034
  module.debug('Stopping all animation');
27134
27035
  module.remove.queueCallback();
27135
- $module.triggerHandler(animationEnd);
27036
+ $module.triggerHandler('animationend');
27136
27037
  },
27137
27038
 
27138
27039
  clear: {
@@ -27270,8 +27171,7 @@
27270
27171
  $.each(query, function (depth, value) {
27271
27172
  var camelCaseValue = depth !== maxDepth
27272
27173
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
27273
- : query
27274
- ;
27174
+ : query;
27275
27175
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
27276
27176
  object = object[camelCaseValue];
27277
27177
  } else if (object[camelCaseValue] !== undefined) {
@@ -27285,8 +27185,6 @@
27285
27185
 
27286
27186
  return false;
27287
27187
  } else {
27288
- module.error(error.method, query);
27289
-
27290
27188
  return false;
27291
27189
  }
27292
27190
  });
@@ -27402,15 +27300,13 @@
27402
27300
  // possible errors
27403
27301
  error: {
27404
27302
  noAnimation: 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.',
27405
- method: 'The method you called is not defined',
27406
- support: 'This browser does not support CSS animations',
27407
27303
  },
27408
27304
 
27409
27305
  };
27410
27306
  })(jQuery, window, document);
27411
27307
 
27412
27308
  /*!
27413
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - API
27309
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - API
27414
27310
  * https://github.com/fomantic/Fomantic-UI/
27415
27311
  *
27416
27312
  *
@@ -28625,7 +28521,7 @@
28625
28521
  })(jQuery, window, document);
28626
28522
 
28627
28523
  /*!
28628
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - State
28524
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - State
28629
28525
  * https://github.com/fomantic/Fomantic-UI/
28630
28526
  *
28631
28527
  *
@@ -29318,7 +29214,7 @@
29318
29214
  })(jQuery, window, document);
29319
29215
 
29320
29216
  /*!
29321
- * # Fomantic-UI 2.9.2-beta.0+b28e0cb - Visibility
29217
+ * # Fomantic-UI 2.9.2-beta.10+cf51e1c - Visibility
29322
29218
  * https://github.com/fomantic/Fomantic-UI/
29323
29219
  *
29324
29220
  *