@edgar208/sileo-vue 1.5.1 → 1.6.0
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/dist/sileo-vue.js +129 -126
- package/dist/sileo-vue.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/sileo-vue.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { reactive as X, markRaw as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as X, markRaw as O, defineComponent as I, ref as x, onMounted as V, computed as w, onUnmounted as W, openBlock as c, createElementBlock as f, normalizeStyle as z, normalizeClass as E, createElementVNode as i, createCommentVNode as k, createBlock as A, resolveDynamicComponent as F, toDisplayString as T, withModifiers as D, Fragment as M, renderList as S, createVNode as G, TransitionGroup as U, withCtx as q, unref as H, createApp as J, h as K } from "vue";
|
|
2
|
+
const v = X([]), b = X({
|
|
3
3
|
position: "top-right",
|
|
4
|
-
duration:
|
|
4
|
+
duration: 6e3,
|
|
5
5
|
maxToasts: 5
|
|
6
|
-
}),
|
|
7
|
-
function
|
|
6
|
+
}), Q = () => Math.random().toString(36).substring(2, 9);
|
|
7
|
+
function j() {
|
|
8
8
|
const t = (e) => {
|
|
9
9
|
const o = {
|
|
10
10
|
type: "default",
|
|
11
|
-
duration:
|
|
12
|
-
position:
|
|
11
|
+
duration: b.duration || 6e3,
|
|
12
|
+
position: b.position || "top-right",
|
|
13
13
|
showProgress: !0,
|
|
14
14
|
closeOnClick: !0,
|
|
15
15
|
swipeToDismiss: !0,
|
|
16
|
-
theme:
|
|
16
|
+
theme: b.theme
|
|
17
17
|
}, a = typeof e == "string" ? { message: e } : e;
|
|
18
|
-
|
|
19
|
-
const n =
|
|
18
|
+
v.length >= (b.maxToasts || 5) && v.shift();
|
|
19
|
+
const n = Q(), s = {
|
|
20
20
|
message: "",
|
|
21
21
|
...o,
|
|
22
22
|
...a,
|
|
23
23
|
id: n,
|
|
24
24
|
createdAt: Date.now()
|
|
25
25
|
};
|
|
26
|
-
return s.icon && typeof s.icon != "string" && (s.icon =
|
|
27
|
-
|
|
26
|
+
return s.icon && typeof s.icon != "string" && (s.icon = O(s.icon)), v.push(s), s.duration && s.duration > 0 && setTimeout(() => {
|
|
27
|
+
m(n);
|
|
28
28
|
}, s.duration), n;
|
|
29
|
-
},
|
|
30
|
-
const o =
|
|
31
|
-
o !== -1 &&
|
|
29
|
+
}, m = (e) => {
|
|
30
|
+
const o = v.findIndex((a) => a.id === e);
|
|
31
|
+
o !== -1 && v.splice(o, 1);
|
|
32
32
|
}, d = (e, o) => {
|
|
33
|
-
const a =
|
|
33
|
+
const a = v.findIndex((n) => n.id === e);
|
|
34
34
|
if (a !== -1) {
|
|
35
|
-
const n = { ...
|
|
36
|
-
typeof o.icon < "u" && o.icon && typeof o.icon != "string" && (n.icon =
|
|
35
|
+
const n = { ...v[a], ...o };
|
|
36
|
+
typeof o.icon < "u" && o.icon && typeof o.icon != "string" && (n.icon = O(o.icon)), v[a] = n;
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, y = Object.assign(t, {
|
|
39
39
|
success: (e) => t(typeof e == "string" ? { message: e, type: "success" } : { ...e, type: "success" }),
|
|
40
40
|
error: (e) => t(typeof e == "string" ? { message: e, type: "error" } : { ...e, type: "error" }),
|
|
41
41
|
warning: (e) => t(typeof e == "string" ? { message: e, type: "warning" } : { ...e, type: "warning" }),
|
|
@@ -43,113 +43,118 @@ function A() {
|
|
|
43
43
|
promise: async (e, o) => {
|
|
44
44
|
const a = t(typeof o.loading == "string" ? { message: o.loading, type: "default", duration: 0 } : { ...o.loading, type: "default", duration: 0 });
|
|
45
45
|
try {
|
|
46
|
-
const n = await e, s = typeof o.success == "function" ? o.success(n) : o.success,
|
|
47
|
-
return d(a, { ...
|
|
46
|
+
const n = await e, s = typeof o.success == "function" ? o.success(n) : o.success, l = typeof s == "string" ? { message: s, type: "success" } : { ...s, type: "success" };
|
|
47
|
+
return d(a, { ...l, duration: l.duration || 4e3 }), setTimeout(() => m(a), l.duration || 4e3), n;
|
|
48
48
|
} catch (n) {
|
|
49
|
-
const s = typeof o.error == "function" ? o.error(n) : o.error,
|
|
50
|
-
throw d(a, { ...
|
|
49
|
+
const s = typeof o.error == "function" ? o.error(n) : o.error, l = typeof s == "string" ? { message: s, type: "error" } : { ...s, type: "error" };
|
|
50
|
+
throw d(a, { ...l, duration: l.duration || 4e3 }), setTimeout(() => m(a), l.duration || 4e3), n;
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
clear: () =>
|
|
54
|
-
config: (e) => Object.assign(
|
|
53
|
+
clear: () => v.length = 0,
|
|
54
|
+
config: (e) => Object.assign(b, e)
|
|
55
55
|
});
|
|
56
56
|
return {
|
|
57
|
-
toasts:
|
|
58
|
-
toast:
|
|
59
|
-
removeToast:
|
|
57
|
+
toasts: v,
|
|
58
|
+
toast: y,
|
|
59
|
+
removeToast: m,
|
|
60
60
|
updateToast: d
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const L = j(), Y = { class: "sileo-header-pill" }, Z = {
|
|
64
64
|
key: 0,
|
|
65
65
|
class: "sileo-sweep-left"
|
|
66
|
-
},
|
|
66
|
+
}, _ = {
|
|
67
67
|
key: 1,
|
|
68
68
|
class: "sileo-sweep-right"
|
|
69
|
-
},
|
|
69
|
+
}, ee = { class: "sileo-icon-wrapper" }, te = {
|
|
70
70
|
key: 1,
|
|
71
71
|
class: "sileo-emoji"
|
|
72
|
-
},
|
|
72
|
+
}, oe = {
|
|
73
73
|
key: 2,
|
|
74
74
|
class: "sileo-default-icon"
|
|
75
|
-
},
|
|
75
|
+
}, se = {
|
|
76
76
|
key: 0,
|
|
77
77
|
class: "sileo-spin",
|
|
78
78
|
viewBox: "0 0 50 50"
|
|
79
|
-
},
|
|
79
|
+
}, ne = {
|
|
80
80
|
key: 1,
|
|
81
81
|
class: "sileo-icon-circle bg-success"
|
|
82
|
-
},
|
|
82
|
+
}, ie = {
|
|
83
83
|
key: 2,
|
|
84
84
|
class: "sileo-icon-circle bg-error"
|
|
85
|
-
},
|
|
85
|
+
}, ae = {
|
|
86
86
|
key: 3,
|
|
87
87
|
class: "sileo-icon-circle bg-warning"
|
|
88
|
-
},
|
|
88
|
+
}, re = {
|
|
89
89
|
key: 4,
|
|
90
90
|
class: "sileo-icon-circle bg-info"
|
|
91
|
-
},
|
|
92
|
-
key: 0,
|
|
93
|
-
class: "sileo-timer"
|
|
94
|
-
}, dt = /* @__PURE__ */ I({
|
|
91
|
+
}, le = { class: "sileo-main-body-animator" }, ce = { class: "sileo-main-wrapper" }, de = { class: "sileo-main-body" }, ue = { class: "sileo-body-content" }, fe = { class: "sileo-message" }, me = /* @__PURE__ */ I({
|
|
95
92
|
__name: "Toast",
|
|
96
93
|
props: {
|
|
97
94
|
toast: {}
|
|
98
95
|
},
|
|
99
96
|
emits: ["close"],
|
|
100
|
-
setup(t, { emit:
|
|
101
|
-
const d = t,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
97
|
+
setup(t, { emit: m }) {
|
|
98
|
+
const d = t, y = m, e = x(null), o = x(!1), a = x(0), n = x(0), s = x(!1);
|
|
99
|
+
V(() => {
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
s.value = !0;
|
|
102
|
+
}, 2e3);
|
|
103
|
+
});
|
|
104
|
+
const l = w(() => d.toast.icon), $ = w(() => d.toast.duration === 0 && (d.toast.type === "default" || !d.toast.type)), h = w(() => {
|
|
105
|
+
const u = d.toast.position || "top-right";
|
|
106
|
+
return u.includes("center") ? "center" : u.includes("left") ? "left" : "right";
|
|
107
|
+
}), P = w(() => (d.toast.position || "top-right").includes("top")), N = w(() => {
|
|
108
|
+
const u = n.value, r = Math.max(0, 1 - Math.abs(u) / 300), C = o.value ? 0.95 : 1, R = h.value === "center" ? "center" : h.value === "left" ? "flex-start" : "flex-end";
|
|
106
109
|
return {
|
|
107
|
-
transform: `translateX(${
|
|
110
|
+
transform: `translateX(${u}px) scale(${C})`,
|
|
108
111
|
opacity: r,
|
|
109
112
|
transition: o.value ? "none" : "opacity 0.4s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
110
113
|
display: "flex",
|
|
111
114
|
flexDirection: "column",
|
|
112
|
-
alignItems:
|
|
115
|
+
alignItems: R,
|
|
113
116
|
width: "100%",
|
|
114
117
|
pointerEvents: "auto",
|
|
115
118
|
marginBottom: "16px",
|
|
116
119
|
"--sileo-y-dir": P.value ? "-50px" : "50px"
|
|
117
120
|
};
|
|
118
|
-
}), B = (
|
|
119
|
-
d.toast.swipeToDismiss && (o.value = !0, a.value = "touches" in
|
|
120
|
-
},
|
|
121
|
+
}), B = (u) => {
|
|
122
|
+
d.toast.swipeToDismiss && (o.value = !0, a.value = "touches" in u ? u.touches[0].clientX : u.clientX, "touches" in u ? (window.addEventListener("touchmove", g), window.addEventListener("touchend", p)) : (window.addEventListener("mousemove", g), window.addEventListener("mouseup", p)));
|
|
123
|
+
}, g = (u) => {
|
|
121
124
|
if (!o.value) return;
|
|
122
|
-
const r = "touches" in
|
|
125
|
+
const r = "touches" in u ? u.touches[0].clientX : u.clientX;
|
|
123
126
|
n.value = (r - a.value) * 0.8;
|
|
124
|
-
},
|
|
125
|
-
o.value && (o.value = !1, Math.abs(n.value) > 100 ?
|
|
127
|
+
}, p = () => {
|
|
128
|
+
o.value && (o.value = !1, Math.abs(n.value) > 100 ? y("close") : n.value = 0, window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", p), window.removeEventListener("touchmove", g), window.removeEventListener("touchend", p));
|
|
126
129
|
};
|
|
127
|
-
return
|
|
128
|
-
window.removeEventListener("mousemove",
|
|
129
|
-
}), (
|
|
130
|
+
return W(() => {
|
|
131
|
+
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", p), window.removeEventListener("touchmove", g), window.removeEventListener("touchend", p);
|
|
132
|
+
}), (u, r) => (c(), f("div", {
|
|
130
133
|
ref_key: "toastRef",
|
|
131
134
|
ref: e,
|
|
132
|
-
class:
|
|
135
|
+
class: E(["sileo-toast-outer", [
|
|
133
136
|
`sileo-type-${t.toast.type || "default"}`,
|
|
134
|
-
`sileo-align-${
|
|
137
|
+
`sileo-align-${h.value}`,
|
|
135
138
|
t.toast.theme === "light" ? "sileo-theme-light" : "",
|
|
136
139
|
t.toast.theme === "dark" ? "sileo-theme-dark" : "",
|
|
137
140
|
{ "sileo-is-dragging": o.value }
|
|
138
141
|
]]),
|
|
139
|
-
style:
|
|
142
|
+
style: z(N.value),
|
|
140
143
|
onMousedown: B,
|
|
141
144
|
onTouchstart: B
|
|
142
145
|
}, [
|
|
143
|
-
i("div",
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
i("div", {
|
|
147
|
+
class: E(["sileo-combined-shape", { "is-expanded": s.value }])
|
|
148
|
+
}, [
|
|
149
|
+
i("div", Y, [
|
|
150
|
+
h.value !== "left" ? (c(), f("div", Z)) : k("", !0),
|
|
151
|
+
h.value !== "right" ? (c(), f("div", _)) : k("", !0),
|
|
152
|
+
i("div", ee, [
|
|
153
|
+
typeof t.toast.icon != "string" && t.toast.icon ? (c(), A(F(l.value), {
|
|
149
154
|
key: 0,
|
|
150
155
|
class: "sileo-custom-icon"
|
|
151
|
-
})) : typeof t.toast.icon == "string" ? (
|
|
152
|
-
|
|
156
|
+
})) : typeof t.toast.icon == "string" ? (c(), f("span", te, T(t.toast.icon), 1)) : (c(), f("div", oe, [
|
|
157
|
+
$.value ? (c(), f("svg", se, [...r[2] || (r[2] = [
|
|
153
158
|
i("circle", {
|
|
154
159
|
cx: "25",
|
|
155
160
|
cy: "25",
|
|
@@ -158,7 +163,7 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
158
163
|
stroke: "currentColor",
|
|
159
164
|
"stroke-width": "5"
|
|
160
165
|
}, null, -1)
|
|
161
|
-
])])) : t.toast.type === "success" ? (
|
|
166
|
+
])])) : t.toast.type === "success" ? (c(), f("div", ne, [...r[3] || (r[3] = [
|
|
162
167
|
i("svg", {
|
|
163
168
|
viewBox: "0 0 24 24",
|
|
164
169
|
fill: "none",
|
|
@@ -166,7 +171,7 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
166
171
|
}, [
|
|
167
172
|
i("polyline", { points: "20 6 9 17 4 12" })
|
|
168
173
|
], -1)
|
|
169
|
-
])])) : t.toast.type === "error" ? (
|
|
174
|
+
])])) : t.toast.type === "error" ? (c(), f("div", ie, [...r[4] || (r[4] = [
|
|
170
175
|
i("svg", {
|
|
171
176
|
viewBox: "0 0 24 24",
|
|
172
177
|
fill: "none",
|
|
@@ -185,7 +190,7 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
185
190
|
y2: "18"
|
|
186
191
|
})
|
|
187
192
|
], -1)
|
|
188
|
-
])])) : t.toast.type === "warning" ? (
|
|
193
|
+
])])) : t.toast.type === "warning" ? (c(), f("div", ae, [...r[5] || (r[5] = [
|
|
189
194
|
i("svg", {
|
|
190
195
|
viewBox: "0 0 24 24",
|
|
191
196
|
fill: "none",
|
|
@@ -205,7 +210,7 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
205
210
|
y2: "17"
|
|
206
211
|
})
|
|
207
212
|
], -1)
|
|
208
|
-
])])) : (
|
|
213
|
+
])])) : (c(), f("div", re, [...r[6] || (r[6] = [
|
|
209
214
|
i("svg", {
|
|
210
215
|
viewBox: "0 0 24 24",
|
|
211
216
|
fill: "none",
|
|
@@ -232,14 +237,14 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
232
237
|
])]))
|
|
233
238
|
]))
|
|
234
239
|
]),
|
|
235
|
-
t.toast.title ? (
|
|
240
|
+
t.toast.title ? (c(), f("span", {
|
|
236
241
|
key: 2,
|
|
237
|
-
class:
|
|
238
|
-
}, T(t.toast.title), 3)) :
|
|
239
|
-
t.toast.closeOnClick ? (
|
|
242
|
+
class: E(["sileo-title-text", `text-${t.toast.type || "default"}`])
|
|
243
|
+
}, T(t.toast.title), 3)) : k("", !0),
|
|
244
|
+
t.toast.closeOnClick ? (c(), f("button", {
|
|
240
245
|
key: 3,
|
|
241
246
|
class: "sileo-close-btn",
|
|
242
|
-
onClick: r[0] || (r[0] =
|
|
247
|
+
onClick: r[0] || (r[0] = D((C) => u.$emit("close"), ["stop"]))
|
|
243
248
|
}, [...r[7] || (r[7] = [
|
|
244
249
|
i("svg", {
|
|
245
250
|
viewBox: "0 0 24 24",
|
|
@@ -258,70 +263,68 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
258
263
|
y2: "18"
|
|
259
264
|
})
|
|
260
265
|
], -1)
|
|
261
|
-
])])) :
|
|
266
|
+
])])) : k("", !0)
|
|
262
267
|
]),
|
|
263
|
-
i("div",
|
|
264
|
-
i("div",
|
|
265
|
-
i("
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}, null, 4)
|
|
277
|
-
])) : w("", !0)
|
|
268
|
+
i("div", le, [
|
|
269
|
+
i("div", ce, [
|
|
270
|
+
i("div", de, [
|
|
271
|
+
i("div", ue, [
|
|
272
|
+
i("p", fe, T(t.toast.message), 1),
|
|
273
|
+
t.toast.action ? (c(), f("button", {
|
|
274
|
+
key: 0,
|
|
275
|
+
class: "sileo-action-trigger",
|
|
276
|
+
onClick: r[1] || (r[1] = D((C) => t.toast.action.onClick(t.toast.id), ["stop"]))
|
|
277
|
+
}, T(t.toast.action.label), 1)) : k("", !0)
|
|
278
|
+
])
|
|
279
|
+
])
|
|
280
|
+
])
|
|
278
281
|
])
|
|
279
|
-
])
|
|
282
|
+
], 2)
|
|
280
283
|
], 38));
|
|
281
284
|
}
|
|
282
|
-
}),
|
|
285
|
+
}), ye = { class: "sileo-root-wrapper" }, ve = /* @__PURE__ */ I({
|
|
283
286
|
__name: "ToastContainer",
|
|
284
287
|
setup(t) {
|
|
285
|
-
const { toasts:
|
|
288
|
+
const { toasts: m, removeToast: d } = j(), y = [
|
|
286
289
|
"top-left",
|
|
287
290
|
"top-center",
|
|
288
291
|
"top-right",
|
|
289
292
|
"bottom-left",
|
|
290
293
|
"bottom-center",
|
|
291
294
|
"bottom-right"
|
|
292
|
-
], e = (a) =>
|
|
293
|
-
const n = a.startsWith("top"), s = a.endsWith("left"),
|
|
295
|
+
], e = (a) => m.filter((n) => n.position === a), o = (a) => {
|
|
296
|
+
const n = a.startsWith("top"), s = a.endsWith("left"), l = a.endsWith("center");
|
|
294
297
|
return {
|
|
295
298
|
position: "absolute",
|
|
296
299
|
top: n ? "0" : "auto",
|
|
297
300
|
bottom: n ? "auto" : "0",
|
|
298
|
-
left: s ? "0" :
|
|
299
|
-
right: !s && !
|
|
300
|
-
transform:
|
|
301
|
+
left: s ? "0" : l ? "50%" : "auto",
|
|
302
|
+
right: !s && !l ? "0" : "auto",
|
|
303
|
+
transform: l ? "translateX(-50%)" : "none",
|
|
301
304
|
padding: "24px",
|
|
302
305
|
display: "flex",
|
|
303
306
|
pointerEvents: "none",
|
|
304
307
|
boxSizing: "border-box",
|
|
305
|
-
alignItems: s ? "flex-start" :
|
|
308
|
+
alignItems: s ? "flex-start" : l ? "center" : "flex-end",
|
|
306
309
|
flexDirection: n ? "column" : "column-reverse"
|
|
307
310
|
};
|
|
308
311
|
};
|
|
309
|
-
return (a, n) => (
|
|
310
|
-
(
|
|
312
|
+
return (a, n) => (c(), f("div", ye, [
|
|
313
|
+
(c(), f(M, null, S(y, (s) => i("div", {
|
|
311
314
|
key: s,
|
|
312
|
-
class:
|
|
313
|
-
style:
|
|
315
|
+
class: E(["sileo-position-container", [`sileo-pos-${s}`]]),
|
|
316
|
+
style: z(o(s))
|
|
314
317
|
}, [
|
|
315
|
-
|
|
318
|
+
G(U, {
|
|
316
319
|
name: "sileo-list",
|
|
317
320
|
tag: "div",
|
|
318
321
|
class: "sileo-stack"
|
|
319
322
|
}, {
|
|
320
|
-
default:
|
|
321
|
-
(
|
|
322
|
-
key:
|
|
323
|
-
toast:
|
|
324
|
-
onClose: (
|
|
323
|
+
default: q(() => [
|
|
324
|
+
(c(!0), f(M, null, S(e(s), (l) => (c(), A(me, {
|
|
325
|
+
key: l.id,
|
|
326
|
+
toast: l,
|
|
327
|
+
onClose: ($) => H(d)(l.id)
|
|
325
328
|
}, null, 8, ["toast", "onClose"]))), 128))
|
|
326
329
|
]),
|
|
327
330
|
_: 2
|
|
@@ -329,22 +332,22 @@ const E = A(), K = { class: "sileo-combined-shape" }, Q = { class: "sileo-header
|
|
|
329
332
|
], 6)), 64))
|
|
330
333
|
]));
|
|
331
334
|
}
|
|
332
|
-
}),
|
|
333
|
-
install(t,
|
|
334
|
-
if (Object.keys(
|
|
335
|
+
}), pe = {
|
|
336
|
+
install(t, m = {}) {
|
|
337
|
+
if (Object.keys(m).length > 0 && L.toast.config(m), typeof document < "u") {
|
|
335
338
|
const d = "sileo-toast-container";
|
|
336
|
-
let
|
|
337
|
-
|
|
338
|
-
render: () =>
|
|
339
|
-
}).mount(
|
|
339
|
+
let y = document.getElementById(d);
|
|
340
|
+
y || (y = document.createElement("div"), y.id = d, document.body.appendChild(y), J({
|
|
341
|
+
render: () => K(ve)
|
|
342
|
+
}).mount(y));
|
|
340
343
|
}
|
|
341
|
-
t.config.globalProperties.$toast =
|
|
344
|
+
t.config.globalProperties.$toast = L.toast, t.provide("toast", L.toast);
|
|
342
345
|
}
|
|
343
346
|
};
|
|
344
347
|
export {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
pe as SileoPlugin,
|
|
349
|
+
me as Toast,
|
|
350
|
+
ve as ToastContainer,
|
|
351
|
+
L as toastManager,
|
|
352
|
+
j as useToast
|
|
350
353
|
};
|
package/dist/sileo-vue.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m.SileoVue={},m.Vue))})(this,function(m,e){"use strict";const
|
|
1
|
+
(function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m.SileoVue={},m.Vue))})(this,function(m,e){"use strict";const y=e.reactive([]),k=e.reactive({position:"top-right",duration:6e3,maxToasts:5}),C=()=>Math.random().toString(36).substring(2,9);function w(){const o=t=>{const n={type:"default",duration:k.duration||6e3,position:k.position||"top-right",showProgress:!0,closeOnClick:!0,swipeToDismiss:!0,theme:k.theme},l=typeof t=="string"?{message:t}:t;y.length>=(k.maxToasts||5)&&y.shift();const i=C(),s={message:"",...n,...l,id:i,createdAt:Date.now()};return s.icon&&typeof s.icon!="string"&&(s.icon=e.markRaw(s.icon)),y.push(s),s.duration&&s.duration>0&&setTimeout(()=>{f(i)},s.duration),i},f=t=>{const n=y.findIndex(l=>l.id===t);n!==-1&&y.splice(n,1)},r=(t,n)=>{const l=y.findIndex(i=>i.id===t);if(l!==-1){const i={...y[l],...n};typeof n.icon<"u"&&n.icon&&typeof n.icon!="string"&&(i.icon=e.markRaw(n.icon)),y[l]=i}},p=Object.assign(o,{success:t=>o(typeof t=="string"?{message:t,type:"success"}:{...t,type:"success"}),error:t=>o(typeof t=="string"?{message:t,type:"error"}:{...t,type:"error"}),warning:t=>o(typeof t=="string"?{message:t,type:"warning"}:{...t,type:"warning"}),info:t=>o(typeof t=="string"?{message:t,type:"info"}:{...t,type:"info"}),promise:async(t,n)=>{const l=o(typeof n.loading=="string"?{message:n.loading,type:"default",duration:0}:{...n.loading,type:"default",duration:0});try{const i=await t,s=typeof n.success=="function"?n.success(i):n.success,c=typeof s=="string"?{message:s,type:"success"}:{...s,type:"success"};return r(l,{...c,duration:c.duration||4e3}),setTimeout(()=>f(l),c.duration||4e3),i}catch(i){const s=typeof n.error=="function"?n.error(i):n.error,c=typeof s=="string"?{message:s,type:"error"}:{...s,type:"error"};throw r(l,{...c,duration:c.duration||4e3}),setTimeout(()=>f(l),c.duration||4e3),i}},clear:()=>y.length=0,config:t=>Object.assign(k,t)});return{toasts:y,toast:p,removeToast:f,updateToast:r}}const E=w(),T={class:"sileo-header-pill"},L={key:0,class:"sileo-sweep-left"},S={key:1,class:"sileo-sweep-right"},D={class:"sileo-icon-wrapper"},$={key:1,class:"sileo-emoji"},M={key:2,class:"sileo-default-icon"},O={key:0,class:"sileo-spin",viewBox:"0 0 50 50"},z={key:1,class:"sileo-icon-circle bg-success"},X={key:2,class:"sileo-icon-circle bg-error"},I={key:3,class:"sileo-icon-circle bg-warning"},j={key:4,class:"sileo-icon-circle bg-info"},P={class:"sileo-main-body-animator"},A={class:"sileo-main-wrapper"},R={class:"sileo-main-body"},W={class:"sileo-body-content"},F={class:"sileo-message"},B=e.defineComponent({__name:"Toast",props:{toast:{}},emits:["close"],setup(o,{emit:f}){const r=o,p=f,t=e.ref(null),n=e.ref(!1),l=e.ref(0),i=e.ref(0),s=e.ref(!1);e.onMounted(()=>{setTimeout(()=>{s.value=!0},2e3)});const c=e.computed(()=>r.toast.icon),b=e.computed(()=>r.toast.duration===0&&(r.toast.type==="default"||!r.toast.type)),h=e.computed(()=>{const d=r.toast.position||"top-right";return d.includes("center")?"center":d.includes("left")?"left":"right"}),U=e.computed(()=>(r.toast.position||"top-right").includes("top")),H=e.computed(()=>{const d=i.value,a=Math.max(0,1-Math.abs(d)/300),x=n.value?.95:1,J=h.value==="center"?"center":h.value==="left"?"flex-start":"flex-end";return{transform:`translateX(${d}px) scale(${x})`,opacity:a,transition:n.value?"none":"opacity 0.4s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",display:"flex",flexDirection:"column",alignItems:J,width:"100%",pointerEvents:"auto",marginBottom:"16px","--sileo-y-dir":U.value?"-50px":"50px"}}),N=d=>{r.toast.swipeToDismiss&&(n.value=!0,l.value="touches"in d?d.touches[0].clientX:d.clientX,"touches"in d?(window.addEventListener("touchmove",g),window.addEventListener("touchend",u)):(window.addEventListener("mousemove",g),window.addEventListener("mouseup",u)))},g=d=>{if(!n.value)return;const a="touches"in d?d.touches[0].clientX:d.clientX;i.value=(a-l.value)*.8},u=()=>{n.value&&(n.value=!1,Math.abs(i.value)>100?p("close"):i.value=0,window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",u),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",u))};return e.onUnmounted(()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",u),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",u)}),(d,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"toastRef",ref:t,class:e.normalizeClass(["sileo-toast-outer",[`sileo-type-${o.toast.type||"default"}`,`sileo-align-${h.value}`,o.toast.theme==="light"?"sileo-theme-light":"",o.toast.theme==="dark"?"sileo-theme-dark":"",{"sileo-is-dragging":n.value}]]),style:e.normalizeStyle(H.value),onMousedown:N,onTouchstart:N},[e.createElementVNode("div",{class:e.normalizeClass(["sileo-combined-shape",{"is-expanded":s.value}])},[e.createElementVNode("div",T,[h.value!=="left"?(e.openBlock(),e.createElementBlock("div",L)):e.createCommentVNode("",!0),h.value!=="right"?(e.openBlock(),e.createElementBlock("div",S)):e.createCommentVNode("",!0),e.createElementVNode("div",D,[typeof o.toast.icon!="string"&&o.toast.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:0,class:"sileo-custom-icon"})):typeof o.toast.icon=="string"?(e.openBlock(),e.createElementBlock("span",$,e.toDisplayString(o.toast.icon),1)):(e.openBlock(),e.createElementBlock("div",M,[b.value?(e.openBlock(),e.createElementBlock("svg",O,[...a[2]||(a[2]=[e.createElementVNode("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:"currentColor","stroke-width":"5"},null,-1)])])):o.toast.type==="success"?(e.openBlock(),e.createElementBlock("div",z,[...a[3]||(a[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",class:"sileo-stroke-icon"},[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)])])):o.toast.type==="error"?(e.openBlock(),e.createElementBlock("div",X,[...a[4]||(a[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",class:"sileo-stroke-icon"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])):o.toast.type==="warning"?(e.openBlock(),e.createElementBlock("div",I,[...a[5]||(a[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",class:"sileo-stroke-icon"},[e.createElementVNode("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.createElementVNode("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.createElementVNode("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})],-1)])])):(e.openBlock(),e.createElementBlock("div",j,[...a[6]||(a[6]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",class:"sileo-stroke-icon"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.createElementVNode("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})],-1)])]))]))]),o.toast.title?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(["sileo-title-text",`text-${o.toast.type||"default"}`])},e.toDisplayString(o.toast.title),3)):e.createCommentVNode("",!0),o.toast.closeOnClick?(e.openBlock(),e.createElementBlock("button",{key:3,class:"sileo-close-btn",onClick:a[0]||(a[0]=e.withModifiers(x=>d.$emit("close"),["stop"]))},[...a[7]||(a[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",P,[e.createElementVNode("div",A,[e.createElementVNode("div",R,[e.createElementVNode("div",W,[e.createElementVNode("p",F,e.toDisplayString(o.toast.message),1),o.toast.action?(e.openBlock(),e.createElementBlock("button",{key:0,class:"sileo-action-trigger",onClick:a[1]||(a[1]=e.withModifiers(x=>o.toast.action.onClick(o.toast.id),["stop"]))},e.toDisplayString(o.toast.action.label),1)):e.createCommentVNode("",!0)])])])])],2)],38))}}),q={class:"sileo-root-wrapper"},V=e.defineComponent({__name:"ToastContainer",setup(o){const{toasts:f,removeToast:r}=w(),p=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],t=l=>f.filter(i=>i.position===l),n=l=>{const i=l.startsWith("top"),s=l.endsWith("left"),c=l.endsWith("center");return{position:"absolute",top:i?"0":"auto",bottom:i?"auto":"0",left:s?"0":c?"50%":"auto",right:!s&&!c?"0":"auto",transform:c?"translateX(-50%)":"none",padding:"24px",display:"flex",pointerEvents:"none",boxSizing:"border-box",alignItems:s?"flex-start":c?"center":"flex-end",flexDirection:i?"column":"column-reverse"}};return(l,i)=>(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,s=>e.createElementVNode("div",{key:s,class:e.normalizeClass(["sileo-position-container",[`sileo-pos-${s}`]]),style:e.normalizeStyle(n(s))},[e.createVNode(e.TransitionGroup,{name:"sileo-list",tag:"div",class:"sileo-stack"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t(s),c=>(e.openBlock(),e.createBlock(B,{key:c.id,toast:c,onClose:b=>e.unref(r)(c.id)},null,8,["toast","onClose"]))),128))]),_:2},1024)],6)),64))]))}}),G={install(o,f={}){if(Object.keys(f).length>0&&E.toast.config(f),typeof document<"u"){const r="sileo-toast-container";let p=document.getElementById(r);p||(p=document.createElement("div"),p.id=r,document.body.appendChild(p),e.createApp({render:()=>e.h(V)}).mount(p))}o.config.globalProperties.$toast=E.toast,o.provide("toast",E.toast)}};m.SileoPlugin=G,m.Toast=B,m.ToastContainer=V,m.toastManager=E,m.useToast=w,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.sileo-toast-outer{--sileo-bg: #ffffff;--sileo-text-primary: #000000;--sileo-text-secondary: rgba(0, 0, 0, .65);--sileo-border: rgba(0, 0, 0, .08);--sileo-btn-bg: #1c1c1e;--sileo-btn-text: #ffffff;--sileo-timer-bg: rgba(0, 0, 0, .1);--sileo-close-color: rgba(0, 0, 0, .3);--sileo-close-hover: rgba(0, 0, 0, .7);position:relative!important;width:400px!important;max-width:90vw!important;-webkit-user-select:none!important;user-select:none!important;z-index:10000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif!important;box-sizing:border-box!important}@media (prefers-color-scheme: dark){.sileo-toast-outer:not(.sileo-theme-light){--sileo-bg: #1c1c1e;--sileo-text-primary: #ffffff;--sileo-text-secondary: rgba(255, 255, 255, .65);--sileo-border: rgba(255, 255, 255, .15);--sileo-btn-bg: #ffffff;--sileo-btn-text: #000000;--sileo-timer-bg: rgba(255, 255, 255, .15);--sileo-close-color: rgba(255, 255, 255, .3);--sileo-close-hover: rgba(255, 255, 255, .7)}}.sileo-toast-outer.sileo-theme-dark{--sileo-bg: #1c1c1e;--sileo-text-primary: #ffffff;--sileo-text-secondary: rgba(255, 255, 255, .65);--sileo-border: rgba(255, 255, 255, .15);--sileo-btn-bg: #ffffff;--sileo-btn-text: #000000;--sileo-timer-bg: rgba(255, 255, 255, .15);--sileo-close-color: rgba(255, 255, 255, .3);--sileo-close-hover: rgba(255, 255, 255, .7)}.sileo-combined-shape{display:flex!important;flex-direction:column!important;width:100%!important;filter:drop-shadow(0 0 1px var(--sileo-border))!important}.sileo-header-pill{display:flex!important;align-items:center!important;gap:8px!important;background:var(--sileo-bg)!important;padding:8px 16px 8px 14px!important;height:40px!important;border-radius:24px 24px 0 0!important;color:var(--sileo-text-primary)!important;box-sizing:border-box!important;width:fit-content!important;position:relative!important;z-index:2!important;margin-bottom:-1px!important}.sileo-align-center .sileo-header-pill{align-self:center!important}.sileo-align-left .sileo-header-pill{align-self:flex-start!important;border-bottom-left-radius:0!important;margin-left:0!important}.sileo-align-right .sileo-header-pill{align-self:flex-end!important;border-bottom-right-radius:0!important;margin-right:0!important}.sileo-sweep-left,.sileo-sweep-right{position:absolute!important;bottom:0!important;width:24px!important;height:24px!important;z-index:-1!important;background:var(--sileo-bg)!important;pointer-events:none!important}.sileo-sweep-left{left:-24px!important;clip-path:path("M24 0 C24 13.255 13.255 24 0 24 L24 24 Z")!important}.sileo-sweep-right{right:-24px!important;clip-path:path("M0 0 C0 13.255 10.745 24 24 24 L0 24 Z")!important}.sileo-icon-wrapper{width:22px!important;height:22px!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-shrink:0!important}.sileo-custom-icon{width:18px!important;height:18px!important;display:block!important}.sileo-emoji{font-size:16px!important;line-height:1!important}.sileo-default-icon{width:22px!important;height:22px!important;display:flex!important;align-items:center!important;justify-content:center!important}.sileo-icon-circle{width:22px!important;height:22px!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#8080801a!important}.bg-success{background:#32d74b26!important;color:#32d74b!important}.bg-error{background:#ff453a26!important;color:#ff453a!important}.bg-warning{background:#ffd60a26!important;color:#ffd60a!important}.bg-info{background:#0a84ff26!important;color:#0a84ff!important}.sileo-stroke-icon{width:13px!important;height:13px!important;stroke:currentColor!important;stroke-width:3!important}.sileo-title-text{font-size:14.5px!important;font-weight:600!important;line-height:1!important;white-space:nowrap!important;letter-spacing:.2px!important}.text-success{color:#32d74b!important}.text-error{color:#ff453a!important}.text-warning{color:#ffd60a!important}.text-info{color:#0a84ff!important}.text-default{color:var(--sileo-text-primary)!important}.sileo-close-btn{background:none!important;border:none!important;padding:2px!important;cursor:pointer!important;color:var(--sileo-close-color)!important;display:flex!important;align-items:center!important;margin-left:2px!important;transition:color .2s!important}.sileo-close-btn svg{width:14px!important;height:14px!important;stroke:currentColor!important;stroke-width:2.5!important}.sileo-close-btn:hover{color:var(--sileo-close-hover)!important}.sileo-main-body{background:var(--sileo-bg)!important;padding:18px 24px!important;border-radius:24px!important;width:100%!important;box-sizing:border-box!important;position:relative!important;z-index:1!important}.sileo-align-left .sileo-main-body{border-top-left-radius:0!important}.sileo-align-right .sileo-main-body{border-top-right-radius:0!important}.sileo-body-content{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important}.sileo-message{margin:0!important;font-size:15.5px!important;line-height:1.5!important;color:var(--sileo-text-secondary)!important;font-weight:400!important;letter-spacing:.1px!important}.sileo-action-trigger{background:var(--sileo-btn-bg)!important;color:var(--sileo-btn-text)!important;border:none!important;border-radius:14px!important;padding:10px 18px!important;font-size:13.5px!important;font-weight:600!important;cursor:pointer!important;white-space:nowrap!important;flex-shrink:0!important;transition:transform .2s,background .2s!important}.sileo-action-trigger:hover{transform:scale(1.03)!important}
|
|
1
|
+
.sileo-toast-outer{--sileo-bg: #ffffff;--sileo-text-primary: #000000;--sileo-text-secondary: rgba(0, 0, 0, .65);--sileo-border: rgba(0, 0, 0, .08);--sileo-btn-bg: #1c1c1e;--sileo-btn-text: #ffffff;--sileo-timer-bg: rgba(0, 0, 0, .1);--sileo-close-color: rgba(0, 0, 0, .3);--sileo-close-hover: rgba(0, 0, 0, .7);position:relative!important;width:400px!important;max-width:90vw!important;-webkit-user-select:none!important;user-select:none!important;z-index:10000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif!important;box-sizing:border-box!important}@media (prefers-color-scheme: dark){.sileo-toast-outer:not(.sileo-theme-light){--sileo-bg: #1c1c1e;--sileo-text-primary: #ffffff;--sileo-text-secondary: rgba(255, 255, 255, .65);--sileo-border: rgba(255, 255, 255, .15);--sileo-btn-bg: #ffffff;--sileo-btn-text: #000000;--sileo-timer-bg: rgba(255, 255, 255, .15);--sileo-close-color: rgba(255, 255, 255, .3);--sileo-close-hover: rgba(255, 255, 255, .7)}}.sileo-toast-outer.sileo-theme-dark{--sileo-bg: #1c1c1e;--sileo-text-primary: #ffffff;--sileo-text-secondary: rgba(255, 255, 255, .65);--sileo-border: rgba(255, 255, 255, .15);--sileo-btn-bg: #ffffff;--sileo-btn-text: #000000;--sileo-timer-bg: rgba(255, 255, 255, .15);--sileo-close-color: rgba(255, 255, 255, .3);--sileo-close-hover: rgba(255, 255, 255, .7)}.sileo-combined-shape{display:flex!important;flex-direction:column!important;width:100%!important;filter:drop-shadow(0 0 1px var(--sileo-border))!important}.sileo-header-pill{display:flex!important;align-items:center!important;gap:8px!important;background:var(--sileo-bg)!important;padding:8px 16px 8px 14px!important;height:40px!important;border-radius:24px 24px 0 0!important;color:var(--sileo-text-primary)!important;box-sizing:border-box!important;width:fit-content!important;position:relative!important;z-index:2!important;margin-bottom:-1px!important}.sileo-align-center .sileo-header-pill{align-self:center!important}.sileo-align-left .sileo-header-pill{align-self:flex-start!important;border-bottom-left-radius:0!important;margin-left:0!important}.sileo-align-right .sileo-header-pill{align-self:flex-end!important;border-bottom-right-radius:0!important;margin-right:0!important}.sileo-sweep-left,.sileo-sweep-right{position:absolute!important;bottom:0!important;width:24px!important;height:24px!important;z-index:-1!important;background:var(--sileo-bg)!important;pointer-events:none!important}.sileo-sweep-left{left:-24px!important;clip-path:path("M24 0 C24 13.255 13.255 24 0 24 L24 24 Z")!important}.sileo-sweep-right{right:-24px!important;clip-path:path("M0 0 C0 13.255 10.745 24 24 24 L0 24 Z")!important}.sileo-icon-wrapper{width:22px!important;height:22px!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-shrink:0!important}.sileo-custom-icon{width:18px!important;height:18px!important;display:block!important}.sileo-emoji{font-size:16px!important;line-height:1!important}.sileo-default-icon{width:22px!important;height:22px!important;display:flex!important;align-items:center!important;justify-content:center!important}.sileo-icon-circle{width:22px!important;height:22px!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#8080801a!important}.bg-success{background:#32d74b26!important;color:#32d74b!important}.bg-error{background:#ff453a26!important;color:#ff453a!important}.bg-warning{background:#ffd60a26!important;color:#ffd60a!important}.bg-info{background:#0a84ff26!important;color:#0a84ff!important}.sileo-stroke-icon{width:13px!important;height:13px!important;stroke:currentColor!important;stroke-width:3!important}.sileo-title-text{font-size:14.5px!important;font-weight:600!important;line-height:1!important;white-space:nowrap!important;letter-spacing:.2px!important}.text-success{color:#32d74b!important}.text-error{color:#ff453a!important}.text-warning{color:#ffd60a!important}.text-info{color:#0a84ff!important}.text-default{color:var(--sileo-text-primary)!important}.sileo-close-btn{background:none!important;border:none!important;padding:2px!important;cursor:pointer!important;color:var(--sileo-close-color)!important;display:flex!important;align-items:center!important;margin-left:2px!important;transition:color .2s!important}.sileo-close-btn svg{width:14px!important;height:14px!important;stroke:currentColor!important;stroke-width:2.5!important}.sileo-close-btn:hover{color:var(--sileo-close-hover)!important}.sileo-main-body-animator{display:grid!important;grid-template-rows:0fr!important;opacity:0!important;transition:grid-template-rows .5s cubic-bezier(.34,1.56,.64,1),opacity .4s ease!important}.sileo-combined-shape.is-expanded .sileo-main-body-animator{grid-template-rows:1fr!important;opacity:1!important}.sileo-main-wrapper{overflow:hidden!important}.sileo-main-body{background:var(--sileo-bg)!important;padding:18px 24px!important;border-radius:24px!important;width:100%!important;box-sizing:border-box!important;position:relative!important;z-index:1!important}.sileo-align-left .sileo-main-body{border-top-left-radius:0!important}.sileo-align-right .sileo-main-body{border-top-right-radius:0!important}.sileo-body-content{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important}.sileo-message{margin:0!important;font-size:15.5px!important;line-height:1.5!important;color:var(--sileo-text-secondary)!important;font-weight:400!important;letter-spacing:.1px!important}.sileo-action-trigger{background:var(--sileo-btn-bg)!important;color:var(--sileo-btn-text)!important;border:none!important;border-radius:14px!important;padding:10px 18px!important;font-size:13.5px!important;font-weight:600!important;cursor:pointer!important;white-space:nowrap!important;flex-shrink:0!important;transition:transform .2s,background .2s!important}.sileo-action-trigger:hover{transform:scale(1.03)!important}@keyframes sileo-spin{to{transform:rotate(360deg)}}.sileo-spin{animation:sileo-spin 1.5s linear infinite!important;width:20px!important;height:20px!important}.sileo-spin circle{stroke:currentColor!important;stroke-linecap:round!important;animation:sileo-dash-pulse 1.5s ease-in-out infinite!important}@keyframes sileo-dash-pulse{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}.sileo-list-enter-active{transition:opacity .5s ease,transform .6s cubic-bezier(.34,1.56,.64,1)!important}.sileo-list-leave-active{transition:opacityけると0.3s ease,transform .5s cubic-bezier(.4,0,1,1)!important}.sileo-list-enter-from{opacity:0!important;transform:translateY(var(--sileo-y-dir, -50px)) scale(.85)!important}.sileo-list-leave-to{opacity:0!important;transform:scale(.85)!important}.sileo-root-wrapper{pointer-events:none!important;position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:999999!important;overflow:hidden!important}.sileo-stack{display:flex!important;flex-direction:column!important;gap:12px!important}.sileo-list-move{transition:transform .5s cubic-bezier(.34,1.56,.64,1)!important}
|