fomantic-ui 2.8.8-beta.99 → 2.9.0-beta.100

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 (244) hide show
  1. package/.all-contributorsrc +188 -3
  2. package/.github/dependabot.yml +17 -0
  3. package/.github/workflows/ci.yml +1 -1
  4. package/CHANGELOG.md +139 -0
  5. package/CONTRIBUTING.md +1 -1
  6. package/CONTRIBUTORS.md +71 -37
  7. package/README.md +3 -3
  8. package/dist/components/accordion.css +50 -6
  9. package/dist/components/accordion.js +1 -1
  10. package/dist/components/accordion.min.css +2 -2
  11. package/dist/components/accordion.min.js +3 -3
  12. package/dist/components/ad.css +1 -1
  13. package/dist/components/ad.min.css +1 -1
  14. package/dist/components/api.js +26 -24
  15. package/dist/components/api.min.js +4 -4
  16. package/dist/components/breadcrumb.css +1 -1
  17. package/dist/components/breadcrumb.min.css +1 -1
  18. package/dist/components/button.css +81 -81
  19. package/dist/components/button.min.css +2 -2
  20. package/dist/components/calendar.css +1 -1
  21. package/dist/components/calendar.js +110 -11
  22. package/dist/components/calendar.min.css +1 -1
  23. package/dist/components/calendar.min.js +4 -4
  24. package/dist/components/card.css +26 -19
  25. package/dist/components/card.min.css +2 -2
  26. package/dist/components/checkbox.css +6 -4
  27. package/dist/components/checkbox.js +17 -11
  28. package/dist/components/checkbox.min.css +2 -2
  29. package/dist/components/checkbox.min.js +4 -4
  30. package/dist/components/comment.css +11 -11
  31. package/dist/components/comment.min.css +1 -1
  32. package/dist/components/container.css +3 -4
  33. package/dist/components/container.min.css +2 -2
  34. package/dist/components/dimmer.css +28 -14
  35. package/dist/components/dimmer.js +15 -12
  36. package/dist/components/dimmer.min.css +2 -2
  37. package/dist/components/dimmer.min.js +4 -4
  38. package/dist/components/divider.css +1 -1
  39. package/dist/components/divider.min.css +1 -1
  40. package/dist/components/dropdown.css +54 -7
  41. package/dist/components/dropdown.js +107 -77
  42. package/dist/components/dropdown.min.css +2 -2
  43. package/dist/components/dropdown.min.js +4 -4
  44. package/dist/components/embed.css +1 -1
  45. package/dist/components/embed.js +1 -1
  46. package/dist/components/embed.min.css +1 -1
  47. package/dist/components/embed.min.js +3 -3
  48. package/dist/components/emoji.css +2 -2
  49. package/dist/components/feed.css +28 -28
  50. package/dist/components/feed.min.css +2 -2
  51. package/dist/components/flag.css +731 -625
  52. package/dist/components/flag.min.css +2 -2
  53. package/dist/components/form.css +119 -54
  54. package/dist/components/form.js +51 -70
  55. package/dist/components/form.min.css +2 -2
  56. package/dist/components/form.min.js +4 -4
  57. package/dist/components/grid.css +13 -11
  58. package/dist/components/grid.min.css +2 -2
  59. package/dist/components/header.css +3 -3
  60. package/dist/components/header.min.css +2 -2
  61. package/dist/components/icon.css +86 -5
  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 +17 -2
  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 +39 -37
  74. package/dist/components/loader.min.css +2 -2
  75. package/dist/components/menu.css +37 -11
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +78 -34
  78. package/dist/components/message.min.css +2 -2
  79. package/dist/components/modal.css +7 -5
  80. package/dist/components/modal.js +237 -41
  81. package/dist/components/modal.min.css +2 -2
  82. package/dist/components/modal.min.js +4 -4
  83. package/dist/components/nag.css +168 -16
  84. package/dist/components/nag.js +131 -65
  85. package/dist/components/nag.min.css +2 -2
  86. package/dist/components/nag.min.js +4 -4
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +5 -3
  90. package/dist/components/popup.js +5 -5
  91. package/dist/components/popup.min.css +2 -2
  92. package/dist/components/popup.min.js +4 -4
  93. package/dist/components/progress.css +2 -1
  94. package/dist/components/progress.js +3 -3
  95. package/dist/components/progress.min.css +2 -2
  96. package/dist/components/progress.min.js +4 -4
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +8 -62
  100. package/dist/components/rating.js +1 -1
  101. package/dist/components/rating.min.css +2 -2
  102. package/dist/components/rating.min.js +3 -3
  103. package/dist/components/reset.css +2 -3
  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 +1 -1
  108. package/dist/components/search.js +15 -13
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +4 -4
  111. package/dist/components/segment.css +36 -6
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -1
  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 +1 -1
  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 +3 -3
  125. package/dist/components/slider.js +1 -1
  126. package/dist/components/slider.min.js +3 -3
  127. package/dist/components/state.js +1 -1
  128. package/dist/components/state.min.js +3 -3
  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 -2
  134. package/dist/components/sticky.js +2 -2
  135. package/dist/components/sticky.min.css +2 -2
  136. package/dist/components/sticky.min.js +4 -4
  137. package/dist/components/tab.css +1 -1
  138. package/dist/components/tab.js +1 -1
  139. package/dist/components/tab.min.css +1 -1
  140. package/dist/components/tab.min.js +3 -3
  141. package/dist/components/table.css +5 -3
  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 +123 -10
  146. package/dist/components/toast.js +54 -27
  147. package/dist/components/toast.min.css +2 -2
  148. package/dist/components/toast.min.js +4 -4
  149. package/dist/components/transition.css +1 -1
  150. package/dist/components/transition.js +2 -2
  151. package/dist/components/transition.min.css +1 -1
  152. package/dist/components/transition.min.js +4 -4
  153. package/dist/components/visibility.js +2 -2
  154. package/dist/components/visibility.min.js +3 -3
  155. package/dist/semantic.css +2004 -1124
  156. package/dist/semantic.js +789 -377
  157. package/dist/semantic.min.css +4 -397
  158. package/dist/semantic.min.js +4 -4
  159. package/examples/assets/library/iframe-content.js +8 -8
  160. package/examples/assets/library/iframe.js +3 -3
  161. package/package.json +5 -5
  162. package/scripts/nightly-version.js +23 -8
  163. package/src/definitions/behaviors/api.js +25 -23
  164. package/src/definitions/behaviors/form.js +50 -69
  165. package/src/definitions/behaviors/visibility.js +1 -1
  166. package/src/definitions/collections/form.less +200 -142
  167. package/src/definitions/collections/grid.less +717 -681
  168. package/src/definitions/collections/menu.less +177 -128
  169. package/src/definitions/collections/message.less +77 -44
  170. package/src/definitions/collections/table.less +255 -242
  171. package/src/definitions/elements/button.less +360 -347
  172. package/src/definitions/elements/container.less +16 -8
  173. package/src/definitions/elements/emoji.less +15 -9
  174. package/src/definitions/elements/flag.less +7 -17
  175. package/src/definitions/elements/header.less +44 -37
  176. package/src/definitions/elements/icon.less +121 -43
  177. package/src/definitions/elements/input.less +23 -7
  178. package/src/definitions/elements/label.less +92 -91
  179. package/src/definitions/elements/list.less +55 -45
  180. package/src/definitions/elements/loader.less +38 -35
  181. package/src/definitions/elements/segment.less +51 -23
  182. package/src/definitions/elements/step.less +52 -48
  183. package/src/definitions/elements/text.less +17 -15
  184. package/src/definitions/globals/site.less +23 -2
  185. package/src/definitions/modules/accordion.less +55 -5
  186. package/src/definitions/modules/calendar.js +109 -10
  187. package/src/definitions/modules/checkbox.js +16 -10
  188. package/src/definitions/modules/checkbox.less +44 -186
  189. package/src/definitions/modules/dimmer.js +14 -11
  190. package/src/definitions/modules/dimmer.less +21 -8
  191. package/src/definitions/modules/dropdown.js +106 -76
  192. package/src/definitions/modules/dropdown.less +148 -89
  193. package/src/definitions/modules/modal.js +236 -40
  194. package/src/definitions/modules/modal.less +6 -4
  195. package/src/definitions/modules/nag.js +130 -64
  196. package/src/definitions/modules/nag.less +105 -40
  197. package/src/definitions/modules/popup.js +4 -4
  198. package/src/definitions/modules/popup.less +5 -1
  199. package/src/definitions/modules/progress.js +2 -2
  200. package/src/definitions/modules/progress.less +20 -18
  201. package/src/definitions/modules/rating.less +50 -42
  202. package/src/definitions/modules/search.js +14 -12
  203. package/src/definitions/modules/search.less +32 -16
  204. package/src/definitions/modules/sidebar.less +33 -19
  205. package/src/definitions/modules/slider.less +43 -42
  206. package/src/definitions/modules/sticky.js +1 -1
  207. package/src/definitions/modules/toast.js +53 -26
  208. package/src/definitions/modules/toast.less +139 -25
  209. package/src/definitions/modules/transition.js +1 -1
  210. package/src/definitions/views/card.less +402 -361
  211. package/src/definitions/views/comment.less +92 -81
  212. package/src/definitions/views/feed.less +164 -144
  213. package/src/definitions/views/item.less +249 -196
  214. package/src/definitions/views/statistic.less +90 -88
  215. package/src/themes/default/collections/grid.variables +8 -8
  216. package/src/themes/default/collections/menu.variables +6 -0
  217. package/src/themes/default/collections/table.variables +1 -1
  218. package/src/themes/default/elements/button.variables +2 -1
  219. package/src/themes/default/elements/flag.overrides +1635 -986
  220. package/src/themes/default/elements/flag.variables +7 -5
  221. package/src/themes/default/elements/header.variables +2 -2
  222. package/src/themes/default/elements/icon.overrides +35 -28
  223. package/src/themes/default/elements/icon.variables +4 -0
  224. package/src/themes/default/elements/list.variables +1 -1
  225. package/src/themes/default/elements/step.overrides +1 -1
  226. package/src/themes/default/globals/colors.less +7 -7
  227. package/src/themes/default/globals/site.variables +19 -9
  228. package/src/themes/default/globals/variation.variables +119 -6
  229. package/src/themes/default/modules/accordion.variables +15 -0
  230. package/src/themes/default/modules/checkbox.variables +16 -16
  231. package/src/themes/default/modules/dimmer.variables +1 -1
  232. package/src/themes/default/modules/dropdown.variables +12 -5
  233. package/src/themes/default/modules/modal.variables +2 -2
  234. package/src/themes/default/modules/nag.variables +3 -1
  235. package/src/themes/default/modules/toast.variables +5 -1
  236. package/src/themes/default/views/card.variables +1 -1
  237. package/src/themes/famfamfam/elements/flag.overrides +1026 -0
  238. package/src/themes/famfamfam/elements/flag.variables +13 -0
  239. package/tasks/admin/components/init.js +2 -2
  240. package/tasks/admin/distributions/init.js +2 -2
  241. package/tasks/build/css.js +6 -1
  242. package/tasks/config/project/release.js +2 -2
  243. package/tasks/config/tasks.js +13 -9
  244. package/test/helpers/sinon.js +1 -1
@@ -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').substr(2, 8);
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
514
  if($(event.target).closest('a').length === 0) {
495
- settings.onClick.call($toastBox, element);
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',
@@ -25,6 +25,50 @@
25
25
  .ui.toast-container {
26
26
  position: fixed;
27
27
  z-index: 9999;
28
+ &.ui.attached when (@variationToastAttached) {
29
+ width: 100%;
30
+ left: 0;
31
+ & .vertical.attached when (@variationToastVertical) {
32
+ border-radius: 0;
33
+ }
34
+ &.ui.ui .attached.actions .button when (@variationToastActions) {
35
+ border-radius: 0;
36
+ }
37
+ & .toast-box {
38
+ margin: 0;
39
+ width: 100%;
40
+ border-radius: 0;
41
+ & > .ui.toast,
42
+ > .ui.message {
43
+ margin-left: 0;
44
+ }
45
+ & when (@variationToastFloating) {
46
+ &.floating,
47
+ &.hoverfloating:hover {
48
+ border: none;
49
+ }
50
+ }
51
+ & > .vertical > .content when (@variationToastVertical) {
52
+ flex: 1;
53
+ }
54
+ & > * {
55
+ width: 100%;
56
+ border-radius: 0;
57
+ & > .vertical:not(.actions) when (@variationToastVertical) {
58
+ flex: 1;
59
+ }
60
+ }
61
+ & > .attached.actions when (@variationToastActions) {
62
+ margin-right: @toastLeftRightMargin;
63
+ }
64
+ }
65
+ &.top when (@variationToastTop) {
66
+ top: 0;
67
+ }
68
+ &.bottom when (@variationToastBottom) {
69
+ bottom: 0;
70
+ }
71
+ }
28
72
  &.top when (@variationToastTop) {
29
73
  &.right when (@variationToastRight) {
30
74
  top: @toastContainerDistance;
@@ -59,6 +103,11 @@
59
103
  bottom: @toastContainerDistance;
60
104
  }
61
105
  }
106
+ &.centered when (@variationToastCentered) {
107
+ transform: translate(-50%, -50%);
108
+ top: 50%;
109
+ left: 50%;
110
+ }
62
111
  & .visible.toast-box,
63
112
  .animating.toast-box,
64
113
  .toast-box {
@@ -88,9 +137,11 @@
88
137
  border: @toastBoxBorder;
89
138
  }
90
139
  }
91
- &.compact,
92
- > .compact {
93
- width: @toastWidth;
140
+ & when (@variationToastCompact) {
141
+ &.compact,
142
+ > .compact {
143
+ width: @toastWidth;
144
+ }
94
145
  }
95
146
  & > .ui.toast,
96
147
  > .ui.message {
@@ -348,9 +399,6 @@
348
399
  border-top-right-radius: 0;
349
400
  border-bottom-right-radius: 0;
350
401
  }
351
- & .button:not(:first-child):not(:last-child) {
352
- margin-left: -@toastLeftRightMargin;
353
- }
354
402
  }
355
403
  &.message.message.message when (@variationToastMessage) {
356
404
  border-top-right-radius: @toastBorderRadius;
@@ -426,8 +474,15 @@
426
474
  font-size: @toastIconFontSize;
427
475
  }
428
476
  &:not(.vertical) {
477
+ &:not(.centered):not(.center) {
478
+ & > i.icon:not(.close) when (@variationToastIcon) {
479
+ position: absolute;
480
+ }
481
+ & > .ui.image when (@variationToastImage) {
482
+ position: absolute;
483
+ }
484
+ }
429
485
  & > i.icon:not(.close) when (@variationToastIcon) {
430
- position: absolute;
431
486
  & + .content {
432
487
  padding-left: @toastIconContentPadding;
433
488
  }
@@ -436,7 +491,6 @@
436
491
  padding-left: @toastCloseDistance;
437
492
  }
438
493
  & > .ui.image when (@variationToastImage) {
439
- position: absolute;
440
494
  &.avatar + .content {
441
495
  padding-left: @toastAvatarImageContentPadding;
442
496
  min-height: @toastAvatarImageHeight;
@@ -454,7 +508,7 @@
454
508
  min-height: @toastSmallImageHeight;
455
509
  }
456
510
  }
457
- & when (@variationToastImage) or (@variationToastIcon) {
511
+ &:not(.centered):not(.center) when (@variationToastImage) or (@variationToastIcon) {
458
512
  & > .centered.image,
459
513
  > .centered.icon {
460
514
  transform: translateY(-50%);
@@ -469,6 +523,12 @@
469
523
  }
470
524
  }
471
525
  &.vertical when (@variationToastVertical) {
526
+ & > .content {
527
+ flex-grow: 1;
528
+ }
529
+ &.attached when (@variationToastAttached){
530
+ flex-grow: 1;
531
+ }
472
532
  & > .close.icon + .content when (@variationToastClose){
473
533
  padding-left: @toastCloseDistanceVertical;
474
534
  }
@@ -500,6 +560,29 @@
500
560
  border-bottom-right-radius: 0;
501
561
  }
502
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
+ }
503
586
  }
504
587
 
505
588
 
@@ -516,27 +599,58 @@
516
599
  margin-right: auto;
517
600
  }
518
601
 
519
- /*--------------
520
- Colors
521
- -------------- */
602
+ & when (@variationToastCentered) {
603
+ .ui.ui.toast-container .toast-box .centered.toast,
604
+ .ui.ui.toast-container .toast-box .center.aligned.toast {
605
+ text-align: center;
606
+ display: flex;
607
+ justify-content: center;
522
608
 
523
- each(@colors, {
524
- @color: replace(@key, '@', '');
525
- @c: @colors[@@color][color];
526
- @l: @colors[@@color][light];
609
+ & > .content,
610
+ & > .ui.image,
611
+ & > i.icon:not(.close) {
612
+ align-self: center;
613
+ }
614
+ }
527
615
 
528
- .ui.@{color}.toast {
529
- background-color: @c;
530
- color: @toastTextColor;
616
+ .ui.toast-container .toast-box .toast .centered.content,
617
+ .ui.toast-container .toast-box .toast .center.aligned.content {
618
+ text-align: center;
531
619
  }
532
- & when (@variationToastInverted) {
533
- .ui.inverted.@{color}.toast,
534
- .ui.toast-container .toast-box > .inverted.@{color}.attached.progress .bar {
535
- background-color: @l;
536
- color: @toastInvertedTextColor;
620
+
621
+ .ui.toast-container .toast-box .centered.actions,
622
+ .ui.toast-container .toast-box .center.aligned.actions {
623
+ text-align: center;
624
+
625
+ &:not(.attached) > .button:not(.fluid) {
626
+ margin-left: @toastActionCenteredMargin;
627
+ margin-right: @toastActionCenteredMargin;
537
628
  }
538
629
  }
539
- })
630
+ }
631
+
632
+ /*--------------
633
+ Colors
634
+ -------------- */
635
+ & when not (@variationToastColors = false) {
636
+ each(@variationToastColors, {
637
+ @color: @value;
638
+ @c: @colors[@@color][color];
639
+ @l: @colors[@@color][light];
640
+
641
+ .ui.@{color}.toast {
642
+ background-color: @c;
643
+ color: @toastTextColor;
644
+ }
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
+ }
540
654
 
541
655
  & when (@variationToastInverted) {
542
656
  .ui.inverted.toast {
@@ -1097,7 +1097,7 @@ $.fn.transition.settings = {
1097
1097
 
1098
1098
  // possible errors
1099
1099
  error: {
1100
- noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.',
1100
+ noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.',
1101
1101
  repeated : 'That animation is already occurring, cancelling repeated animation',
1102
1102
  method : 'The method you called is not defined',
1103
1103
  support : 'This browser does not support CSS animations'