welcome-ui 0.0.0-dev.1759222868187 → 0.0.0-dev.1759252708223
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/4CMBR7SL-DXQR7a9T.js +308 -0
- package/dist/{ASMQKSDT-CyLroRiC.js → ASMQKSDT-GE79MhKX.js} +12 -12
- package/dist/{AXB53BZF-DBGkYxAF.js → AXB53BZF-ClCOTGI-.js} +3 -3
- package/dist/Accordion.js +3 -3
- package/dist/{BYC7LY2E-sahp7oqU.js → BYC7LY2E-DeD1QoQl.js} +108 -108
- package/dist/Button.js +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/Drawer.js +4 -4
- package/dist/DropdownMenu.js +140 -139
- package/dist/FieldGroup.css +1 -0
- package/dist/FieldGroup.js +17 -0
- package/dist/ITI7HKP4-MlgGFEDr.js +187 -0
- package/dist/InputText.css +1 -1
- package/dist/InputText.js +34 -34
- package/dist/{JC64G2H7-oyI4lllS.js → JC64G2H7-jNBZrGfv.js} +126 -126
- package/dist/{KUU7WJ55-iyg84yrl.js → KUU7WJ55-CRa_letc.js} +1 -1
- package/dist/{LVA2YJMS-BmLXjKP9.js → LVA2YJMS-C6Bdr5Em.js} +35 -35
- package/dist/Label.js +13 -13
- package/dist/{MTZPJQMC-CEQxLFTu.js → MTZPJQMC-DgscjgO6.js} +2 -2
- package/dist/Modal.js +3 -3
- package/dist/{NLEBE274-BPGIVzin.js → NLEBE274-BlP1TDp5.js} +16 -16
- package/dist/{P2CTZE2T-CHi91Yb8.js → P2CTZE2T-DqsBJuIy.js} +32 -32
- package/dist/{P4IRICAX-CIAVAXlF.js → P4IRICAX-CvgWqpy0.js} +3 -3
- package/dist/Popover.js +3 -3
- package/dist/{QYJ6MIDR-DRpzeJNT.js → QYJ6MIDR-BWg_HLyh.js} +3 -3
- package/dist/Radio.css +1 -1
- package/dist/Radio.js +39 -38
- package/dist/RadioGroup.css +1 -0
- package/dist/RadioGroup.js +72 -0
- package/dist/RadioTab.js +1 -1
- package/dist/{SYRFVSLH-vrz7_KNH.js → SYRFVSLH-D5X1Ofws.js} +3 -3
- package/dist/Slider.css +1 -0
- package/dist/Slider.js +423 -0
- package/dist/Tabs.js +79 -78
- package/dist/Toggle.js +1 -1
- package/dist/Tooltip.js +31 -31
- package/dist/{VGCJ63VH-CV_AMRHp.js → VGCJ63VH-Bdd6jzVW.js} +31 -31
- package/dist/{X5NMLKT6-DqDJBMYO.js → X5NMLKT6-C7-nsL44.js} +2 -2
- package/dist/{YV4JVR4I-CvfP1OCB.js → YV4JVR4I-BN6SUVuh.js} +54 -54
- package/dist/types/components/FieldGroup/index.d.ts +1 -0
- package/dist/types/components/FieldGroup/types.d.ts +8 -0
- package/dist/types/components/Label/index.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +2 -0
- package/dist/types/components/RadioGroup/types.d.ts +17 -0
- package/dist/types/components/Slider/Range.d.ts +6 -0
- package/dist/types/components/Slider/index.d.ts +10 -0
- package/dist/types/components/Slider/types.d.ts +28 -0
- package/package.json +1 -1
- package/dist/ITI7HKP4-BwM8j6XI.js +0 -488
package/dist/DropdownMenu.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _, jsxs as Le } from "react/jsx-runtime";
|
|
3
|
-
import { h as ue, j as Ve, C as we, a as ge,
|
|
4
|
-
import { H as $e, a as Ke, c as Be, u as
|
|
5
|
-
import { c as N, _ as O, i as B, a6 as qe, e as se, u as $, a8 as U,
|
|
3
|
+
import { h as ue, j as Ve, C as we, a as ge, c as Re } from "./P2CTZE2T-DqsBJuIy.js";
|
|
4
|
+
import { H as $e, a as Ke, c as Be, u as We, b as je, e as ze, d as Ue } from "./BYC7LY2E-DeD1QoQl.js";
|
|
5
|
+
import { c as N, _ as O, i as B, a6 as qe, e as se, u as $, a8 as U, A as Ge, b as x, j as ee, d as b, G as Me, X as Ze, Y as Je, D as Se, f as k, a as F, O as Ce, N as Xe, q as Ye, p as Qe, aa as et, t as _e, H as tt, I as G, J as z, K as R, a1 as rt, L as nt, E as Ee, v as xe, ab as ot, W as st, m as at, ac as ye, g as ut, ad as it, ae as ct } from "./LVA2YJMS-C6Bdr5Em.js";
|
|
6
6
|
import { useCallback as lt, useRef as ie, createContext as Oe, useState as Pe, useEffect as Ae, createRef as dt, useMemo as ft, forwardRef as ce } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
import { m as
|
|
10
|
-
import { c as
|
|
7
|
+
import { b as mt, a as pt } from "./ITI7HKP4-MlgGFEDr.js";
|
|
8
|
+
import { i as vt } from "./VGCJ63VH-Bdd6jzVW.js";
|
|
9
|
+
import { m as bt, o as ht, p as wt, t as gt, c as Mt, s as pe, d as ve, a as St, b as Ct, u as D } from "./YV4JVR4I-BN6SUVuh.js";
|
|
10
|
+
import { c as _t, R as Et } from "./JC64G2H7-jNBZrGfv.js";
|
|
11
11
|
import { c as te } from "./classNames-qiokGROM.js";
|
|
12
12
|
import { f as Te } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
13
|
-
import { u as
|
|
13
|
+
import { u as xt } from "./QYJ6MIDR-BWg_HLyh.js";
|
|
14
|
+
import { c as yt, u as Ot } from "./4CMBR7SL-DXQR7a9T.js";
|
|
14
15
|
var Pt = "div";
|
|
15
16
|
function He(n) {
|
|
16
17
|
const t = n.relatedTarget;
|
|
@@ -18,14 +19,14 @@ function He(n) {
|
|
|
18
19
|
}
|
|
19
20
|
function At(n) {
|
|
20
21
|
const t = He(n);
|
|
21
|
-
return t ?
|
|
22
|
+
return t ? Ze(n.currentTarget, t) : !1;
|
|
22
23
|
}
|
|
23
24
|
var ae = Symbol("composite-hover");
|
|
24
25
|
function Tt(n) {
|
|
25
26
|
let t = He(n);
|
|
26
27
|
if (!t) return !1;
|
|
27
28
|
do {
|
|
28
|
-
if (
|
|
29
|
+
if (Je(t, ae) && t[ae]) return !0;
|
|
29
30
|
t = t.parentElement;
|
|
30
31
|
} while (t);
|
|
31
32
|
return !1;
|
|
@@ -50,7 +51,7 @@ var Ie = N(
|
|
|
50
51
|
if (d == null || d(f), !f.defaultPrevented && c() && i(f)) {
|
|
51
52
|
if (!U(f.currentTarget)) {
|
|
52
53
|
const M = e == null ? void 0 : e.getState().baseElement;
|
|
53
|
-
M && !
|
|
54
|
+
M && !Ge(M) && M.focus();
|
|
54
55
|
}
|
|
55
56
|
e == null || e.setActiveId(f.currentTarget.id);
|
|
56
57
|
}
|
|
@@ -60,7 +61,7 @@ var Ie = N(
|
|
|
60
61
|
}), m = lt((f) => {
|
|
61
62
|
f && (f[ae] = !0);
|
|
62
63
|
}, []);
|
|
63
|
-
return a =
|
|
64
|
+
return a = x(b({}, a), {
|
|
64
65
|
ref: ee(m, a.ref),
|
|
65
66
|
onMouseMove: w,
|
|
66
67
|
onMouseLeave: C
|
|
@@ -68,9 +69,9 @@ var Ie = N(
|
|
|
68
69
|
}
|
|
69
70
|
);
|
|
70
71
|
Se(
|
|
71
|
-
|
|
72
|
+
k(function(t) {
|
|
72
73
|
const r = Ie(t);
|
|
73
|
-
return
|
|
74
|
+
return F(Pt, r);
|
|
74
75
|
})
|
|
75
76
|
);
|
|
76
77
|
var Ht = "hr", De = N(
|
|
@@ -82,9 +83,9 @@ var Ht = "hr", De = N(
|
|
|
82
83
|
}, o), o;
|
|
83
84
|
}
|
|
84
85
|
);
|
|
85
|
-
|
|
86
|
+
k(function(t) {
|
|
86
87
|
const r = De(t);
|
|
87
|
-
return
|
|
88
|
+
return F(Ht, r);
|
|
88
89
|
});
|
|
89
90
|
var It = "hr", Ne = N(function(t) {
|
|
90
91
|
var r = t, { store: e } = r, o = O(r, ["store"]);
|
|
@@ -96,11 +97,11 @@ var It = "hr", Ne = N(function(t) {
|
|
|
96
97
|
const a = e.useState(
|
|
97
98
|
(s) => s.orientation === "horizontal" ? "vertical" : "horizontal"
|
|
98
99
|
);
|
|
99
|
-
return o = De(
|
|
100
|
+
return o = De(x(b({}, o), { orientation: a })), o;
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
+
k(function(t) {
|
|
102
103
|
const r = Ne(t);
|
|
103
|
-
return
|
|
104
|
+
return F(It, r);
|
|
104
105
|
});
|
|
105
106
|
var Dt = "div", L = "";
|
|
106
107
|
function oe() {
|
|
@@ -108,17 +109,17 @@ function oe() {
|
|
|
108
109
|
}
|
|
109
110
|
function Nt(n) {
|
|
110
111
|
const t = n.target;
|
|
111
|
-
return t &&
|
|
112
|
+
return t && Ye(t) ? !1 : n.key === " " && L.length ? !0 : n.key.length === 1 && !n.ctrlKey && !n.altKey && !n.metaKey && /^[\p{Letter}\p{Number}]$/u.test(n.key);
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
114
|
+
function kt(n, t) {
|
|
115
|
+
if (Qe(n)) return !0;
|
|
115
116
|
const r = n.target;
|
|
116
117
|
return r ? t.some((o) => o.element === r) : !1;
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
+
function Ft(n) {
|
|
119
120
|
return n.filter((t) => !t.disabled);
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
+
function Q(n, t) {
|
|
122
123
|
var r;
|
|
123
124
|
const e = ((r = n.element) == null ? void 0 : r.textContent) || n.children || // The composite item object itself doesn't include a value property, but
|
|
124
125
|
// other components like Select do. Since CompositeTypeahead is a generic
|
|
@@ -130,8 +131,8 @@ function Y(n, t) {
|
|
|
130
131
|
function Lt(n, t, r) {
|
|
131
132
|
if (!r) return n;
|
|
132
133
|
const e = n.find((o) => o.id === r);
|
|
133
|
-
return !e || !
|
|
134
|
-
n.filter((o) =>
|
|
134
|
+
return !e || !Q(e, t) || L !== t && Q(e, L) ? n : (L = t, Ve(
|
|
135
|
+
n.filter((o) => Q(o, L)),
|
|
135
136
|
r
|
|
136
137
|
).filter((o) => o.id !== r));
|
|
137
138
|
}
|
|
@@ -147,7 +148,7 @@ var le = N(function(t) {
|
|
|
147
148
|
if (!Nt(i))
|
|
148
149
|
return oe();
|
|
149
150
|
const { renderedItems: w, items: p, activeId: l, id: C } = e.getState();
|
|
150
|
-
let m =
|
|
151
|
+
let m = Ft(
|
|
151
152
|
p.length > w.length ? p : w
|
|
152
153
|
);
|
|
153
154
|
const f = Ce(i.currentTarget), M = `[data-offscreen-id="${C}"]`, v = f.querySelectorAll(M);
|
|
@@ -155,38 +156,38 @@ var le = N(function(t) {
|
|
|
155
156
|
const H = S.ariaDisabled === "true" || "disabled" in S && !!S.disabled;
|
|
156
157
|
m.push({ id: S.id, element: S, disabled: H });
|
|
157
158
|
}
|
|
158
|
-
if (v.length && (m =
|
|
159
|
+
if (v.length && (m = Xe(m, (S) => S.element)), !kt(i, m)) return oe();
|
|
159
160
|
i.preventDefault(), window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
160
161
|
L = "";
|
|
161
162
|
}, 500);
|
|
162
163
|
const P = i.key.toLowerCase();
|
|
163
164
|
L += P, m = Lt(m, P, l);
|
|
164
|
-
const
|
|
165
|
-
|
|
165
|
+
const y = m.find((S) => Q(S, L));
|
|
166
|
+
y ? e.move(y.id) : oe();
|
|
166
167
|
});
|
|
167
|
-
return u =
|
|
168
|
+
return u = x(b({}, u), {
|
|
168
169
|
onKeyDownCapture: d
|
|
169
170
|
}), Me(u);
|
|
170
171
|
});
|
|
171
|
-
|
|
172
|
+
k(function(t) {
|
|
172
173
|
const r = le(t);
|
|
173
|
-
return
|
|
174
|
+
return F(Dt, r);
|
|
174
175
|
});
|
|
175
|
-
var
|
|
176
|
+
var ke = _e(
|
|
176
177
|
[ge],
|
|
177
178
|
[we]
|
|
178
|
-
), Vt =
|
|
179
|
+
), Vt = ke.useContext, Rt = ke.useScopedContext;
|
|
179
180
|
Oe(
|
|
180
181
|
void 0
|
|
181
182
|
);
|
|
182
|
-
var
|
|
183
|
+
var Z = _e(
|
|
183
184
|
[ge, Ke],
|
|
184
185
|
[we, $e]
|
|
185
|
-
), de =
|
|
186
|
+
), de = Z.useContext, $t = Z.useScopedContext, re = Z.useProviderContext, Kt = Z.ContextProvider, Bt = Z.ScopedContextProvider;
|
|
186
187
|
Oe(
|
|
187
188
|
void 0
|
|
188
189
|
);
|
|
189
|
-
function
|
|
190
|
+
function Wt(n = {}) {
|
|
190
191
|
var t = n, {
|
|
191
192
|
combobox: r,
|
|
192
193
|
parent: e,
|
|
@@ -196,10 +197,10 @@ function zt(n = {}) {
|
|
|
196
197
|
"parent",
|
|
197
198
|
"menubar"
|
|
198
199
|
]);
|
|
199
|
-
const a = !!o && !e, s =
|
|
200
|
+
const a = !!o && !e, s = bt(
|
|
200
201
|
u.store,
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
wt(e, ["values"]),
|
|
203
|
+
ht(r, [
|
|
203
204
|
"arrowElement",
|
|
204
205
|
"anchorElement",
|
|
205
206
|
"contentElement",
|
|
@@ -207,36 +208,36 @@ function zt(n = {}) {
|
|
|
207
208
|
"disclosureElement"
|
|
208
209
|
])
|
|
209
210
|
);
|
|
210
|
-
|
|
211
|
-
const c = s.getState(), d =
|
|
211
|
+
gt(u, s);
|
|
212
|
+
const c = s.getState(), d = yt(G(R({}, u), {
|
|
212
213
|
store: s,
|
|
213
|
-
orientation:
|
|
214
|
+
orientation: z(
|
|
214
215
|
u.orientation,
|
|
215
216
|
c.orientation,
|
|
216
217
|
"vertical"
|
|
217
218
|
)
|
|
218
|
-
})), i = Be(
|
|
219
|
+
})), i = Be(G(R({}, u), {
|
|
219
220
|
store: s,
|
|
220
|
-
placement:
|
|
221
|
+
placement: z(
|
|
221
222
|
u.placement,
|
|
222
223
|
c.placement,
|
|
223
224
|
"bottom-start"
|
|
224
225
|
),
|
|
225
|
-
timeout:
|
|
226
|
+
timeout: z(
|
|
226
227
|
u.timeout,
|
|
227
228
|
c.timeout,
|
|
228
229
|
a ? 0 : 150
|
|
229
230
|
),
|
|
230
|
-
hideTimeout:
|
|
231
|
-
})), w =
|
|
232
|
-
initialFocus:
|
|
233
|
-
values:
|
|
231
|
+
hideTimeout: z(u.hideTimeout, c.hideTimeout, 0)
|
|
232
|
+
})), w = G(R(R({}, d.getState()), i.getState()), {
|
|
233
|
+
initialFocus: z(c.initialFocus, "container"),
|
|
234
|
+
values: z(
|
|
234
235
|
u.values,
|
|
235
236
|
c.values,
|
|
236
237
|
u.defaultValues,
|
|
237
238
|
{}
|
|
238
239
|
)
|
|
239
|
-
}), p =
|
|
240
|
+
}), p = Mt(w, d, i, s);
|
|
240
241
|
return pe(
|
|
241
242
|
p,
|
|
242
243
|
() => ve(p, ["mounted"], (l) => {
|
|
@@ -250,7 +251,7 @@ function zt(n = {}) {
|
|
|
250
251
|
l.orientation === "vertical" ? "right-start" : "bottom-start"
|
|
251
252
|
);
|
|
252
253
|
})
|
|
253
|
-
),
|
|
254
|
+
), G(R(R(R({}, d), i), p), {
|
|
254
255
|
combobox: r,
|
|
255
256
|
parent: e,
|
|
256
257
|
menubar: o,
|
|
@@ -262,17 +263,17 @@ function zt(n = {}) {
|
|
|
262
263
|
setValue: (l, C) => {
|
|
263
264
|
l !== "__proto__" && l !== "constructor" && (Array.isArray(l) || p.setState("values", (m) => {
|
|
264
265
|
const f = m[l], M = rt(C, f);
|
|
265
|
-
return M === f ? m :
|
|
266
|
+
return M === f ? m : G(R({}, m), {
|
|
266
267
|
[l]: M !== void 0 && M
|
|
267
268
|
});
|
|
268
269
|
}));
|
|
269
270
|
}
|
|
270
271
|
});
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
-
return nt(t, [r.combobox, r.parent, r.menubar]),
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
function jt(n, t, r) {
|
|
274
|
+
return nt(t, [r.combobox, r.parent, r.menubar]), Ct(n, r, "values", "setValues"), Object.assign(
|
|
275
|
+
We(
|
|
276
|
+
Ot(n, t, r),
|
|
276
277
|
t,
|
|
277
278
|
r
|
|
278
279
|
),
|
|
@@ -283,17 +284,17 @@ function Wt(n, t, r) {
|
|
|
283
284
|
}
|
|
284
285
|
);
|
|
285
286
|
}
|
|
286
|
-
function
|
|
287
|
-
const t = de(), r = Vt(), e =
|
|
288
|
-
n =
|
|
287
|
+
function Lr(n = {}) {
|
|
288
|
+
const t = de(), r = Vt(), e = mt();
|
|
289
|
+
n = x(b({}, n), {
|
|
289
290
|
parent: n.parent !== void 0 ? n.parent : t,
|
|
290
291
|
menubar: n.menubar !== void 0 ? n.menubar : r,
|
|
291
292
|
combobox: n.combobox !== void 0 ? n.combobox : e
|
|
292
293
|
});
|
|
293
|
-
const [o, u] =
|
|
294
|
-
return
|
|
294
|
+
const [o, u] = St(Wt, n);
|
|
295
|
+
return jt(o, u, n);
|
|
295
296
|
}
|
|
296
|
-
var
|
|
297
|
+
var zt = "div";
|
|
297
298
|
function Ut(n) {
|
|
298
299
|
var t = n, { store: r } = t, e = O(t, ["store"]);
|
|
299
300
|
const [o, u] = Pe(void 0), a = e["aria-label"], s = D(r, "disclosureElement"), c = D(r, "contentElement");
|
|
@@ -305,7 +306,7 @@ function Ut(n) {
|
|
|
305
306
|
a || i.hasAttribute("aria-label") ? u(void 0) : d.id && u(d.id);
|
|
306
307
|
}, [a, s, c]), o;
|
|
307
308
|
}
|
|
308
|
-
var
|
|
309
|
+
var Fe = N(
|
|
309
310
|
function(t) {
|
|
310
311
|
var r = t, { store: e, alwaysVisible: o, composite: u } = r, a = O(r, ["store", "alwaysVisible", "composite"]);
|
|
311
312
|
const s = re();
|
|
@@ -313,7 +314,7 @@ var ke = N(
|
|
|
313
314
|
e,
|
|
314
315
|
process.env.NODE_ENV !== "production" && "MenuList must receive a `store` prop or be wrapped in a MenuProvider component."
|
|
315
316
|
);
|
|
316
|
-
const c = e.parent, d = e.menubar, i = !!c, w =
|
|
317
|
+
const c = e.parent, d = e.menubar, i = !!c, w = Ee(a.id), p = a.onKeyDown, l = e.useState(
|
|
317
318
|
(g) => g.placement.split("-")[0]
|
|
318
319
|
), C = e.useState(
|
|
319
320
|
(g) => g.orientation === "both" ? void 0 : g.orientation
|
|
@@ -355,16 +356,16 @@ var ke = N(
|
|
|
355
356
|
}
|
|
356
357
|
}
|
|
357
358
|
});
|
|
358
|
-
a =
|
|
359
|
+
a = xe(
|
|
359
360
|
a,
|
|
360
361
|
(g) => /* @__PURE__ */ _(Bt, { value: e, children: g }),
|
|
361
362
|
[e]
|
|
362
363
|
);
|
|
363
|
-
const v = Ut(b({ store: e }, a)), P = e.useState("mounted"),
|
|
364
|
-
a =
|
|
364
|
+
const v = Ut(b({ store: e }, a)), P = e.useState("mounted"), y = vt(P, a.hidden, o), S = y ? x(b({}, a.style), { display: "none" }) : a.style;
|
|
365
|
+
a = x(b({
|
|
365
366
|
id: w,
|
|
366
367
|
"aria-labelledby": v,
|
|
367
|
-
hidden:
|
|
368
|
+
hidden: y
|
|
368
369
|
}, a), {
|
|
369
370
|
ref: ee(w ? e.setContentElement : null, a.ref),
|
|
370
371
|
style: S,
|
|
@@ -374,14 +375,14 @@ var ke = N(
|
|
|
374
375
|
return u = u ?? !H, u && (a = b({
|
|
375
376
|
role: "menu",
|
|
376
377
|
"aria-orientation": C
|
|
377
|
-
}, a)), a =
|
|
378
|
+
}, a)), a = pt(b({ store: e, composite: u }, a)), a = le(b({ store: e, typeahead: !H }, a)), a;
|
|
378
379
|
}
|
|
379
380
|
);
|
|
380
|
-
|
|
381
|
-
const r =
|
|
382
|
-
return
|
|
381
|
+
k(function(t) {
|
|
382
|
+
const r = Fe(t);
|
|
383
|
+
return F(zt, r);
|
|
383
384
|
});
|
|
384
|
-
var qt = "div",
|
|
385
|
+
var qt = "div", Gt = N(function(t) {
|
|
385
386
|
var r = t, {
|
|
386
387
|
store: e,
|
|
387
388
|
modal: o = !1,
|
|
@@ -405,64 +406,64 @@ var qt = "div", Zt = N(function(t) {
|
|
|
405
406
|
process.env.NODE_ENV !== "production" && "Menu must receive a `store` prop or be wrapped in a MenuProvider component."
|
|
406
407
|
);
|
|
407
408
|
const p = ie(null), l = e.parent, C = e.menubar, m = !!l, f = !!C && !m;
|
|
408
|
-
i =
|
|
409
|
+
i = x(b({}, i), {
|
|
409
410
|
ref: ee(p, i.ref)
|
|
410
411
|
});
|
|
411
|
-
const M =
|
|
412
|
+
const M = Fe(b({
|
|
412
413
|
store: e,
|
|
413
414
|
alwaysVisible: d
|
|
414
415
|
}, i)), { "aria-labelledby": v } = M;
|
|
415
416
|
i = O(M, ["aria-labelledby"]);
|
|
416
|
-
const [
|
|
417
|
+
const [y, S] = Pe(), H = e.useState("autoFocusOnShow"), g = e.useState("initialFocus"), W = e.useState("baseElement"), A = e.useState("renderedItems");
|
|
417
418
|
Ae(() => {
|
|
418
419
|
let I = !1;
|
|
419
|
-
return S((
|
|
420
|
-
var
|
|
420
|
+
return S((E) => {
|
|
421
|
+
var X, fe, me;
|
|
421
422
|
if (I || !H) return;
|
|
422
|
-
if ((
|
|
423
|
-
const
|
|
423
|
+
if ((X = E == null ? void 0 : E.current) != null && X.isConnected) return E;
|
|
424
|
+
const Y = dt();
|
|
424
425
|
switch (g) {
|
|
425
426
|
case "first":
|
|
426
|
-
|
|
427
|
+
Y.current = ((fe = A.find((q) => !q.disabled && q.element)) == null ? void 0 : fe.element) || null;
|
|
427
428
|
break;
|
|
428
429
|
case "last":
|
|
429
|
-
|
|
430
|
+
Y.current = ((me = [...A].reverse().find((q) => !q.disabled && q.element)) == null ? void 0 : me.element) || null;
|
|
430
431
|
break;
|
|
431
432
|
default:
|
|
432
|
-
|
|
433
|
+
Y.current = W;
|
|
433
434
|
}
|
|
434
|
-
return
|
|
435
|
+
return Y;
|
|
435
436
|
}), () => {
|
|
436
437
|
I = !0;
|
|
437
438
|
};
|
|
438
|
-
}, [e, H, g, A,
|
|
439
|
-
const V = m ? !1 : o, h = !!s, T = !!
|
|
439
|
+
}, [e, H, g, A, W]);
|
|
440
|
+
const V = m ? !1 : o, h = !!s, T = !!y || !!i.initialFocus || !!V, j = D(
|
|
440
441
|
e.combobox || e,
|
|
441
442
|
"contentElement"
|
|
442
443
|
), K = D(
|
|
443
444
|
(l == null ? void 0 : l.combobox) || l,
|
|
444
445
|
"contentElement"
|
|
445
|
-
),
|
|
446
|
-
if (!K || !
|
|
447
|
-
const I =
|
|
448
|
-
if (!((
|
|
446
|
+
), J = ft(() => {
|
|
447
|
+
if (!K || !j) return;
|
|
448
|
+
const I = j.getAttribute("role"), E = K.getAttribute("role");
|
|
449
|
+
if (!((E === "menu" || E === "menubar") && I === "menu"))
|
|
449
450
|
return K;
|
|
450
|
-
}, [
|
|
451
|
-
return
|
|
452
|
-
preserveTabOrderAnchor:
|
|
453
|
-
}, i)), i =
|
|
451
|
+
}, [j, K]);
|
|
452
|
+
return J !== void 0 && (i = b({
|
|
453
|
+
preserveTabOrderAnchor: J
|
|
454
|
+
}, i)), i = je(x(b({
|
|
454
455
|
store: e,
|
|
455
456
|
alwaysVisible: d,
|
|
456
|
-
initialFocus:
|
|
457
|
+
initialFocus: y,
|
|
457
458
|
autoFocusOnShow: h ? T && s : H || !!V
|
|
458
459
|
}, i), {
|
|
459
460
|
hideOnEscape(I) {
|
|
460
461
|
return st(a, I) ? !1 : (e == null || e.hideAll(), !0);
|
|
461
462
|
},
|
|
462
463
|
hideOnHoverOutside(I) {
|
|
463
|
-
const
|
|
464
|
-
return (typeof c == "function" ? c(I) : c ?? (m ? !0 : f ?
|
|
465
|
-
U(
|
|
464
|
+
const E = e == null ? void 0 : e.getState().disclosureElement;
|
|
465
|
+
return (typeof c == "function" ? c(I) : c ?? (m ? !0 : f ? E ? !U(E) : !0 : !1)) ? I.defaultPrevented || !m || !E || (ot(E, "mouseout", I), !U(E)) ? !0 : (requestAnimationFrame(() => {
|
|
466
|
+
U(E) || e == null || e.hide();
|
|
466
467
|
}), !1) : !1;
|
|
467
468
|
},
|
|
468
469
|
modal: V,
|
|
@@ -471,22 +472,22 @@ var qt = "div", Zt = N(function(t) {
|
|
|
471
472
|
})), i = b({
|
|
472
473
|
"aria-labelledby": v
|
|
473
474
|
}, i), i;
|
|
474
|
-
}),
|
|
475
|
-
|
|
476
|
-
const r =
|
|
477
|
-
return
|
|
475
|
+
}), Zt = _t(
|
|
476
|
+
k(function(t) {
|
|
477
|
+
const r = Gt(t);
|
|
478
|
+
return F(qt, r);
|
|
478
479
|
}),
|
|
479
480
|
re
|
|
480
|
-
),
|
|
481
|
+
), Jt = "div", Xt = N(
|
|
481
482
|
function(t) {
|
|
482
483
|
var r = t, { store: e } = r, o = O(r, ["store"]);
|
|
483
484
|
const u = de();
|
|
484
|
-
return e = e || u,
|
|
485
|
+
return e = e || u, ze(b({ store: e }, o));
|
|
485
486
|
}
|
|
486
|
-
),
|
|
487
|
-
const r =
|
|
488
|
-
return
|
|
489
|
-
}),
|
|
487
|
+
), Yt = k(function(t) {
|
|
488
|
+
const r = Xt(t);
|
|
489
|
+
return F(Jt, r);
|
|
490
|
+
}), Qt = "button";
|
|
490
491
|
function er(n, t) {
|
|
491
492
|
return {
|
|
492
493
|
ArrowDown: t === "bottom" || t === "top" ? "first" : !1,
|
|
@@ -526,36 +527,36 @@ var tr = N(
|
|
|
526
527
|
}), v = D(
|
|
527
528
|
e,
|
|
528
529
|
(h) => h.placement.split("-")[0]
|
|
529
|
-
), P = s.onKeyDown,
|
|
530
|
+
), P = s.onKeyDown, y = $((h) => {
|
|
530
531
|
if (P == null || P(h), C || h.defaultPrevented) return;
|
|
531
532
|
const T = er(h, v);
|
|
532
533
|
T && (h.preventDefault(), m(), e == null || e.setAutoFocusOnShow(!0), e == null || e.setInitialFocus(T));
|
|
533
534
|
}), S = s.onClick, H = $((h) => {
|
|
534
535
|
if (S == null || S(h), h.defaultPrevented || !e) return;
|
|
535
|
-
const T = !h.detail, { open:
|
|
536
|
-
(!
|
|
536
|
+
const T = !h.detail, { open: j } = e.getState();
|
|
537
|
+
(!j || T) && ((!p || T) && e.setAutoFocusOnShow(!0), e.setInitialFocus(T ? "first" : "container")), p && m();
|
|
537
538
|
});
|
|
538
|
-
s =
|
|
539
|
+
s = xe(
|
|
539
540
|
s,
|
|
540
541
|
(h) => /* @__PURE__ */ _(Kt, { value: e, children: h }),
|
|
541
542
|
[e]
|
|
542
|
-
), p && (s =
|
|
543
|
+
), p && (s = x(b({}, s), {
|
|
543
544
|
render: /* @__PURE__ */ _(Et.div, { render: s.render })
|
|
544
545
|
}));
|
|
545
|
-
const g =
|
|
546
|
+
const g = Ee(s.id), W = D(
|
|
546
547
|
(i == null ? void 0 : i.combobox) || i,
|
|
547
548
|
"contentElement"
|
|
548
|
-
), A = p || l ?
|
|
549
|
-
return s =
|
|
549
|
+
), A = p || l ? ye(W, "menuitem") : void 0, V = e.useState("contentElement");
|
|
550
|
+
return s = x(b({
|
|
550
551
|
id: g,
|
|
551
552
|
role: A,
|
|
552
553
|
"aria-haspopup": ut(V, "menu")
|
|
553
554
|
}, s), {
|
|
554
555
|
ref: ee(d, s.ref),
|
|
555
556
|
onFocus: M,
|
|
556
|
-
onKeyDown:
|
|
557
|
+
onKeyDown: y,
|
|
557
558
|
onClick: H
|
|
558
|
-
}), s = Ue(
|
|
559
|
+
}), s = Ue(x(b({
|
|
559
560
|
store: e,
|
|
560
561
|
focusable: o,
|
|
561
562
|
accessibleWhenDisabled: u
|
|
@@ -566,13 +567,13 @@ var tr = N(
|
|
|
566
567
|
if (a != null) return a;
|
|
567
568
|
if (p) return !0;
|
|
568
569
|
if (!w) return !1;
|
|
569
|
-
const { items:
|
|
570
|
-
return l && be(
|
|
570
|
+
const { items: J } = w.getState();
|
|
571
|
+
return l && be(J);
|
|
571
572
|
})()) return !1;
|
|
572
573
|
const K = l ? w : i;
|
|
573
574
|
return K && K.setActiveId(h.currentTarget.id), !0;
|
|
574
575
|
}
|
|
575
|
-
})), s =
|
|
576
|
+
})), s = xt(b({
|
|
576
577
|
store: e,
|
|
577
578
|
toggleOnClick: !p,
|
|
578
579
|
focusable: o,
|
|
@@ -582,9 +583,9 @@ var tr = N(
|
|
|
582
583
|
typeahead: l
|
|
583
584
|
}, s)), s;
|
|
584
585
|
}
|
|
585
|
-
), rr =
|
|
586
|
+
), rr = k(function(t) {
|
|
586
587
|
const r = tr(t);
|
|
587
|
-
return
|
|
588
|
+
return F(Qt, r);
|
|
588
589
|
}), nr = "div";
|
|
589
590
|
function or(n, t, r) {
|
|
590
591
|
var e;
|
|
@@ -623,22 +624,22 @@ var sr = N(
|
|
|
623
624
|
}), f = D(
|
|
624
625
|
e,
|
|
625
626
|
(v) => "contentElement" in v ? v.contentElement : null
|
|
626
|
-
), M =
|
|
627
|
-
return c =
|
|
627
|
+
), M = ye(f, "menuitem");
|
|
628
|
+
return c = x(b({
|
|
628
629
|
role: M
|
|
629
630
|
}, c), {
|
|
630
631
|
onClick: m
|
|
631
632
|
}), c = Re(b({
|
|
632
633
|
store: e,
|
|
633
634
|
preventScrollOnKeyDown: u
|
|
634
|
-
}, c)), c = Ie(
|
|
635
|
+
}, c)), c = Ie(x(b({
|
|
635
636
|
store: e
|
|
636
637
|
}, c), {
|
|
637
638
|
focusOnHover(v) {
|
|
638
639
|
const P = () => typeof a == "function" ? a(v) : a ?? !0;
|
|
639
640
|
if (!e || !P()) return !1;
|
|
640
|
-
const { baseElement:
|
|
641
|
-
return C ? (v.currentTarget.hasAttribute("aria-expanded") && v.currentTarget.focus(), !0) : or(
|
|
641
|
+
const { baseElement: y, items: S } = e.getState();
|
|
642
|
+
return C ? (v.currentTarget.hasAttribute("aria-expanded") && v.currentTarget.focus(), !0) : or(y, S, v.currentTarget) ? (v.currentTarget.focus(), !0) : !1;
|
|
642
643
|
},
|
|
643
644
|
blurOnHoverEnd(v) {
|
|
644
645
|
return typeof s == "function" ? s(v) : s ?? C;
|
|
@@ -646,9 +647,9 @@ var sr = N(
|
|
|
646
647
|
})), c;
|
|
647
648
|
}
|
|
648
649
|
), ar = Se(
|
|
649
|
-
|
|
650
|
+
k(function(t) {
|
|
650
651
|
const r = sr(t);
|
|
651
|
-
return
|
|
652
|
+
return F(nr, r);
|
|
652
653
|
})
|
|
653
654
|
), ur = "hr", ir = N(
|
|
654
655
|
function(t) {
|
|
@@ -656,9 +657,9 @@ var sr = N(
|
|
|
656
657
|
const u = de();
|
|
657
658
|
return e = e || u, o = Ne(b({ store: e }, o)), o;
|
|
658
659
|
}
|
|
659
|
-
), cr =
|
|
660
|
+
), cr = k(function(t) {
|
|
660
661
|
const r = ir(t);
|
|
661
|
-
return
|
|
662
|
+
return F(ur, r);
|
|
662
663
|
});
|
|
663
664
|
const lr = "_inner_1nesm_2", dr = "_arrow_1nesm_17", fr = "_stroke_1nesm_1", mr = "_item_1nesm_43", pr = "_separator_1nesm_70", ne = {
|
|
664
665
|
inner: lr,
|
|
@@ -673,7 +674,7 @@ const lr = "_inner_1nesm_2", dr = "_arrow_1nesm_17", fr = "_stroke_1nesm_1", mr
|
|
|
673
674
|
separator: pr
|
|
674
675
|
}, he = te(ne), vr = ce(({ className: n, store: t }, r) => {
|
|
675
676
|
const e = D(t, "currentPlacement"), [o] = e.split("-");
|
|
676
|
-
return /* @__PURE__ */ _(
|
|
677
|
+
return /* @__PURE__ */ _(Yt, { ref: r, render: /* @__PURE__ */ _("div", { className: he("arrow", n) }), children: /* @__PURE__ */ Le(
|
|
677
678
|
"svg",
|
|
678
679
|
{
|
|
679
680
|
className: he("arrow-item", o && `arrow-placement-${o}`),
|
|
@@ -710,7 +711,7 @@ const lr = "_inner_1nesm_2", dr = "_arrow_1nesm_17", fr = "_stroke_1nesm_1", mr
|
|
|
710
711
|
({ children: n, className: t, dataTestId: r, innerProps: e = {}, store: o, withGutter: u = !0, ...a }, s) => {
|
|
711
712
|
const c = D(o, "arrowElement"), d = u && !c ? Cr : 0, { className: i, ...w } = e;
|
|
712
713
|
return /* @__PURE__ */ _(
|
|
713
|
-
|
|
714
|
+
Zt,
|
|
714
715
|
{
|
|
715
716
|
"aria-label": "dropdown-menu",
|
|
716
717
|
className: t,
|
|
@@ -725,13 +726,13 @@ const lr = "_inner_1nesm_2", dr = "_arrow_1nesm_17", fr = "_stroke_1nesm_1", mr
|
|
|
725
726
|
}
|
|
726
727
|
);
|
|
727
728
|
}
|
|
728
|
-
),
|
|
729
|
+
), Vr = Object.assign(_r, {
|
|
729
730
|
Arrow: vr,
|
|
730
731
|
Item: hr,
|
|
731
732
|
Separator: gr,
|
|
732
733
|
Trigger: Mr
|
|
733
734
|
});
|
|
734
735
|
export {
|
|
735
|
-
|
|
736
|
-
|
|
736
|
+
Vr as DropdownMenu,
|
|
737
|
+
Lr as useDropdownMenu
|
|
737
738
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._root_c16dq_2{border-width:0;width:100%;min-width:0;min-height:0;margin:0;padding:0}._root_c16dq_2>*{margin-bottom:var(--spacing-md)}._visually-hidden_c16dq_13{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;white-space:nowrap!important}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as m } from "react";
|
|
4
|
+
import { Label as n } from "./Label.js";
|
|
5
|
+
import { c as f } from "./classNames-qiokGROM.js";
|
|
6
|
+
const p = "_root_c16dq_2", u = {
|
|
7
|
+
root: p,
|
|
8
|
+
"visually-hidden": "_visually-hidden_c16dq_13"
|
|
9
|
+
}, o = f(u), v = m(
|
|
10
|
+
({ children: s, className: e, hideLabel: r, label: l, required: i, ...t }, d) => /* @__PURE__ */ c("fieldset", { className: o("root", e), ref: d, ...t, children: [
|
|
11
|
+
/* @__PURE__ */ a(n, { as: "legend", className: o(r && "visually-hidden"), required: i, children: l }),
|
|
12
|
+
s
|
|
13
|
+
] })
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
v as FieldGroup
|
|
17
|
+
};
|