makki-toast 2.0.9 → 2.0.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 CHANGED
@@ -1,193 +1,193 @@
1
- <a href="https://danieljimenezc.github.io/makki-toast/MakkiHeader.png"><img alt="makki toast - Try it" src="https://danieljimenezc.github.io/makki-toast/MakkiHeader.png"/></a>
2
- <div align="center">
3
- <img src="https://img.shields.io/npm/v/makki-toast" alt="NPM Version" />
4
- <img src="https://img.shields.io/bundlephobia/minzip/makki-toast" alt="Minzip size"/>
5
- <img src="https://img.shields.io/npm/dt/makki-toast" alt="Download" />
6
- <img src="https://img.shields.io/github/license/DanielJimenezC/makki-toast-package" alt="Licence" />
7
-
8
- </div>
9
- <br />
10
- <div align="center">
11
- <strong>Creative makki toast.</strong>
12
- </div>
13
- <div align="center">Easy to use, customizable & support promise</div>
14
- <br />
15
- <div align="center">
16
- <a href="https://danieljimenezc.github.io/makki-toast/">Website</a>
17
- <span> · </span>
18
- <a href="https://danieljimenezc.github.io/makki-toast/docs">Documentation</a>
19
- </div>
20
- <br />
21
- <div align="center">
22
- <sub>Build by <a href="https://github.com/DanielJimenezC">Daniel Jimenez</a></sub>
23
- </div>
24
- <br />
25
-
26
- ## Features
27
-
28
- - **Easy to use**
29
- - **Customizable**
30
- - **Dark mode**
31
- - **Lightweight**
32
- - **Accessible**
33
-
34
- ## Installation
35
-
36
- #### With NPM
37
-
38
- ```sh
39
- npm install makki-toast@latest
40
- ```
41
- ## Getting Started
42
-
43
- Add the makki toast and it will take care of render the alerts. From version 2.0.0 it's for Angular 21
44
-
45
- #### Import Makki Toast in app.ts
46
- ```jsx
47
- import { Component } from '@angular/core'
48
- import { RouterOutlet } from '@angular/router'
49
- import { ToasterComponent } from 'makki-toast'
50
-
51
- @Component({
52
- selector: 'app-root',
53
- standalone: true,
54
- imports: [RouterOutlet, ToasterComponent],
55
- templateUrl: './app.html',
56
- styleUrl: './app.css'
57
- })
58
- export class App {
59
- constructor() {}
60
- }
61
- ```
62
-
63
- #### Import Makki Toast in app.html
64
- ```jsx
65
- <app-toaster></app-toaster>
66
- <router-outlet></router-outlet>
67
- ```
68
-
69
- #### Import Makki Toast in Component
70
- ```jsx
71
- import { ToastService } from 'makki-toast'
72
-
73
- constructor(
74
- private readonly toast: ToastService,
75
- ) {}
76
- ```
77
-
78
- #### Info
79
- ```jsx
80
- this.toast.info({
81
- title: 'Info toast',
82
- description: 'Info toast message',
83
- });
84
- ```
85
-
86
- #### Success
87
- ```jsx
88
- this.toast.success({
89
- title: 'Success toast',
90
- description: 'Success toast message'
91
- });
92
- ```
93
-
94
- #### Warning
95
- ```jsx
96
- this.toast.warning({
97
- title: 'Warning toast',
98
- description: 'Warning toast message'
99
- });
100
- ```
101
-
102
- #### Error
103
- ```jsx
104
- this.toast.error({
105
- title: 'Error toast',
106
- description: 'Error toast message'
107
- });
108
- ```
109
-
110
- #### Action
111
- ```jsx
112
- this.toast.action({
113
- title: 'Action toast',
114
- description: 'Action toast message',
115
- button: {
116
- title: 'View Details',
117
- onClick: () => console.log('show')
118
- },
119
- });
120
- ```
121
-
122
- #### Promise
123
- ```jsx
124
- this.toast.promise(
125
- fetchData(),
126
- {
127
- loading: {
128
- title: 'Loading...',
129
- },
130
- success: (data) => ({
131
- title: 'Complete',
132
- description: 'promise complete message'
133
- }),
134
- error: (err) => ({
135
- title: 'Error',
136
- description: err.message
137
- })
138
- }
139
- );
140
- ```
141
-
142
- #### Component in description without data
143
- ```jsx
144
- this.toast.promise(
145
- fetchData(),
146
- {
147
- loading: {
148
- title: 'Loading...',
149
- },
150
- success: (data) => ({
151
- title: 'Complete',
152
- description: DataComponent
153
- }),
154
- error: (err) => ({
155
- title: 'Error',
156
- description: err.message
157
- })
158
- }
159
- );
160
- ```
161
-
162
- #### Component in description with share data
163
- ```jsx
164
- this.toast.promise(
165
- fetchData(),
166
- {
167
- loading: {
168
- title: 'Loading...',
169
- },
170
- success: (data) => ({
171
- title: 'Complete',
172
- description: {
173
- component: DataComponent,
174
- inputs: {
175
- data: data
176
- }
177
- }
178
- }),
179
- error: (err) => ({
180
- title: 'Error',
181
- description: err.message
182
- })
183
- }
184
- );
185
-
186
- export class DataComponent {
187
- @Input() data!: any;
188
- }
189
- ```
190
-
191
- ## Documentation
192
-
193
- Find the full documentation on [official documentation](https://danieljimenezc.github.io/makki-toast/docs)
1
+ <a href="https://danieljimenezc.github.io/makki-toast/MakkiHeader.png"><img alt="makki toast - Try it" src="https://danieljimenezc.github.io/makki-toast/MakkiHeader.png"/></a>
2
+ <div align="center">
3
+ <img src="https://img.shields.io/npm/v/makki-toast" alt="NPM Version" />
4
+ <img src="https://img.shields.io/bundlephobia/minzip/makki-toast" alt="Minzip size"/>
5
+ <img src="https://img.shields.io/npm/dt/makki-toast" alt="Download" />
6
+ <img src="https://img.shields.io/github/license/DanielJimenezC/makki-toast-package" alt="Licence" />
7
+
8
+ </div>
9
+ <br />
10
+ <div align="center">
11
+ <strong>Creative makki toast.</strong>
12
+ </div>
13
+ <div align="center">Easy to use, customizable & support promise</div>
14
+ <br />
15
+ <div align="center">
16
+ <a href="https://danieljimenezc.github.io/makki-toast/">Website</a>
17
+ <span> · </span>
18
+ <a href="https://danieljimenezc.github.io/makki-toast/docs">Documentation</a>
19
+ </div>
20
+ <br />
21
+ <div align="center">
22
+ <sub>Build by <a href="https://github.com/DanielJimenezC">Daniel Jimenez</a></sub>
23
+ </div>
24
+ <br />
25
+
26
+ ## Features
27
+
28
+ - **Easy to use**
29
+ - **Customizable**
30
+ - **Dark mode**
31
+ - **Lightweight**
32
+ - **Accessible**
33
+
34
+ ## Installation
35
+
36
+ #### With NPM
37
+
38
+ ```sh
39
+ npm install makki-toast@latest
40
+ ```
41
+ ## Getting Started
42
+
43
+ Add the makki toast and it will take care of render the alerts. From version 2.0.0 it's for Angular 21
44
+
45
+ #### Import Makki Toast in app.ts
46
+ ```jsx
47
+ import { Component } from '@angular/core'
48
+ import { RouterOutlet } from '@angular/router'
49
+ import { ToasterComponent } from 'makki-toast'
50
+
51
+ @Component({
52
+ selector: 'app-root',
53
+ standalone: true,
54
+ imports: [RouterOutlet, ToasterComponent],
55
+ templateUrl: './app.html',
56
+ styleUrl: './app.css'
57
+ })
58
+ export class App {
59
+ constructor() {}
60
+ }
61
+ ```
62
+
63
+ #### Import Makki Toast in app.html
64
+ ```jsx
65
+ <app-toaster></app-toaster>
66
+ <router-outlet></router-outlet>
67
+ ```
68
+
69
+ #### Import Makki Toast in Component
70
+ ```jsx
71
+ import { ToastService } from 'makki-toast'
72
+
73
+ constructor(
74
+ private readonly toast: ToastService,
75
+ ) {}
76
+ ```
77
+
78
+ #### Info
79
+ ```jsx
80
+ this.toast.info({
81
+ title: 'Info toast',
82
+ description: 'Info toast message',
83
+ });
84
+ ```
85
+
86
+ #### Success
87
+ ```jsx
88
+ this.toast.success({
89
+ title: 'Success toast',
90
+ description: 'Success toast message'
91
+ });
92
+ ```
93
+
94
+ #### Warning
95
+ ```jsx
96
+ this.toast.warning({
97
+ title: 'Warning toast',
98
+ description: 'Warning toast message'
99
+ });
100
+ ```
101
+
102
+ #### Error
103
+ ```jsx
104
+ this.toast.error({
105
+ title: 'Error toast',
106
+ description: 'Error toast message'
107
+ });
108
+ ```
109
+
110
+ #### Action
111
+ ```jsx
112
+ this.toast.action({
113
+ title: 'Action toast',
114
+ description: 'Action toast message',
115
+ button: {
116
+ title: 'View Details',
117
+ onClick: () => console.log('show')
118
+ },
119
+ });
120
+ ```
121
+
122
+ #### Promise
123
+ ```jsx
124
+ this.toast.promise(
125
+ fetchData(),
126
+ {
127
+ loading: {
128
+ title: 'Loading...',
129
+ },
130
+ success: (data) => ({
131
+ title: 'Complete',
132
+ description: 'promise complete message'
133
+ }),
134
+ error: (err) => ({
135
+ title: 'Error',
136
+ description: err.message
137
+ })
138
+ }
139
+ );
140
+ ```
141
+
142
+ #### Component in description without data
143
+ ```jsx
144
+ this.toast.promise(
145
+ fetchData(),
146
+ {
147
+ loading: {
148
+ title: 'Loading...',
149
+ },
150
+ success: (data) => ({
151
+ title: 'Complete',
152
+ description: DataComponent
153
+ }),
154
+ error: (err) => ({
155
+ title: 'Error',
156
+ description: err.message
157
+ })
158
+ }
159
+ );
160
+ ```
161
+
162
+ #### Component in description with share data
163
+ ```jsx
164
+ this.toast.promise(
165
+ fetchData(),
166
+ {
167
+ loading: {
168
+ title: 'Loading...',
169
+ },
170
+ success: (data) => ({
171
+ title: 'Complete',
172
+ description: {
173
+ component: DataComponent,
174
+ inputs: {
175
+ data: data
176
+ }
177
+ }
178
+ }),
179
+ error: (err) => ({
180
+ title: 'Error',
181
+ description: err.message
182
+ })
183
+ }
184
+ );
185
+
186
+ export class DataComponent {
187
+ @Input() data!: any;
188
+ }
189
+ ```
190
+
191
+ ## Documentation
192
+
193
+ Find the full documentation on [official documentation](https://danieljimenezc.github.io/makki-toast/docs)
@@ -66,6 +66,17 @@ class ToastService {
66
66
  warning(opts) { return this.createToast({ ...opts, state: 'warning' }).id; }
67
67
  info(opts) { return this.createToast({ ...opts, state: 'info' }).id; }
68
68
  action(opts) { return this.createToast({ ...opts, state: 'action' }).id; }
69
+ dismissAll() {
70
+ const current = this.toasts();
71
+ current.forEach(t => {
72
+ if (!t.exiting) {
73
+ this.toasts.update(prev => prev.map(x => x.id === t.id ? { ...x, exiting: true } : x));
74
+ }
75
+ });
76
+ setTimeout(() => {
77
+ this.toasts.set([]);
78
+ }, 0);
79
+ }
69
80
  promise(promise, opts) {
70
81
  const p = typeof promise === 'function' ? promise() : promise;
71
82
  const id = this.createToast({ ...opts.loading, state: 'loading', duration: null }).id;
@@ -108,17 +119,17 @@ const TOAST_POSITIONS = [
108
119
  class ToastIconComponent {
109
120
  state;
110
121
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ToastIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ToastIconComponent, isStandalone: true, selector: "toast-icon", inputs: { state: "state" }, ngImport: i0, template: `
112
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
113
- @switch (state) {
114
- @case ('success') { <path d="M20 6 9 17l-5-5" /> }
115
- @case ('loading') { <path d="M21 12a9 9 0 1 1-6.219-8.56" [attr.data-makki-icon]="'spin'" /> }
116
- @case ('error') { <path d="M18 6 6 18" /><path d="m6 6 12 12" /> }
117
- @case ('warning') { <circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" /> }
118
- @case ('info') { <circle cx="12" cy="12" r="10" /><path d="m4.93 4.93 4.24 4.24" /><path d="m14.83 9.17 4.24-4.24" /><path d="m14.83 14.83 4.24 4.24" /><path d="m9.17 14.83-4.24 4.24" /><circle cx="12" cy="12" r="4" /> }
119
- @case ('action') { <path d="M5 12h14" /><path d="m12 5 7 7-7 7" /> }
120
- }
121
- </svg>
122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ToastIconComponent, isStandalone: true, selector: "toast-icon", inputs: { state: "state" }, ngImport: i0, template: `
123
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
124
+ @switch (state) {
125
+ @case ('success') { <path d="M20 6 9 17l-5-5" /> }
126
+ @case ('loading') { <path d="M21 12a9 9 0 1 1-6.219-8.56" [attr.data-makki-icon]="'spin'" /> }
127
+ @case ('error') { <path d="M18 6 6 18" /><path d="m6 6 12 12" /> }
128
+ @case ('warning') { <circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" /> }
129
+ @case ('info') { <circle cx="12" cy="12" r="10" /><path d="m4.93 4.93 4.24 4.24" /><path d="m14.83 9.17 4.24-4.24" /><path d="m14.83 14.83 4.24 4.24" /><path d="m9.17 14.83-4.24 4.24" /><circle cx="12" cy="12" r="4" /> }
130
+ @case ('action') { <path d="M5 12h14" /><path d="m12 5 7 7-7 7" /> }
131
+ }
132
+ </svg>
122
133
  `, isInline: true });
123
134
  }
124
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ToastIconComponent, decorators: [{
@@ -126,17 +137,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
126
137
  args: [{
127
138
  selector: 'toast-icon',
128
139
  standalone: true,
129
- template: `
130
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
131
- @switch (state) {
132
- @case ('success') { <path d="M20 6 9 17l-5-5" /> }
133
- @case ('loading') { <path d="M21 12a9 9 0 1 1-6.219-8.56" [attr.data-makki-icon]="'spin'" /> }
134
- @case ('error') { <path d="M18 6 6 18" /><path d="m6 6 12 12" /> }
135
- @case ('warning') { <circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" /> }
136
- @case ('info') { <circle cx="12" cy="12" r="10" /><path d="m4.93 4.93 4.24 4.24" /><path d="m14.83 9.17 4.24-4.24" /><path d="m14.83 14.83 4.24 4.24" /><path d="m9.17 14.83-4.24 4.24" /><circle cx="12" cy="12" r="4" /> }
137
- @case ('action') { <path d="M5 12h14" /><path d="m12 5 7 7-7 7" /> }
138
- }
139
- </svg>
140
+ template: `
141
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
142
+ @switch (state) {
143
+ @case ('success') { <path d="M20 6 9 17l-5-5" /> }
144
+ @case ('loading') { <path d="M21 12a9 9 0 1 1-6.219-8.56" [attr.data-makki-icon]="'spin'" /> }
145
+ @case ('error') { <path d="M18 6 6 18" /><path d="m6 6 12 12" /> }
146
+ @case ('warning') { <circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" /> }
147
+ @case ('info') { <circle cx="12" cy="12" r="10" /><path d="m4.93 4.93 4.24 4.24" /><path d="m14.83 9.17 4.24-4.24" /><path d="m14.83 14.83 4.24 4.24" /><path d="m9.17 14.83-4.24 4.24" /><circle cx="12" cy="12" r="4" /> }
148
+ @case ('action') { <path d="M5 12h14" /><path d="m12 5 7 7-7 7" /> }
149
+ }
150
+ </svg>
140
151
  `
141
152
  }]
142
153
  }], propDecorators: { state: [{
@@ -336,11 +347,11 @@ class ToastComponent {
336
347
  this.clearTimeouts();
337
348
  }
338
349
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ToastComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
339
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ToastComponent, isStandalone: true, selector: "app-toast", inputs: { item: "item", activeId: "activeId", expandDir: "expandDir", pillAlign: "pillAlign" }, outputs: { dismiss: "dismiss" }, viewQueries: [{ propertyName: "innerRef", first: true, predicate: ["innerRef"], descendants: true }, { propertyName: "headerRef", first: true, predicate: ["headerRef"], descendants: true }, { propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }, { propertyName: "buttonRef", first: true, predicate: ["buttonRef"], descendants: true }], ngImport: i0, template: "<button #buttonRef type=\"button\" data-app-toast\n [attr.data-ready]=\"ready()\" [attr.data-expanded]=\"open()\" \n [attr.data-exiting]=\"item.exiting\" [attr.data-edge]=\"expandDir\"\n [attr.data-position]=\"pillAlign\" [attr.data-state]=\"item.state\"\n [style.--_h]=\"open() ? expanded() + 'px' : HEIGHT + 'px'\"\n [style.--_pw]=\"resolvedPillWidth() + 'px'\"\n [style.--_px]=\"pillX() + 'px'\"\n [style.--_sy]=\"open() ? 1 : HEIGHT / pillHeight()\"\n [style.--_ph]=\"pillHeight() + 'px'\"\n [style.--_by]=\"open() ? 1 : 0\"\n [style.--_ht]=\"'translateY(' + (open() ? (expandDir === 'bottom' ? 3 : -3) : 0) + 'px) scale(' + (open() ? 0.9 : 1) + ')'\"\n [style.--_co]=\"open() ? 1 : 0\">\n\n <div data-app-canvas [attr.data-edge]=\"expandDir\">\n <svg data-app-svg [attr.width]=\"WIDTH\" [attr.height]=\"svgHeight()\" [attr.viewBox]=\"'0 0 ' + WIDTH + ' ' + svgHeight()\">\n <defs>\n <filter [attr.id]=\"filterId()\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n <feGaussianBlur in=\"SourceGraphic\" [attr.stdDeviation]=\"blur()\" result=\"blur\" />\n <feColorMatrix in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10\" result=\"goo\" />\n <feComposite in=\"SourceGraphic\" in2=\"goo\" operator=\"atop\" />\n </filter>\n </defs>\n <g [attr.filter]=\"'url(#' + filterId() + ')'\">\n <rect data-app-pill [attr.x]=\"pillX()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#011623'\" />\n <rect data-app-body [attr.y]=\"HEIGHT\" [attr.width]=\"WIDTH\" [attr.height]=\"expandedContent()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#011623'\" />\n </g>\n </svg>\n </div>\n\n <div #headerRef data-app-header [attr.data-edge]=\"expandDir\">\n <div data-app-header-stack>\n <div #innerRef data-app-header-inner data-layer=\"current\">\n <div data-app-badge [attr.data-state]=\"item.state || 'success'\">\n @if (hasCustomIcon()) {\n \n @if (isStringIcon()) {\n <span [innerHTML]=\"iconString() | safeHtml\" style=\"display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;\"></span>\n } @else {\n <ng-container *ngComponentOutlet=\"iconComponent()\"></ng-container>\n }\n\n } @else {\n <toast-icon [state]=\"item.state || 'success'\"></toast-icon>\n }\n </div>\n <span data-app-title [attr.data-state]=\"item.state || 'success'\">\n {{ item.title || item.state }}\n </span>\n </div>\n </div>\n </div>\n\n @if (hasDesc()) {\n <div data-app-content [attr.data-edge]=\"expandDir\" [attr.data-visible]=\"open()\">\n <div #contentRef data-app-description style=\"display: block; overflow: hidden; color: #FFFFFF;\">\n @if (item.description) {\n @if (isStringDesc()) {\n <span [innerHTML]=\"descString() | safeHtml\"></span>\n } @else {\n <ng-container *ngComponentOutlet=\"descComponent(); inputs: descInputs()\"></ng-container>\n }\n }\n\n @if (item.button) {\n <a href=\"#\" data-app-button [attr.data-state]=\"item.state\"\n (click)=\"handleButtonClick($event)\">\n {{ item.button.title }}\n </a>\n }\n </div>\n </div>\n }\n</button>", dependencies: [{ kind: "component", type: ToastIconComponent, selector: "toast-icon", inputs: ["state"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
350
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ToastComponent, isStandalone: true, selector: "app-toast", inputs: { item: "item", activeId: "activeId", expandDir: "expandDir", pillAlign: "pillAlign" }, outputs: { dismiss: "dismiss" }, viewQueries: [{ propertyName: "innerRef", first: true, predicate: ["innerRef"], descendants: true }, { propertyName: "headerRef", first: true, predicate: ["headerRef"], descendants: true }, { propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }, { propertyName: "buttonRef", first: true, predicate: ["buttonRef"], descendants: true }], ngImport: i0, template: "<button #buttonRef type=\"button\" data-app-toast\r\n [attr.data-ready]=\"ready()\" [attr.data-expanded]=\"open()\" \r\n [attr.data-exiting]=\"item.exiting\" [attr.data-edge]=\"expandDir\"\r\n [attr.data-position]=\"pillAlign\" [attr.data-state]=\"item.state\"\r\n [style.--_h]=\"open() ? expanded() + 'px' : HEIGHT + 'px'\"\r\n [style.--_pw]=\"resolvedPillWidth() + 'px'\"\r\n [style.--_px]=\"pillX() + 'px'\"\r\n [style.--_sy]=\"open() ? 1 : HEIGHT / pillHeight()\"\r\n [style.--_ph]=\"pillHeight() + 'px'\"\r\n [style.--_by]=\"open() ? 1 : 0\"\r\n [style.--_ht]=\"'translateY(' + (open() ? (expandDir === 'bottom' ? 3 : -3) : 0) + 'px) scale(' + (open() ? 0.9 : 1) + ')'\"\r\n [style.--_co]=\"open() ? 1 : 0\">\r\n\r\n <div data-app-canvas [attr.data-edge]=\"expandDir\">\r\n <svg data-app-svg [attr.width]=\"WIDTH\" [attr.height]=\"svgHeight()\" [attr.viewBox]=\"'0 0 ' + WIDTH + ' ' + svgHeight()\">\r\n <defs>\r\n <filter [attr.id]=\"filterId()\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\r\n <feGaussianBlur in=\"SourceGraphic\" [attr.stdDeviation]=\"blur()\" result=\"blur\" />\r\n <feColorMatrix in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10\" result=\"goo\" />\r\n <feComposite in=\"SourceGraphic\" in2=\"goo\" operator=\"atop\" />\r\n </filter>\r\n </defs>\r\n <g [attr.filter]=\"'url(#' + filterId() + ')'\">\r\n <rect data-app-pill [attr.x]=\"pillX()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#000000'\" />\r\n <rect data-app-body [attr.y]=\"HEIGHT\" [attr.width]=\"WIDTH\" [attr.height]=\"expandedContent()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#000000'\" />\r\n </g>\r\n </svg>\r\n </div>\r\n\r\n <div #headerRef data-app-header [attr.data-edge]=\"expandDir\">\r\n <div data-app-header-stack>\r\n <div #innerRef data-app-header-inner data-layer=\"current\">\r\n <div data-app-badge [attr.data-state]=\"item.state || 'success'\">\r\n @if (hasCustomIcon()) {\r\n \r\n @if (isStringIcon()) {\r\n <span [innerHTML]=\"iconString() | safeHtml\" style=\"display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;\"></span>\r\n } @else {\r\n <ng-container *ngComponentOutlet=\"iconComponent()\"></ng-container>\r\n }\r\n\r\n } @else {\r\n <toast-icon [state]=\"item.state || 'success'\"></toast-icon>\r\n }\r\n </div>\r\n <span data-app-title [attr.data-state]=\"item.state || 'success'\">\r\n {{ item.title || item.state }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n @if (hasDesc()) {\r\n <div data-app-content [attr.data-edge]=\"expandDir\" [attr.data-visible]=\"open()\">\r\n <div #contentRef data-app-description style=\"display: block; overflow: hidden;\" [style.color]=\"item.color || '#FFFFFF'\">\r\n @if (item.description) {\r\n @if (isStringDesc()) {\r\n <span [innerHTML]=\"descString() | safeHtml\"></span>\r\n } @else {\r\n <ng-container *ngComponentOutlet=\"descComponent(); inputs: descInputs()\"></ng-container>\r\n }\r\n }\r\n\r\n @if (item.button) {\r\n <a href=\"#\" data-app-button [attr.data-state]=\"item.state\"\r\n (click)=\"handleButtonClick($event)\">\r\n {{ item.button.title }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</button>", dependencies: [{ kind: "component", type: ToastIconComponent, selector: "toast-icon", inputs: ["state"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
340
351
  }
341
352
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ToastComponent, decorators: [{
342
353
  type: Component,
343
- args: [{ selector: 'app-toast', standalone: true, imports: [ToastIconComponent, SafeHtmlPipe, NgComponentOutlet], template: "<button #buttonRef type=\"button\" data-app-toast\n [attr.data-ready]=\"ready()\" [attr.data-expanded]=\"open()\" \n [attr.data-exiting]=\"item.exiting\" [attr.data-edge]=\"expandDir\"\n [attr.data-position]=\"pillAlign\" [attr.data-state]=\"item.state\"\n [style.--_h]=\"open() ? expanded() + 'px' : HEIGHT + 'px'\"\n [style.--_pw]=\"resolvedPillWidth() + 'px'\"\n [style.--_px]=\"pillX() + 'px'\"\n [style.--_sy]=\"open() ? 1 : HEIGHT / pillHeight()\"\n [style.--_ph]=\"pillHeight() + 'px'\"\n [style.--_by]=\"open() ? 1 : 0\"\n [style.--_ht]=\"'translateY(' + (open() ? (expandDir === 'bottom' ? 3 : -3) : 0) + 'px) scale(' + (open() ? 0.9 : 1) + ')'\"\n [style.--_co]=\"open() ? 1 : 0\">\n\n <div data-app-canvas [attr.data-edge]=\"expandDir\">\n <svg data-app-svg [attr.width]=\"WIDTH\" [attr.height]=\"svgHeight()\" [attr.viewBox]=\"'0 0 ' + WIDTH + ' ' + svgHeight()\">\n <defs>\n <filter [attr.id]=\"filterId()\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n <feGaussianBlur in=\"SourceGraphic\" [attr.stdDeviation]=\"blur()\" result=\"blur\" />\n <feColorMatrix in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10\" result=\"goo\" />\n <feComposite in=\"SourceGraphic\" in2=\"goo\" operator=\"atop\" />\n </filter>\n </defs>\n <g [attr.filter]=\"'url(#' + filterId() + ')'\">\n <rect data-app-pill [attr.x]=\"pillX()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#011623'\" />\n <rect data-app-body [attr.y]=\"HEIGHT\" [attr.width]=\"WIDTH\" [attr.height]=\"expandedContent()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#011623'\" />\n </g>\n </svg>\n </div>\n\n <div #headerRef data-app-header [attr.data-edge]=\"expandDir\">\n <div data-app-header-stack>\n <div #innerRef data-app-header-inner data-layer=\"current\">\n <div data-app-badge [attr.data-state]=\"item.state || 'success'\">\n @if (hasCustomIcon()) {\n \n @if (isStringIcon()) {\n <span [innerHTML]=\"iconString() | safeHtml\" style=\"display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;\"></span>\n } @else {\n <ng-container *ngComponentOutlet=\"iconComponent()\"></ng-container>\n }\n\n } @else {\n <toast-icon [state]=\"item.state || 'success'\"></toast-icon>\n }\n </div>\n <span data-app-title [attr.data-state]=\"item.state || 'success'\">\n {{ item.title || item.state }}\n </span>\n </div>\n </div>\n </div>\n\n @if (hasDesc()) {\n <div data-app-content [attr.data-edge]=\"expandDir\" [attr.data-visible]=\"open()\">\n <div #contentRef data-app-description style=\"display: block; overflow: hidden; color: #FFFFFF;\">\n @if (item.description) {\n @if (isStringDesc()) {\n <span [innerHTML]=\"descString() | safeHtml\"></span>\n } @else {\n <ng-container *ngComponentOutlet=\"descComponent(); inputs: descInputs()\"></ng-container>\n }\n }\n\n @if (item.button) {\n <a href=\"#\" data-app-button [attr.data-state]=\"item.state\"\n (click)=\"handleButtonClick($event)\">\n {{ item.button.title }}\n </a>\n }\n </div>\n </div>\n }\n</button>" }]
354
+ args: [{ selector: 'app-toast', standalone: true, imports: [ToastIconComponent, SafeHtmlPipe, NgComponentOutlet], template: "<button #buttonRef type=\"button\" data-app-toast\r\n [attr.data-ready]=\"ready()\" [attr.data-expanded]=\"open()\" \r\n [attr.data-exiting]=\"item.exiting\" [attr.data-edge]=\"expandDir\"\r\n [attr.data-position]=\"pillAlign\" [attr.data-state]=\"item.state\"\r\n [style.--_h]=\"open() ? expanded() + 'px' : HEIGHT + 'px'\"\r\n [style.--_pw]=\"resolvedPillWidth() + 'px'\"\r\n [style.--_px]=\"pillX() + 'px'\"\r\n [style.--_sy]=\"open() ? 1 : HEIGHT / pillHeight()\"\r\n [style.--_ph]=\"pillHeight() + 'px'\"\r\n [style.--_by]=\"open() ? 1 : 0\"\r\n [style.--_ht]=\"'translateY(' + (open() ? (expandDir === 'bottom' ? 3 : -3) : 0) + 'px) scale(' + (open() ? 0.9 : 1) + ')'\"\r\n [style.--_co]=\"open() ? 1 : 0\">\r\n\r\n <div data-app-canvas [attr.data-edge]=\"expandDir\">\r\n <svg data-app-svg [attr.width]=\"WIDTH\" [attr.height]=\"svgHeight()\" [attr.viewBox]=\"'0 0 ' + WIDTH + ' ' + svgHeight()\">\r\n <defs>\r\n <filter [attr.id]=\"filterId()\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\r\n <feGaussianBlur in=\"SourceGraphic\" [attr.stdDeviation]=\"blur()\" result=\"blur\" />\r\n <feColorMatrix in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10\" result=\"goo\" />\r\n <feComposite in=\"SourceGraphic\" in2=\"goo\" operator=\"atop\" />\r\n </filter>\r\n </defs>\r\n <g [attr.filter]=\"'url(#' + filterId() + ')'\">\r\n <rect data-app-pill [attr.x]=\"pillX()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#000000'\" />\r\n <rect data-app-body [attr.y]=\"HEIGHT\" [attr.width]=\"WIDTH\" [attr.height]=\"expandedContent()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#000000'\" />\r\n </g>\r\n </svg>\r\n </div>\r\n\r\n <div #headerRef data-app-header [attr.data-edge]=\"expandDir\">\r\n <div data-app-header-stack>\r\n <div #innerRef data-app-header-inner data-layer=\"current\">\r\n <div data-app-badge [attr.data-state]=\"item.state || 'success'\">\r\n @if (hasCustomIcon()) {\r\n \r\n @if (isStringIcon()) {\r\n <span [innerHTML]=\"iconString() | safeHtml\" style=\"display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;\"></span>\r\n } @else {\r\n <ng-container *ngComponentOutlet=\"iconComponent()\"></ng-container>\r\n }\r\n\r\n } @else {\r\n <toast-icon [state]=\"item.state || 'success'\"></toast-icon>\r\n }\r\n </div>\r\n <span data-app-title [attr.data-state]=\"item.state || 'success'\">\r\n {{ item.title || item.state }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n @if (hasDesc()) {\r\n <div data-app-content [attr.data-edge]=\"expandDir\" [attr.data-visible]=\"open()\">\r\n <div #contentRef data-app-description style=\"display: block; overflow: hidden;\" [style.color]=\"item.color || '#FFFFFF'\">\r\n @if (item.description) {\r\n @if (isStringDesc()) {\r\n <span [innerHTML]=\"descString() | safeHtml\"></span>\r\n } @else {\r\n <ng-container *ngComponentOutlet=\"descComponent(); inputs: descInputs()\"></ng-container>\r\n }\r\n }\r\n\r\n @if (item.button) {\r\n <a href=\"#\" data-app-button [attr.data-state]=\"item.state\"\r\n (click)=\"handleButtonClick($event)\">\r\n {{ item.button.title }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</button>" }]
344
355
  }], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { item: [{
345
356
  type: Input,
346
357
  args: [{ required: true }]
@@ -386,43 +397,43 @@ class ToasterComponent {
386
397
  return undefined;
387
398
  }, ...(ngDevMode ? [{ debugName: "activeId" }] : []));
388
399
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ToasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
389
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ToasterComponent, isStandalone: true, selector: "app-toaster", ngImport: i0, template: `
390
- @for (pos of positions; track pos) {
391
- @if (groupedToasts()[pos]?.length) {
392
- <section data-app-viewport [attr.data-position]="pos" aria-live="polite">
393
- @for (item of groupedToasts()[pos]; track item.id) {
394
- <app-toast
395
- [item]="item"
396
- [activeId]="activeId()"
397
- [expandDir]="pos.startsWith('top') ? 'bottom' : 'top'"
398
- [pillAlign]="pos.includes('right') ? 'right' : (pos.includes('center') ? 'center' : 'left')"
399
- (dismiss)="toastService.dismiss(item.id)"
400
- />
401
- }
402
- </section>
403
- }
404
- }
405
- `, isInline: true, styles: [":root{--app-spring-easing: linear( 0, .002 .6%, .007 1.2%, .015 1.8%, .026 2.4%, .041 3.1%, .06 3.8%, .108 5.3%, .157 6.6%, .214 8%, .467 13.7%, .577 16.3%, .631 17.7%, .682 19.1%, .73 20.5%, .771 21.8%, .808 23.1%, .844 24.5%, .874 25.8%, .903 27.2%, .928 28.6%, .952 30.1%, .972 31.6%, .988 33.1%, 1.01 35.7%, 1.025 38.5%, 1.034 41.6%, 1.038 45%, 1.035 50.1%, 1.012 64.2%, 1.003 73%, .999 83.7%, 1 );--app-duration: .6s;--app-height: 40px;--app-width: 350px;--app-state-success: oklch(.723 .219 142.136);--app-state-loading: oklch(.556 0 0);--app-state-error: oklch(.637 .237 25.331);--app-state-warning: oklch(.795 .184 86.047);--app-state-info: oklch(.685 .169 237.323);--app-state-action: oklch(.623 .214 259.815)}[data-app-toast]{position:relative;cursor:pointer;pointer-events:auto;touch-action:none;border:0;background:transparent;padding:0;width:var(--app-width);height:var(--_h, var(--app-height));opacity:0;transform:translateZ(0) scale(.95);transform-origin:center;contain:layout style;overflow:visible}[data-app-toast][data-state=loading]{cursor:default}[data-app-toast][data-ready=true]{opacity:1;transform:translateZ(0) scale(1);transition:transform calc(var(--app-duration) * .66) var(--app-spring-easing),opacity calc(var(--app-duration) * .66) var(--app-spring-easing),margin-bottom calc(var(--app-duration) * .66) var(--app-spring-easing),margin-top calc(var(--app-duration) * .66) var(--app-spring-easing),height var(--app-duration) var(--app-spring-easing)}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){transform:translateY(6px) scale(.95)}[data-app-toast][data-ready=true][data-exiting=true]{opacity:0;pointer-events:none}[data-app-viewport][data-position^=top] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(6px) scale(.95)}[data-app-canvas]{position:absolute;left:0;right:0;pointer-events:none;transform:translateZ(0);contain:layout style;overflow:visible}[data-app-canvas][data-edge=top]{bottom:0;transform:scaleY(-1) translateZ(0)}[data-app-canvas][data-edge=bottom]{top:0}[data-app-svg]{overflow:visible}[data-app-pill],[data-app-body]{transform-box:fill-box;transform-origin:50% 0%}[data-app-pill]{transform:scaleY(var(--_sy, 1));width:var(--_pw);height:var(--_ph)}[data-app-body]{transform:scaleY(var(--_by, 0));opacity:var(--_by, 0)}[data-app-toast][data-ready=true] [data-app-pill]{transition:transform var(--app-duration) var(--app-spring-easing),width var(--app-duration) var(--app-spring-easing),x var(--app-duration) var(--app-spring-easing)}[data-app-toast][data-ready=true][data-expanded=true] [data-app-pill]{transition-delay:calc(var(--app-duration) * .08)}[data-app-toast][data-ready=true] [data-app-body]{transition:transform var(--app-duration) var(--app-spring-easing),opacity var(--app-duration) var(--app-spring-easing)}[data-app-header]{position:absolute;z-index:20;display:flex;align-items:center;padding:0 .5rem;height:var(--app-height);overflow:hidden;left:var(--_px, 0px);transform:var(--_ht);max-width:var(--_pw)}[data-app-toast][data-ready=true] [data-app-header]{transition:transform var(--app-duration) var(--app-spring-easing),left var(--app-duration) var(--app-spring-easing),max-width var(--app-duration) var(--app-spring-easing)}[data-app-header][data-edge=top]{bottom:0}[data-app-header][data-edge=bottom]{top:0}[data-app-header-stack]{position:relative;display:inline-flex;align-items:center;height:100%}[data-app-header-inner]{display:flex;align-items:center;gap:.5rem;white-space:nowrap;opacity:1;filter:blur(0px);will-change:opacity,filter}[data-app-header-inner][data-layer=current]{animation:app-header-enter var(--app-duration) var(--app-spring-easing) both}[data-app-header-inner][data-layer=prev]{position:absolute;left:0;top:0;pointer-events:none}[data-app-header-inner][data-exiting=true]{animation:app-header-exit .3s ease forwards}[data-app-badge]{display:flex;height:24px;width:24px;flex-shrink:0;align-items:center;justify-content:center;padding:2px;box-sizing:border-box;border-radius:9999px;color:var(--app-tone, currentColor);background-color:var(--app-tone-bg, transparent)}[data-app-title]{font-size:.825rem;line-height:1rem;font-weight:500;text-transform:capitalize;color:var(--app-tone, currentColor)}:is([data-app-badge],[data-app-title])[data-state]{--_c: var(--app-state-success);--app-tone: var(--_c);--app-tone-bg: color-mix(in oklch, var(--_c) 20%, transparent)}:is([data-app-badge],[data-app-title])[data-state=loading]{--_c: var(--app-state-loading)}:is([data-app-badge],[data-app-title])[data-state=error]{--_c: var(--app-state-error)}:is([data-app-badge],[data-app-title])[data-state=warning]{--_c: var(--app-state-warning)}:is([data-app-badge],[data-app-title])[data-state=info]{--_c: var(--app-state-info)}:is([data-app-badge],[data-app-title])[data-state=action]{--_c: var(--app-state-action)}[data-app-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-app-content]:not([data-visible=true]){content-visibility:hidden}[data-app-toast][data-ready=true] [data-app-content]{transition:opacity calc(var(--app-duration) * .08) var(--app-spring-easing) calc(var(--app-duration) * .04)}[data-app-content][data-edge=top]{top:0}[data-app-content][data-edge=bottom]{top:var(--app-height)}[data-app-content][data-visible=true]{pointer-events:auto}[data-app-toast][data-ready=true] [data-app-content][data-visible=true]{transition:opacity var(--app-duration) var(--app-spring-easing) calc(var(--app-duration) * .25)}[data-app-description]{text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style;content-visibility:auto}[data-app-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--app-btn-color, currentColor);background-color:var(--app-btn-bg, transparent);transition:background-color .15s ease}[data-app-button][data-state]{--_c: var(--app-state-success);--app-btn-color: var(--_c);--app-btn-bg: color-mix(in oklch, var(--_c) 15%, transparent);--app-btn-bg-hover: color-mix(in oklch, var(--_c) 25%, transparent)}[data-app-button][data-state=loading]{--_c: var(--app-state-loading)}[data-app-button][data-state=error]{--_c: var(--app-state-error)}[data-app-button][data-state=warning]{--_c: var(--app-state-warning)}[data-app-button][data-state=info]{--_c: var(--app-state-info)}[data-app-button][data-state=action]{--_c: var(--app-state-action)}[data-app-icon=spin]{animation:app-spin 1s linear infinite}@keyframes app-spin{to{rotate:360deg}}@keyframes app-header-enter{0%{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes app-header-exit{0%{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-app-viewport]{position:fixed;z-index:2147483647;display:flex;gap:.25rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-app-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-app-viewport][data-position$=left]{left:0;align-items:flex-start}[data-app-viewport][data-position$=right]{right:0;align-items:flex-end}[data-app-viewport][data-position$=center]{left:50%;transform:translate(-50%);align-items:center}@media(prefers-reduced-motion:no-preference){[data-app-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms;animation-iteration-count:1;transition-duration:.01ms}}@keyframes app-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-app-badge][data-state=loading] svg,toast-icon[state=loading] svg{animation:app-spin 1s linear infinite}toast-icon{display:flex;align-items:center;justify-content:center}\n"], dependencies: [{ kind: "component", type: ToastComponent, selector: "app-toast", inputs: ["item", "activeId", "expandDir", "pillAlign"], outputs: ["dismiss"] }], encapsulation: i0.ViewEncapsulation.None });
400
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ToasterComponent, isStandalone: true, selector: "app-toaster", ngImport: i0, template: `
401
+ @for (pos of positions; track pos) {
402
+ @if (groupedToasts()[pos]?.length) {
403
+ <section data-app-viewport [attr.data-position]="pos" aria-live="polite">
404
+ @for (item of groupedToasts()[pos]; track item.id) {
405
+ <app-toast
406
+ [item]="item"
407
+ [activeId]="activeId()"
408
+ [expandDir]="pos.startsWith('top') ? 'bottom' : 'top'"
409
+ [pillAlign]="pos.includes('right') ? 'right' : (pos.includes('center') ? 'center' : 'left')"
410
+ (dismiss)="toastService.dismiss(item.id)"
411
+ />
412
+ }
413
+ </section>
414
+ }
415
+ }
416
+ `, isInline: true, styles: [":root{--app-spring-easing: linear( 0, .002 .6%, .007 1.2%, .015 1.8%, .026 2.4%, .041 3.1%, .06 3.8%, .108 5.3%, .157 6.6%, .214 8%, .467 13.7%, .577 16.3%, .631 17.7%, .682 19.1%, .73 20.5%, .771 21.8%, .808 23.1%, .844 24.5%, .874 25.8%, .903 27.2%, .928 28.6%, .952 30.1%, .972 31.6%, .988 33.1%, 1.01 35.7%, 1.025 38.5%, 1.034 41.6%, 1.038 45%, 1.035 50.1%, 1.012 64.2%, 1.003 73%, .999 83.7%, 1 );--app-duration: .6s;--app-height: 40px;--app-width: 350px;--app-state-success: oklch(.723 .219 142.136);--app-state-loading: oklch(.556 0 0);--app-state-error: oklch(.637 .237 25.331);--app-state-warning: oklch(.795 .184 86.047);--app-state-info: oklch(.685 .169 237.323);--app-state-action: oklch(.623 .214 259.815)}a{text-decoration:none}[data-app-toast]{position:relative;cursor:pointer;pointer-events:auto;touch-action:none;border:0;background:transparent;padding:0;width:var(--app-width);height:var(--_h, var(--app-height));opacity:0;transform:translateZ(0) scale(.95);transform-origin:center;contain:layout style;overflow:visible}[data-app-toast][data-state=loading]{cursor:default}[data-app-toast][data-ready=true]{opacity:1;transform:translateZ(0) scale(1);transition:transform calc(var(--app-duration) * .66) var(--app-spring-easing),opacity calc(var(--app-duration) * .66) var(--app-spring-easing),margin-bottom calc(var(--app-duration) * .66) var(--app-spring-easing),margin-top calc(var(--app-duration) * .66) var(--app-spring-easing),height var(--app-duration) var(--app-spring-easing)}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){transform:translateY(6px) scale(.95)}[data-app-toast][data-ready=true][data-exiting=true]{opacity:0;pointer-events:none}[data-app-viewport][data-position^=top] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(6px) scale(.95)}[data-app-canvas]{position:absolute;left:0;right:0;pointer-events:none;transform:translateZ(0);contain:layout style;overflow:visible}[data-app-canvas][data-edge=top]{bottom:0;transform:scaleY(-1) translateZ(0)}[data-app-canvas][data-edge=bottom]{top:0}[data-app-svg]{overflow:visible}[data-app-pill],[data-app-body]{transform-box:fill-box;transform-origin:50% 0%}[data-app-pill]{transform:scaleY(var(--_sy, 1));width:var(--_pw);height:var(--_ph)}[data-app-body]{transform:scaleY(var(--_by, 0));opacity:var(--_by, 0)}[data-app-toast][data-ready=true] [data-app-pill]{transition:transform var(--app-duration) var(--app-spring-easing),width var(--app-duration) var(--app-spring-easing),x var(--app-duration) var(--app-spring-easing)}[data-app-toast][data-ready=true][data-expanded=true] [data-app-pill]{transition-delay:calc(var(--app-duration) * .08)}[data-app-toast][data-ready=true] [data-app-body]{transition:transform var(--app-duration) var(--app-spring-easing),opacity var(--app-duration) var(--app-spring-easing)}[data-app-header]{position:absolute;z-index:20;display:flex;align-items:center;padding:0 .5rem;height:var(--app-height);overflow:hidden;left:var(--_px, 0px);transform:var(--_ht);max-width:var(--_pw)}[data-app-toast][data-ready=true] [data-app-header]{transition:transform var(--app-duration) var(--app-spring-easing),left var(--app-duration) var(--app-spring-easing),max-width var(--app-duration) var(--app-spring-easing)}[data-app-header][data-edge=top]{bottom:0}[data-app-header][data-edge=bottom]{top:0}[data-app-header-stack]{position:relative;display:inline-flex;align-items:center;height:100%}[data-app-header-inner]{display:flex;align-items:center;gap:.5rem;white-space:nowrap;opacity:1;filter:blur(0px);will-change:opacity,filter}[data-app-header-inner][data-layer=current]{animation:app-header-enter var(--app-duration) var(--app-spring-easing) both}[data-app-header-inner][data-layer=prev]{position:absolute;left:0;top:0;pointer-events:none}[data-app-header-inner][data-exiting=true]{animation:app-header-exit .3s ease forwards}[data-app-badge]{display:flex;height:24px;width:24px;flex-shrink:0;align-items:center;justify-content:center;padding:2px;box-sizing:border-box;border-radius:9999px;color:var(--app-tone, currentColor);background-color:var(--app-tone-bg, transparent)}[data-app-title]{font-size:.825rem;line-height:1rem;font-weight:500;text-transform:capitalize;color:var(--app-tone, currentColor)}:is([data-app-badge],[data-app-title])[data-state]{--_c: var(--app-state-success);--app-tone: var(--_c);--app-tone-bg: color-mix(in oklch, var(--_c) 20%, transparent)}:is([data-app-badge],[data-app-title])[data-state=loading]{--_c: var(--app-state-loading)}:is([data-app-badge],[data-app-title])[data-state=error]{--_c: var(--app-state-error)}:is([data-app-badge],[data-app-title])[data-state=warning]{--_c: var(--app-state-warning)}:is([data-app-badge],[data-app-title])[data-state=info]{--_c: var(--app-state-info)}:is([data-app-badge],[data-app-title])[data-state=action]{--_c: var(--app-state-action)}[data-app-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-app-content]:not([data-visible=true]){content-visibility:hidden}[data-app-toast][data-ready=true] [data-app-content]{transition:opacity calc(var(--app-duration) * .08) var(--app-spring-easing) calc(var(--app-duration) * .04)}[data-app-content][data-edge=top]{top:0}[data-app-content][data-edge=bottom]{top:var(--app-height)}[data-app-content][data-visible=true]{pointer-events:auto}[data-app-toast][data-ready=true] [data-app-content][data-visible=true]{transition:opacity var(--app-duration) var(--app-spring-easing) calc(var(--app-duration) * .25)}[data-app-description]{text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style;content-visibility:auto}[data-app-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--app-btn-color, currentColor);background-color:var(--app-btn-bg, transparent);transition:background-color .15s ease}[data-app-button][data-state]{--_c: var(--app-state-success);--app-btn-color: var(--_c);--app-btn-bg: color-mix(in oklch, var(--_c) 15%, transparent);--app-btn-bg-hover: color-mix(in oklch, var(--_c) 25%, transparent)}[data-app-button][data-state=loading]{--_c: var(--app-state-loading)}[data-app-button][data-state=error]{--_c: var(--app-state-error)}[data-app-button][data-state=warning]{--_c: var(--app-state-warning)}[data-app-button][data-state=info]{--_c: var(--app-state-info)}[data-app-button][data-state=action]{--_c: var(--app-state-action)}[data-app-icon=spin]{animation:app-spin 1s linear infinite}@keyframes app-spin{to{rotate:360deg}}@keyframes app-header-enter{0%{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes app-header-exit{0%{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-app-viewport]{position:fixed;z-index:2147483647;display:flex;gap:.25rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-app-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-app-viewport][data-position$=left]{left:0;align-items:flex-start}[data-app-viewport][data-position$=right]{right:0;align-items:flex-end}[data-app-viewport][data-position$=center]{left:50%;transform:translate(-50%);align-items:center}@media(prefers-reduced-motion:no-preference){[data-app-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms;animation-iteration-count:1;transition-duration:.01ms}}@keyframes app-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-app-badge][data-state=loading] svg,toast-icon[state=loading] svg{animation:app-spin 1s linear infinite}toast-icon{display:flex;align-items:center;justify-content:center}\n"], dependencies: [{ kind: "component", type: ToastComponent, selector: "app-toast", inputs: ["item", "activeId", "expandDir", "pillAlign"], outputs: ["dismiss"] }], encapsulation: i0.ViewEncapsulation.None });
406
417
  }
407
418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ToasterComponent, decorators: [{
408
419
  type: Component,
409
- args: [{ selector: 'app-toaster', standalone: true, imports: [ToastComponent], encapsulation: ViewEncapsulation.None, template: `
410
- @for (pos of positions; track pos) {
411
- @if (groupedToasts()[pos]?.length) {
412
- <section data-app-viewport [attr.data-position]="pos" aria-live="polite">
413
- @for (item of groupedToasts()[pos]; track item.id) {
414
- <app-toast
415
- [item]="item"
416
- [activeId]="activeId()"
417
- [expandDir]="pos.startsWith('top') ? 'bottom' : 'top'"
418
- [pillAlign]="pos.includes('right') ? 'right' : (pos.includes('center') ? 'center' : 'left')"
419
- (dismiss)="toastService.dismiss(item.id)"
420
- />
421
- }
422
- </section>
423
- }
424
- }
425
- `, styles: [":root{--app-spring-easing: linear( 0, .002 .6%, .007 1.2%, .015 1.8%, .026 2.4%, .041 3.1%, .06 3.8%, .108 5.3%, .157 6.6%, .214 8%, .467 13.7%, .577 16.3%, .631 17.7%, .682 19.1%, .73 20.5%, .771 21.8%, .808 23.1%, .844 24.5%, .874 25.8%, .903 27.2%, .928 28.6%, .952 30.1%, .972 31.6%, .988 33.1%, 1.01 35.7%, 1.025 38.5%, 1.034 41.6%, 1.038 45%, 1.035 50.1%, 1.012 64.2%, 1.003 73%, .999 83.7%, 1 );--app-duration: .6s;--app-height: 40px;--app-width: 350px;--app-state-success: oklch(.723 .219 142.136);--app-state-loading: oklch(.556 0 0);--app-state-error: oklch(.637 .237 25.331);--app-state-warning: oklch(.795 .184 86.047);--app-state-info: oklch(.685 .169 237.323);--app-state-action: oklch(.623 .214 259.815)}[data-app-toast]{position:relative;cursor:pointer;pointer-events:auto;touch-action:none;border:0;background:transparent;padding:0;width:var(--app-width);height:var(--_h, var(--app-height));opacity:0;transform:translateZ(0) scale(.95);transform-origin:center;contain:layout style;overflow:visible}[data-app-toast][data-state=loading]{cursor:default}[data-app-toast][data-ready=true]{opacity:1;transform:translateZ(0) scale(1);transition:transform calc(var(--app-duration) * .66) var(--app-spring-easing),opacity calc(var(--app-duration) * .66) var(--app-spring-easing),margin-bottom calc(var(--app-duration) * .66) var(--app-spring-easing),margin-top calc(var(--app-duration) * .66) var(--app-spring-easing),height var(--app-duration) var(--app-spring-easing)}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){transform:translateY(6px) scale(.95)}[data-app-toast][data-ready=true][data-exiting=true]{opacity:0;pointer-events:none}[data-app-viewport][data-position^=top] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(6px) scale(.95)}[data-app-canvas]{position:absolute;left:0;right:0;pointer-events:none;transform:translateZ(0);contain:layout style;overflow:visible}[data-app-canvas][data-edge=top]{bottom:0;transform:scaleY(-1) translateZ(0)}[data-app-canvas][data-edge=bottom]{top:0}[data-app-svg]{overflow:visible}[data-app-pill],[data-app-body]{transform-box:fill-box;transform-origin:50% 0%}[data-app-pill]{transform:scaleY(var(--_sy, 1));width:var(--_pw);height:var(--_ph)}[data-app-body]{transform:scaleY(var(--_by, 0));opacity:var(--_by, 0)}[data-app-toast][data-ready=true] [data-app-pill]{transition:transform var(--app-duration) var(--app-spring-easing),width var(--app-duration) var(--app-spring-easing),x var(--app-duration) var(--app-spring-easing)}[data-app-toast][data-ready=true][data-expanded=true] [data-app-pill]{transition-delay:calc(var(--app-duration) * .08)}[data-app-toast][data-ready=true] [data-app-body]{transition:transform var(--app-duration) var(--app-spring-easing),opacity var(--app-duration) var(--app-spring-easing)}[data-app-header]{position:absolute;z-index:20;display:flex;align-items:center;padding:0 .5rem;height:var(--app-height);overflow:hidden;left:var(--_px, 0px);transform:var(--_ht);max-width:var(--_pw)}[data-app-toast][data-ready=true] [data-app-header]{transition:transform var(--app-duration) var(--app-spring-easing),left var(--app-duration) var(--app-spring-easing),max-width var(--app-duration) var(--app-spring-easing)}[data-app-header][data-edge=top]{bottom:0}[data-app-header][data-edge=bottom]{top:0}[data-app-header-stack]{position:relative;display:inline-flex;align-items:center;height:100%}[data-app-header-inner]{display:flex;align-items:center;gap:.5rem;white-space:nowrap;opacity:1;filter:blur(0px);will-change:opacity,filter}[data-app-header-inner][data-layer=current]{animation:app-header-enter var(--app-duration) var(--app-spring-easing) both}[data-app-header-inner][data-layer=prev]{position:absolute;left:0;top:0;pointer-events:none}[data-app-header-inner][data-exiting=true]{animation:app-header-exit .3s ease forwards}[data-app-badge]{display:flex;height:24px;width:24px;flex-shrink:0;align-items:center;justify-content:center;padding:2px;box-sizing:border-box;border-radius:9999px;color:var(--app-tone, currentColor);background-color:var(--app-tone-bg, transparent)}[data-app-title]{font-size:.825rem;line-height:1rem;font-weight:500;text-transform:capitalize;color:var(--app-tone, currentColor)}:is([data-app-badge],[data-app-title])[data-state]{--_c: var(--app-state-success);--app-tone: var(--_c);--app-tone-bg: color-mix(in oklch, var(--_c) 20%, transparent)}:is([data-app-badge],[data-app-title])[data-state=loading]{--_c: var(--app-state-loading)}:is([data-app-badge],[data-app-title])[data-state=error]{--_c: var(--app-state-error)}:is([data-app-badge],[data-app-title])[data-state=warning]{--_c: var(--app-state-warning)}:is([data-app-badge],[data-app-title])[data-state=info]{--_c: var(--app-state-info)}:is([data-app-badge],[data-app-title])[data-state=action]{--_c: var(--app-state-action)}[data-app-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-app-content]:not([data-visible=true]){content-visibility:hidden}[data-app-toast][data-ready=true] [data-app-content]{transition:opacity calc(var(--app-duration) * .08) var(--app-spring-easing) calc(var(--app-duration) * .04)}[data-app-content][data-edge=top]{top:0}[data-app-content][data-edge=bottom]{top:var(--app-height)}[data-app-content][data-visible=true]{pointer-events:auto}[data-app-toast][data-ready=true] [data-app-content][data-visible=true]{transition:opacity var(--app-duration) var(--app-spring-easing) calc(var(--app-duration) * .25)}[data-app-description]{text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style;content-visibility:auto}[data-app-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--app-btn-color, currentColor);background-color:var(--app-btn-bg, transparent);transition:background-color .15s ease}[data-app-button][data-state]{--_c: var(--app-state-success);--app-btn-color: var(--_c);--app-btn-bg: color-mix(in oklch, var(--_c) 15%, transparent);--app-btn-bg-hover: color-mix(in oklch, var(--_c) 25%, transparent)}[data-app-button][data-state=loading]{--_c: var(--app-state-loading)}[data-app-button][data-state=error]{--_c: var(--app-state-error)}[data-app-button][data-state=warning]{--_c: var(--app-state-warning)}[data-app-button][data-state=info]{--_c: var(--app-state-info)}[data-app-button][data-state=action]{--_c: var(--app-state-action)}[data-app-icon=spin]{animation:app-spin 1s linear infinite}@keyframes app-spin{to{rotate:360deg}}@keyframes app-header-enter{0%{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes app-header-exit{0%{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-app-viewport]{position:fixed;z-index:2147483647;display:flex;gap:.25rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-app-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-app-viewport][data-position$=left]{left:0;align-items:flex-start}[data-app-viewport][data-position$=right]{right:0;align-items:flex-end}[data-app-viewport][data-position$=center]{left:50%;transform:translate(-50%);align-items:center}@media(prefers-reduced-motion:no-preference){[data-app-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms;animation-iteration-count:1;transition-duration:.01ms}}@keyframes app-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-app-badge][data-state=loading] svg,toast-icon[state=loading] svg{animation:app-spin 1s linear infinite}toast-icon{display:flex;align-items:center;justify-content:center}\n"] }]
420
+ args: [{ selector: 'app-toaster', standalone: true, imports: [ToastComponent], encapsulation: ViewEncapsulation.None, template: `
421
+ @for (pos of positions; track pos) {
422
+ @if (groupedToasts()[pos]?.length) {
423
+ <section data-app-viewport [attr.data-position]="pos" aria-live="polite">
424
+ @for (item of groupedToasts()[pos]; track item.id) {
425
+ <app-toast
426
+ [item]="item"
427
+ [activeId]="activeId()"
428
+ [expandDir]="pos.startsWith('top') ? 'bottom' : 'top'"
429
+ [pillAlign]="pos.includes('right') ? 'right' : (pos.includes('center') ? 'center' : 'left')"
430
+ (dismiss)="toastService.dismiss(item.id)"
431
+ />
432
+ }
433
+ </section>
434
+ }
435
+ }
436
+ `, styles: [":root{--app-spring-easing: linear( 0, .002 .6%, .007 1.2%, .015 1.8%, .026 2.4%, .041 3.1%, .06 3.8%, .108 5.3%, .157 6.6%, .214 8%, .467 13.7%, .577 16.3%, .631 17.7%, .682 19.1%, .73 20.5%, .771 21.8%, .808 23.1%, .844 24.5%, .874 25.8%, .903 27.2%, .928 28.6%, .952 30.1%, .972 31.6%, .988 33.1%, 1.01 35.7%, 1.025 38.5%, 1.034 41.6%, 1.038 45%, 1.035 50.1%, 1.012 64.2%, 1.003 73%, .999 83.7%, 1 );--app-duration: .6s;--app-height: 40px;--app-width: 350px;--app-state-success: oklch(.723 .219 142.136);--app-state-loading: oklch(.556 0 0);--app-state-error: oklch(.637 .237 25.331);--app-state-warning: oklch(.795 .184 86.047);--app-state-info: oklch(.685 .169 237.323);--app-state-action: oklch(.623 .214 259.815)}a{text-decoration:none}[data-app-toast]{position:relative;cursor:pointer;pointer-events:auto;touch-action:none;border:0;background:transparent;padding:0;width:var(--app-width);height:var(--_h, var(--app-height));opacity:0;transform:translateZ(0) scale(.95);transform-origin:center;contain:layout style;overflow:visible}[data-app-toast][data-state=loading]{cursor:default}[data-app-toast][data-ready=true]{opacity:1;transform:translateZ(0) scale(1);transition:transform calc(var(--app-duration) * .66) var(--app-spring-easing),opacity calc(var(--app-duration) * .66) var(--app-spring-easing),margin-bottom calc(var(--app-duration) * .66) var(--app-spring-easing),margin-top calc(var(--app-duration) * .66) var(--app-spring-easing),height var(--app-duration) var(--app-spring-easing)}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){transform:translateY(6px) scale(.95)}[data-app-toast][data-ready=true][data-exiting=true]{opacity:0;pointer-events:none}[data-app-viewport][data-position^=top] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(-6px) scale(.95)}[data-app-viewport][data-position^=bottom] [data-app-toast][data-ready=true][data-exiting=true]{transform:translateY(6px) scale(.95)}[data-app-canvas]{position:absolute;left:0;right:0;pointer-events:none;transform:translateZ(0);contain:layout style;overflow:visible}[data-app-canvas][data-edge=top]{bottom:0;transform:scaleY(-1) translateZ(0)}[data-app-canvas][data-edge=bottom]{top:0}[data-app-svg]{overflow:visible}[data-app-pill],[data-app-body]{transform-box:fill-box;transform-origin:50% 0%}[data-app-pill]{transform:scaleY(var(--_sy, 1));width:var(--_pw);height:var(--_ph)}[data-app-body]{transform:scaleY(var(--_by, 0));opacity:var(--_by, 0)}[data-app-toast][data-ready=true] [data-app-pill]{transition:transform var(--app-duration) var(--app-spring-easing),width var(--app-duration) var(--app-spring-easing),x var(--app-duration) var(--app-spring-easing)}[data-app-toast][data-ready=true][data-expanded=true] [data-app-pill]{transition-delay:calc(var(--app-duration) * .08)}[data-app-toast][data-ready=true] [data-app-body]{transition:transform var(--app-duration) var(--app-spring-easing),opacity var(--app-duration) var(--app-spring-easing)}[data-app-header]{position:absolute;z-index:20;display:flex;align-items:center;padding:0 .5rem;height:var(--app-height);overflow:hidden;left:var(--_px, 0px);transform:var(--_ht);max-width:var(--_pw)}[data-app-toast][data-ready=true] [data-app-header]{transition:transform var(--app-duration) var(--app-spring-easing),left var(--app-duration) var(--app-spring-easing),max-width var(--app-duration) var(--app-spring-easing)}[data-app-header][data-edge=top]{bottom:0}[data-app-header][data-edge=bottom]{top:0}[data-app-header-stack]{position:relative;display:inline-flex;align-items:center;height:100%}[data-app-header-inner]{display:flex;align-items:center;gap:.5rem;white-space:nowrap;opacity:1;filter:blur(0px);will-change:opacity,filter}[data-app-header-inner][data-layer=current]{animation:app-header-enter var(--app-duration) var(--app-spring-easing) both}[data-app-header-inner][data-layer=prev]{position:absolute;left:0;top:0;pointer-events:none}[data-app-header-inner][data-exiting=true]{animation:app-header-exit .3s ease forwards}[data-app-badge]{display:flex;height:24px;width:24px;flex-shrink:0;align-items:center;justify-content:center;padding:2px;box-sizing:border-box;border-radius:9999px;color:var(--app-tone, currentColor);background-color:var(--app-tone-bg, transparent)}[data-app-title]{font-size:.825rem;line-height:1rem;font-weight:500;text-transform:capitalize;color:var(--app-tone, currentColor)}:is([data-app-badge],[data-app-title])[data-state]{--_c: var(--app-state-success);--app-tone: var(--_c);--app-tone-bg: color-mix(in oklch, var(--_c) 20%, transparent)}:is([data-app-badge],[data-app-title])[data-state=loading]{--_c: var(--app-state-loading)}:is([data-app-badge],[data-app-title])[data-state=error]{--_c: var(--app-state-error)}:is([data-app-badge],[data-app-title])[data-state=warning]{--_c: var(--app-state-warning)}:is([data-app-badge],[data-app-title])[data-state=info]{--_c: var(--app-state-info)}:is([data-app-badge],[data-app-title])[data-state=action]{--_c: var(--app-state-action)}[data-app-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-app-content]:not([data-visible=true]){content-visibility:hidden}[data-app-toast][data-ready=true] [data-app-content]{transition:opacity calc(var(--app-duration) * .08) var(--app-spring-easing) calc(var(--app-duration) * .04)}[data-app-content][data-edge=top]{top:0}[data-app-content][data-edge=bottom]{top:var(--app-height)}[data-app-content][data-visible=true]{pointer-events:auto}[data-app-toast][data-ready=true] [data-app-content][data-visible=true]{transition:opacity var(--app-duration) var(--app-spring-easing) calc(var(--app-duration) * .25)}[data-app-description]{text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style;content-visibility:auto}[data-app-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--app-btn-color, currentColor);background-color:var(--app-btn-bg, transparent);transition:background-color .15s ease}[data-app-button][data-state]{--_c: var(--app-state-success);--app-btn-color: var(--_c);--app-btn-bg: color-mix(in oklch, var(--_c) 15%, transparent);--app-btn-bg-hover: color-mix(in oklch, var(--_c) 25%, transparent)}[data-app-button][data-state=loading]{--_c: var(--app-state-loading)}[data-app-button][data-state=error]{--_c: var(--app-state-error)}[data-app-button][data-state=warning]{--_c: var(--app-state-warning)}[data-app-button][data-state=info]{--_c: var(--app-state-info)}[data-app-button][data-state=action]{--_c: var(--app-state-action)}[data-app-icon=spin]{animation:app-spin 1s linear infinite}@keyframes app-spin{to{rotate:360deg}}@keyframes app-header-enter{0%{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes app-header-exit{0%{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-app-viewport]{position:fixed;z-index:2147483647;display:flex;gap:.25rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-app-viewport][data-position^=top] [data-app-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=bottom] [data-app-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--app-height) + .75rem))}[data-app-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-app-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-app-viewport][data-position$=left]{left:0;align-items:flex-start}[data-app-viewport][data-position$=right]{right:0;align-items:flex-end}[data-app-viewport][data-position$=center]{left:50%;transform:translate(-50%);align-items:center}@media(prefers-reduced-motion:no-preference){[data-app-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms;animation-iteration-count:1;transition-duration:.01ms}}@keyframes app-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-app-badge][data-state=loading] svg,toast-icon[state=loading] svg{animation:app-spin 1s linear infinite}toast-icon{display:flex;align-items:center;justify-content:center}\n"] }]
426
437
  }] });
427
438
 
428
439
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"makki-toast.mjs","sources":["../../../projects/makki-toast/src/lib/toast.service.ts","../../../projects/makki-toast/src/lib/toast.types.ts","../../../projects/makki-toast/src/lib/toast-icon.component.ts","../../../projects/makki-toast/src/lib/safe-html.pipe.ts","../../../projects/makki-toast/src/lib/toast/toast.component.ts","../../../projects/makki-toast/src/lib/toast/toast.component.html","../../../projects/makki-toast/src/lib/toaster/toaster.component.ts","../../../projects/makki-toast/src/public-api.ts","../../../projects/makki-toast/src/makki-toast.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { ToastItem, ToastOptions, ToastPosition } from './toast.types';\n\nconst DEFAULT_DURATION = 3000;\nconst EXIT_DURATION = DEFAULT_DURATION * 0.1;\n\n@Injectable({ providedIn: 'root' })\nexport class ToastService {\n private idCounter = 0;\n\n toasts = signal<ToastItem[]>([]);\n position = signal<ToastPosition>('top-right');\n globalOptions = signal<Partial<ToastOptions> | undefined>(undefined);\n\n private generateId() {\n return `${++this.idCounter}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;\n }\n\n dismiss(id: string) {\n const item = this.toasts().find((t) => t.id === id);\n if (!item || item.exiting) return;\n\n this.toasts.update(prev => prev.map(t => t.id === id ? { ...t, exiting: true } : t));\n\n setTimeout(() => {\n this.toasts.update(prev => prev.filter(t => t.id !== id));\n }, EXIT_DURATION);\n }\n\n private resolveAutopilot(opts: ToastOptions, duration: number | null) {\n if (opts.autopilot === false || !duration || duration <= 0) return {};\n\n const expandDelay = 150; \n const collapseDelay = Math.max(0, duration - 100);\n\n return {\n autoExpandDelayMs: expandDelay,\n autoCollapseDelayMs: collapseDelay,\n };\n }\n\n private createToast(options: ToastOptions) {\n const merged = { ...this.globalOptions(), ...options };\n const id = merged.id ?? `app-${this.generateId()}`;\n const duration = merged.duration === undefined ? DEFAULT_DURATION : merged.duration;\n const auto = this.resolveAutopilot(merged, duration);\n\n const item: ToastItem = {\n ...merged,\n id,\n instanceId: this.generateId(),\n position: merged.position ?? this.position(),\n ...auto\n };\n\n this.toasts.update(prev => {\n const existingIndex = prev.findIndex(t => t.id === id);\n if (existingIndex > -1) {\n const newArr = [...prev];\n newArr[existingIndex] = { ...item };\n return newArr;\n }\n return [...prev.filter(t => t.id !== id), item];\n });\n\n if (duration !== null && duration > 0) {\n setTimeout(() => {\n this.dismiss(id);\n }, duration);\n }\n\n return { id, duration };\n }\n\n show(opts: ToastOptions) { return this.createToast(opts).id; }\n success(opts: ToastOptions) { return this.createToast({ ...opts, state: 'success' }).id; }\n error(opts: ToastOptions) { return this.createToast({ ...opts, state: 'error' }).id; }\n warning(opts: ToastOptions) { return this.createToast({ ...opts, state: 'warning' }).id; }\n info(opts: ToastOptions) { return this.createToast({ ...opts, state: 'info' }).id; }\n action(opts: ToastOptions) { return this.createToast({ ...opts, state: 'action' }).id; }\n\n promise<T>(\n promise: Promise<T> | (() => Promise<T>),\n opts: { loading: ToastOptions; success: ToastOptions | ((d: T) => ToastOptions); error: ToastOptions | ((e: any) => ToastOptions) }\n ): Promise<T> {\n const p = typeof promise === 'function' ? promise() : promise;\n const id = this.createToast({ ...opts.loading, state: 'loading', duration: null }).id;\n\n const startTime = Date.now();\n\n p.then(data => {\n const duration = Date.now() - startTime;\n const successOpts = typeof opts.success === 'function' ? opts.success(data) : opts.success;\n const executionDelay = duration < 500 ? 100 : 0;\n\n setTimeout(() => {\n this.createToast({ \n ...successOpts, \n state: 'success', \n id, \n duration: successOpts.duration ?? 6000 \n });\n }, executionDelay);\n\n }).catch(err => {\n const errorOpts = typeof opts.error === 'function' ? opts.error(err) : opts.error;\n this.createToast({ ...errorOpts, state: 'error', id, duration: errorOpts.duration ?? 3000 });\n });\n\n return p;\n }\n}\n","import { Type } from \"@angular/core\";\n\nexport type ToastState =\n | 'success'\n | 'loading'\n | 'error'\n | 'warning'\n | 'info'\n | 'action';\n\nexport interface ToastStyles {\n title?: string;\n description?: string;\n badge?: string;\n button?: string;\n}\n\nexport interface ToastButton {\n title: string;\n onClick: () => void;\n}\n\nexport const TOAST_POSITIONS = [\n 'top-left',\n 'top-center',\n 'top-right',\n 'bottom-left',\n 'bottom-center',\n 'bottom-right',\n] as const;\n\nexport type ToastPosition = (typeof TOAST_POSITIONS)[number];\n\nexport interface ToastComponentPayload {\n component: Type<any>;\n inputs?: Record<string, any>;\n}\n\nexport interface ToastOptions {\n id?: string;\n title?: string;\n description?: string | Type<any> | ToastComponentPayload; \n position?: ToastPosition;\n duration?: number | null;\n icon?: string | Type<any>; \n styles?: ToastStyles;\n fill?: string;\n roundness?: number;\n autopilot?: boolean | { expand?: number; collapse?: number };\n button?: ToastButton;\n state?: ToastState;\n}\n\nexport interface ToastItem extends ToastOptions {\n id: string;\n instanceId: string;\n exiting?: boolean;\n autoExpandDelayMs?: number;\n autoCollapseDelayMs?: number;\n}\n","import { Component, Input } from '@angular/core';\nimport { ToastState } from './toast.types';\n\n@Component({\n selector: 'toast-icon',\n standalone: true,\n template: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n @switch (state) {\n @case ('success') { <path d=\"M20 6 9 17l-5-5\" /> }\n @case ('loading') { <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" [attr.data-makki-icon]=\"'spin'\" /> }\n @case ('error') { <path d=\"M18 6 6 18\" /><path d=\"m6 6 12 12\" /> }\n @case ('warning') { <circle cx=\"12\" cy=\"12\" r=\"10\" /><line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" /><line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" /> }\n @case ('info') { <circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"m4.93 4.93 4.24 4.24\" /><path d=\"m14.83 9.17 4.24-4.24\" /><path d=\"m14.83 14.83 4.24 4.24\" /><path d=\"m9.17 14.83-4.24 4.24\" /><circle cx=\"12\" cy=\"12\" r=\"4\" /> }\n @case ('action') { <path d=\"M5 12h14\" /><path d=\"m12 5 7 7-7 7\" /> }\n }\n </svg>\n `\n})\nexport class ToastIconComponent {\n @Input() state!: ToastState;\n}","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({ name: 'safeHtml', standalone: true })\nexport class SafeHtmlPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n transform(value: string): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(value);\n }\n}","import { AfterViewInit, Component, computed, effect, ElementRef, Input, NgZone, OnDestroy, output, signal, ViewChild } from '@angular/core';\nimport { ToastIconComponent } from '../toast-icon.component';\nimport { ToastItem } from '../toast.types';\nimport { SafeHtmlPipe } from \"../safe-html.pipe\";\nimport { NgComponentOutlet } from '@angular/common';\n\n@Component({\n selector: 'app-toast',\n standalone: true,\n imports: [ToastIconComponent, SafeHtmlPipe, NgComponentOutlet],\n templateUrl: './toast.component.html'\n})\nexport class ToastComponent implements AfterViewInit, OnDestroy {\n HEIGHT = 40;\n WIDTH = 350;\n DEFAULT_ROUNDNESS = 18;\n BLUR_RATIO = 0.5;\n PILL_PADDING = 10;\n MIN_EXPAND_RATIO = 2.25;\n\n private _item!: ToastItem;\n @Input({ required: true }) \n set item(val: ToastItem) {\n this._item = val;\n this.itemSignal.set(val);\n }\n get item() { return this._item; }\n \n itemSignal = signal<ToastItem>({} as ToastItem);\n @Input() activeId?: string;\n @Input() expandDir!: 'top' | 'bottom';\n @Input() pillAlign!: 'left' | 'center' | 'right';\n \n dismiss = output<void>();\n\n @ViewChild('innerRef') innerRef!: ElementRef<HTMLDivElement>;\n @ViewChild('headerRef') headerRef!: ElementRef<HTMLDivElement>;\n @ViewChild('contentRef') contentRef!: ElementRef<HTMLDivElement>;\n @ViewChild('buttonRef') buttonRef!: ElementRef<HTMLButtonElement>;\n\n isExpanded = signal(false);\n ready = signal(false);\n pillWidth = signal(0);\n contentHeight = signal(0);\n\n isStringDesc = computed(() => typeof this.itemSignal().description === 'string');\n \n descComponent = computed(() => {\n const desc = this.itemSignal().description;\n if (typeof desc === 'function') return desc;\n if (desc && typeof desc === 'object' && 'component' in desc) {\n return desc.component;\n }\n return null; \n });\n\n descInputs = computed(() => {\n const desc = this.itemSignal().description;\n if (desc && typeof desc === 'object' && 'inputs' in desc) {\n return desc.inputs as Record<string, any>;\n }\n return {};\n });\n \n descString = computed(() => this.itemSignal().description as string);\n hasDesc = computed(() => !!this.itemSignal().description || !!this.itemSignal().button);\n\n hasCustomIcon = computed(() => !!this.itemSignal().icon);\n isStringIcon = computed(() => typeof this.itemSignal().icon === 'string');\n iconString = computed(() => this.itemSignal().icon as string);\n \n iconComponent = computed(() => {\n const icon = this.itemSignal().icon;\n return typeof icon === 'function' ? (icon) : null;\n });\n\n isLoading = computed(() => this.itemSignal().state === 'loading');\n open = computed(() => this.hasDesc() && this.isExpanded() && !this.isLoading());\n \n resolvedRoundness = computed(() => Math.max(0, this.itemSignal().roundness ?? this.DEFAULT_ROUNDNESS));\n blur = computed(() => this.resolvedRoundness() * this.BLUR_RATIO);\n filterId = computed(() => `toast-makki-${this.itemSignal().id}`);\n\n expanded = computed(() => {\n const minExpanded = this.HEIGHT * this.MIN_EXPAND_RATIO;\n return this.hasDesc() ? Math.max(minExpanded, this.HEIGHT + this.contentHeight()) : minExpanded;\n });\n\n svgHeight = computed(() => this.hasDesc() ? Math.max(this.expanded(), this.HEIGHT * this.MIN_EXPAND_RATIO) : this.HEIGHT);\n expandedContent = computed(() => Math.max(0, this.expanded() - this.HEIGHT));\n resolvedPillWidth = computed(() => Math.max(this.pillWidth() || this.HEIGHT, this.HEIGHT));\n pillHeight = computed(() => this.HEIGHT + this.blur() * 3);\n pillX = computed(() => {\n const pillWidth = this.resolvedPillWidth();\n if (this.pillAlign === 'right') { return this.WIDTH - pillWidth; }\n if (this.pillAlign === 'center') { return (this.WIDTH - pillWidth) / 2; }\n return 0;\n });\n\n private resizeObserver?: ResizeObserver;\n private pointerStart: number | null = null;\n private timeouts: any[] = [];\n\n constructor(private readonly ngZone: NgZone) {\n effect(() => {\n const item = this.itemSignal();\n if (!item?.id) return;\n\n const state = item.state; \n const id = item.id;\n \n const allow = state !== 'loading' && (this.activeId === undefined || this.activeId === id);\n this.clearTimeouts();\n\n if (!item.exiting && allow && this.hasDesc()) {\n const delay = item.autoExpandDelayMs ?? 150;\n\n this.timeouts.push(setTimeout(() => {\n this.isExpanded.set(true);\n setTimeout(() => this.measure(), 100); \n }, delay));\n\n if (item.autoCollapseDelayMs) {\n this.timeouts.push(setTimeout(() => {\n this.isExpanded.set(false);\n }, item.autoCollapseDelayMs));\n }\n } else {\n this.isExpanded.set(false);\n }\n });\n }\n\n ngAfterViewInit(): void {\n requestAnimationFrame(() => this.ready.set(true));\n\n this.resizeObserver = new ResizeObserver(() => {\n this.measure();\n });\n\n if (this.innerRef?.nativeElement) this.resizeObserver.observe(this.innerRef.nativeElement);\n if (this.contentRef?.nativeElement) this.resizeObserver.observe(this.contentRef.nativeElement);\n\n this.setupSwipe();\n }\n\n handleButtonClick(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n if (this.item.button && typeof this.item.button.onClick === 'function') {\n this.item.button.onClick();\n }\n }\n\n measure() {\n if (this.innerRef && this.headerRef) {\n const header = this.headerRef.nativeElement;\n const cs = getComputedStyle(header);\n const px = Number.parseFloat(cs.paddingLeft) + Number.parseFloat(cs.paddingRight);\n const w = this.innerRef.nativeElement.scrollWidth + px + this.PILL_PADDING;\n if (w > this.PILL_PADDING && w !== this.pillWidth()) this.pillWidth.set(w);\n }\n if (this.contentRef) {\n const h = this.contentRef.nativeElement.scrollHeight;\n if (h !== this.contentHeight()) this.contentHeight.set(h);\n }\n }\n\n setupSwipe() {\n this.ngZone.runOutsideAngular(() => {\n const el = this.buttonRef.nativeElement;\n\n el.addEventListener('pointerdown', (e) => {\n const target = e.target as HTMLElement;\n if (target.closest('[data-app-button]')) {\n return; \n }\n \n if (this.item.exiting) return;\n this.pointerStart = e.clientY;\n el.setPointerCapture(e.pointerId);\n });\n\n el.addEventListener('pointermove', (e) => {\n if (this.pointerStart === null) return;\n const dy = e.clientY - this.pointerStart;\n const clamped = Math.min(Math.abs(dy), 20) * (dy > 0 ? 1 : -1);\n el.style.transform = `translateY(${clamped}px)`;\n });\n\n el.addEventListener('pointerup', (e) => {\n if (this.pointerStart === null) return;\n const dy = e.clientY - this.pointerStart;\n this.pointerStart = null;\n el.style.transform = '';\n if (Math.abs(dy) > 30) {\n this.ngZone.run(() => this.dismiss.emit());\n }\n });\n });\n }\n\n clearTimeouts() {\n this.timeouts.forEach(clearTimeout);\n this.timeouts = [];\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n this.clearTimeouts();\n }\n}\n","<button #buttonRef type=\"button\" data-app-toast\n [attr.data-ready]=\"ready()\" [attr.data-expanded]=\"open()\" \n [attr.data-exiting]=\"item.exiting\" [attr.data-edge]=\"expandDir\"\n [attr.data-position]=\"pillAlign\" [attr.data-state]=\"item.state\"\n [style.--_h]=\"open() ? expanded() + 'px' : HEIGHT + 'px'\"\n [style.--_pw]=\"resolvedPillWidth() + 'px'\"\n [style.--_px]=\"pillX() + 'px'\"\n [style.--_sy]=\"open() ? 1 : HEIGHT / pillHeight()\"\n [style.--_ph]=\"pillHeight() + 'px'\"\n [style.--_by]=\"open() ? 1 : 0\"\n [style.--_ht]=\"'translateY(' + (open() ? (expandDir === 'bottom' ? 3 : -3) : 0) + 'px) scale(' + (open() ? 0.9 : 1) + ')'\"\n [style.--_co]=\"open() ? 1 : 0\">\n\n <div data-app-canvas [attr.data-edge]=\"expandDir\">\n <svg data-app-svg [attr.width]=\"WIDTH\" [attr.height]=\"svgHeight()\" [attr.viewBox]=\"'0 0 ' + WIDTH + ' ' + svgHeight()\">\n <defs>\n <filter [attr.id]=\"filterId()\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n <feGaussianBlur in=\"SourceGraphic\" [attr.stdDeviation]=\"blur()\" result=\"blur\" />\n <feColorMatrix in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10\" result=\"goo\" />\n <feComposite in=\"SourceGraphic\" in2=\"goo\" operator=\"atop\" />\n </filter>\n </defs>\n <g [attr.filter]=\"'url(#' + filterId() + ')'\">\n <rect data-app-pill [attr.x]=\"pillX()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#011623'\" />\n <rect data-app-body [attr.y]=\"HEIGHT\" [attr.width]=\"WIDTH\" [attr.height]=\"expandedContent()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#011623'\" />\n </g>\n </svg>\n </div>\n\n <div #headerRef data-app-header [attr.data-edge]=\"expandDir\">\n <div data-app-header-stack>\n <div #innerRef data-app-header-inner data-layer=\"current\">\n <div data-app-badge [attr.data-state]=\"item.state || 'success'\">\n @if (hasCustomIcon()) {\n \n @if (isStringIcon()) {\n <span [innerHTML]=\"iconString() | safeHtml\" style=\"display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;\"></span>\n } @else {\n <ng-container *ngComponentOutlet=\"iconComponent()\"></ng-container>\n }\n\n } @else {\n <toast-icon [state]=\"item.state || 'success'\"></toast-icon>\n }\n </div>\n <span data-app-title [attr.data-state]=\"item.state || 'success'\">\n {{ item.title || item.state }}\n </span>\n </div>\n </div>\n </div>\n\n @if (hasDesc()) {\n <div data-app-content [attr.data-edge]=\"expandDir\" [attr.data-visible]=\"open()\">\n <div #contentRef data-app-description style=\"display: block; overflow: hidden; color: #FFFFFF;\">\n @if (item.description) {\n @if (isStringDesc()) {\n <span [innerHTML]=\"descString() | safeHtml\"></span>\n } @else {\n <ng-container *ngComponentOutlet=\"descComponent(); inputs: descInputs()\"></ng-container>\n }\n }\n\n @if (item.button) {\n <a href=\"#\" data-app-button [attr.data-state]=\"item.state\"\n (click)=\"handleButtonClick($event)\">\n {{ item.button.title }}\n </a>\n }\n </div>\n </div>\n }\n</button>","import { Component, computed, inject, ViewEncapsulation } from '@angular/core';\nimport { ToastComponent } from '../toast/toast.component';\nimport { ToastService } from '../toast.service';\nimport { TOAST_POSITIONS, ToastPosition } from '../toast.types';\n\n@Component({\n selector: 'app-toaster',\n standalone: true,\n imports: [ToastComponent],\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../toast.css'],\n template: `\n @for (pos of positions; track pos) {\n @if (groupedToasts()[pos]?.length) {\n <section data-app-viewport [attr.data-position]=\"pos\" aria-live=\"polite\">\n @for (item of groupedToasts()[pos]; track item.id) {\n <app-toast \n [item]=\"item\"\n [activeId]=\"activeId()\"\n [expandDir]=\"pos.startsWith('top') ? 'bottom' : 'top'\"\n [pillAlign]=\"pos.includes('right') ? 'right' : (pos.includes('center') ? 'center' : 'left')\"\n (dismiss)=\"toastService.dismiss(item.id)\"\n />\n }\n </section>\n }\n }\n `\n})\nexport class ToasterComponent {\n toastService = inject(ToastService);\n positions = TOAST_POSITIONS;\n\n groupedToasts = computed(() => {\n const map: Partial<Record<ToastPosition, any[]>> = {};\n for (const t of this.toastService.toasts()) {\n const pos = t.position || 'top-right';\n if (!map[pos]) map[pos] = [];\n map[pos]!.push(t);\n }\n return map;\n });\n\n activeId = computed(() => {\n const toasts = this.toastService.toasts();\n for (let i = toasts.length - 1; i >= 0; i--) {\n if (!toasts[i].exiting) return toasts[i].id;\n }\n return undefined;\n });\n}\n","/*\n * Public API Surface of makki-toast\n */\n\nexport * from './lib/toast.service';\nexport * from './lib/toast.types';\nexport * from './lib/toast/toast.component';\nexport * from './lib/toaster/toaster.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAGA,MAAM,gBAAgB,GAAG,IAAI;AAC7B,MAAM,aAAa,GAAG,gBAAgB,GAAG,GAAG;MAG/B,YAAY,CAAA;IACf,SAAS,GAAG,CAAC;AAErB,IAAA,MAAM,GAAG,MAAM,CAAc,EAAE,kDAAC;AAChC,IAAA,QAAQ,GAAG,MAAM,CAAgB,WAAW,oDAAC;AAC7C,IAAA,aAAa,GAAG,MA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;AAAE,gBAAA,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;QAC7C;AACA,QAAA,OAAO,SAAS;AAClB,IAAA,CAAC,oDAAC;uGApBS,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAlBjB;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ktQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAnBS,cAAc,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAqBb,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAxB5B,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,CAAC,EAAA,aAAA,EACV,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAE3B;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ktQAAA,CAAA,EAAA;;;AC3BH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"makki-toast.mjs","sources":["../../../projects/makki-toast/src/lib/toast.service.ts","../../../projects/makki-toast/src/lib/toast.types.ts","../../../projects/makki-toast/src/lib/toast-icon.component.ts","../../../projects/makki-toast/src/lib/safe-html.pipe.ts","../../../projects/makki-toast/src/lib/toast/toast.component.ts","../../../projects/makki-toast/src/lib/toast/toast.component.html","../../../projects/makki-toast/src/lib/toaster/toaster.component.ts","../../../projects/makki-toast/src/public-api.ts","../../../projects/makki-toast/src/makki-toast.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\r\nimport { ToastItem, ToastOptions, ToastPosition } from './toast.types';\r\n\r\nconst DEFAULT_DURATION = 3000;\r\nconst EXIT_DURATION = DEFAULT_DURATION * 0.1;\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ToastService {\r\n private idCounter = 0;\r\n\r\n toasts = signal<ToastItem[]>([]);\r\n position = signal<ToastPosition>('top-right');\r\n globalOptions = signal<Partial<ToastOptions> | undefined>(undefined);\r\n\r\n private generateId() {\r\n return `${++this.idCounter}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;\r\n }\r\n\r\n dismiss(id: string) {\r\n const item = this.toasts().find((t) => t.id === id);\r\n if (!item || item.exiting) return;\r\n\r\n this.toasts.update(prev => prev.map(t => t.id === id ? { ...t, exiting: true } : t));\r\n\r\n setTimeout(() => {\r\n this.toasts.update(prev => prev.filter(t => t.id !== id));\r\n }, EXIT_DURATION);\r\n }\r\n\r\n private resolveAutopilot(opts: ToastOptions, duration: number | null) {\r\n if (opts.autopilot === false || !duration || duration <= 0) return {};\r\n\r\n const expandDelay = 150; \r\n const collapseDelay = Math.max(0, duration - 100);\r\n\r\n return {\r\n autoExpandDelayMs: expandDelay,\r\n autoCollapseDelayMs: collapseDelay,\r\n };\r\n }\r\n\r\n private createToast(options: ToastOptions) {\r\n const merged = { ...this.globalOptions(), ...options };\r\n const id = merged.id ?? `app-${this.generateId()}`;\r\n const duration = merged.duration === undefined ? DEFAULT_DURATION : merged.duration;\r\n const auto = this.resolveAutopilot(merged, duration);\r\n\r\n const item: ToastItem = {\r\n ...merged,\r\n id,\r\n instanceId: this.generateId(),\r\n position: merged.position ?? this.position(),\r\n ...auto\r\n };\r\n\r\n this.toasts.update(prev => {\r\n const existingIndex = prev.findIndex(t => t.id === id);\r\n if (existingIndex > -1) {\r\n const newArr = [...prev];\r\n newArr[existingIndex] = { ...item };\r\n return newArr;\r\n }\r\n return [...prev.filter(t => t.id !== id), item];\r\n });\r\n\r\n if (duration !== null && duration > 0) {\r\n setTimeout(() => {\r\n this.dismiss(id);\r\n }, duration);\r\n }\r\n\r\n return { id, duration };\r\n }\r\n\r\n show(opts: ToastOptions) { return this.createToast(opts).id; }\r\n success(opts: ToastOptions) { return this.createToast({ ...opts, state: 'success' }).id; }\r\n error(opts: ToastOptions) { return this.createToast({ ...opts, state: 'error' }).id; }\r\n warning(opts: ToastOptions) { return this.createToast({ ...opts, state: 'warning' }).id; }\r\n info(opts: ToastOptions) { return this.createToast({ ...opts, state: 'info' }).id; }\r\n action(opts: ToastOptions) { return this.createToast({ ...opts, state: 'action' }).id; }\r\n\r\n dismissAll() {\r\n const current = this.toasts();\r\n current.forEach(t => {\r\n if (!t.exiting) {\r\n this.toasts.update(prev => prev.map(x => x.id === t.id ? { ...x, exiting: true } : x));\r\n }\r\n });\r\n setTimeout(() => {\r\n this.toasts.set([]);\r\n }, 0);\r\n }\r\n\r\n promise<T>(\r\n promise: Promise<T> | (() => Promise<T>),\r\n opts: { loading: ToastOptions; success: ToastOptions | ((d: T) => ToastOptions); error: ToastOptions | ((e: any) => ToastOptions) }\r\n ): Promise<T> {\r\n const p = typeof promise === 'function' ? promise() : promise;\r\n const id = this.createToast({ ...opts.loading, state: 'loading', duration: null }).id;\r\n\r\n const startTime = Date.now();\r\n\r\n p.then(data => {\r\n const duration = Date.now() - startTime;\r\n const successOpts = typeof opts.success === 'function' ? opts.success(data) : opts.success;\r\n const executionDelay = duration < 500 ? 100 : 0;\r\n\r\n setTimeout(() => {\r\n this.createToast({ \r\n ...successOpts, \r\n state: 'success', \r\n id, \r\n duration: successOpts.duration ?? 6000 \r\n });\r\n }, executionDelay);\r\n\r\n }).catch(err => {\r\n const errorOpts = typeof opts.error === 'function' ? opts.error(err) : opts.error;\r\n this.createToast({ ...errorOpts, state: 'error', id, duration: errorOpts.duration ?? 3000 });\r\n });\r\n\r\n return p;\r\n }\r\n}\r\n","import { Type } from \"@angular/core\";\r\n\r\nexport type ToastState =\r\n | 'success'\r\n | 'loading'\r\n | 'error'\r\n | 'warning'\r\n | 'info'\r\n | 'action';\r\n\r\nexport interface ToastStyles {\r\n title?: string;\r\n description?: string;\r\n badge?: string;\r\n button?: string;\r\n}\r\n\r\nexport interface ToastButton {\r\n title: string;\r\n onClick: () => void;\r\n}\r\n\r\nexport const TOAST_POSITIONS = [\r\n 'top-left',\r\n 'top-center',\r\n 'top-right',\r\n 'bottom-left',\r\n 'bottom-center',\r\n 'bottom-right',\r\n] as const;\r\n\r\nexport type ToastPosition = (typeof TOAST_POSITIONS)[number];\r\n\r\nexport interface ToastComponentPayload {\r\n component: Type<any>;\r\n inputs?: Record<string, any>;\r\n}\r\n\r\nexport interface ToastOptions {\r\n id?: string;\r\n title?: string;\r\n description?: string | Type<any> | ToastComponentPayload; \r\n position?: ToastPosition;\r\n duration?: number | null;\r\n icon?: string | Type<any>; \r\n styles?: ToastStyles;\r\n fill?: string;\r\n color?: string;\r\n roundness?: number;\r\n autopilot?: boolean | { expand?: number; collapse?: number };\r\n button?: ToastButton;\r\n state?: ToastState;\r\n}\r\n\r\nexport interface ToastItem extends ToastOptions {\r\n id: string;\r\n instanceId: string;\r\n exiting?: boolean;\r\n autoExpandDelayMs?: number;\r\n autoCollapseDelayMs?: number;\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { ToastState } from './toast.types';\r\n\r\n@Component({\r\n selector: 'toast-icon',\r\n standalone: true,\r\n template: `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n @switch (state) {\r\n @case ('success') { <path d=\"M20 6 9 17l-5-5\" /> }\r\n @case ('loading') { <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" [attr.data-makki-icon]=\"'spin'\" /> }\r\n @case ('error') { <path d=\"M18 6 6 18\" /><path d=\"m6 6 12 12\" /> }\r\n @case ('warning') { <circle cx=\"12\" cy=\"12\" r=\"10\" /><line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\" /><line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\" /> }\r\n @case ('info') { <circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"m4.93 4.93 4.24 4.24\" /><path d=\"m14.83 9.17 4.24-4.24\" /><path d=\"m14.83 14.83 4.24 4.24\" /><path d=\"m9.17 14.83-4.24 4.24\" /><circle cx=\"12\" cy=\"12\" r=\"4\" /> }\r\n @case ('action') { <path d=\"M5 12h14\" /><path d=\"m12 5 7 7-7 7\" /> }\r\n }\r\n </svg>\r\n `\r\n})\r\nexport class ToastIconComponent {\r\n @Input() state!: ToastState;\r\n}","import { Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n@Pipe({ name: 'safeHtml', standalone: true })\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n private readonly sanitizer = inject(DomSanitizer);\r\n transform(value: string): SafeHtml {\r\n return this.sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { AfterViewInit, Component, computed, effect, ElementRef, Input, NgZone, OnDestroy, output, signal, ViewChild } from '@angular/core';\r\nimport { ToastIconComponent } from '../toast-icon.component';\r\nimport { ToastItem } from '../toast.types';\r\nimport { SafeHtmlPipe } from \"../safe-html.pipe\";\r\nimport { NgComponentOutlet } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'app-toast',\r\n standalone: true,\r\n imports: [ToastIconComponent, SafeHtmlPipe, NgComponentOutlet],\r\n templateUrl: './toast.component.html'\r\n})\r\nexport class ToastComponent implements AfterViewInit, OnDestroy {\r\n HEIGHT = 40;\r\n WIDTH = 350;\r\n DEFAULT_ROUNDNESS = 18;\r\n BLUR_RATIO = 0.5;\r\n PILL_PADDING = 10;\r\n MIN_EXPAND_RATIO = 2.25;\r\n\r\n private _item!: ToastItem;\r\n @Input({ required: true }) \r\n set item(val: ToastItem) {\r\n this._item = val;\r\n this.itemSignal.set(val);\r\n }\r\n get item() { return this._item; }\r\n \r\n itemSignal = signal<ToastItem>({} as ToastItem);\r\n @Input() activeId?: string;\r\n @Input() expandDir!: 'top' | 'bottom';\r\n @Input() pillAlign!: 'left' | 'center' | 'right';\r\n \r\n dismiss = output<void>();\r\n\r\n @ViewChild('innerRef') innerRef!: ElementRef<HTMLDivElement>;\r\n @ViewChild('headerRef') headerRef!: ElementRef<HTMLDivElement>;\r\n @ViewChild('contentRef') contentRef!: ElementRef<HTMLDivElement>;\r\n @ViewChild('buttonRef') buttonRef!: ElementRef<HTMLButtonElement>;\r\n\r\n isExpanded = signal(false);\r\n ready = signal(false);\r\n pillWidth = signal(0);\r\n contentHeight = signal(0);\r\n\r\n isStringDesc = computed(() => typeof this.itemSignal().description === 'string');\r\n \r\n descComponent = computed(() => {\r\n const desc = this.itemSignal().description;\r\n if (typeof desc === 'function') return desc;\r\n if (desc && typeof desc === 'object' && 'component' in desc) {\r\n return desc.component;\r\n }\r\n return null; \r\n });\r\n\r\n descInputs = computed(() => {\r\n const desc = this.itemSignal().description;\r\n if (desc && typeof desc === 'object' && 'inputs' in desc) {\r\n return desc.inputs as Record<string, any>;\r\n }\r\n return {};\r\n });\r\n \r\n descString = computed(() => this.itemSignal().description as string);\r\n hasDesc = computed(() => !!this.itemSignal().description || !!this.itemSignal().button);\r\n\r\n hasCustomIcon = computed(() => !!this.itemSignal().icon);\r\n isStringIcon = computed(() => typeof this.itemSignal().icon === 'string');\r\n iconString = computed(() => this.itemSignal().icon as string);\r\n \r\n iconComponent = computed(() => {\r\n const icon = this.itemSignal().icon;\r\n return typeof icon === 'function' ? (icon) : null;\r\n });\r\n\r\n isLoading = computed(() => this.itemSignal().state === 'loading');\r\n open = computed(() => this.hasDesc() && this.isExpanded() && !this.isLoading());\r\n \r\n resolvedRoundness = computed(() => Math.max(0, this.itemSignal().roundness ?? this.DEFAULT_ROUNDNESS));\r\n blur = computed(() => this.resolvedRoundness() * this.BLUR_RATIO);\r\n filterId = computed(() => `toast-makki-${this.itemSignal().id}`);\r\n\r\n expanded = computed(() => {\r\n const minExpanded = this.HEIGHT * this.MIN_EXPAND_RATIO;\r\n return this.hasDesc() ? Math.max(minExpanded, this.HEIGHT + this.contentHeight()) : minExpanded;\r\n });\r\n\r\n svgHeight = computed(() => this.hasDesc() ? Math.max(this.expanded(), this.HEIGHT * this.MIN_EXPAND_RATIO) : this.HEIGHT);\r\n expandedContent = computed(() => Math.max(0, this.expanded() - this.HEIGHT));\r\n resolvedPillWidth = computed(() => Math.max(this.pillWidth() || this.HEIGHT, this.HEIGHT));\r\n pillHeight = computed(() => this.HEIGHT + this.blur() * 3);\r\n pillX = computed(() => {\r\n const pillWidth = this.resolvedPillWidth();\r\n if (this.pillAlign === 'right') { return this.WIDTH - pillWidth; }\r\n if (this.pillAlign === 'center') { return (this.WIDTH - pillWidth) / 2; }\r\n return 0;\r\n });\r\n\r\n private resizeObserver?: ResizeObserver;\r\n private pointerStart: number | null = null;\r\n private timeouts: any[] = [];\r\n\r\n constructor(private readonly ngZone: NgZone) {\r\n effect(() => {\r\n const item = this.itemSignal();\r\n if (!item?.id) return;\r\n\r\n const state = item.state; \r\n const id = item.id;\r\n \r\n const allow = state !== 'loading' && (this.activeId === undefined || this.activeId === id);\r\n this.clearTimeouts();\r\n\r\n if (!item.exiting && allow && this.hasDesc()) {\r\n const delay = item.autoExpandDelayMs ?? 150;\r\n\r\n this.timeouts.push(setTimeout(() => {\r\n this.isExpanded.set(true);\r\n setTimeout(() => this.measure(), 100); \r\n }, delay));\r\n\r\n if (item.autoCollapseDelayMs) {\r\n this.timeouts.push(setTimeout(() => {\r\n this.isExpanded.set(false);\r\n }, item.autoCollapseDelayMs));\r\n }\r\n } else {\r\n this.isExpanded.set(false);\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n requestAnimationFrame(() => this.ready.set(true));\r\n\r\n this.resizeObserver = new ResizeObserver(() => {\r\n this.measure();\r\n });\r\n\r\n if (this.innerRef?.nativeElement) this.resizeObserver.observe(this.innerRef.nativeElement);\r\n if (this.contentRef?.nativeElement) this.resizeObserver.observe(this.contentRef.nativeElement);\r\n\r\n this.setupSwipe();\r\n }\r\n\r\n handleButtonClick(event: Event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (this.item.button && typeof this.item.button.onClick === 'function') {\r\n this.item.button.onClick();\r\n }\r\n }\r\n\r\n measure() {\r\n if (this.innerRef && this.headerRef) {\r\n const header = this.headerRef.nativeElement;\r\n const cs = getComputedStyle(header);\r\n const px = Number.parseFloat(cs.paddingLeft) + Number.parseFloat(cs.paddingRight);\r\n const w = this.innerRef.nativeElement.scrollWidth + px + this.PILL_PADDING;\r\n if (w > this.PILL_PADDING && w !== this.pillWidth()) this.pillWidth.set(w);\r\n }\r\n if (this.contentRef) {\r\n const h = this.contentRef.nativeElement.scrollHeight;\r\n if (h !== this.contentHeight()) this.contentHeight.set(h);\r\n }\r\n }\r\n\r\n setupSwipe() {\r\n this.ngZone.runOutsideAngular(() => {\r\n const el = this.buttonRef.nativeElement;\r\n\r\n el.addEventListener('pointerdown', (e) => {\r\n const target = e.target as HTMLElement;\r\n if (target.closest('[data-app-button]')) {\r\n return; \r\n }\r\n \r\n if (this.item.exiting) return;\r\n this.pointerStart = e.clientY;\r\n el.setPointerCapture(e.pointerId);\r\n });\r\n\r\n el.addEventListener('pointermove', (e) => {\r\n if (this.pointerStart === null) return;\r\n const dy = e.clientY - this.pointerStart;\r\n const clamped = Math.min(Math.abs(dy), 20) * (dy > 0 ? 1 : -1);\r\n el.style.transform = `translateY(${clamped}px)`;\r\n });\r\n\r\n el.addEventListener('pointerup', (e) => {\r\n if (this.pointerStart === null) return;\r\n const dy = e.clientY - this.pointerStart;\r\n this.pointerStart = null;\r\n el.style.transform = '';\r\n if (Math.abs(dy) > 30) {\r\n this.ngZone.run(() => this.dismiss.emit());\r\n }\r\n });\r\n });\r\n }\r\n\r\n clearTimeouts() {\r\n this.timeouts.forEach(clearTimeout);\r\n this.timeouts = [];\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.resizeObserver?.disconnect();\r\n this.clearTimeouts();\r\n }\r\n}\r\n","<button #buttonRef type=\"button\" data-app-toast\r\n [attr.data-ready]=\"ready()\" [attr.data-expanded]=\"open()\" \r\n [attr.data-exiting]=\"item.exiting\" [attr.data-edge]=\"expandDir\"\r\n [attr.data-position]=\"pillAlign\" [attr.data-state]=\"item.state\"\r\n [style.--_h]=\"open() ? expanded() + 'px' : HEIGHT + 'px'\"\r\n [style.--_pw]=\"resolvedPillWidth() + 'px'\"\r\n [style.--_px]=\"pillX() + 'px'\"\r\n [style.--_sy]=\"open() ? 1 : HEIGHT / pillHeight()\"\r\n [style.--_ph]=\"pillHeight() + 'px'\"\r\n [style.--_by]=\"open() ? 1 : 0\"\r\n [style.--_ht]=\"'translateY(' + (open() ? (expandDir === 'bottom' ? 3 : -3) : 0) + 'px) scale(' + (open() ? 0.9 : 1) + ')'\"\r\n [style.--_co]=\"open() ? 1 : 0\">\r\n\r\n <div data-app-canvas [attr.data-edge]=\"expandDir\">\r\n <svg data-app-svg [attr.width]=\"WIDTH\" [attr.height]=\"svgHeight()\" [attr.viewBox]=\"'0 0 ' + WIDTH + ' ' + svgHeight()\">\r\n <defs>\r\n <filter [attr.id]=\"filterId()\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\r\n <feGaussianBlur in=\"SourceGraphic\" [attr.stdDeviation]=\"blur()\" result=\"blur\" />\r\n <feColorMatrix in=\"blur\" mode=\"matrix\" values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10\" result=\"goo\" />\r\n <feComposite in=\"SourceGraphic\" in2=\"goo\" operator=\"atop\" />\r\n </filter>\r\n </defs>\r\n <g [attr.filter]=\"'url(#' + filterId() + ')'\">\r\n <rect data-app-pill [attr.x]=\"pillX()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#000000'\" />\r\n <rect data-app-body [attr.y]=\"HEIGHT\" [attr.width]=\"WIDTH\" [attr.height]=\"expandedContent()\" [attr.rx]=\"resolvedRoundness()\" [attr.ry]=\"resolvedRoundness()\" [attr.fill]=\"item.fill || '#000000'\" />\r\n </g>\r\n </svg>\r\n </div>\r\n\r\n <div #headerRef data-app-header [attr.data-edge]=\"expandDir\">\r\n <div data-app-header-stack>\r\n <div #innerRef data-app-header-inner data-layer=\"current\">\r\n <div data-app-badge [attr.data-state]=\"item.state || 'success'\">\r\n @if (hasCustomIcon()) {\r\n \r\n @if (isStringIcon()) {\r\n <span [innerHTML]=\"iconString() | safeHtml\" style=\"display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;\"></span>\r\n } @else {\r\n <ng-container *ngComponentOutlet=\"iconComponent()\"></ng-container>\r\n }\r\n\r\n } @else {\r\n <toast-icon [state]=\"item.state || 'success'\"></toast-icon>\r\n }\r\n </div>\r\n <span data-app-title [attr.data-state]=\"item.state || 'success'\">\r\n {{ item.title || item.state }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n @if (hasDesc()) {\r\n <div data-app-content [attr.data-edge]=\"expandDir\" [attr.data-visible]=\"open()\">\r\n <div #contentRef data-app-description style=\"display: block; overflow: hidden;\" [style.color]=\"item.color || '#FFFFFF'\">\r\n @if (item.description) {\r\n @if (isStringDesc()) {\r\n <span [innerHTML]=\"descString() | safeHtml\"></span>\r\n } @else {\r\n <ng-container *ngComponentOutlet=\"descComponent(); inputs: descInputs()\"></ng-container>\r\n }\r\n }\r\n\r\n @if (item.button) {\r\n <a href=\"#\" data-app-button [attr.data-state]=\"item.state\"\r\n (click)=\"handleButtonClick($event)\">\r\n {{ item.button.title }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</button>","import { Component, computed, inject, ViewEncapsulation } from '@angular/core';\r\nimport { ToastComponent } from '../toast/toast.component';\r\nimport { ToastService } from '../toast.service';\r\nimport { TOAST_POSITIONS, ToastPosition } from '../toast.types';\r\n\r\n@Component({\r\n selector: 'app-toaster',\r\n standalone: true,\r\n imports: [ToastComponent],\r\n encapsulation: ViewEncapsulation.None,\r\n styleUrls: ['../toast.css'],\r\n template: `\r\n @for (pos of positions; track pos) {\r\n @if (groupedToasts()[pos]?.length) {\r\n <section data-app-viewport [attr.data-position]=\"pos\" aria-live=\"polite\">\r\n @for (item of groupedToasts()[pos]; track item.id) {\r\n <app-toast \r\n [item]=\"item\"\r\n [activeId]=\"activeId()\"\r\n [expandDir]=\"pos.startsWith('top') ? 'bottom' : 'top'\"\r\n [pillAlign]=\"pos.includes('right') ? 'right' : (pos.includes('center') ? 'center' : 'left')\"\r\n (dismiss)=\"toastService.dismiss(item.id)\"\r\n />\r\n }\r\n </section>\r\n }\r\n }\r\n `\r\n})\r\nexport class ToasterComponent {\r\n toastService = inject(ToastService);\r\n positions = TOAST_POSITIONS;\r\n\r\n groupedToasts = computed(() => {\r\n const map: Partial<Record<ToastPosition, any[]>> = {};\r\n for (const t of this.toastService.toasts()) {\r\n const pos = t.position || 'top-right';\r\n if (!map[pos]) map[pos] = [];\r\n map[pos]!.push(t);\r\n }\r\n return map;\r\n });\r\n\r\n activeId = computed(() => {\r\n const toasts = this.toastService.toasts();\r\n for (let i = toasts.length - 1; i >= 0; i--) {\r\n if (!toasts[i].exiting) return toasts[i].id;\r\n }\r\n return undefined;\r\n });\r\n}\r\n","/*\r\n * Public API Surface of makki-toast\r\n */\r\n\r\nexport * from './lib/toast.service';\r\nexport * from './lib/toast.types';\r\nexport * from './lib/toast/toast.component';\r\nexport * from './lib/toaster/toaster.component';\r\n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A,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAlBjB,CAAA;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yuQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAnBS,cAAc,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAqBb,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAxB5B,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,CAAC,EAAA,aAAA,EACV,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAE3B,CAAA;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,yuQAAA,CAAA,EAAA;;;AC3BH;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makki-toast",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Easy to use and customizable toast",
5
5
  "author": "Daniel Jimenez <danieljimenezcanales@gmail.com>",
6
6
  "homepage": "https://danieljimenezc.github.io/makki-toast/",
@@ -27,6 +27,7 @@ interface ToastOptions {
27
27
  icon?: string | Type<any>;
28
28
  styles?: ToastStyles;
29
29
  fill?: string;
30
+ color?: string;
30
31
  roundness?: number;
31
32
  autopilot?: boolean | {
32
33
  expand?: number;
@@ -58,6 +59,7 @@ declare class ToastService {
58
59
  warning(opts: ToastOptions): string;
59
60
  info(opts: ToastOptions): string;
60
61
  action(opts: ToastOptions): string;
62
+ dismissAll(): void;
61
63
  promise<T>(promise: Promise<T> | (() => Promise<T>), opts: {
62
64
  loading: ToastOptions;
63
65
  success: ToastOptions | ((d: T) => ToastOptions);