fomantic-ui 2.9.3-beta.2 → 2.9.3-beta.21

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 (246) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/dist/components/accordion.css +1 -1
  3. package/dist/components/accordion.js +1 -1
  4. package/dist/components/accordion.min.css +1 -1
  5. package/dist/components/accordion.min.js +1 -1
  6. package/dist/components/ad.css +1 -1
  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 +2 -2
  13. package/dist/components/button.min.css +2 -2
  14. package/dist/components/calendar.css +6 -6
  15. package/dist/components/calendar.js +1 -1
  16. package/dist/components/calendar.min.css +2 -2
  17. package/dist/components/calendar.min.js +1 -1
  18. package/dist/components/card.css +1 -1
  19. package/dist/components/card.min.css +1 -1
  20. package/dist/components/checkbox.css +1 -1
  21. package/dist/components/checkbox.js +1 -1
  22. package/dist/components/checkbox.min.css +1 -1
  23. package/dist/components/checkbox.min.js +1 -1
  24. package/dist/components/comment.css +1 -1
  25. package/dist/components/comment.min.css +1 -1
  26. package/dist/components/container.css +62 -1
  27. package/dist/components/container.min.css +2 -2
  28. package/dist/components/dimmer.css +3 -3
  29. package/dist/components/dimmer.js +1 -1
  30. package/dist/components/dimmer.min.css +2 -2
  31. package/dist/components/dimmer.min.js +1 -1
  32. package/dist/components/divider.css +1 -1
  33. package/dist/components/divider.min.css +1 -1
  34. package/dist/components/dropdown.css +42 -4
  35. package/dist/components/dropdown.js +22 -12
  36. package/dist/components/dropdown.min.css +2 -2
  37. package/dist/components/dropdown.min.js +2 -2
  38. package/dist/components/embed.css +1 -1
  39. package/dist/components/embed.js +1 -1
  40. package/dist/components/embed.min.css +1 -1
  41. package/dist/components/embed.min.js +1 -1
  42. package/dist/components/emoji.css +1 -1
  43. package/dist/components/emoji.min.css +1 -1
  44. package/dist/components/feed.css +1 -1
  45. package/dist/components/feed.min.css +1 -1
  46. package/dist/components/flag.css +3 -2
  47. package/dist/components/flag.min.css +2 -2
  48. package/dist/components/flyout.css +1 -1
  49. package/dist/components/flyout.js +26 -20
  50. package/dist/components/flyout.min.css +1 -1
  51. package/dist/components/flyout.min.js +2 -2
  52. package/dist/components/form.css +53 -20
  53. package/dist/components/form.js +78 -44
  54. package/dist/components/form.min.css +2 -2
  55. package/dist/components/form.min.js +2 -2
  56. package/dist/components/grid.css +107 -107
  57. package/dist/components/grid.min.css +2 -2
  58. package/dist/components/header.css +1 -1
  59. package/dist/components/header.min.css +1 -1
  60. package/dist/components/icon.css +1 -1
  61. package/dist/components/icon.min.css +1 -1
  62. package/dist/components/image.css +1 -1
  63. package/dist/components/image.min.css +1 -1
  64. package/dist/components/input.css +3 -27
  65. package/dist/components/input.min.css +2 -2
  66. package/dist/components/item.css +1 -1
  67. package/dist/components/item.min.css +1 -1
  68. package/dist/components/label.css +21 -2
  69. package/dist/components/label.min.css +2 -2
  70. package/dist/components/list.css +13 -13
  71. package/dist/components/list.min.css +2 -2
  72. package/dist/components/loader.css +282 -282
  73. package/dist/components/loader.min.css +2 -2
  74. package/dist/components/menu.css +9 -3
  75. package/dist/components/menu.min.css +2 -2
  76. package/dist/components/message.css +1 -1
  77. package/dist/components/message.min.css +1 -1
  78. package/dist/components/modal.css +10 -3
  79. package/dist/components/modal.js +31 -26
  80. package/dist/components/modal.min.css +2 -2
  81. package/dist/components/modal.min.js +2 -2
  82. package/dist/components/nag.css +1 -1
  83. package/dist/components/nag.js +1 -1
  84. package/dist/components/nag.min.css +1 -1
  85. package/dist/components/nag.min.js +1 -1
  86. package/dist/components/placeholder.css +1 -1
  87. package/dist/components/placeholder.min.css +1 -1
  88. package/dist/components/popup.css +41 -40
  89. package/dist/components/popup.js +8 -6
  90. package/dist/components/popup.min.css +2 -2
  91. package/dist/components/popup.min.js +2 -2
  92. package/dist/components/progress.css +1 -1
  93. package/dist/components/progress.js +1 -1
  94. package/dist/components/progress.min.css +1 -1
  95. package/dist/components/progress.min.js +1 -1
  96. package/dist/components/rail.css +1 -1
  97. package/dist/components/rail.min.css +1 -1
  98. package/dist/components/rating.css +1 -1
  99. package/dist/components/rating.js +1 -1
  100. package/dist/components/rating.min.css +1 -1
  101. package/dist/components/rating.min.js +1 -1
  102. package/dist/components/reset.css +1 -1
  103. package/dist/components/reset.min.css +1 -1
  104. package/dist/components/reveal.css +1 -1
  105. package/dist/components/reveal.min.css +1 -1
  106. package/dist/components/search.css +17 -1
  107. package/dist/components/search.js +3 -2
  108. package/dist/components/search.min.css +2 -2
  109. package/dist/components/search.min.js +2 -2
  110. package/dist/components/segment.css +159 -33
  111. package/dist/components/segment.min.css +2 -2
  112. package/dist/components/shape.css +1 -1
  113. package/dist/components/shape.js +1 -1
  114. package/dist/components/shape.min.css +1 -1
  115. package/dist/components/shape.min.js +1 -1
  116. package/dist/components/sidebar.css +1 -1
  117. package/dist/components/sidebar.js +1 -1
  118. package/dist/components/sidebar.min.css +1 -1
  119. package/dist/components/sidebar.min.js +1 -1
  120. package/dist/components/site.css +1 -1
  121. package/dist/components/site.js +1 -1
  122. package/dist/components/site.min.css +1 -1
  123. package/dist/components/site.min.js +1 -1
  124. package/dist/components/slider.css +1 -1
  125. package/dist/components/slider.js +122 -26
  126. package/dist/components/slider.min.css +1 -1
  127. package/dist/components/slider.min.js +2 -2
  128. package/dist/components/state.js +1 -1
  129. package/dist/components/state.min.js +1 -1
  130. package/dist/components/statistic.css +1 -1
  131. package/dist/components/statistic.min.css +1 -1
  132. package/dist/components/step.css +1 -1
  133. package/dist/components/step.min.css +1 -1
  134. package/dist/components/sticky.css +1 -1
  135. package/dist/components/sticky.js +1 -1
  136. package/dist/components/sticky.min.css +1 -1
  137. package/dist/components/sticky.min.js +1 -1
  138. package/dist/components/tab.css +1 -1
  139. package/dist/components/tab.js +1 -1
  140. package/dist/components/tab.min.css +1 -1
  141. package/dist/components/tab.min.js +1 -1
  142. package/dist/components/table.css +65 -1
  143. package/dist/components/table.min.css +2 -2
  144. package/dist/components/text.css +1 -1
  145. package/dist/components/text.min.css +1 -1
  146. package/dist/components/toast.css +6 -1
  147. package/dist/components/toast.js +2 -2
  148. package/dist/components/toast.min.css +2 -2
  149. package/dist/components/toast.min.js +2 -2
  150. package/dist/components/transition.css +1 -1
  151. package/dist/components/transition.js +1 -1
  152. package/dist/components/transition.min.css +1 -1
  153. package/dist/components/transition.min.js +1 -1
  154. package/dist/components/visibility.js +1 -1
  155. package/dist/components/visibility.min.js +1 -1
  156. package/dist/semantic.css +1055 -593
  157. package/dist/semantic.js +310 -156
  158. package/dist/semantic.min.css +2 -2
  159. package/dist/semantic.min.js +2 -2
  160. package/package.json +1 -1
  161. package/src/definitions/behaviors/form.js +77 -43
  162. package/src/definitions/collections/breadcrumb.less +2 -1
  163. package/src/definitions/collections/form.less +27 -13
  164. package/src/definitions/collections/grid.less +108 -107
  165. package/src/definitions/collections/menu.less +29 -21
  166. package/src/definitions/collections/message.less +2 -1
  167. package/src/definitions/collections/table.less +68 -1
  168. package/src/definitions/elements/button.less +4 -2
  169. package/src/definitions/elements/container.less +65 -1
  170. package/src/definitions/elements/divider.less +2 -1
  171. package/src/definitions/elements/emoji.less +2 -1
  172. package/src/definitions/elements/flag.less +2 -1
  173. package/src/definitions/elements/header.less +2 -1
  174. package/src/definitions/elements/icon.less +2 -1
  175. package/src/definitions/elements/image.less +2 -1
  176. package/src/definitions/elements/input.less +4 -3
  177. package/src/definitions/elements/label.less +23 -2
  178. package/src/definitions/elements/list.less +14 -13
  179. package/src/definitions/elements/loader.less +73 -72
  180. package/src/definitions/elements/placeholder.less +2 -1
  181. package/src/definitions/elements/rail.less +2 -1
  182. package/src/definitions/elements/reveal.less +2 -1
  183. package/src/definitions/elements/segment.less +112 -14
  184. package/src/definitions/elements/step.less +2 -1
  185. package/src/definitions/elements/text.less +2 -1
  186. package/src/definitions/globals/reset.less +2 -1
  187. package/src/definitions/globals/site.less +2 -1
  188. package/src/definitions/modules/accordion.less +2 -1
  189. package/src/definitions/modules/calendar.less +3 -2
  190. package/src/definitions/modules/checkbox.less +2 -1
  191. package/src/definitions/modules/dimmer.less +4 -3
  192. package/src/definitions/modules/dropdown.js +21 -11
  193. package/src/definitions/modules/dropdown.less +55 -4
  194. package/src/definitions/modules/embed.less +2 -1
  195. package/src/definitions/modules/flyout.js +25 -19
  196. package/src/definitions/modules/flyout.less +2 -1
  197. package/src/definitions/modules/modal.js +30 -25
  198. package/src/definitions/modules/modal.less +13 -3
  199. package/src/definitions/modules/nag.less +3 -1
  200. package/src/definitions/modules/popup.js +7 -5
  201. package/src/definitions/modules/popup.less +42 -39
  202. package/src/definitions/modules/progress.less +2 -1
  203. package/src/definitions/modules/rating.less +2 -1
  204. package/src/definitions/modules/search.js +2 -1
  205. package/src/definitions/modules/search.less +20 -1
  206. package/src/definitions/modules/shape.less +2 -1
  207. package/src/definitions/modules/sidebar.less +2 -1
  208. package/src/definitions/modules/slider.js +121 -25
  209. package/src/definitions/modules/slider.less +2 -1
  210. package/src/definitions/modules/sticky.less +2 -1
  211. package/src/definitions/modules/tab.less +2 -1
  212. package/src/definitions/modules/toast.js +1 -1
  213. package/src/definitions/modules/toast.less +9 -1
  214. package/src/definitions/modules/transition.less +2 -1
  215. package/src/definitions/views/ad.less +2 -1
  216. package/src/definitions/views/card.less +2 -1
  217. package/src/definitions/views/comment.less +2 -1
  218. package/src/definitions/views/feed.less +2 -1
  219. package/src/definitions/views/item.less +2 -1
  220. package/src/definitions/views/statistic.less +2 -1
  221. package/src/overrides.less +7 -0
  222. package/src/theme.less +7 -6
  223. package/src/themes/amazon/elements/button.variables +5 -1
  224. package/src/themes/bootstrap3/elements/button.variables +5 -1
  225. package/src/themes/chubby/elements/header.variables +6 -1
  226. package/src/themes/default/collections/message.variables +3 -9
  227. package/src/themes/default/collections/table.variables +3 -0
  228. package/src/themes/default/elements/button.variables +1 -3
  229. package/src/themes/default/elements/container.variables +3 -0
  230. package/src/themes/default/elements/flag.variables +1 -1
  231. package/src/themes/default/elements/label.variables +5 -0
  232. package/src/themes/default/elements/segment.variables +8 -0
  233. package/src/themes/default/globals/site.variables +20 -1
  234. package/src/themes/default/globals/variation.variables +7 -1
  235. package/src/themes/default/modules/dropdown.variables +6 -0
  236. package/src/themes/default/modules/modal.variables +4 -0
  237. package/src/themes/default/modules/popup.variables +3 -1
  238. package/src/themes/default/modules/search.variables +3 -0
  239. package/src/themes/default/modules/toast.variables +1 -0
  240. package/src/themes/default/views/card.variables +4 -12
  241. package/src/themes/github/elements/button.variables +5 -1
  242. package/src/themes/twitter/elements/button.variables +5 -1
  243. package/tasks/admin/distributions/create.js +8 -3
  244. package/tasks/config/project/install.js +3 -0
  245. package/tasks/config/tasks.js +1 -8
  246. package/tasks/install.js +15 -5
@@ -102,7 +102,8 @@
102
102
  selectObserver,
103
103
  menuObserver,
104
104
  classObserver,
105
- module
105
+ module,
106
+ tempDisableApiCache = false
106
107
  ;
107
108
 
108
109
  module = {
@@ -869,11 +870,12 @@
869
870
  if (!$module.api('get request')) {
870
871
  module.setup.api();
871
872
  }
872
- apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings, apiCallbacks);
873
+ apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings, apiCallbacks, tempDisableApiCache ? { cache: false } : {});
873
874
  $module
874
875
  .api('setting', apiSettings)
875
876
  .api('query')
876
877
  ;
878
+ tempDisableApiCache = false;
877
879
  },
878
880
 
879
881
  filterItems: function (query) {
@@ -1405,11 +1407,13 @@
1405
1407
  if (settings.allowAdditions) {
1406
1408
  module.remove.userAddition();
1407
1409
  }
1408
- module.remove.filteredItem();
1410
+ if (!settings.keepSearchTerm) {
1411
+ module.remove.filteredItem();
1412
+ module.remove.searchTerm();
1413
+ }
1409
1414
  if (!module.is.visible() && $target.length > 0) {
1410
1415
  module.show();
1411
1416
  }
1412
- module.remove.searchTerm();
1413
1417
  if (!module.is.focusedOnSearch() && skipRefocus !== true) {
1414
1418
  module.focusSearch(true);
1415
1419
  }
@@ -1595,7 +1599,9 @@
1595
1599
  module.verbose('Selecting item from keyboard shortcut', $selectedItem);
1596
1600
  module.event.item.click.call($selectedItem, event);
1597
1601
  if (module.is.searchSelection()) {
1598
- module.remove.searchTerm();
1602
+ if (!settings.keepSearchTerm) {
1603
+ module.remove.searchTerm();
1604
+ }
1599
1605
  if (module.is.multiple()) {
1600
1606
  $search.trigger('focus');
1601
1607
  }
@@ -1812,7 +1818,7 @@
1812
1818
  ? value
1813
1819
  : text;
1814
1820
  if (module.can.activate($(element))) {
1815
- module.set.selected(value, $(element));
1821
+ module.set.selected(value, $(element), false, settings.keepSearchTerm);
1816
1822
  if (!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
1817
1823
  module.hideAndClear();
1818
1824
  }
@@ -2399,6 +2405,11 @@
2399
2405
  module.set.value('', null, null, preventChangeTrigger);
2400
2406
  },
2401
2407
 
2408
+ clearCache: function () {
2409
+ module.debug('Clearing API cache once');
2410
+ tempDisableApiCache = true;
2411
+ },
2412
+
2402
2413
  scrollPage: function (direction, $selectedItem) {
2403
2414
  var
2404
2415
  $currentItem = $selectedItem || module.get.selectedItem(),
@@ -2457,7 +2468,7 @@
2457
2468
  valueIsSet = searchValue !== ''
2458
2469
  ;
2459
2470
  if (isMultiple && hasSearchValue) {
2460
- module.verbose('Adjusting input width', searchWidth, settings.glyphWidth);
2471
+ module.verbose('Adjusting input width', searchWidth);
2461
2472
  $search.css('width', searchWidth + 'px');
2462
2473
  }
2463
2474
  if (hasSearchValue || (isSearchMultiple && valueIsSet)) {
@@ -2756,7 +2767,7 @@
2756
2767
  return false;
2757
2768
  }
2758
2769
  module.debug('Setting selected menu item to', $selectedItem);
2759
- if (module.is.multiple()) {
2770
+ if (module.is.multiple() && !keepSearchTerm) {
2760
2771
  module.remove.searchWidth();
2761
2772
  }
2762
2773
  if (module.is.single()) {
@@ -3449,7 +3460,7 @@
3449
3460
  return settings.apiSettings && module.can.useAPI();
3450
3461
  },
3451
3462
  noApiCache: function () {
3452
- return settings.apiSettings && !settings.apiSettings.cache;
3463
+ return tempDisableApiCache || (settings.apiSettings && !settings.apiSettings.cache);
3453
3464
  },
3454
3465
  single: function () {
3455
3466
  return !module.is.multiple();
@@ -3999,6 +4010,7 @@
3999
4010
  forceSelection: false, // force a choice on blur with search selection
4000
4011
 
4001
4012
  allowAdditions: false, // whether multiple select should allow user added values
4013
+ keepSearchTerm: false, // whether the search value should be kept and menu stays filtered on item selection
4002
4014
  ignoreCase: false, // whether to consider case sensitivity when creating labels
4003
4015
  ignoreSearchCase: true, // whether to consider case sensitivity when filtering items
4004
4016
  hideAdditions: true, // whether or not to hide special message prompting a user they can enter a value
@@ -4018,8 +4030,6 @@
4018
4030
  duration: 200, // duration of transition
4019
4031
  displayType: false, // displayType of transition
4020
4032
 
4021
- glyphWidth: 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width
4022
-
4023
4033
  headerDivider: true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
4024
4034
 
4025
4035
  collapseOnActionable: true, // whether the dropdown should collapse upon selection of an actionable item
@@ -816,7 +816,7 @@ select.ui.dropdown {
816
816
  .ui.dropdown:not(.selection) > .remove.icon ~ .dropdown.icon {
817
817
  margin-left: @clearableIconMargin;
818
818
  }
819
- .ui.dropdown:not(.selection) > .remove.icon {
819
+ .ui.dropdown:not(.selection):not(.multiple) > .remove.icon {
820
820
  margin-top: -@clearableIconMarginTop;
821
821
  }
822
822
  }
@@ -879,6 +879,18 @@ select.ui.dropdown {
879
879
  margin: @imageLabelImageMargin;
880
880
  height: @imageLabelHeight;
881
881
  }
882
+ .ui.multiple.dropdown:not(.selection):not(.labeled) {
883
+ & > .dropdown.icon {
884
+ right: @dropdownIconMultipleRight;
885
+ }
886
+ & > .remove.icon {
887
+ margin-right: @dropdownIconMultipleRight;
888
+ }
889
+ &:not(.search) > .remove.icon ~ .text.default,
890
+ > .text.default:first-child {
891
+ overflow: inherit;
892
+ }
893
+ }
882
894
 
883
895
  & when (@variationDropdownSearch) {
884
896
  /* -----------------
@@ -919,6 +931,13 @@ select.ui.dropdown {
919
931
  .ui.multiple.search.dropdown.button {
920
932
  min-width: @selectionMinWidth;
921
933
  }
934
+ .ui.multiple.search.dropdown > span.sizer {
935
+ display: none;
936
+ }
937
+ .ui.multiple.search.dropdown:not(.selection) > .remove.icon + input.search,
938
+ .ui.multiple.search.dropdown:not(.selection) > input.search:first-child {
939
+ min-width: @multipleSearchMinWidth;
940
+ }
922
941
  }
923
942
  }
924
943
 
@@ -1309,8 +1328,8 @@ select.ui.dropdown {
1309
1328
  margin: 0 !important;
1310
1329
  border-top: @menuBorder;
1311
1330
  }
1312
- .ui.scrolling.dropdown .menu .item.item.item,
1313
- .ui.dropdown .scrolling.menu > .item.item.item {
1331
+ .ui.ui.ui.scrolling.dropdown .menu .item,
1332
+ .ui.ui.ui.dropdown .scrolling.menu > .item {
1314
1333
  border-top: @scrollingMenuItemBorder;
1315
1334
  }
1316
1335
  .ui.scrolling.dropdown .menu .item:first-child,
@@ -1335,24 +1354,55 @@ select.ui.dropdown {
1335
1354
  .ui.dropdown .scrolling.menu {
1336
1355
  max-height: @scrollingMobileMaxMenuHeight;
1337
1356
  }
1357
+ & when (@variationDropdownResizable) {
1358
+ .ui.scrolling.resizable.dropdown .menu,
1359
+ .ui.dropdown .scrolling.resizable.menu {
1360
+ height: @scrollingMobileMaxMenuHeight;
1361
+ }
1362
+ }
1338
1363
  }
1339
1364
  @media only screen and (min-width: @tabletBreakpoint) {
1340
1365
  .ui.scrolling.dropdown .menu,
1341
1366
  .ui.dropdown .scrolling.menu {
1342
1367
  max-height: @scrollingTabletMaxMenuHeight;
1343
1368
  }
1369
+ & when (@variationDropdownResizable) {
1370
+ .ui.scrolling.resizable.dropdown .menu,
1371
+ .ui.dropdown .scrolling.resizable.menu {
1372
+ height: @scrollingTabletMaxMenuHeight;
1373
+ }
1374
+ }
1344
1375
  }
1345
1376
  @media only screen and (min-width: @computerBreakpoint) {
1346
1377
  .ui.scrolling.dropdown .menu,
1347
1378
  .ui.dropdown .scrolling.menu {
1348
1379
  max-height: @scrollingComputerMaxMenuHeight;
1349
1380
  }
1381
+ & when (@variationDropdownResizable) {
1382
+ .ui.scrolling.resizable.dropdown .menu,
1383
+ .ui.dropdown .scrolling.resizable.menu {
1384
+ height: @scrollingComputerMaxMenuHeight;
1385
+ }
1386
+ }
1350
1387
  }
1351
1388
  @media only screen and (min-width: @widescreenMonitorBreakpoint) {
1352
1389
  .ui.scrolling.dropdown .menu,
1353
1390
  .ui.dropdown .scrolling.menu {
1354
1391
  max-height: @scrollingWidescreenMaxMenuHeight;
1355
1392
  }
1393
+ & when (@variationDropdownResizable) {
1394
+ .ui.scrolling.resizable.dropdown .menu,
1395
+ .ui.dropdown .scrolling.resizable.menu {
1396
+ height: @scrollingWidescreenMaxMenuHeight;
1397
+ }
1398
+ }
1399
+ }
1400
+ & when (@variationDropdownResizable) {
1401
+ .ui.scrolling.resizable.dropdown .menu,
1402
+ .ui.dropdown .scrolling.resizable.menu {
1403
+ resize: @resizableDirection;
1404
+ max-height: none;
1405
+ }
1356
1406
  }
1357
1407
  }
1358
1408
 
@@ -1951,4 +2001,5 @@ select.ui.dropdown {
1951
2001
  }
1952
2002
  }
1953
2003
 
1954
- .loadUIOverrides();
2004
+ // stylelint-disable no-invalid-position-at-import-rule
2005
+ @import (multiple, optional) "../../overrides.less";
@@ -155,4 +155,5 @@
155
155
  }
156
156
  }
157
157
 
158
- .loadUIOverrides();
158
+ // stylelint-disable no-invalid-position-at-import-rule
159
+ @import (multiple, optional) "../../overrides.less";
@@ -86,6 +86,7 @@
86
86
  initialBodyMargin = '',
87
87
  tempBodyMargin = '',
88
88
  hadScrollbar = false,
89
+ windowRefocused = false,
89
90
 
90
91
  elementNamespace,
91
92
  id,
@@ -264,9 +265,13 @@
264
265
  module.setup.heights();
265
266
  },
266
267
  focus: function () {
267
- if (module.is.visible() && settings.autofocus && settings.dimPage) {
268
+ windowRefocused = true;
269
+ },
270
+ click: function (event) {
271
+ if (windowRefocused && document.activeElement !== event.target && module.is.visible() && settings.autofocus && settings.dimPage && $(document.activeElement).closest(selector.flyout).length === 0) {
268
272
  requestAnimationFrame(module.set.autofocus);
269
273
  }
274
+ windowRefocused = false;
270
275
  },
271
276
  clickaway: function (event) {
272
277
  if (settings.closable) {
@@ -373,6 +378,9 @@
373
378
  $window
374
379
  .on('focus' + elementNamespace, module.event.focus)
375
380
  ;
381
+ $context
382
+ .on('click' + elementNamespace, module.event.click)
383
+ ;
376
384
  },
377
385
  clickaway: function () {
378
386
  module.verbose('Adding clickaway events to context', $context);
@@ -502,11 +510,12 @@
502
510
 
503
511
  return nodes;
504
512
  },
505
- shouldRefreshInputs = false
513
+ shouldRefreshInputs = false,
514
+ ignoreAutofocus = true
506
515
  ;
507
516
  mutations.every(function (mutation) {
508
517
  if (mutation.type === 'attributes') {
509
- if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
518
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
510
519
  shouldRefreshInputs = true;
511
520
  }
512
521
  } else {
@@ -516,6 +525,9 @@
516
525
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
517
526
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
518
527
  shouldRefreshInputs = true;
528
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
529
+ ignoreAutofocus = false;
530
+ }
519
531
  }
520
532
  }
521
533
 
@@ -523,7 +535,7 @@
523
535
  });
524
536
 
525
537
  if (shouldRefreshInputs) {
526
- module.refreshInputs();
538
+ module.refreshInputs(ignoreAutofocus);
527
539
  }
528
540
  });
529
541
  observer.observe(element, {
@@ -548,7 +560,7 @@
548
560
  $flyouts = $context.children(selector.flyout);
549
561
  },
550
562
 
551
- refreshInputs: function () {
563
+ refreshInputs: function (ignoreAutofocus) {
552
564
  if ($inputs) {
553
565
  $inputs
554
566
  .off('keydown' + elementNamespace)
@@ -560,8 +572,8 @@
560
572
  $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
561
573
  return $(this).closest('.disabled').length === 0;
562
574
  });
563
- if ($inputs.length === 0) {
564
- $inputs = $module;
575
+ if ($inputs.filter(':input').length === 0) {
576
+ $inputs = $module.add($inputs);
565
577
  $module.attr('tabindex', -1);
566
578
  } else {
567
579
  $module.removeAttr('tabindex');
@@ -572,7 +584,7 @@
572
584
  $inputs.last()
573
585
  .on('keydown' + elementNamespace, module.event.inputKeyDown.last)
574
586
  ;
575
- if (settings.autofocus && $inputs.filter(':focus').length === 0) {
587
+ if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
576
588
  module.set.autofocus();
577
589
  }
578
590
  },
@@ -850,20 +862,14 @@
850
862
  var
851
863
  $autofocus = $inputs.filter('[autofocus]'),
852
864
  $rawInputs = $inputs.filter(':input'),
853
- $input = $autofocus.length > 0
854
- ? $autofocus.first()
865
+ $input = ($autofocus.length > 0
866
+ ? $autofocus
855
867
  : ($rawInputs.length > 0
856
868
  ? $rawInputs
857
- : $inputs.filter(':not(i.close)')
858
- ).first()
869
+ : $module)
870
+ ).first()
859
871
  ;
860
- // check if only the close icon is remaining
861
- if ($input.length === 0 && $inputs.length > 0) {
862
- $input = $inputs.first();
863
- }
864
- if ($input.length > 0) {
865
- $input.trigger('focus');
866
- }
872
+ $input.trigger('focus');
867
873
  },
868
874
  dimmerStyles: function () {
869
875
  if (settings.blurring) {
@@ -645,4 +645,5 @@ body.pushable > .pusher {
645
645
  }
646
646
  }
647
647
 
648
- .loadUIOverrides();
648
+ // stylelint-disable no-invalid-position-at-import-rule
649
+ @import (multiple, optional) "../../overrides.less";
@@ -88,6 +88,7 @@
88
88
  tempBodyMargin = '',
89
89
  keepScrollingClass = false,
90
90
  hadScrollbar = false,
91
+ windowRefocused = false,
91
92
 
92
93
  elementEventNamespace,
93
94
  id,
@@ -251,6 +252,7 @@
251
252
  .off(eventNamespace)
252
253
  ;
253
254
  $window.off(elementEventNamespace);
255
+ $context.off(elementEventNamespace);
254
256
  $dimmer.off(elementEventNamespace);
255
257
  $closeIcon.off(elementEventNamespace);
256
258
  if ($inputs) {
@@ -272,11 +274,12 @@
272
274
  return nodes;
273
275
  },
274
276
  shouldRefresh = false,
275
- shouldRefreshInputs = false
277
+ shouldRefreshInputs = false,
278
+ ignoreAutofocus = true
276
279
  ;
277
280
  mutations.every(function (mutation) {
278
281
  if (mutation.type === 'attributes') {
279
- if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
282
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
280
283
  shouldRefreshInputs = true;
281
284
  }
282
285
  } else {
@@ -287,6 +290,9 @@
287
290
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
288
291
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
289
292
  shouldRefreshInputs = true;
293
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
294
+ ignoreAutofocus = false;
295
+ }
290
296
  }
291
297
  }
292
298
 
@@ -298,7 +304,7 @@
298
304
  module.refresh();
299
305
  }
300
306
  if (shouldRefreshInputs) {
301
- module.refreshInputs();
307
+ module.refreshInputs(ignoreAutofocus);
302
308
  }
303
309
  });
304
310
  observer.observe(element, {
@@ -326,7 +332,7 @@
326
332
  $allModals = $otherModals.add($module);
327
333
  },
328
334
 
329
- refreshInputs: function () {
335
+ refreshInputs: function (ignoreAutofocus) {
330
336
  if ($inputs) {
331
337
  $inputs
332
338
  .off('keydown' + elementEventNamespace)
@@ -335,8 +341,8 @@
335
341
  $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
336
342
  return $(this).closest('.disabled').length === 0;
337
343
  });
338
- if ($inputs.length === 0) {
339
- $inputs = $module;
344
+ if ($inputs.filter(':input').length === 0) {
345
+ $inputs = $module.add($inputs);
340
346
  $module.attr('tabindex', -1);
341
347
  } else {
342
348
  $module.removeAttr('tabindex');
@@ -347,7 +353,7 @@
347
353
  $inputs.last()
348
354
  .on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
349
355
  ;
350
- if (settings.autofocus && $inputs.filter(':focus').length === 0) {
356
+ if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
351
357
  module.set.autofocus();
352
358
  }
353
359
  },
@@ -385,6 +391,9 @@
385
391
  .on('resize' + elementEventNamespace, module.event.resize)
386
392
  .on('focus' + elementEventNamespace, module.event.focus)
387
393
  ;
394
+ $context
395
+ .on('click' + elementEventNamespace, module.event.click)
396
+ ;
388
397
  },
389
398
  scrollLock: function () {
390
399
  // touch events default to passive, due to changes in chrome to optimize mobile perf
@@ -542,9 +551,13 @@
542
551
  }
543
552
  },
544
553
  focus: function () {
545
- if ($dimmable.dimmer('is active') && module.is.active() && settings.autofocus) {
554
+ windowRefocused = true;
555
+ },
556
+ click: function (event) {
557
+ if (windowRefocused && document.activeElement !== event.target && $dimmable.dimmer('is active') && module.is.active() && settings.autofocus && $(document.activeElement).closest(selector.modal).length === 0) {
546
558
  requestAnimationFrame(module.set.autofocus);
547
559
  }
560
+ windowRefocused = false;
548
561
  },
549
562
  },
550
563
 
@@ -609,7 +622,7 @@
609
622
  ignoreRepeatedEvents = false;
610
623
  if (settings.allowMultiple) {
611
624
  if (module.others.active()) {
612
- $otherModals.filter('.' + className.active).find(selector.dimmer).addClass('active');
625
+ $otherModals.filter('.' + className.active).find(selector.dimmer).removeClass('out').addClass('transition fade in active');
613
626
  }
614
627
 
615
628
  if (settings.detachable) {
@@ -681,6 +694,8 @@
681
694
  onStart: function () {
682
695
  if (!module.others.active() && !module.others.animating() && !keepDimmed) {
683
696
  module.hideDimmer();
697
+ } else if (settings.allowMultiple) {
698
+ (hideOthersToo ? $allModals : $previousModal).find(selector.dimmer).removeClass('in').addClass('out');
684
699
  }
685
700
  if (settings.keyboardShortcuts && !module.others.active()) {
686
701
  module.remove.keyboardShortcuts();
@@ -693,11 +708,7 @@
693
708
  $previousModal.addClass(className.front);
694
709
  $module.removeClass(className.front);
695
710
 
696
- if (hideOthersToo) {
697
- $allModals.find(selector.dimmer).removeClass('active');
698
- } else {
699
- $previousModal.find(selector.dimmer).removeClass('active');
700
- }
711
+ (hideOthersToo ? $allModals : $previousModal).find(selector.dimmer).removeClass('active');
701
712
  }
702
713
  if (isFunction(settings.onHidden)) {
703
714
  settings.onHidden.call(element);
@@ -1054,20 +1065,14 @@
1054
1065
  var
1055
1066
  $autofocus = $inputs.filter('[autofocus]'),
1056
1067
  $rawInputs = $inputs.filter(':input'),
1057
- $input = $autofocus.length > 0
1058
- ? $autofocus.first()
1068
+ $input = ($autofocus.length > 0
1069
+ ? $autofocus
1059
1070
  : ($rawInputs.length > 0
1060
1071
  ? $rawInputs
1061
- : $inputs.filter(':not(i.close)')
1062
- ).first()
1072
+ : $module)
1073
+ ).first()
1063
1074
  ;
1064
- // check if only the close icon is remaining
1065
- if ($input.length === 0 && $inputs.length > 0) {
1066
- $input = $inputs.first();
1067
- }
1068
- if ($input.length > 0) {
1069
- $input.trigger('focus');
1070
- }
1075
+ $input.trigger('focus');
1071
1076
  },
1072
1077
  bodyMargin: function () {
1073
1078
  var position = module.can.leftBodyScrollbar() ? 'left' : 'right';
@@ -437,19 +437,22 @@
437
437
  overflow: hidden;
438
438
  }
439
439
  .scrolling.dimmable > .dimmer {
440
- justify-content: flex-start;
440
+ justify-content: center;
441
441
  position: fixed;
442
442
  }
443
443
  .scrolling.dimmable:not(body) > .dimmer {
444
- justify-content: center;
445
444
  position: absolute;
446
445
  }
447
446
  .scrolling.dimmable.dimmed > .dimmer {
448
447
  overflow: auto;
449
448
  overscroll-behavior: @overscrollBehavior;
450
449
  }
450
+ .modals.dimmer .ui.scrolling.modal.fullscreen {
451
+ top: 0;
452
+ }
451
453
  .modals.dimmer .ui.scrolling.modal:not(.fullscreen) {
452
454
  margin: @scrollingMargin auto;
455
+ top: @scrollingTop;
453
456
  }
454
457
 
455
458
  /* Fix for Firefox, Edge, IE11 */
@@ -478,6 +481,12 @@
478
481
  overflow: auto;
479
482
  overscroll-behavior: @overscrollBehavior;
480
483
  }
484
+ & when (@variationTableResizable) {
485
+ .ui.modal > .resizable.scrolling.content {
486
+ resize: @resizableDirection;
487
+ max-height: none;
488
+ }
489
+ }
481
490
  }
482
491
 
483
492
  & when (@variationModalOverlay) {
@@ -620,4 +629,5 @@
620
629
  }
621
630
  }
622
631
 
623
- .loadUIOverrides();
632
+ // stylelint-disable no-invalid-position-at-import-rule
633
+ @import (multiple, optional) "../../overrides.less";
@@ -207,4 +207,6 @@ a.ui.nag {
207
207
  border-radius: @borderRadius;
208
208
  }
209
209
  }
210
- .loadUIOverrides();
210
+
211
+ // stylelint-disable no-invalid-position-at-import-rule
212
+ @import (multiple, optional) "../../overrides.less";
@@ -248,9 +248,11 @@
248
248
  // generates popup html from metadata
249
249
  create: function () {
250
250
  var
251
+ targetSibling = $target.next(selector.popup),
252
+ contentFallback = !settings.popup && targetSibling.length === 0 ? $module.attr('title') : false,
251
253
  html = module.get.html(),
252
254
  title = module.get.title(),
253
- content = module.get.content()
255
+ content = module.get.content(contentFallback)
254
256
  ;
255
257
 
256
258
  if (html || content || title) {
@@ -291,10 +293,10 @@
291
293
  if (settings.hoverable) {
292
294
  module.bind.popup();
293
295
  }
294
- } else if ($target.next(selector.popup).length > 0) {
296
+ } else if (targetSibling.length > 0) {
295
297
  module.verbose('Pre-existing popup found');
296
298
  settings.inline = true;
297
- settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
299
+ settings.popup = targetSibling.data(metadata.activator, $module);
298
300
  module.refresh();
299
301
  if (settings.hoverable) {
300
302
  module.bind.popup();
@@ -484,10 +486,10 @@
484
486
 
485
487
  return $module.data(metadata.title) || settings.title;
486
488
  },
487
- content: function () {
489
+ content: function (fallback) {
488
490
  $module.removeData(metadata.content);
489
491
 
490
- return $module.data(metadata.content) || settings.content || $module.attr('title');
492
+ return $module.data(metadata.content) || settings.content || fallback;
491
493
  },
492
494
  variation: function () {
493
495
  $module.removeData(metadata.variation);