welcome-ui 9.0.0-alpha.4 → 9.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 +47 -3
- package/dist/2W3RN7C5-bkX-rIa3.js +61 -0
- package/dist/4I4MLMKD-BLxAidnq.js +43 -0
- package/dist/Accordion.js +6 -6
- package/dist/Alert.js +1 -1
- package/dist/AspectRatio.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/{4CMBR7SL-Dhp8uJop.js → B7UTNDHN-BlIblHCu.js} +59 -59
- package/dist/Badge.js +1 -1
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.js +27 -27
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.js +1 -1
- package/dist/Card.js +1 -1
- package/dist/Checkbox.css +1 -1
- package/dist/Checkbox.js +22 -22
- package/dist/CloseButton.js +3 -3
- package/dist/{SYRFVSLH-CHNUB1rW.js → DSAASPLT-BaaCUKsb.js} +7 -7
- package/dist/DatePicker.js +5 -5
- package/dist/DateTimePicker.js +2 -2
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.js +67 -67
- package/dist/DropdownMenu.js +261 -259
- package/dist/Field.js +1 -1
- package/dist/FieldGroup.js +1 -1
- package/dist/FileDrop.js +194 -221
- package/dist/FileUpload.js +2 -2
- package/dist/GVVKDT6A-bET6V7Py.js +724 -0
- package/dist/Hint.js +1 -1
- package/dist/{Icon-BisRi8B3.js → Icon-EG7O4YwD.js} +1 -1
- package/dist/Icon.js +12 -12
- package/dist/InputText.js +1 -1
- package/dist/{ASMQKSDT-SH1qSiMi.js → KPUWHTQJ-D2TPji47.js} +30 -30
- package/dist/Label.js +3 -3
- package/dist/Link.css +1 -1
- package/dist/Link.js +27 -27
- package/dist/Loader.js +1 -1
- package/dist/Logo.js +1 -1
- package/dist/Modal.js +10 -10
- package/dist/{JC64G2H7-DPy9R0De.js → NI3IVY7K-Ztb3-XAv.js} +571 -571
- package/dist/{P4IRICAX-7kH4HzWI.js → NMGNQVTG-C6TqBngP.js} +5 -5
- package/dist/{LVA2YJMS-NUHCRwFZ.js → OE2EFRVA-C3721cM3.js} +316 -315
- package/dist/{ITI7HKP4-C5xLpoVY.js → OLVWQA7U-DysaSaZj.js} +59 -59
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.js +81 -73
- package/dist/PasswordInput.js +17 -18
- package/dist/Popover.js +14 -14
- package/dist/{YV4JVR4I-CVFstk2K.js → RTNCFSKZ-qpPg689E.js} +75 -73
- package/dist/Radio.css +1 -1
- package/dist/Radio.js +29 -29
- package/dist/RadioGroup.js +21 -21
- package/dist/RadioTab.js +2 -2
- package/dist/{P2CTZE2T-D1TepwxQ.js → SBSPVDDI-DJKkC1eb.js} +43 -43
- package/dist/{NLEBE274-B4zy25kL.js → SQZLCNLX-CHDXnZ16.js} +16 -16
- package/dist/Search.js +2 -2
- package/dist/Select.js +170 -181
- package/dist/Slider.js +1 -1
- package/dist/Swiper.css +1 -1
- package/dist/Swiper.js +151 -151
- package/dist/{VGCJ63VH-CVhs4PYt.js → T22PY7TE-C1N0q8Kn.js} +109 -109
- package/dist/Table.js +1 -1
- package/dist/Tabs.js +303 -308
- package/dist/Tag.js +3 -3
- package/dist/Text.js +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/TimePicker.js +2 -2
- package/dist/Toast.js +1 -1
- package/dist/Toggle.js +2 -2
- package/dist/Tooltip.js +72 -72
- package/dist/VariantIcon.js +3 -3
- package/dist/WelcomeLoader.js +1 -1
- package/dist/XCKGTAUF-DkxWCbaW.js +25 -0
- package/dist/Y67KZUMI-DFEgrUv2.js +15 -0
- package/dist/{AXB53BZF-BHeessqV.js → ZTXFEM5L-CkrIQCN1.js} +7 -7
- package/dist/{field-icon-size-Du58qHNC.js → field-icon-size-Z5NulTSk.js} +216 -224
- package/dist/{index-5rXezknO.js → index-BC2bF45u.js} +1 -1
- package/dist/{index-C8GsqBDe.js → index-BeetbagJ.js} +1 -1
- package/dist/{index-BJLXLdM3.js → index-Bt79XJ8R.js} +1 -1
- package/dist/{index-Dcq5gh3E.js → index-BtwrJ6N4.js} +1 -1
- package/dist/{index-DL4-ut3P.js → index-CCASZBtz.js} +1 -1
- package/dist/{index-lbUBMgHp.js → index-CPqDZeah.js} +2 -2
- package/dist/{index-CTgip19b.js → index-CQEPCbEE.js} +1 -1
- package/dist/{index-CnxSNAPH.js → index-Crpe9CvH.js} +1 -1
- package/dist/{index-CWVOLBDY.js → index-D5a8Oe6k.js} +1 -1
- package/dist/{index-C1jjVTAc.js → index-D8dq-I5s.js} +1 -1
- package/dist/{index-Cvtm6uuS.js → index-DkwTwo3z.js} +1 -1
- package/dist/{index-BG2aV9o8.js → index-DnO8yBVT.js} +1 -1
- package/dist/index.css +0 -0
- package/dist/tslib.es6-DpB4Y59c.js +683 -0
- package/dist/types/components/Pagination/index.d.ts +1 -2
- package/dist/types/components/Pagination/types.d.ts +5 -2
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +1 -1
- package/dist/types/components/PasswordInput/types.d.ts +1 -1
- package/dist/types/components/Tabs/components/TabList/index.d.ts +1 -1
- package/dist/types/components/Tabs/index.d.ts +1 -1
- package/dist/types/components/Tabs/types.d.ts +1 -2
- package/dist/types/components/Tabs/utils.d.ts +1 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/theme/index.d.ts +0 -0
- package/dist/types/utils/useForkRef.d.ts +7 -1
- package/dist/useForkRef-D807AV7D.js +22 -0
- package/dist/{utils-BNMgUIHQ.js → utils-BpbIqM56.js} +1 -1
- package/dist/utils.js +2 -2
- package/package.json +5 -5
- package/dist/BYC7LY2E-DbSoi9cN.js +0 -673
- package/dist/KUU7WJ55-CsIy9XMu.js +0 -61
- package/dist/MTZPJQMC-D_TnSwZf.js +0 -15
- package/dist/QYJ6MIDR-Dm7lYMh6.js +0 -43
- package/dist/X5NMLKT6-PeY306ft.js +0 -25
- package/dist/index--0U5Rubs.js +0 -644
- /package/dist/{index-PAaZGbyz.js → index-CdiHdiVB.js} +0 -0
|
@@ -1,185 +1,185 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { e as T, f as j, _ as I, a as b, c as Y, b as Z, i as ee, w as te, M as p, x as ne, d as w, p as oe, r as ae, H as S, G as se, I as re, K as ie } from "./OE2EFRVA-C3721cM3.js";
|
|
3
|
+
import { createContext as M, useRef as ue, useState as le, useMemo as ce } from "react";
|
|
4
|
+
import { u as R, m as de, o as me, t as fe, c as ve, s as y, a as A, e as pe, b as Se, d as P } from "./RTNCFSKZ-qpPg689E.js";
|
|
5
5
|
import { flushSync as De } from "react-dom";
|
|
6
|
-
import { jsx as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ee(n, o);
|
|
13
|
-
const e = o == null ? void 0 : o.getState(), t = p(
|
|
14
|
-
n.open,
|
|
15
|
-
e == null ? void 0 : e.open,
|
|
16
|
-
n.defaultOpen,
|
|
17
|
-
!1
|
|
18
|
-
), i = p(n.animated, e == null ? void 0 : e.animated, !1), r = {
|
|
19
|
-
open: t,
|
|
20
|
-
animated: i,
|
|
21
|
-
animating: !!i && t,
|
|
22
|
-
mounted: t,
|
|
23
|
-
contentElement: p(e == null ? void 0 : e.contentElement, null),
|
|
24
|
-
disclosureElement: p(e == null ? void 0 : e.disclosureElement, null)
|
|
25
|
-
}, a = te(r, o);
|
|
26
|
-
return E(
|
|
27
|
-
a,
|
|
28
|
-
() => A(a, ["animated", "animating"], (s) => {
|
|
29
|
-
s.animated || a.setState("animating", !1);
|
|
30
|
-
})
|
|
31
|
-
), E(
|
|
32
|
-
a,
|
|
33
|
-
() => ne(a, ["open"], () => {
|
|
34
|
-
a.getState().animated && a.setState("animating", !0);
|
|
35
|
-
})
|
|
36
|
-
), E(
|
|
37
|
-
a,
|
|
38
|
-
() => A(a, ["open", "animating"], (s) => {
|
|
39
|
-
a.setState("mounted", s.open || s.animating);
|
|
40
|
-
})
|
|
41
|
-
), ae(se({}, a), {
|
|
42
|
-
disclosure: n.disclosure,
|
|
43
|
-
setOpen: (s) => a.setState("open", s),
|
|
44
|
-
show: () => a.setState("open", !0),
|
|
45
|
-
hide: () => a.setState("open", !1),
|
|
46
|
-
toggle: () => a.setState("open", (s) => !s),
|
|
47
|
-
stopAnimation: () => a.setState("animating", !1),
|
|
48
|
-
setContentElement: (s) => a.setState("contentElement", s),
|
|
49
|
-
setDisclosureElement: (s) => a.setState("disclosureElement", s)
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function xe(n, o, e) {
|
|
53
|
-
return re(o, [e.store, e.disclosure]), P(n, e, "open", "setOpen"), P(n, e, "mounted", "setMounted"), P(n, e, "animated"), Object.assign(n, { disclosure: e.disclosure });
|
|
54
|
-
}
|
|
55
|
-
function Me(n = {}) {
|
|
56
|
-
const [o, e] = oe(Ce, n);
|
|
57
|
-
return xe(o, e, n);
|
|
58
|
-
}
|
|
59
|
-
var b = H(), N = b.useProviderContext, ge = b.ContextProvider, ye = b.ScopedContextProvider, D = H(
|
|
60
|
-
[ge],
|
|
61
|
-
[ye]
|
|
62
|
-
), Re = D.useScopedContext, Fe = D.useProviderContext, Ie = D.ContextProvider, Ee = D.ScopedContextProvider, Ne = F(void 0), $e = F(void 0), Pe = "div";
|
|
63
|
-
function w(n, o) {
|
|
6
|
+
import { jsx as F } from "react/jsx-runtime";
|
|
7
|
+
var _ = T(), N = _.useProviderContext, Ce = _.ContextProvider, xe = _.ScopedContextProvider, D = T(
|
|
8
|
+
[Ce],
|
|
9
|
+
[xe]
|
|
10
|
+
), Ie = D.useScopedContext, Me = D.useProviderContext, Re = D.ContextProvider, ge = D.ScopedContextProvider, Fe = M(void 0), Ne = M(void 0), Ee = "div";
|
|
11
|
+
function V(n, o) {
|
|
64
12
|
const e = setTimeout(o, n);
|
|
65
13
|
return () => clearTimeout(e);
|
|
66
14
|
}
|
|
67
|
-
function
|
|
15
|
+
function ye(n) {
|
|
68
16
|
let o = requestAnimationFrame(() => {
|
|
69
17
|
o = requestAnimationFrame(n);
|
|
70
18
|
});
|
|
71
19
|
return () => cancelAnimationFrame(o);
|
|
72
20
|
}
|
|
73
|
-
function
|
|
21
|
+
function H(...n) {
|
|
74
22
|
return n.join(", ").split(", ").reduce((o, e) => {
|
|
75
23
|
const t = e.endsWith("ms") ? 1 : 1e3, i = Number.parseFloat(e || "0s") * t;
|
|
76
24
|
return i > o ? i : o;
|
|
77
25
|
}, 0);
|
|
78
26
|
}
|
|
79
|
-
function
|
|
27
|
+
function Pe(n, o, e) {
|
|
80
28
|
return !e && o !== !1 && (!n || !!o);
|
|
81
29
|
}
|
|
82
|
-
var
|
|
83
|
-
var e = o, { store: t, alwaysVisible: i } = e, r =
|
|
30
|
+
var be = Y(function(o) {
|
|
31
|
+
var e = o, { store: t, alwaysVisible: i } = e, r = I(e, ["store", "alwaysVisible"]);
|
|
84
32
|
const a = N();
|
|
85
|
-
t = t || a,
|
|
33
|
+
t = t || a, ee(
|
|
86
34
|
t,
|
|
87
35
|
process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
88
36
|
);
|
|
89
|
-
const s =
|
|
90
|
-
|
|
37
|
+
const s = ue(null), f = te(r.id), [l, h] = le(null), c = t.useState("open"), C = t.useState("mounted"), d = t.useState("animated"), m = t.useState("contentElement"), x = R(t.disclosure, "contentElement");
|
|
38
|
+
p(() => {
|
|
91
39
|
s.current && (t == null || t.setContentElement(s.current));
|
|
92
|
-
}, [t]),
|
|
40
|
+
}, [t]), p(() => {
|
|
93
41
|
let u;
|
|
94
42
|
return t == null || t.setState("animated", (v) => (u = v, !0)), () => {
|
|
95
43
|
u !== void 0 && (t == null || t.setState("animated", u));
|
|
96
44
|
};
|
|
97
|
-
}, [t]),
|
|
45
|
+
}, [t]), p(() => {
|
|
98
46
|
if (d) {
|
|
99
47
|
if (!(m != null && m.isConnected)) {
|
|
100
48
|
h(null);
|
|
101
49
|
return;
|
|
102
50
|
}
|
|
103
|
-
return
|
|
51
|
+
return ye(() => {
|
|
104
52
|
h(c ? "enter" : C ? "leave" : null);
|
|
105
53
|
});
|
|
106
54
|
}
|
|
107
|
-
}, [d, m, c, C]),
|
|
55
|
+
}, [d, m, c, C]), p(() => {
|
|
108
56
|
if (!t || !d || !l || !m) return;
|
|
109
57
|
const u = () => t == null ? void 0 : t.setState("animating", !1), v = () => De(u);
|
|
110
58
|
if (l === "leave" && c || l === "enter" && !c) return;
|
|
111
59
|
if (typeof d == "number")
|
|
112
|
-
return
|
|
60
|
+
return V(d, v);
|
|
113
61
|
const {
|
|
114
62
|
transitionDuration: k,
|
|
115
63
|
animationDuration: q,
|
|
116
64
|
transitionDelay: U,
|
|
117
65
|
animationDelay: W
|
|
118
66
|
} = getComputedStyle(m), {
|
|
119
|
-
transitionDuration:
|
|
120
|
-
animationDuration:
|
|
67
|
+
transitionDuration: G = "0",
|
|
68
|
+
animationDuration: K = "0",
|
|
121
69
|
transitionDelay: L = "0",
|
|
122
|
-
animationDelay:
|
|
123
|
-
} = x ? getComputedStyle(x) : {},
|
|
70
|
+
animationDelay: z = "0"
|
|
71
|
+
} = x ? getComputedStyle(x) : {}, B = H(
|
|
124
72
|
U,
|
|
125
73
|
W,
|
|
126
74
|
L,
|
|
127
|
-
|
|
128
|
-
),
|
|
75
|
+
z
|
|
76
|
+
), J = H(
|
|
129
77
|
k,
|
|
130
78
|
q,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
), O =
|
|
79
|
+
G,
|
|
80
|
+
K
|
|
81
|
+
), O = B + J;
|
|
134
82
|
if (!O) {
|
|
135
83
|
l === "enter" && t.setState("animated", !1), u();
|
|
136
84
|
return;
|
|
137
85
|
}
|
|
138
86
|
const Q = 1e3 / 60, X = Math.max(O - Q, 0);
|
|
139
|
-
return
|
|
140
|
-
}, [t, d, m, x, c, l]), r =
|
|
87
|
+
return V(X, v);
|
|
88
|
+
}, [t, d, m, x, c, l]), r = ne(
|
|
141
89
|
r,
|
|
142
|
-
(u) => /* @__PURE__ */
|
|
90
|
+
(u) => /* @__PURE__ */ F(ge, { value: t, children: u }),
|
|
143
91
|
[t]
|
|
144
92
|
);
|
|
145
|
-
const g =
|
|
146
|
-
return r =
|
|
93
|
+
const g = Pe(C, r.hidden, i), E = r.style, $ = ce(() => g ? w(b({}, E), { display: "none" }) : E, [g, E]);
|
|
94
|
+
return r = w(b({
|
|
147
95
|
id: f,
|
|
148
96
|
"data-open": c || void 0,
|
|
149
97
|
"data-enter": l === "enter" || void 0,
|
|
150
98
|
"data-leave": l === "leave" || void 0,
|
|
151
99
|
hidden: g
|
|
152
100
|
}, r), {
|
|
153
|
-
ref:
|
|
101
|
+
ref: oe(f ? t.setContentElement : null, s, r.ref),
|
|
154
102
|
style: $
|
|
155
|
-
}),
|
|
156
|
-
}),
|
|
157
|
-
const e =
|
|
158
|
-
return
|
|
159
|
-
}),
|
|
103
|
+
}), ae(r);
|
|
104
|
+
}), _e = j(function(o) {
|
|
105
|
+
const e = be(o);
|
|
106
|
+
return Z(Ee, e);
|
|
107
|
+
}), $e = j(function(o) {
|
|
160
108
|
var e = o, {
|
|
161
109
|
unmountOnHide: t
|
|
162
|
-
} = e, i =
|
|
110
|
+
} = e, i = I(e, [
|
|
163
111
|
"unmountOnHide"
|
|
164
112
|
]);
|
|
165
113
|
const r = N(), a = i.store || r;
|
|
166
|
-
return
|
|
114
|
+
return R(
|
|
167
115
|
a,
|
|
168
116
|
(f) => !t || (f == null ? void 0 : f.mounted)
|
|
169
|
-
) === !1 ? null : /* @__PURE__ */
|
|
117
|
+
) === !1 ? null : /* @__PURE__ */ F(_e, b({}, i));
|
|
170
118
|
});
|
|
119
|
+
function he(n = {}) {
|
|
120
|
+
const o = de(
|
|
121
|
+
n.store,
|
|
122
|
+
me(n.disclosure, ["contentElement", "disclosureElement"])
|
|
123
|
+
);
|
|
124
|
+
fe(n, o);
|
|
125
|
+
const e = o == null ? void 0 : o.getState(), t = S(
|
|
126
|
+
n.open,
|
|
127
|
+
e == null ? void 0 : e.open,
|
|
128
|
+
n.defaultOpen,
|
|
129
|
+
!1
|
|
130
|
+
), i = S(n.animated, e == null ? void 0 : e.animated, !1), r = {
|
|
131
|
+
open: t,
|
|
132
|
+
animated: i,
|
|
133
|
+
animating: !!i && t,
|
|
134
|
+
mounted: t,
|
|
135
|
+
contentElement: S(e == null ? void 0 : e.contentElement, null),
|
|
136
|
+
disclosureElement: S(e == null ? void 0 : e.disclosureElement, null)
|
|
137
|
+
}, a = ve(r, o);
|
|
138
|
+
return y(
|
|
139
|
+
a,
|
|
140
|
+
() => A(a, ["animated", "animating"], (s) => {
|
|
141
|
+
s.animated || a.setState("animating", !1);
|
|
142
|
+
})
|
|
143
|
+
), y(
|
|
144
|
+
a,
|
|
145
|
+
() => pe(a, ["open"], () => {
|
|
146
|
+
a.getState().animated && a.setState("animating", !0);
|
|
147
|
+
})
|
|
148
|
+
), y(
|
|
149
|
+
a,
|
|
150
|
+
() => A(a, ["open", "animating"], (s) => {
|
|
151
|
+
a.setState("mounted", s.open || s.animating);
|
|
152
|
+
})
|
|
153
|
+
), se(re({}, a), {
|
|
154
|
+
disclosure: n.disclosure,
|
|
155
|
+
setOpen: (s) => a.setState("open", s),
|
|
156
|
+
show: () => a.setState("open", !0),
|
|
157
|
+
hide: () => a.setState("open", !1),
|
|
158
|
+
toggle: () => a.setState("open", (s) => !s),
|
|
159
|
+
stopAnimation: () => a.setState("animating", !1),
|
|
160
|
+
setContentElement: (s) => a.setState("contentElement", s),
|
|
161
|
+
setDisclosureElement: (s) => a.setState("disclosureElement", s)
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function Oe(n, o, e) {
|
|
165
|
+
return ie(o, [e.store, e.disclosure]), P(n, e, "open", "setOpen"), P(n, e, "mounted", "setMounted"), P(n, e, "animated"), Object.assign(n, { disclosure: e.disclosure });
|
|
166
|
+
}
|
|
167
|
+
function ke(n = {}) {
|
|
168
|
+
const [o, e] = Se(he, n);
|
|
169
|
+
return Oe(o, e, n);
|
|
170
|
+
}
|
|
171
171
|
export {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
$e as D,
|
|
173
|
+
Ie as a,
|
|
174
|
+
Me as b,
|
|
175
175
|
N as c,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
be as d,
|
|
177
|
+
he as e,
|
|
178
|
+
Oe as f,
|
|
179
|
+
ge as g,
|
|
180
|
+
Fe as h,
|
|
181
|
+
Pe as i,
|
|
182
|
+
Ne as j,
|
|
183
|
+
Re as k,
|
|
184
|
+
ke as u
|
|
185
185
|
};
|
package/dist/Table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as s } from "react";
|
|
4
|
-
import { c as i } from "./index-
|
|
4
|
+
import { c as i } from "./index-CdiHdiVB.js";
|
|
5
5
|
const _ = "_root_8bmny_2", b = "_content_8bmny_6", l = "_clickable_8bmny_48", m = "_indent_8bmny_70", d = {
|
|
6
6
|
root: _,
|
|
7
7
|
content: b,
|