@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.2
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 +191 -191
- package/fesm2022/aeris-ui-core-accordion.mjs +14 -14
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +3 -3
- package/fesm2022/aeris-ui-core-auto-complete.mjs +17 -17
- package/fesm2022/aeris-ui-core-auto-focus.mjs +3 -3
- package/fesm2022/aeris-ui-core-avatar.mjs +9 -9
- package/fesm2022/aeris-ui-core-badge.mjs +10 -10
- package/fesm2022/aeris-ui-core-block-ui.mjs +3 -3
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +14 -14
- package/fesm2022/aeris-ui-core-button-group.mjs +3 -3
- package/fesm2022/aeris-ui-core-button.mjs +10 -10
- package/fesm2022/aeris-ui-core-card.mjs +18 -18
- package/fesm2022/aeris-ui-core-carousel.mjs +14 -14
- package/fesm2022/aeris-ui-core-cascade-select.mjs +11 -11
- package/fesm2022/aeris-ui-core-chart.mjs +5 -5
- package/fesm2022/aeris-ui-core-checkbox.mjs +5 -5
- package/fesm2022/aeris-ui-core-chip.mjs +11 -11
- package/fesm2022/aeris-ui-core-class-names.mjs +3 -3
- package/fesm2022/aeris-ui-core-color-picker.mjs +7 -7
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +14 -14
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +18 -18
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +20 -20
- package/fesm2022/aeris-ui-core-context-menu.mjs +8 -8
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +5 -5
- package/fesm2022/aeris-ui-core-dialog.mjs +17 -17
- package/fesm2022/aeris-ui-core-divider.mjs +3 -3
- package/fesm2022/aeris-ui-core-drawer.mjs +17 -17
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +6 -6
- package/fesm2022/aeris-ui-core-editor.mjs +3 -3
- package/fesm2022/aeris-ui-core-file-upload.mjs +24 -24
- package/fesm2022/aeris-ui-core-filter-service.mjs +3 -3
- package/fesm2022/aeris-ui-core-fluid.mjs +3 -3
- package/fesm2022/aeris-ui-core-focus-trap.mjs +3 -3
- package/fesm2022/aeris-ui-core-galleria.mjs +29 -29
- package/fesm2022/aeris-ui-core-glass.mjs +3 -3
- package/fesm2022/aeris-ui-core-icon-field.mjs +14 -14
- package/fesm2022/aeris-ui-core-inplace.mjs +11 -11
- package/fesm2022/aeris-ui-core-input-group.mjs +16 -16
- package/fesm2022/aeris-ui-core-input-mask.mjs +5 -5
- package/fesm2022/aeris-ui-core-input-number.mjs +5 -5
- package/fesm2022/aeris-ui-core-input-otp.mjs +8 -8
- package/fesm2022/aeris-ui-core-input-text.mjs +8 -8
- package/fesm2022/aeris-ui-core-key-filter.mjs +3 -3
- package/fesm2022/aeris-ui-core-mega-menu.mjs +8 -8
- package/fesm2022/aeris-ui-core-menu.mjs +17 -17
- package/fesm2022/aeris-ui-core-menubar.mjs +14 -14
- package/fesm2022/aeris-ui-core-message.mjs +11 -11
- package/fesm2022/aeris-ui-core-meter-group.mjs +17 -17
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +20 -20
- package/fesm2022/aeris-ui-core-order-list.mjs +11 -11
- package/fesm2022/aeris-ui-core-organization-chart.mjs +11 -11
- package/fesm2022/aeris-ui-core-paginator.mjs +5 -5
- package/fesm2022/aeris-ui-core-panel.mjs +17 -17
- package/fesm2022/aeris-ui-core-password.mjs +14 -14
- package/fesm2022/aeris-ui-core-pick-list.mjs +11 -11
- package/fesm2022/aeris-ui-core-popover.mjs +17 -17
- package/fesm2022/aeris-ui-core-progress-bar.mjs +11 -11
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +8 -8
- package/fesm2022/aeris-ui-core-radio-button.mjs +5 -5
- package/fesm2022/aeris-ui-core-rating.mjs +5 -5
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +5 -5
- package/fesm2022/aeris-ui-core-scroll-top.mjs +5 -5
- package/fesm2022/aeris-ui-core-select.mjs +38 -38
- package/fesm2022/aeris-ui-core-skeleton.mjs +3 -3
- package/fesm2022/aeris-ui-core-slider.mjs +5 -5
- package/fesm2022/aeris-ui-core-speed-dial.mjs +5 -5
- package/fesm2022/aeris-ui-core-split-button.mjs +5 -5
- package/fesm2022/aeris-ui-core-splitter.mjs +8 -8
- package/fesm2022/aeris-ui-core-stepper.mjs +14 -14
- package/fesm2022/aeris-ui-core-style-class.mjs +3 -3
- package/fesm2022/aeris-ui-core-table.mjs +20 -20
- package/fesm2022/aeris-ui-core-tabs.mjs +33 -21
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +8 -8
- package/fesm2022/aeris-ui-core-theme-builder.mjs +33 -10
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +3 -3
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +8 -8
- package/fesm2022/aeris-ui-core-timeline.mjs +17 -17
- package/fesm2022/aeris-ui-core-toast.mjs +553 -158
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +5 -5
- package/fesm2022/aeris-ui-core-toolbar.mjs +18 -18
- package/fesm2022/aeris-ui-core-tooltip.mjs +6 -6
- package/fesm2022/aeris-ui-core-tree-select.mjs +20 -20
- package/fesm2022/aeris-ui-core-tree-table.mjs +17 -17
- package/fesm2022/aeris-ui-core-tree.mjs +14 -14
- package/fesm2022/aeris-ui-core.mjs +1 -1
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +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.js +5 -5
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +9 -9
- package/styles/controls.css +3 -3
- package/types/aeris-ui-core-badge.d.ts +2 -2
- package/types/aeris-ui-core-breadcrumb.d.ts +1 -1
- package/types/aeris-ui-core-progress-spinner.d.ts +1 -1
- package/types/aeris-ui-core-splitter.d.ts +1 -1
- package/types/aeris-ui-core-tabs.d.ts +1 -1
- package/types/aeris-ui-core-theme-builder.d.ts +5 -5
- package/types/aeris-ui-core-toast.d.ts +45 -8
- package/types/aeris-ui-core.d.ts +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, TemplateRef, Directive, signal, Service, contentChild, input, numberAttribute, booleanAttribute, output, computed, effect, Component } from '@angular/core';
|
|
3
|
+
import { inject, TemplateRef, Directive, signal, Service, DestroyRef, viewChildren, contentChild, input, numberAttribute, booleanAttribute, output, computed, effect, Component } from '@angular/core';
|
|
4
|
+
import { aerisInternalCreateFrameScheduler } from '@aeris-ui/core';
|
|
4
5
|
|
|
5
6
|
class AerisToastEventStream {
|
|
6
7
|
listeners = new Set();
|
|
@@ -19,19 +20,19 @@ class AerisToastEventStream {
|
|
|
19
20
|
}
|
|
20
21
|
class AerisToastContentTemplate {
|
|
21
22
|
template = inject(TemplateRef);
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
23
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToastContentTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: AerisToastContentTemplate, isStandalone: true, selector: "ng-template[aerisToastContent]", ngImport: i0 });
|
|
24
25
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToastContentTemplate, decorators: [{
|
|
26
27
|
type: Directive,
|
|
27
28
|
args: [{ selector: 'ng-template[aerisToastContent]' }]
|
|
28
29
|
}] });
|
|
29
30
|
class AerisToastIconTemplate {
|
|
30
31
|
template = inject(TemplateRef);
|
|
31
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
32
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToastIconTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: AerisToastIconTemplate, isStandalone: true, selector: "ng-template[aerisToastIcon]", ngImport: i0 });
|
|
33
34
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToastIconTemplate, decorators: [{
|
|
35
36
|
type: Directive,
|
|
36
37
|
args: [{ selector: 'ng-template[aerisToastIcon]' }]
|
|
37
38
|
}] });
|
|
@@ -45,13 +46,26 @@ class AerisToastService {
|
|
|
45
46
|
closed = this.closedStream;
|
|
46
47
|
show(message) {
|
|
47
48
|
const resolved = this.resolveMessage(message);
|
|
48
|
-
this.store.update((messages) => [
|
|
49
|
+
this.store.update((messages) => [
|
|
50
|
+
...messages.filter((item) => item.id !== resolved.id),
|
|
51
|
+
resolved,
|
|
52
|
+
]);
|
|
49
53
|
this.clearTimer(resolved.id);
|
|
50
54
|
this.schedule(resolved);
|
|
51
55
|
return resolved;
|
|
52
56
|
}
|
|
53
57
|
showAll(messages) {
|
|
54
|
-
|
|
58
|
+
const resolved = messages.map((message) => this.resolveMessage(message));
|
|
59
|
+
const resolvedIds = new Set(resolved.map((message) => message.id));
|
|
60
|
+
this.store.update((current) => [
|
|
61
|
+
...current.filter((message) => !resolvedIds.has(message.id)),
|
|
62
|
+
...resolved,
|
|
63
|
+
]);
|
|
64
|
+
for (const message of resolved) {
|
|
65
|
+
this.clearTimer(message.id);
|
|
66
|
+
this.schedule(message);
|
|
67
|
+
}
|
|
68
|
+
return resolved;
|
|
55
69
|
}
|
|
56
70
|
remove(id, reason = 'api') {
|
|
57
71
|
const message = this.store().find((item) => item.id === id);
|
|
@@ -63,13 +77,10 @@ class AerisToastService {
|
|
|
63
77
|
}
|
|
64
78
|
clear(group = '') {
|
|
65
79
|
const targets = this.store().filter((message) => message.group === group);
|
|
66
|
-
|
|
67
|
-
this.remove(message.id, 'clear');
|
|
80
|
+
this.removeMany(targets, 'clear');
|
|
68
81
|
}
|
|
69
82
|
clearAll() {
|
|
70
|
-
|
|
71
|
-
for (const message of targets)
|
|
72
|
-
this.remove(message.id, 'clear');
|
|
83
|
+
this.removeMany(this.store(), 'clear');
|
|
73
84
|
}
|
|
74
85
|
pause(id) {
|
|
75
86
|
const timer = this.timers.get(id);
|
|
@@ -105,6 +116,16 @@ class AerisToastService {
|
|
|
105
116
|
globalThis.clearTimeout(timer.handle);
|
|
106
117
|
this.timers.delete(id);
|
|
107
118
|
}
|
|
119
|
+
removeMany(targets, reason) {
|
|
120
|
+
if (targets.length === 0)
|
|
121
|
+
return;
|
|
122
|
+
const targetIds = new Set(targets.map((message) => message.id));
|
|
123
|
+
this.store.update((messages) => messages.filter((message) => !targetIds.has(message.id)));
|
|
124
|
+
for (const message of targets) {
|
|
125
|
+
this.clearTimer(message.id);
|
|
126
|
+
this.closedStream.next({ message, reason });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
108
129
|
resolveMessage(input) {
|
|
109
130
|
const severity = input.severity ?? 'info';
|
|
110
131
|
const role = input.role ?? (severity === 'error' || severity === 'warning' ? 'alert' : 'status');
|
|
@@ -124,19 +145,35 @@ class AerisToastService {
|
|
|
124
145
|
createdAt: Date.now(),
|
|
125
146
|
};
|
|
126
147
|
}
|
|
127
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
128
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.
|
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToastService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
149
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.7", ngImport: i0, type: AerisToastService });
|
|
129
150
|
}
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToastService, decorators: [{
|
|
131
152
|
type: Service
|
|
132
153
|
}] });
|
|
133
154
|
class AerisToast {
|
|
155
|
+
static fallbackHeight = 72;
|
|
156
|
+
static swipeRemovalDelay = 550;
|
|
157
|
+
static reverseCancelThreshold = 10;
|
|
158
|
+
static minimumDragThreshold = 1;
|
|
134
159
|
toastService = inject(AerisToastService);
|
|
160
|
+
destroyRef = inject(DestroyRef);
|
|
161
|
+
messageElements = viewChildren('toastMessage', /* @ts-ignore */
|
|
162
|
+
...(ngDevMode ? [{ debugName: "messageElements" }] : /* istanbul ignore next */ []));
|
|
163
|
+
measuredHeights = signal({}, /* @ts-ignore */
|
|
164
|
+
...(ngDevMode ? [{ debugName: "measuredHeights" }] : /* istanbul ignore next */ []));
|
|
165
|
+
swipeVisuals = signal({}, /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "swipeVisuals" }] : /* istanbul ignore next */ []));
|
|
167
|
+
swipeCleanupTimers = new Map();
|
|
168
|
+
pendingSwipeRemovals = new Map();
|
|
169
|
+
measureFrame = aerisInternalCreateFrameScheduler(() => this.measureMessages());
|
|
170
|
+
swipeFrame = aerisInternalCreateFrameScheduler(() => this.flushSwipeVisual());
|
|
171
|
+
swipeSession = null;
|
|
135
172
|
contentTemplate = contentChild(AerisToastContentTemplate, /* @ts-ignore */
|
|
136
173
|
...(ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
|
|
137
174
|
iconTemplate = contentChild(AerisToastIconTemplate, /* @ts-ignore */
|
|
138
175
|
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
139
|
-
position = input('
|
|
176
|
+
position = input('bottom-right', /* @ts-ignore */
|
|
140
177
|
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
141
178
|
group = input('', /* @ts-ignore */
|
|
142
179
|
...(ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []));
|
|
@@ -147,6 +184,12 @@ class AerisToast {
|
|
|
147
184
|
newestOnTop = input(true, { ...(ngDevMode ? { debugName: "newestOnTop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
148
185
|
pauseOnHover = input(true, { ...(ngDevMode ? { debugName: "pauseOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
149
186
|
showClose = input(true, { ...(ngDevMode ? { debugName: "showClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
187
|
+
swipeDirection = input([
|
|
188
|
+
'down',
|
|
189
|
+
'right',
|
|
190
|
+
], /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "swipeDirection" }] : /* istanbul ignore next */ []));
|
|
192
|
+
swipeThreshold = input(40, { ...(ngDevMode ? { debugName: "swipeThreshold" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
150
193
|
ariaLabel = input('Notifications', /* @ts-ignore */
|
|
151
194
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
152
195
|
closeAriaLabel = input('Close notification', /* @ts-ignore */
|
|
@@ -154,6 +197,17 @@ class AerisToast {
|
|
|
154
197
|
closed = output();
|
|
155
198
|
stackHovered = signal(false, /* @ts-ignore */
|
|
156
199
|
...(ngDevMode ? [{ debugName: "stackHovered" }] : /* istanbul ignore next */ []));
|
|
200
|
+
resolvedSwipeDirections = computed(() => {
|
|
201
|
+
const value = this.swipeDirection();
|
|
202
|
+
const directions = Array.isArray(value) ? value : [value];
|
|
203
|
+
return [...new Set(directions)].filter((direction) => direction === 'up' || direction === 'down' || direction === 'left' || direction === 'right');
|
|
204
|
+
}, /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "resolvedSwipeDirections" }] : /* istanbul ignore next */ []));
|
|
206
|
+
resolvedSwipeThreshold = computed(() => {
|
|
207
|
+
const threshold = this.swipeThreshold();
|
|
208
|
+
return Number.isFinite(threshold) && threshold >= 0 ? threshold : 40;
|
|
209
|
+
}, /* @ts-ignore */
|
|
210
|
+
...(ngDevMode ? [{ debugName: "resolvedSwipeThreshold" }] : /* istanbul ignore next */ []));
|
|
157
211
|
orderedMessages = computed(() => {
|
|
158
212
|
const group = this.group();
|
|
159
213
|
const filtered = this.toastService.messages().filter((message) => message.group === group);
|
|
@@ -177,19 +231,37 @@ class AerisToast {
|
|
|
177
231
|
...(ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []));
|
|
178
232
|
visibleStackSize = computed(() => `${this.visibleMessages().length}`, /* @ts-ignore */
|
|
179
233
|
...(ngDevMode ? [{ debugName: "visibleStackSize" }] : /* istanbul ignore next */ []));
|
|
234
|
+
hasVisibleMessages = computed(() => this.visibleMessages().length > 0, /* @ts-ignore */
|
|
235
|
+
...(ngDevMode ? [{ debugName: "hasVisibleMessages" }] : /* istanbul ignore next */ []));
|
|
180
236
|
visibleStack = computed(() => {
|
|
181
237
|
const messages = this.visibleMessages();
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
238
|
+
const heights = this.measuredHeights();
|
|
239
|
+
const swipeVisuals = this.swipeVisuals();
|
|
240
|
+
const frontHeight = messages[0]
|
|
241
|
+
? (heights[messages[0].id] ?? AerisToast.fallbackHeight)
|
|
242
|
+
: AerisToast.fallbackHeight;
|
|
243
|
+
let heightOffset = 0;
|
|
244
|
+
return messages.map((message, stackIndex) => {
|
|
245
|
+
const height = heights[message.id] ?? AerisToast.fallbackHeight;
|
|
246
|
+
const swipe = swipeVisuals[message.id];
|
|
247
|
+
const item = {
|
|
248
|
+
message,
|
|
249
|
+
stackIndex,
|
|
250
|
+
stackIndexValue: `${stackIndex}`,
|
|
251
|
+
stackSizeValue: `${messages.length}`,
|
|
252
|
+
heightValue: `${height}px`,
|
|
253
|
+
frontHeightValue: `${frontHeight}px`,
|
|
254
|
+
heightOffsetValue: `${heightOffset}px`,
|
|
255
|
+
primary: stackIndex === 0,
|
|
256
|
+
swipeXValue: `${swipe?.x ?? 0}px`,
|
|
257
|
+
swipeYValue: `${swipe?.y ?? 0}px`,
|
|
258
|
+
swipeDirection: swipe?.direction,
|
|
259
|
+
swiping: swipe?.phase === 'dragging',
|
|
260
|
+
swipeDismissing: swipe?.phase === 'dismissing',
|
|
261
|
+
};
|
|
262
|
+
heightOffset += height;
|
|
263
|
+
return item;
|
|
264
|
+
});
|
|
193
265
|
}, /* @ts-ignore */
|
|
194
266
|
...(ngDevMode ? [{ debugName: "visibleStack" }] : /* istanbul ignore next */ []));
|
|
195
267
|
templateContexts = computed(() => {
|
|
@@ -205,6 +277,19 @@ class AerisToast {
|
|
|
205
277
|
}, /* @ts-ignore */
|
|
206
278
|
...(ngDevMode ? [{ debugName: "templateContexts" }] : /* istanbul ignore next */ []));
|
|
207
279
|
constructor() {
|
|
280
|
+
effect((onCleanup) => {
|
|
281
|
+
const elements = this.messageElements().map((element) => element.nativeElement);
|
|
282
|
+
this.measureFrame.schedule();
|
|
283
|
+
if (typeof globalThis.ResizeObserver !== 'function')
|
|
284
|
+
return;
|
|
285
|
+
const observer = new ResizeObserver(() => this.measureFrame.schedule());
|
|
286
|
+
for (const element of elements)
|
|
287
|
+
observer.observe(element);
|
|
288
|
+
onCleanup(() => {
|
|
289
|
+
observer.disconnect();
|
|
290
|
+
this.measureFrame.cancel();
|
|
291
|
+
});
|
|
292
|
+
});
|
|
208
293
|
effect((onCleanup) => {
|
|
209
294
|
const group = this.group();
|
|
210
295
|
const subscription = this.toastService.closed.subscribe((event) => {
|
|
@@ -216,9 +301,10 @@ class AerisToast {
|
|
|
216
301
|
});
|
|
217
302
|
effect(() => {
|
|
218
303
|
const visibleIds = new Set(this.visibleMessages().map((message) => message.id));
|
|
304
|
+
const gestureIds = new Set(Object.keys(this.swipeVisuals()));
|
|
219
305
|
const pauseVisible = this.stackHovered() && this.pauseOnHover();
|
|
220
306
|
for (const message of this.orderedMessages()) {
|
|
221
|
-
if (visibleIds.has(message.id) && !pauseVisible) {
|
|
307
|
+
if (visibleIds.has(message.id) && !pauseVisible && !gestureIds.has(message.id)) {
|
|
222
308
|
this.toastService.resume(message.id);
|
|
223
309
|
}
|
|
224
310
|
else {
|
|
@@ -226,6 +312,17 @@ class AerisToast {
|
|
|
226
312
|
}
|
|
227
313
|
}
|
|
228
314
|
});
|
|
315
|
+
this.destroyRef.onDestroy(() => {
|
|
316
|
+
this.measureFrame.cancel();
|
|
317
|
+
this.swipeFrame.cancel();
|
|
318
|
+
for (const cancel of this.pendingSwipeRemovals.values())
|
|
319
|
+
cancel();
|
|
320
|
+
for (const timer of this.swipeCleanupTimers.values())
|
|
321
|
+
globalThis.clearTimeout(timer);
|
|
322
|
+
this.pendingSwipeRemovals.clear();
|
|
323
|
+
this.swipeCleanupTimers.clear();
|
|
324
|
+
this.swipeSession = null;
|
|
325
|
+
});
|
|
229
326
|
}
|
|
230
327
|
close(message) {
|
|
231
328
|
this.toastService.remove(message.id, 'close-button');
|
|
@@ -241,26 +338,288 @@ class AerisToast {
|
|
|
241
338
|
this.stackHovered.set(false);
|
|
242
339
|
if (!this.pauseOnHover())
|
|
243
340
|
return;
|
|
244
|
-
|
|
245
|
-
|
|
341
|
+
const gestureIds = new Set(Object.keys(this.swipeVisuals()));
|
|
342
|
+
for (const message of this.visibleMessages()) {
|
|
343
|
+
if (!gestureIds.has(message.id))
|
|
344
|
+
this.toastService.resume(message.id);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
handlePointerDown(event, message) {
|
|
348
|
+
if (this.resolvedSwipeDirections().length === 0 || this.swipeSession)
|
|
349
|
+
return;
|
|
350
|
+
if (event.pointerType === 'mouse' && event.button !== 0)
|
|
351
|
+
return;
|
|
352
|
+
const target = event.target;
|
|
353
|
+
if (target?.closest('button,a,input,textarea,select,[role="button"],[data-aeris-toast-swipe-ignore]')) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
357
|
+
this.toastService.pause(message.id);
|
|
358
|
+
this.swipeSession = {
|
|
359
|
+
message,
|
|
360
|
+
pointerId: event.pointerId,
|
|
361
|
+
startX: event.clientX,
|
|
362
|
+
startY: event.clientY,
|
|
363
|
+
lastX: event.clientX,
|
|
364
|
+
lastY: event.clientY,
|
|
365
|
+
baselineX: event.clientX,
|
|
366
|
+
baselineY: event.clientY,
|
|
367
|
+
deltaX: 0,
|
|
368
|
+
deltaY: 0,
|
|
369
|
+
visualX: 0,
|
|
370
|
+
visualY: 0,
|
|
371
|
+
firstMove: true,
|
|
372
|
+
realSwipe: false,
|
|
373
|
+
lockedAxis: null,
|
|
374
|
+
intendedDirection: undefined,
|
|
375
|
+
maxDisplacement: 0,
|
|
376
|
+
cancelled: false,
|
|
377
|
+
};
|
|
378
|
+
this.setSwipeVisual(message.id, {
|
|
379
|
+
x: 0,
|
|
380
|
+
y: 0,
|
|
381
|
+
direction: undefined,
|
|
382
|
+
phase: 'dragging',
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
handlePointerMove(event) {
|
|
386
|
+
const session = this.swipeSession;
|
|
387
|
+
if (!session || event.pointerId !== session.pointerId)
|
|
388
|
+
return;
|
|
389
|
+
event.preventDefault();
|
|
390
|
+
this.updateSwipeSession(session, event.clientX, event.clientY);
|
|
391
|
+
this.swipeFrame.schedule();
|
|
392
|
+
}
|
|
393
|
+
handlePointerEnd(event) {
|
|
394
|
+
const session = this.swipeSession;
|
|
395
|
+
if (!session || event.pointerId !== session.pointerId)
|
|
396
|
+
return;
|
|
397
|
+
const target = event.currentTarget;
|
|
398
|
+
if (target.hasPointerCapture?.(event.pointerId))
|
|
399
|
+
target.releasePointerCapture(event.pointerId);
|
|
400
|
+
this.swipeFrame.cancel();
|
|
401
|
+
if (!session.firstMove)
|
|
402
|
+
this.updateSwipeSession(session, event.clientX, event.clientY);
|
|
403
|
+
this.flushSwipeVisual();
|
|
404
|
+
const dismissDirection = event.type === 'pointercancel' || session.cancelled
|
|
405
|
+
? undefined
|
|
406
|
+
: this.resolvedSwipeDirections().find((direction) => this.swipeDisplacement(direction, session.deltaX, session.deltaY) >
|
|
407
|
+
this.resolvedSwipeThreshold());
|
|
408
|
+
this.swipeSession = null;
|
|
409
|
+
if (dismissDirection) {
|
|
410
|
+
this.setSwipeVisual(session.message.id, {
|
|
411
|
+
x: session.visualX,
|
|
412
|
+
y: session.visualY,
|
|
413
|
+
direction: dismissDirection,
|
|
414
|
+
phase: 'dismissing',
|
|
415
|
+
});
|
|
416
|
+
this.scheduleSwipeRemoval(session.message);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
this.removeSwipeVisual(session.message.id);
|
|
420
|
+
if (!(this.stackHovered() && this.pauseOnHover())) {
|
|
421
|
+
this.toastService.resume(session.message.id);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
measureMessages() {
|
|
425
|
+
const measurements = {};
|
|
426
|
+
for (const reference of this.messageElements()) {
|
|
427
|
+
const element = reference.nativeElement;
|
|
428
|
+
const id = element.dataset['toastId'];
|
|
429
|
+
if (!id)
|
|
430
|
+
continue;
|
|
431
|
+
const contentHeight = Math.max(element.scrollHeight, element.getBoundingClientRect().height);
|
|
432
|
+
if (contentHeight > 0)
|
|
433
|
+
measurements[id] = Math.ceil(contentHeight + 2);
|
|
434
|
+
}
|
|
435
|
+
this.measuredHeights.update((current) => {
|
|
436
|
+
const ids = Object.keys(measurements);
|
|
437
|
+
const unchanged = ids.length === Object.keys(current).length &&
|
|
438
|
+
ids.every((id) => current[id] === measurements[id]);
|
|
439
|
+
return unchanged ? current : measurements;
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
updateSwipeSession(session, clientX, clientY) {
|
|
443
|
+
if (session.firstMove) {
|
|
444
|
+
session.startX = clientX;
|
|
445
|
+
session.startY = clientY;
|
|
446
|
+
session.lastX = clientX;
|
|
447
|
+
session.lastY = clientY;
|
|
448
|
+
session.baselineX = clientX;
|
|
449
|
+
session.baselineY = clientY;
|
|
450
|
+
session.firstMove = false;
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
const movementX = clientX - session.lastX;
|
|
454
|
+
const movementY = clientY - session.lastY;
|
|
455
|
+
session.lastX = clientX;
|
|
456
|
+
session.lastY = clientY;
|
|
457
|
+
if ((movementY < 0 && clientY > session.baselineY) ||
|
|
458
|
+
(movementY > 0 && clientY < session.baselineY)) {
|
|
459
|
+
session.baselineY = clientY;
|
|
460
|
+
}
|
|
461
|
+
if ((movementX < 0 && clientX > session.baselineX) ||
|
|
462
|
+
(movementX > 0 && clientX < session.baselineX)) {
|
|
463
|
+
session.baselineX = clientX;
|
|
464
|
+
}
|
|
465
|
+
const deltaX = clientX - session.startX;
|
|
466
|
+
const deltaY = clientY - session.startY;
|
|
467
|
+
session.deltaX = deltaX;
|
|
468
|
+
session.deltaY = deltaY;
|
|
469
|
+
const directions = this.resolvedSwipeDirections();
|
|
470
|
+
const hasHorizontal = directions.includes('left') || directions.includes('right');
|
|
471
|
+
const hasVertical = directions.includes('up') || directions.includes('down');
|
|
472
|
+
if (!session.realSwipe) {
|
|
473
|
+
const distance = Math.hypot(deltaX, deltaY);
|
|
474
|
+
if (distance >= AerisToast.minimumDragThreshold) {
|
|
475
|
+
session.realSwipe = true;
|
|
476
|
+
if (hasHorizontal && hasVertical) {
|
|
477
|
+
session.lockedAxis = Math.abs(deltaX) > Math.abs(deltaY) ? 'horizontal' : 'vertical';
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
if (!session.intendedDirection) {
|
|
482
|
+
const candidate = this.swipeCandidate(session.lockedAxis, deltaX, deltaY);
|
|
483
|
+
if (candidate && directions.includes(candidate)) {
|
|
484
|
+
session.intendedDirection = candidate;
|
|
485
|
+
session.maxDisplacement = this.swipeDisplacement(candidate, deltaX, deltaY);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
const cancelDeltaX = clientX - session.baselineX;
|
|
490
|
+
const cancelDeltaY = clientY - session.baselineY;
|
|
491
|
+
const currentDisplacement = this.swipeDisplacement(session.intendedDirection, cancelDeltaX, cancelDeltaY);
|
|
492
|
+
const displacement = this.swipeDisplacement(session.intendedDirection, deltaX, deltaY);
|
|
493
|
+
session.maxDisplacement = Math.max(session.maxDisplacement, displacement);
|
|
494
|
+
if (currentDisplacement > this.resolvedSwipeThreshold()) {
|
|
495
|
+
session.cancelled = false;
|
|
496
|
+
}
|
|
497
|
+
else if (!this.hasOppositeSwipeDirection(session.intendedDirection, directions) &&
|
|
498
|
+
session.maxDisplacement - currentDisplacement >= AerisToast.reverseCancelThreshold) {
|
|
499
|
+
session.cancelled = true;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
const dampedX = this.dampedSwipeDelta(deltaX, 'left', 'right', directions);
|
|
503
|
+
const dampedY = this.dampedSwipeDelta(deltaY, 'up', 'down', directions);
|
|
504
|
+
session.visualX = session.lockedAxis !== 'vertical' && hasHorizontal ? dampedX : 0;
|
|
505
|
+
session.visualY = session.lockedAxis !== 'horizontal' && hasVertical ? dampedY : 0;
|
|
506
|
+
}
|
|
507
|
+
flushSwipeVisual() {
|
|
508
|
+
const session = this.swipeSession;
|
|
509
|
+
if (!session)
|
|
510
|
+
return;
|
|
511
|
+
this.setSwipeVisual(session.message.id, {
|
|
512
|
+
x: session.visualX,
|
|
513
|
+
y: session.visualY,
|
|
514
|
+
direction: session.cancelled ? undefined : session.intendedDirection,
|
|
515
|
+
phase: 'dragging',
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
setSwipeVisual(id, visual) {
|
|
519
|
+
this.swipeVisuals.update((current) => ({ ...current, [id]: visual }));
|
|
520
|
+
}
|
|
521
|
+
removeSwipeVisual(id) {
|
|
522
|
+
this.swipeVisuals.update((current) => {
|
|
523
|
+
if (!(id in current))
|
|
524
|
+
return current;
|
|
525
|
+
const next = { ...current };
|
|
526
|
+
delete next[id];
|
|
527
|
+
return next;
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
scheduleSwipeRemoval(message) {
|
|
531
|
+
this.pendingSwipeRemovals.get(message.id)?.();
|
|
532
|
+
const remove = () => {
|
|
533
|
+
this.pendingSwipeRemovals.delete(message.id);
|
|
534
|
+
this.toastService.remove(message.id, 'swipe');
|
|
535
|
+
const cleanup = globalThis.setTimeout(() => {
|
|
536
|
+
this.swipeCleanupTimers.delete(message.id);
|
|
537
|
+
this.removeSwipeVisual(message.id);
|
|
538
|
+
}, AerisToast.swipeRemovalDelay);
|
|
539
|
+
this.swipeCleanupTimers.set(message.id, cleanup);
|
|
540
|
+
};
|
|
541
|
+
if (typeof globalThis.requestAnimationFrame === 'function') {
|
|
542
|
+
const frame = globalThis.requestAnimationFrame(remove);
|
|
543
|
+
this.pendingSwipeRemovals.set(message.id, () => globalThis.cancelAnimationFrame?.(frame));
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
const timer = globalThis.setTimeout(remove, 0);
|
|
547
|
+
this.pendingSwipeRemovals.set(message.id, () => globalThis.clearTimeout(timer));
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
swipeCandidate(lockedAxis, deltaX, deltaY) {
|
|
551
|
+
if (lockedAxis === 'vertical')
|
|
552
|
+
return deltaY > 0 ? 'down' : deltaY < 0 ? 'up' : undefined;
|
|
553
|
+
if (lockedAxis === 'horizontal') {
|
|
554
|
+
return deltaX > 0 ? 'right' : deltaX < 0 ? 'left' : undefined;
|
|
555
|
+
}
|
|
556
|
+
if (Math.abs(deltaX) >= Math.abs(deltaY)) {
|
|
557
|
+
return deltaX > 0 ? 'right' : deltaX < 0 ? 'left' : undefined;
|
|
558
|
+
}
|
|
559
|
+
return deltaY > 0 ? 'down' : deltaY < 0 ? 'up' : undefined;
|
|
560
|
+
}
|
|
561
|
+
swipeDisplacement(direction, deltaX, deltaY) {
|
|
562
|
+
if (direction === 'right')
|
|
563
|
+
return deltaX;
|
|
564
|
+
if (direction === 'left')
|
|
565
|
+
return -deltaX;
|
|
566
|
+
if (direction === 'down')
|
|
567
|
+
return deltaY;
|
|
568
|
+
return -deltaY;
|
|
569
|
+
}
|
|
570
|
+
dampedSwipeDelta(delta, negativeDirection, positiveDirection, directions) {
|
|
571
|
+
const unsupported = (delta > 0 && !directions.includes(positiveDirection)) ||
|
|
572
|
+
(delta < 0 && !directions.includes(negativeDirection));
|
|
573
|
+
if (!unsupported)
|
|
574
|
+
return delta;
|
|
575
|
+
return Math.sign(delta) * Math.sqrt(Math.abs(delta));
|
|
246
576
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
577
|
+
hasOppositeSwipeDirection(direction, directions) {
|
|
578
|
+
if (direction === 'left')
|
|
579
|
+
return directions.includes('right');
|
|
580
|
+
if (direction === 'right')
|
|
581
|
+
return directions.includes('left');
|
|
582
|
+
if (direction === 'up')
|
|
583
|
+
return directions.includes('down');
|
|
584
|
+
return directions.includes('up');
|
|
585
|
+
}
|
|
586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToast, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
587
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: AerisToast, isStandalone: true, selector: "aeris-toast", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, visibleCount: { classPropertyName: "visibleCount", publicName: "visibleCount", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, newestOnTop: { classPropertyName: "newestOnTop", publicName: "newestOnTop", isSignal: true, isRequired: false, transformFunction: null }, pauseOnHover: { classPropertyName: "pauseOnHover", publicName: "pauseOnHover", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, swipeDirection: { classPropertyName: "swipeDirection", publicName: "swipeDirection", isSignal: true, isRequired: false, transformFunction: null }, swipeThreshold: { classPropertyName: "swipeThreshold", publicName: "swipeThreshold", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.data-position": "position()" }, classAttribute: "aeris-toast" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: AerisToastContentTemplate, descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: AerisToastIconTemplate, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "messageElements", predicate: ["toastMessage"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
588
|
+
<section
|
|
589
|
+
class="aeris-toast__region"
|
|
590
|
+
[attr.aria-label]="hasVisibleMessages() ? ariaLabel() : null"
|
|
591
|
+
[attr.data-empty]="!hasVisibleMessages() || null"
|
|
592
|
+
[attr.data-position]="position()"
|
|
593
|
+
[attr.data-mode]="mode()"
|
|
594
|
+
[attr.data-newest-on-top]="newestOnTop() || null"
|
|
595
|
+
[attr.data-overflow]="hiddenCount() > 0 || null"
|
|
596
|
+
[style.--aeris-toast-stack-size]="visibleStackSize()"
|
|
597
|
+
(pointerenter)="pauseVisible()"
|
|
598
|
+
(pointerleave)="resumeVisible()"
|
|
599
|
+
(focusin)="pauseVisible()"
|
|
600
|
+
(focusout)="resumeVisible()"
|
|
601
|
+
>
|
|
602
|
+
@for (item of visibleStack(); track item.message.id) {
|
|
603
|
+
<div
|
|
604
|
+
class="aeris-toast__item"
|
|
605
|
+
[attr.data-stack-index]="item.stackIndex"
|
|
606
|
+
[attr.data-primary]="item.primary || null"
|
|
607
|
+
[attr.data-swiping]="item.swiping || null"
|
|
608
|
+
[attr.data-swipe-direction]="item.swipeDirection || null"
|
|
609
|
+
[attr.data-swipe-dismissing]="item.swipeDismissing || null"
|
|
610
|
+
[style.--aeris-toast-stack-index]="item.stackIndexValue"
|
|
611
|
+
[style.--aeris-toast-stack-size]="item.stackSizeValue"
|
|
612
|
+
[style.--aeris-toast-height]="item.heightValue"
|
|
613
|
+
[style.--aeris-toast-front-height]="item.frontHeightValue"
|
|
614
|
+
[style.--aeris-toast-height-offset]="item.heightOffsetValue"
|
|
615
|
+
[style.--aeris-toast-swipe-x]="item.swipeXValue"
|
|
616
|
+
[style.--aeris-toast-swipe-y]="item.swipeYValue"
|
|
617
|
+
animate.leave="aeris-toast__item--leaving"
|
|
618
|
+
(pointerdown)="handlePointerDown($event, item.message)"
|
|
619
|
+
(pointermove)="handlePointerMove($event)"
|
|
620
|
+
(pointerup)="handlePointerEnd($event)"
|
|
621
|
+
(pointercancel)="handlePointerEnd($event)"
|
|
622
|
+
>
|
|
264
623
|
<article
|
|
265
624
|
class="aeris-toast__message"
|
|
266
625
|
[attr.data-severity]="item.message.severity"
|
|
@@ -270,78 +629,106 @@ class AerisToast {
|
|
|
270
629
|
[attr.aria-live]="item.message.ariaLive"
|
|
271
630
|
aria-atomic="true"
|
|
272
631
|
[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
632
|
>
|
|
280
|
-
<div
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
[ngTemplateOutlet]="content.template"
|
|
295
|
-
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
296
|
-
/>
|
|
297
|
-
} @else {
|
|
298
|
-
@if (item.message.summary) {
|
|
299
|
-
<p class="aeris-toast__summary">{{ item.message.summary }}</p>
|
|
633
|
+
<div
|
|
634
|
+
#toastMessage
|
|
635
|
+
class="aeris-toast__body"
|
|
636
|
+
[attr.data-behind]="!item.primary || null"
|
|
637
|
+
[attr.data-toast-id]="item.message.id"
|
|
638
|
+
>
|
|
639
|
+
<div class="aeris-toast__icon" aria-hidden="true">
|
|
640
|
+
@if (iconTemplate(); as icon) {
|
|
641
|
+
<ng-container
|
|
642
|
+
[ngTemplateOutlet]="icon.template"
|
|
643
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
644
|
+
/>
|
|
645
|
+
} @else {
|
|
646
|
+
<span class="aeris-toast__default-icon"></span>
|
|
300
647
|
}
|
|
301
|
-
|
|
302
|
-
|
|
648
|
+
</div>
|
|
649
|
+
|
|
650
|
+
<div class="aeris-toast__content">
|
|
651
|
+
@if (contentTemplate(); as content) {
|
|
652
|
+
<ng-container
|
|
653
|
+
[ngTemplateOutlet]="content.template"
|
|
654
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
655
|
+
/>
|
|
656
|
+
} @else {
|
|
657
|
+
@if (item.message.summary) {
|
|
658
|
+
<p class="aeris-toast__summary">{{ item.message.summary }}</p>
|
|
659
|
+
}
|
|
660
|
+
@if (item.message.detail) {
|
|
661
|
+
<p class="aeris-toast__detail">{{ item.message.detail }}</p>
|
|
662
|
+
}
|
|
303
663
|
}
|
|
664
|
+
</div>
|
|
665
|
+
|
|
666
|
+
@if (item.message.closable && showClose()) {
|
|
667
|
+
<button
|
|
668
|
+
type="button"
|
|
669
|
+
class="aeris-toast__close"
|
|
670
|
+
[attr.aria-label]="closeAriaLabel()"
|
|
671
|
+
(click)="close(item.message)"
|
|
672
|
+
>
|
|
673
|
+
<span aria-hidden="true"></span>
|
|
674
|
+
</button>
|
|
304
675
|
}
|
|
305
676
|
</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
677
|
</article>
|
|
318
|
-
|
|
678
|
+
</div>
|
|
679
|
+
}
|
|
319
680
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
681
|
+
@if (hiddenCount() > 0) {
|
|
682
|
+
<span
|
|
683
|
+
class="aeris-toast__overflow"
|
|
684
|
+
aria-hidden="true"
|
|
685
|
+
animate.enter="aeris-toast__overflow--entering"
|
|
686
|
+
animate.leave="aeris-toast__overflow--leaving"
|
|
687
|
+
>
|
|
688
|
+
+{{ hiddenCount() }}
|
|
689
|
+
</span>
|
|
690
|
+
}
|
|
691
|
+
</section>
|
|
692
|
+
`, isInline: true, styles: [":host{display:contents}.aeris-toast__region{--_stack-gap: var(--aeris-toast-gap, .75rem);--_stack-peek: var(--aeris-toast-stack-peek, .75rem);position:fixed;z-index:var(--aeris-z-toast, 1200);isolation:isolate;width:min(var(--aeris-toast-width, 24rem),100vw - 2rem);height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position^=bottom]{bottom:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=left]{left:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=right]{right:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__item{--_stack-scale: max(0, 1 - (var(--aeris-toast-stack-index, 0) * .1)) ;--_stack-shrink: calc(1 - var(--_stack-scale));--_rest-y: 0px;--_active-y: var(--_rest-y);--_active-scale: var(--_stack-scale);position:absolute;inset-inline:0;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));box-sizing:border-box;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__item:after{position:absolute;inset-inline:0;top:100%;height:calc(var(--_stack-gap) + 1px);content:\"\"}.aeris-toast__region[data-position^=top] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek)) + (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );top:0;transform-origin:top center}.aeris-toast__region[data-position^=bottom] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek) * -1) - (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );bottom:0;transform-origin:bottom center}.aeris-toast__region[data-mode=stacked] .aeris-toast__item:not([data-primary]){pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__body[data-behind]{opacity:0}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=expanded] .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=expanded] .aeris-toast__item{--_active-y: calc( var(--aeris-toast-height-offset, 0px) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap)) );--_active-scale: 1}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__item{--_active-y: calc( (var(--aeris-toast-height-offset, 0px) * -1) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap) * -1) );--_active-scale: 1}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}.aeris-toast__item[data-swiping]{cursor:grabbing;transition:none}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=right],.aeris-toast__item--leaving[data-swipe-direction=right]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) + 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=left],.aeris-toast__item--leaving[data-swipe-direction=left]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) - 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=down],.aeris-toast__item--leaving[data-swipe-direction=down]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) + 150%)) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=up],.aeris-toast__item--leaving[data-swipe-direction=up]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) - 150%)) scale(var(--_active-scale))}.aeris-toast__region[data-position^=top] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item--leaving:not([data-swipe-direction]),.aeris-toast__region[data-position=center] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(150%)}.aeris-toast__item--leaving{pointer-events:none}.aeris-toast__region[data-position=center] .aeris-toast__item:is([data-swipe-dismissing],.aeris-toast__item--leaving){opacity:0}@starting-style{.aeris-toast__region[data-position^=top] .aeris-toast__item{transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{transform:translateY(150%)}}.aeris-toast__message{--_accent: var(--aeris-primary, #606c38);--_accent-soft: color-mix(in srgb, var(--_accent) 14%, transparent);--_icon-color: var(--_accent);position:relative;box-sizing:border-box;width:100%;height:100%;min-width:0;border:1px solid var(--aeris-border, #deddd7);border-left:.25rem solid var(--_accent);border-radius:var(--aeris-radius-md, .75rem);background:linear-gradient(90deg,var(--_accent-soft),transparent 32%),color-mix(in srgb,var(--aeris-surface, #fff) 96%,transparent);color:var(--aeris-text, #222222);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));overflow:hidden;pointer-events:auto;transition:box-shadow .16s ease,border-color .16s ease}.aeris-toast__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__message:hover,.aeris-toast__message:focus-within{border-color:color-mix(in srgb,var(--_accent) 28%,var(--aeris-border, #deddd7));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.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=error]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral],.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=error] .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(--aeris-text, #222222);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--aeris-text-2, #555555);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--aeris-text-2, #555555);cursor:pointer;transition:background-color .16s ease,color .16s ease}.aeris-toast__close:hover{background:color-mix(in srgb,var(--aeris-text, #222222) 8%,transparent);color:var(--aeris-text, #222222)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #3b452a);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{position:absolute;z-index:calc(var(--aeris-toast-stack-size, 1) + 1);left:50%;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;translate:-50% -50%;transition:opacity .15s ease,transform .15s ease}.aeris-toast__overflow--entering{animation:aeris-toast-overflow-enter .26s cubic-bezier(.16,1,.3,1) both}.aeris-toast__overflow--leaving{animation:aeris-toast-overflow-leave .16s ease-in both}.aeris-toast__region[data-position^=top] .aeris-toast__overflow{top:0}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{bottom:0;translate:-50% 50%}.aeris-toast__region[data-position=center] .aeris-toast__overflow{top:0}@keyframes aeris-toast-overflow-enter{0%{opacity:0;scale:.75}to{opacity:1;scale:1}}@keyframes aeris-toast-overflow-leave{to{opacity:0;scale:.8}}@media(max-width:36rem){.aeris-toast__region{width:calc(100vw - 1rem)}.aeris-toast__region[data-position]{right:.5rem;left:.5rem;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:.5rem}.aeris-toast__region[data-position^=bottom]{bottom:.5rem}}@media(prefers-reduced-motion:reduce){.aeris-toast__item--leaving,.aeris-toast__overflow--entering,.aeris-toast__overflow--leaving{animation-duration:1ms}.aeris-toast__item,.aeris-toast__message,.aeris-toast__body,.aeris-toast__overflow,.aeris-toast__icon,.aeris-toast__content,.aeris-toast__close{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
326
693
|
}
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AerisToast, decorators: [{
|
|
328
695
|
type: Component,
|
|
329
696
|
args: [{ selector: 'aeris-toast', imports: [NgTemplateOutlet], template: `
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
697
|
+
<section
|
|
698
|
+
class="aeris-toast__region"
|
|
699
|
+
[attr.aria-label]="hasVisibleMessages() ? ariaLabel() : null"
|
|
700
|
+
[attr.data-empty]="!hasVisibleMessages() || null"
|
|
701
|
+
[attr.data-position]="position()"
|
|
702
|
+
[attr.data-mode]="mode()"
|
|
703
|
+
[attr.data-newest-on-top]="newestOnTop() || null"
|
|
704
|
+
[attr.data-overflow]="hiddenCount() > 0 || null"
|
|
705
|
+
[style.--aeris-toast-stack-size]="visibleStackSize()"
|
|
706
|
+
(pointerenter)="pauseVisible()"
|
|
707
|
+
(pointerleave)="resumeVisible()"
|
|
708
|
+
(focusin)="pauseVisible()"
|
|
709
|
+
(focusout)="resumeVisible()"
|
|
710
|
+
>
|
|
711
|
+
@for (item of visibleStack(); track item.message.id) {
|
|
712
|
+
<div
|
|
713
|
+
class="aeris-toast__item"
|
|
714
|
+
[attr.data-stack-index]="item.stackIndex"
|
|
715
|
+
[attr.data-primary]="item.primary || null"
|
|
716
|
+
[attr.data-swiping]="item.swiping || null"
|
|
717
|
+
[attr.data-swipe-direction]="item.swipeDirection || null"
|
|
718
|
+
[attr.data-swipe-dismissing]="item.swipeDismissing || null"
|
|
719
|
+
[style.--aeris-toast-stack-index]="item.stackIndexValue"
|
|
720
|
+
[style.--aeris-toast-stack-size]="item.stackSizeValue"
|
|
721
|
+
[style.--aeris-toast-height]="item.heightValue"
|
|
722
|
+
[style.--aeris-toast-front-height]="item.frontHeightValue"
|
|
723
|
+
[style.--aeris-toast-height-offset]="item.heightOffsetValue"
|
|
724
|
+
[style.--aeris-toast-swipe-x]="item.swipeXValue"
|
|
725
|
+
[style.--aeris-toast-swipe-y]="item.swipeYValue"
|
|
726
|
+
animate.leave="aeris-toast__item--leaving"
|
|
727
|
+
(pointerdown)="handlePointerDown($event, item.message)"
|
|
728
|
+
(pointermove)="handlePointerMove($event)"
|
|
729
|
+
(pointerup)="handlePointerEnd($event)"
|
|
730
|
+
(pointercancel)="handlePointerEnd($event)"
|
|
731
|
+
>
|
|
345
732
|
<article
|
|
346
733
|
class="aeris-toast__message"
|
|
347
734
|
[attr.data-severity]="item.message.severity"
|
|
@@ -351,63 +738,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
351
738
|
[attr.aria-live]="item.message.ariaLive"
|
|
352
739
|
aria-atomic="true"
|
|
353
740
|
[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
741
|
>
|
|
361
|
-
<div
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
[ngTemplateOutlet]="content.template"
|
|
376
|
-
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
377
|
-
/>
|
|
378
|
-
} @else {
|
|
379
|
-
@if (item.message.summary) {
|
|
380
|
-
<p class="aeris-toast__summary">{{ item.message.summary }}</p>
|
|
742
|
+
<div
|
|
743
|
+
#toastMessage
|
|
744
|
+
class="aeris-toast__body"
|
|
745
|
+
[attr.data-behind]="!item.primary || null"
|
|
746
|
+
[attr.data-toast-id]="item.message.id"
|
|
747
|
+
>
|
|
748
|
+
<div class="aeris-toast__icon" aria-hidden="true">
|
|
749
|
+
@if (iconTemplate(); as icon) {
|
|
750
|
+
<ng-container
|
|
751
|
+
[ngTemplateOutlet]="icon.template"
|
|
752
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
753
|
+
/>
|
|
754
|
+
} @else {
|
|
755
|
+
<span class="aeris-toast__default-icon"></span>
|
|
381
756
|
}
|
|
382
|
-
|
|
383
|
-
|
|
757
|
+
</div>
|
|
758
|
+
|
|
759
|
+
<div class="aeris-toast__content">
|
|
760
|
+
@if (contentTemplate(); as content) {
|
|
761
|
+
<ng-container
|
|
762
|
+
[ngTemplateOutlet]="content.template"
|
|
763
|
+
[ngTemplateOutletContext]="templateContexts()[item.message.id]"
|
|
764
|
+
/>
|
|
765
|
+
} @else {
|
|
766
|
+
@if (item.message.summary) {
|
|
767
|
+
<p class="aeris-toast__summary">{{ item.message.summary }}</p>
|
|
768
|
+
}
|
|
769
|
+
@if (item.message.detail) {
|
|
770
|
+
<p class="aeris-toast__detail">{{ item.message.detail }}</p>
|
|
771
|
+
}
|
|
384
772
|
}
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
@if (item.message.closable && showClose()) {
|
|
776
|
+
<button
|
|
777
|
+
type="button"
|
|
778
|
+
class="aeris-toast__close"
|
|
779
|
+
[attr.aria-label]="closeAriaLabel()"
|
|
780
|
+
(click)="close(item.message)"
|
|
781
|
+
>
|
|
782
|
+
<span aria-hidden="true"></span>
|
|
783
|
+
</button>
|
|
385
784
|
}
|
|
386
785
|
</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
786
|
</article>
|
|
399
|
-
|
|
787
|
+
</div>
|
|
788
|
+
}
|
|
400
789
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
790
|
+
@if (hiddenCount() > 0) {
|
|
791
|
+
<span
|
|
792
|
+
class="aeris-toast__overflow"
|
|
793
|
+
aria-hidden="true"
|
|
794
|
+
animate.enter="aeris-toast__overflow--entering"
|
|
795
|
+
animate.leave="aeris-toast__overflow--leaving"
|
|
796
|
+
>
|
|
797
|
+
+{{ hiddenCount() }}
|
|
798
|
+
</span>
|
|
799
|
+
}
|
|
800
|
+
</section>
|
|
406
801
|
`, host: {
|
|
407
802
|
class: 'aeris-toast',
|
|
408
803
|
'[attr.data-position]': 'position()',
|
|
409
|
-
}, styles: [":host{display:contents}.aeris-toast__region{position:fixed;z-index:var(--aeris-z-toast, 1200);width:min(var(--aeris-toast-width, 24rem),100vw - 2rem);display:flex;flex-direction:column;pointer-events:auto}.aeris-toast__region[data-position^=top]{top:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position^=bottom]{bottom:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=left]{left:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=right]{right:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__region[data-position^=bottom]{flex-direction:column-reverse}.aeris-toast__region[data-mode=expanded],.aeris-toast__region[data-mode=stacked]:hover,.aeris-toast__region[data-mode=stacked]:focus-within{gap:var(--aeris-toast-gap, .75rem)}.aeris-toast__region[data-mode=stacked]{--_stack-peek: var(--aeris-toast-stack-peek, .55rem);--_stack-card-height: var(--aeris-toast-stack-card-height, 2.75rem)}.aeris-toast__region[data-mode=stacked] .aeris-toast__message:not([data-primary]){max-height:var(--_stack-card-height);margin-top:calc((var(--_stack-card-height) - var(--_stack-peek)) * -1);overflow:hidden;opacity:var(--aeris-toast-stack-opacity, .88);transform:translateY(var(--aeris-toast-stack-offset, .08rem)) scale(var(--aeris-toast-stack-scale, .975));pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__message:not([data-primary]) .aeris-toast__icon,.aeris-toast__region[data-mode=stacked] .aeris-toast__message:not([data-primary]) .aeris-toast__content,.aeris-toast__region[data-mode=stacked] .aeris-toast__message:not([data-primary]) .aeris-toast__close{opacity:0;transition:opacity .12s ease}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__message,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__message,.aeris-toast__region[data-mode=expanded] .aeris-toast__message{max-height:var(--aeris-toast-expanded-message-max-height, 18rem);margin-top:0;opacity:1;transform:none;pointer-events:auto}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__message .aeris-toast__icon,.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__message .aeris-toast__content,.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__message .aeris-toast__close,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__message .aeris-toast__icon,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__message .aeris-toast__content,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__message .aeris-toast__close,.aeris-toast__region[data-mode=expanded] .aeris-toast__message .aeris-toast__icon,.aeris-toast__region[data-mode=expanded] .aeris-toast__message .aeris-toast__content,.aeris-toast__region[data-mode=expanded] .aeris-toast__message .aeris-toast__close{opacity:1}.aeris-toast__region[data-position^=bottom][data-mode=stacked] .aeris-toast__message:not([data-primary]){margin-top:0;margin-bottom:calc((var(--_stack-card-height) - var(--_stack-peek)) * -1);transform:translateY(var(--aeris-toast-stack-offset-inverse, -.08rem)) scale(var(--aeris-toast-stack-scale, .975))}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__message,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__message,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__message{margin-bottom:0;transform:none}.aeris-toast__message{--_accent: var(--aeris-primary, #879566);--_accent-soft: color-mix(in srgb, var(--_accent) 14%, transparent);--_icon-color: var(--_accent);position:relative;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));max-height:var(--aeris-toast-expanded-message-max-height, 18rem);min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:.75rem;padding:.875rem .875rem .875rem 1rem;border:1px solid var(--aeris-border, #deddd7);border-left:.25rem solid var(--_accent);border-radius:var(--aeris-radius-md, .75rem);background:linear-gradient(90deg,var(--_accent-soft),transparent 32%),color-mix(in srgb,var(--aeris-surface, #fff) 96%,transparent);color:var(--aeris-text, #222222);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));pointer-events:auto;transition:max-height .21s cubic-bezier(.2,0,0,1),margin .16s ease,opacity .16s ease,transform .21s cubic-bezier(.2,0,0,1),box-shadow .16s ease,border-color .16s ease}.aeris-toast__message:hover,.aeris-toast__message:focus-within{border-color:color-mix(in srgb,var(--_accent) 28%,var(--aeris-border, #deddd7));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.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=error]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral],.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=error] .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(--aeris-text, #222222);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--aeris-text-2, #555555);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--aeris-text-2, #555555);cursor:pointer}.aeris-toast__close:hover{background:color-mix(in srgb,var(--aeris-text, #222222) 8%,transparent);color:var(--aeris-text, #222222)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #536437);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{z-index:calc(var(--aeris-toast-stack-size, 1) + 1);align-self:center;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;margin-top:.35rem;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;transition:opacity .15s ease,transform .15s ease}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{margin-top:0;margin-bottom:.35rem}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__overflow,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__overflow,.aeris-toast__region[data-mode=expanded] .aeris-toast__overflow{margin-top:0;opacity:.8}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__overflow,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__overflow,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__overflow{margin-bottom:0}@media(max-width:36rem){.aeris-toast__region{width:calc(100vw - 1rem)}.aeris-toast__region[data-position]{right:.5rem;left:.5rem;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:.5rem}.aeris-toast__region[data-position^=bottom]{bottom:.5rem}}@media(prefers-reduced-motion:reduce){.aeris-toast__message,.aeris-toast__overflow,.aeris-toast__icon,.aeris-toast__content,.aeris-toast__close{transition:none}}\n"] }]
|
|
410
|
-
}], ctorParameters: () => [], propDecorators: { contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisToastContentTemplate), { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisToastIconTemplate), { isSignal: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], visibleCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleCount", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], newestOnTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "newestOnTop", required: false }] }], pauseOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "pauseOnHover", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
804
|
+
}, styles: [":host{display:contents}.aeris-toast__region{--_stack-gap: var(--aeris-toast-gap, .75rem);--_stack-peek: var(--aeris-toast-stack-peek, .75rem);position:fixed;z-index:var(--aeris-z-toast, 1200);isolation:isolate;width:min(var(--aeris-toast-width, 24rem),100vw - 2rem);height:0;pointer-events:none;outline:none}.aeris-toast__region[data-position^=top]{top:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position^=bottom]{bottom:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=left]{left:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=right]{right:var(--aeris-toast-offset, 1rem)}.aeris-toast__region[data-position$=center],.aeris-toast__region[data-position=center]{left:50%;transform:translate(-50%)}.aeris-toast__region[data-position=center]{top:50%;transform:translate(-50%,-50%)}.aeris-toast__item{--_stack-scale: max(0, 1 - (var(--aeris-toast-stack-index, 0) * .1)) ;--_stack-shrink: calc(1 - var(--_stack-scale));--_rest-y: 0px;--_active-y: var(--_rest-y);--_active-scale: var(--_stack-scale);position:absolute;inset-inline:0;z-index:calc(var(--aeris-toast-stack-size, 1) - var(--aeris-toast-stack-index, 0));box-sizing:border-box;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__item:after{position:absolute;inset-inline:0;top:100%;height:calc(var(--_stack-gap) + 1px);content:\"\"}.aeris-toast__region[data-position^=top] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek)) + (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );top:0;transform-origin:top center}.aeris-toast__region[data-position^=bottom] .aeris-toast__item{--_rest-y: calc( (var(--aeris-toast-stack-index, 0) * var(--_stack-peek) * -1) - (var(--_stack-shrink) * var(--aeris-toast-front-height, 4.5rem)) );bottom:0;transform-origin:bottom center}.aeris-toast__region[data-mode=stacked] .aeris-toast__item:not([data-primary]){pointer-events:none}.aeris-toast__region[data-mode=stacked] .aeris-toast__body[data-behind]{opacity:0}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-mode=expanded] .aeris-toast__item{height:var(--aeris-toast-height, 4.5rem);pointer-events:auto}.aeris-toast__region[data-position^=top][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=top][data-mode=expanded] .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position=center][data-mode=expanded] .aeris-toast__item{--_active-y: calc( var(--aeris-toast-height-offset, 0px) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap)) );--_active-scale: 1}.aeris-toast__region[data-position^=bottom][data-mode=stacked]:hover .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=stacked]:focus-within .aeris-toast__item,.aeris-toast__region[data-position^=bottom][data-mode=expanded] .aeris-toast__item{--_active-y: calc( (var(--aeris-toast-height-offset, 0px) * -1) + (var(--aeris-toast-stack-index, 0) * var(--_stack-gap) * -1) );--_active-scale: 1}.aeris-toast__region[data-mode=stacked]:hover .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=stacked]:focus-within .aeris-toast__item .aeris-toast__body,.aeris-toast__region[data-mode=expanded] .aeris-toast__item .aeris-toast__body{opacity:1}.aeris-toast__item[data-swiping]{cursor:grabbing;transition:none}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=right],.aeris-toast__item--leaving[data-swipe-direction=right]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) + 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=left],.aeris-toast__item--leaving[data-swipe-direction=left]{transform:translate(calc(var(--aeris-toast-swipe-x, 0px) - 150%)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px))) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=down],.aeris-toast__item--leaving[data-swipe-direction=down]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) + 150%)) scale(var(--_active-scale))}.aeris-toast__item[data-swipe-dismissing][data-swipe-direction=up],.aeris-toast__item--leaving[data-swipe-direction=up]{transform:translate(var(--aeris-toast-swipe-x, 0px)) translateY(calc(var(--_active-y) + var(--aeris-toast-swipe-y, 0px) - 150%)) scale(var(--_active-scale))}.aeris-toast__region[data-position^=top] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item--leaving:not([data-swipe-direction]),.aeris-toast__region[data-position=center] .aeris-toast__item--leaving:not([data-swipe-direction]){transform:translateY(150%)}.aeris-toast__item--leaving{pointer-events:none}.aeris-toast__region[data-position=center] .aeris-toast__item:is([data-swipe-dismissing],.aeris-toast__item--leaving){opacity:0}@starting-style{.aeris-toast__region[data-position^=top] .aeris-toast__item{transform:translateY(-150%)}.aeris-toast__region[data-position^=bottom] .aeris-toast__item,.aeris-toast__region[data-position=center] .aeris-toast__item{transform:translateY(150%)}}.aeris-toast__message{--_accent: var(--aeris-primary, #606c38);--_accent-soft: color-mix(in srgb, var(--_accent) 14%, transparent);--_icon-color: var(--_accent);position:relative;box-sizing:border-box;width:100%;height:100%;min-width:0;border:1px solid var(--aeris-border, #deddd7);border-left:.25rem solid var(--_accent);border-radius:var(--aeris-radius-md, .75rem);background:linear-gradient(90deg,var(--_accent-soft),transparent 32%),color-mix(in srgb,var(--aeris-surface, #fff) 96%,transparent);color:var(--aeris-text, #222222);box-shadow:var(--aeris-shadow-lg, 0 18px 44px rgba(31, 35, 27, .14));overflow:hidden;pointer-events:auto;transition:box-shadow .16s ease,border-color .16s ease}.aeris-toast__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__message:hover,.aeris-toast__message:focus-within{border-color:color-mix(in srgb,var(--_accent) 28%,var(--aeris-border, #deddd7));box-shadow:0 14px 34px color-mix(in srgb,var(--aeris-text, #222222) 10%,transparent)}.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=error]{--_accent: var(--aeris-danger, #c81e2a)}.aeris-toast__message[data-severity=neutral],.aeris-toast__message[data-severity=secondary]{--_accent: var(--aeris-text-2, #555555)}.aeris-toast__message[data-severity=contrast]{--_accent: var(--aeris-text, #222222)}.aeris-toast__icon{width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:inline-grid;place-items:center;margin-top:.0625rem;color:var(--_icon-color)}.aeris-toast__default-icon{position:relative;width:var(--aeris-toast-icon-size, 1.25rem);height:var(--aeris-toast-icon-size, 1.25rem);display:block;border:2px solid currentColor;border-radius:999px}.aeris-toast__default-icon:before,.aeris-toast__default-icon:after{position:absolute;content:\"\";background:currentColor}.aeris-toast__default-icon:before{width:.125rem;height:.4375rem;top:.5rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__default-icon:after{width:.15625rem;height:.15625rem;top:.25rem;left:50%;border-radius:999px;transform:translate(-50%)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon{border-color:transparent}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:before{width:.625rem;height:.3125rem;top:.375rem;left:.3125rem;border:0 solid currentColor;border-left-width:2px;border-bottom-width:2px;border-radius:0;background:transparent;transform:rotate(-45deg)}.aeris-toast__message[data-severity=success] .aeris-toast__default-icon:after{display:none}.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:before,.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:after{width:.6875rem;height:.125rem;top:50%;left:50%;border-radius:999px}.aeris-toast__message[data-severity=error] .aeris-toast__default-icon:before{transform:translate(-50%,-50%) rotate(45deg)}.aeris-toast__message[data-severity=error] .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(--aeris-text, #222222);font-size:.875rem;font-weight:800;line-height:1.35}.aeris-toast__detail{color:var(--aeris-text-2, #555555);font-size:.8125rem;line-height:1.5}.aeris-toast__close{width:2rem;height:2rem;display:inline-grid;place-items:center;margin:-.25rem -.25rem 0 0;border:0;border-radius:var(--aeris-radius-sm, .5rem);background:transparent;color:var(--aeris-text-2, #555555);cursor:pointer;transition:background-color .16s ease,color .16s ease}.aeris-toast__close:hover{background:color-mix(in srgb,var(--aeris-text, #222222) 8%,transparent);color:var(--aeris-text, #222222)}.aeris-toast__close:focus-visible{outline:2px solid var(--aeris-focus, #3b452a);outline-offset:2px}.aeris-toast__close span{width:.875rem;height:.875rem;display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}.aeris-toast__overflow{position:absolute;z-index:calc(var(--aeris-toast-stack-size, 1) + 1);left:50%;min-width:1.5rem;min-height:1.5rem;display:inline-grid;place-items:center;padding:0 .35rem;border:1px solid var(--aeris-border, #deddd7);border-radius:999px;background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #555555);box-shadow:0 0 0 2px var(--aeris-surface, #fff),var(--aeris-shadow-sm, 0 1px 2px rgba(31, 35, 27, .06));font-size:.6875rem;font-weight:800;pointer-events:none;translate:-50% -50%;transition:opacity .15s ease,transform .15s ease}.aeris-toast__overflow--entering{animation:aeris-toast-overflow-enter .26s cubic-bezier(.16,1,.3,1) both}.aeris-toast__overflow--leaving{animation:aeris-toast-overflow-leave .16s ease-in both}.aeris-toast__region[data-position^=top] .aeris-toast__overflow{top:0}.aeris-toast__region[data-position^=bottom] .aeris-toast__overflow{bottom:0;translate:-50% 50%}.aeris-toast__region[data-position=center] .aeris-toast__overflow{top:0}@keyframes aeris-toast-overflow-enter{0%{opacity:0;scale:.75}to{opacity:1;scale:1}}@keyframes aeris-toast-overflow-leave{to{opacity:0;scale:.8}}@media(max-width:36rem){.aeris-toast__region{width:calc(100vw - 1rem)}.aeris-toast__region[data-position]{right:.5rem;left:.5rem;transform:none}.aeris-toast__region[data-position^=top],.aeris-toast__region[data-position=center]{top:.5rem}.aeris-toast__region[data-position^=bottom]{bottom:.5rem}}@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"] }]
|
|
805
|
+
}], ctorParameters: () => [], propDecorators: { messageElements: [{ type: i0.ViewChildren, args: ['toastMessage', { isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisToastContentTemplate), { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisToastIconTemplate), { isSignal: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], visibleCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleCount", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], newestOnTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "newestOnTop", required: false }] }], pauseOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "pauseOnHover", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], swipeDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeDirection", required: false }] }], swipeThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeThreshold", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
411
806
|
const AerisToastModule = [
|
|
412
807
|
AerisToast,
|
|
413
808
|
AerisToastContentTemplate,
|