plain-toast 1.0.0 → 1.0.1
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 +17 -17
- package/dist/plain-toast.cjs.js +162 -165
- package/dist/plain-toast.cjs.js.map +9 -9
- package/dist/plain-toast.esm.js +162 -165
- package/dist/plain-toast.esm.js.map +9 -9
- package/dist/plain-toast.iife.js +161 -164
- package/dist/plain-toast.iife.js.map +9 -9
- package/dist/types/icons/progress.d.ts +1 -1
- package/dist/types/icons/progress.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -192,7 +192,7 @@ const toast = new Toast({
|
|
|
192
192
|
progress: { total: 100 }
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
-
document.querySelector('[data-
|
|
195
|
+
document.querySelector('[data-pt-toast]').addEventListener('jt:progress', (event) => {
|
|
196
196
|
console.log(`Progress: ${event.detail.percentage}%`);
|
|
197
197
|
});
|
|
198
198
|
```
|
|
@@ -293,20 +293,20 @@ Customize colors using CSS variables:
|
|
|
293
293
|
```css
|
|
294
294
|
:root {
|
|
295
295
|
/* Base colors */
|
|
296
|
-
--
|
|
297
|
-
--
|
|
298
|
-
--
|
|
299
|
-
--
|
|
296
|
+
--pt-background: #ffffff;
|
|
297
|
+
--pt-text: #475569;
|
|
298
|
+
--pt-heading: #1e293b;
|
|
299
|
+
--pt-border: #e2e8f0;
|
|
300
300
|
|
|
301
301
|
/* Toast type colors */
|
|
302
|
-
--
|
|
303
|
-
--
|
|
302
|
+
--pt-success-icon: #16a34a;
|
|
303
|
+
--pt-success-border: #16a34a;
|
|
304
304
|
|
|
305
|
-
--
|
|
306
|
-
--
|
|
305
|
+
--pt-error-icon: #ef4444;
|
|
306
|
+
--pt-error-border: #ef4444;
|
|
307
307
|
|
|
308
|
-
--
|
|
309
|
-
--
|
|
308
|
+
--pt-warning-icon: #d97706;
|
|
309
|
+
--pt-warning-border: #facc15;
|
|
310
310
|
|
|
311
311
|
/* ... more variables */
|
|
312
312
|
}
|
|
@@ -326,22 +326,22 @@ configure({
|
|
|
326
326
|
Style elements with data attributes:
|
|
327
327
|
|
|
328
328
|
```css
|
|
329
|
-
[data-
|
|
329
|
+
[data-pt-container] {
|
|
330
330
|
/* Container */
|
|
331
331
|
}
|
|
332
|
-
[data-
|
|
332
|
+
[data-pt-toast] {
|
|
333
333
|
/* Toast */
|
|
334
334
|
}
|
|
335
|
-
[data-
|
|
335
|
+
[data-pt-toast][data-pt-success] {
|
|
336
336
|
/* Success toast, replace success with error, info, etc. */
|
|
337
337
|
}
|
|
338
|
-
[data-
|
|
338
|
+
[data-pt-heading] {
|
|
339
339
|
/* Heading */
|
|
340
340
|
}
|
|
341
|
-
[data-
|
|
341
|
+
[data-pt-body] {
|
|
342
342
|
/* Body */
|
|
343
343
|
}
|
|
344
|
-
[data-
|
|
344
|
+
[data-pt-progress-bar] {
|
|
345
345
|
/* Progress bar */
|
|
346
346
|
}
|
|
347
347
|
```
|
package/dist/plain-toast.cjs.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
var{defineProperty:
|
|
1
|
+
var{defineProperty:x,getOwnPropertyNames:pr,getOwnPropertyDescriptor:ir}=Object,ar=Object.prototype.hasOwnProperty;var T=new WeakMap,P=(r)=>{var t=T.get(r),n;if(t)return t;if(t=x({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function")pr(r).map((e)=>!ar.call(t,e)&&x(t,e,{get:()=>r[e],enumerable:!(n=ir(r,e))||n.enumerable}));return T.set(r,t),t};var y=(r,t)=>{for(var n in t)x(r,n,{get:t[n],enumerable:!0,configurable:!0,set:(e)=>t[n]=()=>e})};var d=(r,t)=>()=>(r&&(t=r(r=0)),t);var L=`/* Light theme by default */
|
|
2
2
|
:root {
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
3
|
+
--pt-background: var(--pt-white);
|
|
4
|
+
--pt-text: var(--pt-slate-600);
|
|
5
|
+
--pt-heading: var(--pt-slate-800);
|
|
6
|
+
--pt-border: var(--pt-slate-200);
|
|
7
|
+
--pt-progress-bar: var(--pt-slate-300);
|
|
8
8
|
|
|
9
|
-
--
|
|
10
|
-
--
|
|
9
|
+
--pt-success-icon: var(--pt-green-600);
|
|
10
|
+
--pt-success-border: var(--pt-green-600);
|
|
11
11
|
|
|
12
|
-
--
|
|
13
|
-
--
|
|
12
|
+
--pt-error-icon: var(--pt-red-500);
|
|
13
|
+
--pt-error-border: var(--pt-red-500);
|
|
14
14
|
|
|
15
|
-
--
|
|
16
|
-
--
|
|
15
|
+
--pt-warning-icon: var(--pt-yellow-500);
|
|
16
|
+
--pt-warning-border: var(--pt-yellow-400);
|
|
17
17
|
|
|
18
|
-
--
|
|
19
|
-
--
|
|
18
|
+
--pt-info-icon: var(--pt-slate-500);
|
|
19
|
+
--pt-info-border: var(--pt-slate-200);
|
|
20
20
|
|
|
21
|
-
--
|
|
22
|
-
--
|
|
21
|
+
--pt-debug-icon: var(--pt-blue-600);
|
|
22
|
+
--pt-debug-border: var(--pt-blue-600);
|
|
23
23
|
|
|
24
|
-
--
|
|
25
|
-
--
|
|
24
|
+
--pt-spinner-icon: var(--pt-slate-500);
|
|
25
|
+
--pt-spinner-border: var(--pt-slate-400);
|
|
26
26
|
|
|
27
|
-
--
|
|
28
|
-
--
|
|
27
|
+
--pt-progress-icon: var(--pt-blue-600);
|
|
28
|
+
--pt-progress-border: var(--pt-blue-600);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/* Dark theme when user prefers dark color scheme */
|
|
32
32
|
@media (prefers-color-scheme: dark) {
|
|
33
33
|
:root {
|
|
34
|
-
--
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
34
|
+
--pt-background: var(--pt-slate-800);
|
|
35
|
+
--pt-text: var(--pt-slate-300);
|
|
36
|
+
--pt-heading: var(--pt-slate-50);
|
|
37
|
+
--pt-border: var(--pt-slate-700);
|
|
38
|
+
--pt-progress-bar: var(--pt-slate-500);
|
|
39
39
|
|
|
40
|
-
--
|
|
41
|
-
--
|
|
40
|
+
--pt-success-icon: var(--pt-green-500);
|
|
41
|
+
--pt-success-border: var(--pt-green-600);
|
|
42
42
|
|
|
43
|
-
--
|
|
44
|
-
--
|
|
43
|
+
--pt-error-icon: var(--pt-red-500);
|
|
44
|
+
--pt-error-border: var(--pt-red-500);
|
|
45
45
|
|
|
46
|
-
--
|
|
47
|
-
--
|
|
46
|
+
--pt-warning-icon: var(--pt-yellow-500);
|
|
47
|
+
--pt-warning-border: var(--pt-yellow-400);
|
|
48
48
|
|
|
49
|
-
--
|
|
50
|
-
--
|
|
49
|
+
--pt-info-icon: var(--pt-slate-400);
|
|
50
|
+
--pt-info-border: var(--pt-slate-700);
|
|
51
51
|
|
|
52
|
-
--
|
|
53
|
-
--
|
|
52
|
+
--pt-debug-icon: var(--pt-blue-300);
|
|
53
|
+
--pt-debug-border: var(--pt-blue-600);
|
|
54
54
|
|
|
55
|
-
--
|
|
56
|
-
--
|
|
55
|
+
--pt-spinner-icon: var(--pt-slate-400);
|
|
56
|
+
--pt-spinner-border: var(--pt-slate-400);
|
|
57
57
|
|
|
58
|
-
--
|
|
59
|
-
--
|
|
58
|
+
--pt-progress-icon: var(--pt-blue-300);
|
|
59
|
+
--pt-progress-border: var(--pt-blue-600);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
`;var H;var V=
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
66
|
-
--
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
|
|
74
|
-
--
|
|
75
|
-
--
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--
|
|
62
|
+
`;var H;var V=d(()=>{H=L});var A=`:root {
|
|
63
|
+
--pt-white: #ffffff;
|
|
64
|
+
--pt-slate-50: #f8fafc;
|
|
65
|
+
--pt-slate-200: #e2e8f0;
|
|
66
|
+
--pt-slate-300: #cbd5e1;
|
|
67
|
+
--pt-slate-400: #94a3b8;
|
|
68
|
+
--pt-slate-500: #64748b;
|
|
69
|
+
--pt-slate-600: #475569;
|
|
70
|
+
--pt-slate-700: #334155;
|
|
71
|
+
--pt-slate-800: #1e293b;
|
|
72
|
+
--pt-black: #000000;
|
|
73
|
+
|
|
74
|
+
--pt-green-500: #22c55e;
|
|
75
|
+
--pt-green-600: #16a34a;
|
|
76
|
+
--pt-red-500: #ef4444;
|
|
77
|
+
--pt-yellow-400: #facc15;
|
|
78
|
+
--pt-yellow-500: #eab308;
|
|
79
|
+
--pt-blue-300: #93c5fd;
|
|
80
|
+
--pt-blue-600: #2563eb;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/* Animations */
|
|
@@ -100,7 +100,7 @@ var{defineProperty:m,getOwnPropertyNames:ir,getOwnPropertyDescriptor:ar}=Object,
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/* Icons */
|
|
103
|
-
[data-
|
|
103
|
+
[data-pt-icon] {
|
|
104
104
|
display: flex;
|
|
105
105
|
width: 1rem;
|
|
106
106
|
height: 1rem;
|
|
@@ -108,30 +108,30 @@ var{defineProperty:m,getOwnPropertyNames:ir,getOwnPropertyDescriptor:ar}=Object,
|
|
|
108
108
|
align-items: center;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
[data-
|
|
112
|
-
color: var(--
|
|
111
|
+
[data-pt-icon][data-pt-success] {
|
|
112
|
+
color: var(--pt-success-icon);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
[data-
|
|
116
|
-
color: var(--
|
|
115
|
+
[data-pt-icon][data-pt-warning] {
|
|
116
|
+
color: var(--pt-warning-icon);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
[data-
|
|
120
|
-
color: var(--
|
|
119
|
+
[data-pt-icon][data-pt-info] {
|
|
120
|
+
color: var(--pt-info-icon);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
[data-
|
|
124
|
-
color: var(--
|
|
123
|
+
[data-pt-icon][data-pt-error] {
|
|
124
|
+
color: var(--pt-error-icon);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
[data-
|
|
128
|
-
color: var(--
|
|
127
|
+
[data-pt-icon][data-pt-debug] {
|
|
128
|
+
color: var(--pt-debug-icon);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
[data-
|
|
131
|
+
[data-pt-icon][data-pt-spinner] {
|
|
132
132
|
width: 1rem;
|
|
133
133
|
height: 1rem;
|
|
134
|
-
border: 2px solid var(--
|
|
134
|
+
border: 2px solid var(--pt-spinner-icon);
|
|
135
135
|
border-bottom-color: transparent;
|
|
136
136
|
border-radius: 50%;
|
|
137
137
|
display: inline-block;
|
|
@@ -139,41 +139,48 @@ var{defineProperty:m,getOwnPropertyNames:ir,getOwnPropertyDescriptor:ar}=Object,
|
|
|
139
139
|
animation: vt-spinner 1s linear infinite;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
[data-
|
|
143
|
-
|
|
142
|
+
[data-pt-icon][data-pt-progress] {
|
|
143
|
+
width: 1rem;
|
|
144
|
+
height: 1rem;
|
|
145
|
+
border: 2px solid var(--pt-progress-icon);
|
|
146
|
+
border-bottom-color: transparent;
|
|
147
|
+
border-radius: 50%;
|
|
148
|
+
display: inline-block;
|
|
149
|
+
box-sizing: border-box;
|
|
150
|
+
animation: vt-spinner 1s linear infinite;
|
|
144
151
|
}
|
|
145
152
|
|
|
146
153
|
/* Toast Types */
|
|
147
|
-
[data-
|
|
148
|
-
border-top-color: var(--
|
|
154
|
+
[data-pt-toast][data-pt-info] {
|
|
155
|
+
border-top-color: var(--pt-info-border);
|
|
149
156
|
}
|
|
150
157
|
|
|
151
|
-
[data-
|
|
152
|
-
border-top-color: var(--
|
|
158
|
+
[data-pt-toast][data-pt-success] {
|
|
159
|
+
border-top-color: var(--pt-success-border);
|
|
153
160
|
}
|
|
154
161
|
|
|
155
|
-
[data-
|
|
156
|
-
border-top-color: var(--
|
|
162
|
+
[data-pt-toast][data-pt-error] {
|
|
163
|
+
border-top-color: var(--pt-error-border);
|
|
157
164
|
}
|
|
158
165
|
|
|
159
|
-
[data-
|
|
160
|
-
border-top-color: var(--
|
|
166
|
+
[data-pt-toast][data-pt-warning] {
|
|
167
|
+
border-top-color: var(--pt-warning-border);
|
|
161
168
|
}
|
|
162
169
|
|
|
163
|
-
[data-
|
|
164
|
-
border-top-color: var(--
|
|
170
|
+
[data-pt-toast][data-pt-debug] {
|
|
171
|
+
border-top-color: var(--pt-debug-border);
|
|
165
172
|
}
|
|
166
173
|
|
|
167
|
-
[data-
|
|
168
|
-
border-top-color: var(--
|
|
174
|
+
[data-pt-toast][data-pt-spinner] {
|
|
175
|
+
border-top-color: var(--pt-spinner-border);
|
|
169
176
|
}
|
|
170
177
|
|
|
171
|
-
[data-
|
|
172
|
-
border-top-color: var(--
|
|
178
|
+
[data-pt-toast][data-pt-progress] {
|
|
179
|
+
border-top-color: var(--pt-progress-border);
|
|
173
180
|
}
|
|
174
181
|
|
|
175
182
|
/* Toast Base */
|
|
176
|
-
[data-
|
|
183
|
+
[data-pt-toast] {
|
|
177
184
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
|
178
185
|
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
179
186
|
position: relative;
|
|
@@ -195,8 +202,8 @@ var{defineProperty:m,getOwnPropertyNames:ir,getOwnPropertyDescriptor:ar}=Object,
|
|
|
195
202
|
box-shadow: 0rem 0.25rem 0.75rem 0rem hsla(0, 0%, 0%, 0.09);
|
|
196
203
|
border-radius: 0.375rem;
|
|
197
204
|
font-size: 1rem;
|
|
198
|
-
background-color: var(--
|
|
199
|
-
border-color: var(--
|
|
205
|
+
background-color: var(--pt-background);
|
|
206
|
+
border-color: var(--pt-border);
|
|
200
207
|
border-style: solid;
|
|
201
208
|
border-width: 1px;
|
|
202
209
|
border-top-width: 0.5rem;
|
|
@@ -204,39 +211,39 @@ var{defineProperty:m,getOwnPropertyNames:ir,getOwnPropertyDescriptor:ar}=Object,
|
|
|
204
211
|
}
|
|
205
212
|
|
|
206
213
|
/* Focus indicator for keyboard navigation */
|
|
207
|
-
[data-
|
|
208
|
-
outline: 2px solid var(--
|
|
214
|
+
[data-pt-toast]:focus {
|
|
215
|
+
outline: 2px solid var(--pt-focus-ring, #2563eb);
|
|
209
216
|
outline-offset: 2px;
|
|
210
217
|
}
|
|
211
218
|
|
|
212
|
-
[data-
|
|
219
|
+
[data-pt-heading-wrapper] {
|
|
213
220
|
display: flex;
|
|
214
221
|
justify-content: flex-start;
|
|
215
222
|
align-items: center;
|
|
216
223
|
gap: 0.5rem;
|
|
217
224
|
}
|
|
218
225
|
|
|
219
|
-
[data-
|
|
226
|
+
[data-pt-heading] {
|
|
220
227
|
font-weight: 500;
|
|
221
|
-
color: var(--
|
|
228
|
+
color: var(--pt-heading);
|
|
222
229
|
}
|
|
223
230
|
|
|
224
|
-
[data-
|
|
231
|
+
[data-pt-body] {
|
|
225
232
|
font-weight: 400;
|
|
226
|
-
color: var(--
|
|
233
|
+
color: var(--pt-text);
|
|
227
234
|
}
|
|
228
235
|
|
|
229
|
-
[data-
|
|
236
|
+
[data-pt-progress-bar] {
|
|
230
237
|
width: 0%;
|
|
231
238
|
position: absolute;
|
|
232
239
|
bottom: 0;
|
|
233
240
|
left: 0;
|
|
234
241
|
height: 0.2rem;
|
|
235
|
-
background-color: var(--
|
|
242
|
+
background-color: var(--pt-progress-bar);
|
|
236
243
|
}
|
|
237
244
|
|
|
238
245
|
/* Container */
|
|
239
|
-
[data-
|
|
246
|
+
[data-pt-container] {
|
|
240
247
|
position: fixed;
|
|
241
248
|
z-index: 9998;
|
|
242
249
|
display: flex;
|
|
@@ -249,111 +256,101 @@ var{defineProperty:m,getOwnPropertyNames:ir,getOwnPropertyDescriptor:ar}=Object,
|
|
|
249
256
|
}
|
|
250
257
|
|
|
251
258
|
/* Position variants */
|
|
252
|
-
[data-
|
|
259
|
+
[data-pt-container][data-pt-position='top-right'] {
|
|
253
260
|
top: 0.5rem;
|
|
254
261
|
right: 0.5rem;
|
|
255
262
|
}
|
|
256
263
|
|
|
257
|
-
[data-
|
|
264
|
+
[data-pt-container][data-pt-position='top-left'] {
|
|
258
265
|
top: 0.5rem;
|
|
259
266
|
left: 0.5rem;
|
|
260
267
|
}
|
|
261
268
|
|
|
262
|
-
[data-
|
|
269
|
+
[data-pt-container][data-pt-position='bottom-right'] {
|
|
263
270
|
bottom: 0.5rem;
|
|
264
271
|
right: 0.5rem;
|
|
265
272
|
}
|
|
266
273
|
|
|
267
|
-
[data-
|
|
274
|
+
[data-pt-container][data-pt-position='bottom-left'] {
|
|
268
275
|
bottom: 0.5rem;
|
|
269
276
|
left: 0.5rem;
|
|
270
277
|
}
|
|
271
278
|
|
|
272
279
|
/* Reduced motion support */
|
|
273
280
|
@media (prefers-reduced-motion: reduce) {
|
|
274
|
-
[data-
|
|
281
|
+
[data-pt-toast] {
|
|
275
282
|
animation: none;
|
|
276
283
|
transition: none;
|
|
277
284
|
}
|
|
278
285
|
|
|
279
|
-
[data-
|
|
286
|
+
[data-pt-progress-bar] {
|
|
280
287
|
animation: none;
|
|
281
288
|
transition: none;
|
|
282
289
|
}
|
|
283
290
|
|
|
284
|
-
[data-
|
|
291
|
+
[data-pt-icon][data-pt-spinner] {
|
|
285
292
|
animation: none;
|
|
286
293
|
}
|
|
287
294
|
}
|
|
288
|
-
`;var z;var O=
|
|
295
|
+
`;var z;var O=d(()=>{z=A});var Z=`/* Dark theme colors - WCAG AA compliant (4.5:1 contrast ratio for text) */
|
|
289
296
|
:root {
|
|
290
|
-
--
|
|
291
|
-
--
|
|
292
|
-
--
|
|
293
|
-
--
|
|
294
|
-
--
|
|
297
|
+
--pt-background: var(--pt-slate-800);
|
|
298
|
+
--pt-text: var(--pt-slate-300);
|
|
299
|
+
--pt-heading: var(--pt-slate-50);
|
|
300
|
+
--pt-border: var(--pt-slate-700);
|
|
301
|
+
--pt-progress-bar: var(--pt-slate-500);
|
|
295
302
|
|
|
296
|
-
--
|
|
297
|
-
--
|
|
303
|
+
--pt-success-icon: var(--pt-green-500);
|
|
304
|
+
--pt-success-border: var(--pt-green-600);
|
|
298
305
|
|
|
299
|
-
--
|
|
300
|
-
--
|
|
306
|
+
--pt-error-icon: var(--pt-red-500);
|
|
307
|
+
--pt-error-border: var(--pt-red-500);
|
|
301
308
|
|
|
302
|
-
--
|
|
303
|
-
--
|
|
309
|
+
--pt-warning-icon: var(--pt-yellow-500);
|
|
310
|
+
--pt-warning-border: var(--pt-yellow-400);
|
|
304
311
|
|
|
305
|
-
--
|
|
306
|
-
--
|
|
312
|
+
--pt-info-icon: var(--pt-slate-400);
|
|
313
|
+
--pt-info-border: var(--pt-slate-700);
|
|
307
314
|
|
|
308
|
-
--
|
|
309
|
-
--
|
|
315
|
+
--pt-debug-icon: var(--pt-blue-300);
|
|
316
|
+
--pt-debug-border: var(--pt-blue-600);
|
|
310
317
|
|
|
311
|
-
--
|
|
312
|
-
--
|
|
318
|
+
--pt-spinner-icon: var(--pt-slate-400);
|
|
319
|
+
--pt-spinner-border: var(--pt-slate-400);
|
|
313
320
|
|
|
314
|
-
--
|
|
315
|
-
--
|
|
321
|
+
--pt-progress-icon: var(--pt-blue-300);
|
|
322
|
+
--pt-progress-border: var(--pt-blue-600);
|
|
316
323
|
}
|
|
317
|
-
`;var G;var F=
|
|
324
|
+
`;var G;var F=d(()=>{G=Z});var N=`/* Light theme colors - WCAG AA compliant (4.5:1 contrast ratio for text) */
|
|
318
325
|
:root {
|
|
319
|
-
--
|
|
320
|
-
--
|
|
321
|
-
--
|
|
322
|
-
--
|
|
323
|
-
--
|
|
326
|
+
--pt-background: var(--pt-white);
|
|
327
|
+
--pt-text: var(--pt-slate-600);
|
|
328
|
+
--pt-heading: var(--pt-slate-800);
|
|
329
|
+
--pt-border: var(--pt-slate-200);
|
|
330
|
+
--pt-progress-bar: var(--pt-slate-300);
|
|
324
331
|
|
|
325
|
-
--
|
|
326
|
-
--
|
|
332
|
+
--pt-success-icon: var(--pt-green-600);
|
|
333
|
+
--pt-success-border: var(--pt-green-600);
|
|
327
334
|
|
|
328
|
-
--
|
|
329
|
-
--
|
|
335
|
+
--pt-error-icon: var(--pt-red-500);
|
|
336
|
+
--pt-error-border: var(--pt-red-500);
|
|
330
337
|
|
|
331
338
|
/* Using amber-600 for better contrast on white background (WCAG AA) */
|
|
332
|
-
--
|
|
333
|
-
--
|
|
334
|
-
|
|
335
|
-
--
|
|
336
|
-
--
|
|
337
|
-
|
|
338
|
-
--
|
|
339
|
-
--
|
|
340
|
-
|
|
341
|
-
--
|
|
342
|
-
--
|
|
343
|
-
|
|
344
|
-
--
|
|
345
|
-
--
|
|
346
|
-
}
|
|
347
|
-
`;var U;var J=l(()=>{U=N});var h;var R=l(()=>{V();O();F();J();h={base:z,light:U,dark:G,auto:H}});function x(r,t){Object.keys(t).forEach((n)=>{if(t[n]&&typeof t[n]==="object"&&!(t[n]instanceof Array)){if(!r[n])r[n]={};x(r[n],t[n])}else r[n]=t[n]})}function v(...r){let t=document.createElement("style");t.innerHTML=r.join(""),document.head.appendChild(t)}var K='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1592)"><path d="M12 7.5C12 5.84315 10.6569 4.5 9 4.5C7.34315 4.5 6 5.84315 6 7.5V12C6 13.6569 7.34315 15 9 15C10.6569 15 12 13.6569 12 12V7.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.25 5.25L12 6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.75 5.25L6 6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.25 14.25L12 12.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.75 14.25L6 12.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 9.75H12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 9.75H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.5 3L8.25 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.5 3L9.75 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_2102_1592"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var Q='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1582)"><g clip-path="url(#clip1_2102_1582)"><path d="M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.25 6.75L6.75 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.75 6.75L11.25 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_2102_1582"><rect width="18" height="18" fill="white"/></clipPath><clipPath id="clip1_2102_1582"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var X="<div></div>";var Y='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1564)"><g clip-path="url(#clip1_2102_1564)"><path d="M16.5 8.30999V8.99999C16.4991 10.6173 15.9754 12.191 15.007 13.4864C14.0386 14.7817 12.6775 15.7293 11.1265 16.1879C9.57557 16.6465 7.91794 16.5914 6.40085 16.0309C4.88376 15.4704 3.58849 14.4346 2.70822 13.0778C1.82795 11.721 1.40984 10.116 1.51626 8.50223C1.62267 6.88841 2.24791 5.35223 3.29871 4.12279C4.34951 2.89335 5.76959 2.03653 7.34714 1.6801C8.92469 1.32367 10.5752 1.48674 12.0525 2.14499" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.5 3L9 10.5075L6.75 8.2575" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_2102_1564"><rect width="18" height="18" fill="white"/></clipPath><clipPath id="clip1_2102_1564"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';function $(r){let t;switch(r){case"success":t=i.icons.success;break;case"debug":t=i.icons.debug;break;case"error":t=i.icons.error;break;case"warning":t=i.icons.warning;break;case"spinner":t=i.icons.spinner;break;case"info":t=i.icons.info;break}return t}var q=l(()=>{u()});var I='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1587)"><path d="M16.2976 13.5L10.2976 3C10.1667 2.76915 9.97702 2.57714 9.74776 2.44355C9.5185 2.30996 9.25791 2.23958 8.99257 2.23958C8.72723 2.23958 8.46664 2.30996 8.23738 2.44355C8.00812 2.57714 7.8184 2.76915 7.68757 3L1.68757 13.5C1.55533 13.729 1.48599 13.9889 1.48658 14.2534C1.48716 14.5178 1.55765 14.7774 1.6909 15.0059C1.82416 15.2343 2.01543 15.4234 2.24534 15.5541C2.47525 15.6848 2.73562 15.7524 3.00007 15.75H15.0001C15.2632 15.7497 15.5217 15.6802 15.7495 15.5485C15.9773 15.4167 16.1665 15.2273 16.298 14.9993C16.4294 14.7714 16.4986 14.5128 16.4985 14.2496C16.4985 13.9864 16.4292 13.7279 16.2976 13.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 6.75V9.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 12.75H9.0075" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_2102_1587"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var W='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1792)"><path d="M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 12V9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 6H9.0075" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_2102_1792"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var B=`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
<path d="M9 5.25V9L11.25 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
351
|
-
</g>
|
|
352
|
-
<defs>
|
|
353
|
-
<clipPath id="clip0_progress">
|
|
354
|
-
<rect width="18" height="18" fill="white"/>
|
|
355
|
-
</clipPath>
|
|
356
|
-
</defs>
|
|
357
|
-
</svg>`;var D={};L(D,{icons:()=>C});var C;var _=l(()=>{q();C={get:$,svg:{success:Y,warning:I,error:Q,debug:K,spinner:X,info:W,progress:B}}});function jr(){let{icons:r}=(_(),T(D));return{success:r.svg.success,warning:r.svg.warning,error:r.svg.error,debug:r.svg.debug,spinner:r.svg.spinner,info:r.svg.info,progress:r.svg.progress}}function M(r){if(x(i,r),!i.injectCss)return;switch(i.theme){case"none":break;case"light":v(h.light,h.base);break;case"dark":v(h.dark,h.base);break;case"auto":v(h.auto,h.base);break}}var i;var u=l(()=>{R();i={target:void 0,position:"bottom-right",injectCss:!0,theme:"auto",get icons(){if(!this._icons)this._icons=jr();return this._icons},set icons(r){this._icons=r},_icons:void 0,announceToScreenReader:!0,ariaLive:"polite"}});u();var dr={};L(dr,{default:()=>lr,configure:()=>M,config:()=>i,Toast:()=>f});module.exports=T(dr);function b(r,t){let n,{toast:o,progressBar:a}=r;if(t>0)a.style.animationName="vt-progress-bar",a.style.animationDuration=`${t}ms`,a.style.animationTimingFunction="linear",a.style.animationFillMode="forwards",o.addEventListener("mouseover",()=>{a.style.animationPlayState="paused",clearTimeout(n)}),o.addEventListener("mouseout",()=>{a.style.animationPlayState="running",n=setTimeout(()=>{o.style.opacity="0",setTimeout(()=>{if(o.parentNode)o.parentNode.removeChild(o)},250)},t)});n=setTimeout(()=>{o.style.opacity="0",setTimeout(()=>{if(o.parentNode)o.parentNode.removeChild(o)},250)},t)}function E(r){let{toast:t}=r;t.style.cursor="pointer",t.setAttribute("tabindex","0"),t.setAttribute("aria-label","Toast. Press Enter or Space to close."),t.addEventListener("click",()=>{b(r,0)}),t.addEventListener("keydown",(n)=>{if(n.key==="Enter"||n.key===" ")n.preventDefault(),b(r,0)})}_();function rr(r,t,n,o,a){let s=document.createElement("div");s.setAttribute("data-jt-toast",a),s.setAttribute(`data-jt-${t}`,""),s.setAttribute("role","status"),s.setAttribute("aria-atomic","true");let c=document.createElement("div");c.setAttribute("data-jt-heading-wrapper","");let p=document.createElement("div");p.setAttribute("data-jt-icon",""),p.setAttribute(`data-jt-${t}`,""),p.innerHTML=C.get(t);let j=document.createElement("div");j.setAttribute("data-jt-heading","true"),j.textContent=n,c.appendChild(p),c.appendChild(j);let w=document.createElement("div");if(w.setAttribute("data-jt-body",""),w.textContent=o,!o)w.style.display="none";let k=document.createElement("div");return k.setAttribute("data-jt-progress-bar",""),s.appendChild(c),s.appendChild(w),s.appendChild(k),r.appendChild(s),{toast:s,container:r,headingWrapper:c,iconElement:p,headingElement:j,bodyElement:w,progressBar:k}}var g={heading:"",body:"",duration:3500,clickToClose:!0};function tr(r){let t={...g,...r},n=t.heading,o=t.body,a=t.duration,s=t.clickToClose;return{heading:n,body:o,duration:a,clickToClose:s}}u();function nr(r="bottom-right"){let t=document.createElement("div");if(t.setAttribute("data-jt-container",""),t.setAttribute("data-jt-position",r),t.setAttribute("role","region"),t.setAttribute("aria-label","Toasts"),i.ariaLive)t.setAttribute("aria-live",i.ariaLive);return document.body.appendChild(t),t}function P(){if(i.target){if(typeof i.target==="string"){let t=document.querySelector(i.target);if(t)return t}else if(i.target instanceof HTMLElement)return i.target}let r=document.querySelector("[data-jt-container]");if(r)return r;return nr(i.position)}function d(r,t){let{heading:n,body:o,duration:a,clickToClose:s}=tr(t);if(r==="spinner")a=null,s=!1;let c=P(),p=Math.random().toString(36).substring(2,11),j=rr(c,r,n,o,p);if(a)b(j,a);if(s)E(j);return j}var or={success:(r)=>d("success",r),error:(r)=>d("error",r),warning:(r)=>d("warning",r),debug:(r)=>d("debug",r),info:(r)=>d("info",r),spinner:(r)=>d("spinner",r),progress:(r)=>d("progress",r)};function er(r,t){let{heading:n,body:o}=t;if(n!==void 0)r.headingElement.textContent=n;if(o!==void 0)if(o)r.bodyElement.textContent=o,r.bodyElement.style.display="block";else r.bodyElement.textContent="",r.bodyElement.style.display="none"}class f{elements=null;progressOptions;type;heading;body;duration;clickToClose;constructor({type:r,heading:t,body:n="",duration:o=g.duration,clickToClose:a=g.clickToClose,progress:s}){if(this.type=r,this.heading=t,this.body=n,this.duration=o,this.clickToClose=a,r==="progress"){if(this.progressOptions={total:s?.total||100,current:s?.current||0,showPercentage:s?.showPercentage!==!1},o===g.duration)this.duration=null}if(this.elements=or[this.type]({heading:this.heading,body:this.body,duration:this.duration,clickToClose:this.clickToClose}),r==="progress"&&this.progressOptions)this.setProgress(this.progressOptions.current)}update(r){if(!this.elements)return;er(this.elements,r)}setProgress(r){if(!this.elements||this.type!=="progress"||!this.progressOptions)return;let{progressBar:t,bodyElement:n,toast:o}=this.elements,a=Math.min(100,Math.max(0,r/this.progressOptions.total*100));if(t.style.width=`${a}%`,t.style.transition="width 0.3s ease",this.progressOptions.showPercentage)n.textContent=`${Math.round(a)}%`,n.style.display="block";this.progressOptions.current=r,o.dispatchEvent(new CustomEvent("vt:progress",{detail:{current:r,total:this.progressOptions.total,percentage:a}}))}incrementProgress(r=1){if(!this.progressOptions)return;this.setProgress((this.progressOptions.current||0)+r)}complete(r=2000){if(!this.progressOptions)return;if(this.setProgress(this.progressOptions.total),r>0)setTimeout(()=>{this.close()},r)}close(){if(!this.elements)return;this.elements.toast.remove(),this.elements=null}}var lr={Toast:f,configure:M,config:i};
|
|
358
|
-
|
|
359
|
-
//# debugId=AEF249002B314A2E64756E2164756E21
|
|
339
|
+
--pt-warning-icon: #d97706;
|
|
340
|
+
--pt-warning-border: var(--pt-yellow-400);
|
|
341
|
+
|
|
342
|
+
--pt-info-icon: var(--pt-slate-500);
|
|
343
|
+
--pt-info-border: var(--pt-slate-200);
|
|
344
|
+
|
|
345
|
+
--pt-debug-icon: var(--pt-blue-600);
|
|
346
|
+
--pt-debug-border: var(--pt-blue-600);
|
|
347
|
+
|
|
348
|
+
--pt-spinner-icon: var(--pt-slate-500);
|
|
349
|
+
--pt-spinner-border: var(--pt-slate-400);
|
|
350
|
+
|
|
351
|
+
--pt-progress-icon: var(--pt-blue-600);
|
|
352
|
+
--pt-progress-border: var(--pt-blue-600);
|
|
353
|
+
}
|
|
354
|
+
`;var U;var J=d(()=>{U=N});var g;var R=d(()=>{V();O();F();J();g={base:z,light:U,dark:G,auto:H}});function C(r,t){Object.keys(t).forEach((n)=>{if(t[n]&&typeof t[n]==="object"&&!(t[n]instanceof Array)){if(!r[n])r[n]={};C(r[n],t[n])}else r[n]=t[n]})}function u(...r){let t=document.createElement("style");t.innerHTML=r.join(""),document.head.appendChild(t)}var K='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1592)"><path d="M12 7.5C12 5.84315 10.6569 4.5 9 4.5C7.34315 4.5 6 5.84315 6 7.5V12C6 13.6569 7.34315 15 9 15C10.6569 15 12 13.6569 12 12V7.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.25 5.25L12 6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.75 5.25L6 6.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.25 14.25L12 12.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.75 14.25L6 12.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M15 9.75H12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 9.75H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.5 3L8.25 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.5 3L9.75 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_2102_1592"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var Q='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1582)"><g clip-path="url(#clip1_2102_1582)"><path d="M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.25 6.75L6.75 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.75 6.75L11.25 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_2102_1582"><rect width="18" height="18" fill="white"/></clipPath><clipPath id="clip1_2102_1582"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var X="<div></div>";var Y='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1564)"><g clip-path="url(#clip1_2102_1564)"><path d="M16.5 8.30999V8.99999C16.4991 10.6173 15.9754 12.191 15.007 13.4864C14.0386 14.7817 12.6775 15.7293 11.1265 16.1879C9.57557 16.6465 7.91794 16.5914 6.40085 16.0309C4.88376 15.4704 3.58849 14.4346 2.70822 13.0778C1.82795 11.721 1.40984 10.116 1.51626 8.50223C1.62267 6.88841 2.24791 5.35223 3.29871 4.12279C4.34951 2.89335 5.76959 2.03653 7.34714 1.6801C8.92469 1.32367 10.5752 1.48674 12.0525 2.14499" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.5 3L9 10.5075L6.75 8.2575" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_2102_1564"><rect width="18" height="18" fill="white"/></clipPath><clipPath id="clip1_2102_1564"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';function $(r){let t;switch(r){case"success":t=p.icons.success;break;case"debug":t=p.icons.debug;break;case"error":t=p.icons.error;break;case"warning":t=p.icons.warning;break;case"spinner":t=p.icons.spinner;break;case"info":t=p.icons.info;break}return t}var q=d(()=>{f()});var I='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1587)"><path d="M16.2976 13.5L10.2976 3C10.1667 2.76915 9.97702 2.57714 9.74776 2.44355C9.5185 2.30996 9.25791 2.23958 8.99257 2.23958C8.72723 2.23958 8.46664 2.30996 8.23738 2.44355C8.00812 2.57714 7.8184 2.76915 7.68757 3L1.68757 13.5C1.55533 13.729 1.48599 13.9889 1.48658 14.2534C1.48716 14.5178 1.55765 14.7774 1.6909 15.0059C1.82416 15.2343 2.01543 15.4234 2.24534 15.5541C2.47525 15.6848 2.73562 15.7524 3.00007 15.75H15.0001C15.2632 15.7497 15.5217 15.6802 15.7495 15.5485C15.9773 15.4167 16.1665 15.2273 16.298 14.9993C16.4294 14.7714 16.4986 14.5128 16.4985 14.2496C16.4985 13.9864 16.4292 13.7279 16.2976 13.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 6.75V9.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 12.75H9.0075" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_2102_1587"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var W='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2102_1792)"><path d="M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 12V9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 6H9.0075" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_2102_1792"><rect width="18" height="18" fill="white"/></clipPath></defs></svg>';var B="<div></div>";var D={};y(D,{icons:()=>_});var _;var j=d(()=>{q();_={get:$,svg:{success:Y,warning:I,error:Q,debug:K,spinner:X,info:W,progress:B}}});function sr(){let{icons:r}=(j(),P(D));return{success:r.svg.success,warning:r.svg.warning,error:r.svg.error,debug:r.svg.debug,spinner:r.svg.spinner,info:r.svg.info,progress:r.svg.progress}}function M(r){if(C(p,r),!p.injectCss)return;switch(p.theme){case"none":break;case"light":u(g.light,g.base);break;case"dark":u(g.dark,g.base);break;case"auto":u(g.auto,g.base);break}}var p;var f=d(()=>{R();p={target:void 0,position:"bottom-right",injectCss:!0,theme:"auto",get icons(){if(!this._icons)this._icons=sr();return this._icons},set icons(r){this._icons=r},_icons:void 0,announceToScreenReader:!0,ariaLive:"polite"}});f();var lr={};y(lr,{default:()=>dr,configure:()=>M,config:()=>p,Toast:()=>k});module.exports=P(lr);function v(r,t){let n,{toast:e,progressBar:i}=r;if(t>0)i.style.animationName="vt-progress-bar",i.style.animationDuration=`${t}ms`,i.style.animationTimingFunction="linear",i.style.animationFillMode="forwards",e.addEventListener("mouseover",()=>{i.style.animationPlayState="paused",clearTimeout(n)}),e.addEventListener("mouseout",()=>{i.style.animationPlayState="running",n=setTimeout(()=>{e.style.opacity="0",setTimeout(()=>{if(e.parentNode)e.parentNode.removeChild(e)},250)},t)});n=setTimeout(()=>{e.style.opacity="0",setTimeout(()=>{if(e.parentNode)e.parentNode.removeChild(e)},250)},t)}function E(r){let{toast:t}=r;t.style.cursor="pointer",t.setAttribute("tabindex","0"),t.setAttribute("aria-label","Toast. Press Enter or Space to close."),t.addEventListener("click",()=>{v(r,0)}),t.addEventListener("keydown",(n)=>{if(n.key==="Enter"||n.key===" ")n.preventDefault(),v(r,0)})}j();function rr(r,t,n,e,i){let a=document.createElement("div");a.setAttribute("data-pt-toast",i),a.setAttribute(`data-pt-${t}`,""),a.setAttribute("role","status"),a.setAttribute("aria-atomic","true");let c=document.createElement("div");c.setAttribute("data-pt-heading-wrapper","");let h=document.createElement("div");h.setAttribute("data-pt-icon",""),h.setAttribute(`data-pt-${t}`,""),h.innerHTML=_.get(t);let s=document.createElement("div");s.setAttribute("data-pt-heading","true"),s.textContent=n,c.appendChild(h),c.appendChild(s);let w=document.createElement("div");if(w.setAttribute("data-pt-body",""),w.textContent=e,!e)w.style.display="none";let m=document.createElement("div");return m.setAttribute("data-pt-progress-bar",""),a.appendChild(c),a.appendChild(w),a.appendChild(m),r.appendChild(a),{toast:a,container:r,headingWrapper:c,iconElement:h,headingElement:s,bodyElement:w,progressBar:m}}var b={heading:"",body:"",duration:3500,clickToClose:!0};function tr(r){let t={...b,...r},n=t.heading,e=t.body,i=t.duration,a=t.clickToClose;return{heading:n,body:e,duration:i,clickToClose:a}}f();function nr(r="bottom-right"){let t=document.createElement("div");if(t.setAttribute("data-pt-container",""),t.setAttribute("data-pt-position",r),t.setAttribute("role","region"),t.setAttribute("aria-label","Toasts"),p.ariaLive)t.setAttribute("aria-live",p.ariaLive);return document.body.appendChild(t),t}function S(){if(p.target){if(typeof p.target==="string"){let t=document.querySelector(p.target);if(t)return t}else if(p.target instanceof HTMLElement)return p.target}let r=document.querySelector("[data-pt-container]");if(r)return r;return nr(p.position)}function l(r,t){let{heading:n,body:e,duration:i,clickToClose:a}=tr(t);if(r==="spinner")i=null,a=!1;let c=S(),h=Math.random().toString(36).substring(2,11),s=rr(c,r,n,e,h);if(i)v(s,i);if(a)E(s);return s}var er={success:(r)=>l("success",r),error:(r)=>l("error",r),warning:(r)=>l("warning",r),debug:(r)=>l("debug",r),info:(r)=>l("info",r),spinner:(r)=>l("spinner",r),progress:(r)=>l("progress",r)};function or(r,t){let{heading:n,body:e}=t;if(n!==void 0)r.headingElement.textContent=n;if(e!==void 0)if(e)r.bodyElement.textContent=e,r.bodyElement.style.display="block";else r.bodyElement.textContent="",r.bodyElement.style.display="none"}class k{elements=null;progressOptions;type;heading;body;duration;clickToClose;constructor({type:r,heading:t,body:n="",duration:e=b.duration,clickToClose:i=b.clickToClose,progress:a}){if(this.type=r,this.heading=t,this.body=n,this.duration=e,this.clickToClose=i,r==="progress"){if(this.progressOptions={total:a?.total||100,current:a?.current||0,showPercentage:a?.showPercentage!==!1},e===b.duration)this.duration=null}if(this.elements=er[this.type]({heading:this.heading,body:this.body,duration:this.duration,clickToClose:this.clickToClose}),r==="progress"&&this.progressOptions)this.setProgress(this.progressOptions.current)}update(r){if(!this.elements)return;or(this.elements,r)}setProgress(r){if(!this.elements||this.type!=="progress"||!this.progressOptions)return;let{progressBar:t,bodyElement:n,toast:e}=this.elements,i=Math.min(100,Math.max(0,r/this.progressOptions.total*100));if(t.style.width=`${i}%`,t.style.transition="width 0.3s ease",this.progressOptions.showPercentage)n.textContent=`${Math.round(i)}%`,n.style.display="block";this.progressOptions.current=r,e.dispatchEvent(new CustomEvent("vt:progress",{detail:{current:r,total:this.progressOptions.total,percentage:i}}))}incrementProgress(r=1){if(!this.progressOptions)return;this.setProgress((this.progressOptions.current||0)+r)}complete(r=2000){if(!this.progressOptions)return;if(this.setProgress(this.progressOptions.total),r>0)setTimeout(()=>{this.close()},r)}close(){if(!this.elements)return;this.elements.toast.remove(),this.elements=null}}var dr={Toast:k,configure:M,config:p};
|
|
355
|
+
|
|
356
|
+
//# debugId=8D428DF38F404BE964756E2164756E21
|