fomantic-ui 2.10.0-beta.6 → 2.10.0-beta.7

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 (167) 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 +24 -37
  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 +11 -20
  39. package/dist/components/embed.min.css +1 -1
  40. package/dist/components/embed.min.js +2 -2
  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 +11 -19
  49. package/dist/components/flyout.min.css +1 -1
  50. package/dist/components/flyout.min.js +2 -2
  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 +11 -19
  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 +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 +11 -20
  89. package/dist/components/popup.min.css +1 -1
  90. package/dist/components/popup.min.js +2 -2
  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 +11 -20
  99. package/dist/components/rating.min.css +1 -1
  100. package/dist/components/rating.min.js +2 -2
  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 +15 -20
  107. package/dist/components/search.min.css +1 -1
  108. package/dist/components/search.min.js +2 -2
  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 +11 -19
  147. package/dist/components/toast.min.css +1 -1
  148. package/dist/components/toast.min.js +2 -2
  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 +120 -189
  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 +23 -36
  161. package/src/definitions/modules/embed.js +10 -19
  162. package/src/definitions/modules/flyout.js +10 -18
  163. package/src/definitions/modules/modal.js +10 -18
  164. package/src/definitions/modules/popup.js +10 -19
  165. package/src/definitions/modules/rating.js +10 -19
  166. package/src/definitions/modules/search.js +14 -19
  167. package/src/definitions/modules/toast.js +10 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fomantic-ui",
3
- "version": "2.10.0-beta.6+42a411a",
3
+ "version": "2.10.0-beta.7+13b1bae",
4
4
  "description": "Fomantic empowers designers and developers by creating a shared vocabulary for UI.",
5
5
  "keywords": [
6
6
  "fomantic-ui",
@@ -1757,6 +1757,7 @@
1757
1757
  }
1758
1758
  // down arrow (open menu)
1759
1759
  if (pressedKey === keys.downArrow && !module.is.visible()) {
1760
+ focused = true;
1760
1761
  module.verbose('Down key pressed, showing dropdown');
1761
1762
  module.show();
1762
1763
  event.preventDefault();
@@ -3835,25 +3836,19 @@
3835
3836
  },
3836
3837
  htmlEntities: function (string, forceAmpersand) {
3837
3838
  forceAmpersand = typeof forceAmpersand === 'number' ? false : forceAmpersand;
3838
- var
3839
- badChars = /["'<>]/g,
3840
- shouldEscape = /["&'<>]/,
3841
- escape = {
3842
- '<': '&lt;',
3843
- '>': '&gt;',
3844
- '"': '&quot;',
3845
- "'": '&apos;',
3846
- },
3847
- escapedChar = function (chr) {
3848
- return escape[chr];
3849
- }
3850
- ;
3851
- if (shouldEscape.test(string)) {
3852
- string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&amp;');
3853
- string = string.replace(badChars, escapedChar);
3854
- }
3855
3839
 
3856
- return string;
3840
+ const badChars = forceAmpersand
3841
+ ? /["&'<>]/g
3842
+ : /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
3843
+ const escape = {
3844
+ '"': '&quot;',
3845
+ '&': '&amp;',
3846
+ "'": '&apos;',
3847
+ '<': '&lt;',
3848
+ '>': '&gt;',
3849
+ };
3850
+
3851
+ return string.replace(badChars, (chr) => escape[chr]);
3857
3852
  },
3858
3853
  },
3859
3854
 
@@ -4263,25 +4258,17 @@
4263
4258
  if (settings !== undefined && settings.preserveHTML) {
4264
4259
  return string;
4265
4260
  }
4266
- var
4267
- badChars = /["'<>]/g,
4268
- shouldEscape = /["&'<>]/,
4269
- escape = {
4270
- '<': '&lt;',
4271
- '>': '&gt;',
4272
- '"': '&quot;',
4273
- "'": '&apos;',
4274
- },
4275
- escapedChar = function (chr) {
4276
- return escape[chr];
4277
- }
4278
- ;
4279
- if (shouldEscape.test(string)) {
4280
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
4281
- string = string.replace(badChars, escapedChar);
4282
- }
4283
4261
 
4284
- return string;
4262
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
4263
+ const escape = {
4264
+ '"': '&quot;',
4265
+ '&': '&amp;',
4266
+ "'": '&apos;',
4267
+ '<': '&lt;',
4268
+ '>': '&gt;',
4269
+ };
4270
+
4271
+ return string.replace(badChars, (chr) => escape[chr]);
4285
4272
  },
4286
4273
  // generates dropdown from select values
4287
4274
  dropdown: function (select, settings) {
@@ -646,25 +646,16 @@
646
646
 
647
647
  templates: {
648
648
  escape: function (string) {
649
- var
650
- badChars = /["'<>]/g,
651
- shouldEscape = /["&'<>]/,
652
- escape = {
653
- '<': '&lt;',
654
- '>': '&gt;',
655
- '"': '&quot;',
656
- "'": '&apos;',
657
- },
658
- escapedChar = function (chr) {
659
- return escape[chr];
660
- }
661
- ;
662
- if (shouldEscape.test(string)) {
663
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
664
- string = string.replace(badChars, escapedChar);
665
- }
666
-
667
- return string;
649
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
650
+ const escape = {
651
+ '"': '&quot;',
652
+ '&': '&amp;',
653
+ "'": '&apos;',
654
+ '<': '&lt;',
655
+ '>': '&gt;',
656
+ };
657
+
658
+ return string.replace(badChars, (chr) => escape[chr]);
668
659
  },
669
660
  iframe: function (url, parameters) {
670
661
  var
@@ -1083,25 +1083,17 @@
1083
1083
  if (settings !== undefined && settings.preserveHTML) {
1084
1084
  return string;
1085
1085
  }
1086
- var
1087
- badChars = /["'<>]/g,
1088
- shouldEscape = /["&'<>]/,
1089
- escape = {
1090
- '<': '&lt;',
1091
- '>': '&gt;',
1092
- '"': '&quot;',
1093
- "'": '&apos;',
1094
- },
1095
- escapedChar = function (chr) {
1096
- return escape[chr];
1097
- }
1098
- ;
1099
- if (shouldEscape.test(string)) {
1100
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
1101
- string = string.replace(badChars, escapedChar);
1102
- }
1103
1086
 
1104
- return string;
1087
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
1088
+ const escape = {
1089
+ '"': '&quot;',
1090
+ '&': '&amp;',
1091
+ "'": '&apos;',
1092
+ '<': '&lt;',
1093
+ '>': '&gt;',
1094
+ };
1095
+
1096
+ return string.replace(badChars, (chr) => escape[chr]);
1105
1097
  },
1106
1098
  },
1107
1099
 
@@ -931,25 +931,17 @@
931
931
  if (settings !== undefined && settings.preserveHTML) {
932
932
  return string;
933
933
  }
934
- var
935
- badChars = /["'<>]/g,
936
- shouldEscape = /["&'<>]/,
937
- escape = {
938
- '<': '&lt;',
939
- '>': '&gt;',
940
- '"': '&quot;',
941
- "'": '&apos;',
942
- },
943
- escapedChar = function (chr) {
944
- return escape[chr];
945
- }
946
- ;
947
- if (shouldEscape.test(string)) {
948
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
949
- string = string.replace(badChars, escapedChar);
950
- }
951
934
 
952
- return string;
935
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
936
+ const escape = {
937
+ '"': '&quot;',
938
+ '&': '&amp;',
939
+ "'": '&apos;',
940
+ '<': '&lt;',
941
+ '>': '&gt;',
942
+ };
943
+
944
+ return string.replace(badChars, (chr) => escape[chr]);
953
945
  },
954
946
  },
955
947
  can: {
@@ -1515,25 +1515,16 @@
1515
1515
 
1516
1516
  templates: {
1517
1517
  escape: function (string) {
1518
- var
1519
- badChars = /["'<>]/g,
1520
- shouldEscape = /["&'<>]/,
1521
- escape = {
1522
- '<': '&lt;',
1523
- '>': '&gt;',
1524
- '"': '&quot;',
1525
- "'": '&apos;',
1526
- },
1527
- escapedChar = function (chr) {
1528
- return escape[chr];
1529
- }
1530
- ;
1531
- if (shouldEscape.test(string)) {
1532
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
1533
- string = string.replace(badChars, escapedChar);
1534
- }
1535
-
1536
- return string;
1518
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
1519
+ const escape = {
1520
+ '"': '&quot;',
1521
+ '&': '&amp;',
1522
+ "'": '&apos;',
1523
+ '<': '&lt;',
1524
+ '>': '&gt;',
1525
+ };
1526
+
1527
+ return string.replace(badChars, (chr) => escape[chr]);
1537
1528
  },
1538
1529
  popup: function (text) {
1539
1530
  var
@@ -519,25 +519,16 @@
519
519
 
520
520
  templates: {
521
521
  escape: function (string) {
522
- var
523
- badChars = /["'<>]/g,
524
- shouldEscape = /["&'<>]/,
525
- escape = {
526
- '<': '&lt;',
527
- '>': '&gt;',
528
- '"': '&quot;',
529
- "'": '&apos;',
530
- },
531
- escapedChar = function (chr) {
532
- return escape[chr];
533
- }
534
- ;
535
- if (shouldEscape.test(string)) {
536
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
537
- string = string.replace(badChars, escapedChar);
538
- }
539
-
540
- return string;
522
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
523
+ const escape = {
524
+ '"': '&quot;',
525
+ '&': '&amp;',
526
+ "'": '&apos;',
527
+ '<': '&lt;',
528
+ '>': '&gt;',
529
+ };
530
+
531
+ return string.replace(badChars, (chr) => escape[chr]);
541
532
  },
542
533
  icon: function (maxRating, iconClass) {
543
534
  var
@@ -1475,25 +1475,20 @@
1475
1475
  if (settings !== undefined && settings.preserveHTML) {
1476
1476
  return string;
1477
1477
  }
1478
- var
1479
- badChars = /["'<>]/g,
1480
- shouldEscape = /["&'<>]/,
1481
- escape = {
1482
- '<': '&lt;',
1483
- '>': '&gt;',
1484
- '"': '&quot;',
1485
- "'": '&apos;',
1486
- },
1487
- escapedChar = function (chr) {
1488
- return escape[chr];
1489
- }
1490
- ;
1491
- if (shouldEscape.test(string)) {
1492
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
1493
- string = string.replace(badChars, escapedChar);
1494
- // FUI controlled HTML is still allowed
1495
- string = string.replace(/&lt;(\/)*mark&gt;/g, '<$1mark>');
1496
- }
1478
+
1479
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
1480
+ const escape = {
1481
+ '"': '&quot;',
1482
+ '&': '&amp;',
1483
+ "'": '&apos;',
1484
+ '<': '&lt;',
1485
+ '>': '&gt;',
1486
+ };
1487
+
1488
+ string = string.replace(badChars, (chr) => escape[chr]);
1489
+
1490
+ // FUI controlled HTML is still allowed
1491
+ string = string.replace(/&lt;(\/)*mark&gt;/g, '<$1mark>');
1497
1492
 
1498
1493
  return string;
1499
1494
  },
@@ -596,25 +596,17 @@
596
596
  if (settings !== undefined && settings.preserveHTML) {
597
597
  return string;
598
598
  }
599
- var
600
- badChars = /["'<>]/g,
601
- shouldEscape = /["&'<>]/,
602
- escape = {
603
- '<': '&lt;',
604
- '>': '&gt;',
605
- '"': '&quot;',
606
- "'": '&apos;',
607
- },
608
- escapedChar = function (chr) {
609
- return escape[chr];
610
- }
611
- ;
612
- if (shouldEscape.test(string)) {
613
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
614
- string = string.replace(badChars, escapedChar);
615
- }
616
599
 
617
- return string;
600
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
601
+ const escape = {
602
+ '"': '&quot;',
603
+ '&': '&amp;',
604
+ "'": '&apos;',
605
+ '<': '&lt;',
606
+ '>': '&gt;',
607
+ };
608
+
609
+ return string.replace(badChars, (chr) => escape[chr]);
618
610
  },
619
611
  },
620
612