@aeris-ui/core 22.0.0-alpha.7 → 22.0.0-alpha.9

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 (263) hide show
  1. package/README.md +2 -2
  2. package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
  3. package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
  4. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
  5. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
  6. package/fesm2022/aeris-ui-core-auto-complete.mjs +1171 -428
  7. package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
  8. package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
  9. package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
  10. package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
  11. package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
  12. package/fesm2022/aeris-ui-core-badge.mjs +562 -115
  13. package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
  14. package/fesm2022/aeris-ui-core-block-ui.mjs +205 -101
  15. package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
  16. package/fesm2022/aeris-ui-core-breadcrumb.mjs +547 -177
  17. package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
  18. package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
  19. package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
  20. package/fesm2022/aeris-ui-core-button.mjs +730 -110
  21. package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
  22. package/fesm2022/aeris-ui-core-card.mjs +371 -101
  23. package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
  24. package/fesm2022/aeris-ui-core-carousel.mjs +690 -353
  25. package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
  26. package/fesm2022/aeris-ui-core-cascade-select.mjs +915 -423
  27. package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
  28. package/fesm2022/aeris-ui-core-chart.mjs +455 -258
  29. package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
  30. package/fesm2022/aeris-ui-core-checkbox.mjs +432 -135
  31. package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
  32. package/fesm2022/aeris-ui-core-chip.mjs +430 -117
  33. package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
  34. package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
  35. package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
  36. package/fesm2022/aeris-ui-core-color-picker.mjs +1313 -683
  37. package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
  38. package/fesm2022/aeris-ui-core-compare.mjs +819 -310
  39. package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
  40. package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1392 -551
  41. package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
  42. package/fesm2022/aeris-ui-core-confirm-popup.mjs +1447 -744
  43. package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
  44. package/fesm2022/aeris-ui-core-context-menu.mjs +900 -450
  45. package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
  46. package/fesm2022/aeris-ui-core-date-picker.mjs +1656 -863
  47. package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
  48. package/fesm2022/aeris-ui-core-dialog.mjs +1066 -355
  49. package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
  50. package/fesm2022/aeris-ui-core-divider.mjs +204 -43
  51. package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
  52. package/fesm2022/aeris-ui-core-drawer.mjs +1002 -326
  53. package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
  54. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +402 -249
  55. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
  56. package/fesm2022/aeris-ui-core-editor.mjs +934 -572
  57. package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
  58. package/fesm2022/aeris-ui-core-file-upload.mjs +1339 -514
  59. package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
  60. package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
  61. package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
  62. package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
  63. package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
  64. package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
  65. package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
  66. package/fesm2022/aeris-ui-core-form-field.mjs +672 -170
  67. package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
  68. package/fesm2022/aeris-ui-core-galleria.mjs +1987 -797
  69. package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
  70. package/fesm2022/aeris-ui-core-glass.mjs +110 -33
  71. package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
  72. package/fesm2022/aeris-ui-core-icon-field.mjs +426 -103
  73. package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
  74. package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
  75. package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
  76. package/fesm2022/aeris-ui-core-input-group.mjs +413 -112
  77. package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
  78. package/fesm2022/aeris-ui-core-input-mask.mjs +650 -248
  79. package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
  80. package/fesm2022/aeris-ui-core-input-number.mjs +902 -334
  81. package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
  82. package/fesm2022/aeris-ui-core-input-otp.mjs +667 -253
  83. package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
  84. package/fesm2022/aeris-ui-core-input-text.mjs +618 -152
  85. package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
  86. package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
  87. package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
  88. package/fesm2022/aeris-ui-core-mega-menu.mjs +601 -388
  89. package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
  90. package/fesm2022/aeris-ui-core-menu.mjs +1032 -495
  91. package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
  92. package/fesm2022/aeris-ui-core-menubar.mjs +960 -491
  93. package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
  94. package/fesm2022/aeris-ui-core-message.mjs +477 -145
  95. package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
  96. package/fesm2022/aeris-ui-core-meter-group.mjs +587 -196
  97. package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
  98. package/fesm2022/aeris-ui-core-multi-select.mjs +1550 -552
  99. package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
  100. package/fesm2022/aeris-ui-core-order-list.mjs +518 -202
  101. package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
  102. package/fesm2022/aeris-ui-core-organization-chart.mjs +455 -177
  103. package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
  104. package/fesm2022/aeris-ui-core-paginator.mjs +329 -127
  105. package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
  106. package/fesm2022/aeris-ui-core-panel.mjs +596 -196
  107. package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
  108. package/fesm2022/aeris-ui-core-password.mjs +894 -247
  109. package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
  110. package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
  111. package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
  112. package/fesm2022/aeris-ui-core-popover.mjs +892 -386
  113. package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
  114. package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
  115. package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
  116. package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
  117. package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
  118. package/fesm2022/aeris-ui-core-radio-button.mjs +386 -119
  119. package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
  120. package/fesm2022/aeris-ui-core-rating.mjs +502 -225
  121. package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
  122. package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
  123. package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
  124. package/fesm2022/aeris-ui-core-scroll-top.mjs +204 -63
  125. package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
  126. package/fesm2022/aeris-ui-core-select.mjs +1794 -643
  127. package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
  128. package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
  129. package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
  130. package/fesm2022/aeris-ui-core-slider.mjs +868 -404
  131. package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
  132. package/fesm2022/aeris-ui-core-speed-dial.mjs +800 -329
  133. package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
  134. package/fesm2022/aeris-ui-core-split-button.mjs +918 -257
  135. package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
  136. package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
  137. package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
  138. package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
  139. package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
  140. package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
  141. package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
  142. package/fesm2022/aeris-ui-core-table.mjs +1984 -865
  143. package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
  144. package/fesm2022/aeris-ui-core-tabs.mjs +686 -324
  145. package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
  146. package/fesm2022/aeris-ui-core-textarea.mjs +846 -212
  147. package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
  148. package/fesm2022/aeris-ui-core-theme-builder.mjs +1258 -1413
  149. package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
  150. package/fesm2022/aeris-ui-core-theming.mjs +132 -147
  151. package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
  152. package/fesm2022/aeris-ui-core-tiered-menu.mjs +885 -465
  153. package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
  154. package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
  155. package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
  156. package/fesm2022/aeris-ui-core-toast.mjs +855 -615
  157. package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
  158. package/fesm2022/aeris-ui-core-toggle-switch.mjs +390 -127
  159. package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
  160. package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
  161. package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
  162. package/fesm2022/aeris-ui-core-tooltip.mjs +623 -345
  163. package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
  164. package/fesm2022/aeris-ui-core-tree-select.mjs +1356 -601
  165. package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
  166. package/fesm2022/aeris-ui-core-tree-table.mjs +2001 -942
  167. package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
  168. package/fesm2022/aeris-ui-core-tree.mjs +1103 -658
  169. package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
  170. package/fesm2022/aeris-ui-core.mjs +861 -842
  171. package/fesm2022/aeris-ui-core.mjs.map +1 -1
  172. package/package.json +1 -1
  173. package/schematics/runtime/theme-builder/aeris-theme.js +28 -16
  174. package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
  175. package/styles/_fallback-colors.scss +3 -3
  176. package/styles/_tokens.scss +5 -5
  177. package/styles/aeris.css +12 -16
  178. package/styles/controls.css +1 -1
  179. package/types/aeris-ui-core-accordion.d.ts +166 -93
  180. package/types/aeris-ui-core-animate-on-scroll.d.ts +71 -31
  181. package/types/aeris-ui-core-auto-complete.d.ts +326 -149
  182. package/types/aeris-ui-core-auto-focus.d.ts +24 -16
  183. package/types/aeris-ui-core-avatar.d.ts +112 -42
  184. package/types/aeris-ui-core-badge.d.ts +160 -47
  185. package/types/aeris-ui-core-block-ui.d.ts +47 -27
  186. package/types/aeris-ui-core-breadcrumb.d.ts +162 -92
  187. package/types/aeris-ui-core-button-group.d.ts +37 -16
  188. package/types/aeris-ui-core-button.d.ts +226 -64
  189. package/types/aeris-ui-core-card.d.ts +74 -37
  190. package/types/aeris-ui-core-carousel.d.ts +197 -117
  191. package/types/aeris-ui-core-cascade-select.d.ts +252 -131
  192. package/types/aeris-ui-core-chart.d.ts +134 -84
  193. package/types/aeris-ui-core-checkbox.d.ts +139 -55
  194. package/types/aeris-ui-core-chip.d.ts +116 -51
  195. package/types/aeris-ui-core-class-names.d.ts +22 -20
  196. package/types/aeris-ui-core-color-picker.d.ts +347 -150
  197. package/types/aeris-ui-core-compare.d.ts +224 -101
  198. package/types/aeris-ui-core-confirm-dialog.d.ts +441 -249
  199. package/types/aeris-ui-core-confirm-popup.d.ts +440 -268
  200. package/types/aeris-ui-core-context-menu.d.ts +262 -150
  201. package/types/aeris-ui-core-date-picker.d.ts +488 -226
  202. package/types/aeris-ui-core-dialog.d.ts +288 -121
  203. package/types/aeris-ui-core-divider.d.ts +58 -20
  204. package/types/aeris-ui-core-drawer.d.ts +273 -116
  205. package/types/aeris-ui-core-dynamic-dialog.d.ts +157 -140
  206. package/types/aeris-ui-core-editor.d.ts +243 -124
  207. package/types/aeris-ui-core-file-upload.d.ts +366 -197
  208. package/types/aeris-ui-core-filter-service.d.ts +48 -52
  209. package/types/aeris-ui-core-fluid.d.ts +12 -9
  210. package/types/aeris-ui-core-focus-trap.d.ts +39 -31
  211. package/types/aeris-ui-core-form-field.d.ts +158 -62
  212. package/types/aeris-ui-core-galleria.d.ts +589 -256
  213. package/types/aeris-ui-core-glass.d.ts +24 -11
  214. package/types/aeris-ui-core-icon-field.d.ts +94 -34
  215. package/types/aeris-ui-core-inplace.d.ts +123 -62
  216. package/types/aeris-ui-core-input-group.d.ts +84 -35
  217. package/types/aeris-ui-core-input-mask.d.ts +194 -71
  218. package/types/aeris-ui-core-input-number.d.ts +272 -90
  219. package/types/aeris-ui-core-input-otp.d.ts +190 -82
  220. package/types/aeris-ui-core-input-text.d.ts +185 -62
  221. package/types/aeris-ui-core-key-filter.d.ts +53 -39
  222. package/types/aeris-ui-core-mega-menu.d.ts +174 -123
  223. package/types/aeris-ui-core-menu.d.ts +275 -172
  224. package/types/aeris-ui-core-menubar.d.ts +272 -160
  225. package/types/aeris-ui-core-message.d.ts +132 -61
  226. package/types/aeris-ui-core-meter-group.d.ts +162 -90
  227. package/types/aeris-ui-core-multi-select.d.ts +435 -187
  228. package/types/aeris-ui-core-order-list.d.ts +143 -66
  229. package/types/aeris-ui-core-organization-chart.d.ts +132 -77
  230. package/types/aeris-ui-core-paginator.d.ts +92 -46
  231. package/types/aeris-ui-core-panel.d.ts +149 -78
  232. package/types/aeris-ui-core-password.d.ts +257 -108
  233. package/types/aeris-ui-core-pick-list.d.ts +373 -179
  234. package/types/aeris-ui-core-popover.d.ts +218 -107
  235. package/types/aeris-ui-core-progress-bar.d.ts +156 -73
  236. package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
  237. package/types/aeris-ui-core-radio-button.d.ts +124 -51
  238. package/types/aeris-ui-core-rating.d.ts +149 -76
  239. package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
  240. package/types/aeris-ui-core-scroll-top.d.ts +64 -29
  241. package/types/aeris-ui-core-select.d.ts +474 -226
  242. package/types/aeris-ui-core-skeleton.d.ts +39 -17
  243. package/types/aeris-ui-core-slider.d.ts +270 -116
  244. package/types/aeris-ui-core-speed-dial.d.ts +240 -112
  245. package/types/aeris-ui-core-split-button.d.ts +265 -115
  246. package/types/aeris-ui-core-splitter.d.ts +224 -106
  247. package/types/aeris-ui-core-stepper.d.ts +183 -91
  248. package/types/aeris-ui-core-style-class.d.ts +141 -71
  249. package/types/aeris-ui-core-table.d.ts +595 -308
  250. package/types/aeris-ui-core-tabs.d.ts +163 -90
  251. package/types/aeris-ui-core-textarea.d.ts +261 -81
  252. package/types/aeris-ui-core-theme-builder.d.ts +466 -451
  253. package/types/aeris-ui-core-theming.d.ts +42 -49
  254. package/types/aeris-ui-core-tiered-menu.d.ts +249 -147
  255. package/types/aeris-ui-core-timeline.d.ts +108 -71
  256. package/types/aeris-ui-core-toast.d.ts +219 -155
  257. package/types/aeris-ui-core-toggle-switch.d.ts +125 -52
  258. package/types/aeris-ui-core-toolbar.d.ts +98 -41
  259. package/types/aeris-ui-core-tooltip.d.ts +157 -92
  260. package/types/aeris-ui-core-tree-select.d.ts +359 -179
  261. package/types/aeris-ui-core-tree-table.d.ts +565 -290
  262. package/types/aeris-ui-core-tree.d.ts +269 -165
  263. package/types/aeris-ui-core.d.ts +161 -125
@@ -1,600 +1,696 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, TemplateRef, Directive, signal, Service, DestroyRef, viewChildren, contentChild, input, numberAttribute, booleanAttribute, output, computed, effect, Component } from '@angular/core';
4
- import { aerisInternalCreateFrameScheduler } from '@aeris-ui/core';
5
-
6
- class AerisToastEventStream {
7
- listeners = new Set();
8
- subscribe(next) {
9
- this.listeners.add(next);
10
- return {
11
- unsubscribe: () => {
12
- this.listeners.delete(next);
13
- },
14
- };
15
- }
16
- next(event) {
17
- for (const listener of [...this.listeners])
18
- listener(event);
19
- }
20
- }
21
- class AerisToastContentTemplate {
22
- template = inject(TemplateRef);
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToastContentTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
24
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AerisToastContentTemplate, isStandalone: true, selector: "ng-template[aerisToastContent]", ngImport: i0 });
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToastContentTemplate, decorators: [{
27
- type: Directive,
28
- args: [{ selector: 'ng-template[aerisToastContent]' }]
29
- }] });
30
- class AerisToastIconTemplate {
31
- template = inject(TemplateRef);
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToastIconTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
33
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AerisToastIconTemplate, isStandalone: true, selector: "ng-template[aerisToastIcon]", ngImport: i0 });
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToastIconTemplate, decorators: [{
36
- type: Directive,
37
- args: [{ selector: 'ng-template[aerisToastIcon]' }]
38
- }] });
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, DestroyRef, Directive, Service, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, numberAttribute, output, signal, viewChildren } from "@angular/core";
4
+ import { aerisInternalCreateFrameScheduler } from "@aeris-ui/core";
5
+ var AerisToastEventStream = class {
6
+ listeners = /* @__PURE__ */ new Set();
7
+ subscribe(next) {
8
+ this.listeners.add(next);
9
+ return { unsubscribe: () => {
10
+ this.listeners.delete(next);
11
+ } };
12
+ }
13
+ next(event) {
14
+ for (const listener of [...this.listeners]) listener(event);
15
+ }
16
+ };
17
+ var AerisToastContentTemplate = class AerisToastContentTemplate {
18
+ template = inject(TemplateRef);
19
+ static ɵfac = i0.ɵɵngDeclareFactory({
20
+ minVersion: "12.0.0",
21
+ version: "22.2.1",
22
+ ngImport: i0,
23
+ type: AerisToastContentTemplate,
24
+ deps: [],
25
+ target: i0.ɵɵFactoryTarget.Directive
26
+ });
27
+ static ɵdir = i0.ɵɵngDeclareDirective({
28
+ minVersion: "14.0.0",
29
+ version: "22.2.1",
30
+ type: AerisToastContentTemplate,
31
+ isStandalone: true,
32
+ selector: "ng-template[aerisToastContent]",
33
+ ngImport: i0
34
+ });
35
+ };
36
+ i0.ɵɵngDeclareClassMetadata({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.1",
39
+ ngImport: i0,
40
+ type: AerisToastContentTemplate,
41
+ decorators: [{
42
+ type: Directive,
43
+ args: [{ selector: "ng-template[aerisToastContent]" }]
44
+ }]
45
+ });
46
+ var AerisToastIconTemplate = class AerisToastIconTemplate {
47
+ template = inject(TemplateRef);
48
+ static ɵfac = i0.ɵɵngDeclareFactory({
49
+ minVersion: "12.0.0",
50
+ version: "22.2.1",
51
+ ngImport: i0,
52
+ type: AerisToastIconTemplate,
53
+ deps: [],
54
+ target: i0.ɵɵFactoryTarget.Directive
55
+ });
56
+ static ɵdir = i0.ɵɵngDeclareDirective({
57
+ minVersion: "14.0.0",
58
+ version: "22.2.1",
59
+ type: AerisToastIconTemplate,
60
+ isStandalone: true,
61
+ selector: "ng-template[aerisToastIcon]",
62
+ ngImport: i0
63
+ });
64
+ };
65
+ i0.ɵɵngDeclareClassMetadata({
66
+ minVersion: "12.0.0",
67
+ version: "22.2.1",
68
+ ngImport: i0,
69
+ type: AerisToastIconTemplate,
70
+ decorators: [{
71
+ type: Directive,
72
+ args: [{ selector: "ng-template[aerisToastIcon]" }]
73
+ }]
74
+ });
39
75
  let nextToastId = 0;
40
- class AerisToastService {
41
- store = signal([], /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "store" }] : /* istanbul ignore next */ []));
43
- timers = new Map();
44
- closedStream = new AerisToastEventStream();
45
- messages = this.store.asReadonly();
46
- closed = this.closedStream;
47
- show(message) {
48
- const resolved = this.resolveMessage(message);
49
- this.store.update((messages) => [
50
- ...messages.filter((item) => item.id !== resolved.id),
51
- resolved,
52
- ]);
53
- this.clearTimer(resolved.id);
54
- this.schedule(resolved);
55
- return resolved;
56
- }
57
- showAll(messages) {
58
- const resolved = messages.map((message) => this.resolveMessage(message));
59
- const resolvedIds = new Set(resolved.map((message) => message.id));
60
- this.store.update((current) => [
61
- ...current.filter((message) => !resolvedIds.has(message.id)),
62
- ...resolved,
63
- ]);
64
- for (const message of resolved) {
65
- this.clearTimer(message.id);
66
- this.schedule(message);
67
- }
68
- return resolved;
69
- }
70
- remove(id, reason = 'api') {
71
- const message = this.store().find((item) => item.id === id);
72
- if (!message)
73
- return;
74
- this.store.update((messages) => messages.filter((item) => item.id !== id));
75
- this.clearTimer(id);
76
- this.closedStream.next({ message, reason });
77
- }
78
- clear(group = '') {
79
- const targets = this.store().filter((message) => message.group === group);
80
- this.removeMany(targets, 'clear');
81
- }
82
- clearAll() {
83
- this.removeMany(this.store(), 'clear');
84
- }
85
- pause(id) {
86
- const timer = this.timers.get(id);
87
- if (!timer || timer.paused || !timer.handle)
88
- return;
89
- globalThis.clearTimeout(timer.handle);
90
- timer.handle = null;
91
- timer.remaining = Math.max(0, timer.remaining - (Date.now() - timer.startedAt));
92
- timer.paused = true;
93
- }
94
- resume(id) {
95
- const timer = this.timers.get(id);
96
- if (!timer || !timer.paused)
97
- return;
98
- timer.paused = false;
99
- timer.startedAt = Date.now();
100
- timer.handle = globalThis.setTimeout(() => this.remove(id, 'timeout'), timer.remaining);
101
- }
102
- schedule(message) {
103
- if (message.sticky || message.life <= 0)
104
- return;
105
- this.timers.set(message.id, {
106
- message,
107
- handle: globalThis.setTimeout(() => this.remove(message.id, 'timeout'), message.life),
108
- startedAt: Date.now(),
109
- remaining: message.life,
110
- paused: false,
111
- });
112
- }
113
- clearTimer(id) {
114
- const timer = this.timers.get(id);
115
- if (timer?.handle)
116
- globalThis.clearTimeout(timer.handle);
117
- this.timers.delete(id);
118
- }
119
- removeMany(targets, reason) {
120
- if (targets.length === 0)
121
- return;
122
- const targetIds = new Set(targets.map((message) => message.id));
123
- this.store.update((messages) => messages.filter((message) => !targetIds.has(message.id)));
124
- for (const message of targets) {
125
- this.clearTimer(message.id);
126
- this.closedStream.next({ message, reason });
127
- }
128
- }
129
- resolveMessage(input) {
130
- const severity = input.severity ?? 'neutral';
131
- const role = input.role ?? (severity === 'danger' || severity === 'warning' ? 'alert' : 'status');
132
- return {
133
- id: input.id ?? `aeris-toast-${++nextToastId}`,
134
- group: input.group ?? '',
135
- severity,
136
- summary: input.summary ?? '',
137
- detail: input.detail ?? '',
138
- life: input.life ?? 5000,
139
- sticky: input.sticky ?? false,
140
- closable: input.closable ?? true,
141
- data: input.data,
142
- ariaLabel: input.ariaLabel ?? '',
143
- ariaLive: input.ariaLive ?? (role === 'alert' ? 'assertive' : 'polite'),
144
- role,
145
- createdAt: Date.now(),
146
- };
147
- }
148
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToastService, deps: [], target: i0.ɵɵFactoryTarget.Service });
149
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.6", ngImport: i0, type: AerisToastService });
150
- }
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToastService, decorators: [{
152
- type: Service
153
- }] });
154
- class AerisToast {
155
- static fallbackHeight = 72;
156
- static swipeRemovalDelay = 550;
157
- static reverseCancelThreshold = 10;
158
- static minimumDragThreshold = 1;
159
- toastService = inject(AerisToastService);
160
- destroyRef = inject(DestroyRef);
161
- messageElements = viewChildren('toastMessage', /* @ts-ignore */
162
- ...(ngDevMode ? [{ debugName: "messageElements" }] : /* istanbul ignore next */ []));
163
- measuredHeights = signal({}, /* @ts-ignore */
164
- ...(ngDevMode ? [{ debugName: "measuredHeights" }] : /* istanbul ignore next */ []));
165
- swipeVisuals = signal({}, /* @ts-ignore */
166
- ...(ngDevMode ? [{ debugName: "swipeVisuals" }] : /* istanbul ignore next */ []));
167
- swipeCleanupTimers = new Map();
168
- pendingSwipeRemovals = new Map();
169
- measureFrame = aerisInternalCreateFrameScheduler(() => this.measureMessages());
170
- swipeFrame = aerisInternalCreateFrameScheduler(() => this.flushSwipeVisual());
171
- swipeSession = null;
172
- contentTemplate = contentChild(AerisToastContentTemplate, /* @ts-ignore */
173
- ...(ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
174
- iconTemplate = contentChild(AerisToastIconTemplate, /* @ts-ignore */
175
- ...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
176
- position = input('bottom-right', /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
178
- group = input('', /* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []));
180
- mode = input('stacked', /* @ts-ignore */
181
- ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
182
- visibleCount = input(4, { ...(ngDevMode ? { debugName: "visibleCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
183
- limit = input(undefined, { ...(ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {}), transform: numberAttribute });
184
- newestOnTop = input(true, { ...(ngDevMode ? { debugName: "newestOnTop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
185
- pauseOnHover = input(true, { ...(ngDevMode ? { debugName: "pauseOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
186
- showIcon = input(true, { ...(ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
187
- showClose = input(true, { ...(ngDevMode ? { debugName: "showClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
188
- swipeDirection = input([
189
- 'down',
190
- 'right',
191
- ], /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "swipeDirection" }] : /* istanbul ignore next */ []));
193
- swipeThreshold = input(40, { ...(ngDevMode ? { debugName: "swipeThreshold" } : /* istanbul ignore next */ {}), transform: numberAttribute });
194
- ariaLabel = input('Notifications', /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
196
- closeAriaLabel = input('Close notification', /* @ts-ignore */
197
- ...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
198
- closed = output();
199
- stackHovered = signal(false, /* @ts-ignore */
200
- ...(ngDevMode ? [{ debugName: "stackHovered" }] : /* istanbul ignore next */ []));
201
- resolvedSwipeDirections = computed(() => {
202
- const value = this.swipeDirection();
203
- const directions = Array.isArray(value) ? value : [value];
204
- return [...new Set(directions)].filter((direction) => direction === 'up' || direction === 'down' || direction === 'left' || direction === 'right');
205
- }, /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "resolvedSwipeDirections" }] : /* istanbul ignore next */ []));
207
- resolvedSwipeThreshold = computed(() => {
208
- const threshold = this.swipeThreshold();
209
- return Number.isFinite(threshold) && threshold >= 0 ? threshold : 40;
210
- }, /* @ts-ignore */
211
- ...(ngDevMode ? [{ debugName: "resolvedSwipeThreshold" }] : /* istanbul ignore next */ []));
212
- orderedMessages = computed(() => {
213
- const group = this.group();
214
- const filtered = this.toastService.messages().filter((message) => message.group === group);
215
- return this.newestOnTop() ? [...filtered].reverse() : filtered;
216
- }, /* @ts-ignore */
217
- ...(ngDevMode ? [{ debugName: "orderedMessages" }] : /* istanbul ignore next */ []));
218
- effectiveVisibleCount = computed(() => {
219
- const limit = this.limit();
220
- const visibleCount = this.visibleCount();
221
- const count = typeof limit === 'number' && Number.isFinite(limit)
222
- ? limit
223
- : typeof visibleCount === 'number' && Number.isFinite(visibleCount)
224
- ? visibleCount
225
- : 4;
226
- return Number.isFinite(count) && count > 0 ? Math.floor(count) : 4;
227
- }, /* @ts-ignore */
228
- ...(ngDevMode ? [{ debugName: "effectiveVisibleCount" }] : /* istanbul ignore next */ []));
229
- visibleMessages = computed(() => this.orderedMessages().slice(0, this.effectiveVisibleCount()), /* @ts-ignore */
230
- ...(ngDevMode ? [{ debugName: "visibleMessages" }] : /* istanbul ignore next */ []));
231
- hiddenCount = computed(() => Math.max(0, this.orderedMessages().length - this.visibleMessages().length), /* @ts-ignore */
232
- ...(ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []));
233
- visibleStackSize = computed(() => `${this.visibleMessages().length}`, /* @ts-ignore */
234
- ...(ngDevMode ? [{ debugName: "visibleStackSize" }] : /* istanbul ignore next */ []));
235
- hasVisibleMessages = computed(() => this.visibleMessages().length > 0, /* @ts-ignore */
236
- ...(ngDevMode ? [{ debugName: "hasVisibleMessages" }] : /* istanbul ignore next */ []));
237
- stackWidthLocked = signal(false, /* @ts-ignore */
238
- ...(ngDevMode ? [{ debugName: "stackWidthLocked" }] : /* istanbul ignore next */ []));
239
- visibleStack = computed(() => {
240
- const messages = this.visibleMessages();
241
- const heights = this.measuredHeights();
242
- const swipeVisuals = this.swipeVisuals();
243
- const frontHeight = messages[0]
244
- ? (heights[messages[0].id] ?? AerisToast.fallbackHeight)
245
- : AerisToast.fallbackHeight;
246
- let heightOffset = 0;
247
- return messages.map((message, stackIndex) => {
248
- const height = heights[message.id] ?? AerisToast.fallbackHeight;
249
- const swipe = swipeVisuals[message.id];
250
- const item = {
251
- message,
252
- stackIndex,
253
- stackIndexValue: `${stackIndex}`,
254
- stackSizeValue: `${messages.length}`,
255
- heightValue: `${height}px`,
256
- frontHeightValue: `${frontHeight}px`,
257
- heightOffsetValue: `${heightOffset}px`,
258
- primary: stackIndex === 0,
259
- swipeXValue: `${swipe?.x ?? 0}px`,
260
- swipeYValue: `${swipe?.y ?? 0}px`,
261
- swipeDirection: swipe?.direction,
262
- swiping: swipe?.phase === 'dragging',
263
- swipeDismissing: swipe?.phase === 'dismissing',
264
- };
265
- heightOffset += height;
266
- return item;
267
- });
268
- }, /* @ts-ignore */
269
- ...(ngDevMode ? [{ debugName: "visibleStack" }] : /* istanbul ignore next */ []));
270
- templateContexts = computed(() => {
271
- const contexts = {};
272
- for (const message of this.visibleMessages()) {
273
- contexts[message.id] = {
274
- $implicit: message,
275
- message,
276
- close: () => this.close(message),
277
- };
278
- }
279
- return contexts;
280
- }, /* @ts-ignore */
281
- ...(ngDevMode ? [{ debugName: "templateContexts" }] : /* istanbul ignore next */ []));
282
- constructor() {
283
- effect(() => {
284
- const visibleCount = this.visibleMessages().length;
285
- if (visibleCount > 1)
286
- this.stackWidthLocked.set(true);
287
- else if (visibleCount === 0)
288
- this.stackWidthLocked.set(false);
289
- });
290
- effect((onCleanup) => {
291
- const elements = this.messageElements().map((element) => element.nativeElement);
292
- this.measureFrame.schedule();
293
- if (typeof globalThis.ResizeObserver !== 'function')
294
- return;
295
- const observer = new ResizeObserver(() => this.measureFrame.schedule());
296
- for (const element of elements)
297
- observer.observe(element);
298
- onCleanup(() => {
299
- observer.disconnect();
300
- this.measureFrame.cancel();
301
- });
302
- });
303
- effect((onCleanup) => {
304
- const group = this.group();
305
- const subscription = this.toastService.closed.subscribe((event) => {
306
- if (event.message.group !== group)
307
- return;
308
- this.closed.emit(event);
309
- });
310
- onCleanup(() => subscription.unsubscribe());
311
- });
312
- effect(() => {
313
- const visibleIds = new Set(this.visibleMessages().map((message) => message.id));
314
- const gestureIds = new Set(Object.keys(this.swipeVisuals()));
315
- const pauseVisible = this.stackHovered() && this.pauseOnHover();
316
- for (const message of this.orderedMessages()) {
317
- if (visibleIds.has(message.id) && !pauseVisible && !gestureIds.has(message.id)) {
318
- this.toastService.resume(message.id);
319
- }
320
- else {
321
- this.toastService.pause(message.id);
322
- }
323
- }
324
- });
325
- this.destroyRef.onDestroy(() => {
326
- this.measureFrame.cancel();
327
- this.swipeFrame.cancel();
328
- for (const cancel of this.pendingSwipeRemovals.values())
329
- cancel();
330
- for (const timer of this.swipeCleanupTimers.values())
331
- globalThis.clearTimeout(timer);
332
- this.pendingSwipeRemovals.clear();
333
- this.swipeCleanupTimers.clear();
334
- this.swipeSession = null;
335
- });
336
- }
337
- close(message) {
338
- this.toastService.remove(message.id, 'close-button');
339
- }
340
- pauseVisible() {
341
- this.stackHovered.set(true);
342
- if (!this.pauseOnHover())
343
- return;
344
- for (const message of this.visibleMessages())
345
- this.toastService.pause(message.id);
346
- }
347
- resumeVisible() {
348
- this.stackHovered.set(false);
349
- if (!this.pauseOnHover())
350
- return;
351
- const gestureIds = new Set(Object.keys(this.swipeVisuals()));
352
- for (const message of this.visibleMessages()) {
353
- if (!gestureIds.has(message.id))
354
- this.toastService.resume(message.id);
355
- }
356
- }
357
- handlePointerDown(event, message) {
358
- if (this.resolvedSwipeDirections().length === 0 || this.swipeSession)
359
- return;
360
- if (event.pointerType === 'mouse' && event.button !== 0)
361
- return;
362
- const target = event.target;
363
- if (target?.closest('button,a,input,textarea,select,[role="button"],[data-aeris-toast-swipe-ignore]')) {
364
- return;
365
- }
366
- event.currentTarget.setPointerCapture?.(event.pointerId);
367
- this.toastService.pause(message.id);
368
- this.swipeSession = {
369
- message,
370
- pointerId: event.pointerId,
371
- startX: event.clientX,
372
- startY: event.clientY,
373
- lastX: event.clientX,
374
- lastY: event.clientY,
375
- baselineX: event.clientX,
376
- baselineY: event.clientY,
377
- deltaX: 0,
378
- deltaY: 0,
379
- visualX: 0,
380
- visualY: 0,
381
- firstMove: true,
382
- realSwipe: false,
383
- lockedAxis: null,
384
- intendedDirection: undefined,
385
- maxDisplacement: 0,
386
- cancelled: false,
387
- };
388
- this.setSwipeVisual(message.id, {
389
- x: 0,
390
- y: 0,
391
- direction: undefined,
392
- phase: 'dragging',
393
- });
394
- }
395
- handlePointerMove(event) {
396
- const session = this.swipeSession;
397
- if (!session || event.pointerId !== session.pointerId)
398
- return;
399
- event.preventDefault();
400
- this.updateSwipeSession(session, event.clientX, event.clientY);
401
- this.swipeFrame.schedule();
402
- }
403
- handlePointerEnd(event) {
404
- const session = this.swipeSession;
405
- if (!session || event.pointerId !== session.pointerId)
406
- return;
407
- const target = event.currentTarget;
408
- if (target.hasPointerCapture?.(event.pointerId))
409
- target.releasePointerCapture(event.pointerId);
410
- this.swipeFrame.cancel();
411
- if (!session.firstMove)
412
- this.updateSwipeSession(session, event.clientX, event.clientY);
413
- this.flushSwipeVisual();
414
- const dismissDirection = event.type === 'pointercancel' || session.cancelled
415
- ? undefined
416
- : this.resolvedSwipeDirections().find((direction) => this.swipeDisplacement(direction, session.deltaX, session.deltaY) >
417
- this.resolvedSwipeThreshold());
418
- this.swipeSession = null;
419
- if (dismissDirection) {
420
- this.setSwipeVisual(session.message.id, {
421
- x: session.visualX,
422
- y: session.visualY,
423
- direction: dismissDirection,
424
- phase: 'dismissing',
425
- });
426
- this.scheduleSwipeRemoval(session.message);
427
- return;
428
- }
429
- this.removeSwipeVisual(session.message.id);
430
- if (!(this.stackHovered() && this.pauseOnHover())) {
431
- this.toastService.resume(session.message.id);
432
- }
433
- }
434
- measureMessages() {
435
- const measurements = {};
436
- for (const reference of this.messageElements()) {
437
- const element = reference.nativeElement;
438
- const id = element.dataset['toastId'];
439
- if (!id)
440
- continue;
441
- const contentHeight = Math.max(element.scrollHeight, element.getBoundingClientRect().height);
442
- if (contentHeight > 0)
443
- measurements[id] = Math.ceil(contentHeight + 2);
444
- }
445
- this.measuredHeights.update((current) => {
446
- const ids = Object.keys(measurements);
447
- const unchanged = ids.length === Object.keys(current).length &&
448
- ids.every((id) => current[id] === measurements[id]);
449
- return unchanged ? current : measurements;
450
- });
451
- }
452
- updateSwipeSession(session, clientX, clientY) {
453
- if (session.firstMove) {
454
- session.startX = clientX;
455
- session.startY = clientY;
456
- session.lastX = clientX;
457
- session.lastY = clientY;
458
- session.baselineX = clientX;
459
- session.baselineY = clientY;
460
- session.firstMove = false;
461
- return;
462
- }
463
- const movementX = clientX - session.lastX;
464
- const movementY = clientY - session.lastY;
465
- session.lastX = clientX;
466
- session.lastY = clientY;
467
- if ((movementY < 0 && clientY > session.baselineY) ||
468
- (movementY > 0 && clientY < session.baselineY)) {
469
- session.baselineY = clientY;
470
- }
471
- if ((movementX < 0 && clientX > session.baselineX) ||
472
- (movementX > 0 && clientX < session.baselineX)) {
473
- session.baselineX = clientX;
474
- }
475
- const deltaX = clientX - session.startX;
476
- const deltaY = clientY - session.startY;
477
- session.deltaX = deltaX;
478
- session.deltaY = deltaY;
479
- const directions = this.resolvedSwipeDirections();
480
- const hasHorizontal = directions.includes('left') || directions.includes('right');
481
- const hasVertical = directions.includes('up') || directions.includes('down');
482
- if (!session.realSwipe) {
483
- const distance = Math.hypot(deltaX, deltaY);
484
- if (distance >= AerisToast.minimumDragThreshold) {
485
- session.realSwipe = true;
486
- if (hasHorizontal && hasVertical) {
487
- session.lockedAxis = Math.abs(deltaX) > Math.abs(deltaY) ? 'horizontal' : 'vertical';
488
- }
489
- }
490
- }
491
- if (!session.intendedDirection) {
492
- const candidate = this.swipeCandidate(session.lockedAxis, deltaX, deltaY);
493
- if (candidate && directions.includes(candidate)) {
494
- session.intendedDirection = candidate;
495
- session.maxDisplacement = this.swipeDisplacement(candidate, deltaX, deltaY);
496
- }
497
- }
498
- else {
499
- const cancelDeltaX = clientX - session.baselineX;
500
- const cancelDeltaY = clientY - session.baselineY;
501
- const currentDisplacement = this.swipeDisplacement(session.intendedDirection, cancelDeltaX, cancelDeltaY);
502
- const displacement = this.swipeDisplacement(session.intendedDirection, deltaX, deltaY);
503
- session.maxDisplacement = Math.max(session.maxDisplacement, displacement);
504
- if (currentDisplacement > this.resolvedSwipeThreshold()) {
505
- session.cancelled = false;
506
- }
507
- else if (!this.hasOppositeSwipeDirection(session.intendedDirection, directions) &&
508
- session.maxDisplacement - currentDisplacement >= AerisToast.reverseCancelThreshold) {
509
- session.cancelled = true;
510
- }
511
- }
512
- const dampedX = this.dampedSwipeDelta(deltaX, 'left', 'right', directions);
513
- const dampedY = this.dampedSwipeDelta(deltaY, 'up', 'down', directions);
514
- session.visualX = session.lockedAxis !== 'vertical' && hasHorizontal ? dampedX : 0;
515
- session.visualY = session.lockedAxis !== 'horizontal' && hasVertical ? dampedY : 0;
516
- }
517
- flushSwipeVisual() {
518
- const session = this.swipeSession;
519
- if (!session)
520
- return;
521
- this.setSwipeVisual(session.message.id, {
522
- x: session.visualX,
523
- y: session.visualY,
524
- direction: session.cancelled ? undefined : session.intendedDirection,
525
- phase: 'dragging',
526
- });
527
- }
528
- setSwipeVisual(id, visual) {
529
- this.swipeVisuals.update((current) => ({ ...current, [id]: visual }));
530
- }
531
- removeSwipeVisual(id) {
532
- this.swipeVisuals.update((current) => {
533
- if (!(id in current))
534
- return current;
535
- const next = { ...current };
536
- delete next[id];
537
- return next;
538
- });
539
- }
540
- scheduleSwipeRemoval(message) {
541
- this.pendingSwipeRemovals.get(message.id)?.();
542
- const remove = () => {
543
- this.pendingSwipeRemovals.delete(message.id);
544
- this.toastService.remove(message.id, 'swipe');
545
- const cleanup = globalThis.setTimeout(() => {
546
- this.swipeCleanupTimers.delete(message.id);
547
- this.removeSwipeVisual(message.id);
548
- }, AerisToast.swipeRemovalDelay);
549
- this.swipeCleanupTimers.set(message.id, cleanup);
550
- };
551
- if (typeof globalThis.requestAnimationFrame === 'function') {
552
- const frame = globalThis.requestAnimationFrame(remove);
553
- this.pendingSwipeRemovals.set(message.id, () => globalThis.cancelAnimationFrame?.(frame));
554
- }
555
- else {
556
- const timer = globalThis.setTimeout(remove, 0);
557
- this.pendingSwipeRemovals.set(message.id, () => globalThis.clearTimeout(timer));
558
- }
559
- }
560
- swipeCandidate(lockedAxis, deltaX, deltaY) {
561
- if (lockedAxis === 'vertical')
562
- return deltaY > 0 ? 'down' : deltaY < 0 ? 'up' : undefined;
563
- if (lockedAxis === 'horizontal') {
564
- return deltaX > 0 ? 'right' : deltaX < 0 ? 'left' : undefined;
565
- }
566
- if (Math.abs(deltaX) >= Math.abs(deltaY)) {
567
- return deltaX > 0 ? 'right' : deltaX < 0 ? 'left' : undefined;
568
- }
569
- return deltaY > 0 ? 'down' : deltaY < 0 ? 'up' : undefined;
570
- }
571
- swipeDisplacement(direction, deltaX, deltaY) {
572
- if (direction === 'right')
573
- return deltaX;
574
- if (direction === 'left')
575
- return -deltaX;
576
- if (direction === 'down')
577
- return deltaY;
578
- return -deltaY;
579
- }
580
- dampedSwipeDelta(delta, negativeDirection, positiveDirection, directions) {
581
- const unsupported = (delta > 0 && !directions.includes(positiveDirection)) ||
582
- (delta < 0 && !directions.includes(negativeDirection));
583
- if (!unsupported)
584
- return delta;
585
- return Math.sign(delta) * Math.sqrt(Math.abs(delta));
586
- }
587
- hasOppositeSwipeDirection(direction, directions) {
588
- if (direction === 'left')
589
- return directions.includes('right');
590
- if (direction === 'right')
591
- return directions.includes('left');
592
- if (direction === 'up')
593
- return directions.includes('down');
594
- return directions.includes('up');
595
- }
596
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToast, deps: [], target: i0.ɵɵFactoryTarget.Component });
597
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AerisToast, isStandalone: true, selector: "aeris-toast", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, visibleCount: { classPropertyName: "visibleCount", publicName: "visibleCount", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, newestOnTop: { classPropertyName: "newestOnTop", publicName: "newestOnTop", isSignal: true, isRequired: false, transformFunction: null }, pauseOnHover: { classPropertyName: "pauseOnHover", publicName: "pauseOnHover", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, swipeDirection: { classPropertyName: "swipeDirection", publicName: "swipeDirection", isSignal: true, isRequired: false, transformFunction: null }, swipeThreshold: { classPropertyName: "swipeThreshold", publicName: "swipeThreshold", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.data-position": "position()" }, classAttribute: "aeris-toast" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: AerisToastContentTemplate, descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: AerisToastIconTemplate, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "messageElements", predicate: ["toastMessage"], descendants: true, isSignal: true }], ngImport: i0, template: `
76
+ var AerisToastService = class AerisToastService {
77
+ store = signal([], ...ngDevMode ? [{ debugName: "store" }] : /* istanbul ignore next */ []);
78
+ timers = /* @__PURE__ */ new Map();
79
+ closedStream = new AerisToastEventStream();
80
+ messages = this.store.asReadonly();
81
+ closed = this.closedStream;
82
+ show(message) {
83
+ const resolved = this.resolveMessage(message);
84
+ this.store.update((messages) => [...messages.filter((item) => item.id !== resolved.id), resolved]);
85
+ this.clearTimer(resolved.id);
86
+ this.schedule(resolved);
87
+ return resolved;
88
+ }
89
+ showAll(messages) {
90
+ const resolved = messages.map((message) => this.resolveMessage(message));
91
+ const resolvedIds = new Set(resolved.map((message) => message.id));
92
+ this.store.update((current) => [...current.filter((message) => !resolvedIds.has(message.id)), ...resolved]);
93
+ for (const message of resolved) {
94
+ this.clearTimer(message.id);
95
+ this.schedule(message);
96
+ }
97
+ return resolved;
98
+ }
99
+ remove(id, reason = "api") {
100
+ const message = this.store().find((item) => item.id === id);
101
+ if (!message) return;
102
+ this.store.update((messages) => messages.filter((item) => item.id !== id));
103
+ this.clearTimer(id);
104
+ this.closedStream.next({
105
+ message,
106
+ reason
107
+ });
108
+ }
109
+ clear(group = "") {
110
+ const targets = this.store().filter((message) => message.group === group);
111
+ this.removeMany(targets, "clear");
112
+ }
113
+ clearAll() {
114
+ this.removeMany(this.store(), "clear");
115
+ }
116
+ pause(id) {
117
+ const timer = this.timers.get(id);
118
+ if (!timer || timer.paused || !timer.handle) return;
119
+ globalThis.clearTimeout(timer.handle);
120
+ timer.handle = null;
121
+ timer.remaining = Math.max(0, timer.remaining - (Date.now() - timer.startedAt));
122
+ timer.paused = true;
123
+ }
124
+ resume(id) {
125
+ const timer = this.timers.get(id);
126
+ if (!timer || !timer.paused) return;
127
+ timer.paused = false;
128
+ timer.startedAt = Date.now();
129
+ timer.handle = globalThis.setTimeout(() => this.remove(id, "timeout"), timer.remaining);
130
+ }
131
+ schedule(message) {
132
+ if (message.sticky || message.life <= 0) return;
133
+ this.timers.set(message.id, {
134
+ message,
135
+ handle: globalThis.setTimeout(() => this.remove(message.id, "timeout"), message.life),
136
+ startedAt: Date.now(),
137
+ remaining: message.life,
138
+ paused: false
139
+ });
140
+ }
141
+ clearTimer(id) {
142
+ const timer = this.timers.get(id);
143
+ if (timer?.handle) globalThis.clearTimeout(timer.handle);
144
+ this.timers.delete(id);
145
+ }
146
+ removeMany(targets, reason) {
147
+ if (targets.length === 0) return;
148
+ const targetIds = new Set(targets.map((message) => message.id));
149
+ this.store.update((messages) => messages.filter((message) => !targetIds.has(message.id)));
150
+ for (const message of targets) {
151
+ this.clearTimer(message.id);
152
+ this.closedStream.next({
153
+ message,
154
+ reason
155
+ });
156
+ }
157
+ }
158
+ resolveMessage(input) {
159
+ const severity = input.severity ?? "neutral";
160
+ const role = input.role ?? (severity === "danger" || severity === "warning" ? "alert" : "status");
161
+ return {
162
+ id: input.id ?? `aeris-toast-${++nextToastId}`,
163
+ group: input.group ?? "",
164
+ severity,
165
+ summary: input.summary ?? "",
166
+ detail: input.detail ?? "",
167
+ life: input.life ?? 5e3,
168
+ sticky: input.sticky ?? false,
169
+ closable: input.closable ?? true,
170
+ data: input.data,
171
+ ariaLabel: input.ariaLabel ?? "",
172
+ ariaLive: input.ariaLive ?? (role === "alert" ? "assertive" : "polite"),
173
+ role,
174
+ createdAt: Date.now()
175
+ };
176
+ }
177
+ static ɵfac = i0.ɵɵngDeclareFactory({
178
+ minVersion: "12.0.0",
179
+ version: "22.2.1",
180
+ ngImport: i0,
181
+ type: AerisToastService,
182
+ deps: [],
183
+ target: i0.ɵɵFactoryTarget.Service
184
+ });
185
+ static ɵprov = i0.ɵɵngDeclareService({
186
+ minVersion: "22.0.0",
187
+ version: "22.2.1",
188
+ ngImport: i0,
189
+ type: AerisToastService
190
+ });
191
+ };
192
+ i0.ɵɵngDeclareClassMetadata({
193
+ minVersion: "12.0.0",
194
+ version: "22.2.1",
195
+ ngImport: i0,
196
+ type: AerisToastService,
197
+ decorators: [{ type: Service }]
198
+ });
199
+ var AerisToast = class AerisToast {
200
+ static fallbackHeight = 72;
201
+ static swipeRemovalDelay = 550;
202
+ static reverseCancelThreshold = 10;
203
+ static minimumDragThreshold = 1;
204
+ toastService = inject(AerisToastService);
205
+ destroyRef = inject(DestroyRef);
206
+ messageElements = viewChildren("toastMessage", ...ngDevMode ? [{ debugName: "messageElements" }] : /* istanbul ignore next */ []);
207
+ measuredHeights = signal({}, ...ngDevMode ? [{ debugName: "measuredHeights" }] : /* istanbul ignore next */ []);
208
+ swipeVisuals = signal({}, ...ngDevMode ? [{ debugName: "swipeVisuals" }] : /* istanbul ignore next */ []);
209
+ swipeCleanupTimers = /* @__PURE__ */ new Map();
210
+ pendingSwipeRemovals = /* @__PURE__ */ new Map();
211
+ measureFrame = aerisInternalCreateFrameScheduler(() => this.measureMessages());
212
+ swipeFrame = aerisInternalCreateFrameScheduler(() => this.flushSwipeVisual());
213
+ swipeSession = null;
214
+ contentTemplate = contentChild(AerisToastContentTemplate, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
215
+ iconTemplate = contentChild(AerisToastIconTemplate, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
216
+ position = input("bottom-right", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
217
+ group = input("", ...ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []);
218
+ mode = input("stacked", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
219
+ visibleCount = input(4, {
220
+ ...ngDevMode ? { debugName: "visibleCount" } : /* istanbul ignore next */ {},
221
+ transform: numberAttribute
222
+ });
223
+ limit = input(void 0, {
224
+ ...ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {},
225
+ transform: numberAttribute
226
+ });
227
+ newestOnTop = input(true, {
228
+ ...ngDevMode ? { debugName: "newestOnTop" } : /* istanbul ignore next */ {},
229
+ transform: booleanAttribute
230
+ });
231
+ pauseOnHover = input(true, {
232
+ ...ngDevMode ? { debugName: "pauseOnHover" } : /* istanbul ignore next */ {},
233
+ transform: booleanAttribute
234
+ });
235
+ showIcon = input(true, {
236
+ ...ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {},
237
+ transform: booleanAttribute
238
+ });
239
+ showClose = input(true, {
240
+ ...ngDevMode ? { debugName: "showClose" } : /* istanbul ignore next */ {},
241
+ transform: booleanAttribute
242
+ });
243
+ swipeDirection = input(["down", "right"], ...ngDevMode ? [{ debugName: "swipeDirection" }] : /* istanbul ignore next */ []);
244
+ swipeThreshold = input(40, {
245
+ ...ngDevMode ? { debugName: "swipeThreshold" } : /* istanbul ignore next */ {},
246
+ transform: numberAttribute
247
+ });
248
+ ariaLabel = input("Notifications", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
249
+ closeAriaLabel = input("Close notification", ...ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []);
250
+ closed = output();
251
+ stackHovered = signal(false, ...ngDevMode ? [{ debugName: "stackHovered" }] : /* istanbul ignore next */ []);
252
+ resolvedSwipeDirections = computed(() => {
253
+ const value = this.swipeDirection();
254
+ return [...new Set(Array.isArray(value) ? value : [value])].filter((direction) => direction === "up" || direction === "down" || direction === "left" || direction === "right");
255
+ }, ...ngDevMode ? [{ debugName: "resolvedSwipeDirections" }] : /* istanbul ignore next */ []);
256
+ resolvedSwipeThreshold = computed(() => {
257
+ const threshold = this.swipeThreshold();
258
+ return Number.isFinite(threshold) && threshold >= 0 ? threshold : 40;
259
+ }, ...ngDevMode ? [{ debugName: "resolvedSwipeThreshold" }] : /* istanbul ignore next */ []);
260
+ orderedMessages = computed(() => {
261
+ const group = this.group();
262
+ const filtered = this.toastService.messages().filter((message) => message.group === group);
263
+ return this.newestOnTop() ? [...filtered].reverse() : filtered;
264
+ }, ...ngDevMode ? [{ debugName: "orderedMessages" }] : /* istanbul ignore next */ []);
265
+ effectiveVisibleCount = computed(() => {
266
+ const limit = this.limit();
267
+ const visibleCount = this.visibleCount();
268
+ const count = typeof limit === "number" && Number.isFinite(limit) ? limit : typeof visibleCount === "number" && Number.isFinite(visibleCount) ? visibleCount : 4;
269
+ return Number.isFinite(count) && count > 0 ? Math.floor(count) : 4;
270
+ }, ...ngDevMode ? [{ debugName: "effectiveVisibleCount" }] : /* istanbul ignore next */ []);
271
+ visibleMessages = computed(() => this.orderedMessages().slice(0, this.effectiveVisibleCount()), ...ngDevMode ? [{ debugName: "visibleMessages" }] : /* istanbul ignore next */ []);
272
+ hiddenCount = computed(() => Math.max(0, this.orderedMessages().length - this.visibleMessages().length), ...ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []);
273
+ visibleStackSize = computed(() => `${this.visibleMessages().length}`, ...ngDevMode ? [{ debugName: "visibleStackSize" }] : /* istanbul ignore next */ []);
274
+ hasVisibleMessages = computed(() => this.visibleMessages().length > 0, ...ngDevMode ? [{ debugName: "hasVisibleMessages" }] : /* istanbul ignore next */ []);
275
+ stackWidthLocked = signal(false, ...ngDevMode ? [{ debugName: "stackWidthLocked" }] : /* istanbul ignore next */ []);
276
+ visibleStack = computed(() => {
277
+ const messages = this.visibleMessages();
278
+ const heights = this.measuredHeights();
279
+ const swipeVisuals = this.swipeVisuals();
280
+ const frontHeight = messages[0] ? heights[messages[0].id] ?? AerisToast.fallbackHeight : AerisToast.fallbackHeight;
281
+ let heightOffset = 0;
282
+ return messages.map((message, stackIndex) => {
283
+ const height = heights[message.id] ?? AerisToast.fallbackHeight;
284
+ const swipe = swipeVisuals[message.id];
285
+ const item = {
286
+ message,
287
+ stackIndex,
288
+ stackIndexValue: `${stackIndex}`,
289
+ stackSizeValue: `${messages.length}`,
290
+ heightValue: `${height}px`,
291
+ frontHeightValue: `${frontHeight}px`,
292
+ heightOffsetValue: `${heightOffset}px`,
293
+ primary: stackIndex === 0,
294
+ swipeXValue: `${swipe?.x ?? 0}px`,
295
+ swipeYValue: `${swipe?.y ?? 0}px`,
296
+ swipeDirection: swipe?.direction,
297
+ swiping: swipe?.phase === "dragging",
298
+ swipeDismissing: swipe?.phase === "dismissing"
299
+ };
300
+ heightOffset += height;
301
+ return item;
302
+ });
303
+ }, ...ngDevMode ? [{ debugName: "visibleStack" }] : /* istanbul ignore next */ []);
304
+ templateContexts = computed(() => {
305
+ const contexts = {};
306
+ for (const message of this.visibleMessages()) contexts[message.id] = {
307
+ $implicit: message,
308
+ message,
309
+ close: () => this.close(message)
310
+ };
311
+ return contexts;
312
+ }, ...ngDevMode ? [{ debugName: "templateContexts" }] : /* istanbul ignore next */ []);
313
+ constructor() {
314
+ effect(() => {
315
+ const visibleCount = this.visibleMessages().length;
316
+ if (visibleCount > 1) this.stackWidthLocked.set(true);
317
+ else if (visibleCount === 0) this.stackWidthLocked.set(false);
318
+ });
319
+ effect((onCleanup) => {
320
+ const elements = this.messageElements().map((element) => element.nativeElement);
321
+ this.measureFrame.schedule();
322
+ if (typeof globalThis.ResizeObserver !== "function") return;
323
+ const observer = new ResizeObserver(() => this.measureFrame.schedule());
324
+ for (const element of elements) observer.observe(element);
325
+ onCleanup(() => {
326
+ observer.disconnect();
327
+ this.measureFrame.cancel();
328
+ });
329
+ });
330
+ effect((onCleanup) => {
331
+ const group = this.group();
332
+ const subscription = this.toastService.closed.subscribe((event) => {
333
+ if (event.message.group !== group) return;
334
+ this.closed.emit(event);
335
+ });
336
+ onCleanup(() => subscription.unsubscribe());
337
+ });
338
+ effect(() => {
339
+ const visibleIds = new Set(this.visibleMessages().map((message) => message.id));
340
+ const gestureIds = new Set(Object.keys(this.swipeVisuals()));
341
+ const pauseVisible = this.stackHovered() && this.pauseOnHover();
342
+ for (const message of this.orderedMessages()) if (visibleIds.has(message.id) && !pauseVisible && !gestureIds.has(message.id)) this.toastService.resume(message.id);
343
+ else this.toastService.pause(message.id);
344
+ });
345
+ this.destroyRef.onDestroy(() => {
346
+ this.measureFrame.cancel();
347
+ this.swipeFrame.cancel();
348
+ for (const cancel of this.pendingSwipeRemovals.values()) cancel();
349
+ for (const timer of this.swipeCleanupTimers.values()) globalThis.clearTimeout(timer);
350
+ this.pendingSwipeRemovals.clear();
351
+ this.swipeCleanupTimers.clear();
352
+ this.swipeSession = null;
353
+ });
354
+ }
355
+ close(message) {
356
+ this.toastService.remove(message.id, "close-button");
357
+ }
358
+ pauseVisible() {
359
+ this.stackHovered.set(true);
360
+ if (!this.pauseOnHover()) return;
361
+ for (const message of this.visibleMessages()) this.toastService.pause(message.id);
362
+ }
363
+ resumeVisible() {
364
+ this.stackHovered.set(false);
365
+ if (!this.pauseOnHover()) return;
366
+ const gestureIds = new Set(Object.keys(this.swipeVisuals()));
367
+ for (const message of this.visibleMessages()) if (!gestureIds.has(message.id)) this.toastService.resume(message.id);
368
+ }
369
+ handlePointerDown(event, message) {
370
+ if (this.resolvedSwipeDirections().length === 0 || this.swipeSession) return;
371
+ if (event.pointerType === "mouse" && event.button !== 0) return;
372
+ if (event.target?.closest("button,a,input,textarea,select,[role=\"button\"],[data-aeris-toast-swipe-ignore]")) return;
373
+ event.currentTarget.setPointerCapture?.(event.pointerId);
374
+ this.toastService.pause(message.id);
375
+ this.swipeSession = {
376
+ message,
377
+ pointerId: event.pointerId,
378
+ startX: event.clientX,
379
+ startY: event.clientY,
380
+ lastX: event.clientX,
381
+ lastY: event.clientY,
382
+ baselineX: event.clientX,
383
+ baselineY: event.clientY,
384
+ deltaX: 0,
385
+ deltaY: 0,
386
+ visualX: 0,
387
+ visualY: 0,
388
+ firstMove: true,
389
+ realSwipe: false,
390
+ lockedAxis: null,
391
+ intendedDirection: void 0,
392
+ maxDisplacement: 0,
393
+ cancelled: false
394
+ };
395
+ this.setSwipeVisual(message.id, {
396
+ x: 0,
397
+ y: 0,
398
+ direction: void 0,
399
+ phase: "dragging"
400
+ });
401
+ }
402
+ handlePointerMove(event) {
403
+ const session = this.swipeSession;
404
+ if (!session || event.pointerId !== session.pointerId) return;
405
+ event.preventDefault();
406
+ this.updateSwipeSession(session, event.clientX, event.clientY);
407
+ this.swipeFrame.schedule();
408
+ }
409
+ handlePointerEnd(event) {
410
+ const session = this.swipeSession;
411
+ if (!session || event.pointerId !== session.pointerId) return;
412
+ const target = event.currentTarget;
413
+ if (target.hasPointerCapture?.(event.pointerId)) target.releasePointerCapture(event.pointerId);
414
+ this.swipeFrame.cancel();
415
+ if (!session.firstMove) this.updateSwipeSession(session, event.clientX, event.clientY);
416
+ this.flushSwipeVisual();
417
+ const dismissDirection = event.type === "pointercancel" || session.cancelled ? void 0 : this.resolvedSwipeDirections().find((direction) => this.swipeDisplacement(direction, session.deltaX, session.deltaY) > this.resolvedSwipeThreshold());
418
+ this.swipeSession = null;
419
+ if (dismissDirection) {
420
+ this.setSwipeVisual(session.message.id, {
421
+ x: session.visualX,
422
+ y: session.visualY,
423
+ direction: dismissDirection,
424
+ phase: "dismissing"
425
+ });
426
+ this.scheduleSwipeRemoval(session.message);
427
+ return;
428
+ }
429
+ this.removeSwipeVisual(session.message.id);
430
+ if (!(this.stackHovered() && this.pauseOnHover())) this.toastService.resume(session.message.id);
431
+ }
432
+ measureMessages() {
433
+ const measurements = {};
434
+ for (const reference of this.messageElements()) {
435
+ const element = reference.nativeElement;
436
+ const id = element.dataset["toastId"];
437
+ if (!id) continue;
438
+ const contentHeight = Math.max(element.scrollHeight, element.getBoundingClientRect().height);
439
+ if (contentHeight > 0) measurements[id] = Math.ceil(contentHeight + 2);
440
+ }
441
+ this.measuredHeights.update((current) => {
442
+ const ids = Object.keys(measurements);
443
+ return ids.length === Object.keys(current).length && ids.every((id) => current[id] === measurements[id]) ? current : measurements;
444
+ });
445
+ }
446
+ updateSwipeSession(session, clientX, clientY) {
447
+ if (session.firstMove) {
448
+ session.startX = clientX;
449
+ session.startY = clientY;
450
+ session.lastX = clientX;
451
+ session.lastY = clientY;
452
+ session.baselineX = clientX;
453
+ session.baselineY = clientY;
454
+ session.firstMove = false;
455
+ return;
456
+ }
457
+ const movementX = clientX - session.lastX;
458
+ const movementY = clientY - session.lastY;
459
+ session.lastX = clientX;
460
+ session.lastY = clientY;
461
+ if (movementY < 0 && clientY > session.baselineY || movementY > 0 && clientY < session.baselineY) session.baselineY = clientY;
462
+ if (movementX < 0 && clientX > session.baselineX || movementX > 0 && clientX < session.baselineX) session.baselineX = clientX;
463
+ const deltaX = clientX - session.startX;
464
+ const deltaY = clientY - session.startY;
465
+ session.deltaX = deltaX;
466
+ session.deltaY = deltaY;
467
+ const directions = this.resolvedSwipeDirections();
468
+ const hasHorizontal = directions.includes("left") || directions.includes("right");
469
+ const hasVertical = directions.includes("up") || directions.includes("down");
470
+ if (!session.realSwipe) {
471
+ if (Math.hypot(deltaX, deltaY) >= AerisToast.minimumDragThreshold) {
472
+ session.realSwipe = true;
473
+ if (hasHorizontal && hasVertical) session.lockedAxis = Math.abs(deltaX) > Math.abs(deltaY) ? "horizontal" : "vertical";
474
+ }
475
+ }
476
+ if (!session.intendedDirection) {
477
+ const candidate = this.swipeCandidate(session.lockedAxis, deltaX, deltaY);
478
+ if (candidate && directions.includes(candidate)) {
479
+ session.intendedDirection = candidate;
480
+ session.maxDisplacement = this.swipeDisplacement(candidate, deltaX, deltaY);
481
+ }
482
+ } else {
483
+ const cancelDeltaX = clientX - session.baselineX;
484
+ const cancelDeltaY = clientY - session.baselineY;
485
+ const currentDisplacement = this.swipeDisplacement(session.intendedDirection, cancelDeltaX, cancelDeltaY);
486
+ const displacement = this.swipeDisplacement(session.intendedDirection, deltaX, deltaY);
487
+ session.maxDisplacement = Math.max(session.maxDisplacement, displacement);
488
+ if (currentDisplacement > this.resolvedSwipeThreshold()) session.cancelled = false;
489
+ else if (!this.hasOppositeSwipeDirection(session.intendedDirection, directions) && session.maxDisplacement - currentDisplacement >= AerisToast.reverseCancelThreshold) session.cancelled = true;
490
+ }
491
+ const dampedX = this.dampedSwipeDelta(deltaX, "left", "right", directions);
492
+ const dampedY = this.dampedSwipeDelta(deltaY, "up", "down", directions);
493
+ session.visualX = session.lockedAxis !== "vertical" && hasHorizontal ? dampedX : 0;
494
+ session.visualY = session.lockedAxis !== "horizontal" && hasVertical ? dampedY : 0;
495
+ }
496
+ flushSwipeVisual() {
497
+ const session = this.swipeSession;
498
+ if (!session) return;
499
+ this.setSwipeVisual(session.message.id, {
500
+ x: session.visualX,
501
+ y: session.visualY,
502
+ direction: session.cancelled ? void 0 : session.intendedDirection,
503
+ phase: "dragging"
504
+ });
505
+ }
506
+ setSwipeVisual(id, visual) {
507
+ this.swipeVisuals.update((current) => ({
508
+ ...current,
509
+ [id]: visual
510
+ }));
511
+ }
512
+ removeSwipeVisual(id) {
513
+ this.swipeVisuals.update((current) => {
514
+ if (!(id in current)) return current;
515
+ const next = { ...current };
516
+ delete next[id];
517
+ return next;
518
+ });
519
+ }
520
+ scheduleSwipeRemoval(message) {
521
+ this.pendingSwipeRemovals.get(message.id)?.();
522
+ const remove = () => {
523
+ this.pendingSwipeRemovals.delete(message.id);
524
+ this.toastService.remove(message.id, "swipe");
525
+ const cleanup = globalThis.setTimeout(() => {
526
+ this.swipeCleanupTimers.delete(message.id);
527
+ this.removeSwipeVisual(message.id);
528
+ }, AerisToast.swipeRemovalDelay);
529
+ this.swipeCleanupTimers.set(message.id, cleanup);
530
+ };
531
+ if (typeof globalThis.requestAnimationFrame === "function") {
532
+ const frame = globalThis.requestAnimationFrame(remove);
533
+ this.pendingSwipeRemovals.set(message.id, () => globalThis.cancelAnimationFrame?.(frame));
534
+ } else {
535
+ const timer = globalThis.setTimeout(remove, 0);
536
+ this.pendingSwipeRemovals.set(message.id, () => globalThis.clearTimeout(timer));
537
+ }
538
+ }
539
+ swipeCandidate(lockedAxis, deltaX, deltaY) {
540
+ if (lockedAxis === "vertical") return deltaY > 0 ? "down" : deltaY < 0 ? "up" : void 0;
541
+ if (lockedAxis === "horizontal") return deltaX > 0 ? "right" : deltaX < 0 ? "left" : void 0;
542
+ if (Math.abs(deltaX) >= Math.abs(deltaY)) return deltaX > 0 ? "right" : deltaX < 0 ? "left" : void 0;
543
+ return deltaY > 0 ? "down" : deltaY < 0 ? "up" : void 0;
544
+ }
545
+ swipeDisplacement(direction, deltaX, deltaY) {
546
+ if (direction === "right") return deltaX;
547
+ if (direction === "left") return -deltaX;
548
+ if (direction === "down") return deltaY;
549
+ return -deltaY;
550
+ }
551
+ dampedSwipeDelta(delta, negativeDirection, positiveDirection, directions) {
552
+ if (!(delta > 0 && !directions.includes(positiveDirection) || delta < 0 && !directions.includes(negativeDirection))) return delta;
553
+ return Math.sign(delta) * Math.sqrt(Math.abs(delta));
554
+ }
555
+ hasOppositeSwipeDirection(direction, directions) {
556
+ if (direction === "left") return directions.includes("right");
557
+ if (direction === "right") return directions.includes("left");
558
+ if (direction === "up") return directions.includes("down");
559
+ return directions.includes("up");
560
+ }
561
+ static ɵfac = i0.ɵɵngDeclareFactory({
562
+ minVersion: "12.0.0",
563
+ version: "22.2.1",
564
+ ngImport: i0,
565
+ type: AerisToast,
566
+ deps: [],
567
+ target: i0.ɵɵFactoryTarget.Component
568
+ });
569
+ static ɵcmp = i0.ɵɵngDeclareComponent({
570
+ minVersion: "17.0.0",
571
+ version: "22.2.1",
572
+ type: AerisToast,
573
+ isStandalone: true,
574
+ selector: "aeris-toast",
575
+ inputs: {
576
+ position: {
577
+ classPropertyName: "position",
578
+ publicName: "position",
579
+ isSignal: true,
580
+ isRequired: false,
581
+ transformFunction: null
582
+ },
583
+ group: {
584
+ classPropertyName: "group",
585
+ publicName: "group",
586
+ isSignal: true,
587
+ isRequired: false,
588
+ transformFunction: null
589
+ },
590
+ mode: {
591
+ classPropertyName: "mode",
592
+ publicName: "mode",
593
+ isSignal: true,
594
+ isRequired: false,
595
+ transformFunction: null
596
+ },
597
+ visibleCount: {
598
+ classPropertyName: "visibleCount",
599
+ publicName: "visibleCount",
600
+ isSignal: true,
601
+ isRequired: false,
602
+ transformFunction: null
603
+ },
604
+ limit: {
605
+ classPropertyName: "limit",
606
+ publicName: "limit",
607
+ isSignal: true,
608
+ isRequired: false,
609
+ transformFunction: null
610
+ },
611
+ newestOnTop: {
612
+ classPropertyName: "newestOnTop",
613
+ publicName: "newestOnTop",
614
+ isSignal: true,
615
+ isRequired: false,
616
+ transformFunction: null
617
+ },
618
+ pauseOnHover: {
619
+ classPropertyName: "pauseOnHover",
620
+ publicName: "pauseOnHover",
621
+ isSignal: true,
622
+ isRequired: false,
623
+ transformFunction: null
624
+ },
625
+ showIcon: {
626
+ classPropertyName: "showIcon",
627
+ publicName: "showIcon",
628
+ isSignal: true,
629
+ isRequired: false,
630
+ transformFunction: null
631
+ },
632
+ showClose: {
633
+ classPropertyName: "showClose",
634
+ publicName: "showClose",
635
+ isSignal: true,
636
+ isRequired: false,
637
+ transformFunction: null
638
+ },
639
+ swipeDirection: {
640
+ classPropertyName: "swipeDirection",
641
+ publicName: "swipeDirection",
642
+ isSignal: true,
643
+ isRequired: false,
644
+ transformFunction: null
645
+ },
646
+ swipeThreshold: {
647
+ classPropertyName: "swipeThreshold",
648
+ publicName: "swipeThreshold",
649
+ isSignal: true,
650
+ isRequired: false,
651
+ transformFunction: null
652
+ },
653
+ ariaLabel: {
654
+ classPropertyName: "ariaLabel",
655
+ publicName: "ariaLabel",
656
+ isSignal: true,
657
+ isRequired: false,
658
+ transformFunction: null
659
+ },
660
+ closeAriaLabel: {
661
+ classPropertyName: "closeAriaLabel",
662
+ publicName: "closeAriaLabel",
663
+ isSignal: true,
664
+ isRequired: false,
665
+ transformFunction: null
666
+ }
667
+ },
668
+ outputs: { closed: "closed" },
669
+ host: {
670
+ properties: { "attr.data-position": "position()" },
671
+ classAttribute: "aeris-toast"
672
+ },
673
+ queries: [{
674
+ propertyName: "contentTemplate",
675
+ first: true,
676
+ predicate: AerisToastContentTemplate,
677
+ descendants: true,
678
+ isSignal: true
679
+ }, {
680
+ propertyName: "iconTemplate",
681
+ first: true,
682
+ predicate: AerisToastIconTemplate,
683
+ descendants: true,
684
+ isSignal: true
685
+ }],
686
+ viewQueries: [{
687
+ propertyName: "messageElements",
688
+ predicate: ["toastMessage"],
689
+ descendants: true,
690
+ isSignal: true
691
+ }],
692
+ ngImport: i0,
693
+ template: `
598
694
  <section
599
695
  class="aeris-toast__region"
600
696
  [attr.aria-label]="hasVisibleMessages() ? ariaLabel() : null"
@@ -705,11 +801,32 @@ class AerisToast {
705
801
  </span>
706
802
  }
707
803
  </section>
708
- `, isInline: true, styles: [":host{display:contents}.aeris-toast__region{--_stack-gap: var(--aeris-toast-gap, .75rem);--_stack-peek: var(--aeris-toast-stack-peek, .75rem);--_edge-offset: var(--aeris-toast-offset, 1rem);position:fixed;z-index:var(--aeris-z-toast, 1200);isolation:isolate;width:min(var(--aeris-toast-width, 24rem),100vw - var(--_edge-offset) - var(--_edge-offset) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}.aeris-toast__region[data-position$=left]{left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px))}.aeris-toast__region[data-position$=right]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px))}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__item{--_stack-scale: max(0, 1 - (var(--aeris-toast-stack-index, 0) * .1)) ;--_stack-shrink: calc(1 - var(--_stack-scale));--_rest-y: 0px;--_active-y: var(--_rest-y);--_active-scale: var(--_stack-scale);position:absolute;inset-inline:0;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));box-sizing:border-box;display:flex;height:var(--aeris-toast-front-height, var(--aeris-toast-height, 4.5rem));min-width:0;opacity:1;pointer-events:auto;will-change:transform;touch-action:none;-webkit-user-select:none;user-select:none;transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale));transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s,height .15s}.aeris-toast__region[data-position$=left] .aeris-toast__item{justify-content:flex-start}.aeris-toast__region[data-position$=right] .aeris-toast__item{justify-content:flex-end}.aeris-toast__region[data-position$=center] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{justify-content:center}.aeris-toast__item:after{position:absolute;inset-inline:0;top:100%;height:calc(var(--_stack-gap) + 1px);content:\"\"}.aeris-toast__region[data-position^=top] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek)) + (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );top:0;transform-origin:top center}.aeris-toast__region[data-position^=bottom] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek) * -1) - (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );bottom:0;transform-origin:bottom center}.aeris-toast__region[data-mode=stacked] .aeris-toast__item:not([data-primary]){pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__body[data-behind]{opacity:0}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=expanded] .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=expanded] .aeris-toast__item{--_active-y: calc( var(--aeris-toast-height-offset, 0px) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap)) );--_active-scale: 1}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__item{--_active-y: calc( (var(--aeris-toast-height-offset, 0px) * -1) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap) * -1) );--_active-scale: 1}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}.aeris-toast__item[data-swiping]{cursor:grabbing;transition:none}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=right],.aeris-toast__item--leaving[data-swipe-direction=right]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) + 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=left],.aeris-toast__item--leaving[data-swipe-direction=left]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) - 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=down],.aeris-toast__item--leaving[data-swipe-direction=down]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) + 150%)) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=up],.aeris-toast__item--leaving[data-swipe-direction=up]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) - 150%)) scale(var(--_active-scale))}.aeris-toast__region[data-position^=top] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item--leaving:not([data-swipe-direction]),.aeris-toast__region[data-position=center] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(150%)}.aeris-toast__item--leaving{pointer-events:none}.aeris-toast__region[data-position=center] .aeris-toast__item:is([data-swipe-dismissing],.aeris-toast__item--leaving){opacity:0}@starting-style{.aeris-toast__region[data-position^=top] .aeris-toast__item{transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{transform:translateY(150%)}}.aeris-toast__message{--_accent: var(--aeris-primary, #5f6f36);--_icon-color: var(--_accent);--_toast-surface: color-mix( in srgb, var(--_accent) var(--aeris-toast-severity-tint, 9%), var(--aeris-surface, #fff) );--_toast-text: var(--aeris-text, #222222);--_toast-detail: var(--aeris-text-2, #555555);position:relative;box-sizing:border-box;width:fit-content;min-width:min(var(--aeris-toast-min-width, 12rem),100%);max-width:100%;height:100%;min-width:0;border:1px solid var(--aeris-toast-border-color, var(--_accent));border-radius:var(--aeris-radius-md, .75rem);background:var(--aeris-toast-background, var(--_toast-surface));color:var(--_toast-text);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));overflow:hidden;pointer-events:auto;transition:box-shadow .16s ease,border-color .16s ease}.aeris-toast__region[data-stack-width] .aeris-toast__message{width:100%}.aeris-toast__body{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:.75rem;padding:.875rem .875rem .875rem 1rem;transition:opacity .25s cubic-bezier(.22,1,.36,1)}.aeris-toast__body[data-icon-hidden]{grid-template-columns:minmax(0,1fr) auto}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]){position:relative;min-height:3rem;grid-template-columns:minmax(0,1fr);align-items:center;padding:.5rem 3rem .5rem .875rem}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__content{text-align:start}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__close{position:absolute;top:50%;inset-inline-end:.5rem;margin:0;transform:translateY(-50%)}.aeris-toast__message:hover,.aeris-toast__message:focus-within{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.aeris-toast__message[data-severity=primary]{--_accent: var(--aeris-primary, #5f6f36)}.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-secondary, #b75e26)}.aeris-toast__message[data-severity=success]{--_accent: var(--aeris-success, #6f8a68)}.aeris-toast__message[data-severity=info]{--_accent: var(--aeris-info, #6b8793)}.aeris-toast__message[data-severity=warning]{--_accent: var(--aeris-warning, #c38600)}.aeris-toast__message[data-severity=danger]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222);--_icon-color: var(--aeris-surface, #ffffff);--_toast-surface: var(--aeris-text, #222222);--_toast-text: var(--aeris-surface, #ffffff);--_toast-detail: var(--aeris-surface, #ffffff)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{transform:translate(-50%,-50%) rotate(-45deg)}.aeris-toast__content{min-width:0;display:grid;gap:.2rem}.aeris-toast__summary,.aeris-toast__detail{margin:0}.aeris-toast__summary{color:var(--_toast-text);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--_toast-detail);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--_toast-detail);cursor:pointer;transition:background-color .16s ease,color .16s ease}.aeris-toast__close:hover{background:color-mix(in srgb,var(--_toast-text) 10%,transparent);color:var(--_toast-text)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #3b4729);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{position:absolute;z-index:calc(var(--aeris-toast-stack-size, 1) + 1);left:50%;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;translate:-50% -50%;transition:opacity .15s ease,transform .15s ease}.aeris-toast__overflow--entering{animation:aeris-toast-overflow-enter .26s cubic-bezier(.16,1,.3,1) both}.aeris-toast__overflow--leaving{animation:aeris-toast-overflow-leave .16s ease-in both}.aeris-toast__region[data-position^=top] .aeris-toast__overflow{top:0}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{bottom:0;translate:-50% 50%}.aeris-toast__region[data-position=center] .aeris-toast__overflow{top:0}@keyframes aeris-toast-overflow-enter{0%{opacity:0;scale:.75}to{opacity:1;scale:1}}@keyframes aeris-toast-overflow-leave{to{opacity:0;scale:.8}}@media(max-width:36rem){.aeris-toast__region{--_edge-offset: var(--aeris-toast-mobile-offset, .5rem)}.aeris-toast__region[data-position]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px));left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px));width:auto;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}}@media(prefers-reduced-motion:reduce){.aeris-toast__item--leaving,.aeris-toast__overflow--entering,.aeris-toast__overflow--leaving{animation-duration:1ms}.aeris-toast__item,.aeris-toast__message,.aeris-toast__body,.aeris-toast__overflow,.aeris-toast__icon,.aeris-toast__content,.aeris-toast__close{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
709
- }
710
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AerisToast, decorators: [{
711
- type: Component,
712
- args: [{ selector: 'aeris-toast', imports: [NgTemplateOutlet], template: `
804
+ `,
805
+ isInline: true,
806
+ styles: [":host{display:contents}.aeris-toast__region{--_stack-gap: var(--aeris-toast-gap, .75rem);--_stack-peek: var(--aeris-toast-stack-peek, .75rem);--_edge-offset: var(--aeris-toast-offset, 1rem);position:fixed;z-index:var(--aeris-z-toast, 1200);isolation:isolate;width:min(var(--aeris-toast-width, 24rem),100vw - var(--_edge-offset) - var(--_edge-offset) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}.aeris-toast__region[data-position$=left]{left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px))}.aeris-toast__region[data-position$=right]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px))}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__item{--_stack-scale: max(0, 1 - (var(--aeris-toast-stack-index, 0) * .1)) ;--_stack-shrink: calc(1 - var(--_stack-scale));--_rest-y: 0px;--_active-y: var(--_rest-y);--_active-scale: var(--_stack-scale);position:absolute;inset-inline:0;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));box-sizing:border-box;display:flex;height:var(--aeris-toast-front-height, var(--aeris-toast-height, 4.5rem));min-width:0;opacity:1;pointer-events:auto;will-change:transform;touch-action:none;-webkit-user-select:none;user-select:none;transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale));transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s,height .15s}.aeris-toast__region[data-position$=left] .aeris-toast__item{justify-content:flex-start}.aeris-toast__region[data-position$=right] .aeris-toast__item{justify-content:flex-end}.aeris-toast__region[data-position$=center] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{justify-content:center}.aeris-toast__item:after{position:absolute;inset-inline:0;top:100%;height:calc(var(--_stack-gap) + 1px);content:\"\"}.aeris-toast__region[data-position^=top] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek)) + (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );top:0;transform-origin:top center}.aeris-toast__region[data-position^=bottom] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek) * -1) - (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );bottom:0;transform-origin:bottom center}.aeris-toast__region[data-mode=stacked] .aeris-toast__item:not([data-primary]){pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__body[data-behind]{opacity:0}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=expanded] .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=expanded] .aeris-toast__item{--_active-y: calc( var(--aeris-toast-height-offset, 0px) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap)) );--_active-scale: 1}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__item{--_active-y: calc( (var(--aeris-toast-height-offset, 0px) * -1) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap) * -1) );--_active-scale: 1}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}.aeris-toast__item[data-swiping]{cursor:grabbing;transition:none}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=right],.aeris-toast__item--leaving[data-swipe-direction=right]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) + 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=left],.aeris-toast__item--leaving[data-swipe-direction=left]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) - 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=down],.aeris-toast__item--leaving[data-swipe-direction=down]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) + 150%)) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=up],.aeris-toast__item--leaving[data-swipe-direction=up]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) - 150%)) scale(var(--_active-scale))}.aeris-toast__region[data-position^=top] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item--leaving:not([data-swipe-direction]),.aeris-toast__region[data-position=center] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(150%)}.aeris-toast__item--leaving{pointer-events:none}.aeris-toast__region[data-position=center] .aeris-toast__item:is([data-swipe-dismissing],.aeris-toast__item--leaving){opacity:0}@starting-style{.aeris-toast__region[data-position^=top] .aeris-toast__item{transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{transform:translateY(150%)}}.aeris-toast__message{--_accent: var(--aeris-primary, #2c694b);--_icon-color: var(--_accent);--_toast-surface: color-mix( in srgb, var(--_accent) var(--aeris-toast-severity-tint, 9%), var(--aeris-surface, #fff) );--_toast-text: var(--aeris-text, #222222);--_toast-detail: var(--aeris-text-2, #555555);position:relative;box-sizing:border-box;width:fit-content;min-width:min(var(--aeris-toast-min-width, 12rem),100%);max-width:100%;height:100%;min-width:0;border:1px solid var(--aeris-toast-border-color, var(--_accent));border-radius:var(--aeris-radius-md, .75rem);background:var(--aeris-toast-background, var(--_toast-surface));color:var(--_toast-text);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));overflow:hidden;pointer-events:auto;transition:box-shadow .16s ease,border-color .16s ease}.aeris-toast__region[data-stack-width] .aeris-toast__message{width:100%}.aeris-toast__body{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:.75rem;padding:.875rem .875rem .875rem 1rem;transition:opacity .25s cubic-bezier(.22,1,.36,1)}.aeris-toast__body[data-icon-hidden]{grid-template-columns:minmax(0,1fr) auto}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]){position:relative;min-height:3rem;grid-template-columns:minmax(0,1fr);align-items:center;padding:.5rem 3rem .5rem .875rem}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__content{text-align:start}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__close{position:absolute;top:50%;inset-inline-end:.5rem;margin:0;transform:translateY(-50%)}.aeris-toast__message:hover,.aeris-toast__message:focus-within{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.aeris-toast__message[data-severity=primary]{--_accent: var(--aeris-primary, #2c694b)}.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-secondary, #52685b)}.aeris-toast__message[data-severity=success]{--_accent: var(--aeris-success, #6f8a68)}.aeris-toast__message[data-severity=info]{--_accent: var(--aeris-info, #6b8793)}.aeris-toast__message[data-severity=warning]{--_accent: var(--aeris-warning, #c38600)}.aeris-toast__message[data-severity=danger]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222);--_icon-color: var(--aeris-surface, #ffffff);--_toast-surface: var(--aeris-text, #222222);--_toast-text: var(--aeris-surface, #ffffff);--_toast-detail: var(--aeris-surface, #ffffff)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{transform:translate(-50%,-50%) rotate(-45deg)}.aeris-toast__content{min-width:0;display:grid;gap:.2rem}.aeris-toast__summary,.aeris-toast__detail{margin:0}.aeris-toast__summary{color:var(--_toast-text);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--_toast-detail);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--_toast-detail);cursor:pointer;transition:background-color .16s ease,color .16s ease}.aeris-toast__close:hover{background:color-mix(in srgb,var(--_toast-text) 10%,transparent);color:var(--_toast-text)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #2c432c);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{position:absolute;z-index:calc(var(--aeris-toast-stack-size, 1) + 1);left:50%;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;translate:-50% -50%;transition:opacity .15s ease,transform .15s ease}.aeris-toast__overflow--entering{animation:aeris-toast-overflow-enter .26s cubic-bezier(.16,1,.3,1) both}.aeris-toast__overflow--leaving{animation:aeris-toast-overflow-leave .16s ease-in both}.aeris-toast__region[data-position^=top] .aeris-toast__overflow{top:0}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{bottom:0;translate:-50% 50%}.aeris-toast__region[data-position=center] .aeris-toast__overflow{top:0}@keyframes aeris-toast-overflow-enter{0%{opacity:0;scale:.75}to{opacity:1;scale:1}}@keyframes aeris-toast-overflow-leave{to{opacity:0;scale:.8}}@media(max-width:36rem){.aeris-toast__region{--_edge-offset: var(--aeris-toast-mobile-offset, .5rem)}.aeris-toast__region[data-position]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px));left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px));width:auto;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}}@media(prefers-reduced-motion:reduce){.aeris-toast__item--leaving,.aeris-toast__overflow--entering,.aeris-toast__overflow--leaving{animation-duration:1ms}.aeris-toast__item,.aeris-toast__message,.aeris-toast__body,.aeris-toast__overflow,.aeris-toast__icon,.aeris-toast__content,.aeris-toast__close{transition:none}}\n"],
807
+ dependencies: [{
808
+ kind: "directive",
809
+ type: NgTemplateOutlet,
810
+ selector: "[ngTemplateOutlet]",
811
+ inputs: [
812
+ "ngTemplateOutletContext",
813
+ "ngTemplateOutlet",
814
+ "ngTemplateOutletInjector"
815
+ ]
816
+ }]
817
+ });
818
+ };
819
+ i0.ɵɵngDeclareClassMetadata({
820
+ minVersion: "12.0.0",
821
+ version: "22.2.1",
822
+ ngImport: i0,
823
+ type: AerisToast,
824
+ decorators: [{
825
+ type: Component,
826
+ args: [{
827
+ selector: "aeris-toast",
828
+ imports: [NgTemplateOutlet],
829
+ template: `
713
830
  <section
714
831
  class="aeris-toast__region"
715
832
  [attr.aria-label]="hasVisibleMessages() ? ariaLabel() : null"
@@ -820,20 +937,143 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
820
937
  </span>
821
938
  }
822
939
  </section>
823
- `, host: {
824
- class: 'aeris-toast',
825
- '[attr.data-position]': 'position()',
826
- }, styles: [":host{display:contents}.aeris-toast__region{--_stack-gap: var(--aeris-toast-gap, .75rem);--_stack-peek: var(--aeris-toast-stack-peek, .75rem);--_edge-offset: var(--aeris-toast-offset, 1rem);position:fixed;z-index:var(--aeris-z-toast, 1200);isolation:isolate;width:min(var(--aeris-toast-width, 24rem),100vw - var(--_edge-offset) - var(--_edge-offset) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}.aeris-toast__region[data-position$=left]{left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px))}.aeris-toast__region[data-position$=right]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px))}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__item{--_stack-scale: max(0, 1 - (var(--aeris-toast-stack-index, 0) * .1)) ;--_stack-shrink: calc(1 - var(--_stack-scale));--_rest-y: 0px;--_active-y: var(--_rest-y);--_active-scale: var(--_stack-scale);position:absolute;inset-inline:0;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));box-sizing:border-box;display:flex;height:var(--aeris-toast-front-height, var(--aeris-toast-height, 4.5rem));min-width:0;opacity:1;pointer-events:auto;will-change:transform;touch-action:none;-webkit-user-select:none;user-select:none;transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale));transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s,height .15s}.aeris-toast__region[data-position$=left] .aeris-toast__item{justify-content:flex-start}.aeris-toast__region[data-position$=right] .aeris-toast__item{justify-content:flex-end}.aeris-toast__region[data-position$=center] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{justify-content:center}.aeris-toast__item:after{position:absolute;inset-inline:0;top:100%;height:calc(var(--_stack-gap) + 1px);content:\"\"}.aeris-toast__region[data-position^=top] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek)) + (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );top:0;transform-origin:top center}.aeris-toast__region[data-position^=bottom] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek) * -1) - (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );bottom:0;transform-origin:bottom center}.aeris-toast__region[data-mode=stacked] .aeris-toast__item:not([data-primary]){pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__body[data-behind]{opacity:0}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=expanded] .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=expanded] .aeris-toast__item{--_active-y: calc( var(--aeris-toast-height-offset, 0px) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap)) );--_active-scale: 1}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__item{--_active-y: calc( (var(--aeris-toast-height-offset, 0px) * -1) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap) * -1) );--_active-scale: 1}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}.aeris-toast__item[data-swiping]{cursor:grabbing;transition:none}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=right],.aeris-toast__item--leaving[data-swipe-direction=right]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) + 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=left],.aeris-toast__item--leaving[data-swipe-direction=left]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) - 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=down],.aeris-toast__item--leaving[data-swipe-direction=down]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) + 150%)) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=up],.aeris-toast__item--leaving[data-swipe-direction=up]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) - 150%)) scale(var(--_active-scale))}.aeris-toast__region[data-position^=top] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item--leaving:not([data-swipe-direction]),.aeris-toast__region[data-position=center] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(150%)}.aeris-toast__item--leaving{pointer-events:none}.aeris-toast__region[data-position=center] .aeris-toast__item:is([data-swipe-dismissing],.aeris-toast__item--leaving){opacity:0}@starting-style{.aeris-toast__region[data-position^=top] .aeris-toast__item{transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{transform:translateY(150%)}}.aeris-toast__message{--_accent: var(--aeris-primary, #5f6f36);--_icon-color: var(--_accent);--_toast-surface: color-mix( in srgb, var(--_accent) var(--aeris-toast-severity-tint, 9%), var(--aeris-surface, #fff) );--_toast-text: var(--aeris-text, #222222);--_toast-detail: var(--aeris-text-2, #555555);position:relative;box-sizing:border-box;width:fit-content;min-width:min(var(--aeris-toast-min-width, 12rem),100%);max-width:100%;height:100%;min-width:0;border:1px solid var(--aeris-toast-border-color, var(--_accent));border-radius:var(--aeris-radius-md, .75rem);background:var(--aeris-toast-background, var(--_toast-surface));color:var(--_toast-text);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));overflow:hidden;pointer-events:auto;transition:box-shadow .16s ease,border-color .16s ease}.aeris-toast__region[data-stack-width] .aeris-toast__message{width:100%}.aeris-toast__body{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:.75rem;padding:.875rem .875rem .875rem 1rem;transition:opacity .25s cubic-bezier(.22,1,.36,1)}.aeris-toast__body[data-icon-hidden]{grid-template-columns:minmax(0,1fr) auto}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]){position:relative;min-height:3rem;grid-template-columns:minmax(0,1fr);align-items:center;padding:.5rem 3rem .5rem .875rem}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__content{text-align:start}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__close{position:absolute;top:50%;inset-inline-end:.5rem;margin:0;transform:translateY(-50%)}.aeris-toast__message:hover,.aeris-toast__message:focus-within{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.aeris-toast__message[data-severity=primary]{--_accent: var(--aeris-primary, #5f6f36)}.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-secondary, #b75e26)}.aeris-toast__message[data-severity=success]{--_accent: var(--aeris-success, #6f8a68)}.aeris-toast__message[data-severity=info]{--_accent: var(--aeris-info, #6b8793)}.aeris-toast__message[data-severity=warning]{--_accent: var(--aeris-warning, #c38600)}.aeris-toast__message[data-severity=danger]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222);--_icon-color: var(--aeris-surface, #ffffff);--_toast-surface: var(--aeris-text, #222222);--_toast-text: var(--aeris-surface, #ffffff);--_toast-detail: var(--aeris-surface, #ffffff)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{transform:translate(-50%,-50%) rotate(-45deg)}.aeris-toast__content{min-width:0;display:grid;gap:.2rem}.aeris-toast__summary,.aeris-toast__detail{margin:0}.aeris-toast__summary{color:var(--_toast-text);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--_toast-detail);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--_toast-detail);cursor:pointer;transition:background-color .16s ease,color .16s ease}.aeris-toast__close:hover{background:color-mix(in srgb,var(--_toast-text) 10%,transparent);color:var(--_toast-text)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #3b4729);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{position:absolute;z-index:calc(var(--aeris-toast-stack-size, 1) + 1);left:50%;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;translate:-50% -50%;transition:opacity .15s ease,transform .15s ease}.aeris-toast__overflow--entering{animation:aeris-toast-overflow-enter .26s cubic-bezier(.16,1,.3,1) both}.aeris-toast__overflow--leaving{animation:aeris-toast-overflow-leave .16s ease-in both}.aeris-toast__region[data-position^=top] .aeris-toast__overflow{top:0}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{bottom:0;translate:-50% 50%}.aeris-toast__region[data-position=center] .aeris-toast__overflow{top:0}@keyframes aeris-toast-overflow-enter{0%{opacity:0;scale:.75}to{opacity:1;scale:1}}@keyframes aeris-toast-overflow-leave{to{opacity:0;scale:.8}}@media(max-width:36rem){.aeris-toast__region{--_edge-offset: var(--aeris-toast-mobile-offset, .5rem)}.aeris-toast__region[data-position]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px));left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px));width:auto;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}}@media(prefers-reduced-motion:reduce){.aeris-toast__item--leaving,.aeris-toast__overflow--entering,.aeris-toast__overflow--leaving{animation-duration:1ms}.aeris-toast__item,.aeris-toast__message,.aeris-toast__body,.aeris-toast__overflow,.aeris-toast__icon,.aeris-toast__content,.aeris-toast__close{transition:none}}\n"] }]
827
- }], ctorParameters: () => [], propDecorators: { messageElements: [{ type: i0.ViewChildren, args: ['toastMessage', { isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisToastContentTemplate), { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisToastIconTemplate), { isSignal: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], visibleCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleCount", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], newestOnTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "newestOnTop", required: false }] }], pauseOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "pauseOnHover", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], swipeDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeDirection", required: false }] }], swipeThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeThreshold", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
940
+ `,
941
+ host: {
942
+ class: "aeris-toast",
943
+ "[attr.data-position]": "position()"
944
+ },
945
+ styles: [":host{display:contents}.aeris-toast__region{--_stack-gap: var(--aeris-toast-gap, .75rem);--_stack-peek: var(--aeris-toast-stack-peek, .75rem);--_edge-offset: var(--aeris-toast-offset, 1rem);position:fixed;z-index:var(--aeris-z-toast, 1200);isolation:isolate;width:min(var(--aeris-toast-width, 24rem),100vw - var(--_edge-offset) - var(--_edge-offset) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}.aeris-toast__region[data-position$=left]{left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px))}.aeris-toast__region[data-position$=right]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px))}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__item{--_stack-scale: max(0, 1 - (var(--aeris-toast-stack-index, 0) * .1)) ;--_stack-shrink: calc(1 - var(--_stack-scale));--_rest-y: 0px;--_active-y: var(--_rest-y);--_active-scale: var(--_stack-scale);position:absolute;inset-inline:0;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));box-sizing:border-box;display:flex;height:var(--aeris-toast-front-height, var(--aeris-toast-height, 4.5rem));min-width:0;opacity:1;pointer-events:auto;will-change:transform;touch-action:none;-webkit-user-select:none;user-select:none;transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale));transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s,height .15s}.aeris-toast__region[data-position$=left] .aeris-toast__item{justify-content:flex-start}.aeris-toast__region[data-position$=right] .aeris-toast__item{justify-content:flex-end}.aeris-toast__region[data-position$=center] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{justify-content:center}.aeris-toast__item:after{position:absolute;inset-inline:0;top:100%;height:calc(var(--_stack-gap) + 1px);content:\"\"}.aeris-toast__region[data-position^=top] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek)) + (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );top:0;transform-origin:top center}.aeris-toast__region[data-position^=bottom] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek) * -1) - (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );bottom:0;transform-origin:bottom center}.aeris-toast__region[data-mode=stacked] .aeris-toast__item:not([data-primary]){pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__body[data-behind]{opacity:0}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=expanded] .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=expanded] .aeris-toast__item{--_active-y: calc( var(--aeris-toast-height-offset, 0px) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap)) );--_active-scale: 1}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__item{--_active-y: calc( (var(--aeris-toast-height-offset, 0px) * -1) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap) * -1) );--_active-scale: 1}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}.aeris-toast__item[data-swiping]{cursor:grabbing;transition:none}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=right],.aeris-toast__item--leaving[data-swipe-direction=right]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) + 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=left],.aeris-toast__item--leaving[data-swipe-direction=left]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) - 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=down],.aeris-toast__item--leaving[data-swipe-direction=down]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) + 150%)) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=up],.aeris-toast__item--leaving[data-swipe-direction=up]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) - 150%)) scale(var(--_active-scale))}.aeris-toast__region[data-position^=top] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item--leaving:not([data-swipe-direction]),.aeris-toast__region[data-position=center] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(150%)}.aeris-toast__item--leaving{pointer-events:none}.aeris-toast__region[data-position=center] .aeris-toast__item:is([data-swipe-dismissing],.aeris-toast__item--leaving){opacity:0}@starting-style{.aeris-toast__region[data-position^=top] .aeris-toast__item{transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{transform:translateY(150%)}}.aeris-toast__message{--_accent: var(--aeris-primary, #2c694b);--_icon-color: var(--_accent);--_toast-surface: color-mix( in srgb, var(--_accent) var(--aeris-toast-severity-tint, 9%), var(--aeris-surface, #fff) );--_toast-text: var(--aeris-text, #222222);--_toast-detail: var(--aeris-text-2, #555555);position:relative;box-sizing:border-box;width:fit-content;min-width:min(var(--aeris-toast-min-width, 12rem),100%);max-width:100%;height:100%;min-width:0;border:1px solid var(--aeris-toast-border-color, var(--_accent));border-radius:var(--aeris-radius-md, .75rem);background:var(--aeris-toast-background, var(--_toast-surface));color:var(--_toast-text);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));overflow:hidden;pointer-events:auto;transition:box-shadow .16s ease,border-color .16s ease}.aeris-toast__region[data-stack-width] .aeris-toast__message{width:100%}.aeris-toast__body{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:.75rem;padding:.875rem .875rem .875rem 1rem;transition:opacity .25s cubic-bezier(.22,1,.36,1)}.aeris-toast__body[data-icon-hidden]{grid-template-columns:minmax(0,1fr) auto}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]){position:relative;min-height:3rem;grid-template-columns:minmax(0,1fr);align-items:center;padding:.5rem 3rem .5rem .875rem}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__content{text-align:start}.aeris-toast__body[data-icon-hidden]:not([data-has-summary]):not([data-custom-content]) .aeris-toast__close{position:absolute;top:50%;inset-inline-end:.5rem;margin:0;transform:translateY(-50%)}.aeris-toast__message:hover,.aeris-toast__message:focus-within{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.aeris-toast__message[data-severity=primary]{--_accent: var(--aeris-primary, #2c694b)}.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-secondary, #52685b)}.aeris-toast__message[data-severity=success]{--_accent: var(--aeris-success, #6f8a68)}.aeris-toast__message[data-severity=info]{--_accent: var(--aeris-info, #6b8793)}.aeris-toast__message[data-severity=warning]{--_accent: var(--aeris-warning, #c38600)}.aeris-toast__message[data-severity=danger]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222);--_icon-color: var(--aeris-surface, #ffffff);--_toast-surface: var(--aeris-text, #222222);--_toast-text: var(--aeris-surface, #ffffff);--_toast-detail: var(--aeris-surface, #ffffff)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=danger] .aeris-toast__default-icon:after{transform:translate(-50%,-50%) rotate(-45deg)}.aeris-toast__content{min-width:0;display:grid;gap:.2rem}.aeris-toast__summary,.aeris-toast__detail{margin:0}.aeris-toast__summary{color:var(--_toast-text);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--_toast-detail);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--_toast-detail);cursor:pointer;transition:background-color .16s ease,color .16s ease}.aeris-toast__close:hover{background:color-mix(in srgb,var(--_toast-text) 10%,transparent);color:var(--_toast-text)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #2c432c);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{position:absolute;z-index:calc(var(--aeris-toast-stack-size, 1) + 1);left:50%;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;translate:-50% -50%;transition:opacity .15s ease,transform .15s ease}.aeris-toast__overflow--entering{animation:aeris-toast-overflow-enter .26s cubic-bezier(.16,1,.3,1) both}.aeris-toast__overflow--leaving{animation:aeris-toast-overflow-leave .16s ease-in both}.aeris-toast__region[data-position^=top] .aeris-toast__overflow{top:0}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{bottom:0;translate:-50% 50%}.aeris-toast__region[data-position=center] .aeris-toast__overflow{top:0}@keyframes aeris-toast-overflow-enter{0%{opacity:0;scale:.75}to{opacity:1;scale:1}}@keyframes aeris-toast-overflow-leave{to{opacity:0;scale:.8}}@media(max-width:36rem){.aeris-toast__region{--_edge-offset: var(--aeris-toast-mobile-offset, .5rem)}.aeris-toast__region[data-position]{right:calc(var(--_edge-offset) + env(safe-area-inset-right,0px));left:calc(var(--_edge-offset) + env(safe-area-inset-left,0px));width:auto;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:calc(var(--_edge-offset) + env(safe-area-inset-top,0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + env(safe-area-inset-bottom,0px))}}@media(prefers-reduced-motion:reduce){.aeris-toast__item--leaving,.aeris-toast__overflow--entering,.aeris-toast__overflow--leaving{animation-duration:1ms}.aeris-toast__item,.aeris-toast__message,.aeris-toast__body,.aeris-toast__overflow,.aeris-toast__icon,.aeris-toast__content,.aeris-toast__close{transition:none}}\n"]
946
+ }]
947
+ }],
948
+ ctorParameters: () => [],
949
+ propDecorators: {
950
+ messageElements: [{
951
+ type: i0.ViewChildren,
952
+ args: ["toastMessage", { isSignal: true }]
953
+ }],
954
+ contentTemplate: [{
955
+ type: i0.ContentChild,
956
+ args: [i0.forwardRef(() => AerisToastContentTemplate), { isSignal: true }]
957
+ }],
958
+ iconTemplate: [{
959
+ type: i0.ContentChild,
960
+ args: [i0.forwardRef(() => AerisToastIconTemplate), { isSignal: true }]
961
+ }],
962
+ position: [{
963
+ type: i0.Input,
964
+ args: [{
965
+ isSignal: true,
966
+ alias: "position",
967
+ required: false
968
+ }]
969
+ }],
970
+ group: [{
971
+ type: i0.Input,
972
+ args: [{
973
+ isSignal: true,
974
+ alias: "group",
975
+ required: false
976
+ }]
977
+ }],
978
+ mode: [{
979
+ type: i0.Input,
980
+ args: [{
981
+ isSignal: true,
982
+ alias: "mode",
983
+ required: false
984
+ }]
985
+ }],
986
+ visibleCount: [{
987
+ type: i0.Input,
988
+ args: [{
989
+ isSignal: true,
990
+ alias: "visibleCount",
991
+ required: false
992
+ }]
993
+ }],
994
+ limit: [{
995
+ type: i0.Input,
996
+ args: [{
997
+ isSignal: true,
998
+ alias: "limit",
999
+ required: false
1000
+ }]
1001
+ }],
1002
+ newestOnTop: [{
1003
+ type: i0.Input,
1004
+ args: [{
1005
+ isSignal: true,
1006
+ alias: "newestOnTop",
1007
+ required: false
1008
+ }]
1009
+ }],
1010
+ pauseOnHover: [{
1011
+ type: i0.Input,
1012
+ args: [{
1013
+ isSignal: true,
1014
+ alias: "pauseOnHover",
1015
+ required: false
1016
+ }]
1017
+ }],
1018
+ showIcon: [{
1019
+ type: i0.Input,
1020
+ args: [{
1021
+ isSignal: true,
1022
+ alias: "showIcon",
1023
+ required: false
1024
+ }]
1025
+ }],
1026
+ showClose: [{
1027
+ type: i0.Input,
1028
+ args: [{
1029
+ isSignal: true,
1030
+ alias: "showClose",
1031
+ required: false
1032
+ }]
1033
+ }],
1034
+ swipeDirection: [{
1035
+ type: i0.Input,
1036
+ args: [{
1037
+ isSignal: true,
1038
+ alias: "swipeDirection",
1039
+ required: false
1040
+ }]
1041
+ }],
1042
+ swipeThreshold: [{
1043
+ type: i0.Input,
1044
+ args: [{
1045
+ isSignal: true,
1046
+ alias: "swipeThreshold",
1047
+ required: false
1048
+ }]
1049
+ }],
1050
+ ariaLabel: [{
1051
+ type: i0.Input,
1052
+ args: [{
1053
+ isSignal: true,
1054
+ alias: "ariaLabel",
1055
+ required: false
1056
+ }]
1057
+ }],
1058
+ closeAriaLabel: [{
1059
+ type: i0.Input,
1060
+ args: [{
1061
+ isSignal: true,
1062
+ alias: "closeAriaLabel",
1063
+ required: false
1064
+ }]
1065
+ }],
1066
+ closed: [{
1067
+ type: i0.Output,
1068
+ args: ["closed"]
1069
+ }]
1070
+ }
1071
+ });
828
1072
  const AerisToastModule = [
829
- AerisToast,
830
- AerisToastContentTemplate,
831
- AerisToastIconTemplate,
1073
+ AerisToast,
1074
+ AerisToastContentTemplate,
1075
+ AerisToastIconTemplate
832
1076
  ];
833
-
834
- /**
835
- * Generated bundle index. Do not edit.
836
- */
837
-
838
1077
  export { AerisToast, AerisToastContentTemplate, AerisToastIconTemplate, AerisToastModule, AerisToastService };
839
- //# sourceMappingURL=aeris-ui-core-toast.mjs.map
1078
+
1079
+ //# sourceMappingURL=aeris-ui-core-toast.mjs.map