fomantic-ui 2.9.0-beta.28 → 2.9.0-beta.280

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 (312) hide show
  1. package/.all-contributorsrc +224 -3
  2. package/.github/workflows/ci.yml +7 -6
  3. package/.github/workflows/nightly.yml +13 -8
  4. package/.github/workflows/release.yml +31 -0
  5. package/CONTRIBUTORS.md +77 -37
  6. package/README.md +8 -8
  7. package/dist/components/accordion.css +175 -35
  8. package/dist/components/accordion.js +6 -3
  9. package/dist/components/accordion.min.css +2 -2
  10. package/dist/components/accordion.min.js +3 -3
  11. package/dist/components/ad.css +4 -4
  12. package/dist/components/ad.min.css +2 -2
  13. package/dist/components/api.js +88 -29
  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 +195 -148
  18. package/dist/components/button.min.css +2 -2
  19. package/dist/components/calendar.css +18 -1
  20. package/dist/components/calendar.js +84 -67
  21. package/dist/components/calendar.min.css +2 -2
  22. package/dist/components/calendar.min.js +3 -3
  23. package/dist/components/card.css +753 -116
  24. package/dist/components/card.min.css +2 -2
  25. package/dist/components/checkbox.css +92 -91
  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 +12 -12
  30. package/dist/components/comment.min.css +2 -2
  31. package/dist/components/container.css +97 -3
  32. package/dist/components/container.min.css +2 -2
  33. package/dist/components/dimmer.css +29 -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 +31 -31
  38. package/dist/components/divider.min.css +2 -2
  39. package/dist/components/dropdown.css +89 -49
  40. package/dist/components/dropdown.js +95 -49
  41. package/dist/components/dropdown.min.css +2 -2
  42. package/dist/components/dropdown.min.js +3 -3
  43. package/dist/components/embed.css +5 -5
  44. package/dist/components/embed.js +1 -1
  45. package/dist/components/embed.min.css +2 -2
  46. package/dist/components/embed.min.js +3 -3
  47. package/dist/components/emoji.css +10839 -8831
  48. package/dist/components/emoji.min.css +1 -1
  49. package/dist/components/feed.css +29 -29
  50. package/dist/components/feed.min.css +2 -2
  51. package/dist/components/flag.css +1001 -892
  52. package/dist/components/flag.min.css +2 -2
  53. package/dist/components/form.css +158 -81
  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 +25 -21
  58. package/dist/components/grid.min.css +2 -2
  59. package/dist/components/header.css +5 -3
  60. package/dist/components/header.min.css +2 -2
  61. package/dist/components/icon.css +2063 -1984
  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 +758 -21
  66. package/dist/components/input.min.css +2 -2
  67. package/dist/components/item.css +16 -16
  68. package/dist/components/item.min.css +2 -2
  69. package/dist/components/label.css +64 -64
  70. package/dist/components/label.min.css +2 -2
  71. package/dist/components/list.css +30 -30
  72. package/dist/components/list.min.css +2 -2
  73. package/dist/components/loader.css +352 -352
  74. package/dist/components/loader.min.css +2 -2
  75. package/dist/components/menu.css +107 -75
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +42 -42
  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 +3 -3
  87. package/dist/components/placeholder.css +33 -33
  88. package/dist/components/placeholder.min.css +2 -2
  89. package/dist/components/popup.css +99 -103
  90. package/dist/components/popup.js +2 -2
  91. package/dist/components/popup.min.css +2 -2
  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 +3 -3
  103. package/dist/components/reset.css +5 -4
  104. package/dist/components/reset.min.css +2 -2
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +3 -3
  108. package/dist/components/search.js +2 -2
  109. package/dist/components/search.min.css +2 -2
  110. package/dist/components/search.min.js +3 -3
  111. package/dist/components/segment.css +118 -34
  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 +7 -5
  118. package/dist/components/sidebar.js +12 -10
  119. package/dist/components/sidebar.min.css +2 -2
  120. package/dist/components/sidebar.min.js +3 -3
  121. package/dist/components/site.css +65 -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 +3 -3
  125. package/dist/components/slider.css +17 -17
  126. package/dist/components/slider.js +68 -51
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +3 -3
  129. package/dist/components/state.js +1 -1
  130. package/dist/components/state.min.js +3 -3
  131. package/dist/components/statistic.css +2 -2
  132. package/dist/components/statistic.min.css +2 -2
  133. package/dist/components/step.css +30 -30
  134. package/dist/components/step.min.css +2 -2
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +1 -1
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +3 -3
  139. package/dist/components/tab.css +5 -5
  140. package/dist/components/tab.js +23 -5
  141. package/dist/components/tab.min.css +2 -2
  142. package/dist/components/tab.min.js +3 -3
  143. package/dist/components/table.css +1174 -32
  144. package/dist/components/table.min.css +2 -2
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +39 -1
  148. package/dist/components/toast.js +56 -28
  149. package/dist/components/toast.min.css +2 -2
  150. package/dist/components/toast.min.js +3 -3
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +21 -16
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +3 -3
  155. package/dist/components/visibility.js +1 -1
  156. package/dist/components/visibility.min.js +3 -3
  157. package/dist/semantic.css +19522 -13088
  158. package/dist/semantic.js +666 -369
  159. package/dist/semantic.min.css +3 -3
  160. package/dist/semantic.min.js +3 -3
  161. package/dist/themes/default/assets/fonts/brand-icons.eot +0 -0
  162. package/dist/themes/default/assets/fonts/brand-icons.svg +801 -654
  163. package/dist/themes/default/assets/fonts/brand-icons.ttf +0 -0
  164. package/dist/themes/default/assets/fonts/brand-icons.woff +0 -0
  165. package/dist/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  166. package/dist/themes/default/assets/fonts/icons.eot +0 -0
  167. package/dist/themes/default/assets/fonts/icons.svg +1175 -1079
  168. package/dist/themes/default/assets/fonts/icons.ttf +0 -0
  169. package/dist/themes/default/assets/fonts/icons.woff +0 -0
  170. package/dist/themes/default/assets/fonts/icons.woff2 +0 -0
  171. package/dist/themes/default/assets/fonts/outline-icons.eot +0 -0
  172. package/dist/themes/default/assets/fonts/outline-icons.svg +93 -95
  173. package/dist/themes/default/assets/fonts/outline-icons.ttf +0 -0
  174. package/dist/themes/default/assets/fonts/outline-icons.woff +0 -0
  175. package/dist/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  176. package/examples/assets/library/iframe-content.js +8 -8
  177. package/examples/assets/library/iframe.js +3 -3
  178. package/package.json +16 -14
  179. package/scripts/nightly-version.js +47 -38
  180. package/src/definitions/behaviors/api.js +87 -28
  181. package/src/definitions/behaviors/form.js +37 -28
  182. package/src/definitions/collections/form.less +225 -161
  183. package/src/definitions/collections/grid.less +723 -687
  184. package/src/definitions/collections/menu.less +224 -166
  185. package/src/definitions/collections/message.less +49 -47
  186. package/src/definitions/collections/table.less +855 -268
  187. package/src/definitions/elements/button.less +611 -469
  188. package/src/definitions/elements/container.less +145 -8
  189. package/src/definitions/elements/divider.less +24 -24
  190. package/src/definitions/elements/emoji.less +16 -10
  191. package/src/definitions/elements/flag.less +8 -18
  192. package/src/definitions/elements/header.less +46 -37
  193. package/src/definitions/elements/icon.less +39 -32
  194. package/src/definitions/elements/input.less +268 -26
  195. package/src/definitions/elements/label.less +125 -124
  196. package/src/definitions/elements/list.less +84 -75
  197. package/src/definitions/elements/loader.less +99 -98
  198. package/src/definitions/elements/placeholder.less +32 -32
  199. package/src/definitions/elements/segment.less +174 -55
  200. package/src/definitions/elements/step.less +76 -72
  201. package/src/definitions/elements/text.less +17 -15
  202. package/src/definitions/globals/reset.less +2 -2
  203. package/src/definitions/globals/site.less +23 -2
  204. package/src/definitions/modules/accordion.js +5 -2
  205. package/src/definitions/modules/accordion.less +181 -29
  206. package/src/definitions/modules/calendar.js +83 -66
  207. package/src/definitions/modules/calendar.less +20 -0
  208. package/src/definitions/modules/checkbox.js +16 -10
  209. package/src/definitions/modules/checkbox.less +83 -227
  210. package/src/definitions/modules/dimmer.js +10 -4
  211. package/src/definitions/modules/dimmer.less +21 -8
  212. package/src/definitions/modules/dropdown.js +94 -48
  213. package/src/definitions/modules/dropdown.less +178 -127
  214. package/src/definitions/modules/embed.less +4 -4
  215. package/src/definitions/modules/modal.js +126 -48
  216. package/src/definitions/modules/modal.less +12 -0
  217. package/src/definitions/modules/nag.less +20 -19
  218. package/src/definitions/modules/popup.js +1 -1
  219. package/src/definitions/modules/popup.less +86 -90
  220. package/src/definitions/modules/progress.js +3 -0
  221. package/src/definitions/modules/progress.less +19 -18
  222. package/src/definitions/modules/rating.less +35 -34
  223. package/src/definitions/modules/search.js +1 -1
  224. package/src/definitions/modules/search.less +35 -19
  225. package/src/definitions/modules/shape.js +2 -2
  226. package/src/definitions/modules/sidebar.js +11 -9
  227. package/src/definitions/modules/sidebar.less +36 -22
  228. package/src/definitions/modules/slider.js +67 -50
  229. package/src/definitions/modules/slider.less +48 -47
  230. package/src/definitions/modules/tab.js +22 -4
  231. package/src/definitions/modules/tab.less +4 -4
  232. package/src/definitions/modules/toast.js +55 -27
  233. package/src/definitions/modules/toast.less +48 -16
  234. package/src/definitions/modules/transition.js +20 -15
  235. package/src/definitions/views/ad.less +3 -3
  236. package/src/definitions/views/card.less +519 -374
  237. package/src/definitions/views/comment.less +93 -82
  238. package/src/definitions/views/feed.less +164 -144
  239. package/src/definitions/views/item.less +251 -198
  240. package/src/definitions/views/statistic.less +91 -89
  241. package/src/themes/basic/elements/icon.overrides +149 -149
  242. package/src/themes/basic/elements/step.overrides +2 -2
  243. package/src/themes/bookish/elements/header.overrides +1 -1
  244. package/src/themes/chubby/elements/button.overrides +1 -1
  245. package/src/themes/chubby/elements/header.overrides +1 -1
  246. package/src/themes/default/assets/fonts/brand-icons.eot +0 -0
  247. package/src/themes/default/assets/fonts/brand-icons.svg +801 -654
  248. package/src/themes/default/assets/fonts/brand-icons.ttf +0 -0
  249. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  250. package/src/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  251. package/src/themes/default/assets/fonts/icons.eot +0 -0
  252. package/src/themes/default/assets/fonts/icons.svg +1175 -1079
  253. package/src/themes/default/assets/fonts/icons.ttf +0 -0
  254. package/src/themes/default/assets/fonts/icons.woff +0 -0
  255. package/src/themes/default/assets/fonts/icons.woff2 +0 -0
  256. package/src/themes/default/assets/fonts/outline-icons.eot +0 -0
  257. package/src/themes/default/assets/fonts/outline-icons.svg +93 -95
  258. package/src/themes/default/assets/fonts/outline-icons.ttf +0 -0
  259. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  260. package/src/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  261. package/src/themes/default/collections/form.variables +4 -0
  262. package/src/themes/default/collections/menu.variables +6 -0
  263. package/src/themes/default/collections/table.variables +52 -0
  264. package/src/themes/default/elements/button.variables +7 -1
  265. package/src/themes/default/elements/container.variables +12 -0
  266. package/src/themes/default/elements/divider.overrides +7 -7
  267. package/src/themes/default/elements/emoji.overrides +1737 -1235
  268. package/src/themes/default/elements/flag.overrides +1641 -986
  269. package/src/themes/default/elements/flag.variables +7 -5
  270. package/src/themes/default/elements/icon.overrides +1975 -1949
  271. package/src/themes/default/elements/icon.variables +1 -0
  272. package/src/themes/default/elements/input.variables +15 -0
  273. package/src/themes/default/elements/segment.variables +8 -0
  274. package/src/themes/default/elements/step.overrides +3 -3
  275. package/src/themes/default/globals/site.variables +6 -0
  276. package/src/themes/default/globals/variation.variables +140 -6
  277. package/src/themes/default/modules/accordion.overrides +6 -5
  278. package/src/themes/default/modules/accordion.variables +49 -2
  279. package/src/themes/default/modules/calendar.variables +3 -0
  280. package/src/themes/default/modules/checkbox.overrides +9 -9
  281. package/src/themes/default/modules/checkbox.variables +5 -5
  282. package/src/themes/default/modules/dimmer.variables +1 -1
  283. package/src/themes/default/modules/dropdown.overrides +5 -5
  284. package/src/themes/default/modules/dropdown.variables +4 -10
  285. package/src/themes/default/modules/modal.variables +13 -0
  286. package/src/themes/default/modules/popup.variables +0 -2
  287. package/src/themes/default/modules/toast.variables +3 -0
  288. package/src/themes/default/views/card.variables +8 -0
  289. package/src/themes/famfamfam/elements/flag.overrides +1026 -0
  290. package/src/themes/famfamfam/elements/flag.variables +13 -0
  291. package/src/themes/github/elements/icon.overrides +206 -206
  292. package/src/themes/github/elements/step.overrides +5 -5
  293. package/src/themes/github/modules/dropdown.overrides +6 -6
  294. package/src/themes/instagram/views/card.overrides +1 -1
  295. package/src/themes/joypixels/elements/emoji.overrides +1762 -1260
  296. package/src/themes/joypixels/elements/emoji.variables +1 -1
  297. package/src/themes/material/collections/menu.overrides +1 -1
  298. package/src/themes/material/elements/button.overrides +1 -1
  299. package/src/themes/material/elements/header.overrides +1 -1
  300. package/src/themes/material/elements/icon.overrides +932 -932
  301. package/src/themes/material/globals/site.variables +0 -1
  302. package/src/themes/material/modules/dropdown.overrides +1 -1
  303. package/src/themes/material/modules/modal.overrides +1 -1
  304. package/src/themes/pulsar/elements/loader.overrides +2 -2
  305. package/src/themes/resetcss/globals/reset.overrides +3 -3
  306. package/src/themes/rtl/globals/site.overrides +1 -1
  307. package/src/themes/striped/modules/progress.overrides +1 -1
  308. package/src/themes/twitter/elements/emoji.overrides +1737 -1235
  309. package/tasks/build/css.js +6 -1
  310. package/tasks/config/project/install.js +15 -13
  311. package/tasks/install.js +1 -0
  312. package/test/helpers/sinon.js +2 -2
@@ -206,7 +206,7 @@
206
206
  transform: translate(-50%, 100%);
207
207
  }
208
208
  & when (@variationSliderTicked) {
209
- .ui.labeled.ticked.slider > .labels .label:after {
209
+ .ui.labeled.ticked.slider > .labels .label::after {
210
210
  content: ' ';
211
211
  height: @labelHeight;
212
212
  width: @labelWidth;
@@ -215,11 +215,11 @@
215
215
  top: 100%;
216
216
  left: 50%;
217
217
  }
218
- .ui.bottom.aligned.labeled.ticked.slider > .labels .label:after {
218
+ .ui.bottom.aligned.labeled.ticked.slider > .labels .label::after {
219
219
  top: auto;
220
220
  bottom: 100%;
221
221
  }
222
- .ui.labeled.ticked.slider > .labels .halftick.label:after {
222
+ .ui.labeled.ticked.slider > .labels .halftick.label::after {
223
223
  height: (@labelHeight / 2);
224
224
  }
225
225
  }
@@ -240,13 +240,13 @@
240
240
  transform: translate(-100%, -50%);
241
241
  }
242
242
 
243
- .ui.labeled.vertical.slider > .labels .label:after {
243
+ .ui.labeled.vertical.slider > .labels .label::after {
244
244
  width: @labelHeight;
245
245
  height: @labelWidth;
246
246
  left: 100%;
247
247
  top: 50%;
248
248
  }
249
- .ui.labeled.vertical.slider > .labels .halftick.label:after {
249
+ .ui.labeled.vertical.slider > .labels .halftick.label::after {
250
250
  width: (@labelHeight / 2);
251
251
  height: @labelWidth;
252
252
  }
@@ -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
  /*--------------
@@ -385,10 +386,10 @@ each(@colors, {
385
386
  }
386
387
  & when (@variationSliderLabeled) {
387
388
  .ui.@{value}.labeled.slider:not(.vertical) > .labels,
388
- .ui.@{value}.labeled.slider:not(.vertical) > .labels .label:after {
389
+ .ui.@{value}.labeled.slider:not(.vertical) > .labels .label::after {
389
390
  height: @@lh;
390
391
  }
391
- .ui.@{value}.labeled.slider:not(.vertical) > .labels .halftick.label:after {
392
+ .ui.@{value}.labeled.slider:not(.vertical) > .labels .halftick.label::after {
392
393
  height: (@@lh / 2);
393
394
  }
394
395
  }
@@ -404,10 +405,10 @@ each(@colors, {
404
405
  }
405
406
  & when (@variationSliderLabeled) {
406
407
  .ui.@{value}.labeled.vertical.slider> .labels,
407
- .ui.@{value}.labeled.vertical.slider> .labels .label:after {
408
+ .ui.@{value}.labeled.vertical.slider> .labels .label::after {
408
409
  width: @@lh;
409
410
  }
410
- .ui.@{value}.labeled.vertical.slider> .labels .halftick.label:after {
411
+ .ui.@{value}.labeled.vertical.slider> .labels .halftick.label::after {
411
412
  width: (@@lh / 2);
412
413
  }
413
414
  }
@@ -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
@@ -55,8 +55,8 @@
55
55
  left: @loadingContentOffset !important;
56
56
  }
57
57
 
58
- .ui.tab.loading:before,
59
- .ui.tab.loading.segment:before {
58
+ .ui.tab.loading::before,
59
+ .ui.tab.loading.segment::before {
60
60
  position: absolute;
61
61
  content: '';
62
62
  top: @loaderDistanceFromTop;
@@ -69,8 +69,8 @@
69
69
  border-radius: @circularRadius;
70
70
  border: @loaderLineWidth solid @loaderFillColor;
71
71
  }
72
- .ui.tab.loading:after,
73
- .ui.tab.loading.segment:after {
72
+ .ui.tab.loading::after,
73
+ .ui.tab.loading.segment::after {
74
74
  position: absolute;
75
75
  content: '';
76
76
  top: @loaderDistanceFromTop;
@@ -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
  },
@@ -523,6 +523,12 @@
523
523
  }
524
524
  }
525
525
  &.vertical when (@variationToastVertical) {
526
+ & > .content {
527
+ flex-grow: 1;
528
+ }
529
+ &.attached when (@variationToastAttached){
530
+ flex-grow: 1;
531
+ }
526
532
  & > .close.icon + .content when (@variationToastClose){
527
533
  padding-left: @toastCloseDistanceVertical;
528
534
  }
@@ -554,6 +560,29 @@
554
560
  border-bottom-right-radius: 0;
555
561
  }
556
562
  }
563
+
564
+ &.ui.ui.ui.image when (@variationToastImage) {
565
+ padding: 0;
566
+ & > .content {
567
+ padding-top: @inputVerticalPadding;
568
+ padding-bottom: @inputVerticalPadding;
569
+ padding-right: @inputHorizontalPadding;
570
+ }
571
+ & > .actions when (@variationToastActions) {
572
+ margin: 0;
573
+ }
574
+ & > .ui.image {
575
+ border-top-left-radius: @defaultBorderRadius;
576
+ border-bottom-left-radius: @defaultBorderRadius;
577
+ &.mini {
578
+ min-width: @toastImageMiniImageAdjustment;
579
+ & + .content {
580
+ min-height: @toastImageMiniImageAdjustment;
581
+ padding-left: @toastImageMiniImagePadding;
582
+ }
583
+ }
584
+ }
585
+ }
557
586
  }
558
587
 
559
588
 
@@ -603,24 +632,25 @@
603
632
  /*--------------
604
633
  Colors
605
634
  -------------- */
635
+ & when not (@variationToastColors = false) {
636
+ each(@variationToastColors, {
637
+ @color: @value;
638
+ @c: @colors[@@color][color];
639
+ @l: @colors[@@color][light];
606
640
 
607
- each(@colors, {
608
- @color: replace(@key, '@', '');
609
- @c: @colors[@@color][color];
610
- @l: @colors[@@color][light];
611
-
612
- .ui.@{color}.toast {
613
- background-color: @c;
614
- color: @toastTextColor;
615
- }
616
- & when (@variationToastInverted) {
617
- .ui.inverted.@{color}.toast,
618
- .ui.toast-container .toast-box > .inverted.@{color}.attached.progress .bar {
619
- background-color: @l;
620
- color: @toastInvertedTextColor;
641
+ .ui.@{color}.toast {
642
+ background-color: @c;
643
+ color: @toastTextColor;
621
644
  }
622
- }
623
- })
645
+ & when (@variationToastInverted) {
646
+ .ui.inverted.@{color}.toast,
647
+ .ui.toast-container .toast-box > .inverted.@{color}.attached.progress .bar {
648
+ background-color: @l;
649
+ color: @toastInvertedTextColor;
650
+ }
651
+ }
652
+ })
653
+ }
624
654
 
625
655
  & when (@variationToastInverted) {
626
656
  .ui.inverted.toast {
@@ -679,3 +709,5 @@ each(@colors, {
679
709
  opacity: 0;
680
710
  }
681
711
  }
712
+
713
+ .loadUIOverrides();
@@ -771,6 +771,10 @@ $.fn.transition = function() {
771
771
  },
772
772
 
773
773
  hide: function() {
774
+ if(settings.onHide.call(element) === false) {
775
+ module.verbose('Hide callback returned false cancelling hide');
776
+ return false;
777
+ }
774
778
  module.verbose('Hiding element');
775
779
  if( module.is.animating() ) {
776
780
  module.reset();
@@ -778,35 +782,32 @@ $.fn.transition = function() {
778
782
  element.blur(); // IE will trigger focus change if element is not blurred before hiding
779
783
  module.remove.display();
780
784
  module.remove.visible();
781
- if($.isFunction(settings.onBeforeHide)){
782
- settings.onBeforeHide.call(element,function(){
783
- module.hideNow();
784
- });
785
- } else {
786
- module.hideNow();
787
- }
788
-
785
+ settings.onBeforeHide.call(element, module.hideNow);
789
786
  },
790
787
 
791
788
  hideNow: function() {
792
789
  module.set.hidden();
793
790
  module.force.hidden();
794
- settings.onHide.call(element);
791
+ settings.onHidden.call(element);
795
792
  settings.onComplete.call(element);
796
793
  // module.repaint();
797
794
  },
798
795
 
799
796
  show: function(display) {
800
- module.verbose('Showing element', display);
801
- if(module.force.visible()) {
797
+ if(module.force.visible() && settings.onShow.call(element) !== false) {
798
+ module.verbose('Showing element', display);
802
799
  module.remove.hidden();
803
- module.set.visible();
804
- settings.onShow.call(element);
805
- settings.onComplete.call(element);
806
- // module.repaint();
800
+ settings.onBeforeShow.call(element, module.showNow);
807
801
  }
808
802
  },
809
803
 
804
+ showNow: function(){
805
+ module.set.visible();
806
+ settings.onVisible.call(element);
807
+ settings.onComplete.call(element);
808
+ // module.repaint();
809
+ },
810
+
810
811
  toggle: function() {
811
812
  if( module.is.visible() ) {
812
813
  module.hide();
@@ -1055,7 +1056,11 @@ $.fn.transition.settings = {
1055
1056
  onStart : function() {},
1056
1057
  onComplete : function() {},
1057
1058
  onShow : function() {},
1059
+ onBeforeShow : function(callback) {callback.call(this)},
1060
+ onVisible : function() {},
1058
1061
  onHide : function() {},
1062
+ onHidden : function() {},
1063
+ onBeforeHide : function(callback) {callback.call(this)},
1059
1064
 
1060
1065
  // whether timeout should be used to ensure callback fires in cases animationend does not
1061
1066
  useFailSafe : true,
@@ -271,7 +271,7 @@
271
271
  position: relative;
272
272
  background: @testBackground;
273
273
  }
274
- .ui.test.ad:after {
274
+ .ui.test.ad::after {
275
275
  position: absolute;
276
276
  top: 50%;
277
277
  left: 50%;
@@ -285,11 +285,11 @@
285
285
  font-weight: @testFontWeight;
286
286
  }
287
287
  & when (@variationAdMobile) {
288
- .ui.mobile.test.ad:after {
288
+ .ui.mobile.test.ad::after {
289
289
  font-size: @testMobileFontSize;
290
290
  }
291
291
  }
292
- .ui.test.ad[data-text]:after {
292
+ .ui.test.ad[data-text]::after {
293
293
  content: attr(data-text);
294
294
  }
295
295
  }