welcome-ui 9.0.0-alpha.4 → 9.0.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/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,21 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
b(
|
|
9
|
-
void 0
|
|
10
|
-
);
|
|
11
|
-
var N = ue(
|
|
12
|
-
[ae, z],
|
|
13
|
-
[ie, te]
|
|
14
|
-
), je = N.useContext, qe = N.useProviderContext;
|
|
15
|
-
b(
|
|
16
|
-
void 0
|
|
17
|
-
);
|
|
18
|
-
b(!1);
|
|
2
|
+
import { c as te, g as v, s as re, i as w, a as z, d as oe, e as se, C as ne } from "./SBSPVDDI-DJKkC1eb.js";
|
|
3
|
+
import { c as ie, _ as L, i as ae, ak as ue, al as ce, M as B, am as C, o as le, af as fe, u as I, j as P, l as de, h as U, x as pe, d as me, p as ve, a as R, W as ge, an as ye, f as Ce, b as Pe, e as Ee } from "./OE2EFRVA-C3721cM3.js";
|
|
4
|
+
import { f as Ie, r as Se } from "./B7UTNDHN-BlIblHCu.js";
|
|
5
|
+
import { useRef as H, useEffect as V, useState as Fe, useCallback as xe, createContext as b } from "react";
|
|
6
|
+
import { jsx as we } from "react/jsx-runtime";
|
|
7
|
+
import { P as be, a as Ke } from "./Y67KZUMI-DFEgrUv2.js";
|
|
19
8
|
var ke = "div";
|
|
20
9
|
function Ae(r) {
|
|
21
10
|
return r.some((i) => !!i.rowId);
|
|
@@ -28,22 +17,22 @@ function he(r) {
|
|
|
28
17
|
return r.key === "Shift" || r.key === "Control" || r.key === "Alt" || r.key === "Meta";
|
|
29
18
|
}
|
|
30
19
|
function O(r, i, l) {
|
|
31
|
-
return
|
|
20
|
+
return I((e) => {
|
|
32
21
|
var s;
|
|
33
22
|
if (i == null || i(e), e.defaultPrevented || e.isPropagationStopped() || !P(e) || he(e) || _e(e)) return;
|
|
34
23
|
const f = r.getState(), p = (s = v(r, f.activeId)) == null ? void 0 : s.element;
|
|
35
24
|
if (!p) return;
|
|
36
|
-
const n = e, { view: K } = n,
|
|
37
|
-
p !== c && p.focus(),
|
|
25
|
+
const n = e, { view: K } = n, x = L(n, ["view"]), c = l == null ? void 0 : l.current;
|
|
26
|
+
p !== c && p.focus(), ye(p, e.type, x) || e.preventDefault(), e.currentTarget.contains(p) && e.stopPropagation();
|
|
38
27
|
});
|
|
39
28
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
|
|
29
|
+
function Te(r) {
|
|
30
|
+
return oe(
|
|
31
|
+
Ie(Se(se(r)))
|
|
43
32
|
);
|
|
44
33
|
}
|
|
45
|
-
function
|
|
46
|
-
const [i, l] = Fe(!1), e =
|
|
34
|
+
function De(r) {
|
|
35
|
+
const [i, l] = Fe(!1), e = xe(() => l(!0), []), s = r.useState(
|
|
47
36
|
(f) => v(r, f.activeId)
|
|
48
37
|
);
|
|
49
38
|
return V(() => {
|
|
@@ -51,7 +40,7 @@ function Te(r) {
|
|
|
51
40
|
i && f && (l(!1), f.focus({ preventScroll: !0 }));
|
|
52
41
|
}, [s, i]), e;
|
|
53
42
|
}
|
|
54
|
-
var Me =
|
|
43
|
+
var Me = ie(
|
|
55
44
|
function(i) {
|
|
56
45
|
var l = i, {
|
|
57
46
|
store: e,
|
|
@@ -64,25 +53,25 @@ var Me = ce(
|
|
|
64
53
|
"focusOnMove",
|
|
65
54
|
"moveOnKeyPress"
|
|
66
55
|
]);
|
|
67
|
-
const K =
|
|
68
|
-
e = e || K,
|
|
56
|
+
const K = te();
|
|
57
|
+
e = e || K, ae(
|
|
69
58
|
e,
|
|
70
59
|
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
|
71
60
|
);
|
|
72
|
-
const
|
|
61
|
+
const x = H(null), c = H(null), N = De(e), S = e.useState("moves"), [, W] = ue(
|
|
73
62
|
s ? e.setBaseElement : null
|
|
74
63
|
);
|
|
75
64
|
V(() => {
|
|
76
65
|
var t;
|
|
77
66
|
if (!e || !S || !s || !f) return;
|
|
78
67
|
const { activeId: o } = e.getState(), a = (t = v(e, o)) == null ? void 0 : t.element;
|
|
79
|
-
a &&
|
|
68
|
+
a && ce(a);
|
|
80
69
|
}, [e, S, s, f]), B(() => {
|
|
81
70
|
if (!e || !S || !s) return;
|
|
82
71
|
const { baseElement: t, activeId: o } = e.getState();
|
|
83
72
|
if (!(o === null) || !t) return;
|
|
84
73
|
const u = c.current;
|
|
85
|
-
c.current = null, u && C(u, { relatedTarget: t }),
|
|
74
|
+
c.current = null, u && C(u, { relatedTarget: t }), le(t) || t.focus();
|
|
86
75
|
}, [e, S, s]);
|
|
87
76
|
const k = e.useState("activeId"), A = e.useState("virtualFocus");
|
|
88
77
|
B(() => {
|
|
@@ -90,10 +79,10 @@ var Me = ce(
|
|
|
90
79
|
if (!e || !s || !A) return;
|
|
91
80
|
const o = c.current;
|
|
92
81
|
if (c.current = null, !o) return;
|
|
93
|
-
const u = ((t = v(e, k)) == null ? void 0 : t.element) ||
|
|
82
|
+
const u = ((t = v(e, k)) == null ? void 0 : t.element) || fe(o);
|
|
94
83
|
u !== o && C(o, { relatedTarget: u });
|
|
95
84
|
}, [e, k, A, s]);
|
|
96
|
-
const
|
|
85
|
+
const q = O(
|
|
97
86
|
e,
|
|
98
87
|
n.onKeyDownCapture,
|
|
99
88
|
c
|
|
@@ -101,26 +90,26 @@ var Me = ce(
|
|
|
101
90
|
e,
|
|
102
91
|
n.onKeyUpCapture,
|
|
103
92
|
c
|
|
104
|
-
), _ = n.onFocusCapture, J =
|
|
93
|
+
), _ = n.onFocusCapture, J = I((t) => {
|
|
105
94
|
if (_ == null || _(t), t.defaultPrevented || !e) return;
|
|
106
95
|
const { virtualFocus: o } = e.getState();
|
|
107
96
|
if (!o) return;
|
|
108
|
-
const a = t.relatedTarget, u =
|
|
97
|
+
const a = t.relatedTarget, u = re(t.currentTarget);
|
|
109
98
|
P(t) && u && (t.stopPropagation(), c.current = a);
|
|
110
|
-
}), h = n.onFocus, Q =
|
|
99
|
+
}), h = n.onFocus, Q = I((t) => {
|
|
111
100
|
if (h == null || h(t), t.defaultPrevented || !s || !e) return;
|
|
112
101
|
const { relatedTarget: o } = t, { virtualFocus: a } = e.getState();
|
|
113
|
-
a ? P(t) && !
|
|
114
|
-
}),
|
|
102
|
+
a ? P(t) && !w(e, o) && queueMicrotask(N) : P(t) && e.setActiveId(null);
|
|
103
|
+
}), T = n.onBlurCapture, X = I((t) => {
|
|
115
104
|
var o;
|
|
116
|
-
if (
|
|
105
|
+
if (T == null || T(t), t.defaultPrevented || !e) return;
|
|
117
106
|
const { virtualFocus: a, activeId: u } = e.getState();
|
|
118
107
|
if (!a) return;
|
|
119
|
-
const m = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, F =
|
|
120
|
-
c.current = null, P(t) && F ? (g === m ? d && d !== g && C(d, t) : m ? C(m, t) : d && C(d, t), t.stopPropagation()) : !
|
|
121
|
-
}),
|
|
108
|
+
const m = (o = v(e, u)) == null ? void 0 : o.element, g = t.relatedTarget, F = w(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()) : !w(e, t.target) && m && C(m, t);
|
|
110
|
+
}), D = n.onKeyDown, Y = de(p), Z = I((t) => {
|
|
122
111
|
var o;
|
|
123
|
-
if (
|
|
112
|
+
if (D == null || D(t), t.nativeEvent.isComposing || t.defaultPrevented || !e || !P(t)) return;
|
|
124
113
|
const { orientation: a, renderedItems: u, activeId: m } = e.getState(), g = v(e, m);
|
|
125
114
|
if ((o = g == null ? void 0 : g.element) != null && o.isConnected) return;
|
|
126
115
|
const F = a !== "horizontal", d = a !== "vertical", y = Ae(u);
|
|
@@ -128,8 +117,8 @@ var Me = ce(
|
|
|
128
117
|
const M = {
|
|
129
118
|
ArrowUp: (y || F) && (() => {
|
|
130
119
|
if (y) {
|
|
131
|
-
const
|
|
132
|
-
return
|
|
120
|
+
const E = Te(u);
|
|
121
|
+
return E == null ? void 0 : E.id;
|
|
133
122
|
}
|
|
134
123
|
return e == null ? void 0 : e.last();
|
|
135
124
|
}),
|
|
@@ -142,16 +131,16 @@ var Me = ce(
|
|
|
142
131
|
PageDown: e.last
|
|
143
132
|
}[t.key];
|
|
144
133
|
if (M) {
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
134
|
+
const E = M();
|
|
135
|
+
if (E !== void 0) {
|
|
147
136
|
if (!Y(t)) return;
|
|
148
|
-
t.preventDefault(), e.move(
|
|
137
|
+
t.preventDefault(), e.move(E);
|
|
149
138
|
}
|
|
150
139
|
}
|
|
151
140
|
});
|
|
152
|
-
n =
|
|
141
|
+
n = pe(
|
|
153
142
|
n,
|
|
154
|
-
(t) => /* @__PURE__ */
|
|
143
|
+
(t) => /* @__PURE__ */ we(z, { value: e, children: t }),
|
|
155
144
|
[e]
|
|
156
145
|
);
|
|
157
146
|
const $ = e.useState((t) => {
|
|
@@ -159,11 +148,11 @@ var Me = ce(
|
|
|
159
148
|
if (e && s && t.virtualFocus)
|
|
160
149
|
return (o = v(e, t.activeId)) == null ? void 0 : o.id;
|
|
161
150
|
});
|
|
162
|
-
n =
|
|
151
|
+
n = me(R({
|
|
163
152
|
"aria-activedescendant": $
|
|
164
153
|
}, n), {
|
|
165
|
-
ref:
|
|
166
|
-
onKeyDownCapture:
|
|
154
|
+
ref: ve(x, W, n.ref),
|
|
155
|
+
onKeyDownCapture: q,
|
|
167
156
|
onKeyUpCapture: G,
|
|
168
157
|
onFocusCapture: J,
|
|
169
158
|
onFocus: Q,
|
|
@@ -173,15 +162,26 @@ var Me = ce(
|
|
|
173
162
|
const ee = e.useState(
|
|
174
163
|
(t) => s && (t.virtualFocus || t.activeId === null)
|
|
175
164
|
);
|
|
176
|
-
return n =
|
|
165
|
+
return n = ge(R({ focusable: ee }, n)), n;
|
|
177
166
|
}
|
|
178
167
|
);
|
|
179
|
-
|
|
168
|
+
Ce(function(i) {
|
|
180
169
|
const l = Me(i);
|
|
181
|
-
return
|
|
170
|
+
return Pe(ke, l);
|
|
182
171
|
});
|
|
172
|
+
b(
|
|
173
|
+
void 0
|
|
174
|
+
);
|
|
175
|
+
var j = Ee(
|
|
176
|
+
[Ke, z],
|
|
177
|
+
[be, ne]
|
|
178
|
+
), Ne = j.useContext, We = j.useProviderContext;
|
|
179
|
+
b(
|
|
180
|
+
void 0
|
|
181
|
+
);
|
|
182
|
+
b(!1);
|
|
183
183
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
We as a,
|
|
185
|
+
Ne as b,
|
|
186
|
+
Me as u
|
|
187
187
|
};
|
package/dist/Pagination.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._list_1jk7d_2{list-style-type:none;padding:0;margin:0;display:flex;gap:var(--spacing-sm);align-items:center;flex-wrap:wrap}._item_1jk7d_11{color:var(--color, var(--color-neutral-90));background-color:var(--backgroundColor, var(--color-neutral-10));font-size:var(--font-size-xs);font-weight:var(--font-weight-bold);height:var(--height-elements-md);width:var(--height-elements-md);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none}._item_1jk7d_11:not([disabled]):hover,._item_1jk7d_11:focus-visible{--backgroundColor: var(--color-neutral-30)}._item_1jk7d_11:focus-visible{--color: var(--color-neutral-90);outline:none!important}._disabled-arrow_1jk7d_32{cursor:not-allowed;--color: var(--color-beige-70);--backgroundColor: var(--color-beige-40)}._page_1jk7d_37[aria-current=true]{--backgroundColor: var(--color-neutral-90);--color: var(--color-neutral-10)}._page_1jk7d_37[aria-current=true]:hover,._page_1jk7d_37[aria-current=true]:focus-visible{--backgroundColor: var(--color-neutral-90)}._dots_1jk7d_44{display:flex;justify-content:center;align-items:center}}
|
package/dist/Pagination.js
CHANGED
|
@@ -1,99 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import "./Icon-
|
|
5
|
-
import { L as
|
|
6
|
-
import { R as
|
|
7
|
-
import { c as
|
|
8
|
-
const
|
|
9
|
-
list:
|
|
10
|
-
item:
|
|
11
|
-
arrow:
|
|
2
|
+
import { jsx as n, jsxs as M } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as y, forwardRef as z, useRef as h, useCallback as N } from "react";
|
|
4
|
+
import "./Icon-EG7O4YwD.js";
|
|
5
|
+
import { L as B } from "./index-D5a8Oe6k.js";
|
|
6
|
+
import { R as D } from "./index-BtwrJ6N4.js";
|
|
7
|
+
import { c as G } from "./index-CdiHdiVB.js";
|
|
8
|
+
const L = "_list_1jk7d_2", p = "_item_1jk7d_11", q = "_page_1jk7d_37", F = "_dots_1jk7d_44", J = {
|
|
9
|
+
list: L,
|
|
10
|
+
item: p,
|
|
11
|
+
"disabled-arrow": "_disabled-arrow_1jk7d_32",
|
|
12
12
|
page: q,
|
|
13
|
-
dots:
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
return
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
}, [
|
|
13
|
+
dots: F
|
|
14
|
+
}, c = 5, K = 3;
|
|
15
|
+
function O({ page: i, pageCount: t, rangeDisplay: d }) {
|
|
16
|
+
return y(() => {
|
|
17
|
+
if (t <= d || t <= c + 1)
|
|
18
|
+
return _(t, (s) => s + 1);
|
|
19
|
+
const r = Q(i, t), a = r === "before" ? _(c, (s) => s + 1) : [1], o = r === "center" ? _(K, (s) => s + i - 1) : [], l = r === "after" ? _(c, (s) => s + t - c + 1) : [t];
|
|
20
|
+
return S([a, o, l], "-");
|
|
21
|
+
}, [i, t, d]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return Array.from({ length:
|
|
23
|
+
function _(i, t) {
|
|
24
|
+
return Array.from({ length: i }, (d, r) => t(r));
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function Q(i, t) {
|
|
27
|
+
return i < c ? "before" : i >= c && i <= t - c + 1 ? "center" : i > t - c + 1 ? "after" : "center";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function S(i, t) {
|
|
30
|
+
return i.reduce((d, r, a) => {
|
|
31
31
|
const o = [];
|
|
32
|
-
return o.push(...
|
|
32
|
+
return o.push(...d), o.push(...r), r.length && a < i.length - 1 && o.push(t), o;
|
|
33
33
|
}, []);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
const f = G(J), H = z(
|
|
36
|
+
({
|
|
37
|
+
"aria-label": i,
|
|
38
|
+
buttonNextProps: t,
|
|
39
|
+
buttonPrevProps: d,
|
|
40
|
+
dataTestId: r,
|
|
41
|
+
getHref: a,
|
|
42
|
+
listProps: o,
|
|
43
|
+
onChange: l,
|
|
44
|
+
page: s,
|
|
45
|
+
pageCount: m,
|
|
46
|
+
rangeDisplay: x = 5,
|
|
47
|
+
...v
|
|
48
|
+
}, k) => {
|
|
49
|
+
const R = O({ page: s, pageCount: m, rangeDisplay: x }), j = h(null), w = h(null), u = s === 1, b = s === m, P = N(() => {
|
|
50
|
+
if (u) return;
|
|
51
|
+
const e = Math.max(s - 1, 1);
|
|
52
|
+
l(e);
|
|
53
|
+
}, [u, s, l]), $ = N(() => {
|
|
54
|
+
if (b) return;
|
|
55
|
+
const e = Math.min(s + 1, m);
|
|
56
|
+
l(e);
|
|
57
|
+
}, [b, s, m, l]);
|
|
58
|
+
return /* @__PURE__ */ n("nav", { "aria-label": i ?? "Pagination", "data-testid": r, ref: k, ...v, children: /* @__PURE__ */ M("ol", { className: f("list"), ...o, children: [
|
|
59
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
60
|
+
"button",
|
|
57
61
|
{
|
|
58
|
-
"aria-
|
|
59
|
-
className:
|
|
62
|
+
"aria-label": "Previous Page",
|
|
63
|
+
className: f("item", u && "disabled-arrow"),
|
|
60
64
|
"data-testid": r ? `${r}-arrow-prev` : void 0,
|
|
61
|
-
|
|
62
|
-
onClick:
|
|
63
|
-
ref:
|
|
64
|
-
|
|
65
|
+
disabled: u,
|
|
66
|
+
onClick: P,
|
|
67
|
+
ref: j,
|
|
68
|
+
type: "button",
|
|
69
|
+
...d,
|
|
70
|
+
children: /* @__PURE__ */ n(B, { size: "sm" })
|
|
65
71
|
}
|
|
66
72
|
) }),
|
|
67
|
-
|
|
68
|
-
(
|
|
73
|
+
R.map(
|
|
74
|
+
(e, A) => e === "-" ? /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("span", { className: f("dots"), children: "..." }) }, `${A}-`) : /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
69
75
|
"a",
|
|
70
76
|
{
|
|
71
|
-
"aria-current":
|
|
72
|
-
className:
|
|
73
|
-
"data-testid": r ? `${r}-${
|
|
74
|
-
href:
|
|
75
|
-
onClick: (
|
|
76
|
-
|
|
77
|
+
"aria-current": e === s,
|
|
78
|
+
className: f("item", "page"),
|
|
79
|
+
"data-testid": r ? `${r}-${e}` : void 0,
|
|
80
|
+
href: a == null ? void 0 : a(e),
|
|
81
|
+
onClick: (E) => {
|
|
82
|
+
l && (E.preventDefault(), l(e));
|
|
77
83
|
},
|
|
78
|
-
children:
|
|
84
|
+
children: e
|
|
79
85
|
}
|
|
80
|
-
) },
|
|
86
|
+
) }, e)
|
|
81
87
|
),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
"
|
|
88
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
89
|
+
"button",
|
|
84
90
|
{
|
|
85
|
-
"aria-
|
|
86
|
-
className:
|
|
91
|
+
"aria-label": "Next Page",
|
|
92
|
+
className: f("item", b && "disabled-arrow"),
|
|
87
93
|
"data-testid": r ? `${r}-arrow-next` : void 0,
|
|
88
|
-
|
|
89
|
-
onClick:
|
|
90
|
-
ref:
|
|
91
|
-
|
|
94
|
+
disabled: b,
|
|
95
|
+
onClick: $,
|
|
96
|
+
ref: w,
|
|
97
|
+
type: "button",
|
|
98
|
+
...t,
|
|
99
|
+
children: /* @__PURE__ */ n(D, { size: "sm" })
|
|
92
100
|
}
|
|
93
101
|
) })
|
|
94
102
|
] }) });
|
|
95
103
|
}
|
|
96
104
|
);
|
|
97
105
|
export {
|
|
98
|
-
|
|
106
|
+
H as Pagination
|
|
99
107
|
};
|
package/dist/PasswordInput.js
CHANGED
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as p, useState as c } from "react";
|
|
4
4
|
import { InputText as m } from "./InputText.js";
|
|
5
5
|
import { Button as l } from "./Button.js";
|
|
6
|
-
import "./Icon-
|
|
7
|
-
import { S as
|
|
8
|
-
const
|
|
6
|
+
import "./Icon-EG7O4YwD.js";
|
|
7
|
+
import { S as w, H as u } from "./index-BC2bF45u.js";
|
|
8
|
+
const x = ({ isHidden: s, onClick: t, ...a }) => /* @__PURE__ */ o(
|
|
9
9
|
l,
|
|
10
10
|
{
|
|
11
11
|
"aria-controls": "password",
|
|
12
|
-
"aria-expanded": !
|
|
12
|
+
"aria-expanded": !s,
|
|
13
13
|
onClick: t,
|
|
14
14
|
shape: "circle",
|
|
15
15
|
size: "xs",
|
|
16
|
-
title: a,
|
|
17
16
|
variant: "ghost",
|
|
18
|
-
...
|
|
19
|
-
children:
|
|
17
|
+
...a,
|
|
18
|
+
children: s ? /* @__PURE__ */ o(w, {}) : /* @__PURE__ */ o(u, {})
|
|
20
19
|
}
|
|
21
|
-
),
|
|
22
|
-
({
|
|
23
|
-
const [
|
|
24
|
-
|
|
20
|
+
), H = p(
|
|
21
|
+
({ toggleAriaLabel: s, ...t }, a) => {
|
|
22
|
+
const [r, n] = c("password"), e = r === "password", i = () => {
|
|
23
|
+
n(e ? "text" : "password");
|
|
25
24
|
}, d = t["data-testid"] ? `${t["data-testid"]}-action` : void 0;
|
|
26
25
|
return /* @__PURE__ */ o(
|
|
27
26
|
m,
|
|
28
27
|
{
|
|
29
28
|
...t,
|
|
30
29
|
icon: /* @__PURE__ */ o(
|
|
31
|
-
|
|
30
|
+
x,
|
|
32
31
|
{
|
|
32
|
+
"aria-label": s ?? (e ? "Show password" : "Hide password"),
|
|
33
33
|
"data-testid": d,
|
|
34
|
-
isHidden:
|
|
35
|
-
onClick: i
|
|
36
|
-
title: e
|
|
34
|
+
isHidden: e,
|
|
35
|
+
onClick: i
|
|
37
36
|
}
|
|
38
37
|
),
|
|
39
38
|
iconPlacement: "right",
|
|
40
39
|
ref: a,
|
|
41
|
-
type:
|
|
40
|
+
type: r
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
44
|
);
|
|
46
45
|
export {
|
|
47
|
-
|
|
46
|
+
H as PasswordInput
|
|
48
47
|
};
|
package/dist/Popover.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
2
|
+
import { jsx as r, jsxs as _ } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as i } from "react";
|
|
4
|
-
import { c as l } from "./index-
|
|
4
|
+
import { c as l } from "./index-CdiHdiVB.js";
|
|
5
5
|
import { Button as w } from "./Button.js";
|
|
6
|
-
import "./Icon-
|
|
7
|
-
import { C as f } from "./index-
|
|
8
|
-
import {
|
|
9
|
-
import { P as g, f as C, g as b, h as x, i as H, j as N } from "./
|
|
6
|
+
import "./Icon-EG7O4YwD.js";
|
|
7
|
+
import { C as f } from "./index-Bt79XJ8R.js";
|
|
8
|
+
import { u as P } from "./RTNCFSKZ-qpPg689E.js";
|
|
9
|
+
import { P as g, f as C, g as b, h as x, i as H, j as N } from "./GVVKDT6A-bET6V7Py.js";
|
|
10
10
|
import { f as p } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
11
|
-
import { P as $ } from "./
|
|
11
|
+
import { P as $ } from "./4I4MLMKD-BLxAidnq.js";
|
|
12
12
|
const j = "_root_1ldto_2", S = "_title_1ldto_15", T = "_content_1ldto_27", B = "_arrow_1ldto_41", a = {
|
|
13
13
|
root: j,
|
|
14
14
|
title: S,
|
|
@@ -22,11 +22,11 @@ const j = "_root_1ldto_2", S = "_title_1ldto_15", T = "_content_1ldto_27", B = "
|
|
|
22
22
|
"placement-right": "_placement-right_1ldto_52",
|
|
23
23
|
"placement-left": "_placement-left_1ldto_55",
|
|
24
24
|
"placement-bottom": "_placement-bottom_1ldto_58"
|
|
25
|
-
}, L = l(a),
|
|
25
|
+
}, L = l(a), d = i(
|
|
26
26
|
({ className: t, ...e }, o) => /* @__PURE__ */ r("div", { className: L("content", t), ref: o, ...e })
|
|
27
27
|
), m = l(a), R = ({ store: t }) => {
|
|
28
28
|
const e = P(t, "currentPlacement"), [o] = e.split("-");
|
|
29
|
-
return /* @__PURE__ */ r(g, { className: m("arrow"), store: t, children: /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ r(g, { className: m("arrow"), store: t, children: /* @__PURE__ */ _(
|
|
30
30
|
"svg",
|
|
31
31
|
{
|
|
32
32
|
className: m("arrow-item", o && `placement-${o}`),
|
|
@@ -37,17 +37,17 @@ const j = "_root_1ldto_2", S = "_title_1ldto_15", T = "_content_1ldto_27", B = "
|
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
) });
|
|
40
|
-
},
|
|
40
|
+
}, u = l(a), v = ({ children: t, className: e, onClose: o, store: n }) => {
|
|
41
41
|
const s = () => {
|
|
42
42
|
o && o(), n == null || n.hide();
|
|
43
43
|
}, { withCloseButton: c } = n;
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ _("div", { className: u("content-wrapper", e), children: [
|
|
45
45
|
/* @__PURE__ */ r(R, { store: n }),
|
|
46
46
|
t,
|
|
47
47
|
c ? /* @__PURE__ */ r(
|
|
48
48
|
w,
|
|
49
49
|
{
|
|
50
|
-
className:
|
|
50
|
+
className: u("close-button"),
|
|
51
51
|
onClick: s,
|
|
52
52
|
shape: "square",
|
|
53
53
|
size: "xs",
|
|
@@ -95,7 +95,7 @@ const j = "_root_1ldto_2", S = "_title_1ldto_15", T = "_content_1ldto_27", B = "
|
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
), U = Object.assign(M, {
|
|
98
|
-
Content:
|
|
98
|
+
Content: d,
|
|
99
99
|
Title: h,
|
|
100
100
|
Trigger: y
|
|
101
101
|
}), V = ({
|
|
@@ -133,7 +133,7 @@ const j = "_root_1ldto_2", S = "_title_1ldto_15", T = "_content_1ldto_27", B = "
|
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
135
|
), Y = Object.assign(W, {
|
|
136
|
-
Content:
|
|
136
|
+
Content: d,
|
|
137
137
|
Title: h,
|
|
138
138
|
Trigger: k
|
|
139
139
|
});
|