welcome-ui 0.0.0-dev.1763974162373 → 0.0.0-dev.1763989493458
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/Drawer.js +132 -111
- package/dist/Toast.js +36 -34
- package/package.json +1 -1
package/dist/Drawer.js
CHANGED
|
@@ -1,99 +1,101 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Drawer.css';
|
|
3
|
-
import { jsx as e, jsxs as
|
|
4
|
-
import { D as
|
|
5
|
-
import { u as
|
|
6
|
-
import { useCallback as
|
|
3
|
+
import { jsx as e, jsxs as h, Fragment as P } from "react/jsx-runtime";
|
|
4
|
+
import { D as S } from "./NI3IVY7K-Dy240mkD.js";
|
|
5
|
+
import { u as Ne } from "./NI3IVY7K-Dy240mkD.js";
|
|
6
|
+
import { useCallback as f, forwardRef as u } from "react";
|
|
7
7
|
import { c as o } from "./index-PAaZGbyz.js";
|
|
8
|
-
import { f as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Icon as
|
|
11
|
-
import { Text as
|
|
8
|
+
import { f as z } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
9
|
+
import { Button as q } from "./Button.js";
|
|
10
|
+
import { Icon as A } from "./Icon.js";
|
|
11
|
+
import { Text as C } from "./Text.js";
|
|
12
12
|
import { D as H } from "./DSAASPLT-Fx1kuAsk.js";
|
|
13
13
|
import { CloseButton as M } from "./CloseButton.js";
|
|
14
|
-
import { D as
|
|
15
|
-
const
|
|
14
|
+
import { D as R } from "./ZTXFEM5L-WGHY_jqg.js";
|
|
15
|
+
const J = "_content_1mhgf_13", K = "_title_1mhgf_67", b = {
|
|
16
16
|
"asset-drawer": "_asset-drawer_1mhgf_3",
|
|
17
17
|
"content-wrapper": "_content-wrapper_1mhgf_13",
|
|
18
18
|
"content-max-width": "_content-max-width_1mhgf_24",
|
|
19
|
-
content:
|
|
19
|
+
content: J,
|
|
20
20
|
"asset-drawer-header": "_asset-drawer-header_1mhgf_39",
|
|
21
21
|
"back-button": "_back-button_1mhgf_57",
|
|
22
|
-
title:
|
|
22
|
+
title: K,
|
|
23
23
|
"icon-block": "_icon-block_1mhgf_72",
|
|
24
24
|
"size-md": "_size-md_1mhgf_84",
|
|
25
25
|
"size-sm": "_size-sm_1mhgf_87"
|
|
26
|
-
},
|
|
26
|
+
}, _ = o(b), T = z(
|
|
27
27
|
({
|
|
28
28
|
children: t,
|
|
29
|
-
className:
|
|
30
|
-
getPersistentElements:
|
|
31
|
-
|
|
29
|
+
className: s,
|
|
30
|
+
getPersistentElements: r,
|
|
31
|
+
hideOnInteractOutside: a = !0,
|
|
32
|
+
maxWidth: n,
|
|
32
33
|
store: c,
|
|
33
|
-
...
|
|
34
|
-
},
|
|
35
|
-
const l =
|
|
34
|
+
...k
|
|
35
|
+
}, d) => {
|
|
36
|
+
const l = f(
|
|
36
37
|
() => Array.from(
|
|
37
|
-
|
|
38
|
+
r ? r() : document.querySelectorAll("[data-wui-persistent]")
|
|
38
39
|
),
|
|
39
|
-
[
|
|
40
|
-
),
|
|
41
|
-
(
|
|
42
|
-
|
|
40
|
+
[r]
|
|
41
|
+
), g = f(
|
|
42
|
+
(m) => {
|
|
43
|
+
if (!a) return !1;
|
|
44
|
+
const N = m.target;
|
|
43
45
|
return !l().some(
|
|
44
|
-
(
|
|
46
|
+
(D) => D.contains(N)
|
|
45
47
|
);
|
|
46
48
|
},
|
|
47
|
-
[l]
|
|
48
|
-
), w = typeof
|
|
49
|
+
[l, a]
|
|
50
|
+
), w = typeof n == "number" ? `${n}px` : n;
|
|
49
51
|
return /* @__PURE__ */ e(
|
|
50
|
-
|
|
52
|
+
ae,
|
|
51
53
|
{
|
|
52
54
|
autoFocusOnShow: !1,
|
|
53
|
-
className:
|
|
55
|
+
className: _("asset-drawer", s),
|
|
54
56
|
getPersistentElements: l,
|
|
55
|
-
hideOnInteractOutside:
|
|
57
|
+
hideOnInteractOutside: g,
|
|
56
58
|
placement: "bottom",
|
|
57
|
-
ref:
|
|
59
|
+
ref: d,
|
|
58
60
|
store: c,
|
|
59
61
|
withBackdrop: !0,
|
|
60
|
-
...
|
|
61
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
62
|
+
...k,
|
|
63
|
+
children: /* @__PURE__ */ e("div", { className: _("content-wrapper"), children: /* @__PURE__ */ e(
|
|
62
64
|
"div",
|
|
63
65
|
{
|
|
64
|
-
className:
|
|
66
|
+
className: _("content-max-width"),
|
|
65
67
|
style: { "--assetDrawerContentMaxWidth": w },
|
|
66
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
68
|
+
children: /* @__PURE__ */ e("div", { className: _("content"), children: t })
|
|
67
69
|
}
|
|
68
70
|
) })
|
|
69
71
|
}
|
|
70
72
|
);
|
|
71
73
|
}
|
|
72
74
|
);
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
75
|
+
T.displayName = "AssetDrawer";
|
|
76
|
+
const L = o(b), F = ({ iconName: t, size: s = "md" }) => /* @__PURE__ */ e("div", { className: L("icon-block", `size-${s}`), children: /* @__PURE__ */ e(A, { className: "text-neutral-90", name: t, size: s }) });
|
|
77
|
+
F.displayName = "AssetDrawer.IconBlock";
|
|
78
|
+
const p = o(b), O = ({
|
|
77
79
|
action: t,
|
|
78
|
-
className:
|
|
79
|
-
iconName:
|
|
80
|
+
className: s,
|
|
81
|
+
iconName: r,
|
|
80
82
|
onBackButtonClick: a,
|
|
81
|
-
subtitle:
|
|
82
|
-
title:
|
|
83
|
-
}) => /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
!!a && /* @__PURE__ */ e(
|
|
86
|
-
!!
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */ e(
|
|
89
|
-
|
|
83
|
+
subtitle: n,
|
|
84
|
+
title: c
|
|
85
|
+
}) => /* @__PURE__ */ h("div", { className: p("asset-drawer-header", s), children: [
|
|
86
|
+
/* @__PURE__ */ h("div", { className: p("back-button"), children: [
|
|
87
|
+
!!a && /* @__PURE__ */ e(q, { onClick: a, variant: "tertiary", children: /* @__PURE__ */ e(A, { name: "arrow-left" }) }),
|
|
88
|
+
!!r && /* @__PURE__ */ e(F, { iconName: r }),
|
|
89
|
+
/* @__PURE__ */ h("div", { className: p("title"), children: [
|
|
90
|
+
/* @__PURE__ */ e(C, { as: "h3", className: "pr-xl", variant: "heading-lg", children: c }),
|
|
91
|
+
n
|
|
90
92
|
] })
|
|
91
93
|
] }),
|
|
92
|
-
t ? /* @__PURE__ */ e("div", { className:
|
|
94
|
+
t ? /* @__PURE__ */ e("div", { className: p("actions"), children: t }) : null
|
|
93
95
|
] });
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
root:
|
|
96
|
+
O.displayName = "AssetDrawer.Header";
|
|
97
|
+
const Q = "_root_iksk1_3", U = "_backdrop_iksk1_68", V = "_content_iksk1_85", X = "_footer_iksk1_94", Y = "_title_iksk1_108", i = {
|
|
98
|
+
root: Q,
|
|
97
99
|
"placement-bottom": "_placement-bottom_iksk1_30",
|
|
98
100
|
"placement-left": "_placement-left_iksk1_34",
|
|
99
101
|
"placement-right": "_placement-right_iksk1_38",
|
|
@@ -101,79 +103,98 @@ const J = "_root_iksk1_3", K = "_backdrop_iksk1_68", L = "_content_iksk1_85", Q
|
|
|
101
103
|
"size-sm": "_size-sm_iksk1_46",
|
|
102
104
|
"size-md": "_size-md_iksk1_49",
|
|
103
105
|
"size-lg": "_size-lg_iksk1_52",
|
|
104
|
-
backdrop:
|
|
106
|
+
backdrop: U,
|
|
105
107
|
"drawer-hide-on-interact-outside": "_drawer-hide-on-interact-outside_iksk1_79",
|
|
106
|
-
content:
|
|
107
|
-
footer:
|
|
108
|
-
title:
|
|
108
|
+
content: V,
|
|
109
|
+
footer: X,
|
|
110
|
+
title: Y,
|
|
109
111
|
"drawer-close": "_drawer-close_iksk1_120"
|
|
110
|
-
},
|
|
111
|
-
({ hideOnInteractOutside: t = !0, ...
|
|
112
|
+
}, Z = o(i), x = u(
|
|
113
|
+
({ hideOnInteractOutside: t = !0, ...s }, r) => /* @__PURE__ */ e(
|
|
112
114
|
"div",
|
|
113
115
|
{
|
|
114
|
-
className:
|
|
115
|
-
ref:
|
|
116
|
-
...
|
|
116
|
+
className: Z("backdrop", t && "drawer-hide-on-interact-outside"),
|
|
117
|
+
ref: r,
|
|
118
|
+
...s
|
|
117
119
|
}
|
|
118
120
|
)
|
|
119
121
|
);
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
+
x.displayName = "Drawer.Backdrop";
|
|
123
|
+
const G = o(i), y = ({ className: t }) => /* @__PURE__ */ e(
|
|
122
124
|
H,
|
|
123
125
|
{
|
|
124
|
-
render: (
|
|
126
|
+
render: (s) => /* @__PURE__ */ e(M, { className: G("drawer-close", t), ...s })
|
|
125
127
|
}
|
|
126
128
|
);
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
({ as: t, store:
|
|
129
|
+
y.displayName = "Drawer.Close";
|
|
130
|
+
const ee = o(i), W = u(({ className: t, ...s }, r) => /* @__PURE__ */ e("div", { className: ee("content", t), ref: r, ...s }));
|
|
131
|
+
W.displayName = "Drawer.Content";
|
|
132
|
+
const te = o(i), j = u(({ className: t, ...s }, r) => /* @__PURE__ */ e("div", { className: te("footer", t), ref: r, ...s }));
|
|
133
|
+
j.displayName = "Drawer.Footer";
|
|
134
|
+
const se = o(i), B = ({ children: t, className: s, ...r }) => /* @__PURE__ */ e("div", { className: se("title", s), ...r, children: /* @__PURE__ */ e(C, { as: "h3", className: "w-full", variant: "heading-lg", children: t }) });
|
|
135
|
+
B.displayName = "Drawer.Title";
|
|
136
|
+
const v = z(
|
|
137
|
+
({ as: t, store: s, ...r }, a) => /* @__PURE__ */ e(R, { ref: a, render: t ? /* @__PURE__ */ e(t, {}) : void 0, store: s, ...r })
|
|
136
138
|
);
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
+
v.displayName = "Drawer.Trigger";
|
|
140
|
+
const re = o(i), E = u(
|
|
139
141
|
({
|
|
140
142
|
children: t,
|
|
141
|
-
className:
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
className: s,
|
|
144
|
+
getPersistentElements: r,
|
|
145
|
+
hideOnInteractOutside: a = !0,
|
|
146
|
+
placement: n = "right",
|
|
144
147
|
size: c = "lg",
|
|
145
|
-
store:
|
|
146
|
-
withBackdrop:
|
|
148
|
+
store: k,
|
|
149
|
+
withBackdrop: d = !1,
|
|
147
150
|
withCloseButton: l = !0,
|
|
148
|
-
...
|
|
149
|
-
}, w) =>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
...g
|
|
152
|
+
}, w) => {
|
|
153
|
+
const m = f(
|
|
154
|
+
() => Array.from(
|
|
155
|
+
r ? r() : document.querySelectorAll("[data-wui-persistent]")
|
|
156
|
+
),
|
|
157
|
+
[r]
|
|
158
|
+
), N = f(
|
|
159
|
+
($) => {
|
|
160
|
+
if (!a) return !1;
|
|
161
|
+
const D = $.target;
|
|
162
|
+
return !m().some(
|
|
163
|
+
(I) => I.contains(D)
|
|
164
|
+
);
|
|
165
|
+
},
|
|
166
|
+
[m, a]
|
|
167
|
+
);
|
|
168
|
+
return /* @__PURE__ */ e(
|
|
169
|
+
S,
|
|
170
|
+
{
|
|
171
|
+
backdrop: d ? /* @__PURE__ */ e(x, { hideOnInteractOutside: a }) : !1,
|
|
172
|
+
getPersistentElements: m,
|
|
173
|
+
hideOnInteractOutside: N,
|
|
174
|
+
modal: d,
|
|
175
|
+
ref: w,
|
|
176
|
+
render: /* @__PURE__ */ e("div", { className: re("root", `placement-${n}`, `size-${c}`, s) }),
|
|
177
|
+
store: k,
|
|
178
|
+
...g,
|
|
179
|
+
children: /* @__PURE__ */ h(P, { children: [
|
|
180
|
+
l ? /* @__PURE__ */ e(y, {}) : null,
|
|
181
|
+
t
|
|
182
|
+
] })
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
165
186
|
);
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
Backdrop:
|
|
169
|
-
Close:
|
|
170
|
-
Content:
|
|
171
|
-
Footer:
|
|
172
|
-
Title:
|
|
173
|
-
Trigger:
|
|
174
|
-
}),
|
|
187
|
+
E.displayName = "Drawer";
|
|
188
|
+
const ae = Object.assign(E, {
|
|
189
|
+
Backdrop: x,
|
|
190
|
+
Close: y,
|
|
191
|
+
Content: W,
|
|
192
|
+
Footer: j,
|
|
193
|
+
Title: B,
|
|
194
|
+
Trigger: v
|
|
195
|
+
}), ke = Object.assign(T, { Header: O, Trigger: v });
|
|
175
196
|
export {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
ke as AssetDrawer,
|
|
198
|
+
ae as Drawer,
|
|
199
|
+
Ne as useDrawer
|
|
179
200
|
};
|
package/dist/Toast.js
CHANGED
|
@@ -31,9 +31,9 @@ let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySele
|
|
|
31
31
|
})(o));
|
|
32
32
|
if (!v[r]) {
|
|
33
33
|
let l = o !== e ? e : ((p) => {
|
|
34
|
-
let c, d,
|
|
35
|
-
for (; c = he.exec(p.replace(ve, "")); ) c[4] ?
|
|
36
|
-
return
|
|
34
|
+
let c, d, m = [{}];
|
|
35
|
+
for (; c = he.exec(p.replace(ve, "")); ) c[4] ? m.shift() : c[3] ? (d = c[3].replace(W, " ").trim(), m.unshift(m[0][d] = m[0][d] || {})) : m[0][c[1]] = c[2].replace(W, " ").trim();
|
|
36
|
+
return m[0];
|
|
37
37
|
})(e);
|
|
38
38
|
v[r] = w(i ? { ["@keyframes " + r]: l } : l, a ? "" : "." + r);
|
|
39
39
|
}
|
|
@@ -125,70 +125,70 @@ var Ne = (e) => typeof e == "function", D = (e, t) => Ne(e) ? e(t) : e, je = /*
|
|
|
125
125
|
}, Te = (e, t = "blank", a) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...a, id: (a == null ? void 0 : a.id) || je() }), $ = (e) => (t, a) => {
|
|
126
126
|
let s = Te(t, e, a);
|
|
127
127
|
return q(s.toasterId || ze(s.id))({ type: 2, toast: s }), s.id;
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
}, u = (e, t) => $("blank")(e, t);
|
|
129
|
+
u.error = $("error");
|
|
130
|
+
u.success = $("success");
|
|
131
|
+
u.loading = $("loading");
|
|
132
|
+
u.custom = $("custom");
|
|
133
|
+
u.dismiss = (e, t) => {
|
|
134
134
|
let a = { type: 3, toastId: e };
|
|
135
135
|
t ? q(t)(a) : oe(a);
|
|
136
136
|
};
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
u.dismissAll = (e) => u.dismiss(void 0, e);
|
|
138
|
+
u.remove = (e, t) => {
|
|
139
139
|
let a = { type: 4, toastId: e };
|
|
140
140
|
t ? q(t)(a) : oe(a);
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
let s =
|
|
142
|
+
u.removeAll = (e) => u.remove(void 0, e);
|
|
143
|
+
u.promise = (e, t, a) => {
|
|
144
|
+
let s = u.loading(t.loading, { ...a, ...a == null ? void 0 : a.loading });
|
|
145
145
|
return typeof e == "function" && (e = e()), e.then((i) => {
|
|
146
146
|
let o = t.success ? D(t.success, i) : void 0;
|
|
147
|
-
return o ?
|
|
147
|
+
return o ? u.success(o, { id: s, ...a, ...a == null ? void 0 : a.success }) : u.dismiss(s), i;
|
|
148
148
|
}).catch((i) => {
|
|
149
149
|
let o = t.error ? D(t.error, i) : void 0;
|
|
150
|
-
o ?
|
|
150
|
+
o ? u.error(o, { id: s, ...a, ...a == null ? void 0 : a.error }) : u.dismiss(s);
|
|
151
151
|
}), e;
|
|
152
152
|
};
|
|
153
153
|
var Oe = 1e3, De = (e, t = "default") => {
|
|
154
|
-
let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((d,
|
|
154
|
+
let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((d, m = Oe) => {
|
|
155
155
|
if (i.has(d)) return;
|
|
156
156
|
let g = setTimeout(() => {
|
|
157
157
|
i.delete(d), r({ type: 4, toastId: d });
|
|
158
|
-
},
|
|
158
|
+
}, m);
|
|
159
159
|
i.set(d, g);
|
|
160
160
|
}, []);
|
|
161
161
|
S(() => {
|
|
162
162
|
if (s) return;
|
|
163
|
-
let d = Date.now(),
|
|
163
|
+
let d = Date.now(), m = a.map((g) => {
|
|
164
164
|
if (g.duration === 1 / 0) return;
|
|
165
165
|
let E = (g.duration || 0) + g.pauseDuration - (d - g.createdAt);
|
|
166
166
|
if (E < 0) {
|
|
167
|
-
g.visible &&
|
|
167
|
+
g.visible && u.dismiss(g.id);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
|
-
return setTimeout(() =>
|
|
170
|
+
return setTimeout(() => u.dismiss(g.id, t), E);
|
|
171
171
|
});
|
|
172
172
|
return () => {
|
|
173
|
-
|
|
173
|
+
m.forEach((g) => g && clearTimeout(g));
|
|
174
174
|
};
|
|
175
175
|
}, [a, s, t]);
|
|
176
176
|
let r = j(q(t), [t]), n = j(() => {
|
|
177
177
|
r({ type: 5, time: Date.now() });
|
|
178
|
-
}, [r]), l = j((d,
|
|
179
|
-
r({ type: 1, toast: { id: d, height:
|
|
178
|
+
}, [r]), l = j((d, m) => {
|
|
179
|
+
r({ type: 1, toast: { id: d, height: m } });
|
|
180
180
|
}, [r]), p = j(() => {
|
|
181
181
|
s && r({ type: 6, time: Date.now() });
|
|
182
|
-
}, [s, r]), c = j((d,
|
|
183
|
-
let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } =
|
|
182
|
+
}, [s, r]), c = j((d, m) => {
|
|
183
|
+
let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } = m || {}, I = a.filter((b) => (b.position || G) === (d.position || G) && b.height), me = I.findIndex((b) => b.id === d.id), U = I.filter((b, P) => P < me && b.visible).length;
|
|
184
184
|
return I.filter((b) => b.visible).slice(...g ? [U + 1] : [0, U]).reduce((b, P) => b + (P.height || 0) + E, 0);
|
|
185
185
|
}, [a]);
|
|
186
186
|
return S(() => {
|
|
187
187
|
a.forEach((d) => {
|
|
188
188
|
if (d.dismissed) o(d.id, d.removeDelay);
|
|
189
189
|
else {
|
|
190
|
-
let
|
|
191
|
-
|
|
190
|
+
let m = i.get(d.id);
|
|
191
|
+
m && (clearTimeout(m), i.delete(d.id));
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
}, [a, o]), { toasts: a, handlers: { updateHeight: l, startPause: n, endPause: p, calculateOffset: c } };
|
|
@@ -396,7 +396,7 @@ var et = ({ id: e, className: t, style: a, onHeightUpdate: s, children: i }) =>
|
|
|
396
396
|
`, T = 16, ie = ({ reverseOrder: e, position: t = "top-center", toastOptions: a, gutter: s, children: i, toasterId: o, containerStyle: r, containerClassName: n }) => {
|
|
397
397
|
let { toasts: l, handlers: p } = De(a, o);
|
|
398
398
|
return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: T, left: T, right: T, bottom: T, pointerEvents: "none", ...r }, className: n, onMouseEnter: p.startPause, onMouseLeave: p.endPause }, l.map((c) => {
|
|
399
|
-
let d = c.position || t,
|
|
399
|
+
let d = c.position || t, m = p.calculateOffset(c, { reverseOrder: e, gutter: s, defaultPosition: t }), g = tt(d, m);
|
|
400
400
|
return f.createElement(et, { id: c.id, key: c.id, onHeightUpdate: p.updateHeight, className: c.visible ? at : "", style: g }, c.type === "custom" ? D(c.message, c) : i ? i(c) : f.createElement(Xe, { toast: c, position: d }));
|
|
401
401
|
}));
|
|
402
402
|
};
|
|
@@ -432,6 +432,7 @@ const rt = "_root_q0jyz_2", st = "_icon_q0jyz_17", ot = "_progress_q0jyz_40", it
|
|
|
432
432
|
"div",
|
|
433
433
|
{
|
|
434
434
|
className: N("root", `variant-${l}`, t),
|
|
435
|
+
"data-wui-persistent": !0,
|
|
435
436
|
onClick: (d) => d.stopPropagation(),
|
|
436
437
|
ref: c,
|
|
437
438
|
...p,
|
|
@@ -488,6 +489,7 @@ const z = L(H), ce = Z(
|
|
|
488
489
|
"div",
|
|
489
490
|
{
|
|
490
491
|
className: z("root", `variant-${n}`, t),
|
|
492
|
+
"data-wui-persistent": !0,
|
|
491
493
|
onClick: (c) => c.stopPropagation(),
|
|
492
494
|
ref: p,
|
|
493
495
|
...l,
|
|
@@ -533,11 +535,11 @@ const dt = L(H), pe = {
|
|
|
533
535
|
info: 7e3,
|
|
534
536
|
success: 7e3,
|
|
535
537
|
warning: 8e3
|
|
536
|
-
},
|
|
537
|
-
|
|
538
|
+
}, ue = ({ children: e, className: t, ...a }) => /* @__PURE__ */ y("p", { className: dt("title", t), ...a, children: e });
|
|
539
|
+
ue.displayName = "Toast.Title";
|
|
538
540
|
const xt = (e, t) => {
|
|
539
541
|
const s = ("type" in e ? e.type.displayName || e.type.name : void 0) === "Growl" ? "top-right" : "bottom-center", i = () => {
|
|
540
|
-
t != null && t.onClose && t.onClose(),
|
|
542
|
+
t != null && t.onClose && t.onClose(), u.dismiss(t == null ? void 0 : t.id);
|
|
541
543
|
}, o = e.props.variant || "info", r = {
|
|
542
544
|
duration: pt[o],
|
|
543
545
|
position: s,
|
|
@@ -549,7 +551,7 @@ const xt = (e, t) => {
|
|
|
549
551
|
},
|
|
550
552
|
...t
|
|
551
553
|
};
|
|
552
|
-
return
|
|
554
|
+
return u(
|
|
553
555
|
ge(e, { duration: r.duration, onClose: i }),
|
|
554
556
|
r
|
|
555
557
|
);
|
|
@@ -560,7 +562,7 @@ const wt = Object.assign(ie, {
|
|
|
560
562
|
GrowlAction: le,
|
|
561
563
|
Snackbar: ce,
|
|
562
564
|
SnackbarAction: de,
|
|
563
|
-
Title:
|
|
565
|
+
Title: ue
|
|
564
566
|
});
|
|
565
567
|
export {
|
|
566
568
|
pe as ICON,
|