welcome-ui 8.0.0 → 8.0.3
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/AXB53BZF-BOEe01VW.mjs +25 -0
- package/dist/Accordion.mjs +17 -17
- package/dist/Alert.mjs +19 -19
- package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
- package/dist/Badge.mjs +1 -1
- package/dist/Breadcrumb.mjs +27 -26
- package/dist/Button.mjs +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
- package/dist/DatePicker.mjs +4 -4
- package/dist/DateTimePicker.mjs +9 -9
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +7 -7
- package/dist/DropdownMenu.mjs +262 -262
- package/dist/Field.mjs +25 -25
- package/dist/FileDrop.mjs +273 -267
- package/dist/FileUpload.mjs +26 -26
- package/dist/Files.mjs +1 -1
- package/dist/Hint.mjs +1 -1
- package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
- package/dist/Icons.mjs +88 -88
- package/dist/IconsFont.mjs +159 -159
- package/dist/InputText.mjs +1 -1
- package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
- package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
- package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
- package/dist/Label.mjs +2 -2
- package/dist/Link.mjs +3 -3
- package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
- package/dist/Modal.mjs +13 -13
- package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
- package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
- package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
- package/dist/Pagination.mjs +22 -22
- package/dist/Picker.mjs +2 -2
- package/dist/Popover.mjs +2 -2
- package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
- package/dist/Radio.mjs +18 -18
- package/dist/RadioGroup.mjs +15 -15
- package/dist/RadioTab.mjs +9 -9
- package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
- package/dist/Search.mjs +2 -2
- package/dist/Select.mjs +719 -716
- package/dist/Shape.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Swiper.mjs +284 -278
- package/dist/Tabs.mjs +128 -128
- package/dist/Tag.mjs +16 -16
- package/dist/Text.mjs +1 -1
- package/dist/Textarea.mjs +4 -4
- package/dist/TimePicker.mjs +6 -6
- package/dist/Toast.mjs +69 -69
- package/dist/Toggle.mjs +2 -2
- package/dist/Tooltip.mjs +60 -60
- package/dist/UniversalLink.mjs +8 -8
- package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
- package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
- package/dist/VariantIcon.mjs +4 -4
- package/dist/WelcomeLoader.mjs +4862 -9223
- package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
- package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
- package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
- package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
- package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
- package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
- package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
- package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
- package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
- package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
- package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
- package/dist/radio-group-RFyDp0KD.mjs +51 -0
- package/dist/theme.mjs +670 -615
- package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
- package/dist/utils.mjs +29 -91
- package/package.json +13 -13
- package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
- package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
- package/dist/NLEBE274-C94QU78N.mjs +0 -84
- package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
- package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
- package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
- package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
- package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
- package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
- package/dist/radio-group-CGC6DTFJ.mjs +0 -51
package/dist/Tabs.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import L, { createContext as re, useMemo as ge, useCallback as ae, useRef as z, useEffect as Z, useState as K, Children as Te, Fragment as Pe, cloneElement as Ce } from "react";
|
|
3
3
|
import { u as Ee } from "./use-fork-ref-CUZErtAC.mjs";
|
|
4
|
-
import { u as $e } from "./use-viewport-
|
|
4
|
+
import { u as $e } from "./use-viewport-CfklieD-.mjs";
|
|
5
5
|
import { u as ye } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
|
|
6
|
-
import j, {
|
|
7
|
-
import { C as ie, a as ce, d as ee, u as _e, e as Re } from "./P2CTZE2T-
|
|
8
|
-
import { v as le, A as Le, B as V, C as A, D as O, Q as te, d as g, g as p, H as oe,
|
|
9
|
-
import { c as De, b as Ve, u as Fe, a as Me } from "./ITI7HKP4-
|
|
10
|
-
import { e as je, f as ze } from "./VGCJ63VH-
|
|
11
|
-
import { m as He, o as
|
|
6
|
+
import j, { th as x, system as we, css as D } from "@xstyled/styled-components";
|
|
7
|
+
import { C as ie, a as ce, d as ee, u as _e, e as Re } from "./P2CTZE2T-Cl2w7OLV.mjs";
|
|
8
|
+
import { v as le, A as Le, B as V, C as A, D as O, Q as te, d as g, g as p, H as oe, w as Ne, f as Q, c as U, h as X, _ as Y, i as q, x as de, l as Be, b as H, t as M, E as ue, aa as Ae, e as Oe, m as ke } from "./LVA2YJMS-DDEmK0pp.mjs";
|
|
9
|
+
import { c as De, b as Ve, u as Fe, a as Me } from "./ITI7HKP4-EL9KXYBU.mjs";
|
|
10
|
+
import { e as je, f as ze } from "./VGCJ63VH-BMzoZtCu.mjs";
|
|
11
|
+
import { m as He, o as se, c as We, s as k, d as y, g as Ke, a as me, b as ne, u as F } from "./YV4JVR4I-Bh7B7TET.mjs";
|
|
12
12
|
import { forwardRef as G } from "./System.mjs";
|
|
13
|
-
import { u as Qe } from "./VEVQD5MH-
|
|
14
|
-
import { P as Ue, a as Xe } from "./MTZPJQMC-
|
|
13
|
+
import { u as Qe } from "./VEVQD5MH-CuegL0m0.mjs";
|
|
14
|
+
import { P as Ue, a as Xe } from "./MTZPJQMC-CMjAwC0N.mjs";
|
|
15
15
|
var Ye = le(
|
|
16
16
|
[Xe, ce],
|
|
17
17
|
[Ue, ie]
|
|
@@ -19,10 +19,10 @@ var Ye = le(
|
|
|
19
19
|
re(!1);
|
|
20
20
|
re(null);
|
|
21
21
|
function Ge(t = {}) {
|
|
22
|
-
var
|
|
22
|
+
var s = t, {
|
|
23
23
|
composite: o,
|
|
24
24
|
combobox: e
|
|
25
|
-
} =
|
|
25
|
+
} = s, n = Le(s, [
|
|
26
26
|
"composite",
|
|
27
27
|
"combobox"
|
|
28
28
|
]);
|
|
@@ -38,43 +38,43 @@ function Ge(t = {}) {
|
|
|
38
38
|
"focusShift",
|
|
39
39
|
"focusWrap"
|
|
40
40
|
], m = He(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
), c = m == null ? void 0 : m.getState(), d = De(V(O({},
|
|
41
|
+
n.store,
|
|
42
|
+
se(o, r),
|
|
43
|
+
se(e, r)
|
|
44
|
+
), c = m == null ? void 0 : m.getState(), d = De(V(O({}, n), {
|
|
45
45
|
store: m,
|
|
46
46
|
// We need to explicitly set the default value of `includesBaseElement` to
|
|
47
47
|
// `false` since we don't want the composite store to default it to `true`
|
|
48
48
|
// when the activeId state is null, which could be the case when rendering
|
|
49
49
|
// combobox with tab.
|
|
50
50
|
includesBaseElement: A(
|
|
51
|
-
|
|
51
|
+
n.includesBaseElement,
|
|
52
52
|
c == null ? void 0 : c.includesBaseElement,
|
|
53
53
|
!1
|
|
54
54
|
),
|
|
55
55
|
orientation: A(
|
|
56
|
-
|
|
56
|
+
n.orientation,
|
|
57
57
|
c == null ? void 0 : c.orientation,
|
|
58
58
|
"horizontal"
|
|
59
59
|
),
|
|
60
|
-
focusLoop: A(
|
|
60
|
+
focusLoop: A(n.focusLoop, c == null ? void 0 : c.focusLoop, !0)
|
|
61
61
|
})), a = Ve(), T = V(O({}, d.getState()), {
|
|
62
62
|
selectedId: A(
|
|
63
|
-
|
|
63
|
+
n.selectedId,
|
|
64
64
|
c == null ? void 0 : c.selectedId,
|
|
65
|
-
|
|
65
|
+
n.defaultSelectedId
|
|
66
66
|
),
|
|
67
67
|
selectOnMove: A(
|
|
68
|
-
|
|
68
|
+
n.selectOnMove,
|
|
69
69
|
c == null ? void 0 : c.selectOnMove,
|
|
70
70
|
!0
|
|
71
71
|
)
|
|
72
|
-
}), i =
|
|
72
|
+
}), i = We(T, d, m);
|
|
73
73
|
k(
|
|
74
74
|
i,
|
|
75
75
|
() => y(i, ["moves"], () => {
|
|
76
|
-
const { activeId: u, selectOnMove:
|
|
77
|
-
if (!
|
|
76
|
+
const { activeId: u, selectOnMove: f } = i.getState();
|
|
77
|
+
if (!f || !u) return;
|
|
78
78
|
const I = d.item(u);
|
|
79
79
|
I && (I.dimmed || I.disabled || i.setState("selectedId", I.id));
|
|
80
80
|
})
|
|
@@ -82,18 +82,18 @@ function Ge(t = {}) {
|
|
|
82
82
|
let v = !0;
|
|
83
83
|
k(
|
|
84
84
|
i,
|
|
85
|
-
() =>
|
|
85
|
+
() => Ke(i, ["selectedId"], (u, f) => {
|
|
86
86
|
if (!v) {
|
|
87
87
|
v = !0;
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
o && u.selectedId ===
|
|
90
|
+
o && u.selectedId === f.selectedId || i.setState("activeId", u.selectedId);
|
|
91
91
|
})
|
|
92
92
|
), k(
|
|
93
93
|
i,
|
|
94
94
|
() => y(i, ["selectedId", "renderedItems"], (u) => {
|
|
95
95
|
if (u.selectedId !== void 0) return;
|
|
96
|
-
const { activeId:
|
|
96
|
+
const { activeId: f, renderedItems: I } = i.getState(), S = d.item(f);
|
|
97
97
|
if (S && !S.disabled && !S.dimmed)
|
|
98
98
|
i.setState("selectedId", S.id);
|
|
99
99
|
else {
|
|
@@ -106,13 +106,13 @@ function Ge(t = {}) {
|
|
|
106
106
|
), k(
|
|
107
107
|
i,
|
|
108
108
|
() => y(i, ["renderedItems"], (u) => {
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
109
|
+
const f = u.renderedItems;
|
|
110
|
+
if (f.length)
|
|
111
111
|
return y(a, ["renderedItems"], (I) => {
|
|
112
112
|
const S = I.renderedItems;
|
|
113
113
|
S.some((P) => !P.tabId) && S.forEach((P, _) => {
|
|
114
114
|
if (P.tabId) return;
|
|
115
|
-
const N =
|
|
115
|
+
const N = f[_];
|
|
116
116
|
N && a.renderItem(V(O({}, P), { tabId: N.id }));
|
|
117
117
|
});
|
|
118
118
|
});
|
|
@@ -122,18 +122,18 @@ function Ge(t = {}) {
|
|
|
122
122
|
return k(i, () => {
|
|
123
123
|
const u = () => {
|
|
124
124
|
h = i.getState().selectedId;
|
|
125
|
-
},
|
|
125
|
+
}, f = () => {
|
|
126
126
|
v = !1, i.setState("selectedId", h);
|
|
127
127
|
};
|
|
128
128
|
if (o && "setSelectElement" in o)
|
|
129
129
|
return te(
|
|
130
130
|
y(o, ["value"], u),
|
|
131
|
-
y(o, ["mounted"],
|
|
131
|
+
y(o, ["mounted"], f)
|
|
132
132
|
);
|
|
133
133
|
if (e)
|
|
134
134
|
return te(
|
|
135
135
|
y(e, ["selectedValue"], u),
|
|
136
|
-
y(e, ["mounted"],
|
|
136
|
+
y(e, ["mounted"], f)
|
|
137
137
|
);
|
|
138
138
|
}), V(O(O({}, d), i), {
|
|
139
139
|
panels: a,
|
|
@@ -143,53 +143,53 @@ function Ge(t = {}) {
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
function Je(t,
|
|
147
|
-
oe(
|
|
148
|
-
const [e,
|
|
149
|
-
return oe(
|
|
146
|
+
function Je(t, s, o) {
|
|
147
|
+
oe(s, [o.composite, o.combobox]), t = Fe(t, s, o), ne(t, o, "selectedId", "setSelectedId"), ne(t, o, "selectOnMove");
|
|
148
|
+
const [e, n] = me(() => t.panels, {});
|
|
149
|
+
return oe(n, [t, n]), Object.assign(
|
|
150
150
|
ge(() => g(p({}, t), { panels: e }), [t, e]),
|
|
151
151
|
{ composite: o.composite, combobox: o.combobox }
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
function Ze(t = {}) {
|
|
155
|
-
const
|
|
155
|
+
const s = Qe(), o = qe() || s;
|
|
156
156
|
t = g(p({}, t), {
|
|
157
157
|
composite: t.composite !== void 0 ? t.composite : o,
|
|
158
|
-
combobox: t.combobox !== void 0 ? t.combobox :
|
|
158
|
+
combobox: t.combobox !== void 0 ? t.combobox : s
|
|
159
159
|
});
|
|
160
|
-
const [e,
|
|
161
|
-
return Je(e,
|
|
160
|
+
const [e, n] = me(Ge, t);
|
|
161
|
+
return Je(e, n, t);
|
|
162
162
|
}
|
|
163
163
|
var J = le(
|
|
164
164
|
[ce],
|
|
165
165
|
[ie]
|
|
166
|
-
), et = J.useScopedContext,
|
|
167
|
-
var o =
|
|
166
|
+
), et = J.useScopedContext, be = J.useProviderContext, fe = J.ScopedContextProvider, tt = "button", ot = U(function(s) {
|
|
167
|
+
var o = s, {
|
|
168
168
|
store: e,
|
|
169
|
-
getItem:
|
|
170
|
-
} = o, r =
|
|
169
|
+
getItem: n
|
|
170
|
+
} = o, r = Y(o, [
|
|
171
171
|
"store",
|
|
172
172
|
"getItem"
|
|
173
173
|
]), m;
|
|
174
174
|
const c = et();
|
|
175
|
-
e = e || c,
|
|
175
|
+
e = e || c, q(
|
|
176
176
|
e,
|
|
177
177
|
process.env.NODE_ENV !== "production" && "Tab must be wrapped in a TabList component."
|
|
178
178
|
);
|
|
179
|
-
const d = de(), a = r.id || d, T =
|
|
180
|
-
(
|
|
181
|
-
const w = g(p({},
|
|
182
|
-
return
|
|
179
|
+
const d = de(), a = r.id || d, T = Be(r), i = ae(
|
|
180
|
+
(b) => {
|
|
181
|
+
const w = g(p({}, b), { dimmed: T });
|
|
182
|
+
return n ? n(w) : w;
|
|
183
183
|
},
|
|
184
|
-
[T,
|
|
185
|
-
), v = r.onClick, h = H((
|
|
186
|
-
v == null || v(
|
|
184
|
+
[T, n]
|
|
185
|
+
), v = r.onClick, h = H((b) => {
|
|
186
|
+
v == null || v(b), !b.defaultPrevented && (e == null || e.setSelectedId(a));
|
|
187
187
|
}), u = e.panels.useState(
|
|
188
|
-
(
|
|
188
|
+
(b) => {
|
|
189
189
|
var w;
|
|
190
|
-
return (w =
|
|
190
|
+
return (w = b.items.find((l) => l.tabId === a)) == null ? void 0 : w.id;
|
|
191
191
|
}
|
|
192
|
-
),
|
|
192
|
+
), f = d ? r.shouldRegisterItem : !1, I = e.useState((b) => !!a && b.activeId === a), S = e.useState((b) => !!a && b.selectedId === a), E = e.useState((b) => !!e.item(b.activeId)), P = I || S && !E, _ = S || ((m = r.accessibleWhenDisabled) != null ? m : !0);
|
|
193
193
|
if (F(
|
|
194
194
|
e.combobox || e.composite,
|
|
195
195
|
"virtualFocus"
|
|
@@ -203,19 +203,19 @@ var J = le(
|
|
|
203
203
|
}, r), {
|
|
204
204
|
onClick: h
|
|
205
205
|
}), e.composite) {
|
|
206
|
-
const
|
|
206
|
+
const b = {
|
|
207
207
|
id: a,
|
|
208
208
|
accessibleWhenDisabled: _,
|
|
209
209
|
store: e.composite,
|
|
210
|
-
shouldRegisterItem: P &&
|
|
210
|
+
shouldRegisterItem: P && f,
|
|
211
211
|
rowId: r.rowId,
|
|
212
212
|
render: r.render
|
|
213
213
|
};
|
|
214
214
|
r = g(p({}, r), {
|
|
215
215
|
render: /* @__PURE__ */ M.jsx(
|
|
216
216
|
ee,
|
|
217
|
-
g(p({},
|
|
218
|
-
render: e.combobox && e.composite !== e.combobox ? /* @__PURE__ */ M.jsx(ee, g(p({},
|
|
217
|
+
g(p({}, b), {
|
|
218
|
+
render: e.combobox && e.composite !== e.combobox ? /* @__PURE__ */ M.jsx(ee, g(p({}, b), { store: e.combobox })) : b.render
|
|
219
219
|
})
|
|
220
220
|
)
|
|
221
221
|
});
|
|
@@ -225,48 +225,48 @@ var J = le(
|
|
|
225
225
|
}, r), {
|
|
226
226
|
accessibleWhenDisabled: _,
|
|
227
227
|
getItem: i,
|
|
228
|
-
shouldRegisterItem:
|
|
228
|
+
shouldRegisterItem: f
|
|
229
229
|
})), r;
|
|
230
|
-
}),
|
|
231
|
-
|
|
232
|
-
const o = ot(
|
|
233
|
-
return
|
|
230
|
+
}), st = Ne(
|
|
231
|
+
Q(function(s) {
|
|
232
|
+
const o = ot(s);
|
|
233
|
+
return X(tt, o);
|
|
234
234
|
})
|
|
235
|
-
),
|
|
236
|
-
function(
|
|
237
|
-
var o =
|
|
238
|
-
const r =
|
|
239
|
-
e = e || r,
|
|
235
|
+
), nt = "div", rt = U(
|
|
236
|
+
function(s) {
|
|
237
|
+
var o = s, { store: e } = o, n = Y(o, ["store"]);
|
|
238
|
+
const r = be();
|
|
239
|
+
e = e || r, q(
|
|
240
240
|
e,
|
|
241
241
|
process.env.NODE_ENV !== "production" && "TabList must receive a `store` prop or be wrapped in a TabProvider component."
|
|
242
242
|
);
|
|
243
243
|
const m = e.useState(
|
|
244
244
|
(c) => c.orientation === "both" ? void 0 : c.orientation
|
|
245
245
|
);
|
|
246
|
-
return
|
|
247
|
-
|
|
248
|
-
(c) => /* @__PURE__ */ M.jsx(
|
|
246
|
+
return n = ue(
|
|
247
|
+
n,
|
|
248
|
+
(c) => /* @__PURE__ */ M.jsx(fe, { value: e, children: c }),
|
|
249
249
|
[e]
|
|
250
|
-
), e.composite && (
|
|
250
|
+
), e.composite && (n = p({
|
|
251
251
|
focusable: !1
|
|
252
|
-
},
|
|
252
|
+
}, n)), n = p({
|
|
253
253
|
role: "tablist",
|
|
254
254
|
"aria-orientation": m
|
|
255
|
-
},
|
|
255
|
+
}, n), n = Me(p({ store: e }, n)), n;
|
|
256
256
|
}
|
|
257
|
-
), at =
|
|
258
|
-
const o = rt(
|
|
259
|
-
return
|
|
260
|
-
}), it = "div", ct =
|
|
261
|
-
function(
|
|
262
|
-
var o =
|
|
257
|
+
), at = Q(function(s) {
|
|
258
|
+
const o = rt(s);
|
|
259
|
+
return X(nt, o);
|
|
260
|
+
}), it = "div", ct = U(
|
|
261
|
+
function(s) {
|
|
262
|
+
var o = s, {
|
|
263
263
|
store: e,
|
|
264
|
-
unmountOnHide:
|
|
264
|
+
unmountOnHide: n,
|
|
265
265
|
tabId: r,
|
|
266
266
|
getItem: m,
|
|
267
267
|
scrollRestoration: c,
|
|
268
268
|
scrollElement: d
|
|
269
|
-
} = o, a =
|
|
269
|
+
} = o, a = Y(o, [
|
|
270
270
|
"store",
|
|
271
271
|
"unmountOnHide",
|
|
272
272
|
"tabId",
|
|
@@ -274,8 +274,8 @@ var J = le(
|
|
|
274
274
|
"scrollRestoration",
|
|
275
275
|
"scrollElement"
|
|
276
276
|
]);
|
|
277
|
-
const T =
|
|
278
|
-
e = e || T,
|
|
277
|
+
const T = be();
|
|
278
|
+
e = e || T, q(
|
|
279
279
|
e,
|
|
280
280
|
process.env.NODE_ENV !== "production" && "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
|
|
281
281
|
);
|
|
@@ -288,7 +288,7 @@ var J = le(
|
|
|
288
288
|
), u = F(
|
|
289
289
|
e,
|
|
290
290
|
(l) => !!h && l.selectedId === h
|
|
291
|
-
),
|
|
291
|
+
), f = je({ open: u }), I = F(f, "mounted"), S = z(
|
|
292
292
|
/* @__PURE__ */ new Map()
|
|
293
293
|
), E = H(() => {
|
|
294
294
|
const l = i.current;
|
|
@@ -329,8 +329,8 @@ var J = le(
|
|
|
329
329
|
return m ? m($) : $;
|
|
330
330
|
},
|
|
331
331
|
[v, r, m]
|
|
332
|
-
),
|
|
333
|
-
if (
|
|
332
|
+
), b = a.onKeyDown, w = H((l) => {
|
|
333
|
+
if (b == null || b(l), l.defaultPrevented || !(e != null && e.composite)) return;
|
|
334
334
|
const C = {
|
|
335
335
|
ArrowLeft: e.previous,
|
|
336
336
|
ArrowRight: e.next,
|
|
@@ -343,29 +343,29 @@ var J = le(
|
|
|
343
343
|
});
|
|
344
344
|
return a = ue(
|
|
345
345
|
a,
|
|
346
|
-
(l) => /* @__PURE__ */ M.jsx(
|
|
346
|
+
(l) => /* @__PURE__ */ M.jsx(fe, { value: e, children: l }),
|
|
347
347
|
[e]
|
|
348
348
|
), a = g(p({
|
|
349
349
|
id: v,
|
|
350
350
|
role: "tabpanel",
|
|
351
351
|
"aria-labelledby": h || void 0
|
|
352
352
|
}, a), {
|
|
353
|
-
children:
|
|
353
|
+
children: n && !I ? null : a.children,
|
|
354
354
|
ref: Oe(i, a.ref),
|
|
355
355
|
onKeyDown: w
|
|
356
356
|
}), a = ke(p({
|
|
357
357
|
// If the tab panel is rendered as part of another composite widget such
|
|
358
358
|
// as combobox, it should not be focusable.
|
|
359
359
|
focusable: !e.composite && !P
|
|
360
|
-
}, a)), a = ze(p({ store:
|
|
360
|
+
}, a)), a = ze(p({ store: f }, a)), a = Re(g(p({ store: e.panels }, a), { getItem: N })), a;
|
|
361
361
|
}
|
|
362
|
-
), lt =
|
|
363
|
-
const o = ct(
|
|
364
|
-
return
|
|
362
|
+
), lt = Q(function(s) {
|
|
363
|
+
const o = ct(s);
|
|
364
|
+
return X(it, o);
|
|
365
365
|
});
|
|
366
366
|
function W(t) {
|
|
367
|
-
var
|
|
368
|
-
return
|
|
367
|
+
var s = Te.toArray(t);
|
|
368
|
+
return s.reduce(function(o, e) {
|
|
369
369
|
return e.type === Pe ? o.concat(W(e.props.children)) : (o.push(e), o);
|
|
370
370
|
}, []);
|
|
371
371
|
}
|
|
@@ -436,88 +436,88 @@ const dt = j(at)(
|
|
|
436
436
|
({ orientation: t }) => D`
|
|
437
437
|
${t === "vertical" ? x("tabs.panel.vertical") : x("tabs.panel.horizontal")};
|
|
438
438
|
`
|
|
439
|
-
), mt = ({ offset: t = 0, size:
|
|
439
|
+
), mt = ({ offset: t = 0, size: s = 0 }) => D`
|
|
440
440
|
${x("tabs.activeBar.horizontal")};
|
|
441
441
|
left: 0;
|
|
442
442
|
bottom: 0;
|
|
443
|
-
width: ${
|
|
443
|
+
width: ${s}px;
|
|
444
444
|
transform: translateX(${t}px);
|
|
445
|
-
`,
|
|
445
|
+
`, bt = ({ offset: t = 0, size: s = 0 }) => D`
|
|
446
446
|
${x("tabs.activeBar.vertical")};
|
|
447
447
|
right: 0;
|
|
448
448
|
top: 0;
|
|
449
|
-
height: ${
|
|
449
|
+
height: ${s}px;
|
|
450
450
|
transform: translateY(${t}px);
|
|
451
|
-
`,
|
|
452
|
-
({ orientation: t, ...
|
|
451
|
+
`, ft = j.span(
|
|
452
|
+
({ orientation: t, ...s }) => D`
|
|
453
453
|
position: absolute;
|
|
454
|
-
${t === "vertical" ?
|
|
454
|
+
${t === "vertical" ? bt(s) : mt(s)}
|
|
455
455
|
will-change: width, transform;
|
|
456
456
|
transition: medium;
|
|
457
457
|
transition-property: transform, width;
|
|
458
458
|
`
|
|
459
459
|
), ve = (t) => {
|
|
460
460
|
if (!t || typeof window > "u") return 1;
|
|
461
|
-
const
|
|
462
|
-
return isNaN(
|
|
461
|
+
const s = Number(window.getComputedStyle(t).scale);
|
|
462
|
+
return isNaN(s) ? ve(t.parentElement) : s;
|
|
463
463
|
};
|
|
464
|
-
function pt(t,
|
|
465
|
-
const [e,
|
|
464
|
+
function pt(t, s, o) {
|
|
465
|
+
const [e, n] = K({}), { height: r, width: m } = $e();
|
|
466
466
|
return ye(() => {
|
|
467
467
|
const c = t.current;
|
|
468
|
-
if (!c || !
|
|
469
|
-
const d = c.getBoundingClientRect(), a =
|
|
468
|
+
if (!c || !s) return;
|
|
469
|
+
const d = c.getBoundingClientRect(), a = s.getBoundingClientRect(), T = ve(c);
|
|
470
470
|
if (o === "vertical") {
|
|
471
471
|
const i = a.top - d.top, v = a.height;
|
|
472
|
-
|
|
472
|
+
n({
|
|
473
473
|
size: v,
|
|
474
474
|
offset: i,
|
|
475
475
|
orientation: o
|
|
476
476
|
});
|
|
477
477
|
} else {
|
|
478
478
|
const i = (a.left - d.left + c.scrollLeft) / T, v = a.width / T;
|
|
479
|
-
|
|
479
|
+
n({
|
|
480
480
|
size: isNaN(v) ? 0 : v,
|
|
481
481
|
offset: isNaN(i) ? 0 : i,
|
|
482
482
|
orientation: o
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
}, [t,
|
|
485
|
+
}, [t, s, m, r, o]), e;
|
|
486
486
|
}
|
|
487
|
-
const Ie = ({ activeTab: t, listRef:
|
|
488
|
-
const e = pt(
|
|
489
|
-
return /* @__PURE__ */ L.createElement(
|
|
487
|
+
const Ie = ({ activeTab: t, listRef: s, orientation: o }) => {
|
|
488
|
+
const e = pt(s, t, o);
|
|
489
|
+
return /* @__PURE__ */ L.createElement(ft, { ...e });
|
|
490
490
|
};
|
|
491
491
|
Ie.displayName = "ActiveBar";
|
|
492
492
|
const vt = W.default || W;
|
|
493
|
-
function It(t,
|
|
493
|
+
function It(t, s) {
|
|
494
494
|
const [o, e] = K(null);
|
|
495
|
-
return [vt(
|
|
495
|
+
return [vt(s).map((r) => r.props.id === t ? Ce(r, { ref: e }) : r), o];
|
|
496
496
|
}
|
|
497
497
|
const Se = G(
|
|
498
|
-
({ children: t, size:
|
|
499
|
-
const r = z(), m = Ee(
|
|
500
|
-
return /* @__PURE__ */ L.createElement(dt, { orientation: c, ref: m, size:
|
|
498
|
+
({ children: t, size: s = "md", store: o, ...e }, n) => {
|
|
499
|
+
const r = z(), m = Ee(n, r), { orientation: c, selectedId: d } = o.useState(), [a, T] = It(d, t);
|
|
500
|
+
return /* @__PURE__ */ L.createElement(dt, { orientation: c, ref: m, size: s, store: o, ...e }, a, a.length > 1 && /* @__PURE__ */ L.createElement(Ie, { activeTab: T, listRef: r, orientation: c }));
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
503
|
Se.displayName = "TabList";
|
|
504
504
|
const xe = G(
|
|
505
|
-
({ children: t, store:
|
|
506
|
-
const r =
|
|
507
|
-
return /* @__PURE__ */ L.createElement(ut, { orientation: r, ref:
|
|
505
|
+
({ children: t, store: s, tabId: o, ...e }, n) => {
|
|
506
|
+
const r = s.useState("orientation");
|
|
507
|
+
return /* @__PURE__ */ L.createElement(ut, { orientation: r, ref: n, store: s, tabId: o, ...e }, t);
|
|
508
508
|
}
|
|
509
509
|
);
|
|
510
510
|
xe.displayName = "TabPanel";
|
|
511
511
|
const he = G(
|
|
512
|
-
({ as: t, children:
|
|
513
|
-
|
|
512
|
+
({ as: t, children: s, id: o, store: e, ...n }, r) => /* @__PURE__ */ L.createElement(
|
|
513
|
+
st,
|
|
514
514
|
{
|
|
515
515
|
id: o,
|
|
516
516
|
render: (m) => /* @__PURE__ */ L.createElement(pe, { as: t, ...m, ref: r }),
|
|
517
517
|
store: e,
|
|
518
|
-
...
|
|
518
|
+
...n
|
|
519
519
|
},
|
|
520
|
-
|
|
520
|
+
s
|
|
521
521
|
)
|
|
522
522
|
);
|
|
523
523
|
he.displayName = "Tab";
|
package/dist/Tag.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { w as C } from "./wrap-children-aq69jtFP.mjs";
|
|
4
|
-
import m, {
|
|
4
|
+
import m, { th as i, system as w, css as n } from "@xstyled/styled-components";
|
|
5
5
|
import { o as p } from "./overflow-ellipsis-DGV5Kgt-.mjs";
|
|
6
6
|
import { g } from "./get-max-width-height-DoUro2T7.mjs";
|
|
7
7
|
import { StyledIcon as S } from "./Icon.mjs";
|
|
8
8
|
import { forwardRef as b } from "./System.mjs";
|
|
9
9
|
import { C as A } from "./index-C7zM96J_.mjs";
|
|
10
|
-
const E = (
|
|
11
|
-
${i(`tags.shape.${
|
|
10
|
+
const E = (o, t, s) => n`
|
|
11
|
+
${i(`tags.shape.${o}`)}
|
|
12
12
|
padding: 0;
|
|
13
13
|
${(t || s) && n`
|
|
14
14
|
width: ${g(t || "0", s)};
|
|
15
15
|
height: ${g(t || "0", s)};
|
|
16
16
|
`}
|
|
17
17
|
`, h = m.div.withConfig({
|
|
18
|
-
shouldForwardProp: (
|
|
18
|
+
shouldForwardProp: (o) => !["hasClickAction", "hasLink", "hasRemoveAction"].includes(o)
|
|
19
19
|
})(
|
|
20
|
-
({ h:
|
|
20
|
+
({ h: o, hasClickAction: t, hasLink: s, hasRemoveAction: c, length: a, size: e, variant: r, w: l }) => n`
|
|
21
21
|
${i("tags.default")};
|
|
22
22
|
${i(`tags.variants.${r}`)};
|
|
23
|
-
${i(`tags.sizes.${
|
|
23
|
+
${i(`tags.sizes.${e}`)}
|
|
24
24
|
position: relative;
|
|
25
25
|
display: inline-flex;
|
|
26
26
|
align-items: center;
|
|
@@ -38,7 +38,7 @@ const E = (e, t, s) => n`
|
|
|
38
38
|
`}
|
|
39
39
|
${a === 1 && n`
|
|
40
40
|
justify-content: center;
|
|
41
|
-
${E(
|
|
41
|
+
${E(e, l, o)};
|
|
42
42
|
`};
|
|
43
43
|
|
|
44
44
|
${(s || t) && n`
|
|
@@ -60,8 +60,8 @@ const E = (e, t, s) => n`
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
& > svg {
|
|
63
|
-
width: ${i(`tags.icon.${
|
|
64
|
-
height: ${i(`tags.icon.${
|
|
63
|
+
width: ${i(`tags.icon.${e}`)};
|
|
64
|
+
height: ${i(`tags.icon.${e}`)};
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
> *:not(:only-child) {
|
|
@@ -78,9 +78,9 @@ const E = (e, t, s) => n`
|
|
|
78
78
|
}
|
|
79
79
|
`
|
|
80
80
|
), I = m.divBox(
|
|
81
|
-
({ size:
|
|
81
|
+
({ size: o }) => n`
|
|
82
82
|
position: absolute;
|
|
83
|
-
${i(`tags.sizes.${
|
|
83
|
+
${i(`tags.sizes.${o}`)};
|
|
84
84
|
top: 0;
|
|
85
85
|
bottom: 0;
|
|
86
86
|
right: 0;
|
|
@@ -93,12 +93,12 @@ const E = (e, t, s) => n`
|
|
|
93
93
|
display: flex;
|
|
94
94
|
`, R = b(
|
|
95
95
|
({
|
|
96
|
-
as:
|
|
96
|
+
as: o,
|
|
97
97
|
children: t,
|
|
98
98
|
dataTestId: s,
|
|
99
99
|
href: c,
|
|
100
100
|
onClick: a,
|
|
101
|
-
onRemove:
|
|
101
|
+
onRemove: e,
|
|
102
102
|
size: r = "md",
|
|
103
103
|
to: l,
|
|
104
104
|
variant: $ = "default",
|
|
@@ -108,11 +108,11 @@ const E = (e, t, s) => n`
|
|
|
108
108
|
return /* @__PURE__ */ d.createElement(
|
|
109
109
|
h,
|
|
110
110
|
{
|
|
111
|
-
as:
|
|
111
|
+
as: o,
|
|
112
112
|
"data-testid": s,
|
|
113
113
|
hasClickAction: !!a,
|
|
114
114
|
hasLink: v,
|
|
115
|
-
hasRemoveAction: !!
|
|
115
|
+
hasRemoveAction: !!e,
|
|
116
116
|
href: c,
|
|
117
117
|
length: x,
|
|
118
118
|
onClick: a,
|
|
@@ -123,7 +123,7 @@ const E = (e, t, s) => n`
|
|
|
123
123
|
...f
|
|
124
124
|
},
|
|
125
125
|
y,
|
|
126
|
-
!!
|
|
126
|
+
!!e && /* @__PURE__ */ d.createElement(I, { size: r }, /* @__PURE__ */ d.createElement(k, { onClick: e, title: "Remove", type: "button" }, /* @__PURE__ */ d.createElement(A, { size: "xs", title: "Remove" })))
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
);
|
package/dist/Text.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import p from "react";
|
|
3
|
-
import f, {
|
|
3
|
+
import f, { th as d, system as b, css as l } from "@xstyled/styled-components";
|
|
4
4
|
import { forwardRef as x } from "./System.mjs";
|
|
5
5
|
const g = {
|
|
6
6
|
h0: "h1",
|
package/dist/Textarea.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import u from "react";
|
|
3
|
-
import w, {
|
|
4
|
-
import { d as T } from "./field-styles-
|
|
3
|
+
import w, { th as g, css as y } from "@xstyled/styled-components";
|
|
4
|
+
import { d as T } from "./field-styles-CfVLcVQp.mjs";
|
|
5
5
|
import { shouldForwardProp as $, forwardRef as F } from "./System.mjs";
|
|
6
6
|
const R = w.textareaBox.withConfig({ shouldForwardProp: $ })(
|
|
7
|
-
({ size: e, variant: t }) =>
|
|
7
|
+
({ size: e, variant: t }) => y`
|
|
8
8
|
${T({ size: e, variant: t })};
|
|
9
|
-
${
|
|
9
|
+
${g("textareas")};
|
|
10
10
|
line-height: lg;
|
|
11
11
|
`
|
|
12
12
|
), _ = F(
|