welcome-ui 10.0.0-alpha.4 → 10.0.0-alpha.5
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/2W3RN7C5-DMC82gDP.js +61 -0
- package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
- package/dist/Accordion.js +19 -17
- package/dist/Alert.js +40 -31
- package/dist/AspectRatio.js +1 -0
- package/dist/Avatar.js +13 -11
- package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
- package/dist/Badge.js +1 -0
- package/dist/Breadcrumb.js +76 -71
- package/dist/Button.js +8 -6
- package/dist/ButtonGroup.js +6 -4
- package/dist/Card.css +1 -1
- package/dist/Card.js +68 -15
- package/dist/Checkbox.js +30 -29
- package/dist/CloseButton.js +7 -5
- package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
- package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
- package/dist/DatePicker.js +82 -78
- package/dist/DateTimePicker.js +22 -21
- package/dist/Drawer.js +101 -80
- package/dist/DropdownMenu.css +1 -1
- package/dist/DropdownMenu.js +889 -462
- package/dist/Field.js +1 -0
- package/dist/FieldGroup.js +9 -7
- package/dist/FileDrop.js +184 -176
- package/dist/FileUpload.js +43 -40
- package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
- package/dist/Hint.js +9 -7
- package/dist/Icon.js +6 -4
- package/dist/InputText.js +30 -28
- package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
- package/dist/Label.js +9 -7
- package/dist/Link.js +25 -21
- package/dist/Loader.js +12 -10
- package/dist/Logo.js +21 -13
- package/dist/Modal.js +145 -114
- package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
- package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
- package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
- package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
- package/dist/Pagination.js +39 -37
- package/dist/PasswordInput.js +20 -17
- package/dist/Popover.js +89 -72
- package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
- package/dist/Radio.js +20 -19
- package/dist/RadioGroup.js +29 -27
- package/dist/RadioTab.js +2 -1
- package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
- package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
- package/dist/Search.css +1 -1
- package/dist/Search.js +62 -60
- package/dist/Select.css +1 -1
- package/dist/Select.js +204 -202
- package/dist/Slider.js +66 -61
- package/dist/Stepper.js +34 -27
- package/dist/StickyNote.js +30 -23
- package/dist/Swiper.js +52 -50
- package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
- package/dist/Table.js +34 -21
- package/dist/Tabs.js +161 -152
- package/dist/Tag.css +1 -1
- package/dist/Tag.js +70 -65
- package/dist/Text.js +4 -2
- package/dist/Textarea.js +10 -8
- package/dist/TimePicker.js +22 -21
- package/dist/Toast.js +186 -177
- package/dist/Toggle.js +16 -14
- package/dist/Tooltip.js +29 -27
- package/dist/VariantIcon.js +7 -5
- package/dist/VisuallyHidden.js +8 -6
- package/dist/WelcomeLoader.js +3 -2
- package/dist/XCKGTAUF-CJwwVibW.js +25 -0
- package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
- package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
- package/dist/theme.js +1 -0
- package/dist/types/components/Alert/components/Title.d.ts +4 -1
- package/dist/types/components/Alert/index.d.ts +4 -1
- package/dist/types/components/Card/Body.d.ts +2 -3
- package/dist/types/components/Card/Footer.d.ts +6 -0
- package/dist/types/components/Card/Header.d.ts +5 -0
- package/dist/types/components/Card/index.d.ts +7 -8
- package/dist/types/components/Card/types.d.ts +16 -3
- package/dist/types/components/Checkbox/index.d.ts +1 -2
- package/dist/types/components/Checkbox/types.d.ts +3 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
- package/dist/types/components/Drawer/components/Close.d.ts +4 -1
- package/dist/types/components/Drawer/components/Title.d.ts +4 -1
- package/dist/types/components/Drawer/index.d.ts +12 -3
- package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
- package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/DropdownMenu/types.d.ts +26 -5
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
- package/dist/types/components/Loader/index.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
- package/dist/types/components/Modal/Assets/index.d.ts +16 -4
- package/dist/types/components/Modal/components/Close.d.ts +4 -1
- package/dist/types/components/Modal/index.d.ts +16 -4
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
- package/dist/types/components/Popover/Arrow.d.ts +4 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
- package/dist/types/components/RadioGroup/index.d.ts +4 -1
- package/dist/types/components/Stepper/index.d.ts +8 -2
- package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
- package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
- package/dist/types/components/StickyNote/index.d.ts +8 -2
- package/dist/types/components/Swiper/index.d.ts +4 -1
- package/dist/types/components/Table/index.d.ts +20 -5
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
- package/dist/types/components/Tag/types.d.ts +4 -2
- package/dist/types/components/Toast/index.d.ts +4 -1
- package/dist/utils.js +1 -0
- package/package.json +2 -2
- package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
- package/dist/SQZLCNLX-CUlXoT69.js +0 -82
- package/dist/XCKGTAUF-CahZE721.js +0 -25
package/dist/Swiper.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import './Swiper.css';
|
|
2
3
|
import { jsxs as le, jsx as A } from "react/jsx-runtime";
|
|
3
4
|
import { a as K, g as ce, c as ue } from "./index-PAaZGbyz.js";
|
|
4
5
|
import { useRef as se, useEffect as q, useState as Z, useMemo as de, Children as oe, cloneElement as pe, useCallback as X } from "react";
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Icon as
|
|
6
|
+
import { Button as re } from "./Button.js";
|
|
7
|
+
import { Icon as ne } from "./Icon.js";
|
|
7
8
|
import { u as fe } from "./use-viewport-CgrficYB.js";
|
|
8
9
|
var ee, ie;
|
|
9
10
|
function me() {
|
|
@@ -13,24 +14,24 @@ function me() {
|
|
|
13
14
|
return B.Date.now();
|
|
14
15
|
};
|
|
15
16
|
function P(e, o, a) {
|
|
16
|
-
var k, I, E, b, g, S, H = 0, M = !1,
|
|
17
|
+
var k, I, E, b, g, S, H = 0, M = !1, N = !1, U = !0;
|
|
17
18
|
if (typeof e != "function")
|
|
18
19
|
throw new TypeError(i);
|
|
19
|
-
o = u(o) || 0, _(a) && (M = !!a.leading,
|
|
20
|
-
function
|
|
20
|
+
o = u(o) || 0, _(a) && (M = !!a.leading, N = "maxWait" in a, E = N ? c(u(a.maxWait) || 0, o) : E, U = "trailing" in a ? !!a.trailing : U);
|
|
21
|
+
function j(t) {
|
|
21
22
|
var l = k, f = I;
|
|
22
23
|
return k = I = void 0, H = t, b = e.apply(f, l), b;
|
|
23
24
|
}
|
|
24
25
|
function Q(t) {
|
|
25
|
-
return H = t, g = setTimeout(x, o), M ?
|
|
26
|
+
return H = t, g = setTimeout(x, o), M ? j(t) : b;
|
|
26
27
|
}
|
|
27
28
|
function Y(t) {
|
|
28
29
|
var l = t - S, f = t - H, $ = o - l;
|
|
29
|
-
return
|
|
30
|
+
return N ? F($, E - f) : $;
|
|
30
31
|
}
|
|
31
32
|
function y(t) {
|
|
32
33
|
var l = t - S, f = t - H;
|
|
33
|
-
return S === void 0 || l >= o || l < 0 ||
|
|
34
|
+
return S === void 0 || l >= o || l < 0 || N && f >= E;
|
|
34
35
|
}
|
|
35
36
|
function x() {
|
|
36
37
|
var t = w();
|
|
@@ -39,25 +40,25 @@ function me() {
|
|
|
39
40
|
g = setTimeout(x, Y(t));
|
|
40
41
|
}
|
|
41
42
|
function O(t) {
|
|
42
|
-
return g = void 0, U && k ?
|
|
43
|
+
return g = void 0, U && k ? j(t) : (k = I = void 0, b);
|
|
43
44
|
}
|
|
44
45
|
function d() {
|
|
45
46
|
g !== void 0 && clearTimeout(g), H = 0, k = S = I = g = void 0;
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function r() {
|
|
48
49
|
return g === void 0 ? b : O(w());
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function n() {
|
|
51
52
|
var t = w(), l = y(t);
|
|
52
53
|
if (k = arguments, I = this, S = t, l) {
|
|
53
54
|
if (g === void 0)
|
|
54
55
|
return Q(S);
|
|
55
|
-
if (
|
|
56
|
-
return g = setTimeout(x, o),
|
|
56
|
+
if (N)
|
|
57
|
+
return g = setTimeout(x, o), j(S);
|
|
57
58
|
}
|
|
58
59
|
return g === void 0 && (g = setTimeout(x, o)), b;
|
|
59
60
|
}
|
|
60
|
-
return
|
|
61
|
+
return n.cancel = d, n.flush = r, n;
|
|
61
62
|
}
|
|
62
63
|
function _(e) {
|
|
63
64
|
var o = typeof e;
|
|
@@ -136,7 +137,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
136
137
|
return `${100 / i}%`;
|
|
137
138
|
const h = s * (i === 1 ? 4 : 2) / 16;
|
|
138
139
|
return `calc(${100 / i}% - ${h}rem)`;
|
|
139
|
-
}, R = ue(xe),
|
|
140
|
+
}, R = ue(xe), De = (i = {}) => {
|
|
140
141
|
const {
|
|
141
142
|
autoplay: s = !1,
|
|
142
143
|
centeredSlides: p = !1,
|
|
@@ -175,7 +176,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
175
176
|
withNavigation: C,
|
|
176
177
|
withPagination: c
|
|
177
178
|
};
|
|
178
|
-
},
|
|
179
|
+
}, He = ({ children: i, className: s, store: p, ...h }) => {
|
|
179
180
|
const {
|
|
180
181
|
autoplay: W,
|
|
181
182
|
centeredSlides: L,
|
|
@@ -198,15 +199,15 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
198
199
|
withDarkUI: o,
|
|
199
200
|
withNavigation: a,
|
|
200
201
|
withPagination: k
|
|
201
|
-
} = p, I = oe.toArray(i).length, E = Math.ceil(I / v), b = Array.from(Array(E).keys()), g = a.mobile || !1, S = a.desktop || !1, H = m === 0, M = m === b.length - 1,
|
|
202
|
-
const
|
|
202
|
+
} = p, I = oe.toArray(i).length, E = Math.ceil(I / v), b = Array.from(Array(E).keys()), g = a.mobile || !1, S = a.desktop || !1, H = m === 0, M = m === b.length - 1, N = oe.map(i, (d, r) => {
|
|
203
|
+
const n = `${D}-${r}`, t = r + 1, l = Math.ceil(t / v) - 1, f = M ? I - t >= v : l !== m;
|
|
203
204
|
return pe(d, {
|
|
204
205
|
...d.props,
|
|
205
206
|
"aria-hidden": f,
|
|
206
207
|
"aria-label": `${t} of ${I}`,
|
|
207
208
|
"aria-roledescription": "slide",
|
|
208
|
-
id:
|
|
209
|
-
key:
|
|
209
|
+
id: n,
|
|
210
|
+
key: n
|
|
210
211
|
});
|
|
211
212
|
}), U = L ? (
|
|
212
213
|
// if centeredSlides is true, we calculate which number is the middle page
|
|
@@ -214,29 +215,29 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
214
215
|
) : (
|
|
215
216
|
// if centeredSlides is false, we calculate on which page the number in firstSlideToShow props is
|
|
216
217
|
Math.ceil(T / v) - 1
|
|
217
|
-
),
|
|
218
|
+
), j = X(() => {
|
|
218
219
|
const d = c == null ? void 0 : c.current;
|
|
219
220
|
if (d && !_) {
|
|
220
|
-
const { offsetWidth:
|
|
221
|
+
const { offsetWidth: r, scrollLeft: n, scrollWidth: t } = d, l = !(n > e), f = !(t - (n + r) > e);
|
|
221
222
|
w(!l), P(!f);
|
|
222
223
|
} else
|
|
223
224
|
w(!0), P(!0);
|
|
224
225
|
}, [c, w, P, _, e]), Q = () => {
|
|
225
|
-
var
|
|
226
|
+
var r, n;
|
|
226
227
|
const d = c == null ? void 0 : c.current;
|
|
227
228
|
if (d) {
|
|
228
|
-
const { children: t, offsetWidth: l, scrollLeft: f, scrollWidth: $ } = d, ae = (
|
|
229
|
+
const { children: t, offsetWidth: l, scrollLeft: f, scrollWidth: $ } = d, ae = (n = (r = t == null ? void 0 : t[0]) == null ? void 0 : r.getBoundingClientRect()) == null ? void 0 : n.width, te = !($ - (f + l) > e) ? b.length - 1 : Math.round(f / ((ae + e) * v));
|
|
229
230
|
te !== m && F(te);
|
|
230
231
|
}
|
|
231
232
|
}, Y = ge(() => {
|
|
232
|
-
|
|
233
|
+
j(), Q();
|
|
233
234
|
}, 100), y = X(
|
|
234
|
-
(d,
|
|
235
|
+
(d, r = !1) => {
|
|
235
236
|
var l, f, $;
|
|
236
|
-
const
|
|
237
|
-
|
|
237
|
+
const n = c == null ? void 0 : c.current, t = ($ = (f = (l = n == null ? void 0 : n.children) == null ? void 0 : l[0]) == null ? void 0 : f.getBoundingClientRect()) == null ? void 0 : $.width;
|
|
238
|
+
n == null || n.scrollTo({
|
|
238
239
|
// We don't want to have a scroll effect when we first render the swiper
|
|
239
|
-
behavior:
|
|
240
|
+
behavior: r ? "auto" : "smooth",
|
|
240
241
|
left: d * (t + e) * v,
|
|
241
242
|
top: 0
|
|
242
243
|
});
|
|
@@ -253,15 +254,15 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
253
254
|
},
|
|
254
255
|
W ? G : null
|
|
255
256
|
), q(() => {
|
|
256
|
-
const d = (
|
|
257
|
-
|
|
257
|
+
const d = (r) => {
|
|
258
|
+
r.code === "ArrowLeft" && O(), r.code === "ArrowRight" && x();
|
|
258
259
|
};
|
|
259
260
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
260
261
|
}, [O, x]), q(() => {
|
|
261
262
|
y(U, !0);
|
|
262
263
|
}, []), q(() => {
|
|
263
|
-
|
|
264
|
-
}, [
|
|
264
|
+
j();
|
|
265
|
+
}, [j, i]), /* @__PURE__ */ le("div", { className: R("root", o && "dark", s), ...h, children: [
|
|
265
266
|
/* @__PURE__ */ A(
|
|
266
267
|
"ul",
|
|
267
268
|
{
|
|
@@ -284,11 +285,11 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
284
285
|
"--slideWithDesktopFullWidth": J(u.desktop + 2, e),
|
|
285
286
|
"--spaceBetween": `${e / 16}rem`
|
|
286
287
|
},
|
|
287
|
-
children:
|
|
288
|
+
children: N
|
|
288
289
|
}
|
|
289
290
|
),
|
|
290
291
|
/* @__PURE__ */ A(
|
|
291
|
-
|
|
292
|
+
re,
|
|
292
293
|
{
|
|
293
294
|
"aria-label": "Previous slide",
|
|
294
295
|
className: R(
|
|
@@ -302,11 +303,11 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
302
303
|
onClick: O,
|
|
303
304
|
size: C,
|
|
304
305
|
variant: o ? "primary-neutral" : "tertiary",
|
|
305
|
-
children: /* @__PURE__ */ A(
|
|
306
|
+
children: /* @__PURE__ */ A(ne, { name: "angle-left-b" })
|
|
306
307
|
}
|
|
307
308
|
),
|
|
308
309
|
/* @__PURE__ */ A(
|
|
309
|
-
|
|
310
|
+
re,
|
|
310
311
|
{
|
|
311
312
|
"aria-label": "Next slide",
|
|
312
313
|
className: R(
|
|
@@ -320,7 +321,7 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
320
321
|
onClick: x,
|
|
321
322
|
size: C,
|
|
322
323
|
variant: o ? "primary-neutral" : "tertiary",
|
|
323
|
-
children: /* @__PURE__ */ A(
|
|
324
|
+
children: /* @__PURE__ */ A(ne, { name: "angle-right-b" })
|
|
324
325
|
}
|
|
325
326
|
),
|
|
326
327
|
/* @__PURE__ */ A(
|
|
@@ -332,29 +333,30 @@ const ve = "_root_1uvp8_3", ke = "_dark_1uvp8_9", ye = "_bullet_1uvp8_9", Te = "
|
|
|
332
333
|
k.desktop && "pagination-desktop"
|
|
333
334
|
),
|
|
334
335
|
role: "tablist",
|
|
335
|
-
children: b.length > 1 && b.map((d,
|
|
336
|
-
const
|
|
337
|
-
"aria-controls": `${D}-${
|
|
338
|
-
"aria-label": `${
|
|
339
|
-
"aria-selected":
|
|
340
|
-
idx:
|
|
341
|
-
onClick: () => y(
|
|
336
|
+
children: b.length > 1 && b.map((d, r) => {
|
|
337
|
+
const n = {
|
|
338
|
+
"aria-controls": `${D}-${r}`,
|
|
339
|
+
"aria-label": `${r + 1} of ${b.length}`,
|
|
340
|
+
"aria-selected": r === m,
|
|
341
|
+
idx: r,
|
|
342
|
+
onClick: () => y(r),
|
|
342
343
|
role: "tab"
|
|
343
344
|
};
|
|
344
345
|
return /* @__PURE__ */ A(
|
|
345
346
|
"div",
|
|
346
347
|
{
|
|
347
|
-
className: R("bullet",
|
|
348
|
-
...
|
|
348
|
+
className: R("bullet", r === m && "bullet-active"),
|
|
349
|
+
...n
|
|
349
350
|
},
|
|
350
|
-
`bullet-${
|
|
351
|
+
`bullet-${r + 1}`
|
|
351
352
|
);
|
|
352
353
|
})
|
|
353
354
|
}
|
|
354
355
|
)
|
|
355
356
|
] });
|
|
356
357
|
};
|
|
358
|
+
He.displayName = "Swiper";
|
|
357
359
|
export {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
+
He as Swiper,
|
|
361
|
+
De as useSwiper
|
|
360
362
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { e as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import {
|
|
2
|
+
import { e as j, f as H, _ as R, a as b, c as Y, b as Z, i as ee, l as te, m as p, k as ne, d as O, v as oe, r as ae, z as S, A as se, B as re, C as ie } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
3
|
+
import { createContext as F, useRef as ue, useState as le, useMemo as ce } from "react";
|
|
4
|
+
import { b as I, m as de, o as me, t as fe, c as ve, s as y, d as V, e as pe, u as Se, a as P } from "./RTNCFSKZ-BywELldk.js";
|
|
5
5
|
import { flushSync as De } from "react-dom";
|
|
6
6
|
import { jsx as M } from "react/jsx-runtime";
|
|
7
|
-
var _ =
|
|
7
|
+
var _ = j(), N = _.useProviderContext, Ce = _.ContextProvider, xe = _.ScopedContextProvider, D = j(
|
|
8
8
|
[Ce],
|
|
9
9
|
[xe]
|
|
10
|
-
),
|
|
11
|
-
function
|
|
10
|
+
), Re = D.useScopedContext, Fe = D.useProviderContext, Ie = D.ContextProvider, ge = D.ScopedContextProvider, Me = F(void 0), Ne = F(void 0), Ee = "div";
|
|
11
|
+
function w(n, o) {
|
|
12
12
|
const e = setTimeout(o, n);
|
|
13
13
|
return () => clearTimeout(e);
|
|
14
14
|
}
|
|
@@ -18,7 +18,7 @@ function ye(n) {
|
|
|
18
18
|
});
|
|
19
19
|
return () => cancelAnimationFrame(o);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function T(...n) {
|
|
22
22
|
return n.join(", ").split(", ").reduce((o, e) => {
|
|
23
23
|
const t = e.endsWith("ms") ? 1 : 1e3, i = Number.parseFloat(e || "0s") * t;
|
|
24
24
|
return i > o ? i : o;
|
|
@@ -28,13 +28,13 @@ function Pe(n, o, e) {
|
|
|
28
28
|
return !e && o !== !1 && (!n || !!o);
|
|
29
29
|
}
|
|
30
30
|
var be = Y(function(o) {
|
|
31
|
-
var e = o, { store: t, alwaysVisible: i } = e, r =
|
|
31
|
+
var e = o, { store: t, alwaysVisible: i } = e, r = R(e, ["store", "alwaysVisible"]);
|
|
32
32
|
const a = N();
|
|
33
33
|
t = t || a, ee(
|
|
34
34
|
t,
|
|
35
35
|
process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
36
36
|
);
|
|
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 =
|
|
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 = I(t.disclosure, "contentElement");
|
|
38
38
|
p(() => {
|
|
39
39
|
s.current && (t == null || t.setContentElement(s.current));
|
|
40
40
|
}, [t]), p(() => {
|
|
@@ -57,41 +57,41 @@ var be = Y(function(o) {
|
|
|
57
57
|
const u = () => t == null ? void 0 : t.setState("animating", !1), v = () => De(u);
|
|
58
58
|
if (l === "leave" && c || l === "enter" && !c) return;
|
|
59
59
|
if (typeof d == "number")
|
|
60
|
-
return
|
|
60
|
+
return w(d, v);
|
|
61
61
|
const {
|
|
62
|
-
transitionDuration:
|
|
62
|
+
transitionDuration: $,
|
|
63
63
|
animationDuration: q,
|
|
64
|
-
transitionDelay:
|
|
65
|
-
animationDelay:
|
|
64
|
+
transitionDelay: U,
|
|
65
|
+
animationDelay: W
|
|
66
66
|
} = getComputedStyle(m), {
|
|
67
|
-
transitionDuration:
|
|
68
|
-
animationDuration:
|
|
69
|
-
transitionDelay:
|
|
70
|
-
animationDelay:
|
|
71
|
-
} = x ? getComputedStyle(x) : {},
|
|
72
|
-
L,
|
|
67
|
+
transitionDuration: z = "0",
|
|
68
|
+
animationDuration: B = "0",
|
|
69
|
+
transitionDelay: L = "0",
|
|
70
|
+
animationDelay: G = "0"
|
|
71
|
+
} = x ? getComputedStyle(x) : {}, J = T(
|
|
73
72
|
U,
|
|
74
|
-
K,
|
|
75
|
-
z
|
|
76
|
-
), J = H(
|
|
77
|
-
k,
|
|
78
|
-
q,
|
|
79
73
|
W,
|
|
74
|
+
L,
|
|
80
75
|
G
|
|
81
|
-
),
|
|
82
|
-
|
|
76
|
+
), K = T(
|
|
77
|
+
$,
|
|
78
|
+
q,
|
|
79
|
+
z,
|
|
80
|
+
B
|
|
81
|
+
), A = J + K;
|
|
82
|
+
if (!A) {
|
|
83
83
|
l === "enter" && t.setState("animated", !1), u();
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
const Q = 1e3 / 60, X = Math.max(
|
|
87
|
-
return
|
|
86
|
+
const Q = 1e3 / 60, X = Math.max(A - Q, 0);
|
|
87
|
+
return w(X, v);
|
|
88
88
|
}, [t, d, m, x, c, l]), r = ne(
|
|
89
89
|
r,
|
|
90
90
|
(u) => /* @__PURE__ */ M(ge, { value: t, children: u }),
|
|
91
91
|
[t]
|
|
92
92
|
);
|
|
93
|
-
const g = Pe(C, r.hidden, i), E = r.style,
|
|
94
|
-
return r =
|
|
93
|
+
const g = Pe(C, r.hidden, i), E = r.style, k = ce(() => g ? O(b({}, E), { display: "none" }) : E, [g, E]);
|
|
94
|
+
return r = O(b({
|
|
95
95
|
id: f,
|
|
96
96
|
"data-open": c || void 0,
|
|
97
97
|
"data-enter": l === "enter" || void 0,
|
|
@@ -99,19 +99,19 @@ var be = Y(function(o) {
|
|
|
99
99
|
hidden: g
|
|
100
100
|
}, r), {
|
|
101
101
|
ref: oe(f ? t.setContentElement : null, s, r.ref),
|
|
102
|
-
style:
|
|
102
|
+
style: k
|
|
103
103
|
}), ae(r);
|
|
104
|
-
}), _e =
|
|
104
|
+
}), _e = H(function(o) {
|
|
105
105
|
const e = be(o);
|
|
106
106
|
return Z(Ee, e);
|
|
107
|
-
}),
|
|
107
|
+
}), ke = H(function(o) {
|
|
108
108
|
var e = o, {
|
|
109
109
|
unmountOnHide: t
|
|
110
|
-
} = e, i =
|
|
110
|
+
} = e, i = R(e, [
|
|
111
111
|
"unmountOnHide"
|
|
112
112
|
]);
|
|
113
113
|
const r = N(), a = i.store || r;
|
|
114
|
-
return
|
|
114
|
+
return I(
|
|
115
115
|
a,
|
|
116
116
|
(f) => !t || (f == null ? void 0 : f.mounted)
|
|
117
117
|
) === !1 ? null : /* @__PURE__ */ M(_e, b({}, i));
|
|
@@ -137,7 +137,7 @@ function he(n = {}) {
|
|
|
137
137
|
}, a = ve(r, o);
|
|
138
138
|
return y(
|
|
139
139
|
a,
|
|
140
|
-
() =>
|
|
140
|
+
() => V(a, ["animated", "animating"], (s) => {
|
|
141
141
|
s.animated || a.setState("animating", !1);
|
|
142
142
|
})
|
|
143
143
|
), y(
|
|
@@ -147,7 +147,7 @@ function he(n = {}) {
|
|
|
147
147
|
})
|
|
148
148
|
), y(
|
|
149
149
|
a,
|
|
150
|
-
() =>
|
|
150
|
+
() => V(a, ["open", "animating"], (s) => {
|
|
151
151
|
a.setState("mounted", s.open || s.animating);
|
|
152
152
|
})
|
|
153
153
|
), se(re({}, a), {
|
|
@@ -161,25 +161,25 @@ function he(n = {}) {
|
|
|
161
161
|
setDisclosureElement: (s) => a.setState("disclosureElement", s)
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ae(n, o, e) {
|
|
165
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
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function $e(n = {}) {
|
|
168
168
|
const [o, e] = Se(he, n);
|
|
169
|
-
return
|
|
169
|
+
return Ae(o, e, n);
|
|
170
170
|
}
|
|
171
171
|
export {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
ke as D,
|
|
173
|
+
Re as a,
|
|
174
|
+
Fe as b,
|
|
175
175
|
N as c,
|
|
176
176
|
be as d,
|
|
177
177
|
he as e,
|
|
178
|
-
|
|
178
|
+
Ae as f,
|
|
179
179
|
ge as g,
|
|
180
180
|
Me as h,
|
|
181
181
|
Pe as i,
|
|
182
182
|
Ne as j,
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
Ie as k,
|
|
184
|
+
$e as u
|
|
185
185
|
};
|
package/dist/Table.js
CHANGED
|
@@ -1,33 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import './Table.css';
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as v } from "react";
|
|
5
|
+
import { c as T } from "./index-PAaZGbyz.js";
|
|
6
|
+
const m = "_root_10vth_2", h = "_content_10vth_6", p = "_clickable_10vth_48", y = "_indent_10vth_70", N = {
|
|
7
|
+
root: m,
|
|
8
|
+
content: h,
|
|
9
|
+
clickable: p,
|
|
9
10
|
"variant-danger": "_variant-danger_10vth_54",
|
|
10
11
|
"variant-warning": "_variant-warning_10vth_58",
|
|
11
12
|
"variant-success": "_variant-success_10vth_62",
|
|
12
13
|
"variant-info": "_variant-info_10vth_66",
|
|
13
|
-
indent:
|
|
14
|
-
},
|
|
15
|
-
({ children: t, className:
|
|
16
|
-
)
|
|
14
|
+
indent: y
|
|
15
|
+
}, s = T(N), o = v(
|
|
16
|
+
({ children: t, className: n, indent: e, ...r }, b) => /* @__PURE__ */ a("div", { className: s("root", n), ref: b, ...r, children: /* @__PURE__ */ a("div", { className: s("content", e && "indent"), children: /* @__PURE__ */ a("table", { children: t }) }) })
|
|
17
|
+
);
|
|
18
|
+
o.displayName = "Table";
|
|
19
|
+
const c = (t) => /* @__PURE__ */ a("tbody", { ...t });
|
|
20
|
+
c.displayName = "Table.Tbody";
|
|
21
|
+
const i = (t) => /* @__PURE__ */ a("th", { ...t });
|
|
22
|
+
i.displayName = "Table.Th";
|
|
23
|
+
const l = (t) => /* @__PURE__ */ a("thead", { ...t });
|
|
24
|
+
l.displayName = "Table.Thead";
|
|
25
|
+
const d = (t) => /* @__PURE__ */ a("td", { ...t });
|
|
26
|
+
d.displayName = "Table.Td";
|
|
27
|
+
const _ = ({ className: t, onClick: n, variant: e, ...r }) => /* @__PURE__ */ a(
|
|
17
28
|
"tr",
|
|
18
29
|
{
|
|
19
|
-
className:
|
|
20
|
-
onClick:
|
|
30
|
+
className: s(e && `variant-${e}`, !!n && "clickable", t),
|
|
31
|
+
onClick: n,
|
|
21
32
|
...r
|
|
22
33
|
}
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
);
|
|
35
|
+
_.displayName = "Table.Tr";
|
|
36
|
+
const k = Object.assign(o, {
|
|
37
|
+
Tbody: c,
|
|
38
|
+
Td: d,
|
|
39
|
+
Th: i,
|
|
40
|
+
Thead: l,
|
|
41
|
+
Tr: _
|
|
29
42
|
});
|
|
30
43
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
k as Table,
|
|
45
|
+
o as TableComponent
|
|
33
46
|
};
|