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
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as te, g as v, s as re, i as
|
|
3
|
-
import { c as ie, _ as
|
|
4
|
-
import { f as Ie, r as Se } from "./B7UTNDHN-
|
|
5
|
-
import { useRef as H, useEffect as V, useState as Fe, useCallback as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { P as be, b as Ke } from "./Y67KZUMI-
|
|
8
|
-
var
|
|
9
|
-
function
|
|
2
|
+
import { c as te, g as v, s as re, i as x, a as z, d as oe, e as se, C as ne } from "./SBSPVDDI-CmtnvvUX.js";
|
|
3
|
+
import { c as ie, _ as L, i as ae, am as ue, an as ce, m as M, ao as C, t as le, ah as fe, u as I, j as P, p as de, h as U, k as pe, d as me, v as ve, a as R, Z as ge, ap as ye, f as Ce, b as Pe, e as Ee } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
4
|
+
import { f as Ie, r as Se } from "./B7UTNDHN-BghjolIs.js";
|
|
5
|
+
import { useRef as H, useEffect as V, useState as Fe, useCallback as we, createContext as b } from "react";
|
|
6
|
+
import { jsx as xe } from "react/jsx-runtime";
|
|
7
|
+
import { P as be, b as Ke } from "./Y67KZUMI-BwLWwpNF.js";
|
|
8
|
+
var he = "div";
|
|
9
|
+
function ke(r) {
|
|
10
10
|
return r.some((i) => !!i.rowId);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Ae(r) {
|
|
13
13
|
const i = r.target;
|
|
14
14
|
return i && !U(i) ? !1 : r.key.length === 1 && !r.ctrlKey && !r.metaKey;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function _e(r) {
|
|
17
17
|
return r.key === "Shift" || r.key === "Control" || r.key === "Alt" || r.key === "Meta";
|
|
18
18
|
}
|
|
19
19
|
function O(r, i, l) {
|
|
20
20
|
return I((e) => {
|
|
21
21
|
var s;
|
|
22
|
-
if (i == null || i(e), e.defaultPrevented || e.isPropagationStopped() || !P(e) ||
|
|
22
|
+
if (i == null || i(e), e.defaultPrevented || e.isPropagationStopped() || !P(e) || _e(e) || Ae(e)) return;
|
|
23
23
|
const f = r.getState(), p = (s = v(r, f.activeId)) == null ? void 0 : s.element;
|
|
24
24
|
if (!p) return;
|
|
25
|
-
const n = e, { view: K } = n,
|
|
26
|
-
p !== c && p.focus(), ye(p, e.type,
|
|
25
|
+
const n = e, { view: K } = n, w = L(n, ["view"]), c = l == null ? void 0 : l.current;
|
|
26
|
+
p !== c && p.focus(), ye(p, e.type, w) || e.preventDefault(), e.currentTarget.contains(p) && e.stopPropagation();
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
function Te(r) {
|
|
@@ -32,7 +32,7 @@ function Te(r) {
|
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
function De(r) {
|
|
35
|
-
const [i, l] = Fe(!1), e =
|
|
35
|
+
const [i, l] = Fe(!1), e = we(() => l(!0), []), s = r.useState(
|
|
36
36
|
(f) => v(r, f.activeId)
|
|
37
37
|
);
|
|
38
38
|
return V(() => {
|
|
@@ -47,7 +47,7 @@ var Be = ie(
|
|
|
47
47
|
composite: s = !0,
|
|
48
48
|
focusOnMove: f = s,
|
|
49
49
|
moveOnKeyPress: p = !0
|
|
50
|
-
} = l, n =
|
|
50
|
+
} = l, n = L(l, [
|
|
51
51
|
"store",
|
|
52
52
|
"composite",
|
|
53
53
|
"focusOnMove",
|
|
@@ -58,7 +58,7 @@ var Be = ie(
|
|
|
58
58
|
e,
|
|
59
59
|
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
|
60
60
|
);
|
|
61
|
-
const
|
|
61
|
+
const w = H(null), c = H(null), N = De(e), S = e.useState("moves"), [, q] = ue(
|
|
62
62
|
s ? e.setBaseElement : null
|
|
63
63
|
);
|
|
64
64
|
V(() => {
|
|
@@ -73,15 +73,15 @@ var Be = ie(
|
|
|
73
73
|
const u = c.current;
|
|
74
74
|
c.current = null, u && C(u, { relatedTarget: t }), le(t) || t.focus();
|
|
75
75
|
}, [e, S, s]);
|
|
76
|
-
const
|
|
76
|
+
const h = e.useState("activeId"), k = e.useState("virtualFocus");
|
|
77
77
|
M(() => {
|
|
78
78
|
var t;
|
|
79
|
-
if (!e || !s || !
|
|
79
|
+
if (!e || !s || !k) return;
|
|
80
80
|
const o = c.current;
|
|
81
81
|
if (c.current = null, !o) return;
|
|
82
|
-
const u = ((t = v(e,
|
|
82
|
+
const u = ((t = v(e, h)) == null ? void 0 : t.element) || fe(o);
|
|
83
83
|
u !== o && C(o, { relatedTarget: u });
|
|
84
|
-
}, [e,
|
|
84
|
+
}, [e, h, k, s]);
|
|
85
85
|
const G = O(
|
|
86
86
|
e,
|
|
87
87
|
n.onKeyDownCapture,
|
|
@@ -90,29 +90,29 @@ var Be = ie(
|
|
|
90
90
|
e,
|
|
91
91
|
n.onKeyUpCapture,
|
|
92
92
|
c
|
|
93
|
-
),
|
|
94
|
-
if (
|
|
93
|
+
), A = n.onFocusCapture, Z = I((t) => {
|
|
94
|
+
if (A == null || A(t), t.defaultPrevented || !e) return;
|
|
95
95
|
const { virtualFocus: o } = e.getState();
|
|
96
96
|
if (!o) return;
|
|
97
97
|
const a = t.relatedTarget, u = re(t.currentTarget);
|
|
98
98
|
P(t) && u && (t.stopPropagation(), c.current = a);
|
|
99
|
-
}),
|
|
100
|
-
if (
|
|
99
|
+
}), _ = n.onFocus, J = I((t) => {
|
|
100
|
+
if (_ == null || _(t), t.defaultPrevented || !s || !e) return;
|
|
101
101
|
const { relatedTarget: o } = t, { virtualFocus: a } = e.getState();
|
|
102
|
-
a ? P(t) && !
|
|
102
|
+
a ? P(t) && !x(e, o) && queueMicrotask(N) : P(t) && e.setActiveId(null);
|
|
103
103
|
}), T = n.onBlurCapture, Q = I((t) => {
|
|
104
104
|
var o;
|
|
105
105
|
if (T == null || T(t), t.defaultPrevented || !e) return;
|
|
106
106
|
const { virtualFocus: a, activeId: u } = e.getState();
|
|
107
107
|
if (!a) return;
|
|
108
|
-
const m = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, F =
|
|
109
|
-
c.current = null, P(t) && F ? (g === m ? d && d !== g && C(d, t) : m ? C(m, t) : d && C(d, t), t.stopPropagation()) : !
|
|
110
|
-
}), D = n.onKeyDown,
|
|
108
|
+
const m = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, F = x(e, g), d = c.current;
|
|
109
|
+
c.current = null, P(t) && F ? (g === m ? d && d !== g && C(d, t) : m ? C(m, t) : d && C(d, t), t.stopPropagation()) : !x(e, t.target) && m && C(m, t);
|
|
110
|
+
}), D = n.onKeyDown, X = de(p), Y = I((t) => {
|
|
111
111
|
var o;
|
|
112
112
|
if (D == null || D(t), t.nativeEvent.isComposing || t.defaultPrevented || !e || !P(t)) return;
|
|
113
113
|
const { orientation: a, renderedItems: u, activeId: m } = e.getState(), g = v(e, m);
|
|
114
114
|
if ((o = g == null ? void 0 : g.element) != null && o.isConnected) return;
|
|
115
|
-
const F = a !== "horizontal", d = a !== "vertical", y =
|
|
115
|
+
const F = a !== "horizontal", d = a !== "vertical", y = ke(u);
|
|
116
116
|
if ((t.key === "ArrowLeft" || t.key === "ArrowRight" || t.key === "Home" || t.key === "End") && U(t.currentTarget)) return;
|
|
117
117
|
const B = {
|
|
118
118
|
ArrowUp: (y || F) && (() => {
|
|
@@ -133,14 +133,14 @@ var Be = ie(
|
|
|
133
133
|
if (B) {
|
|
134
134
|
const E = B();
|
|
135
135
|
if (E !== void 0) {
|
|
136
|
-
if (!
|
|
136
|
+
if (!X(t)) return;
|
|
137
137
|
t.preventDefault(), e.move(E);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
n = pe(
|
|
142
142
|
n,
|
|
143
|
-
(t) => /* @__PURE__ */
|
|
143
|
+
(t) => /* @__PURE__ */ xe(z, { value: e, children: t }),
|
|
144
144
|
[e]
|
|
145
145
|
);
|
|
146
146
|
const $ = e.useState((t) => {
|
|
@@ -151,13 +151,13 @@ var Be = ie(
|
|
|
151
151
|
n = me(R({
|
|
152
152
|
"aria-activedescendant": $
|
|
153
153
|
}, n), {
|
|
154
|
-
ref: ve(
|
|
154
|
+
ref: ve(w, q, n.ref),
|
|
155
155
|
onKeyDownCapture: G,
|
|
156
156
|
onKeyUpCapture: W,
|
|
157
|
-
onFocusCapture:
|
|
157
|
+
onFocusCapture: Z,
|
|
158
158
|
onFocus: J,
|
|
159
159
|
onBlurCapture: Q,
|
|
160
|
-
onKeyDown:
|
|
160
|
+
onKeyDown: Y
|
|
161
161
|
});
|
|
162
162
|
const ee = e.useState(
|
|
163
163
|
(t) => s && (t.virtualFocus || t.activeId === null)
|
|
@@ -167,13 +167,13 @@ var Be = ie(
|
|
|
167
167
|
);
|
|
168
168
|
Ce(function(i) {
|
|
169
169
|
const l = Be(i);
|
|
170
|
-
return Pe(
|
|
170
|
+
return Pe(he, l);
|
|
171
171
|
});
|
|
172
172
|
b(
|
|
173
173
|
void 0
|
|
174
174
|
);
|
|
175
175
|
var j = Ee(
|
|
176
|
-
[Ke,
|
|
176
|
+
[Ke, z],
|
|
177
177
|
[be, ne]
|
|
178
178
|
), Ne = j.useContext, qe = j.useProviderContext;
|
|
179
179
|
b(
|
package/dist/Pagination.js
CHANGED
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import './Pagination.css';
|
|
2
3
|
import { jsx as s, jsxs as N } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo as
|
|
4
|
+
import { useMemo as Y, forwardRef as Z, useRef as M, useCallback as R } from "react";
|
|
4
5
|
import { Icon as A } from "./Icon.js";
|
|
5
6
|
import { c as H } from "./index-PAaZGbyz.js";
|
|
6
|
-
const I = "_list_uyk8e_3",
|
|
7
|
+
const I = "_list_uyk8e_3", n = "_item_uyk8e_13", C = "_page_uyk8e_52", a = {
|
|
7
8
|
list: I,
|
|
8
|
-
item:
|
|
9
|
+
item: n,
|
|
9
10
|
"disabled-arrow": "_disabled-arrow_uyk8e_43",
|
|
10
|
-
page:
|
|
11
|
+
page: C,
|
|
11
12
|
"with-text-left": "_with-text-left_uyk8e_72",
|
|
12
13
|
"with-text-right": "_with-text-right_uyk8e_72",
|
|
13
14
|
"size-lg": "_size-lg_uyk8e_75",
|
|
14
15
|
"size-md": "_size-md_uyk8e_90"
|
|
15
16
|
}, h = 5, x = 3;
|
|
16
|
-
function v({ page: c, pageCount: e, rangeDisplay:
|
|
17
|
-
return
|
|
18
|
-
if (e <=
|
|
17
|
+
function v({ page: c, pageCount: e, rangeDisplay: P }) {
|
|
18
|
+
return Y(() => {
|
|
19
|
+
if (e <= P || e <= h + 1)
|
|
19
20
|
return B(e, (b) => b + 1);
|
|
20
21
|
const u = g(c, e), o = u === "before" ? B(h, (b) => b + 1) : [1], r = u === "center" ? B(x, (b) => b + c - 1) : [], w = u === "after" ? B(h, (b) => b + e - h + 1) : [e];
|
|
21
22
|
return T([o, r, w], "-");
|
|
22
|
-
}, [c, e,
|
|
23
|
+
}, [c, e, P]);
|
|
23
24
|
}
|
|
24
25
|
function B(c, e) {
|
|
25
|
-
return Array.from({ length: c }, (
|
|
26
|
+
return Array.from({ length: c }, (P, u) => e(u));
|
|
26
27
|
}
|
|
27
28
|
function g(c, e) {
|
|
28
29
|
return c < h ? "before" : c >= h && c <= e - h + 1 ? "center" : c > e - h + 1 ? "after" : "center";
|
|
29
30
|
}
|
|
30
31
|
function T(c, e) {
|
|
31
|
-
return c.reduce((
|
|
32
|
+
return c.reduce((P, u, o) => {
|
|
32
33
|
const r = [];
|
|
33
|
-
return r.push(...
|
|
34
|
+
return r.push(...P), r.push(...u), u.length && o < c.length - 1 && r.push(e), r;
|
|
34
35
|
}, []);
|
|
35
36
|
}
|
|
36
|
-
const m = H(a),
|
|
37
|
+
const m = H(a), ll = Z(
|
|
37
38
|
({
|
|
38
39
|
"aria-label": c,
|
|
39
40
|
buttonFirstProps: e,
|
|
40
|
-
buttonLastProps:
|
|
41
|
+
buttonLastProps: P,
|
|
41
42
|
buttonNextProps: u,
|
|
42
43
|
buttonPrevProps: o,
|
|
43
44
|
dataTestId: r,
|
|
@@ -46,26 +47,26 @@ const m = H(a), sl = p(
|
|
|
46
47
|
navigationTexts: l,
|
|
47
48
|
onChange: d,
|
|
48
49
|
page: f,
|
|
49
|
-
pageCount:
|
|
50
|
+
pageCount: _,
|
|
50
51
|
rangeDisplay: G = 5,
|
|
51
52
|
showEdgeControls: D = !1,
|
|
52
53
|
size: i = "lg",
|
|
53
|
-
...
|
|
54
|
-
},
|
|
55
|
-
const
|
|
54
|
+
...p
|
|
55
|
+
}, q) => {
|
|
56
|
+
const J = v({ page: f, pageCount: _, rangeDisplay: G }), K = M(null), O = M(null), k = f === 1, y = f === _, $ = f === 1, z = f === _, j = (l == null ? void 0 : l.firstPage) || "First Page", E = (l == null ? void 0 : l.lastPage) || "Last Page", F = (l == null ? void 0 : l.nextPage) || "Next Page", L = (l == null ? void 0 : l.previousPage) || "Previous Page", Q = R(() => {
|
|
56
57
|
$ || d(1);
|
|
57
|
-
}, [$, d]),
|
|
58
|
-
z || d(
|
|
59
|
-
}, [z,
|
|
58
|
+
}, [$, d]), S = R(() => {
|
|
59
|
+
z || d(_);
|
|
60
|
+
}, [z, _, d]), U = R(() => {
|
|
60
61
|
if (k) return;
|
|
61
62
|
const t = Math.max(f - 1, 1);
|
|
62
63
|
d(t);
|
|
63
|
-
}, [k, f, d]),
|
|
64
|
+
}, [k, f, d]), V = R(() => {
|
|
64
65
|
if (y) return;
|
|
65
|
-
const t = Math.min(f + 1,
|
|
66
|
+
const t = Math.min(f + 1, _);
|
|
66
67
|
d(t);
|
|
67
|
-
}, [y, f,
|
|
68
|
-
return /* @__PURE__ */ s("nav", { "aria-label": c ?? "Pagination", "data-testid": r, ref:
|
|
68
|
+
}, [y, f, _, d]);
|
|
69
|
+
return /* @__PURE__ */ s("nav", { "aria-label": c ?? "Pagination", "data-testid": r, ref: q, ...p, children: /* @__PURE__ */ N("ol", { className: m("list"), ...b, children: [
|
|
69
70
|
D ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ N(
|
|
70
71
|
"button",
|
|
71
72
|
{
|
|
@@ -78,7 +79,7 @@ const m = H(a), sl = p(
|
|
|
78
79
|
),
|
|
79
80
|
"data-testid": r ? `${r}-arrow-first` : void 0,
|
|
80
81
|
disabled: $,
|
|
81
|
-
onClick:
|
|
82
|
+
onClick: Q,
|
|
82
83
|
type: "button",
|
|
83
84
|
...e,
|
|
84
85
|
children: [
|
|
@@ -99,8 +100,8 @@ const m = H(a), sl = p(
|
|
|
99
100
|
),
|
|
100
101
|
"data-testid": r ? `${r}-arrow-prev` : void 0,
|
|
101
102
|
disabled: k,
|
|
102
|
-
onClick:
|
|
103
|
-
ref:
|
|
103
|
+
onClick: U,
|
|
104
|
+
ref: K,
|
|
104
105
|
type: "button",
|
|
105
106
|
...o,
|
|
106
107
|
children: [
|
|
@@ -109,8 +110,8 @@ const m = H(a), sl = p(
|
|
|
109
110
|
]
|
|
110
111
|
}
|
|
111
112
|
) }),
|
|
112
|
-
|
|
113
|
-
(t,
|
|
113
|
+
J.map(
|
|
114
|
+
(t, W) => t === "-" ? /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
|
|
114
115
|
"button",
|
|
115
116
|
{
|
|
116
117
|
"aria-label": "Collapsed Pages",
|
|
@@ -119,15 +120,15 @@ const m = H(a), sl = p(
|
|
|
119
120
|
...u,
|
|
120
121
|
children: "..."
|
|
121
122
|
}
|
|
122
|
-
) }, `${
|
|
123
|
+
) }, `${W}-`) : /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
|
|
123
124
|
"a",
|
|
124
125
|
{
|
|
125
126
|
"aria-current": t === f,
|
|
126
127
|
className: m("item", "page", `size-${i}`),
|
|
127
128
|
"data-testid": r ? `${r}-${t}` : void 0,
|
|
128
129
|
href: w == null ? void 0 : w(t),
|
|
129
|
-
onClick: (
|
|
130
|
-
d && (
|
|
130
|
+
onClick: (X) => {
|
|
131
|
+
d && (X.preventDefault(), d(t));
|
|
131
132
|
},
|
|
132
133
|
children: t
|
|
133
134
|
}
|
|
@@ -145,8 +146,8 @@ const m = H(a), sl = p(
|
|
|
145
146
|
),
|
|
146
147
|
"data-testid": r ? `${r}-arrow-next` : void 0,
|
|
147
148
|
disabled: y,
|
|
148
|
-
onClick:
|
|
149
|
-
ref:
|
|
149
|
+
onClick: V,
|
|
150
|
+
ref: O,
|
|
150
151
|
type: "button",
|
|
151
152
|
...u,
|
|
152
153
|
children: [
|
|
@@ -167,9 +168,9 @@ const m = H(a), sl = p(
|
|
|
167
168
|
),
|
|
168
169
|
"data-testid": r ? `${r}-arrow-last` : void 0,
|
|
169
170
|
disabled: z,
|
|
170
|
-
onClick:
|
|
171
|
+
onClick: S,
|
|
171
172
|
type: "button",
|
|
172
|
-
...
|
|
173
|
+
...P,
|
|
173
174
|
children: [
|
|
174
175
|
l != null && l.lastPage ? E : null,
|
|
175
176
|
/* @__PURE__ */ s(A, { className: m("icon"), name: "angle-double-right", size: "lg" })
|
|
@@ -179,6 +180,7 @@ const m = H(a), sl = p(
|
|
|
179
180
|
] }) });
|
|
180
181
|
}
|
|
181
182
|
);
|
|
183
|
+
ll.displayName = "Pagination";
|
|
182
184
|
export {
|
|
183
|
-
|
|
185
|
+
ll as Pagination
|
|
184
186
|
};
|
package/dist/PasswordInput.js
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as c, useState as
|
|
4
|
-
import { InputText as
|
|
3
|
+
import { forwardRef as c, useState as l } from "react";
|
|
4
|
+
import { InputText as u } from "./InputText.js";
|
|
5
5
|
import { Button as w } from "./Button.js";
|
|
6
6
|
import { Icon as n } from "./Icon.js";
|
|
7
|
-
const
|
|
7
|
+
const d = ({ isHidden: a, onClick: t, ...e }) => /* @__PURE__ */ o(
|
|
8
8
|
w,
|
|
9
9
|
{
|
|
10
10
|
"aria-controls": "password",
|
|
11
|
-
"aria-expanded": !
|
|
11
|
+
"aria-expanded": !a,
|
|
12
12
|
onClick: t,
|
|
13
13
|
size: "sm",
|
|
14
14
|
variant: "tertiary",
|
|
15
|
-
...
|
|
16
|
-
children:
|
|
15
|
+
...e,
|
|
16
|
+
children: a ? /* @__PURE__ */ o(n, { name: "eye" }) : /* @__PURE__ */ o(n, { name: "eye-slash" })
|
|
17
17
|
}
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
);
|
|
19
|
+
d.displayName = "PasswordInput.ToggleButton";
|
|
20
|
+
const y = c(
|
|
21
|
+
({ toggleAriaLabel: a, ...t }, e) => {
|
|
22
|
+
const [r, i] = l("password"), s = r === "password", p = () => {
|
|
23
|
+
i(s ? "text" : "password");
|
|
24
|
+
}, m = t["data-testid"] ? `${t["data-testid"]}-action` : void 0;
|
|
25
|
+
return /* @__PURE__ */ o(u, { ...t, ref: e, type: r, children: /* @__PURE__ */ o(
|
|
26
|
+
d,
|
|
25
27
|
{
|
|
26
|
-
"aria-label":
|
|
27
|
-
"data-testid":
|
|
28
|
+
"aria-label": a ?? (s ? "Show password" : "Hide password"),
|
|
29
|
+
"data-testid": m,
|
|
28
30
|
isHidden: s,
|
|
29
|
-
onClick:
|
|
31
|
+
onClick: p
|
|
30
32
|
}
|
|
31
33
|
) });
|
|
32
34
|
}
|
|
33
35
|
);
|
|
36
|
+
y.displayName = "PasswordInput";
|
|
34
37
|
export {
|
|
35
|
-
|
|
38
|
+
y as PasswordInput
|
|
36
39
|
};
|
package/dist/Popover.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import './Popover.css';
|
|
3
|
+
import { jsx as r, jsxs as w } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef as i } from "react";
|
|
4
5
|
import { c as a } from "./index-PAaZGbyz.js";
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import {
|
|
8
|
-
import { P, b as
|
|
9
|
-
import { f as
|
|
10
|
-
import { e as
|
|
11
|
-
const
|
|
12
|
-
root:
|
|
13
|
-
title:
|
|
6
|
+
import { Button as N } from "./Button.js";
|
|
7
|
+
import { Icon as k } from "./Icon.js";
|
|
8
|
+
import { b as q } from "./RTNCFSKZ-BywELldk.js";
|
|
9
|
+
import { P as C, b as H } from "./4I4MLMKD-BO6Lcy7s.js";
|
|
10
|
+
import { f as p } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
11
|
+
import { e as x, f as y, g as T, h as $, P as S } from "./GVVKDT6A-CF9ejW_c.js";
|
|
12
|
+
const j = "_root_kqbt9_2", B = "_title_kqbt9_15", L = "_content_kqbt9_27", R = "_arrow_kqbt9_41", l = {
|
|
13
|
+
root: j,
|
|
14
|
+
title: B,
|
|
14
15
|
"with-close-button": "_with-close-button_kqbt9_24",
|
|
15
16
|
"content-wrapper": "_content-wrapper_kqbt9_27",
|
|
16
|
-
content:
|
|
17
|
+
content: L,
|
|
17
18
|
"close-button": "_close-button_kqbt9_34",
|
|
18
|
-
arrow:
|
|
19
|
+
arrow: R,
|
|
19
20
|
"arrow-item": "_arrow-item_kqbt9_44",
|
|
20
21
|
"placement-top": "_placement-top_kqbt9_49",
|
|
21
22
|
"placement-right": "_placement-right_kqbt9_52",
|
|
22
23
|
"placement-left": "_placement-left_kqbt9_55",
|
|
23
24
|
"placement-bottom": "_placement-bottom_kqbt9_58"
|
|
24
|
-
},
|
|
25
|
-
({ className:
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
}, z = a(l), m = i(
|
|
26
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r("div", { className: z("content", t), ref: o, ...e })
|
|
27
|
+
);
|
|
28
|
+
m.displayName = "Popover.Content";
|
|
29
|
+
const u = a(l), b = ({ store: t }) => {
|
|
30
|
+
const e = q(t, "currentPlacement"), [o] = e.split("-");
|
|
31
|
+
return /* @__PURE__ */ r(C, { className: u("arrow"), store: t, children: /* @__PURE__ */ w(
|
|
29
32
|
"svg",
|
|
30
33
|
{
|
|
31
|
-
className:
|
|
34
|
+
className: u("arrow-item", o && `placement-${o}`),
|
|
32
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33
36
|
children: [
|
|
34
37
|
/* @__PURE__ */ r("path", { d: "M7 30L15 22L23 30H7Z", fill: "currentColor", fillRule: "nonzero", id: "stroke" }),
|
|
@@ -36,95 +39,109 @@ const N = "_root_kqbt9_2", $ = "_title_kqbt9_15", S = "_content_kqbt9_27", T = "
|
|
|
36
39
|
]
|
|
37
40
|
}
|
|
38
41
|
) });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
};
|
|
43
|
+
b.displayName = "Popover.Arrow";
|
|
44
|
+
const d = a(l), v = ({ children: t, className: e, onClose: o, store: n }) => {
|
|
45
|
+
const s = () => {
|
|
46
|
+
o && o(), n == null || n.hide();
|
|
47
|
+
}, { withCloseButton: c } = n;
|
|
48
|
+
return /* @__PURE__ */ w("div", { className: d("content-wrapper", e), children: [
|
|
49
|
+
/* @__PURE__ */ r(b, { store: n }),
|
|
50
|
+
t,
|
|
51
|
+
c ? /* @__PURE__ */ r(N, { className: d("close-button"), onClick: s, size: "sm", variant: "secondary", children: /* @__PURE__ */ r(k, { name: "times" }) }) : null
|
|
47
52
|
] });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
),
|
|
51
|
-
({
|
|
52
|
-
|
|
53
|
+
};
|
|
54
|
+
v.displayName = "Popover.ContentWrapper";
|
|
55
|
+
const A = a(l), _ = i(
|
|
56
|
+
({ className: t, ...e }, o) => /* @__PURE__ */ r("h6", { className: A("title", t), ref: o, ...e })
|
|
57
|
+
);
|
|
58
|
+
_.displayName = "Popover.Title";
|
|
59
|
+
const P = p(
|
|
60
|
+
({ as: t, className: e, store: o, ...n }, s) => /* @__PURE__ */ r(
|
|
61
|
+
H,
|
|
53
62
|
{
|
|
54
63
|
className: e,
|
|
55
|
-
ref:
|
|
56
|
-
render:
|
|
57
|
-
store:
|
|
64
|
+
ref: s,
|
|
65
|
+
render: t ? (c) => /* @__PURE__ */ r(t, { ...c }) : void 0,
|
|
66
|
+
store: o,
|
|
58
67
|
...n
|
|
59
68
|
}
|
|
60
69
|
)
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
);
|
|
71
|
+
P.displayName = "Popover.Trigger";
|
|
72
|
+
const f = p(
|
|
73
|
+
({ as: t, className: e, store: o, ...n }, s) => /* @__PURE__ */ r(
|
|
74
|
+
x,
|
|
64
75
|
{
|
|
65
76
|
className: e,
|
|
66
|
-
ref:
|
|
67
|
-
render:
|
|
68
|
-
store:
|
|
77
|
+
ref: s,
|
|
78
|
+
render: t ? (c) => /* @__PURE__ */ r(t, { ...c }) : void 0,
|
|
79
|
+
store: o,
|
|
69
80
|
...n
|
|
70
81
|
}
|
|
71
82
|
)
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
);
|
|
84
|
+
f.displayName = "Popover.HoverTrigger";
|
|
85
|
+
const W = a(l), h = p(
|
|
86
|
+
({ children: t, onClose: e, store: o, ...n }, s) => {
|
|
87
|
+
const { withCloseButton: c } = o;
|
|
75
88
|
return /* @__PURE__ */ r(
|
|
76
|
-
|
|
89
|
+
y,
|
|
77
90
|
{
|
|
78
|
-
className:
|
|
79
|
-
store:
|
|
91
|
+
className: W("root", c && "with-close-button"),
|
|
92
|
+
store: o,
|
|
80
93
|
...n,
|
|
81
|
-
ref:
|
|
82
|
-
children: /* @__PURE__ */ r(
|
|
94
|
+
ref: s,
|
|
95
|
+
children: /* @__PURE__ */ r(v, { onClose: e, store: o, children: t })
|
|
83
96
|
}
|
|
84
97
|
);
|
|
85
98
|
}
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
99
|
+
);
|
|
100
|
+
h.displayName = "PopoverHover";
|
|
101
|
+
const Q = Object.assign(h, {
|
|
102
|
+
Content: m,
|
|
103
|
+
Title: _,
|
|
104
|
+
Trigger: f
|
|
90
105
|
}), U = ({
|
|
91
|
-
withCloseButton:
|
|
106
|
+
withCloseButton: t = !1,
|
|
92
107
|
...e
|
|
93
108
|
} = {}) => ({
|
|
94
|
-
...
|
|
109
|
+
...T({
|
|
95
110
|
...e
|
|
96
111
|
}),
|
|
97
|
-
withCloseButton:
|
|
112
|
+
withCloseButton: t
|
|
98
113
|
}), V = ({
|
|
99
|
-
hideTimeout:
|
|
114
|
+
hideTimeout: t = 300,
|
|
100
115
|
showTimeout: e = 500,
|
|
101
|
-
withCloseButton:
|
|
116
|
+
withCloseButton: o = !1,
|
|
102
117
|
...n
|
|
103
118
|
} = {}) => ({
|
|
104
|
-
|
|
105
|
-
hideTimeout:
|
|
119
|
+
...$({
|
|
120
|
+
hideTimeout: t,
|
|
106
121
|
showTimeout: e,
|
|
107
122
|
...n
|
|
108
123
|
}),
|
|
109
|
-
withCloseButton:
|
|
110
|
-
}), M = a(l),
|
|
111
|
-
({ children:
|
|
112
|
-
const { withCloseButton:
|
|
124
|
+
withCloseButton: o
|
|
125
|
+
}), M = a(l), g = i(
|
|
126
|
+
({ children: t, onClose: e, store: o, ...n }, s) => {
|
|
127
|
+
const { withCloseButton: c } = o;
|
|
113
128
|
return /* @__PURE__ */ r(
|
|
114
|
-
|
|
129
|
+
S,
|
|
115
130
|
{
|
|
116
|
-
className: M("root",
|
|
117
|
-
ref:
|
|
118
|
-
store:
|
|
131
|
+
className: M("root", c && "with-close-button"),
|
|
132
|
+
ref: s,
|
|
133
|
+
store: o,
|
|
119
134
|
...n,
|
|
120
|
-
children: /* @__PURE__ */ r(
|
|
135
|
+
children: /* @__PURE__ */ r(v, { onClose: e, store: o, children: t })
|
|
121
136
|
}
|
|
122
137
|
);
|
|
123
138
|
}
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
139
|
+
);
|
|
140
|
+
g.displayName = "Popover";
|
|
141
|
+
const X = Object.assign(g, {
|
|
142
|
+
Content: m,
|
|
143
|
+
Title: _,
|
|
144
|
+
Trigger: P
|
|
128
145
|
});
|
|
129
146
|
export {
|
|
130
147
|
X as Popover,
|