fomantic-ui 2.9.0-beta.26 → 2.9.0-beta.262

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 (285) hide show
  1. package/.all-contributorsrc +206 -3
  2. package/.github/workflows/ci.yml +4 -4
  3. package/.github/workflows/nightly.yml +4 -4
  4. package/.github/workflows/release.yml +30 -0
  5. package/CONTRIBUTORS.md +75 -37
  6. package/README.md +8 -8
  7. package/dist/components/accordion.css +162 -26
  8. package/dist/components/accordion.js +1 -1
  9. package/dist/components/accordion.min.css +2 -2
  10. package/dist/components/accordion.min.js +2 -2
  11. package/dist/components/ad.css +1 -1
  12. package/dist/components/ad.min.css +1 -1
  13. package/dist/components/api.js +34 -30
  14. package/dist/components/api.min.js +3 -3
  15. package/dist/components/breadcrumb.css +1 -1
  16. package/dist/components/breadcrumb.min.css +1 -1
  17. package/dist/components/button.css +176 -134
  18. package/dist/components/button.min.css +2 -2
  19. package/dist/components/calendar.css +18 -1
  20. package/dist/components/calendar.js +10 -9
  21. package/dist/components/calendar.min.css +2 -2
  22. package/dist/components/calendar.min.js +3 -3
  23. package/dist/components/card.css +26 -19
  24. package/dist/components/card.min.css +2 -2
  25. package/dist/components/checkbox.css +2 -1
  26. package/dist/components/checkbox.js +17 -11
  27. package/dist/components/checkbox.min.css +2 -2
  28. package/dist/components/checkbox.min.js +3 -3
  29. package/dist/components/comment.css +11 -11
  30. package/dist/components/comment.min.css +1 -1
  31. package/dist/components/container.css +94 -1
  32. package/dist/components/container.min.css +2 -2
  33. package/dist/components/dimmer.css +28 -14
  34. package/dist/components/dimmer.js +11 -5
  35. package/dist/components/dimmer.min.css +2 -2
  36. package/dist/components/dimmer.min.js +3 -3
  37. package/dist/components/divider.css +1 -1
  38. package/dist/components/divider.min.css +1 -1
  39. package/dist/components/dropdown.css +49 -13
  40. package/dist/components/dropdown.js +66 -39
  41. package/dist/components/dropdown.min.css +2 -2
  42. package/dist/components/dropdown.min.js +3 -3
  43. package/dist/components/embed.css +1 -1
  44. package/dist/components/embed.js +1 -1
  45. package/dist/components/embed.min.css +1 -1
  46. package/dist/components/embed.min.js +2 -2
  47. package/dist/components/emoji.css +10147 -8139
  48. package/dist/components/emoji.min.css +1 -1
  49. package/dist/components/feed.css +28 -28
  50. package/dist/components/feed.min.css +2 -2
  51. package/dist/components/flag.css +734 -625
  52. package/dist/components/flag.min.css +2 -2
  53. package/dist/components/form.css +118 -55
  54. package/dist/components/form.js +38 -29
  55. package/dist/components/form.min.css +2 -2
  56. package/dist/components/form.min.js +3 -3
  57. package/dist/components/grid.css +11 -8
  58. package/dist/components/grid.min.css +2 -2
  59. package/dist/components/header.css +3 -1
  60. package/dist/components/header.min.css +2 -2
  61. package/dist/components/icon.css +126 -47
  62. package/dist/components/icon.min.css +2 -2
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +742 -17
  66. package/dist/components/input.min.css +2 -2
  67. package/dist/components/item.css +13 -13
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +29 -5
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +41 -41
  78. package/dist/components/message.min.css +2 -2
  79. package/dist/components/modal.css +13 -1
  80. package/dist/components/modal.js +127 -49
  81. package/dist/components/modal.min.css +2 -2
  82. package/dist/components/modal.min.js +3 -3
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +1 -1
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +2 -2
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +2 -2
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +3 -3
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +4 -1
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +3 -3
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +1 -1
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +2 -2
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +2 -2
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +3 -3
  111. package/dist/components/segment.css +91 -7
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +3 -3
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +3 -3
  117. package/dist/components/sidebar.css +4 -2
  118. package/dist/components/sidebar.js +8 -6
  119. package/dist/components/sidebar.min.css +2 -2
  120. package/dist/components/sidebar.min.js +3 -3
  121. package/dist/components/site.css +61 -39
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +2 -2
  124. package/dist/components/site.min.js +2 -2
  125. package/dist/components/slider.js +1 -1
  126. package/dist/components/slider.min.js +2 -2
  127. package/dist/components/state.js +1 -1
  128. package/dist/components/state.min.js +2 -2
  129. package/dist/components/statistic.css +1 -1
  130. package/dist/components/statistic.min.css +1 -1
  131. package/dist/components/step.css +4 -4
  132. package/dist/components/step.min.css +2 -2
  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 +2 -2
  137. package/dist/components/tab.css +1 -1
  138. package/dist/components/tab.js +23 -5
  139. package/dist/components/tab.min.css +1 -1
  140. package/dist/components/tab.min.js +3 -3
  141. package/dist/components/table.css +1168 -26
  142. package/dist/components/table.min.css +2 -2
  143. package/dist/components/text.css +1 -1
  144. package/dist/components/text.min.css +1 -1
  145. package/dist/components/toast.css +39 -1
  146. package/dist/components/toast.js +56 -28
  147. package/dist/components/toast.min.css +2 -2
  148. package/dist/components/toast.min.js +3 -3
  149. package/dist/components/transition.css +1 -1
  150. package/dist/components/transition.js +21 -16
  151. package/dist/components/transition.min.css +1 -1
  152. package/dist/components/transition.min.js +3 -3
  153. package/dist/components/visibility.js +1 -1
  154. package/dist/components/visibility.min.js +2 -2
  155. package/dist/semantic.css +21916 -16238
  156. package/dist/semantic.js +433 -246
  157. package/dist/semantic.min.css +3 -3
  158. package/dist/semantic.min.js +3 -3
  159. package/dist/themes/default/assets/fonts/brand-icons.eot +0 -0
  160. package/dist/themes/default/assets/fonts/brand-icons.svg +801 -654
  161. package/dist/themes/default/assets/fonts/brand-icons.ttf +0 -0
  162. package/dist/themes/default/assets/fonts/brand-icons.woff +0 -0
  163. package/dist/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  164. package/dist/themes/default/assets/fonts/icons.eot +0 -0
  165. package/dist/themes/default/assets/fonts/icons.svg +1175 -1079
  166. package/dist/themes/default/assets/fonts/icons.ttf +0 -0
  167. package/dist/themes/default/assets/fonts/icons.woff +0 -0
  168. package/dist/themes/default/assets/fonts/icons.woff2 +0 -0
  169. package/dist/themes/default/assets/fonts/outline-icons.eot +0 -0
  170. package/dist/themes/default/assets/fonts/outline-icons.svg +93 -95
  171. package/dist/themes/default/assets/fonts/outline-icons.ttf +0 -0
  172. package/dist/themes/default/assets/fonts/outline-icons.woff +0 -0
  173. package/dist/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  174. package/examples/assets/library/iframe-content.js +8 -8
  175. package/examples/assets/library/iframe.js +3 -3
  176. package/package.json +10 -9
  177. package/src/definitions/behaviors/api.js +33 -29
  178. package/src/definitions/behaviors/form.js +37 -28
  179. package/src/definitions/collections/form.less +204 -140
  180. package/src/definitions/collections/grid.less +716 -680
  181. package/src/definitions/collections/menu.less +173 -126
  182. package/src/definitions/collections/message.less +48 -46
  183. package/src/definitions/collections/table.less +849 -262
  184. package/src/definitions/elements/button.less +586 -449
  185. package/src/definitions/elements/container.less +145 -8
  186. package/src/definitions/elements/emoji.less +15 -9
  187. package/src/definitions/elements/flag.less +7 -17
  188. package/src/definitions/elements/header.less +44 -35
  189. package/src/definitions/elements/icon.less +38 -31
  190. package/src/definitions/elements/input.less +264 -22
  191. package/src/definitions/elements/label.less +92 -91
  192. package/src/definitions/elements/list.less +55 -45
  193. package/src/definitions/elements/loader.less +30 -29
  194. package/src/definitions/elements/segment.less +147 -28
  195. package/src/definitions/elements/step.less +52 -48
  196. package/src/definitions/elements/text.less +17 -15
  197. package/src/definitions/globals/site.less +23 -2
  198. package/src/definitions/modules/accordion.less +175 -24
  199. package/src/definitions/modules/calendar.js +9 -8
  200. package/src/definitions/modules/calendar.less +20 -0
  201. package/src/definitions/modules/checkbox.js +16 -10
  202. package/src/definitions/modules/checkbox.less +34 -178
  203. package/src/definitions/modules/dimmer.js +10 -4
  204. package/src/definitions/modules/dimmer.less +21 -8
  205. package/src/definitions/modules/dropdown.js +65 -38
  206. package/src/definitions/modules/dropdown.less +145 -94
  207. package/src/definitions/modules/modal.js +126 -48
  208. package/src/definitions/modules/modal.less +12 -0
  209. package/src/definitions/modules/nag.less +20 -19
  210. package/src/definitions/modules/popup.js +1 -1
  211. package/src/definitions/modules/progress.js +3 -0
  212. package/src/definitions/modules/progress.less +19 -18
  213. package/src/definitions/modules/rating.less +35 -34
  214. package/src/definitions/modules/search.js +1 -1
  215. package/src/definitions/modules/search.less +32 -16
  216. package/src/definitions/modules/shape.js +2 -2
  217. package/src/definitions/modules/sidebar.js +7 -5
  218. package/src/definitions/modules/sidebar.less +33 -19
  219. package/src/definitions/modules/slider.less +39 -38
  220. package/src/definitions/modules/tab.js +22 -4
  221. package/src/definitions/modules/toast.js +55 -27
  222. package/src/definitions/modules/toast.less +48 -16
  223. package/src/definitions/modules/transition.js +20 -15
  224. package/src/definitions/views/card.less +402 -361
  225. package/src/definitions/views/comment.less +92 -81
  226. package/src/definitions/views/feed.less +164 -144
  227. package/src/definitions/views/item.less +249 -196
  228. package/src/definitions/views/statistic.less +90 -88
  229. package/src/themes/bookish/elements/header.overrides +1 -1
  230. package/src/themes/chubby/elements/button.overrides +1 -1
  231. package/src/themes/chubby/elements/header.overrides +1 -1
  232. package/src/themes/default/assets/fonts/brand-icons.eot +0 -0
  233. package/src/themes/default/assets/fonts/brand-icons.svg +801 -654
  234. package/src/themes/default/assets/fonts/brand-icons.ttf +0 -0
  235. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  236. package/src/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  237. package/src/themes/default/assets/fonts/icons.eot +0 -0
  238. package/src/themes/default/assets/fonts/icons.svg +1175 -1079
  239. package/src/themes/default/assets/fonts/icons.ttf +0 -0
  240. package/src/themes/default/assets/fonts/icons.woff +0 -0
  241. package/src/themes/default/assets/fonts/icons.woff2 +0 -0
  242. package/src/themes/default/assets/fonts/outline-icons.eot +0 -0
  243. package/src/themes/default/assets/fonts/outline-icons.svg +93 -95
  244. package/src/themes/default/assets/fonts/outline-icons.ttf +0 -0
  245. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  246. package/src/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  247. package/src/themes/default/collections/form.variables +4 -0
  248. package/src/themes/default/collections/menu.variables +6 -0
  249. package/src/themes/default/collections/table.variables +52 -0
  250. package/src/themes/default/elements/button.variables +7 -1
  251. package/src/themes/default/elements/container.variables +12 -0
  252. package/src/themes/default/elements/emoji.overrides +1734 -1232
  253. package/src/themes/default/elements/flag.overrides +1641 -986
  254. package/src/themes/default/elements/flag.variables +7 -5
  255. package/src/themes/default/elements/icon.overrides +75 -48
  256. package/src/themes/default/elements/icon.variables +1 -0
  257. package/src/themes/default/elements/input.variables +15 -0
  258. package/src/themes/default/elements/segment.variables +8 -0
  259. package/src/themes/default/elements/step.overrides +1 -1
  260. package/src/themes/default/globals/site.variables +6 -0
  261. package/src/themes/default/globals/variation.variables +139 -6
  262. package/src/themes/default/modules/accordion.variables +49 -2
  263. package/src/themes/default/modules/calendar.variables +3 -0
  264. package/src/themes/default/modules/checkbox.variables +5 -5
  265. package/src/themes/default/modules/dimmer.variables +1 -1
  266. package/src/themes/default/modules/dropdown.variables +4 -10
  267. package/src/themes/default/modules/modal.variables +13 -0
  268. package/src/themes/default/modules/toast.variables +3 -0
  269. package/src/themes/famfamfam/elements/flag.overrides +1026 -0
  270. package/src/themes/famfamfam/elements/flag.variables +13 -0
  271. package/src/themes/instagram/views/card.overrides +1 -1
  272. package/src/themes/joypixels/elements/emoji.overrides +1759 -1257
  273. package/src/themes/joypixels/elements/emoji.variables +1 -1
  274. package/src/themes/material/collections/menu.overrides +1 -1
  275. package/src/themes/material/elements/button.overrides +1 -1
  276. package/src/themes/material/elements/header.overrides +1 -1
  277. package/src/themes/material/globals/site.variables +0 -1
  278. package/src/themes/material/modules/dropdown.overrides +1 -1
  279. package/src/themes/material/modules/modal.overrides +1 -1
  280. package/src/themes/rtl/globals/site.overrides +1 -1
  281. package/src/themes/twitter/elements/emoji.overrides +1734 -1232
  282. package/tasks/build/css.js +6 -1
  283. package/tasks/config/project/install.js +11 -5
  284. package/tasks/install.js +1 -0
  285. package/test/helpers/sinon.js +2 -2
@@ -437,16 +437,20 @@
437
437
  .ui.search.short > .results {
438
438
  max-height: @scrollingMobileMaxResultsHeight;
439
439
  }
440
- .ui.search[class*="very short"] > .results {
441
- max-height: @scrollingMobileMaxResultsHeight * 0.75;
440
+ & when (@variationSearchVeryShort) {
441
+ .ui.search[class*="very short"] > .results {
442
+ max-height: @scrollingMobileMaxResultsHeight * 0.75;
443
+ }
442
444
  }
443
445
  }
444
446
  & when (@variationSearchLong) {
445
447
  .ui.search.long > .results {
446
448
  max-height: @scrollingMobileMaxResultsHeight * 2;
447
449
  }
448
- .ui.search[class*="very long"] > .results {
449
- max-height: @scrollingMobileMaxResultsHeight * 3;
450
+ & when (@variationSearchVeryLong) {
451
+ .ui.search[class*="very long"] > .results {
452
+ max-height: @scrollingMobileMaxResultsHeight * 3;
453
+ }
450
454
  }
451
455
  }
452
456
  }
@@ -455,16 +459,20 @@
455
459
  .ui.search.short > .results {
456
460
  max-height: @scrollingTabletMaxResultsHeight;
457
461
  }
458
- .ui.search[class*="very short"] > .results {
459
- max-height: @scrollingTabletMaxResultsHeight * 0.75;
462
+ & when (@variationSearchVeryShort) {
463
+ .ui.search[class*="very short"] > .results {
464
+ max-height: @scrollingTabletMaxResultsHeight * 0.75;
465
+ }
460
466
  }
461
467
  }
462
468
  & when (@variationSearchLong) {
463
469
  .ui.search.long > .results {
464
470
  max-height: @scrollingTabletMaxResultsHeight * 2;
465
471
  }
466
- .ui.search[class*="very long"] > .results {
467
- max-height: @scrollingTabletMaxResultsHeight * 3;
472
+ & when (@variationSearchVeryLong) {
473
+ .ui.search[class*="very long"] > .results {
474
+ max-height: @scrollingTabletMaxResultsHeight * 3;
475
+ }
468
476
  }
469
477
  }
470
478
  }
@@ -473,16 +481,20 @@
473
481
  .ui.search.short > .results {
474
482
  max-height: @scrollingComputerMaxResultsHeight;
475
483
  }
476
- .ui.search[class*="very short"] > .results {
477
- max-height: @scrollingComputerMaxResultsHeight * 0.75;
484
+ & when (@variationSearchVeryShort) {
485
+ .ui.search[class*="very short"] > .results {
486
+ max-height: @scrollingComputerMaxResultsHeight * 0.75;
487
+ }
478
488
  }
479
489
  }
480
490
  & when (@variationSearchLong) {
481
491
  .ui.search.long > .results {
482
492
  max-height: @scrollingComputerMaxResultsHeight * 2;
483
493
  }
484
- .ui.search[class*="very long"] > .results {
485
- max-height: @scrollingComputerMaxResultsHeight * 3;
494
+ & when (@variationSearchVeryLong) {
495
+ .ui.search[class*="very long"] > .results {
496
+ max-height: @scrollingComputerMaxResultsHeight * 3;
497
+ }
486
498
  }
487
499
  }
488
500
  }
@@ -491,16 +503,20 @@
491
503
  .ui.search.short > .results {
492
504
  max-height: @scrollingWidescreenMaxResultsHeight;
493
505
  }
494
- .ui.search[class*="very short"] > .results {
495
- max-height: @scrollingWidescreenMaxResultsHeight * 0.75;
506
+ & when (@variationSearchVeryShort) {
507
+ .ui.search[class*="very short"] > .results {
508
+ max-height: @scrollingWidescreenMaxResultsHeight * 0.75;
509
+ }
496
510
  }
497
511
  }
498
512
  & when (@variationSearchLong) {
499
513
  .ui.search.long > .results {
500
514
  max-height: @scrollingWidescreenMaxResultsHeight * 2;
501
515
  }
502
- .ui.search[class*="very long"] > .results {
503
- max-height: @scrollingWidescreenMaxResultsHeight * 3;
516
+ & when (@variationSearchVeryLong) {
517
+ .ui.search[class*="very long"] > .results {
518
+ max-height: @scrollingWidescreenMaxResultsHeight * 3;
519
+ }
504
520
  }
505
521
  }
506
522
  }
@@ -126,7 +126,7 @@ $.fn.shape = function(parameters) {
126
126
  module.reset();
127
127
  module.set.active();
128
128
  };
129
- settings.beforeChange.call($nextSide[0]);
129
+ settings.onBeforeChange.call($nextSide[0]);
130
130
  if(module.get.transitionEvent()) {
131
131
  module.verbose('Starting CSS animation');
132
132
  $module
@@ -813,7 +813,7 @@ $.fn.shape.settings = {
813
813
  height: 'initial',
814
814
 
815
815
  // callback occurs on side change
816
- beforeChange : function() {},
816
+ onBeforeChange : function() {},
817
817
  onChange : function() {},
818
818
 
819
819
  // allow animation to same side
@@ -118,7 +118,7 @@ $.fn.sidebar = function(parameters) {
118
118
 
119
119
  create: {
120
120
  id: function() {
121
- id = (Math.random().toString(16) + '000000000').substr(2,8);
121
+ id = (Math.random().toString(16) + '000000000').slice(2, 10);
122
122
  elementNamespace = '.' + id;
123
123
  module.verbose('Creating unique id for element', id);
124
124
  }
@@ -371,6 +371,10 @@ $.fn.sidebar = function(parameters) {
371
371
  : function(){}
372
372
  ;
373
373
  if(module.is.hidden()) {
374
+ if(settings.onShow.call(element) === false) {
375
+ module.verbose('Show callback returned false cancelling show');
376
+ return;
377
+ }
374
378
  module.refreshSidebars();
375
379
  if(settings.overlay) {
376
380
  module.error(error.overlay);
@@ -395,10 +399,9 @@ $.fn.sidebar = function(parameters) {
395
399
  }
396
400
  module.pushPage(function() {
397
401
  callback.call(element);
398
- settings.onShow.call(element);
402
+ settings.onVisible.call(element);
399
403
  });
400
404
  settings.onChange.call(element);
401
- settings.onVisible.call(element);
402
405
  }
403
406
  else {
404
407
  module.debug('Sidebar is already visible');
@@ -410,7 +413,7 @@ $.fn.sidebar = function(parameters) {
410
413
  ? callback
411
414
  : function(){}
412
415
  ;
413
- if(module.is.visible() || module.is.animating()) {
416
+ if((module.is.visible() || module.is.animating()) && settings.onHide.call(element) !== false) {
414
417
  module.debug('Hiding sidebar', callback);
415
418
  module.refreshSidebars();
416
419
  module.pullPage(function() {
@@ -418,7 +421,6 @@ $.fn.sidebar = function(parameters) {
418
421
  settings.onHidden.call(element);
419
422
  });
420
423
  settings.onChange.call(element);
421
- settings.onHide.call(element);
422
424
  }
423
425
  },
424
426
 
@@ -141,13 +141,15 @@ body.pushable {
141
141
  .pushable > .pusher {
142
142
  position: relative;
143
143
  backface-visibility: hidden;
144
- overflow: hidden;
145
144
  min-height: 100%;
146
145
  transition: transform @duration @easing;
147
146
  z-index: @middleLayer;
148
147
 
149
148
  /* Pusher should inherit background from context */
150
149
  background: inherit;
150
+ &:not(.overflowing) {
151
+ overflow: hidden;
152
+ }
151
153
  }
152
154
 
153
155
  body.pushable > .pusher {
@@ -281,9 +283,11 @@ body.pushable > .pusher {
281
283
  width: @thinWidth;
282
284
  }
283
285
 
284
- .ui[class*="very thin"].left.sidebar,
285
- .ui[class*="very thin"].right.sidebar {
286
- width: @veryThinWidth;
286
+ & when (@variationSidebarVeryThin) {
287
+ .ui[class*="very thin"].left.sidebar,
288
+ .ui[class*="very thin"].right.sidebar {
289
+ width: @veryThinWidth;
290
+ }
287
291
  }
288
292
  }
289
293
 
@@ -298,9 +302,11 @@ body.pushable > .pusher {
298
302
  width: @wideWidth;
299
303
  }
300
304
 
301
- .ui[class*="very wide"].left.sidebar,
302
- .ui[class*="very wide"].right.sidebar {
303
- width: @veryWideWidth;
305
+ & when (@variationSidebarVeryWide) {
306
+ .ui[class*="very wide"].left.sidebar,
307
+ .ui[class*="very wide"].right.sidebar {
308
+ width: @veryWideWidth;
309
+ }
304
310
  }
305
311
  }
306
312
 
@@ -312,9 +318,11 @@ body.pushable > .pusher {
312
318
  transform: translate3d(@thinWidth, 0, 0);
313
319
  }
314
320
 
315
- .ui.visible[class*="very thin"].left.sidebar ~ .fixed,
316
- .ui.visible[class*="very thin"].left.sidebar ~ .pusher {
317
- transform: translate3d(@veryThinWidth, 0, 0);
321
+ & when (@variationSidebarVeryThin) {
322
+ .ui.visible[class*="very thin"].left.sidebar ~ .fixed,
323
+ .ui.visible[class*="very thin"].left.sidebar ~ .pusher {
324
+ transform: translate3d(@veryThinWidth, 0, 0);
325
+ }
318
326
  }
319
327
  }
320
328
 
@@ -324,9 +332,11 @@ body.pushable > .pusher {
324
332
  transform: translate3d(@wideWidth, 0, 0);
325
333
  }
326
334
 
327
- .ui.visible[class*="very wide"].left.sidebar ~ .fixed,
328
- .ui.visible[class*="very wide"].left.sidebar ~ .pusher {
329
- transform: translate3d(@veryWideWidth, 0, 0);
335
+ & when (@variationSidebarVeryWide) {
336
+ .ui.visible[class*="very wide"].left.sidebar ~ .fixed,
337
+ .ui.visible[class*="very wide"].left.sidebar ~ .pusher {
338
+ transform: translate3d(@veryWideWidth, 0, 0);
339
+ }
330
340
  }
331
341
  }
332
342
  }
@@ -339,9 +349,11 @@ body.pushable > .pusher {
339
349
  transform: translate3d(-@thinWidth, 0, 0);
340
350
  }
341
351
 
342
- .ui.visible[class*="very thin"].right.sidebar ~ .fixed,
343
- .ui.visible[class*="very thin"].right.sidebar ~ .pusher {
344
- transform: translate3d(-@veryThinWidth, 0, 0);
352
+ & when (@variationSidebarVeryThin) {
353
+ .ui.visible[class*="very thin"].right.sidebar ~ .fixed,
354
+ .ui.visible[class*="very thin"].right.sidebar ~ .pusher {
355
+ transform: translate3d(-@veryThinWidth, 0, 0);
356
+ }
345
357
  }
346
358
  }
347
359
 
@@ -351,9 +363,11 @@ body.pushable > .pusher {
351
363
  transform: translate3d(-@wideWidth, 0, 0);
352
364
  }
353
365
 
354
- .ui.visible[class*="very wide"].right.sidebar ~ .fixed,
355
- .ui.visible[class*="very wide"].right.sidebar ~ .pusher {
356
- transform: translate3d(-@veryWideWidth, 0, 0);
366
+ & when (@variationSidebarVeryWide) {
367
+ .ui.visible[class*="very wide"].right.sidebar ~ .fixed,
368
+ .ui.visible[class*="very wide"].right.sidebar ~ .pusher {
369
+ transform: translate3d(-@veryWideWidth, 0, 0);
370
+ }
357
371
  }
358
372
  }
359
373
  }
@@ -291,46 +291,47 @@
291
291
  /*--------------
292
292
  Colors
293
293
  ---------------*/
294
+ & when not (@variationSliderColors = false) {
295
+ each(@variationSliderColors, {
296
+ @color: @value;
297
+ @c: @colors[@@color][color];
298
+ @l: @colors[@@color][light];
299
+ @h: @colors[@@color][hover];
300
+ @lh: @colors[@@color][lightHover];
301
+
302
+ /* Standard */
303
+ .ui.@{color}.slider .inner .track-fill {
304
+ background-color: @c;
305
+ }
306
+ & when (@variationSliderInverted) {
307
+ .ui.@{color}.inverted.slider .inner .track-fill {
308
+ background-color: @l;
309
+ }
310
+ }
294
311
 
295
- each(@colors, {
296
- @color: replace(@key, '@', '');
297
- @c: @colors[@@color][color];
298
- @l: @colors[@@color][light];
299
- @h: @colors[@@color][hover];
300
- @lh: @colors[@@color][lightHover];
301
-
302
- /* Standard */
303
- .ui.@{color}.slider .inner .track-fill {
304
- background-color: @c;
305
- }
306
- & when (@variationSliderInverted) {
307
- .ui.@{color}.inverted.slider .inner .track-fill {
308
- background-color: @l;
309
- }
310
- }
311
-
312
- & when (@variationSliderBasic) {
313
- /* Basic */
314
- .ui.@{color}.slider.basic .inner .thumb {
315
- background-color: @c;
316
- }
317
- .ui.@{color}.slider.basic .inner .thumb:hover,
318
- .ui.@{color}.slider.basic:focus .inner .thumb {
319
- background-color: @h;
320
- }
321
- & when (@variationSliderInverted) {
322
- /* Basic Inverted */
323
- .ui.@{color}.inverted.slider.basic .inner .thumb {
324
- background-color: @l;
325
- }
326
- .ui.@{color}.inverted.slider.basic .inner .thumb:hover,
327
- .ui.@{color}.inverted.slider.basic:focus .inner .thumb {
328
- background-color: @lh;
329
- }
330
- }
331
- }
312
+ & when (@variationSliderBasic) {
313
+ /* Basic */
314
+ .ui.@{color}.slider.basic .inner .thumb {
315
+ background-color: @c;
316
+ }
317
+ .ui.@{color}.slider.basic .inner .thumb:hover,
318
+ .ui.@{color}.slider.basic:focus .inner .thumb {
319
+ background-color: @h;
320
+ }
321
+ & when (@variationSliderInverted) {
322
+ /* Basic Inverted */
323
+ .ui.@{color}.inverted.slider.basic .inner .thumb {
324
+ background-color: @l;
325
+ }
326
+ .ui.@{color}.inverted.slider.basic .inner .thumb:hover,
327
+ .ui.@{color}.inverted.slider.basic:focus .inner .thumb {
328
+ background-color: @lh;
329
+ }
330
+ }
331
+ }
332
332
 
333
- })
333
+ })
334
+ }
334
335
 
335
336
  & when (@variationSliderBasic) {
336
337
  /*--------------
@@ -100,10 +100,18 @@ $.fn.tab = function(parameters) {
100
100
  initializedHistory = true;
101
101
  }
102
102
 
103
- if(settings.autoTabActivation && instance === undefined && module.determine.activeTab() == null) {
104
- module.debug('No active tab detected, setting first tab active', module.get.initialPath());
105
- module.changeTab(settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation);
106
- };
103
+ var activeTab = module.determine.activeTab();
104
+ if(settings.autoTabActivation && instance === undefined && activeTab == null) {
105
+ activeTab = settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation;
106
+ module.debug('No active tab detected, setting tab active', activeTab);
107
+ module.changeTab(activeTab);
108
+ }
109
+ if(activeTab != null && settings.history) {
110
+ var autoUpdate = $.address.autoUpdate();
111
+ $.address.autoUpdate(false);
112
+ $.address.value(activeTab);
113
+ $.address.autoUpdate(autoUpdate);
114
+ }
107
115
 
108
116
  module.instantiate();
109
117
  },
@@ -203,6 +211,7 @@ $.fn.tab = function(parameters) {
203
211
  .history(true)
204
212
  .state(settings.path)
205
213
  ;
214
+ $(window).trigger('popstate');
206
215
  }
207
216
  else {
208
217
  module.error(error.path);
@@ -370,6 +379,10 @@ $.fn.tab = function(parameters) {
370
379
  module.verbose('Tab parameters found', nextPathArray);
371
380
  }
372
381
  }
382
+ if (settings.onBeforeChange.call(element, currentPath) === false) {
383
+ module.debug('onBeforeChange returned false, cancelling tab change', $tab);
384
+ return false;
385
+ }
373
386
  if(isLastTab && remoteContent) {
374
387
  if(!shouldIgnoreLoad) {
375
388
  module.activate.navigation(currentPath);
@@ -406,6 +419,10 @@ $.fn.tab = function(parameters) {
406
419
  // if anchor exists use parent tab
407
420
  if($anchor && $anchor.length > 0 && currentPath) {
408
421
  module.debug('Anchor link used, opening parent tab', $tab, $anchor);
422
+ if (settings.onBeforeChange.call(element, currentPath) === false) {
423
+ module.debug('onBeforeChange returned false, cancelling tab change', $tab);
424
+ return false;
425
+ }
409
426
  if( !$tab.hasClass(className.active) ) {
410
427
  setTimeout(function() {
411
428
  module.scrollTo($anchor);
@@ -959,6 +976,7 @@ $.fn.tab.settings = {
959
976
  onLoad : function(tabPath, parameterArray, historyEvent) {}, // called on every load
960
977
  onVisible : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible
961
978
  onRequest : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content
979
+ onBeforeChange: function(tabPath) {}, // called before a tab is about to be changed. Returning false will cancel the tab change
962
980
 
963
981
  templates : {
964
982
  determineTitle: function(tabArray) {} // returns page title for path
@@ -69,12 +69,14 @@ $.fn.toast = function(parameters) {
69
69
  element = this,
70
70
  instance = isToastComponent ? $module.data(moduleNamespace) : undefined,
71
71
 
72
+ id,
72
73
  module
73
74
  ;
74
75
  module = {
75
76
 
76
77
  initialize: function() {
77
78
  module.verbose('Initializing element');
79
+ module.create.id();
78
80
  if (!module.has.container()) {
79
81
  module.create.container();
80
82
  }
@@ -124,17 +126,22 @@ $.fn.toast = function(parameters) {
124
126
  },
125
127
 
126
128
  show: function(callback) {
127
- callback = callback || function(){};
128
- module.debug('Showing toast');
129
129
  if(settings.onShow.call($toastBox, element) === false) {
130
130
  module.debug('onShow callback returned false, cancelling toast animation');
131
131
  return;
132
132
  }
133
+ callback = callback || function(){};
134
+ module.debug('Showing toast');
133
135
  module.animate.show(callback);
134
136
  },
135
137
 
136
138
  close: function(callback) {
139
+ if(settings.onHide.call($toastBox, element) === false) {
140
+ module.debug('onHide callback returned false, cancelling toast animation');
141
+ return;
142
+ }
137
143
  callback = callback || function(){};
144
+ module.debug('Closing toast');
138
145
  module.remove.visible();
139
146
  module.unbind.events();
140
147
  module.animate.close(callback);
@@ -146,12 +153,16 @@ $.fn.toast = function(parameters) {
146
153
  module.verbose('Creating container');
147
154
  $context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '')}));
148
155
  },
156
+ id: function() {
157
+ id = (Math.random().toString(16) + '000000000').slice(2, 10);
158
+ module.verbose('Creating unique id for element', id);
159
+ },
149
160
  toast: function() {
150
161
  $toastBox = $('<div/>', {class: className.box});
151
162
  var iconClass = module.get.iconClass();
152
163
  if (!isToastComponent) {
153
164
  module.verbose('Creating toast');
154
- $toast = $('<div/>');
165
+ $toast = $('<div/>', {role: 'alert'});
155
166
  var $content = $('<div/>', {class: className.content});
156
167
  if (iconClass !== '') {
157
168
  $toast.append($('<i/>', {class: iconClass + ' ' + className.icon}));
@@ -164,13 +175,21 @@ $.fn.toast = function(parameters) {
164
175
  }));
165
176
  }
166
177
  if (settings.title !== '') {
178
+ var titleId = '_' + module.get.id() + 'title';
179
+ $toast.attr('aria-labelledby', titleId);
167
180
  $content.append($('<div/>', {
168
181
  class: className.title,
169
- text: settings.title
182
+ id: titleId,
183
+ html: module.helpers.escape(settings.title, settings.preserveHTML)
170
184
  }));
171
185
  }
172
-
173
- $content.append($('<div/>', {class: className.message, html: module.helpers.escape(settings.message, settings.preserveHTML)}));
186
+ var descId = '_' + module.get.id() + 'desc';
187
+ $toast.attr('aria-describedby', descId);
188
+ $content.append($('<div/>', {
189
+ class: className.message,
190
+ id: descId,
191
+ html: module.helpers.escape(settings.message, settings.preserveHTML)
192
+ }));
174
193
 
175
194
  $toast
176
195
  .addClass(settings.class + ' ' + className.toast)
@@ -178,7 +197,7 @@ $.fn.toast = function(parameters) {
178
197
  ;
179
198
  $toast.css('opacity', settings.opacity);
180
199
  if (settings.closeIcon) {
181
- $close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : '')});
200
+ $close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''), role: 'button', tabindex: 0, 'aria-label': settings.text.close});
182
201
  if($close.hasClass(className.left)) {
183
202
  $toast.prepend($close);
184
203
  } else {
@@ -221,15 +240,17 @@ $.fn.toast = function(parameters) {
221
240
  }
222
241
  }
223
242
  settings.actions.forEach(function (el) {
224
- var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
243
+ var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
225
244
  text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
226
245
  cls = module.helpers.deQuote(el[fields.class] || ''),
227
246
  click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
228
247
  $actions.append($('<button/>', {
229
248
  html: icon + text,
249
+ 'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
230
250
  class: className.button + ' ' + cls,
231
251
  click: function () {
232
- if (click.call(element, $module) === false) {
252
+ var button = $(this);
253
+ if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
233
254
  return;
234
255
  }
235
256
  module.close();
@@ -329,13 +350,12 @@ $.fn.toast = function(parameters) {
329
350
  bind: {
330
351
  events: function() {
331
352
  module.debug('Binding events to toast');
332
- if(settings.closeOnClick || settings.closeIcon) {
333
- (settings.closeIcon ? $close : $toast)
334
- .on('click' + eventNamespace, module.event.click)
335
- ;
353
+ if(settings.closeIcon) {
354
+ $close.on('click' + eventNamespace, module.event.close);
336
355
  }
356
+ $toast.on('click' + eventNamespace, module.event.click);
337
357
  if($animationObject) {
338
- $animationObject.on('animationend' + eventNamespace, module.close);
358
+ $animationObject.on('animationend' + eventNamespace, module.event.close);
339
359
  }
340
360
  $toastBox
341
361
  .on('click' + eventNamespace, selector.approve, module.event.approve)
@@ -347,11 +367,10 @@ $.fn.toast = function(parameters) {
347
367
  unbind: {
348
368
  events: function() {
349
369
  module.debug('Unbinding events to toast');
350
- if(settings.closeOnClick || settings.closeIcon) {
351
- (settings.closeIcon ? $close : $toast)
352
- .off('click' + eventNamespace)
353
- ;
370
+ if(settings.closeIcon) {
371
+ $close.off('click' + eventNamespace);
354
372
  }
373
+ $toast.off('click' + eventNamespace);
355
374
  if($animationObject) {
356
375
  $animationObject.off('animationend' + eventNamespace);
357
376
  }
@@ -383,11 +402,6 @@ $.fn.toast = function(parameters) {
383
402
  },
384
403
  close: function(callback) {
385
404
  callback = $.isFunction(callback) ? callback : function(){};
386
- module.debug('Closing toast');
387
- if(settings.onHide.call($toastBox, element) === false) {
388
- module.debug('onHide callback returned false, cancelling toast animation');
389
- return;
390
- }
391
405
  if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
392
406
  $toastBox
393
407
  .transition({
@@ -443,7 +457,7 @@ $.fn.toast = function(parameters) {
443
457
  has: {
444
458
  container: function() {
445
459
  module.verbose('Determining if there is already a container');
446
- return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
460
+ return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')')).length > 0);
447
461
  },
448
462
  toast: function(){
449
463
  return !!module.get.toast();
@@ -457,8 +471,11 @@ $.fn.toast = function(parameters) {
457
471
  },
458
472
 
459
473
  get: {
474
+ id: function() {
475
+ return id;
476
+ },
460
477
  container: function() {
461
- return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
478
+ return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')'))[0]);
462
479
  },
463
480
  toastBox: function() {
464
481
  return $toastBox || null;
@@ -490,9 +507,15 @@ $.fn.toast = function(parameters) {
490
507
  },
491
508
 
492
509
  event: {
510
+ close: function(){
511
+ module.close();
512
+ },
493
513
  click: function(event) {
494
- if($(event.target).closest('a').length === 0) {
495
- settings.onClick.call($toastBox, element);
514
+ if($(event.target).closest(selector.clickable).length === 0) {
515
+ if(settings.onClick.call($toastBox, element) === false || !settings.closeOnClick) {
516
+ module.verbose('Click callback returned false or close denied by setting cancelling close');
517
+ return;
518
+ }
496
519
  module.close();
497
520
  }
498
521
  },
@@ -833,6 +856,10 @@ $.fn.toast.settings = {
833
856
  unclickable : 'unclickable'
834
857
  },
835
858
 
859
+ text: {
860
+ close : 'Close'
861
+ },
862
+
836
863
  icons : {
837
864
  info : 'info',
838
865
  success : 'checkmark',
@@ -849,6 +876,7 @@ $.fn.toast.settings = {
849
876
  image : '> img.image, > .image > img',
850
877
  icon : '> i.icon',
851
878
  input : 'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',
879
+ clickable : 'a, details, .ui.accordion',
852
880
  approve : '.actions .positive, .actions .approve, .actions .ok',
853
881
  deny : '.actions .negative, .actions .deny, .actions .cancel'
854
882
  },