vue-toasts-lite 0.1.4 → 0.1.6
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 +10 -6
- package/dist/index.d.ts +19 -1
- package/dist/index.js +40 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,13 +7,10 @@ A lightweight toast notifications library for Vue 3.
|
|
|
7
7
|
|
|
8
8
|
📖 **[Check docs](https://scheron.github.io/vue-toasts-lite/)**
|
|
9
9
|
|
|
10
|
-
> ⚠️ **Note**: This is primarily a personal utility library created for my own use. I don't discourage others from using it, but I should mention that I'm not currently using it in production myself. The main purpose of this library is to provide me with a simple and quick way to integrate toast notifications into my personal projects without the need to configure and set up larger, more complex libraries. If you find it useful, feel free to use it, but keep in mind that it's tailored to my personal needs and workflow.
|
|
11
|
-
|
|
12
|
-
|
|
13
10
|
## Features
|
|
14
11
|
|
|
15
12
|
- 🚀 Lightweight and easy to use
|
|
16
|
-
- 🎨 Multiple toast types (success, error, loading, warn)
|
|
13
|
+
- 🎨 Multiple toast types (success, error, loading, warn, info)
|
|
17
14
|
- 📍 Multiple positions (can show in different corners simultaneously)
|
|
18
15
|
- ⚡️ Customizable duration, auto-close, and styling
|
|
19
16
|
- 🎯 TypeScript support
|
|
@@ -53,6 +50,7 @@ toasts.success('Hello!')
|
|
|
53
50
|
toasts.error('Something went wrong')
|
|
54
51
|
toasts.loading('Loading...')
|
|
55
52
|
toasts.warn('Warning message')
|
|
53
|
+
toasts.info('Info message')
|
|
56
54
|
</script>
|
|
57
55
|
```
|
|
58
56
|
|
|
@@ -64,6 +62,7 @@ toasts.success(message, options?)
|
|
|
64
62
|
toasts.error(message, options?)
|
|
65
63
|
toasts.loading(message, options?)
|
|
66
64
|
toasts.warn(message, options?)
|
|
65
|
+
toasts.info(message, options?)
|
|
67
66
|
|
|
68
67
|
// Advanced methods
|
|
69
68
|
toasts.add(options) // Create custom toast
|
|
@@ -71,6 +70,10 @@ toasts.update(id, options) // Update existing toast
|
|
|
71
70
|
toasts.remove(id?) // Remove toast(s)
|
|
72
71
|
toasts.clear() // Clear all toasts
|
|
73
72
|
toasts.promise(promise, options) // Handle promise states
|
|
73
|
+
|
|
74
|
+
// Monitoring methods
|
|
75
|
+
toasts.toastList // Get array of all active toasts
|
|
76
|
+
toasts.onToastsListChange(callback) // Subscribe to toast list changes
|
|
74
77
|
```
|
|
75
78
|
|
|
76
79
|
## Options
|
|
@@ -78,7 +81,7 @@ toasts.promise(promise, options) // Handle promise states
|
|
|
78
81
|
| Option | Type | Default | Description |
|
|
79
82
|
|--------|------|---------|-------------|
|
|
80
83
|
| `message` | `string` | - | Message to display |
|
|
81
|
-
| `type` | `'success' \| 'error' \| 'loading' \| 'warn'` | `'success'` | Toast type |
|
|
84
|
+
| `type` | `'success' \| 'error' \| 'loading' \| 'warn' \| 'info'` | `'success'` | Toast type |
|
|
82
85
|
| `duration` | `number` | `3000` | Duration in milliseconds |
|
|
83
86
|
| `autoClose` | `boolean` | `true` | Auto-close behavior |
|
|
84
87
|
| `position` | `ToastPosition` | `'top-center'` | Toast position |
|
|
@@ -122,7 +125,6 @@ await toasts.promise(
|
|
|
122
125
|
)
|
|
123
126
|
```
|
|
124
127
|
|
|
125
|
-
|
|
126
128
|
## Styling
|
|
127
129
|
|
|
128
130
|
Customize colors and appearance with CSS variables or by passing custom classes to `ToastsLiteProvider`:
|
|
@@ -148,6 +150,7 @@ You can pass custom classes to `ToastsLiteProvider`:
|
|
|
148
150
|
```css
|
|
149
151
|
:root {
|
|
150
152
|
--tl-font-family: system-ui, -apple-system, sans-serif;
|
|
153
|
+
--tl-font-size: 14px;
|
|
151
154
|
--tl-bg: hsl(0, 0%, 100%);
|
|
152
155
|
--tl-text: hsl(0, 0%, 20%);
|
|
153
156
|
--tl-border: hsl(0, 0%, 85%);
|
|
@@ -155,6 +158,7 @@ You can pass custom classes to `ToastsLiteProvider`:
|
|
|
155
158
|
--tl-success: hsl(145, 63%, 42%);
|
|
156
159
|
--tl-error: hsl(0, 79%, 63%);
|
|
157
160
|
--tl-warn: hsl(45, 100%, 51%);
|
|
161
|
+
--tl-info: hsl(210, 80%, 55%);
|
|
158
162
|
--tl-icon-color: hsl(0, 0%, 100%);
|
|
159
163
|
--tl-loading-border: hsl(0, 0%, 15%);
|
|
160
164
|
--tl-loading-bg: hsl(0, 0%, 98%);
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare interface IToastsController {
|
|
|
19
19
|
loading: (message: string, options?: ToastSimpleOptions) => Id;
|
|
20
20
|
error: (message: string, options?: ToastSimpleOptions) => Id;
|
|
21
21
|
warn: (message: string, options?: ToastSimpleOptions) => Id;
|
|
22
|
+
info: (message: string, options?: ToastSimpleOptions) => Id;
|
|
22
23
|
promise: <T>(promise: Promise<T>, options: ToastPromiseOptions) => Promise<Id>;
|
|
23
24
|
remove: (id?: Id) => void;
|
|
24
25
|
clear: () => void;
|
|
@@ -270,6 +271,23 @@ declare class ToastsController implements IToastsController {
|
|
|
270
271
|
* @see {@link promise} for automatic promise-based state management
|
|
271
272
|
*/
|
|
272
273
|
loading(message: string, options?: Omit<ToastSimpleOptions, "type">): string;
|
|
274
|
+
/**
|
|
275
|
+
* Displays an **info** toast notification.
|
|
276
|
+
*
|
|
277
|
+
* @param message - Text content to display in the toast
|
|
278
|
+
* @param options - Optional configuration (position, duration, autoClose, id)
|
|
279
|
+
* @returns Unique identifier of the created toast
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```ts
|
|
283
|
+
* // Simple info message
|
|
284
|
+
* toasts.info('New version available')
|
|
285
|
+
*
|
|
286
|
+
* // With custom position
|
|
287
|
+
* toasts.info('Tip: press Cmd+K to search', { position: 'bottom-right' })
|
|
288
|
+
* ```
|
|
289
|
+
*/
|
|
290
|
+
info(message: string, options?: Omit<ToastSimpleOptions, "type">): string;
|
|
273
291
|
/**
|
|
274
292
|
* Displays a **promise** toast that automatically updates based on promise resolution.
|
|
275
293
|
*
|
|
@@ -315,6 +333,6 @@ export declare type ToastSimpleOptions = Partial<Omit<Toast, "message">>;
|
|
|
315
333
|
|
|
316
334
|
export declare const ToastsLiteProvider: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
317
335
|
|
|
318
|
-
export declare type ToastType = "success" | "loading" | "error" | "warn";
|
|
336
|
+
export declare type ToastType = "success" | "loading" | "error" | "warn" | "info";
|
|
319
337
|
|
|
320
338
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var M = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var m = (r, t, e) =>
|
|
4
|
-
import { ref as
|
|
2
|
+
var U = (r, t, e) => t in r ? M(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var m = (r, t, e) => U(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ref as p, defineComponent as D, watch as $, onMounted as L, onUnmounted as k, createElementBlock as y, openBlock as d, withModifiers as A, normalizeStyle as E, createCommentVNode as x, createElementVNode as h, normalizeClass as g, toDisplayString as B, computed as P, createBlock as C, Teleport as I, Fragment as w, renderList as b, unref as v, createVNode as N, TransitionGroup as R, withCtx as S } from "vue";
|
|
5
5
|
class V extends Map {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -33,7 +33,7 @@ const T = {
|
|
|
33
33
|
duration: 3e3,
|
|
34
34
|
position: "top-center"
|
|
35
35
|
};
|
|
36
|
-
class
|
|
36
|
+
class z {
|
|
37
37
|
constructor() {
|
|
38
38
|
m(this, "counter", 0);
|
|
39
39
|
m(this, "toasts");
|
|
@@ -237,6 +237,25 @@ class j {
|
|
|
237
237
|
loading(t, e) {
|
|
238
238
|
return this.addOrUpdate({ ...e, message: t, type: "loading" });
|
|
239
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Displays an **info** toast notification.
|
|
242
|
+
*
|
|
243
|
+
* @param message - Text content to display in the toast
|
|
244
|
+
* @param options - Optional configuration (position, duration, autoClose, id)
|
|
245
|
+
* @returns Unique identifier of the created toast
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```ts
|
|
249
|
+
* // Simple info message
|
|
250
|
+
* toasts.info('New version available')
|
|
251
|
+
*
|
|
252
|
+
* // With custom position
|
|
253
|
+
* toasts.info('Tip: press Cmd+K to search', { position: 'bottom-right' })
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
info(t, e) {
|
|
257
|
+
return this.addOrUpdate({ ...e, message: t, type: "info" });
|
|
258
|
+
}
|
|
240
259
|
/**
|
|
241
260
|
* Displays a **promise** toast that automatically updates based on promise resolution.
|
|
242
261
|
*
|
|
@@ -287,7 +306,7 @@ class j {
|
|
|
287
306
|
let { id: e = this.ID(), ...o } = t;
|
|
288
307
|
if (this.toasts.has(e)) {
|
|
289
308
|
const n = this.toasts.get(e);
|
|
290
|
-
return
|
|
309
|
+
return this.toasts.set(e, { ...n, ...o }), e;
|
|
291
310
|
}
|
|
292
311
|
return this.toasts.set(e, { ...this.mergeWithDefaultOptions(o), id: e }), e;
|
|
293
312
|
}
|
|
@@ -300,9 +319,9 @@ class j {
|
|
|
300
319
|
return e;
|
|
301
320
|
}
|
|
302
321
|
}
|
|
303
|
-
const O = new
|
|
304
|
-
function
|
|
305
|
-
const r =
|
|
322
|
+
const O = new z();
|
|
323
|
+
function F() {
|
|
324
|
+
const r = p(/* @__PURE__ */ new Map());
|
|
306
325
|
function t(n, s, a) {
|
|
307
326
|
r.value.has(n) || r.value.set(n, []);
|
|
308
327
|
const i = r.value.get(n);
|
|
@@ -322,10 +341,10 @@ function z() {
|
|
|
322
341
|
resumeAll: o
|
|
323
342
|
};
|
|
324
343
|
}
|
|
325
|
-
const
|
|
344
|
+
const W = {
|
|
326
345
|
key: 0,
|
|
327
346
|
class: "toasts-lite__icon"
|
|
328
|
-
},
|
|
347
|
+
}, j = { class: "toasts-lite__content" }, G = { class: "toasts-lite__content-message" }, H = /* @__PURE__ */ D({
|
|
329
348
|
__name: "ToastsLiteItem",
|
|
330
349
|
props: {
|
|
331
350
|
id: {},
|
|
@@ -337,7 +356,7 @@ const F = {
|
|
|
337
356
|
},
|
|
338
357
|
emits: ["close"],
|
|
339
358
|
setup(r, { expose: t, emit: e }) {
|
|
340
|
-
const o = r, n = e, s =
|
|
359
|
+
const o = r, n = e, s = p(null), a = p(0), i = p(0);
|
|
341
360
|
function c() {
|
|
342
361
|
s.value && clearTimeout(s.value), n("close");
|
|
343
362
|
}
|
|
@@ -350,12 +369,12 @@ const F = {
|
|
|
350
369
|
function f() {
|
|
351
370
|
s.value && (clearTimeout(s.value), s.value = null), o.autoClose && (a.value = Date.now(), i.value = o.duration, s.value = setTimeout(c, o.duration));
|
|
352
371
|
}
|
|
353
|
-
return
|
|
372
|
+
return $(
|
|
354
373
|
() => [o.autoClose, o.duration],
|
|
355
374
|
() => {
|
|
356
375
|
f();
|
|
357
376
|
}
|
|
358
|
-
),
|
|
377
|
+
), L(() => {
|
|
359
378
|
f();
|
|
360
379
|
}), k(() => {
|
|
361
380
|
s.value && clearTimeout(s.value);
|
|
@@ -367,13 +386,13 @@ const F = {
|
|
|
367
386
|
style: E(`--toast-duration: ${r.duration}s;`),
|
|
368
387
|
onClick: A(c, ["prevent"])
|
|
369
388
|
}, [
|
|
370
|
-
["success", "error", "loading", "warn"].includes(r.type) ? (d(), y("div",
|
|
371
|
-
|
|
389
|
+
["success", "error", "loading", "warn", "info"].includes(r.type) ? (d(), y("div", W, [
|
|
390
|
+
h("div", {
|
|
372
391
|
class: g(`toasts-lite__${r.type}`)
|
|
373
392
|
}, null, 2)
|
|
374
393
|
])) : x("", !0),
|
|
375
|
-
|
|
376
|
-
|
|
394
|
+
h("div", j, [
|
|
395
|
+
h("div", G, B(r.message), 1)
|
|
377
396
|
])
|
|
378
397
|
], 4));
|
|
379
398
|
}
|
|
@@ -385,7 +404,7 @@ const F = {
|
|
|
385
404
|
itemClass: {}
|
|
386
405
|
},
|
|
387
406
|
setup(r) {
|
|
388
|
-
const t = ["top-left", "top-center", "top-right", "middle-center", "bottom-left", "bottom-center", "bottom-right"], e =
|
|
407
|
+
const t = ["top-left", "top-center", "top-right", "middle-center", "bottom-left", "bottom-center", "bottom-right"], e = p([]), { setRef: o, pauseAll: n, resumeAll: s } = F();
|
|
389
408
|
O.onToastsListChange((i) => {
|
|
390
409
|
e.value = i;
|
|
391
410
|
});
|
|
@@ -397,11 +416,11 @@ const F = {
|
|
|
397
416
|
}), i;
|
|
398
417
|
});
|
|
399
418
|
return (i, c) => (d(), C(I, { to: "body" }, [
|
|
400
|
-
(d(), y(
|
|
419
|
+
(d(), y(w, null, b(t, (u) => h("div", {
|
|
401
420
|
key: u,
|
|
402
421
|
class: g(["toasts-lite__toast-container", [r.containerClass, `toasts-lite__${u}`]])
|
|
403
422
|
}, [
|
|
404
|
-
|
|
423
|
+
h("div", {
|
|
405
424
|
class: g(["toasts-lite__toast-wrapper", r.wrapperClass]),
|
|
406
425
|
onMouseenter: (l) => v(n)(u),
|
|
407
426
|
onMouseleave: (l) => v(s)(u)
|
|
@@ -411,7 +430,7 @@ const F = {
|
|
|
411
430
|
appear: ""
|
|
412
431
|
}, {
|
|
413
432
|
default: S(() => [
|
|
414
|
-
(d(!0), y(
|
|
433
|
+
(d(!0), y(w, null, b(a.value.get(u) || [], (l, f) => (d(), C(H, {
|
|
415
434
|
id: l.id,
|
|
416
435
|
ref_for: !0,
|
|
417
436
|
ref: (_) => v(o)(u, f, _),
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--toasts-lite-font-family: var(--tl-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);--toasts-lite-bg: var(--tl-bg, hsl(0, 0%, 100%));--toasts-lite-text: var(--tl-text, hsl(0, 0%, 20%));--toasts-lite-border: var(--tl-border, hsl(0, 0%, 85%));--toasts-lite-shadow: var(--tl-shadow, hsla(0, 0%, 0%, .1));--toasts-lite-success: var(--tl-success, hsl(145, 63%, 42%));--toasts-lite-error: var(--tl-error, hsl(0, 79%, 63%));--toasts-lite-warn: var(--tl-warn, hsl(45, 100%, 51%));--toasts-lite-icon-color: var(--tl-icon-color, hsl(0, 0%, 100%));--toasts-lite-loading-border-main: var(--tl-loading-border, hsl(0, 0%, 15%));--toasts-lite-loading-border-bg: var(--tl-loading-bg, hsl(0, 0%, 98%))}@keyframes scaleAnimation{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes loadingRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.toasts-lite-enter-active,.toasts-lite-leave-active{transition:opacity .3s ease,transform .3s ease}.toasts-lite-enter-from,.toasts-lite-leave-to{opacity:0;transform:translateY(-10px)}.toasts-lite__toast-container{position:fixed;z-index:9999;margin:10px;overflow:visible;display:flex;flex-direction:column;align-items:center;padding-top:12px;pointer-events:none}.toasts-lite__toast-wrapper{display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:auto}.toasts-lite__toast{font-family:var(--toasts-lite-font-family);display:flex;justify-content:center;align-items:center;background:var(--toasts-lite-bg);color:var(--toasts-lite-text);border:1px solid var(--toasts-lite-border);box-shadow:var(--toasts-lite-shadow) 0 0 10px;min-width:100px;max-width:1200px;padding:10px 20px;border-radius:8px;cursor:pointer;pointer-events:auto;text-overflow:ellipsis}.toasts-lite__icon{margin-right:12px}.toasts-lite__top-left{top:0;left:0}.toasts-lite__top-center{top:0;left:50%;transform:translate(-50%);min-width:80vw}.toasts-lite__top-right{top:0;right:0}.toasts-lite__bottom-left{bottom:0;left:0}.toasts-lite__bottom-center{bottom:0;left:50%;transform:translate(-50%)}.toasts-lite__bottom-right{bottom:0;right:0}.toasts-lite__middle-center{top:50%;left:50%;transform:translate(-50%,-50%)}.toasts-lite__success{width:20px;height:20px;border-radius:10px;background-color:var(--toasts-lite-success);position:relative;opacity:0;animation:scaleAnimation .3s cubic-bezier(.75,.885,.32,1.275) forwards;animation-delay:.1s}.toasts-lite__success:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:12px;height:12px;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="
|
|
1
|
+
:root{--toasts-lite-font-family: var(--tl-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);--toasts-lite-font-size: var(--tl-font-size, 14px);--toasts-lite-bg: var(--tl-bg, hsl(0, 0%, 100%));--toasts-lite-text: var(--tl-text, hsl(0, 0%, 20%));--toasts-lite-border: var(--tl-border, hsl(0, 0%, 85%));--toasts-lite-shadow: var(--tl-shadow, hsla(0, 0%, 0%, .1));--toasts-lite-success: var(--tl-success, hsl(145, 63%, 42%));--toasts-lite-error: var(--tl-error, hsl(0, 79%, 63%));--toasts-lite-warn: var(--tl-warn, hsl(45, 100%, 51%));--toasts-lite-info: var(--tl-info, hsl(210, 80%, 55%));--toasts-lite-icon-color: var(--tl-icon-color, hsl(0, 0%, 100%));--toasts-lite-loading-border-main: var(--tl-loading-border, hsl(0, 0%, 15%));--toasts-lite-loading-border-bg: var(--tl-loading-bg, hsl(0, 0%, 98%))}@keyframes scaleAnimation{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes loadingRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.toasts-lite-enter-active,.toasts-lite-leave-active{transition:opacity .3s ease,transform .3s ease}.toasts-lite-enter-from,.toasts-lite-leave-to{opacity:0;transform:translateY(-10px)}.toasts-lite__toast-container{position:fixed;z-index:9999;margin:10px;overflow:visible;display:flex;flex-direction:column;align-items:center;padding-top:12px;pointer-events:none}.toasts-lite__toast-wrapper{display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:auto}.toasts-lite__toast{font-family:var(--toasts-lite-font-family);font-size:var(--toasts-lite-font-size);display:flex;justify-content:center;align-items:center;background:var(--toasts-lite-bg);color:var(--toasts-lite-text);border:1px solid var(--toasts-lite-border);box-shadow:var(--toasts-lite-shadow) 0 0 10px;min-width:100px;max-width:1200px;padding:10px 20px;border-radius:8px;cursor:pointer;pointer-events:auto;text-overflow:ellipsis}.toasts-lite__icon{margin-right:12px}.toasts-lite__top-left{top:0;left:0}.toasts-lite__top-center{top:0;left:50%;transform:translate(-50%);min-width:80vw}.toasts-lite__top-right{top:0;right:0}.toasts-lite__bottom-left{bottom:0;left:0}.toasts-lite__bottom-center{bottom:0;left:50%;transform:translate(-50%)}.toasts-lite__bottom-right{bottom:0;right:0}.toasts-lite__middle-center{top:50%;left:50%;transform:translate(-50%,-50%)}.toasts-lite__success{width:20px;height:20px;border-radius:10px;background-color:var(--toasts-lite-success);position:relative;opacity:0;animation:scaleAnimation .3s cubic-bezier(.75,.885,.32,1.275) forwards;animation-delay:.1s}.toasts-lite__success:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:12px;height:12px;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="black"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg>');-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="black"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg>');background-color:var(--toasts-lite-icon-color);background-size:100%;background-position:center;background-repeat:no-repeat}.toasts-lite__error{width:20px;height:20px;border-radius:10px;background-color:var(--toasts-lite-error);position:relative;opacity:0;animation:scaleAnimation .3s cubic-bezier(.75,.885,.32,1.275) forwards;animation-delay:.1s}.toasts-lite__error:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:12px;height:12px;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="black"><path stroke-linecap="round" stroke-linejoin="round" d="M6 6l12 12M18 6l-12 12" /></svg>');-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="black"><path stroke-linecap="round" stroke-linejoin="round" d="M6 6l12 12M18 6l-12 12" /></svg>');background-color:var(--toasts-lite-icon-color);background-size:100%;background-position:center;background-repeat:no-repeat}.toasts-lite__warn{width:20px;height:20px;border-radius:10px;background-color:var(--toasts-lite-warn);position:relative;opacity:0;animation:scaleAnimation .3s cubic-bezier(.75,.885,.32,1.275) forwards;animation-delay:.1s}.toasts-lite__warn:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:12px;height:12px;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="black" ><path stroke-linecap="round" stroke-linejoin="round" d="M5 12h14" /></svg>');-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="black" ><path stroke-linecap="round" stroke-linejoin="round" d="M5 12h14" /></svg>');background-color:var(--toasts-lite-icon-color);background-size:100%;background-position:center;background-repeat:no-repeat}.toasts-lite__info{width:20px;height:20px;border-radius:10px;background-color:var(--toasts-lite-info);position:relative;opacity:0;animation:scaleAnimation .3s cubic-bezier(.75,.885,.32,1.275) forwards;animation-delay:.1s}.toasts-lite__info:after{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:12px;height:12px;mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 12v7M12 5h.01" /></svg>');-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 12v7M12 5h.01" /></svg>');background-color:var(--toasts-lite-icon-color);background-size:100%;background-position:center;background-repeat:no-repeat}.toasts-lite__loading{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toasts-lite-loading-border-main);border-right-color:var(--toasts-lite-loading-border-bg);animation:loadingRotate 1s linear infinite}
|