fomantic-ui 2.9.4-beta.36 → 2.9.4-beta.38

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 (160) hide show
  1. package/dist/components/accordion.css +1 -1
  2. package/dist/components/accordion.js +1 -1
  3. package/dist/components/accordion.min.css +1 -1
  4. package/dist/components/accordion.min.js +1 -1
  5. package/dist/components/ad.css +1 -1
  6. package/dist/components/ad.min.css +1 -1
  7. package/dist/components/api.js +1 -1
  8. package/dist/components/api.min.js +1 -1
  9. package/dist/components/breadcrumb.css +1 -1
  10. package/dist/components/breadcrumb.min.css +1 -1
  11. package/dist/components/button.css +1 -1
  12. package/dist/components/button.min.css +1 -1
  13. package/dist/components/calendar.css +1 -1
  14. package/dist/components/calendar.js +1 -1
  15. package/dist/components/calendar.min.css +1 -1
  16. package/dist/components/calendar.min.js +1 -1
  17. package/dist/components/card.css +1 -1
  18. package/dist/components/card.min.css +1 -1
  19. package/dist/components/checkbox.css +1 -1
  20. package/dist/components/checkbox.js +1 -1
  21. package/dist/components/checkbox.min.css +1 -1
  22. package/dist/components/checkbox.min.js +1 -1
  23. package/dist/components/comment.css +1 -1
  24. package/dist/components/comment.min.css +1 -1
  25. package/dist/components/container.css +1 -1
  26. package/dist/components/container.min.css +1 -1
  27. package/dist/components/dimmer.css +1 -1
  28. package/dist/components/dimmer.js +1 -1
  29. package/dist/components/dimmer.min.css +1 -1
  30. package/dist/components/dimmer.min.js +1 -1
  31. package/dist/components/divider.css +1 -1
  32. package/dist/components/divider.min.css +1 -1
  33. package/dist/components/dropdown.css +1 -1
  34. package/dist/components/dropdown.js +34 -13
  35. package/dist/components/dropdown.min.css +1 -1
  36. package/dist/components/dropdown.min.js +2 -2
  37. package/dist/components/embed.css +1 -1
  38. package/dist/components/embed.js +1 -1
  39. package/dist/components/embed.min.css +1 -1
  40. package/dist/components/embed.min.js +1 -1
  41. package/dist/components/emoji.css +1 -1
  42. package/dist/components/emoji.min.css +1 -1
  43. package/dist/components/feed.css +1 -1
  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 +1 -1
  48. package/dist/components/flyout.js +1 -1
  49. package/dist/components/flyout.min.css +1 -1
  50. package/dist/components/flyout.min.js +1 -1
  51. package/dist/components/form.css +1 -1
  52. package/dist/components/form.js +1 -1
  53. package/dist/components/form.min.css +1 -1
  54. package/dist/components/form.min.js +1 -1
  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 +1 -1
  64. package/dist/components/input.min.css +1 -1
  65. package/dist/components/item.css +1 -1
  66. package/dist/components/item.min.css +1 -1
  67. package/dist/components/label.css +1 -1
  68. package/dist/components/label.min.css +1 -1
  69. package/dist/components/list.css +1 -1
  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 +1 -1
  74. package/dist/components/menu.min.css +1 -1
  75. package/dist/components/message.css +1 -1
  76. package/dist/components/message.min.css +1 -1
  77. package/dist/components/modal.css +1 -1
  78. package/dist/components/modal.js +1 -1
  79. package/dist/components/modal.min.css +1 -1
  80. package/dist/components/modal.min.js +1 -1
  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 +1 -1
  86. package/dist/components/placeholder.min.css +1 -1
  87. package/dist/components/popup.css +1 -1
  88. package/dist/components/popup.js +1 -1
  89. package/dist/components/popup.min.css +1 -1
  90. package/dist/components/popup.min.js +1 -1
  91. package/dist/components/progress.css +1 -1
  92. package/dist/components/progress.js +1 -1
  93. package/dist/components/progress.min.css +1 -1
  94. package/dist/components/progress.min.js +1 -1
  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 +1 -1
  107. package/dist/components/search.min.css +1 -1
  108. package/dist/components/search.min.js +1 -1
  109. package/dist/components/segment.css +1 -1
  110. package/dist/components/segment.min.css +1 -1
  111. package/dist/components/shape.css +1 -1
  112. package/dist/components/shape.js +1 -1
  113. package/dist/components/shape.min.css +1 -1
  114. package/dist/components/shape.min.js +1 -1
  115. package/dist/components/sidebar.css +1 -1
  116. package/dist/components/sidebar.js +1 -1
  117. package/dist/components/sidebar.min.css +1 -1
  118. package/dist/components/sidebar.min.js +1 -1
  119. package/dist/components/site.css +1 -1
  120. package/dist/components/site.js +1 -1
  121. package/dist/components/site.min.css +1 -1
  122. package/dist/components/site.min.js +1 -1
  123. package/dist/components/slider.css +1 -1
  124. package/dist/components/slider.js +1 -1
  125. package/dist/components/slider.min.css +1 -1
  126. package/dist/components/slider.min.js +1 -1
  127. package/dist/components/state.js +1 -1
  128. package/dist/components/state.min.js +1 -1
  129. package/dist/components/statistic.css +1 -1
  130. package/dist/components/statistic.min.css +1 -1
  131. package/dist/components/step.css +1 -1
  132. package/dist/components/step.min.css +1 -1
  133. package/dist/components/sticky.css +1 -1
  134. package/dist/components/sticky.js +1 -1
  135. package/dist/components/sticky.min.css +1 -1
  136. package/dist/components/sticky.min.js +1 -1
  137. package/dist/components/tab.css +1 -1
  138. package/dist/components/tab.js +1 -1
  139. package/dist/components/tab.min.css +1 -1
  140. package/dist/components/tab.min.js +1 -1
  141. package/dist/components/table.css +1 -1
  142. package/dist/components/table.min.css +1 -1
  143. package/dist/components/text.css +1 -1
  144. package/dist/components/text.min.css +1 -1
  145. package/dist/components/toast.css +1 -1
  146. package/dist/components/toast.js +1 -1
  147. package/dist/components/toast.min.css +1 -1
  148. package/dist/components/toast.min.js +1 -1
  149. package/dist/components/transition.css +1 -1
  150. package/dist/components/transition.js +1 -1
  151. package/dist/components/transition.min.css +1 -1
  152. package/dist/components/transition.min.js +1 -1
  153. package/dist/components/visibility.js +1 -1
  154. package/dist/components/visibility.min.js +1 -1
  155. package/dist/semantic.css +53 -53
  156. package/dist/semantic.js +59 -38
  157. package/dist/semantic.min.css +1 -1
  158. package/dist/semantic.min.js +2 -2
  159. package/package.json +1 -1
  160. package/src/definitions/modules/dropdown.js +33 -12
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.4-beta.36+850881c
2
+ * # Fomantic UI - 2.9.4-beta.38+18b5554
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.4-beta.36+850881c - Site
12
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Site
13
13
  * https://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -465,7 +465,7 @@
465
465
  })(jQuery, window, document);
466
466
 
467
467
  /*!
468
- * # Fomantic-UI 2.9.4-beta.36+850881c - Form Validation
468
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Form Validation
469
469
  * https://github.com/fomantic/Fomantic-UI/
470
470
  *
471
471
  *
@@ -2647,7 +2647,7 @@
2647
2647
  })(jQuery, window, document);
2648
2648
 
2649
2649
  /*!
2650
- * # Fomantic-UI 2.9.4-beta.36+850881c - Accordion
2650
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Accordion
2651
2651
  * https://github.com/fomantic/Fomantic-UI/
2652
2652
  *
2653
2653
  *
@@ -3243,7 +3243,7 @@
3243
3243
  })(jQuery, window, document);
3244
3244
 
3245
3245
  /*!
3246
- * # Fomantic-UI 2.9.4-beta.36+850881c - Calendar
3246
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Calendar
3247
3247
  * https://github.com/fomantic/Fomantic-UI/
3248
3248
  *
3249
3249
  *
@@ -5256,7 +5256,7 @@
5256
5256
  })(jQuery, window, document);
5257
5257
 
5258
5258
  /*!
5259
- * # Fomantic-UI 2.9.4-beta.36+850881c - Checkbox
5259
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Checkbox
5260
5260
  * https://github.com/fomantic/Fomantic-UI/
5261
5261
  *
5262
5262
  *
@@ -6145,7 +6145,7 @@
6145
6145
  })(jQuery, window, document);
6146
6146
 
6147
6147
  /*!
6148
- * # Fomantic-UI 2.9.4-beta.36+850881c - Dimmer
6148
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Dimmer
6149
6149
  * https://github.com/fomantic/Fomantic-UI/
6150
6150
  *
6151
6151
  *
@@ -6878,7 +6878,7 @@
6878
6878
  })(jQuery, window, document);
6879
6879
 
6880
6880
  /*!
6881
- * # Fomantic-UI 2.9.4-beta.36+850881c - Dropdown
6881
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Dropdown
6882
6882
  * https://github.com/fomantic/Fomantic-UI/
6883
6883
  *
6884
6884
  *
@@ -7672,7 +7672,7 @@
7672
7672
  }
7673
7673
  if (module.is.multiple()) {
7674
7674
  $.each(preSelected, function (index, value) {
7675
- $item.filter('[data-value="' + value + '"]')
7675
+ $item.filter('[data-' + metadata.value + '="' + value + '"]')
7676
7676
  .addClass(className.filtered)
7677
7677
  ;
7678
7678
  });
@@ -9677,19 +9677,27 @@
9677
9677
  $selectedItem = settings.allowAdditions
9678
9678
  ? $selectedItem || module.get.itemWithAdditions(value)
9679
9679
  : $selectedItem || module.get.item(value);
9680
- if (!$selectedItem) {
9680
+ if (!$selectedItem && value !== undefined) {
9681
9681
  return false;
9682
9682
  }
9683
- module.debug('Setting selected menu item to', $selectedItem);
9684
- if (module.is.multiple() && !keepSearchTerm) {
9685
- module.remove.searchWidth();
9686
- }
9687
- if (module.is.single()) {
9683
+ if (isMultiple) {
9684
+ if (!keepSearchTerm) {
9685
+ module.remove.searchWidth();
9686
+ }
9687
+ if (settings.useLabels) {
9688
+ module.remove.selectedItem();
9689
+ if (value === undefined) {
9690
+ module.remove.labels($module.find(selector.label), true);
9691
+ }
9692
+ }
9693
+ } else {
9688
9694
  module.remove.activeItem();
9689
9695
  module.remove.selectedItem();
9690
- } else if (settings.useLabels) {
9691
- module.remove.selectedItem();
9692
9696
  }
9697
+ if (!$selectedItem) {
9698
+ return false;
9699
+ }
9700
+ module.debug('Setting selected menu item to', $selectedItem);
9693
9701
  // select each item
9694
9702
  $selectedItem
9695
9703
  .each(function () {
@@ -11042,6 +11050,7 @@
11042
11050
  descriptionVertical: 'descriptionVertical', // whether description should be vertical
11043
11051
  value: 'value', // actual dropdown value
11044
11052
  text: 'text', // displayed text when selected
11053
+ data: 'data', // custom data attributes
11045
11054
  type: 'type', // type of dropdown element
11046
11055
  image: 'image', // optional image path
11047
11056
  imageClass: 'imageClass', // optional individual class for image
@@ -11186,9 +11195,21 @@
11186
11195
  $.each(values, function (index, option) {
11187
11196
  var
11188
11197
  itemType = option[fields.type] || 'item',
11189
- isMenu = itemType.indexOf('menu') !== -1
11198
+ isMenu = itemType.indexOf('menu') !== -1,
11199
+ maybeData = '',
11200
+ dataObject = option[fields.data]
11190
11201
  ;
11191
-
11202
+ if (dataObject) {
11203
+ var dataKey,
11204
+ dataKeyEscaped
11205
+ ;
11206
+ for (dataKey in dataObject) {
11207
+ dataKeyEscaped = String(dataKey).replace(/\W/g, '');
11208
+ if (Object.prototype.hasOwnProperty.call(dataObject, dataKey) && ['text', 'value'].indexOf(dataKeyEscaped.toLowerCase()) === -1) {
11209
+ maybeData += ' data-' + dataKeyEscaped + '="' + deQuote(String(dataObject[dataKey])) + '"';
11210
+ }
11211
+ }
11212
+ }
11192
11213
  if (itemType === 'item' || isMenu) {
11193
11214
  var
11194
11215
  maybeText = option[fields.text]
@@ -11205,7 +11226,7 @@
11205
11226
  : '',
11206
11227
  hasDescription = escape(option[fields.description] || '', preserveHTML) !== ''
11207
11228
  ;
11208
- html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
11229
+ html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + maybeData + '>';
11209
11230
  if (isMenu) {
11210
11231
  html += '<i class="' + (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
11211
11232
  }
@@ -11278,7 +11299,7 @@
11278
11299
  })(jQuery, window, document);
11279
11300
 
11280
11301
  /*!
11281
- * # Fomantic-UI 2.9.4-beta.36+850881c - Embed
11302
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Embed
11282
11303
  * https://github.com/fomantic/Fomantic-UI/
11283
11304
  *
11284
11305
  *
@@ -11959,7 +11980,7 @@
11959
11980
  })(jQuery, window, document);
11960
11981
 
11961
11982
  /*!
11962
- * # Fomantic-UI 2.9.4-beta.36+850881c - Flyout
11983
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Flyout
11963
11984
  * https://github.com/fomantic/Fomantic-UI/
11964
11985
  *
11965
11986
  *
@@ -13511,7 +13532,7 @@
13511
13532
  })(jQuery, window, document);
13512
13533
 
13513
13534
  /*!
13514
- * # Fomantic-UI 2.9.4-beta.36+850881c - Modal
13535
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Modal
13515
13536
  * https://github.com/fomantic/Fomantic-UI/
13516
13537
  *
13517
13538
  *
@@ -15149,7 +15170,7 @@
15149
15170
  })(jQuery, window, document);
15150
15171
 
15151
15172
  /*!
15152
- * # Fomantic-UI 2.9.4-beta.36+850881c - Nag
15173
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Nag
15153
15174
  * https://github.com/fomantic/Fomantic-UI/
15154
15175
  *
15155
15176
  *
@@ -15716,7 +15737,7 @@
15716
15737
  })(jQuery, window, document);
15717
15738
 
15718
15739
  /*!
15719
- * # Fomantic-UI 2.9.4-beta.36+850881c - Popup
15740
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Popup
15720
15741
  * https://github.com/fomantic/Fomantic-UI/
15721
15742
  *
15722
15743
  *
@@ -17278,7 +17299,7 @@
17278
17299
  })(jQuery, window, document);
17279
17300
 
17280
17301
  /*!
17281
- * # Fomantic-UI 2.9.4-beta.36+850881c - Progress
17302
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Progress
17282
17303
  * https://github.com/fomantic/Fomantic-UI/
17283
17304
  *
17284
17305
  *
@@ -18258,7 +18279,7 @@
18258
18279
  })(jQuery, window, document);
18259
18280
 
18260
18281
  /*!
18261
- * # Fomantic-UI 2.9.4-beta.36+850881c - Slider
18282
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Slider
18262
18283
  * https://github.com/fomantic/Fomantic-UI/
18263
18284
  *
18264
18285
  *
@@ -19709,7 +19730,7 @@
19709
19730
  })(jQuery, window, document);
19710
19731
 
19711
19732
  /*!
19712
- * # Fomantic-UI 2.9.4-beta.36+850881c - Rating
19733
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Rating
19713
19734
  * https://github.com/fomantic/Fomantic-UI/
19714
19735
  *
19715
19736
  *
@@ -20250,7 +20271,7 @@
20250
20271
  })(jQuery, window, document);
20251
20272
 
20252
20273
  /*!
20253
- * # Fomantic-UI 2.9.4-beta.36+850881c - Search
20274
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Search
20254
20275
  * https://github.com/fomantic/Fomantic-UI/
20255
20276
  *
20256
20277
  *
@@ -21880,7 +21901,7 @@
21880
21901
  })(jQuery, window, document);
21881
21902
 
21882
21903
  /*!
21883
- * # Fomantic-UI 2.9.4-beta.36+850881c - Shape
21904
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Shape
21884
21905
  * https://github.com/fomantic/Fomantic-UI/
21885
21906
  *
21886
21907
  *
@@ -22678,7 +22699,7 @@
22678
22699
  })(jQuery, window, document);
22679
22700
 
22680
22701
  /*!
22681
- * # Fomantic-UI 2.9.4-beta.36+850881c - Sidebar
22702
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Sidebar
22682
22703
  * https://github.com/fomantic/Fomantic-UI/
22683
22704
  *
22684
22705
  *
@@ -23733,7 +23754,7 @@
23733
23754
  })(jQuery, window, document);
23734
23755
 
23735
23756
  /*!
23736
- * # Fomantic-UI 2.9.4-beta.36+850881c - Sticky
23757
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Sticky
23737
23758
  * https://github.com/fomantic/Fomantic-UI/
23738
23759
  *
23739
23760
  *
@@ -24651,7 +24672,7 @@
24651
24672
  })(jQuery, window, document);
24652
24673
 
24653
24674
  /*!
24654
- * # Fomantic-UI 2.9.4-beta.36+850881c - Tab
24675
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Tab
24655
24676
  * https://github.com/fomantic/Fomantic-UI/
24656
24677
  *
24657
24678
  *
@@ -25619,7 +25640,7 @@
25619
25640
  })(jQuery, window, document);
25620
25641
 
25621
25642
  /*!
25622
- * # Fomantic-UI 2.9.4-beta.36+850881c - Toast
25643
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Toast
25623
25644
  * https://github.com/fomantic/Fomantic-UI/
25624
25645
  *
25625
25646
  *
@@ -26582,7 +26603,7 @@
26582
26603
  })(jQuery, window, document);
26583
26604
 
26584
26605
  /*!
26585
- * # Fomantic-UI 2.9.4-beta.36+850881c - Transition
26606
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Transition
26586
26607
  * https://github.com/fomantic/Fomantic-UI/
26587
26608
  *
26588
26609
  *
@@ -27617,7 +27638,7 @@
27617
27638
  })(jQuery, window, document);
27618
27639
 
27619
27640
  /*!
27620
- * # Fomantic-UI 2.9.4-beta.36+850881c - API
27641
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - API
27621
27642
  * https://github.com/fomantic/Fomantic-UI/
27622
27643
  *
27623
27644
  *
@@ -28843,7 +28864,7 @@
28843
28864
  })(jQuery, window, document);
28844
28865
 
28845
28866
  /*!
28846
- * # Fomantic-UI 2.9.4-beta.36+850881c - State
28867
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - State
28847
28868
  * https://github.com/fomantic/Fomantic-UI/
28848
28869
  *
28849
28870
  *
@@ -29541,7 +29562,7 @@
29541
29562
  })(jQuery, window, document);
29542
29563
 
29543
29564
  /*!
29544
- * # Fomantic-UI 2.9.4-beta.36+850881c - Visibility
29565
+ * # Fomantic-UI 2.9.4-beta.38+18b5554 - Visibility
29545
29566
  * https://github.com/fomantic/Fomantic-UI/
29546
29567
  *
29547
29568
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.4-beta.36+850881c
2
+ * # Fomantic UI - 2.9.4-beta.38+18b5554
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *