@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.10
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.
- package/README.md +200 -191
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1228 -446
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +209 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +581 -189
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +741 -139
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +773 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1171 -521
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +440 -140
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +637 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +1340 -700
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +823 -318
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1404 -555
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1471 -740
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +918 -443
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1942 -1123
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1079 -346
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1015 -322
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +410 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +967 -587
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1379 -522
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2446 -1117
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +658 -255
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +926 -291
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +625 -158
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +613 -382
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1062 -472
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +994 -393
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +623 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1598 -561
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +592 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +485 -199
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +428 -123
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +925 -249
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +912 -375
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +394 -124
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +226 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1845 -648
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +861 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +955 -266
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2034 -869
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +789 -279
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +856 -219
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1284 -1399
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +909 -441
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1076 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1453 -621
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2019 -940
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1107 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +985 -316
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +6 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +10 -4
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +28 -5
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +2 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +22 -8
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +12 -4
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +7 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +49 -33
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +412 -125
- package/styles/controls.css +61 -29
- package/tools/aeris-theme.mjs +2 -2
- package/tools/aeris-theme.schema.json +5 -2
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +327 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +201 -117
- package/types/aeris-ui-core-cascade-select.d.ts +257 -123
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -54
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +188 -0
- package/types/aeris-ui-core-color-picker.d.ts +348 -143
- package/types/aeris-ui-core-compare.d.ts +224 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +442 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +264 -146
- package/types/aeris-ui-core-date-picker.d.ts +489 -217
- package/types/aeris-ui-core-dialog.d.ts +288 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +158 -137
- package/types/aeris-ui-core-editor.d.ts +250 -123
- package/types/aeris-ui-core-file-upload.d.ts +367 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +588 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +194 -69
- package/types/aeris-ui-core-input-number.d.ts +272 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +185 -60
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +175 -121
- package/types/aeris-ui-core-menu.d.ts +277 -168
- package/types/aeris-ui-core-menubar.d.ts +273 -135
- package/types/aeris-ui-core-message.d.ts +132 -60
- package/types/aeris-ui-core-meter-group.d.ts +163 -90
- package/types/aeris-ui-core-multi-select.d.ts +439 -180
- package/types/aeris-ui-core-order-list.d.ts +144 -66
- package/types/aeris-ui-core-organization-chart.d.ts +133 -77
- package/types/aeris-ui-core-paginator.d.ts +93 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +258 -102
- package/types/aeris-ui-core-pick-list.d.ts +374 -179
- package/types/aeris-ui-core-popover.d.ts +219 -105
- package/types/aeris-ui-core-progress-bar.d.ts +157 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +66 -29
- package/types/aeris-ui-core-select.d.ts +475 -217
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +225 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +596 -304
- package/types/aeris-ui-core-tabs.d.ts +181 -76
- package/types/aeris-ui-core-textarea.d.ts +261 -78
- package/types/aeris-ui-core-theme-builder.d.ts +472 -450
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +251 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +225 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +364 -171
- package/types/aeris-ui-core-tree-table.d.ts +566 -286
- package/types/aeris-ui-core-tree.d.ts +270 -165
- package/types/aeris-ui-core.d.ts +197 -72
|
@@ -1,266 +1,762 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
i0.ɵɵ
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
import { DOCUMENT, 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, viewChild, viewChildren } from "@angular/core";
|
|
4
|
+
import { aerisInternalCreateFrameScheduler, aerisInternalObserveViewport } 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.2",
|
|
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.2",
|
|
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.2",
|
|
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.2",
|
|
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.2",
|
|
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.2",
|
|
68
|
+
ngImport: i0,
|
|
69
|
+
type: AerisToastIconTemplate,
|
|
70
|
+
decorators: [{
|
|
71
|
+
type: Directive,
|
|
72
|
+
args: [{ selector: "ng-template[aerisToastIcon]" }]
|
|
73
|
+
}]
|
|
74
|
+
});
|
|
38
75
|
let nextToastId = 0;
|
|
39
|
-
class AerisToastService {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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.2",
|
|
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.2",
|
|
188
|
+
ngImport: i0,
|
|
189
|
+
type: AerisToastService
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
193
|
+
minVersion: "12.0.0",
|
|
194
|
+
version: "22.2.2",
|
|
195
|
+
ngImport: i0,
|
|
196
|
+
type: AerisToastService,
|
|
197
|
+
decorators: [{ type: Service }]
|
|
198
|
+
});
|
|
199
|
+
var AerisToast = class AerisToast {
|
|
200
|
+
toastRegion = viewChild("toastRegion", ...ngDevMode ? [{ debugName: "toastRegion" }] : /* istanbul ignore next */ []);
|
|
201
|
+
static fallbackHeight = 72;
|
|
202
|
+
static swipeRemovalDelay = 550;
|
|
203
|
+
static reverseCancelThreshold = 10;
|
|
204
|
+
static minimumDragThreshold = 1;
|
|
205
|
+
toastService = inject(AerisToastService);
|
|
206
|
+
destroyRef = inject(DestroyRef);
|
|
207
|
+
messageElements = viewChildren("toastMessage", ...ngDevMode ? [{ debugName: "messageElements" }] : /* istanbul ignore next */ []);
|
|
208
|
+
measuredHeights = signal({}, ...ngDevMode ? [{ debugName: "measuredHeights" }] : /* istanbul ignore next */ []);
|
|
209
|
+
swipeVisuals = signal({}, ...ngDevMode ? [{ debugName: "swipeVisuals" }] : /* istanbul ignore next */ []);
|
|
210
|
+
swipeCleanupTimers = /* @__PURE__ */ new Map();
|
|
211
|
+
pendingSwipeRemovals = /* @__PURE__ */ new Map();
|
|
212
|
+
measureFrame = aerisInternalCreateFrameScheduler(() => this.measureMessages());
|
|
213
|
+
swipeFrame = aerisInternalCreateFrameScheduler(() => this.flushSwipeVisual());
|
|
214
|
+
swipeSession = null;
|
|
215
|
+
contentTemplate = contentChild(AerisToastContentTemplate, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
216
|
+
iconTemplate = contentChild(AerisToastIconTemplate, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
|
|
217
|
+
position = input("bottom-right", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
218
|
+
group = input("", ...ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []);
|
|
219
|
+
mode = input("stacked", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
220
|
+
visibleCount = input(4, {
|
|
221
|
+
...ngDevMode ? { debugName: "visibleCount" } : /* istanbul ignore next */ {},
|
|
222
|
+
transform: numberAttribute
|
|
223
|
+
});
|
|
224
|
+
limit = input(void 0, {
|
|
225
|
+
...ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {},
|
|
226
|
+
transform: numberAttribute
|
|
227
|
+
});
|
|
228
|
+
newestOnTop = input(true, {
|
|
229
|
+
...ngDevMode ? { debugName: "newestOnTop" } : /* istanbul ignore next */ {},
|
|
230
|
+
transform: booleanAttribute
|
|
231
|
+
});
|
|
232
|
+
pauseOnHover = input(true, {
|
|
233
|
+
...ngDevMode ? { debugName: "pauseOnHover" } : /* istanbul ignore next */ {},
|
|
234
|
+
transform: booleanAttribute
|
|
235
|
+
});
|
|
236
|
+
showIcon = input(true, {
|
|
237
|
+
...ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {},
|
|
238
|
+
transform: booleanAttribute
|
|
239
|
+
});
|
|
240
|
+
showClose = input(true, {
|
|
241
|
+
...ngDevMode ? { debugName: "showClose" } : /* istanbul ignore next */ {},
|
|
242
|
+
transform: booleanAttribute
|
|
243
|
+
});
|
|
244
|
+
swipeDirection = input(["down", "right"], ...ngDevMode ? [{ debugName: "swipeDirection" }] : /* istanbul ignore next */ []);
|
|
245
|
+
swipeThreshold = input(40, {
|
|
246
|
+
...ngDevMode ? { debugName: "swipeThreshold" } : /* istanbul ignore next */ {},
|
|
247
|
+
transform: numberAttribute
|
|
248
|
+
});
|
|
249
|
+
ariaLabel = input("Notifications", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
250
|
+
closeAriaLabel = input("Close notification", ...ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []);
|
|
251
|
+
closed = output();
|
|
252
|
+
stackHovered = signal(false, ...ngDevMode ? [{ debugName: "stackHovered" }] : /* istanbul ignore next */ []);
|
|
253
|
+
touchExpanded = signal(false, ...ngDevMode ? [{ debugName: "touchExpanded" }] : /* istanbul ignore next */ []);
|
|
254
|
+
presentationMode = computed(() => this.mode() === "expanded" || this.touchExpanded() ? "expanded" : "stacked", ...ngDevMode ? [{ debugName: "presentationMode" }] : /* istanbul ignore next */ []);
|
|
255
|
+
interactionPaused = computed(() => this.pauseOnHover() && (this.stackHovered() || this.touchExpanded()), ...ngDevMode ? [{ debugName: "interactionPaused" }] : /* istanbul ignore next */ []);
|
|
256
|
+
resolvedSwipeDirections = computed(() => {
|
|
257
|
+
const value = this.swipeDirection();
|
|
258
|
+
return [...new Set(Array.isArray(value) ? value : [value])].filter((direction) => direction === "up" || direction === "down" || direction === "left" || direction === "right");
|
|
259
|
+
}, ...ngDevMode ? [{ debugName: "resolvedSwipeDirections" }] : /* istanbul ignore next */ []);
|
|
260
|
+
resolvedSwipeThreshold = computed(() => {
|
|
261
|
+
const threshold = this.swipeThreshold();
|
|
262
|
+
return Number.isFinite(threshold) && threshold >= 0 ? threshold : 40;
|
|
263
|
+
}, ...ngDevMode ? [{ debugName: "resolvedSwipeThreshold" }] : /* istanbul ignore next */ []);
|
|
264
|
+
orderedMessages = computed(() => {
|
|
265
|
+
const group = this.group();
|
|
266
|
+
const filtered = this.toastService.messages().filter((message) => message.group === group);
|
|
267
|
+
return this.newestOnTop() ? [...filtered].reverse() : filtered;
|
|
268
|
+
}, ...ngDevMode ? [{ debugName: "orderedMessages" }] : /* istanbul ignore next */ []);
|
|
269
|
+
effectiveVisibleCount = computed(() => {
|
|
270
|
+
const limit = this.limit();
|
|
271
|
+
const visibleCount = this.visibleCount();
|
|
272
|
+
const count = typeof limit === "number" && Number.isFinite(limit) ? limit : typeof visibleCount === "number" && Number.isFinite(visibleCount) ? visibleCount : 4;
|
|
273
|
+
return Number.isFinite(count) && count > 0 ? Math.floor(count) : 4;
|
|
274
|
+
}, ...ngDevMode ? [{ debugName: "effectiveVisibleCount" }] : /* istanbul ignore next */ []);
|
|
275
|
+
visibleMessages = computed(() => this.orderedMessages().slice(0, this.effectiveVisibleCount()), ...ngDevMode ? [{ debugName: "visibleMessages" }] : /* istanbul ignore next */ []);
|
|
276
|
+
hiddenCount = computed(() => Math.max(0, this.orderedMessages().length - this.visibleMessages().length), ...ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []);
|
|
277
|
+
visibleStackSize = computed(() => `${this.visibleMessages().length}`, ...ngDevMode ? [{ debugName: "visibleStackSize" }] : /* istanbul ignore next */ []);
|
|
278
|
+
hasVisibleMessages = computed(() => this.visibleMessages().length > 0, ...ngDevMode ? [{ debugName: "hasVisibleMessages" }] : /* istanbul ignore next */ []);
|
|
279
|
+
stackWidthLocked = signal(false, ...ngDevMode ? [{ debugName: "stackWidthLocked" }] : /* istanbul ignore next */ []);
|
|
280
|
+
visibleStack = computed(() => {
|
|
281
|
+
const messages = this.visibleMessages();
|
|
282
|
+
const heights = this.measuredHeights();
|
|
283
|
+
const swipeVisuals = this.swipeVisuals();
|
|
284
|
+
const frontHeight = messages[0] ? heights[messages[0].id] ?? AerisToast.fallbackHeight : AerisToast.fallbackHeight;
|
|
285
|
+
let heightOffset = 0;
|
|
286
|
+
return messages.map((message, stackIndex) => {
|
|
287
|
+
const height = heights[message.id] ?? AerisToast.fallbackHeight;
|
|
288
|
+
const swipe = swipeVisuals[message.id];
|
|
289
|
+
const item = {
|
|
290
|
+
message,
|
|
291
|
+
stackIndex,
|
|
292
|
+
stackIndexValue: `${stackIndex}`,
|
|
293
|
+
stackSizeValue: `${messages.length}`,
|
|
294
|
+
heightValue: `${height}px`,
|
|
295
|
+
frontHeightValue: `${frontHeight}px`,
|
|
296
|
+
heightOffsetValue: `${heightOffset}px`,
|
|
297
|
+
primary: stackIndex === 0,
|
|
298
|
+
swipeXValue: `${swipe?.x ?? 0}px`,
|
|
299
|
+
swipeYValue: `${swipe?.y ?? 0}px`,
|
|
300
|
+
swipeDirection: swipe?.direction,
|
|
301
|
+
swiping: swipe?.phase === "dragging",
|
|
302
|
+
swipeDismissing: swipe?.phase === "dismissing"
|
|
303
|
+
};
|
|
304
|
+
heightOffset += height;
|
|
305
|
+
return item;
|
|
306
|
+
});
|
|
307
|
+
}, ...ngDevMode ? [{ debugName: "visibleStack" }] : /* istanbul ignore next */ []);
|
|
308
|
+
templateContexts = computed(() => {
|
|
309
|
+
const contexts = {};
|
|
310
|
+
for (const message of this.visibleMessages()) contexts[message.id] = {
|
|
311
|
+
$implicit: message,
|
|
312
|
+
message,
|
|
313
|
+
close: () => this.close(message)
|
|
314
|
+
};
|
|
315
|
+
return contexts;
|
|
316
|
+
}, ...ngDevMode ? [{ debugName: "templateContexts" }] : /* istanbul ignore next */ []);
|
|
317
|
+
constructor() {
|
|
318
|
+
const document = inject(DOCUMENT);
|
|
319
|
+
effect((onCleanup) => {
|
|
320
|
+
const region = this.toastRegion()?.nativeElement;
|
|
321
|
+
if (region && this.hasVisibleMessages()) onCleanup(aerisInternalObserveViewport(region, document));
|
|
322
|
+
});
|
|
323
|
+
effect(() => {
|
|
324
|
+
const visibleCount = this.visibleMessages().length;
|
|
325
|
+
if (visibleCount > 1) this.stackWidthLocked.set(true);
|
|
326
|
+
else if (visibleCount === 0) {
|
|
327
|
+
this.stackWidthLocked.set(false);
|
|
328
|
+
this.touchExpanded.set(false);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
effect((onCleanup) => {
|
|
332
|
+
const elements = this.messageElements().map((element) => element.nativeElement);
|
|
333
|
+
this.measureFrame.schedule();
|
|
334
|
+
if (typeof globalThis.ResizeObserver !== "function") return;
|
|
335
|
+
const observer = new ResizeObserver(() => this.measureFrame.schedule());
|
|
336
|
+
for (const element of elements) observer.observe(element);
|
|
337
|
+
onCleanup(() => {
|
|
338
|
+
observer.disconnect();
|
|
339
|
+
this.measureFrame.cancel();
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
effect((onCleanup) => {
|
|
343
|
+
const group = this.group();
|
|
344
|
+
const subscription = this.toastService.closed.subscribe((event) => {
|
|
345
|
+
if (event.message.group !== group) return;
|
|
346
|
+
this.closed.emit(event);
|
|
347
|
+
});
|
|
348
|
+
onCleanup(() => subscription.unsubscribe());
|
|
349
|
+
});
|
|
350
|
+
effect(() => {
|
|
351
|
+
const visibleIds = new Set(this.visibleMessages().map((message) => message.id));
|
|
352
|
+
const gestureIds = new Set(Object.keys(this.swipeVisuals()));
|
|
353
|
+
const pauseVisible = this.interactionPaused();
|
|
354
|
+
for (const message of this.orderedMessages()) if (visibleIds.has(message.id) && !pauseVisible && !gestureIds.has(message.id)) this.toastService.resume(message.id);
|
|
355
|
+
else this.toastService.pause(message.id);
|
|
356
|
+
});
|
|
357
|
+
this.destroyRef.onDestroy(() => {
|
|
358
|
+
this.measureFrame.cancel();
|
|
359
|
+
this.swipeFrame.cancel();
|
|
360
|
+
for (const cancel of this.pendingSwipeRemovals.values()) cancel();
|
|
361
|
+
for (const timer of this.swipeCleanupTimers.values()) globalThis.clearTimeout(timer);
|
|
362
|
+
this.pendingSwipeRemovals.clear();
|
|
363
|
+
this.swipeCleanupTimers.clear();
|
|
364
|
+
this.swipeSession = null;
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
close(message) {
|
|
368
|
+
this.toastService.remove(message.id, "close-button");
|
|
369
|
+
}
|
|
370
|
+
pauseVisible() {
|
|
371
|
+
this.stackHovered.set(true);
|
|
372
|
+
if (!this.pauseOnHover()) return;
|
|
373
|
+
for (const message of this.visibleMessages()) this.toastService.pause(message.id);
|
|
374
|
+
}
|
|
375
|
+
resumeVisible() {
|
|
376
|
+
this.stackHovered.set(false);
|
|
377
|
+
if (!this.pauseOnHover() || this.touchExpanded()) return;
|
|
378
|
+
const gestureIds = new Set(Object.keys(this.swipeVisuals()));
|
|
379
|
+
for (const message of this.visibleMessages()) if (!gestureIds.has(message.id)) this.toastService.resume(message.id);
|
|
380
|
+
}
|
|
381
|
+
handlePointerDown(event, message) {
|
|
382
|
+
if (!(event.pointerType === "touch" && this.mode() === "stacked") && this.resolvedSwipeDirections().length === 0 || this.swipeSession) return;
|
|
383
|
+
if (event.pointerType === "mouse" && event.button !== 0) return;
|
|
384
|
+
if (event.target?.closest("button,a,input,textarea,select,[role=\"button\"],[data-aeris-toast-swipe-ignore]")) return;
|
|
385
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
386
|
+
this.toastService.pause(message.id);
|
|
387
|
+
this.swipeSession = {
|
|
388
|
+
message,
|
|
389
|
+
pointerId: event.pointerId,
|
|
390
|
+
pointerType: event.pointerType,
|
|
391
|
+
tapStartX: event.clientX,
|
|
392
|
+
tapStartY: event.clientY,
|
|
393
|
+
tapMoved: false,
|
|
394
|
+
startX: event.clientX,
|
|
395
|
+
startY: event.clientY,
|
|
396
|
+
lastX: event.clientX,
|
|
397
|
+
lastY: event.clientY,
|
|
398
|
+
baselineX: event.clientX,
|
|
399
|
+
baselineY: event.clientY,
|
|
400
|
+
deltaX: 0,
|
|
401
|
+
deltaY: 0,
|
|
402
|
+
visualX: 0,
|
|
403
|
+
visualY: 0,
|
|
404
|
+
firstMove: true,
|
|
405
|
+
realSwipe: false,
|
|
406
|
+
lockedAxis: null,
|
|
407
|
+
intendedDirection: void 0,
|
|
408
|
+
maxDisplacement: 0,
|
|
409
|
+
cancelled: false
|
|
410
|
+
};
|
|
411
|
+
this.setSwipeVisual(message.id, {
|
|
412
|
+
x: 0,
|
|
413
|
+
y: 0,
|
|
414
|
+
direction: void 0,
|
|
415
|
+
phase: "dragging"
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
handlePointerMove(event) {
|
|
419
|
+
const session = this.swipeSession;
|
|
420
|
+
if (!session || event.pointerId !== session.pointerId) return;
|
|
421
|
+
this.trackTapMovement(session, event);
|
|
422
|
+
if (this.resolvedSwipeDirections().length === 0) return;
|
|
423
|
+
event.preventDefault();
|
|
424
|
+
this.updateSwipeSession(session, event.clientX, event.clientY);
|
|
425
|
+
this.swipeFrame.schedule();
|
|
426
|
+
}
|
|
427
|
+
handlePointerEnd(event) {
|
|
428
|
+
const session = this.swipeSession;
|
|
429
|
+
if (!session || event.pointerId !== session.pointerId) return;
|
|
430
|
+
this.trackTapMovement(session, event);
|
|
431
|
+
const target = event.currentTarget;
|
|
432
|
+
if (target.hasPointerCapture?.(event.pointerId)) target.releasePointerCapture(event.pointerId);
|
|
433
|
+
this.swipeFrame.cancel();
|
|
434
|
+
if (!session.firstMove) this.updateSwipeSession(session, event.clientX, event.clientY);
|
|
435
|
+
this.flushSwipeVisual();
|
|
436
|
+
const dismissDirection = event.type === "pointercancel" || session.cancelled ? void 0 : this.resolvedSwipeDirections().find((direction) => this.swipeDisplacement(direction, session.deltaX, session.deltaY) > this.resolvedSwipeThreshold());
|
|
437
|
+
this.swipeSession = null;
|
|
438
|
+
if (dismissDirection) {
|
|
439
|
+
this.setSwipeVisual(session.message.id, {
|
|
440
|
+
x: session.visualX,
|
|
441
|
+
y: session.visualY,
|
|
442
|
+
direction: dismissDirection,
|
|
443
|
+
phase: "dismissing"
|
|
444
|
+
});
|
|
445
|
+
this.scheduleSwipeRemoval(session.message);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
this.removeSwipeVisual(session.message.id);
|
|
449
|
+
if (event.type === "pointerup" && session.pointerType === "touch" && !session.tapMoved && this.mode() === "stacked") this.touchExpanded.update((expanded) => !expanded);
|
|
450
|
+
if (!this.interactionPaused()) this.toastService.resume(session.message.id);
|
|
451
|
+
}
|
|
452
|
+
trackTapMovement(session, event) {
|
|
453
|
+
if (Math.hypot(event.clientX - session.tapStartX, event.clientY - session.tapStartY) > 8) session.tapMoved = true;
|
|
454
|
+
}
|
|
455
|
+
measureMessages() {
|
|
456
|
+
const measurements = {};
|
|
457
|
+
for (const reference of this.messageElements()) {
|
|
458
|
+
const element = reference.nativeElement;
|
|
459
|
+
const id = element.dataset["toastId"];
|
|
460
|
+
if (!id) continue;
|
|
461
|
+
const contentHeight = Math.max(element.scrollHeight, element.getBoundingClientRect().height);
|
|
462
|
+
if (contentHeight > 0) measurements[id] = Math.ceil(contentHeight + 2);
|
|
463
|
+
}
|
|
464
|
+
this.measuredHeights.update((current) => {
|
|
465
|
+
const ids = Object.keys(measurements);
|
|
466
|
+
return ids.length === Object.keys(current).length && ids.every((id) => current[id] === measurements[id]) ? current : measurements;
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
updateSwipeSession(session, clientX, clientY) {
|
|
470
|
+
if (session.firstMove) {
|
|
471
|
+
session.startX = clientX;
|
|
472
|
+
session.startY = clientY;
|
|
473
|
+
session.lastX = clientX;
|
|
474
|
+
session.lastY = clientY;
|
|
475
|
+
session.baselineX = clientX;
|
|
476
|
+
session.baselineY = clientY;
|
|
477
|
+
session.firstMove = false;
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
const movementX = clientX - session.lastX;
|
|
481
|
+
const movementY = clientY - session.lastY;
|
|
482
|
+
session.lastX = clientX;
|
|
483
|
+
session.lastY = clientY;
|
|
484
|
+
if (movementY < 0 && clientY > session.baselineY || movementY > 0 && clientY < session.baselineY) session.baselineY = clientY;
|
|
485
|
+
if (movementX < 0 && clientX > session.baselineX || movementX > 0 && clientX < session.baselineX) session.baselineX = clientX;
|
|
486
|
+
const deltaX = clientX - session.startX;
|
|
487
|
+
const deltaY = clientY - session.startY;
|
|
488
|
+
session.deltaX = deltaX;
|
|
489
|
+
session.deltaY = deltaY;
|
|
490
|
+
const directions = this.resolvedSwipeDirections();
|
|
491
|
+
const hasHorizontal = directions.includes("left") || directions.includes("right");
|
|
492
|
+
const hasVertical = directions.includes("up") || directions.includes("down");
|
|
493
|
+
if (!session.realSwipe) {
|
|
494
|
+
if (Math.hypot(deltaX, deltaY) >= AerisToast.minimumDragThreshold) {
|
|
495
|
+
session.realSwipe = true;
|
|
496
|
+
if (hasHorizontal && hasVertical) session.lockedAxis = Math.abs(deltaX) > Math.abs(deltaY) ? "horizontal" : "vertical";
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
if (!session.intendedDirection) {
|
|
500
|
+
const candidate = this.swipeCandidate(session.lockedAxis, deltaX, deltaY);
|
|
501
|
+
if (candidate && directions.includes(candidate)) {
|
|
502
|
+
session.intendedDirection = candidate;
|
|
503
|
+
session.maxDisplacement = this.swipeDisplacement(candidate, deltaX, deltaY);
|
|
504
|
+
}
|
|
505
|
+
} else {
|
|
506
|
+
const cancelDeltaX = clientX - session.baselineX;
|
|
507
|
+
const cancelDeltaY = clientY - session.baselineY;
|
|
508
|
+
const currentDisplacement = this.swipeDisplacement(session.intendedDirection, cancelDeltaX, cancelDeltaY);
|
|
509
|
+
const displacement = this.swipeDisplacement(session.intendedDirection, deltaX, deltaY);
|
|
510
|
+
session.maxDisplacement = Math.max(session.maxDisplacement, displacement);
|
|
511
|
+
if (currentDisplacement > this.resolvedSwipeThreshold()) session.cancelled = false;
|
|
512
|
+
else if (!this.hasOppositeSwipeDirection(session.intendedDirection, directions) && session.maxDisplacement - currentDisplacement >= AerisToast.reverseCancelThreshold) session.cancelled = true;
|
|
513
|
+
}
|
|
514
|
+
const dampedX = this.dampedSwipeDelta(deltaX, "left", "right", directions);
|
|
515
|
+
const dampedY = this.dampedSwipeDelta(deltaY, "up", "down", directions);
|
|
516
|
+
session.visualX = session.lockedAxis !== "vertical" && hasHorizontal ? dampedX : 0;
|
|
517
|
+
session.visualY = session.lockedAxis !== "horizontal" && hasVertical ? dampedY : 0;
|
|
518
|
+
}
|
|
519
|
+
flushSwipeVisual() {
|
|
520
|
+
const session = this.swipeSession;
|
|
521
|
+
if (!session) return;
|
|
522
|
+
this.setSwipeVisual(session.message.id, {
|
|
523
|
+
x: session.visualX,
|
|
524
|
+
y: session.visualY,
|
|
525
|
+
direction: session.cancelled ? void 0 : session.intendedDirection,
|
|
526
|
+
phase: "dragging"
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
setSwipeVisual(id, visual) {
|
|
530
|
+
this.swipeVisuals.update((current) => ({
|
|
531
|
+
...current,
|
|
532
|
+
[id]: visual
|
|
533
|
+
}));
|
|
534
|
+
}
|
|
535
|
+
removeSwipeVisual(id) {
|
|
536
|
+
this.swipeVisuals.update((current) => {
|
|
537
|
+
if (!(id in current)) return current;
|
|
538
|
+
const next = { ...current };
|
|
539
|
+
delete next[id];
|
|
540
|
+
return next;
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
scheduleSwipeRemoval(message) {
|
|
544
|
+
this.pendingSwipeRemovals.get(message.id)?.();
|
|
545
|
+
const remove = () => {
|
|
546
|
+
this.pendingSwipeRemovals.delete(message.id);
|
|
547
|
+
this.toastService.remove(message.id, "swipe");
|
|
548
|
+
const cleanup = globalThis.setTimeout(() => {
|
|
549
|
+
this.swipeCleanupTimers.delete(message.id);
|
|
550
|
+
this.removeSwipeVisual(message.id);
|
|
551
|
+
}, AerisToast.swipeRemovalDelay);
|
|
552
|
+
this.swipeCleanupTimers.set(message.id, cleanup);
|
|
553
|
+
};
|
|
554
|
+
if (typeof globalThis.requestAnimationFrame === "function") {
|
|
555
|
+
const frame = globalThis.requestAnimationFrame(remove);
|
|
556
|
+
this.pendingSwipeRemovals.set(message.id, () => globalThis.cancelAnimationFrame?.(frame));
|
|
557
|
+
} else {
|
|
558
|
+
const timer = globalThis.setTimeout(remove, 0);
|
|
559
|
+
this.pendingSwipeRemovals.set(message.id, () => globalThis.clearTimeout(timer));
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
swipeCandidate(lockedAxis, deltaX, deltaY) {
|
|
563
|
+
if (lockedAxis === "vertical") return deltaY > 0 ? "down" : deltaY < 0 ? "up" : void 0;
|
|
564
|
+
if (lockedAxis === "horizontal") return deltaX > 0 ? "right" : deltaX < 0 ? "left" : void 0;
|
|
565
|
+
if (Math.abs(deltaX) >= Math.abs(deltaY)) return deltaX > 0 ? "right" : deltaX < 0 ? "left" : void 0;
|
|
566
|
+
return deltaY > 0 ? "down" : deltaY < 0 ? "up" : void 0;
|
|
567
|
+
}
|
|
568
|
+
swipeDisplacement(direction, deltaX, deltaY) {
|
|
569
|
+
if (direction === "right") return deltaX;
|
|
570
|
+
if (direction === "left") return -deltaX;
|
|
571
|
+
if (direction === "down") return deltaY;
|
|
572
|
+
return -deltaY;
|
|
573
|
+
}
|
|
574
|
+
dampedSwipeDelta(delta, negativeDirection, positiveDirection, directions) {
|
|
575
|
+
if (!(delta > 0 && !directions.includes(positiveDirection) || delta < 0 && !directions.includes(negativeDirection))) return delta;
|
|
576
|
+
return Math.sign(delta) * Math.sqrt(Math.abs(delta));
|
|
577
|
+
}
|
|
578
|
+
hasOppositeSwipeDirection(direction, directions) {
|
|
579
|
+
if (direction === "left") return directions.includes("right");
|
|
580
|
+
if (direction === "right") return directions.includes("left");
|
|
581
|
+
if (direction === "up") return directions.includes("down");
|
|
582
|
+
return directions.includes("up");
|
|
583
|
+
}
|
|
584
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
585
|
+
minVersion: "12.0.0",
|
|
586
|
+
version: "22.2.2",
|
|
587
|
+
ngImport: i0,
|
|
588
|
+
type: AerisToast,
|
|
589
|
+
deps: [],
|
|
590
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
591
|
+
});
|
|
592
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
593
|
+
minVersion: "17.0.0",
|
|
594
|
+
version: "22.2.2",
|
|
595
|
+
type: AerisToast,
|
|
596
|
+
isStandalone: true,
|
|
597
|
+
selector: "aeris-toast",
|
|
598
|
+
inputs: {
|
|
599
|
+
position: {
|
|
600
|
+
classPropertyName: "position",
|
|
601
|
+
publicName: "position",
|
|
602
|
+
isSignal: true,
|
|
603
|
+
isRequired: false,
|
|
604
|
+
transformFunction: null
|
|
605
|
+
},
|
|
606
|
+
group: {
|
|
607
|
+
classPropertyName: "group",
|
|
608
|
+
publicName: "group",
|
|
609
|
+
isSignal: true,
|
|
610
|
+
isRequired: false,
|
|
611
|
+
transformFunction: null
|
|
612
|
+
},
|
|
613
|
+
mode: {
|
|
614
|
+
classPropertyName: "mode",
|
|
615
|
+
publicName: "mode",
|
|
616
|
+
isSignal: true,
|
|
617
|
+
isRequired: false,
|
|
618
|
+
transformFunction: null
|
|
619
|
+
},
|
|
620
|
+
visibleCount: {
|
|
621
|
+
classPropertyName: "visibleCount",
|
|
622
|
+
publicName: "visibleCount",
|
|
623
|
+
isSignal: true,
|
|
624
|
+
isRequired: false,
|
|
625
|
+
transformFunction: null
|
|
626
|
+
},
|
|
627
|
+
limit: {
|
|
628
|
+
classPropertyName: "limit",
|
|
629
|
+
publicName: "limit",
|
|
630
|
+
isSignal: true,
|
|
631
|
+
isRequired: false,
|
|
632
|
+
transformFunction: null
|
|
633
|
+
},
|
|
634
|
+
newestOnTop: {
|
|
635
|
+
classPropertyName: "newestOnTop",
|
|
636
|
+
publicName: "newestOnTop",
|
|
637
|
+
isSignal: true,
|
|
638
|
+
isRequired: false,
|
|
639
|
+
transformFunction: null
|
|
640
|
+
},
|
|
641
|
+
pauseOnHover: {
|
|
642
|
+
classPropertyName: "pauseOnHover",
|
|
643
|
+
publicName: "pauseOnHover",
|
|
644
|
+
isSignal: true,
|
|
645
|
+
isRequired: false,
|
|
646
|
+
transformFunction: null
|
|
647
|
+
},
|
|
648
|
+
showIcon: {
|
|
649
|
+
classPropertyName: "showIcon",
|
|
650
|
+
publicName: "showIcon",
|
|
651
|
+
isSignal: true,
|
|
652
|
+
isRequired: false,
|
|
653
|
+
transformFunction: null
|
|
654
|
+
},
|
|
655
|
+
showClose: {
|
|
656
|
+
classPropertyName: "showClose",
|
|
657
|
+
publicName: "showClose",
|
|
658
|
+
isSignal: true,
|
|
659
|
+
isRequired: false,
|
|
660
|
+
transformFunction: null
|
|
661
|
+
},
|
|
662
|
+
swipeDirection: {
|
|
663
|
+
classPropertyName: "swipeDirection",
|
|
664
|
+
publicName: "swipeDirection",
|
|
665
|
+
isSignal: true,
|
|
666
|
+
isRequired: false,
|
|
667
|
+
transformFunction: null
|
|
668
|
+
},
|
|
669
|
+
swipeThreshold: {
|
|
670
|
+
classPropertyName: "swipeThreshold",
|
|
671
|
+
publicName: "swipeThreshold",
|
|
672
|
+
isSignal: true,
|
|
673
|
+
isRequired: false,
|
|
674
|
+
transformFunction: null
|
|
675
|
+
},
|
|
676
|
+
ariaLabel: {
|
|
677
|
+
classPropertyName: "ariaLabel",
|
|
678
|
+
publicName: "ariaLabel",
|
|
679
|
+
isSignal: true,
|
|
680
|
+
isRequired: false,
|
|
681
|
+
transformFunction: null
|
|
682
|
+
},
|
|
683
|
+
closeAriaLabel: {
|
|
684
|
+
classPropertyName: "closeAriaLabel",
|
|
685
|
+
publicName: "closeAriaLabel",
|
|
686
|
+
isSignal: true,
|
|
687
|
+
isRequired: false,
|
|
688
|
+
transformFunction: null
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
outputs: { closed: "closed" },
|
|
692
|
+
host: {
|
|
693
|
+
properties: { "attr.data-position": "position()" },
|
|
694
|
+
classAttribute: "aeris-toast"
|
|
695
|
+
},
|
|
696
|
+
queries: [{
|
|
697
|
+
propertyName: "contentTemplate",
|
|
698
|
+
first: true,
|
|
699
|
+
predicate: AerisToastContentTemplate,
|
|
700
|
+
descendants: true,
|
|
701
|
+
isSignal: true
|
|
702
|
+
}, {
|
|
703
|
+
propertyName: "iconTemplate",
|
|
704
|
+
first: true,
|
|
705
|
+
predicate: AerisToastIconTemplate,
|
|
706
|
+
descendants: true,
|
|
707
|
+
isSignal: true
|
|
708
|
+
}],
|
|
709
|
+
viewQueries: [{
|
|
710
|
+
propertyName: "toastRegion",
|
|
711
|
+
first: true,
|
|
712
|
+
predicate: ["toastRegion"],
|
|
713
|
+
descendants: true,
|
|
714
|
+
isSignal: true
|
|
715
|
+
}, {
|
|
716
|
+
propertyName: "messageElements",
|
|
717
|
+
predicate: ["toastMessage"],
|
|
718
|
+
descendants: true,
|
|
719
|
+
isSignal: true
|
|
720
|
+
}],
|
|
721
|
+
ngImport: i0,
|
|
722
|
+
template: `
|
|
723
|
+
<section
|
|
724
|
+
#toastRegion
|
|
725
|
+
class="aeris-toast__region"
|
|
726
|
+
[attr.aria-label]="hasVisibleMessages() ? ariaLabel() : null"
|
|
727
|
+
[attr.data-empty]="!hasVisibleMessages() || null"
|
|
728
|
+
[attr.data-position]="position()"
|
|
729
|
+
[attr.data-mode]="presentationMode()"
|
|
730
|
+
[attr.data-newest-on-top]="newestOnTop() || null"
|
|
731
|
+
[attr.data-overflow]="hiddenCount() > 0 || null"
|
|
732
|
+
[attr.data-stack-width]="stackWidthLocked() || null"
|
|
733
|
+
[style.--aeris-toast-stack-size]="visibleStackSize()"
|
|
734
|
+
(pointerenter)="pauseVisible()"
|
|
735
|
+
(pointerleave)="resumeVisible()"
|
|
736
|
+
(focusin)="pauseVisible()"
|
|
737
|
+
(focusout)="resumeVisible()"
|
|
738
|
+
>
|
|
739
|
+
@for (item of visibleStack(); track item.message.id) {
|
|
740
|
+
<div
|
|
741
|
+
class="aeris-toast__item"
|
|
742
|
+
[attr.data-stack-index]="item.stackIndex"
|
|
743
|
+
[attr.data-primary]="item.primary || null"
|
|
744
|
+
[attr.data-swiping]="item.swiping || null"
|
|
745
|
+
[attr.data-swipe-direction]="item.swipeDirection || null"
|
|
746
|
+
[attr.data-swipe-dismissing]="item.swipeDismissing || null"
|
|
747
|
+
[style.--aeris-toast-stack-index]="item.stackIndexValue"
|
|
748
|
+
[style.--aeris-toast-stack-size]="item.stackSizeValue"
|
|
749
|
+
[style.--aeris-toast-height]="item.heightValue"
|
|
750
|
+
[style.--aeris-toast-front-height]="item.frontHeightValue"
|
|
751
|
+
[style.--aeris-toast-height-offset]="item.heightOffsetValue"
|
|
752
|
+
[style.--aeris-toast-swipe-x]="item.swipeXValue"
|
|
753
|
+
[style.--aeris-toast-swipe-y]="item.swipeYValue"
|
|
754
|
+
animate.leave="aeris-toast__item--leaving"
|
|
755
|
+
(pointerdown)="handlePointerDown($event, item.message)"
|
|
756
|
+
(pointermove)="handlePointerMove($event)"
|
|
757
|
+
(pointerup)="handlePointerEnd($event)"
|
|
758
|
+
(pointercancel)="handlePointerEnd($event)"
|
|
759
|
+
>
|
|
264
760
|
<article
|
|
265
761
|
class="aeris-toast__message"
|
|
266
762
|
[attr.data-severity]="item.message.severity"
|
|
@@ -270,78 +766,134 @@ class AerisToast {
|
|
|
270
766
|
[attr.aria-live]="item.message.ariaLive"
|
|
271
767
|
aria-atomic="true"
|
|
272
768
|
[attr.aria-label]="item.message.ariaLabel || null"
|
|
273
|
-
[style.--aeris-toast-stack-index]="item.stackIndexValue"
|
|
274
|
-
[style.--aeris-toast-stack-size]="item.stackSizeValue"
|
|
275
|
-
[style.--aeris-toast-stack-opacity]="item.stackOpacityValue"
|
|
276
|
-
[style.--aeris-toast-stack-scale]="item.stackScaleValue"
|
|
277
|
-
[style.--aeris-toast-stack-offset]="item.stackOffsetValue"
|
|
278
|
-
[style.--aeris-toast-stack-offset-inverse]="item.stackOffsetInverseValue"
|
|
279
769
|
>
|
|
280
|
-
<div
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
770
|
+
<div
|
|
771
|
+
#toastMessage
|
|
772
|
+
class="aeris-toast__body"
|
|
773
|
+
[attr.data-behind]="!item.primary || null"
|
|
774
|
+
[attr.data-icon-hidden]="!showIcon() || null"
|
|
775
|
+
[attr.data-has-summary]="item.message.summary ? true : null"
|
|
776
|
+
[attr.data-custom-content]="contentTemplate() ? true : null"
|
|
777
|
+
[attr.data-toast-id]="item.message.id"
|
|
778
|
+
>
|
|
779
|
+
@if (showIcon()) {
|
|
780
|
+
<div class="aeris-toast__icon" aria-hidden="true">
|
|
781
|
+
@if (iconTemplate(); as icon) {
|
|
782
|
+
<ng-container
|
|
783
|
+
[ngTemplateOutlet]="icon.template"
|
|
784
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
785
|
+
/>
|
|
786
|
+
} @else {
|
|
787
|
+
<span class="aeris-toast__default-icon"></span>
|
|
788
|
+
}
|
|
789
|
+
</div>
|
|
288
790
|
}
|
|
289
|
-
</div>
|
|
290
791
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
792
|
+
<div class="aeris-toast__content">
|
|
793
|
+
@if (contentTemplate(); as content) {
|
|
794
|
+
<ng-container
|
|
795
|
+
[ngTemplateOutlet]="content.template"
|
|
796
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
797
|
+
/>
|
|
798
|
+
} @else {
|
|
799
|
+
@if (item.message.summary) {
|
|
800
|
+
<p class="aeris-toast__summary">{{ item.message.summary }}</p>
|
|
801
|
+
}
|
|
802
|
+
@if (item.message.detail) {
|
|
803
|
+
<p class="aeris-toast__detail">{{ item.message.detail }}</p>
|
|
804
|
+
}
|
|
303
805
|
}
|
|
806
|
+
</div>
|
|
807
|
+
|
|
808
|
+
@if (item.message.closable && showClose()) {
|
|
809
|
+
<button
|
|
810
|
+
type="button"
|
|
811
|
+
class="aeris-toast__close"
|
|
812
|
+
[attr.aria-label]="closeAriaLabel()"
|
|
813
|
+
(click)="close(item.message)"
|
|
814
|
+
>
|
|
815
|
+
<span aria-hidden="true"></span>
|
|
816
|
+
</button>
|
|
304
817
|
}
|
|
305
818
|
</div>
|
|
306
|
-
|
|
307
|
-
@if (item.message.closable && showClose()) {
|
|
308
|
-
<button
|
|
309
|
-
type="button"
|
|
310
|
-
class="aeris-toast__close"
|
|
311
|
-
[attr.aria-label]="closeAriaLabel()"
|
|
312
|
-
(click)="close(item.message)"
|
|
313
|
-
>
|
|
314
|
-
<span aria-hidden="true"></span>
|
|
315
|
-
</button>
|
|
316
|
-
}
|
|
317
819
|
</article>
|
|
318
|
-
|
|
820
|
+
</div>
|
|
821
|
+
}
|
|
319
822
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
[attr.aria-label]="ariaLabel()"
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
823
|
+
@if (hiddenCount() > 0) {
|
|
824
|
+
<span
|
|
825
|
+
class="aeris-toast__overflow"
|
|
826
|
+
aria-hidden="true"
|
|
827
|
+
animate.enter="aeris-toast__overflow--entering"
|
|
828
|
+
animate.leave="aeris-toast__overflow--leaving"
|
|
829
|
+
>
|
|
830
|
+
+{{ hiddenCount() }}
|
|
831
|
+
</span>
|
|
832
|
+
}
|
|
833
|
+
</section>
|
|
834
|
+
`,
|
|
835
|
+
isInline: true,
|
|
836
|
+
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),var(--_aeris-viewport-width, 100vw) - var(--_edge-offset) - var(--_edge-offset) - var(--aeris-safe-area-left, 0px) - var(--aeris-safe-area-right, 0px));height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:calc(var(--_edge-offset) + var(--aeris-safe-area-top, 0px) + var(--_aeris-viewport-top, 0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + var(--aeris-safe-area-bottom, 0px) + var(--_aeris-viewport-bottom, 0px))}.aeris-toast__region[data-position$=left]{left:calc(var(--_edge-offset) + var(--aeris-safe-area-left, 0px) + var(--_aeris-viewport-left, 0px))}.aeris-toast__region[data-position$=right]{right:calc(var(--_edge-offset) + var(--aeris-safe-area-right, 0px) + var(--_aeris-viewport-right, 0px))}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:calc(var(--_aeris-viewport-left, 0px) + var(--_aeris-viewport-width, 100vw) / 2);transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:calc(var(--_aeris-viewport-top, 0px) + var(--_aeris-viewport-height, 100dvh) / 2);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]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}@media(hover:hover){.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}}.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]: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}@media(hover:hover){.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .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]: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}@media(hover:hover){.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .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]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}@media(hover:hover){.aeris-toast__region[data-mode=stacked]:hover .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, #111111);--_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, #111111);--_toast-detail: var(--aeris-text-2, #454545);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-surface, var(--aeris-radius-lg, .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 var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, 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:focus-within{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #111111) 10%,transparent)}@media(hover:hover){.aeris-toast__message:hover{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #111111) 10%,transparent)}}.aeris-toast__message[data-severity=primary]{--_accent: var(--aeris-primary, #111111)}.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-secondary, #565656)}.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, #454545)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #111111);--_icon-color: var(--aeris-surface, #ffffff);--_toast-surface: var(--aeris-text, #111111);--_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:var(--aeris-radius-pill, 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:var(--aeris-radius-pill, 999px);transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:var(--aeris-radius-pill, 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:var(--aeris-radius-pill, 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:var(--aeris-font-size-lg, .875rem);font-weight:var(--aeris-font-weight-bold, 700);line-height:1.35}.aeris-toast__detail{color:var(--_toast-detail);font-size:var(--aeris-font-size-md, .8125rem);line-height:var(--aeris-line-height-normal, 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-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--_toast-detail);cursor:pointer;transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}@media(hover:hover){.aeris-toast__close:hover{background:color-mix(in srgb,var(--_toast-text) 10%,transparent);color:var(--_toast-text)}}.aeris-toast__close:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:var(--aeris-focus-ring-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, #efefef);border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #454545);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 2px 5px rgba(0, 0, 0, .14));font-size:var(--aeris-font-size-xs, .6875rem);font-weight:var(--aeris-font-weight-bold, 700);pointer-events:none;translate:-50% -50%;transition:opacity var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, 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 var(--aeris-motion-normal, .15s) var(--aeris-ease-exit, 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) + var(--aeris-safe-area-right, 0px) + var(--_aeris-viewport-right, 0px));left:calc(var(--_edge-offset) + var(--aeris-safe-area-left, 0px) + var(--_aeris-viewport-left, 0px));width:auto;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:calc(var(--_edge-offset) + var(--aeris-safe-area-top, 0px) + var(--_aeris-viewport-top, 0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + var(--aeris-safe-area-bottom, 0px) + var(--_aeris-viewport-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"],
|
|
837
|
+
dependencies: [{
|
|
838
|
+
kind: "directive",
|
|
839
|
+
type: NgTemplateOutlet,
|
|
840
|
+
selector: "[ngTemplateOutlet]",
|
|
841
|
+
inputs: [
|
|
842
|
+
"ngTemplateOutletContext",
|
|
843
|
+
"ngTemplateOutlet",
|
|
844
|
+
"ngTemplateOutletInjector"
|
|
845
|
+
]
|
|
846
|
+
}]
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
850
|
+
minVersion: "12.0.0",
|
|
851
|
+
version: "22.2.2",
|
|
852
|
+
ngImport: i0,
|
|
853
|
+
type: AerisToast,
|
|
854
|
+
decorators: [{
|
|
855
|
+
type: Component,
|
|
856
|
+
args: [{
|
|
857
|
+
selector: "aeris-toast",
|
|
858
|
+
imports: [NgTemplateOutlet],
|
|
859
|
+
template: `
|
|
860
|
+
<section
|
|
861
|
+
#toastRegion
|
|
862
|
+
class="aeris-toast__region"
|
|
863
|
+
[attr.aria-label]="hasVisibleMessages() ? ariaLabel() : null"
|
|
864
|
+
[attr.data-empty]="!hasVisibleMessages() || null"
|
|
865
|
+
[attr.data-position]="position()"
|
|
866
|
+
[attr.data-mode]="presentationMode()"
|
|
867
|
+
[attr.data-newest-on-top]="newestOnTop() || null"
|
|
868
|
+
[attr.data-overflow]="hiddenCount() > 0 || null"
|
|
869
|
+
[attr.data-stack-width]="stackWidthLocked() || null"
|
|
870
|
+
[style.--aeris-toast-stack-size]="visibleStackSize()"
|
|
871
|
+
(pointerenter)="pauseVisible()"
|
|
872
|
+
(pointerleave)="resumeVisible()"
|
|
873
|
+
(focusin)="pauseVisible()"
|
|
874
|
+
(focusout)="resumeVisible()"
|
|
875
|
+
>
|
|
876
|
+
@for (item of visibleStack(); track item.message.id) {
|
|
877
|
+
<div
|
|
878
|
+
class="aeris-toast__item"
|
|
879
|
+
[attr.data-stack-index]="item.stackIndex"
|
|
880
|
+
[attr.data-primary]="item.primary || null"
|
|
881
|
+
[attr.data-swiping]="item.swiping || null"
|
|
882
|
+
[attr.data-swipe-direction]="item.swipeDirection || null"
|
|
883
|
+
[attr.data-swipe-dismissing]="item.swipeDismissing || null"
|
|
884
|
+
[style.--aeris-toast-stack-index]="item.stackIndexValue"
|
|
885
|
+
[style.--aeris-toast-stack-size]="item.stackSizeValue"
|
|
886
|
+
[style.--aeris-toast-height]="item.heightValue"
|
|
887
|
+
[style.--aeris-toast-front-height]="item.frontHeightValue"
|
|
888
|
+
[style.--aeris-toast-height-offset]="item.heightOffsetValue"
|
|
889
|
+
[style.--aeris-toast-swipe-x]="item.swipeXValue"
|
|
890
|
+
[style.--aeris-toast-swipe-y]="item.swipeYValue"
|
|
891
|
+
animate.leave="aeris-toast__item--leaving"
|
|
892
|
+
(pointerdown)="handlePointerDown($event, item.message)"
|
|
893
|
+
(pointermove)="handlePointerMove($event)"
|
|
894
|
+
(pointerup)="handlePointerEnd($event)"
|
|
895
|
+
(pointercancel)="handlePointerEnd($event)"
|
|
896
|
+
>
|
|
345
897
|
<article
|
|
346
898
|
class="aeris-toast__message"
|
|
347
899
|
[attr.data-severity]="item.message.severity"
|
|
@@ -351,72 +903,212 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
351
903
|
[attr.aria-live]="item.message.ariaLive"
|
|
352
904
|
aria-atomic="true"
|
|
353
905
|
[attr.aria-label]="item.message.ariaLabel || null"
|
|
354
|
-
[style.--aeris-toast-stack-index]="item.stackIndexValue"
|
|
355
|
-
[style.--aeris-toast-stack-size]="item.stackSizeValue"
|
|
356
|
-
[style.--aeris-toast-stack-opacity]="item.stackOpacityValue"
|
|
357
|
-
[style.--aeris-toast-stack-scale]="item.stackScaleValue"
|
|
358
|
-
[style.--aeris-toast-stack-offset]="item.stackOffsetValue"
|
|
359
|
-
[style.--aeris-toast-stack-offset-inverse]="item.stackOffsetInverseValue"
|
|
360
906
|
>
|
|
361
|
-
<div
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
907
|
+
<div
|
|
908
|
+
#toastMessage
|
|
909
|
+
class="aeris-toast__body"
|
|
910
|
+
[attr.data-behind]="!item.primary || null"
|
|
911
|
+
[attr.data-icon-hidden]="!showIcon() || null"
|
|
912
|
+
[attr.data-has-summary]="item.message.summary ? true : null"
|
|
913
|
+
[attr.data-custom-content]="contentTemplate() ? true : null"
|
|
914
|
+
[attr.data-toast-id]="item.message.id"
|
|
915
|
+
>
|
|
916
|
+
@if (showIcon()) {
|
|
917
|
+
<div class="aeris-toast__icon" aria-hidden="true">
|
|
918
|
+
@if (iconTemplate(); as icon) {
|
|
919
|
+
<ng-container
|
|
920
|
+
[ngTemplateOutlet]="icon.template"
|
|
921
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
922
|
+
/>
|
|
923
|
+
} @else {
|
|
924
|
+
<span class="aeris-toast__default-icon"></span>
|
|
925
|
+
}
|
|
926
|
+
</div>
|
|
369
927
|
}
|
|
370
|
-
</div>
|
|
371
928
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
929
|
+
<div class="aeris-toast__content">
|
|
930
|
+
@if (contentTemplate(); as content) {
|
|
931
|
+
<ng-container
|
|
932
|
+
[ngTemplateOutlet]="content.template"
|
|
933
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
934
|
+
/>
|
|
935
|
+
} @else {
|
|
936
|
+
@if (item.message.summary) {
|
|
937
|
+
<p class="aeris-toast__summary">{{ item.message.summary }}</p>
|
|
938
|
+
}
|
|
939
|
+
@if (item.message.detail) {
|
|
940
|
+
<p class="aeris-toast__detail">{{ item.message.detail }}</p>
|
|
941
|
+
}
|
|
384
942
|
}
|
|
943
|
+
</div>
|
|
944
|
+
|
|
945
|
+
@if (item.message.closable && showClose()) {
|
|
946
|
+
<button
|
|
947
|
+
type="button"
|
|
948
|
+
class="aeris-toast__close"
|
|
949
|
+
[attr.aria-label]="closeAriaLabel()"
|
|
950
|
+
(click)="close(item.message)"
|
|
951
|
+
>
|
|
952
|
+
<span aria-hidden="true"></span>
|
|
953
|
+
</button>
|
|
385
954
|
}
|
|
386
955
|
</div>
|
|
387
|
-
|
|
388
|
-
@if (item.message.closable && showClose()) {
|
|
389
|
-
<button
|
|
390
|
-
type="button"
|
|
391
|
-
class="aeris-toast__close"
|
|
392
|
-
[attr.aria-label]="closeAriaLabel()"
|
|
393
|
-
(click)="close(item.message)"
|
|
394
|
-
>
|
|
395
|
-
<span aria-hidden="true"></span>
|
|
396
|
-
</button>
|
|
397
|
-
}
|
|
398
956
|
</article>
|
|
399
|
-
|
|
957
|
+
</div>
|
|
958
|
+
}
|
|
400
959
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
960
|
+
@if (hiddenCount() > 0) {
|
|
961
|
+
<span
|
|
962
|
+
class="aeris-toast__overflow"
|
|
963
|
+
aria-hidden="true"
|
|
964
|
+
animate.enter="aeris-toast__overflow--entering"
|
|
965
|
+
animate.leave="aeris-toast__overflow--leaving"
|
|
966
|
+
>
|
|
967
|
+
+{{ hiddenCount() }}
|
|
968
|
+
</span>
|
|
969
|
+
}
|
|
970
|
+
</section>
|
|
971
|
+
`,
|
|
972
|
+
host: {
|
|
973
|
+
class: "aeris-toast",
|
|
974
|
+
"[attr.data-position]": "position()"
|
|
975
|
+
},
|
|
976
|
+
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),var(--_aeris-viewport-width, 100vw) - var(--_edge-offset) - var(--_edge-offset) - var(--aeris-safe-area-left, 0px) - var(--aeris-safe-area-right, 0px));height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:calc(var(--_edge-offset) + var(--aeris-safe-area-top, 0px) + var(--_aeris-viewport-top, 0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + var(--aeris-safe-area-bottom, 0px) + var(--_aeris-viewport-bottom, 0px))}.aeris-toast__region[data-position$=left]{left:calc(var(--_edge-offset) + var(--aeris-safe-area-left, 0px) + var(--_aeris-viewport-left, 0px))}.aeris-toast__region[data-position$=right]{right:calc(var(--_edge-offset) + var(--aeris-safe-area-right, 0px) + var(--_aeris-viewport-right, 0px))}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:calc(var(--_aeris-viewport-left, 0px) + var(--_aeris-viewport-width, 100vw) / 2);transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:calc(var(--_aeris-viewport-top, 0px) + var(--_aeris-viewport-height, 100dvh) / 2);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]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}@media(hover:hover){.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}}.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]: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}@media(hover:hover){.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .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]: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}@media(hover:hover){.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .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]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}@media(hover:hover){.aeris-toast__region[data-mode=stacked]:hover .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, #111111);--_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, #111111);--_toast-detail: var(--aeris-text-2, #454545);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-surface, var(--aeris-radius-lg, .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 var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, 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:focus-within{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #111111) 10%,transparent)}@media(hover:hover){.aeris-toast__message:hover{border-color:var(--aeris-toast-border-color, var(--_accent));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #111111) 10%,transparent)}}.aeris-toast__message[data-severity=primary]{--_accent: var(--aeris-primary, #111111)}.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-secondary, #565656)}.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, #454545)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #111111);--_icon-color: var(--aeris-surface, #ffffff);--_toast-surface: var(--aeris-text, #111111);--_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:var(--aeris-radius-pill, 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:var(--aeris-radius-pill, 999px);transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:var(--aeris-radius-pill, 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:var(--aeris-radius-pill, 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:var(--aeris-font-size-lg, .875rem);font-weight:var(--aeris-font-weight-bold, 700);line-height:1.35}.aeris-toast__detail{color:var(--_toast-detail);font-size:var(--aeris-font-size-md, .8125rem);line-height:var(--aeris-line-height-normal, 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-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--_toast-detail);cursor:pointer;transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}@media(hover:hover){.aeris-toast__close:hover{background:color-mix(in srgb,var(--_toast-text) 10%,transparent);color:var(--_toast-text)}}.aeris-toast__close:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:var(--aeris-focus-ring-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, #efefef);border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #454545);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 2px 5px rgba(0, 0, 0, .14));font-size:var(--aeris-font-size-xs, .6875rem);font-weight:var(--aeris-font-weight-bold, 700);pointer-events:none;translate:-50% -50%;transition:opacity var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, 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 var(--aeris-motion-normal, .15s) var(--aeris-ease-exit, 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) + var(--aeris-safe-area-right, 0px) + var(--_aeris-viewport-right, 0px));left:calc(var(--_edge-offset) + var(--aeris-safe-area-left, 0px) + var(--_aeris-viewport-left, 0px));width:auto;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:calc(var(--_edge-offset) + var(--aeris-safe-area-top, 0px) + var(--_aeris-viewport-top, 0px))}.aeris-toast__region[data-position^=bottom]{bottom:calc(var(--_edge-offset) + var(--aeris-safe-area-bottom, 0px) + var(--_aeris-viewport-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"]
|
|
977
|
+
}]
|
|
978
|
+
}],
|
|
979
|
+
ctorParameters: () => [],
|
|
980
|
+
propDecorators: {
|
|
981
|
+
toastRegion: [{
|
|
982
|
+
type: i0.ViewChild,
|
|
983
|
+
args: ["toastRegion", { isSignal: true }]
|
|
984
|
+
}],
|
|
985
|
+
messageElements: [{
|
|
986
|
+
type: i0.ViewChildren,
|
|
987
|
+
args: ["toastMessage", { isSignal: true }]
|
|
988
|
+
}],
|
|
989
|
+
contentTemplate: [{
|
|
990
|
+
type: i0.ContentChild,
|
|
991
|
+
args: [i0.forwardRef(() => AerisToastContentTemplate), { isSignal: true }]
|
|
992
|
+
}],
|
|
993
|
+
iconTemplate: [{
|
|
994
|
+
type: i0.ContentChild,
|
|
995
|
+
args: [i0.forwardRef(() => AerisToastIconTemplate), { isSignal: true }]
|
|
996
|
+
}],
|
|
997
|
+
position: [{
|
|
998
|
+
type: i0.Input,
|
|
999
|
+
args: [{
|
|
1000
|
+
isSignal: true,
|
|
1001
|
+
alias: "position",
|
|
1002
|
+
required: false
|
|
1003
|
+
}]
|
|
1004
|
+
}],
|
|
1005
|
+
group: [{
|
|
1006
|
+
type: i0.Input,
|
|
1007
|
+
args: [{
|
|
1008
|
+
isSignal: true,
|
|
1009
|
+
alias: "group",
|
|
1010
|
+
required: false
|
|
1011
|
+
}]
|
|
1012
|
+
}],
|
|
1013
|
+
mode: [{
|
|
1014
|
+
type: i0.Input,
|
|
1015
|
+
args: [{
|
|
1016
|
+
isSignal: true,
|
|
1017
|
+
alias: "mode",
|
|
1018
|
+
required: false
|
|
1019
|
+
}]
|
|
1020
|
+
}],
|
|
1021
|
+
visibleCount: [{
|
|
1022
|
+
type: i0.Input,
|
|
1023
|
+
args: [{
|
|
1024
|
+
isSignal: true,
|
|
1025
|
+
alias: "visibleCount",
|
|
1026
|
+
required: false
|
|
1027
|
+
}]
|
|
1028
|
+
}],
|
|
1029
|
+
limit: [{
|
|
1030
|
+
type: i0.Input,
|
|
1031
|
+
args: [{
|
|
1032
|
+
isSignal: true,
|
|
1033
|
+
alias: "limit",
|
|
1034
|
+
required: false
|
|
1035
|
+
}]
|
|
1036
|
+
}],
|
|
1037
|
+
newestOnTop: [{
|
|
1038
|
+
type: i0.Input,
|
|
1039
|
+
args: [{
|
|
1040
|
+
isSignal: true,
|
|
1041
|
+
alias: "newestOnTop",
|
|
1042
|
+
required: false
|
|
1043
|
+
}]
|
|
1044
|
+
}],
|
|
1045
|
+
pauseOnHover: [{
|
|
1046
|
+
type: i0.Input,
|
|
1047
|
+
args: [{
|
|
1048
|
+
isSignal: true,
|
|
1049
|
+
alias: "pauseOnHover",
|
|
1050
|
+
required: false
|
|
1051
|
+
}]
|
|
1052
|
+
}],
|
|
1053
|
+
showIcon: [{
|
|
1054
|
+
type: i0.Input,
|
|
1055
|
+
args: [{
|
|
1056
|
+
isSignal: true,
|
|
1057
|
+
alias: "showIcon",
|
|
1058
|
+
required: false
|
|
1059
|
+
}]
|
|
1060
|
+
}],
|
|
1061
|
+
showClose: [{
|
|
1062
|
+
type: i0.Input,
|
|
1063
|
+
args: [{
|
|
1064
|
+
isSignal: true,
|
|
1065
|
+
alias: "showClose",
|
|
1066
|
+
required: false
|
|
1067
|
+
}]
|
|
1068
|
+
}],
|
|
1069
|
+
swipeDirection: [{
|
|
1070
|
+
type: i0.Input,
|
|
1071
|
+
args: [{
|
|
1072
|
+
isSignal: true,
|
|
1073
|
+
alias: "swipeDirection",
|
|
1074
|
+
required: false
|
|
1075
|
+
}]
|
|
1076
|
+
}],
|
|
1077
|
+
swipeThreshold: [{
|
|
1078
|
+
type: i0.Input,
|
|
1079
|
+
args: [{
|
|
1080
|
+
isSignal: true,
|
|
1081
|
+
alias: "swipeThreshold",
|
|
1082
|
+
required: false
|
|
1083
|
+
}]
|
|
1084
|
+
}],
|
|
1085
|
+
ariaLabel: [{
|
|
1086
|
+
type: i0.Input,
|
|
1087
|
+
args: [{
|
|
1088
|
+
isSignal: true,
|
|
1089
|
+
alias: "ariaLabel",
|
|
1090
|
+
required: false
|
|
1091
|
+
}]
|
|
1092
|
+
}],
|
|
1093
|
+
closeAriaLabel: [{
|
|
1094
|
+
type: i0.Input,
|
|
1095
|
+
args: [{
|
|
1096
|
+
isSignal: true,
|
|
1097
|
+
alias: "closeAriaLabel",
|
|
1098
|
+
required: false
|
|
1099
|
+
}]
|
|
1100
|
+
}],
|
|
1101
|
+
closed: [{
|
|
1102
|
+
type: i0.Output,
|
|
1103
|
+
args: ["closed"]
|
|
1104
|
+
}]
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
411
1107
|
const AerisToastModule = [
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
1108
|
+
AerisToast,
|
|
1109
|
+
AerisToastContentTemplate,
|
|
1110
|
+
AerisToastIconTemplate
|
|
415
1111
|
];
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Generated bundle index. Do not edit.
|
|
419
|
-
*/
|
|
420
|
-
|
|
421
1112
|
export { AerisToast, AerisToastContentTemplate, AerisToastIconTemplate, AerisToastModule, AerisToastService };
|
|
422
|
-
|
|
1113
|
+
|
|
1114
|
+
//# sourceMappingURL=aeris-ui-core-toast.mjs.map
|