@vellira-ui/react 2.186.20 → 2.186.22
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/index.cjs +1 -1
- package/dist/index.js +1313 -1297
- package/dist/styles.css +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
|
3
3
|
import { Check as v, ChevronDown as y, ChevronRight as b, Close as x, Eye as S, EyeOff as C, Search as w } from "@vellira-ui/icons";
|
|
4
4
|
import { createAutoFocusEvent as T, createConsoleOverlayDiagnostics as E, createOutsideEvent as D, createOverlayManagerStore as O, createOverlayZIndexPolicy as k, createRetainedResourceRegistry as A, deferOverlayFocusRestore as j, focusFirstElement as M, getCompoundSlot as N, getFocusableElements as P, markCompoundSlot as F, resolveOverlayPresentation as I, resolveSelectGroupSelection as L, runOverlayCloseAutoFocus as R } from "@vellira-ui/core";
|
|
5
5
|
import z from "clsx";
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { FloatingArrow as
|
|
8
|
-
import { controlSizes as
|
|
9
|
-
var
|
|
6
|
+
import { createPortal as B } from "react-dom";
|
|
7
|
+
import { FloatingArrow as V, arrow as H, autoUpdate as U, flip as W, offset as G, shift as ee, size as te, useFloating as ne, useFocus as re, useHover as ie, useInteractions as K } from "@floating-ui/react";
|
|
8
|
+
import { controlSizes as ae, lightTheme as oe } from "@vellira-ui/tokens";
|
|
9
|
+
var se = {
|
|
10
10
|
root: "_root_n1iaz_1",
|
|
11
11
|
item: "_item_n1iaz_11",
|
|
12
12
|
trigger: "_trigger_n1iaz_15",
|
|
@@ -16,42 +16,42 @@ var ce = {
|
|
|
16
16
|
contentInner: "_contentInner_n1iaz_79"
|
|
17
17
|
};
|
|
18
18
|
// src/components/Accordion/Content/AccordionContent.tsx
|
|
19
|
-
function
|
|
19
|
+
function ce({ children: e, forceMount: t = !1, hidden: n = !1, contentId: r }) {
|
|
20
20
|
return n && !t ? null : /* @__PURE__ */ g("div", {
|
|
21
21
|
id: r,
|
|
22
|
-
className:
|
|
22
|
+
className: se.content,
|
|
23
23
|
hidden: n,
|
|
24
24
|
children: /* @__PURE__ */ g("div", {
|
|
25
|
-
className:
|
|
25
|
+
className: se.contentInner,
|
|
26
26
|
children: e
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
// src/components/Accordion/Item/AccordionItem.tsx
|
|
31
|
-
function
|
|
31
|
+
function le({ children: e, className: t }) {
|
|
32
32
|
return /* @__PURE__ */ g("div", {
|
|
33
|
-
className: t ??
|
|
33
|
+
className: t ?? se.item,
|
|
34
34
|
children: e
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
// src/components/Accordion/Trigger/AccordionTrigger.tsx
|
|
38
|
-
function
|
|
38
|
+
function ue({ children: e, disabled: t = !1, contentId: n, expanded: r = !1, onActivate: i }) {
|
|
39
39
|
return /* @__PURE__ */ _("button", {
|
|
40
40
|
type: "button",
|
|
41
|
-
className:
|
|
41
|
+
className: se.trigger,
|
|
42
42
|
disabled: t,
|
|
43
43
|
"aria-expanded": r,
|
|
44
44
|
"aria-controls": n,
|
|
45
45
|
onClick: i,
|
|
46
46
|
children: [/* @__PURE__ */ g("span", { children: e }), /* @__PURE__ */ g("span", {
|
|
47
|
-
className:
|
|
47
|
+
className: se.indicator,
|
|
48
48
|
"aria-hidden": "true",
|
|
49
49
|
children: /* @__PURE__ */ g(y, { size: 16 })
|
|
50
50
|
})]
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
// src/components/Accordion/Root/AccordionRoot.tsx
|
|
54
|
-
function
|
|
54
|
+
function de(t) {
|
|
55
55
|
let { children: r, value: i, defaultValue: s, disabled: c = !1 } = t, u = t.type ?? "single", f = t.type === "multiple" ? !1 : t.collapsible ?? !1, m = l(), h = i !== void 0, [_, v] = p(s ?? (u === "multiple" ? [] : "")), y = d(() => {
|
|
56
56
|
let e = (h ? i : _) ?? [];
|
|
57
57
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
@@ -78,56 +78,56 @@ function fe(t) {
|
|
|
78
78
|
t.type
|
|
79
79
|
]);
|
|
80
80
|
return /* @__PURE__ */ g("div", {
|
|
81
|
-
className:
|
|
81
|
+
className: se.root,
|
|
82
82
|
"data-disabled": c || void 0,
|
|
83
83
|
children: e.map(r, (t) => {
|
|
84
|
-
if (!a(t) || t.type !==
|
|
85
|
-
let r = t, i = c || !!r.props.disabled, o = y.includes(r.props.value), s = `${m}-accordion-content-${r.props.value}`, l = e.map(r.props.children, (e) => a(e) ? e.type ===
|
|
84
|
+
if (!a(t) || t.type !== le) return t;
|
|
85
|
+
let r = t, i = c || !!r.props.disabled, o = y.includes(r.props.value), s = `${m}-accordion-content-${r.props.value}`, l = e.map(r.props.children, (e) => a(e) ? e.type === ue ? n(e, {
|
|
86
86
|
contentId: s,
|
|
87
87
|
disabled: i,
|
|
88
88
|
expanded: o,
|
|
89
89
|
onActivate: i ? void 0 : () => b(r.props.value)
|
|
90
|
-
}) : e.type ===
|
|
90
|
+
}) : e.type === ce ? n(e, {
|
|
91
91
|
contentId: s,
|
|
92
92
|
hidden: !o
|
|
93
93
|
}) : e : e);
|
|
94
94
|
return n(r, {
|
|
95
|
-
className: `${
|
|
95
|
+
className: `${se.item} ${o ? se.expanded : ""}`,
|
|
96
96
|
children: l
|
|
97
97
|
});
|
|
98
98
|
})
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
// src/components/Accordion/Accordion.tsx
|
|
102
|
-
function
|
|
103
|
-
return e.toArray(n).flatMap((e) => a(e) && e.type === t ?
|
|
102
|
+
function fe(n) {
|
|
103
|
+
return e.toArray(n).flatMap((e) => a(e) && e.type === t ? fe(e.props.children) : e);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return /* @__PURE__ */ g(
|
|
105
|
+
function pe({ children: e, ...t }) {
|
|
106
|
+
return /* @__PURE__ */ g(de, {
|
|
107
107
|
...t,
|
|
108
|
-
children:
|
|
108
|
+
children: fe(e)
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
var
|
|
111
|
+
var me = Object.assign(pe, {
|
|
112
112
|
displayName: "Accordion",
|
|
113
|
-
Item:
|
|
114
|
-
Trigger:
|
|
115
|
-
Content:
|
|
116
|
-
}),
|
|
113
|
+
Item: le,
|
|
114
|
+
Trigger: ue,
|
|
115
|
+
Content: ce
|
|
116
|
+
}), he = { arrow: "_arrow_8b0vb_1" }, q = (...e) => z(e), ge = ({ className: e }) => /* @__PURE__ */ g("span", {
|
|
117
117
|
"aria-hidden": "true",
|
|
118
|
-
className:
|
|
118
|
+
className: q(he.arrow, e)
|
|
119
119
|
});
|
|
120
|
-
F(
|
|
120
|
+
F(ge, "arrow"), ge.displayName = "Dropdown.Arrow";
|
|
121
121
|
// src/components/Dropdown/internal/types.ts
|
|
122
|
-
function
|
|
122
|
+
function _e(e) {
|
|
123
123
|
return N(e);
|
|
124
124
|
}
|
|
125
125
|
// src/components/Dropdown/internal/DropdownCollection.ts
|
|
126
|
-
function
|
|
126
|
+
function J(e, t) {
|
|
127
127
|
let n = () => null;
|
|
128
128
|
return F(n, e), n.displayName = t, n;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function ve(t) {
|
|
131
131
|
let n = 0, r, i, o, s, c = [], l = [], u = (e) => `${e}-${n++}`;
|
|
132
132
|
function d(e) {
|
|
133
133
|
l.push(e), c.push({
|
|
@@ -139,7 +139,7 @@ function ye(t) {
|
|
|
139
139
|
function f(t, n = {}) {
|
|
140
140
|
e.forEach(t, (e) => {
|
|
141
141
|
if (!a(e)) return;
|
|
142
|
-
let t =
|
|
142
|
+
let t = _e(e.type);
|
|
143
143
|
if (e.type.__velliraPortal) o = e, f(e.props.children, n);
|
|
144
144
|
else switch (t) {
|
|
145
145
|
case "trigger":
|
|
@@ -204,7 +204,7 @@ function ye(t) {
|
|
|
204
204
|
type: "item",
|
|
205
205
|
id: u("item"),
|
|
206
206
|
props: t,
|
|
207
|
-
label:
|
|
207
|
+
label: xe(t.children),
|
|
208
208
|
disabled: t.disabled
|
|
209
209
|
});
|
|
210
210
|
return;
|
|
@@ -215,7 +215,7 @@ function ye(t) {
|
|
|
215
215
|
type: "checkbox",
|
|
216
216
|
id: u("checkbox"),
|
|
217
217
|
props: t,
|
|
218
|
-
label:
|
|
218
|
+
label: xe(t.children),
|
|
219
219
|
disabled: t.disabled
|
|
220
220
|
});
|
|
221
221
|
return;
|
|
@@ -237,20 +237,20 @@ function ye(t) {
|
|
|
237
237
|
props: t,
|
|
238
238
|
groupId: n.radioGroupId ?? u("radio-group"),
|
|
239
239
|
groupProps: n.radioGroupProps,
|
|
240
|
-
label:
|
|
240
|
+
label: xe(t.children),
|
|
241
241
|
disabled: t.disabled
|
|
242
242
|
});
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
245
|
case "sub": {
|
|
246
|
-
let t = e.props, n =
|
|
246
|
+
let t = e.props, n = be(t.children);
|
|
247
247
|
if (!n.trigger) return;
|
|
248
|
-
let r = n.trigger.props, i =
|
|
248
|
+
let r = n.trigger.props, i = ve(n.content?.props.children);
|
|
249
249
|
d({
|
|
250
250
|
type: "subTrigger",
|
|
251
251
|
id: u("sub"),
|
|
252
252
|
props: r,
|
|
253
|
-
label:
|
|
253
|
+
label: xe(r.children),
|
|
254
254
|
disabled: r.disabled,
|
|
255
255
|
content: n.content?.props.children,
|
|
256
256
|
subEntries: i.entries,
|
|
@@ -277,14 +277,14 @@ function ye(t) {
|
|
|
277
277
|
trigger: r
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ye(t) {
|
|
281
281
|
let n, r, i, o, s = [];
|
|
282
282
|
return e.forEach(t, (e) => {
|
|
283
283
|
if (!a(e)) {
|
|
284
284
|
s.push(e);
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
-
let t =
|
|
287
|
+
let t = _e(e.type);
|
|
288
288
|
t === "itemIcon" ? i = e.props.children : t === "itemDescription" ? r = e.props.children : t === "itemBadge" ? n = e.props.children : t === "itemShortcut" ? o = e.props.children : s.push(e);
|
|
289
289
|
}), {
|
|
290
290
|
badge: n,
|
|
@@ -294,18 +294,18 @@ function be(t) {
|
|
|
294
294
|
shortcut: o
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function be(t) {
|
|
298
298
|
let n, r;
|
|
299
299
|
return e.forEach(t, (e) => {
|
|
300
300
|
if (!a(e)) return;
|
|
301
|
-
let t =
|
|
301
|
+
let t = _e(e.type);
|
|
302
302
|
t === "subTrigger" && (n = e), t === "subContent" && (r = e);
|
|
303
303
|
}), {
|
|
304
304
|
content: r,
|
|
305
305
|
trigger: n
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function xe(t) {
|
|
309
309
|
let n = [];
|
|
310
310
|
function r(t) {
|
|
311
311
|
e.forEach(t, (e) => {
|
|
@@ -314,173 +314,188 @@ function Se(t) {
|
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
if (!a(e)) return;
|
|
317
|
-
let t =
|
|
317
|
+
let t = _e(e.type);
|
|
318
318
|
t !== "itemBadge" && t !== "itemDescription" && t !== "itemIcon" && t !== "itemShortcut" && r(e.props.children);
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
return r(t), n.join("").trim();
|
|
322
322
|
}
|
|
323
323
|
// src/components/Dropdown/CheckboxItem/DropdownCheckboxItem.tsx
|
|
324
|
-
var
|
|
325
|
-
dropdown: "
|
|
326
|
-
"dropdown-in": "_dropdown-
|
|
327
|
-
primary: "
|
|
328
|
-
neutral: "
|
|
329
|
-
success: "
|
|
330
|
-
warning: "
|
|
331
|
-
danger: "
|
|
332
|
-
empty: "
|
|
333
|
-
searchWrap: "
|
|
334
|
-
search: "
|
|
335
|
-
"dropdown-sheet-in": "_dropdown-sheet-
|
|
336
|
-
},
|
|
324
|
+
var Se = J("checkboxItem", "Dropdown.CheckboxItem"), Ce = {
|
|
325
|
+
dropdown: "_dropdown_1b3ri_1",
|
|
326
|
+
"dropdown-in": "_dropdown-in_1b3ri_1",
|
|
327
|
+
primary: "_primary_1b3ri_47",
|
|
328
|
+
neutral: "_neutral_1b3ri_70",
|
|
329
|
+
success: "_success_1b3ri_93",
|
|
330
|
+
warning: "_warning_1b3ri_116",
|
|
331
|
+
danger: "_danger_1b3ri_139",
|
|
332
|
+
empty: "_empty_1b3ri_162",
|
|
333
|
+
searchWrap: "_searchWrap_1b3ri_170",
|
|
334
|
+
search: "_search_1b3ri_170",
|
|
335
|
+
"dropdown-sheet-in": "_dropdown-sheet-in_1b3ri_1"
|
|
336
|
+
}, we = J("empty", "Dropdown.Empty"), Te = ({ children: e }) => /* @__PURE__ */ g("li", {
|
|
337
337
|
role: "presentation",
|
|
338
|
-
className:
|
|
338
|
+
className: Ce.empty,
|
|
339
339
|
children: e ?? "No actions available"
|
|
340
340
|
});
|
|
341
|
-
|
|
341
|
+
Te.displayName = "DropdownEmptySurface";
|
|
342
342
|
// src/components/Dropdown/Group/DropdownGroup.tsx
|
|
343
|
-
var
|
|
344
|
-
|
|
343
|
+
var Ee = J("group", "Dropdown.Group"), De = () => null;
|
|
344
|
+
De.displayName = "DropdownGroupSurface";
|
|
345
345
|
// src/components/Dropdown/internal/DropdownContext.tsx
|
|
346
|
-
var
|
|
347
|
-
|
|
348
|
-
function
|
|
349
|
-
let e = s(
|
|
346
|
+
var Oe = r(null), ke = r(null), Ae = r(null), je = Oe.Provider, Me = ke.Provider;
|
|
347
|
+
Ae.Provider;
|
|
348
|
+
function Ne() {
|
|
349
|
+
let e = s(Oe);
|
|
350
350
|
if (!e) throw Error("Dropdown compound components must be used inside Dropdown.");
|
|
351
351
|
return e;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
354
|
-
let e = s(
|
|
353
|
+
function Pe() {
|
|
354
|
+
let e = s(ke);
|
|
355
355
|
if (!e) throw Error("Dropdown.Trigger must be used inside Dropdown.");
|
|
356
356
|
return e;
|
|
357
357
|
}
|
|
358
|
-
var
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
"dropdown-
|
|
379
|
-
|
|
380
|
-
"dropdown-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
358
|
+
var Y = {
|
|
359
|
+
subWrapper: "_subWrapper_7o7hq_1",
|
|
360
|
+
item: "_item_7o7hq_8",
|
|
361
|
+
disabled: "_disabled_7o7hq_42",
|
|
362
|
+
active: "_active_7o7hq_60",
|
|
363
|
+
itemShortcut: "_itemShortcut_7o7hq_74",
|
|
364
|
+
itemDescription: "_itemDescription_7o7hq_75",
|
|
365
|
+
subChevron: "_subChevron_7o7hq_76",
|
|
366
|
+
primary: "_primary_7o7hq_86",
|
|
367
|
+
success: "_success_7o7hq_104",
|
|
368
|
+
warning: "_warning_7o7hq_122",
|
|
369
|
+
danger: "_danger_7o7hq_140",
|
|
370
|
+
itemIcon: "_itemIcon_7o7hq_164",
|
|
371
|
+
sm: "_sm_7o7hq_184",
|
|
372
|
+
md: "_md_7o7hq_190",
|
|
373
|
+
lg: "_lg_7o7hq_194",
|
|
374
|
+
itemText: "_itemText_7o7hq_201",
|
|
375
|
+
itemLabel: "_itemLabel_7o7hq_210",
|
|
376
|
+
itemBadge: "_itemBadge_7o7hq_253",
|
|
377
|
+
indicator: "_indicator_7o7hq_280",
|
|
378
|
+
"dropdown-indicator-in": "_dropdown-indicator-in_7o7hq_1",
|
|
379
|
+
checked: "_checked_7o7hq_297",
|
|
380
|
+
"dropdown-item-pop": "_dropdown-item-pop_7o7hq_1",
|
|
381
|
+
subContent: "_subContent_7o7hq_302",
|
|
382
|
+
"dropdown-sub-in": "_dropdown-sub-in_7o7hq_1",
|
|
383
|
+
subLabel: "_subLabel_7o7hq_338",
|
|
384
|
+
subSeparator: "_subSeparator_7o7hq_346"
|
|
385
|
+
}, Fe = (e, t) => {
|
|
384
386
|
process.env.NODE_ENV !== "production" && !e && console.warn(t);
|
|
385
|
-
},
|
|
386
|
-
let r =
|
|
387
|
-
[
|
|
388
|
-
[
|
|
389
|
-
[
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
let
|
|
393
|
-
if (
|
|
387
|
+
}, X = J("item", "Dropdown.Item"), Ie = ({ item: e, itemIndex: t }) => {
|
|
388
|
+
let r = Ne(), i = f(void 0), [o, s] = p(e.type === "checkbox" ? e.props.defaultChecked ?? !1 : !1), c = r.activeIndex === t, l = r.openSubId === e.id, u = e.type === "checkbox", d = e.type === "radio", m = e.type === "subTrigger", h = u ? e.props.checked ?? o : d ? (e.groupProps?.value ?? r.radioValues[e.groupId]) === e.props.value : !1, y = r.loading || e.disabled, x = e.props, S = ye(x.children), C = S.icon ?? x.icon, w = S.description ?? ("description" in x ? x.description : void 0), T = S.badge ?? ("badge" in x ? x.badge : void 0), E = S.shortcut ?? x.shortcut, D = S.content.length ? S.content : x.children, O = "color" in x ? x.color : void 0, k = e.type === "item" ? e.props.href : void 0, A = e.type === "item" ? e.props.target : void 0, j = e.type === "item" ? e.props.download : void 0, M = r.getItemId(t), N = u ? "menuitemcheckbox" : d ? "menuitemradio" : "menuitem", P = e.type === "item" && A === "_blank" && !e.props.rel ? "noreferrer noopener" : e.type === "item" ? e.props.rel : void 0, F = k ? "a" : m ? "div" : "li", I = u || d, L = x.asChild && a(x.children) ? x.children : void 0, R = q(Y.item, Y[r.size], {
|
|
389
|
+
[Y.active]: c,
|
|
390
|
+
[Y.disabled]: y,
|
|
391
|
+
[Y.checked]: h
|
|
392
|
+
}, O && O !== "default" ? Y[O] : void 0, x.className);
|
|
393
|
+
Fe(!x.asChild || !!L, "Dropdown.Item: asChild requires a single valid React element child.");
|
|
394
|
+
let z = (t) => {
|
|
395
|
+
if (y) t.preventDefault();
|
|
394
396
|
else {
|
|
395
397
|
if (u && e.type === "checkbox") {
|
|
396
|
-
let t = !
|
|
398
|
+
let t = !h;
|
|
397
399
|
s(t), e.props.onCheckedChange?.(t);
|
|
398
400
|
}
|
|
399
|
-
r.selectItem(e,
|
|
401
|
+
r.selectItem(e, Re(t));
|
|
400
402
|
}
|
|
401
403
|
}, B = () => {
|
|
402
|
-
|
|
404
|
+
y || (r.setActiveIndex(t), m ? (window.clearTimeout(i.current), i.current = window.setTimeout(() => r.setOpenSubId(e.id), 120)) : (window.clearTimeout(i.current), r.setOpenSubId(void 0)));
|
|
403
405
|
}, V = () => {
|
|
404
406
|
window.clearTimeout(i.current);
|
|
405
407
|
};
|
|
406
|
-
return
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
className:
|
|
408
|
+
return L ? /* @__PURE__ */ _(Le, {
|
|
409
|
+
isSubTrigger: m,
|
|
410
|
+
children: [n(L, {
|
|
411
|
+
id: M,
|
|
412
|
+
role: N,
|
|
413
|
+
tabIndex: y ? -1 : 0,
|
|
414
|
+
"aria-disabled": y || void 0,
|
|
415
|
+
"aria-checked": u || d ? h : void 0,
|
|
416
|
+
"aria-haspopup": m ? "menu" : void 0,
|
|
417
|
+
"aria-expanded": m ? l : void 0,
|
|
418
|
+
"aria-controls": m && l ? `${M}-submenu` : void 0,
|
|
419
|
+
"data-active": c || void 0,
|
|
420
|
+
"data-state": l ? "open" : void 0,
|
|
421
|
+
className: q(L.props.className, R),
|
|
422
|
+
onClick: (e) => {
|
|
423
|
+
L.props.onClick?.(e), e.defaultPrevented || z(e);
|
|
424
|
+
},
|
|
425
|
+
onMouseEnter: (e) => {
|
|
426
|
+
L.props.onMouseEnter?.(e), e.defaultPrevented || B(e);
|
|
427
|
+
},
|
|
428
|
+
onMouseLeave: (e) => {
|
|
429
|
+
L.props.onMouseLeave?.(e), e.defaultPrevented || V(e);
|
|
430
|
+
}
|
|
431
|
+
}), ze(e, M, m, l, () => r.setOpenSubId(e.id))]
|
|
432
|
+
}) : /* @__PURE__ */ _(Le, {
|
|
433
|
+
isSubTrigger: m,
|
|
434
|
+
children: [/* @__PURE__ */ _(F, {
|
|
435
|
+
id: M,
|
|
436
|
+
role: N,
|
|
437
|
+
href: F === "a" && !y ? k : void 0,
|
|
438
|
+
target: F === "a" && !y ? A : void 0,
|
|
439
|
+
rel: F === "a" ? P : void 0,
|
|
440
|
+
download: F === "a" && !y ? j : void 0,
|
|
441
|
+
tabIndex: y ? -1 : 0,
|
|
442
|
+
"aria-disabled": y || void 0,
|
|
443
|
+
"aria-checked": u || d ? h : void 0,
|
|
444
|
+
"aria-haspopup": m ? "menu" : void 0,
|
|
445
|
+
"aria-expanded": m ? l : void 0,
|
|
446
|
+
"aria-controls": m && l ? `${M}-submenu` : void 0,
|
|
447
|
+
"data-active": c || void 0,
|
|
448
|
+
"data-state": l ? "open" : void 0,
|
|
449
|
+
className: R,
|
|
450
|
+
onClick: z,
|
|
451
|
+
onMouseEnter: B,
|
|
452
|
+
onMouseLeave: V,
|
|
453
|
+
children: [
|
|
454
|
+
C && /* @__PURE__ */ g("span", {
|
|
455
|
+
className: Y.itemIcon,
|
|
456
|
+
children: C
|
|
457
|
+
}),
|
|
458
|
+
/* @__PURE__ */ _("span", {
|
|
459
|
+
className: Y.itemText,
|
|
460
|
+
children: [/* @__PURE__ */ g("span", {
|
|
461
|
+
className: Y.itemLabel,
|
|
462
|
+
children: D
|
|
463
|
+
}), w && /* @__PURE__ */ g("span", {
|
|
464
|
+
className: Y.itemDescription,
|
|
465
|
+
children: w
|
|
466
|
+
})]
|
|
467
|
+
}),
|
|
468
|
+
T && /* @__PURE__ */ g("span", {
|
|
469
|
+
className: Y.itemBadge,
|
|
458
470
|
children: T
|
|
459
|
-
})
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
children: /* @__PURE__ */ g(b, {})
|
|
478
|
-
})
|
|
479
|
-
]
|
|
480
|
-
}), Re(e, N, m, l, () => r.setOpenSubId(e.id))] });
|
|
471
|
+
}),
|
|
472
|
+
E && /* @__PURE__ */ g("span", {
|
|
473
|
+
className: Y.itemShortcut,
|
|
474
|
+
children: E
|
|
475
|
+
}),
|
|
476
|
+
I && /* @__PURE__ */ g("span", {
|
|
477
|
+
className: Y.indicator,
|
|
478
|
+
"aria-hidden": "true",
|
|
479
|
+
children: h ? /* @__PURE__ */ g(v, {}) : null
|
|
480
|
+
}),
|
|
481
|
+
m && /* @__PURE__ */ g("span", {
|
|
482
|
+
className: Y.subChevron,
|
|
483
|
+
"aria-hidden": "true",
|
|
484
|
+
children: /* @__PURE__ */ g(b, {})
|
|
485
|
+
})
|
|
486
|
+
]
|
|
487
|
+
}), ze(e, M, m, l, () => r.setOpenSubId(e.id))]
|
|
488
|
+
});
|
|
481
489
|
};
|
|
482
|
-
|
|
483
|
-
function Le(e) {
|
|
490
|
+
Ie.displayName = "DropdownItemRow";
|
|
491
|
+
function Le({ children: e, isSubTrigger: t }) {
|
|
492
|
+
return t ? /* @__PURE__ */ g("li", {
|
|
493
|
+
role: "none",
|
|
494
|
+
className: Y.subWrapper,
|
|
495
|
+
children: e
|
|
496
|
+
}) : /* @__PURE__ */ g(h, { children: e });
|
|
497
|
+
}
|
|
498
|
+
function Re(e) {
|
|
484
499
|
let t = !1;
|
|
485
500
|
return {
|
|
486
501
|
originalEvent: e,
|
|
@@ -492,37 +507,37 @@ function Le(e) {
|
|
|
492
507
|
}
|
|
493
508
|
};
|
|
494
509
|
}
|
|
495
|
-
function
|
|
510
|
+
function ze(e, t, n, r, i) {
|
|
496
511
|
return !n || !r || e.type !== "subTrigger" || e.subEntries.length === 0 ? null : /* @__PURE__ */ g("ul", {
|
|
497
512
|
id: `${t}-submenu`,
|
|
498
513
|
role: "menu",
|
|
499
514
|
"aria-labelledby": t,
|
|
500
|
-
className:
|
|
515
|
+
className: Y.subContent,
|
|
501
516
|
onMouseEnter: i,
|
|
502
517
|
children: e.subEntries.map((e) => e.type === "label" ? /* @__PURE__ */ g("li", {
|
|
503
518
|
role: "presentation",
|
|
504
|
-
className:
|
|
519
|
+
className: Y.subLabel,
|
|
505
520
|
children: e.props.children
|
|
506
521
|
}, e.id) : e.type === "separator" ? /* @__PURE__ */ g("li", {
|
|
507
522
|
role: "separator",
|
|
508
|
-
className:
|
|
523
|
+
className: Y.subSeparator,
|
|
509
524
|
"aria-hidden": "true"
|
|
510
|
-
}, e.id) : e.type === "item" ? /* @__PURE__ */ g(
|
|
525
|
+
}, e.id) : e.type === "item" ? /* @__PURE__ */ g(Be, {
|
|
511
526
|
item: e.item,
|
|
512
527
|
itemIndex: e.itemIndex,
|
|
513
528
|
id: `${t}-${e.itemIndex}`
|
|
514
529
|
}, e.item.id) : null)
|
|
515
530
|
});
|
|
516
531
|
}
|
|
517
|
-
function
|
|
518
|
-
let r =
|
|
532
|
+
function Be({ id: e, item: t, itemIndex: n }) {
|
|
533
|
+
let r = Ne(), [i, a] = p(t.type === "checkbox" ? t.props.defaultChecked ?? !1 : !1), o = t.type === "checkbox", s = t.type === "radio", c = o ? t.props.checked ?? i : s ? (t.groupProps?.value ?? r.radioValues[t.groupId]) === t.props.value : !1, l = t.props, u = ye(l.children), d = u.icon ?? l.icon, f = u.description ?? ("description" in l ? l.description : void 0), m = u.badge ?? ("badge" in l ? l.badge : void 0), h = u.shortcut ?? l.shortcut, y = u.content.length ? u.content : l.children, b = "color" in l ? l.color : void 0, x = r.loading || t.disabled, S = r.activeSubIndex === n, C = t.type === "item" ? t.props.href : void 0, w = t.type === "item" ? t.props.target : void 0, T = t.type === "item" ? t.props.download : void 0, E = o ? "menuitemcheckbox" : s ? "menuitemradio" : "menuitem", D = t.type === "item" && w === "_blank" && !t.props.rel ? "noreferrer noopener" : t.type === "item" ? t.props.rel : void 0, O = C ? "a" : "li", k = o || s, A = (e) => {
|
|
519
534
|
if (x) e.preventDefault();
|
|
520
535
|
else {
|
|
521
536
|
if (o && t.type === "checkbox") {
|
|
522
537
|
let e = !c;
|
|
523
538
|
a(e), t.props.onCheckedChange?.(e);
|
|
524
539
|
}
|
|
525
|
-
r.selectItem(t,
|
|
540
|
+
r.selectItem(t, Re(e));
|
|
526
541
|
}
|
|
527
542
|
};
|
|
528
543
|
return /* @__PURE__ */ _(O, {
|
|
@@ -536,67 +551,67 @@ function ze({ id: e, item: t, itemIndex: n }) {
|
|
|
536
551
|
"aria-disabled": x || void 0,
|
|
537
552
|
"aria-checked": o || s ? c : void 0,
|
|
538
553
|
"data-active": S || void 0,
|
|
539
|
-
className:
|
|
540
|
-
[
|
|
541
|
-
[
|
|
542
|
-
}, b && b !== "default" ?
|
|
554
|
+
className: q(Y.item, { [Y.active]: S }, Y[r.size], {
|
|
555
|
+
[Y.disabled]: x,
|
|
556
|
+
[Y.checked]: c
|
|
557
|
+
}, b && b !== "default" ? Y[b] : void 0),
|
|
543
558
|
onClick: A,
|
|
544
559
|
onMouseEnter: () => {
|
|
545
560
|
x || r.setActiveSubIndex(n);
|
|
546
561
|
},
|
|
547
562
|
children: [
|
|
548
563
|
k && /* @__PURE__ */ g("span", {
|
|
549
|
-
className:
|
|
564
|
+
className: Y.indicator,
|
|
550
565
|
"aria-hidden": "true",
|
|
551
566
|
children: c ? /* @__PURE__ */ g(v, {}) : null
|
|
552
567
|
}),
|
|
553
568
|
d && /* @__PURE__ */ g("span", {
|
|
554
|
-
className:
|
|
569
|
+
className: Y.itemIcon,
|
|
555
570
|
children: d
|
|
556
571
|
}),
|
|
557
572
|
/* @__PURE__ */ _("span", {
|
|
558
|
-
className:
|
|
573
|
+
className: Y.itemText,
|
|
559
574
|
children: [/* @__PURE__ */ g("span", {
|
|
560
|
-
className:
|
|
575
|
+
className: Y.itemLabel,
|
|
561
576
|
children: y
|
|
562
577
|
}), f && /* @__PURE__ */ g("span", {
|
|
563
|
-
className:
|
|
578
|
+
className: Y.itemDescription,
|
|
564
579
|
children: f
|
|
565
580
|
})]
|
|
566
581
|
}),
|
|
567
582
|
m && /* @__PURE__ */ g("span", {
|
|
568
|
-
className:
|
|
583
|
+
className: Y.itemBadge,
|
|
569
584
|
children: m
|
|
570
585
|
}),
|
|
571
586
|
h && /* @__PURE__ */ g("span", {
|
|
572
|
-
className:
|
|
587
|
+
className: Y.itemShortcut,
|
|
573
588
|
children: h
|
|
574
589
|
})
|
|
575
590
|
]
|
|
576
591
|
});
|
|
577
592
|
}
|
|
578
|
-
var
|
|
593
|
+
var Ve = { group: "_group_aviwv_1" }, He = J("label", "Dropdown.Label"), Ue = ({ children: e, className: t }) => /* @__PURE__ */ g("li", {
|
|
579
594
|
role: "presentation",
|
|
580
|
-
className:
|
|
595
|
+
className: q(Ve.group, t),
|
|
581
596
|
children: e
|
|
582
597
|
});
|
|
583
|
-
|
|
598
|
+
Ue.displayName = "DropdownLabelSurface";
|
|
584
599
|
// src/components/Dropdown/Loading/DropdownLoading.tsx
|
|
585
|
-
var
|
|
600
|
+
var We = J("loading", "Dropdown.Loading"), Ge = ({ children: e }) => /* @__PURE__ */ g("li", {
|
|
586
601
|
role: "presentation",
|
|
587
602
|
"aria-live": "polite",
|
|
588
|
-
className:
|
|
603
|
+
className: Ce.empty,
|
|
589
604
|
children: e ?? "Loading actions..."
|
|
590
605
|
});
|
|
591
|
-
|
|
592
|
-
var
|
|
606
|
+
Ge.displayName = "DropdownLoadingSurface";
|
|
607
|
+
var Ke = { separator: "_separator_1v11r_1" }, qe = J("separator", "Dropdown.Separator"), Je = ({ className: e }) => /* @__PURE__ */ g("li", {
|
|
593
608
|
role: "separator",
|
|
594
|
-
className:
|
|
609
|
+
className: q(Ke.separator, e),
|
|
595
610
|
"aria-hidden": "true"
|
|
596
611
|
});
|
|
597
|
-
|
|
612
|
+
Je.displayName = "DropdownSeparatorSurface";
|
|
598
613
|
// src/hooks/behavior/focus/useAriaIsolation.ts
|
|
599
|
-
var
|
|
614
|
+
var Ye = ({ active: e, enabled: t, content: n }) => {
|
|
600
615
|
c(() => {
|
|
601
616
|
if (!e || !t || !n) return;
|
|
602
617
|
let r = [], i = n.parentElement;
|
|
@@ -617,16 +632,16 @@ var Je = ({ active: e, enabled: t, content: n }) => {
|
|
|
617
632
|
]);
|
|
618
633
|
};
|
|
619
634
|
// src/hooks/behavior/overlay/useOverlayFocusRestore.ts
|
|
620
|
-
function
|
|
635
|
+
function Xe(e) {
|
|
621
636
|
return !(e instanceof HTMLElement) || !e.isConnected ? !1 : (e.focus(), document.activeElement === e);
|
|
622
637
|
}
|
|
623
|
-
var
|
|
638
|
+
var Ze = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) => {
|
|
624
639
|
let i = f(null), a = f(t), s = f(n), l = f(r);
|
|
625
640
|
a.current = t, s.current = n, l.current = r;
|
|
626
641
|
let u = o(() => {
|
|
627
642
|
typeof document < "u" && (i.current = document.activeElement);
|
|
628
643
|
}, []), d = o(() => {
|
|
629
|
-
a.current && (
|
|
644
|
+
a.current && (Xe(s.current?.current) || Xe(i.current));
|
|
630
645
|
}, []), p = o((e) => {
|
|
631
646
|
R({
|
|
632
647
|
enabled: a.current,
|
|
@@ -647,8 +662,8 @@ var Xe = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
647
662
|
restoreFocusAfterClose: p,
|
|
648
663
|
saveFocusSnapshot: u
|
|
649
664
|
};
|
|
650
|
-
},
|
|
651
|
-
|
|
665
|
+
}, Qe = ({ active: e, contentRef: t, enabled: n, initialFocus: r, finalFocus: i, restoreFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s }) => {
|
|
666
|
+
Ze({
|
|
652
667
|
active: e,
|
|
653
668
|
enabled: a,
|
|
654
669
|
finalFocus: i,
|
|
@@ -684,7 +699,7 @@ var Xe = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
684
699
|
t,
|
|
685
700
|
n
|
|
686
701
|
]);
|
|
687
|
-
},
|
|
702
|
+
}, $e = (e) => {
|
|
688
703
|
let [t, n] = p(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
|
|
689
704
|
return c(() => {
|
|
690
705
|
if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
|
|
@@ -693,14 +708,14 @@ var Xe = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
693
708
|
t.removeEventListener("change", r);
|
|
694
709
|
};
|
|
695
710
|
}, [e]), t;
|
|
696
|
-
},
|
|
697
|
-
let f =
|
|
698
|
-
|
|
699
|
-
...s ? [
|
|
700
|
-
|
|
711
|
+
}, et = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r = "fixed", offset: i = 2, collisionPadding: a = 8, matchTriggerWidth: o = !1, avoidCollisions: s = !0, mobileSheetBreakpoint: l, middleware: u = [] } = {}) => {
|
|
712
|
+
let f = $e(l), p = d(() => [
|
|
713
|
+
G(i),
|
|
714
|
+
...s ? [W({ padding: a })] : [],
|
|
715
|
+
te({ apply({ rects: e, elements: t }) {
|
|
701
716
|
o && !f && Object.assign(t.floating.style, { width: `${e.reference.width}px` });
|
|
702
717
|
} }),
|
|
703
|
-
...s ? [
|
|
718
|
+
...s ? [ee({ padding: a })] : [],
|
|
704
719
|
...u
|
|
705
720
|
], [
|
|
706
721
|
s,
|
|
@@ -709,14 +724,14 @@ var Xe = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
709
724
|
f,
|
|
710
725
|
o,
|
|
711
726
|
i
|
|
712
|
-
]), { refs: m, floatingStyles: h, isPositioned: g, update: _, context: v, middlewareData: y, placement: b } =
|
|
727
|
+
]), { refs: m, floatingStyles: h, isPositioned: g, update: _, context: v, middlewareData: y, placement: b } = ne({
|
|
713
728
|
open: e,
|
|
714
729
|
onOpenChange: t,
|
|
715
730
|
placement: n,
|
|
716
731
|
strategy: r,
|
|
717
732
|
transform: !1,
|
|
718
733
|
middleware: p,
|
|
719
|
-
whileElementsMounted:
|
|
734
|
+
whileElementsMounted: U
|
|
720
735
|
});
|
|
721
736
|
return c(() => {
|
|
722
737
|
f && m.floating.current?.style.removeProperty("width");
|
|
@@ -734,14 +749,14 @@ var Xe = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
734
749
|
setFloatingRef: m.setFloating,
|
|
735
750
|
updatePosition: _
|
|
736
751
|
};
|
|
737
|
-
},
|
|
752
|
+
}, tt = k({
|
|
738
753
|
defaultLevel: "popover",
|
|
739
|
-
levels:
|
|
740
|
-
}),
|
|
741
|
-
function
|
|
754
|
+
levels: oe.tokens.zIndex
|
|
755
|
+
}), nt = E("WebOverlayManager");
|
|
756
|
+
function rt() {
|
|
742
757
|
let e = O({
|
|
743
|
-
diagnostics:
|
|
744
|
-
policy:
|
|
758
|
+
diagnostics: nt,
|
|
759
|
+
policy: tt
|
|
745
760
|
}), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
746
761
|
return {
|
|
747
762
|
register(t) {
|
|
@@ -801,8 +816,8 @@ function nt() {
|
|
|
801
816
|
}
|
|
802
817
|
};
|
|
803
818
|
}
|
|
804
|
-
var
|
|
805
|
-
let i =
|
|
819
|
+
var it = rt(), at = r(null), ot = () => s(at) ?? it, st = ({ active: e, id: t, zIndexLevel: n, zIndex: r }) => {
|
|
820
|
+
let i = ot(), a = m(i.subscribe, i.getSnapshot, i.getSnapshot);
|
|
806
821
|
c(() => {
|
|
807
822
|
if (e) return i.register({
|
|
808
823
|
id: t,
|
|
@@ -825,7 +840,7 @@ var rt = nt(), it = r(null), at = () => s(it) ?? rt, ot = ({ active: e, id: t, z
|
|
|
825
840
|
order: l?.order,
|
|
826
841
|
zIndex: i.getZIndex(t)
|
|
827
842
|
};
|
|
828
|
-
},
|
|
843
|
+
}, ct = A((e) => {
|
|
829
844
|
if (typeof document > "u") return;
|
|
830
845
|
let t = (t) => {
|
|
831
846
|
t.key === "Escape" && e.dispatchEscapeKeyDown(t);
|
|
@@ -833,7 +848,7 @@ var rt = nt(), it = r(null), at = () => s(it) ?? rt, ot = ({ active: e, id: t, z
|
|
|
833
848
|
return document.addEventListener("keydown", t), () => {
|
|
834
849
|
document.removeEventListener("keydown", t);
|
|
835
850
|
};
|
|
836
|
-
}),
|
|
851
|
+
}), lt = A((e) => {
|
|
837
852
|
if (typeof document > "u") return;
|
|
838
853
|
let t = (t) => {
|
|
839
854
|
e.dispatchPointerDownOutside(t);
|
|
@@ -842,14 +857,14 @@ var rt = nt(), it = r(null), at = () => s(it) ?? rt, ot = ({ active: e, id: t, z
|
|
|
842
857
|
document.removeEventListener("pointerdown", t);
|
|
843
858
|
};
|
|
844
859
|
});
|
|
845
|
-
function lt(e) {
|
|
846
|
-
return st.retain(e);
|
|
847
|
-
}
|
|
848
860
|
function ut(e) {
|
|
849
861
|
return ct.retain(e);
|
|
850
862
|
}
|
|
851
|
-
|
|
852
|
-
|
|
863
|
+
function dt(e) {
|
|
864
|
+
return lt.retain(e);
|
|
865
|
+
}
|
|
866
|
+
var ft = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registered: i = !1, zIndex: a, contentRef: o, ignoreRefs: s = [], closeOnEscape: l, closeOnOutsidePress: u, onEscapeKeyDown: d, onPointerDownOutside: p, onInteractOutside: m, requestClose: h }) => {
|
|
867
|
+
let g = ot(), _ = st({
|
|
853
868
|
active: r && !i,
|
|
854
869
|
id: t,
|
|
855
870
|
zIndexLevel: n,
|
|
@@ -857,7 +872,7 @@ var dt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
857
872
|
}), v = f(s);
|
|
858
873
|
return v.current = s, c(() => {
|
|
859
874
|
if (!e) return;
|
|
860
|
-
let n =
|
|
875
|
+
let n = ut(g), r = g.registerEscapeHandler(t, (e) => {
|
|
861
876
|
d?.(e), !e.defaultPrevented && l && h("escape-key", e);
|
|
862
877
|
});
|
|
863
878
|
return () => {
|
|
@@ -872,7 +887,7 @@ var dt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
872
887
|
h
|
|
873
888
|
]), c(() => {
|
|
874
889
|
if (!e) return;
|
|
875
|
-
let n =
|
|
890
|
+
let n = dt(g), r = g.registerPointerDownOutsideHandler(t, (e) => {
|
|
876
891
|
if (e.target instanceof Node && [o, ...v.current].some((t) => t.current?.contains(e.target))) return;
|
|
877
892
|
let t = D(e);
|
|
878
893
|
p?.(t), m?.(t), !t.defaultPrevented && u && h("outside-press", e);
|
|
@@ -890,8 +905,8 @@ var dt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
890
905
|
p,
|
|
891
906
|
h
|
|
892
907
|
]), _;
|
|
893
|
-
},
|
|
894
|
-
|
|
908
|
+
}, pt = ({ open: e, onOpenChange: t, placement: n = "bottom-start", strategy: r, portal: i = !0, presentation: a, animationStyle: o, offset: s, collisionPadding: c, matchTriggerWidth: l, avoidCollisions: u, mobileSheetBreakpoint: d, middleware: f } = {}) => ({
|
|
909
|
+
...et({
|
|
895
910
|
open: e,
|
|
896
911
|
onOpenChange: t,
|
|
897
912
|
placement: n,
|
|
@@ -908,28 +923,28 @@ var dt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
908
923
|
presentation: a,
|
|
909
924
|
defaultPresentation: i ? "floating" : "inline"
|
|
910
925
|
})
|
|
911
|
-
}),
|
|
926
|
+
}), mt = 0, ht = "", gt = {
|
|
912
927
|
lock() {
|
|
913
|
-
typeof document < "u" && (
|
|
928
|
+
typeof document < "u" && (mt === 0 && (ht = document.body.style.overflow, document.body.style.overflow = "hidden"), mt += 1);
|
|
914
929
|
},
|
|
915
930
|
unlock() {
|
|
916
|
-
typeof document < "u" && (
|
|
931
|
+
typeof document < "u" && (mt = Math.max(0, mt - 1), mt === 0 && (document.body.style.overflow = ht));
|
|
917
932
|
}
|
|
918
|
-
},
|
|
933
|
+
}, _t = ({ active: e, enabled: t = !0 }) => {
|
|
919
934
|
c(() => {
|
|
920
|
-
if (e && t) return
|
|
921
|
-
|
|
935
|
+
if (e && t) return gt.lock(), () => {
|
|
936
|
+
gt.unlock();
|
|
922
937
|
};
|
|
923
938
|
}, [e, t]);
|
|
924
|
-
},
|
|
939
|
+
}, vt = () => typeof document > "u" ? null : document.body, yt = ({ container: e } = {}) => {
|
|
925
940
|
let [t, n] = p(!1);
|
|
926
941
|
return c(() => {
|
|
927
942
|
n(!0);
|
|
928
|
-
}, []), t ? e ?? document.getElementById("overlay-root") ??
|
|
943
|
+
}, []), t ? e ?? document.getElementById("overlay-root") ?? vt() : null;
|
|
929
944
|
};
|
|
930
945
|
// src/hooks/behavior/select/useSelectPosition.ts
|
|
931
|
-
function
|
|
932
|
-
return
|
|
946
|
+
function bt({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange: r, placement: i }) {
|
|
947
|
+
return pt({
|
|
933
948
|
open: t,
|
|
934
949
|
onOpenChange: r,
|
|
935
950
|
placement: i === "bottom" || i === "top" ? `${i}-start` : i,
|
|
@@ -939,7 +954,7 @@ function yt({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange:
|
|
|
939
954
|
});
|
|
940
955
|
}
|
|
941
956
|
// src/hooks/useControllableState.ts
|
|
942
|
-
var
|
|
957
|
+
var xt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
943
958
|
let [r, i] = p(t), a = f(n);
|
|
944
959
|
u(() => {
|
|
945
960
|
a.current = n;
|
|
@@ -948,7 +963,7 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
948
963
|
return [s ? e : r, o((e) => {
|
|
949
964
|
s || i(e), a.current?.(e);
|
|
950
965
|
}, [s])];
|
|
951
|
-
},
|
|
966
|
+
}, St = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: s, getItemText: l, loop: u = !0 }) => {
|
|
952
967
|
let d = f({
|
|
953
968
|
value: "",
|
|
954
969
|
timeoutId: void 0
|
|
@@ -1026,7 +1041,7 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1026
1041
|
h,
|
|
1027
1042
|
g
|
|
1028
1043
|
]) };
|
|
1029
|
-
},
|
|
1044
|
+
}, Ct = ({ items: e, open: t, defaultOpen: n = !1, disabled: r = !1, onOpenChange: i, onSelect: a, getItemValue: s, getItemText: l, loop: u = !0 }) => {
|
|
1030
1045
|
let [d, f] = p(n), [m, h] = p(-1), g = t !== void 0, _ = t ?? d, v = o(() => e.findIndex((e) => !e.disabled), [e]), y = o(() => {
|
|
1031
1046
|
for (let t = e.length - 1; t >= 0; t--) if (!e[t]?.disabled) return t;
|
|
1032
1047
|
return -1;
|
|
@@ -1071,7 +1086,7 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1071
1086
|
m,
|
|
1072
1087
|
e,
|
|
1073
1088
|
T
|
|
1074
|
-
]), { onKeyDown: D } =
|
|
1089
|
+
]), { onKeyDown: D } = St({
|
|
1075
1090
|
activeIndex: m,
|
|
1076
1091
|
setActiveIndex: h,
|
|
1077
1092
|
items: e,
|
|
@@ -1100,8 +1115,8 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1100
1115
|
getFirstEnabledIndex: v,
|
|
1101
1116
|
getLastEnabledIndex: y
|
|
1102
1117
|
};
|
|
1103
|
-
},
|
|
1104
|
-
let a = l(), s = l(), c = l(), [u, d] =
|
|
1118
|
+
}, wt = ({ open: e, defaultOpen: t = !1, onOpenChange: n, closeOnEscape: r, closeOnOutsidePress: i }) => {
|
|
1119
|
+
let a = l(), s = l(), c = l(), [u, d] = xt({
|
|
1105
1120
|
value: e,
|
|
1106
1121
|
defaultValue: t,
|
|
1107
1122
|
onChange: n
|
|
@@ -1119,7 +1134,7 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1119
1134
|
titleId: s,
|
|
1120
1135
|
descriptionId: c
|
|
1121
1136
|
};
|
|
1122
|
-
},
|
|
1137
|
+
}, Tt = ({ value: e, defaultValue: t, onValueChange: n, options: r, multiple: i = !1, maxSelected: a, closeOnSelect: s = !i, disabled: l = !1, open: u, defaultOpen: f = !1, onOpenChange: m }) => {
|
|
1123
1138
|
let h = o((e) => {
|
|
1124
1139
|
if (n) {
|
|
1125
1140
|
if (i) {
|
|
@@ -1130,11 +1145,11 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1130
1145
|
n(e ? [e] : []);
|
|
1131
1146
|
} else n(Array.isArray(e) ? e[0] ?? "" : e);
|
|
1132
1147
|
}
|
|
1133
|
-
}, [i, n]), [g, _] =
|
|
1148
|
+
}, [i, n]), [g, _] = xt({
|
|
1134
1149
|
value: e,
|
|
1135
1150
|
defaultValue: t ?? (i ? [] : ""),
|
|
1136
1151
|
onChange: h
|
|
1137
|
-
}), [v, y] =
|
|
1152
|
+
}), [v, y] = xt({
|
|
1138
1153
|
value: u,
|
|
1139
1154
|
defaultValue: f,
|
|
1140
1155
|
onChange: m
|
|
@@ -1195,7 +1210,7 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1195
1210
|
b,
|
|
1196
1211
|
r,
|
|
1197
1212
|
k
|
|
1198
|
-
]), { onKeyDown: j } =
|
|
1213
|
+
]), { onKeyDown: j } = St({
|
|
1199
1214
|
activeIndex: b,
|
|
1200
1215
|
setActiveIndex: x,
|
|
1201
1216
|
items: r,
|
|
@@ -1225,8 +1240,8 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1225
1240
|
selectActiveOption: A,
|
|
1226
1241
|
onKeyDown: j
|
|
1227
1242
|
};
|
|
1228
|
-
},
|
|
1229
|
-
let [r, i] =
|
|
1243
|
+
}, Et = ({ value: e, defaultValue: t = "", onValueChange: n }) => {
|
|
1244
|
+
let [r, i] = xt({
|
|
1230
1245
|
value: e,
|
|
1231
1246
|
defaultValue: t,
|
|
1232
1247
|
onChange: n
|
|
@@ -1235,24 +1250,24 @@ var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1235
1250
|
value: r,
|
|
1236
1251
|
setValue: i
|
|
1237
1252
|
};
|
|
1238
|
-
},
|
|
1253
|
+
}, Dt = r(null), Ot = ({ children: e, container: t = null }) => /* @__PURE__ */ g(Dt.Provider, {
|
|
1239
1254
|
value: t,
|
|
1240
1255
|
children: e
|
|
1241
|
-
}),
|
|
1242
|
-
let n = s(
|
|
1243
|
-
return r ?
|
|
1256
|
+
}), kt = ({ children: e, container: t }) => {
|
|
1257
|
+
let n = s(Dt), r = yt({ container: t ?? n });
|
|
1258
|
+
return r ? B(e, r) : null;
|
|
1244
1259
|
};
|
|
1245
|
-
|
|
1260
|
+
kt.__velliraPortal = !0, kt.displayName = "Portal", Ot.displayName = "PortalProvider";
|
|
1246
1261
|
// src/components/Dropdown/Content/DropdownContent.tsx
|
|
1247
|
-
var
|
|
1248
|
-
let n =
|
|
1262
|
+
var At = ({ className: e }) => {
|
|
1263
|
+
let n = Ne(), { contentReadyToFocus: r, isOpen: i, setContentRef: a } = n, s = f(null), l = o((e) => {
|
|
1249
1264
|
s.current = e, a(e);
|
|
1250
1265
|
}, [a]);
|
|
1251
1266
|
if (c(() => {
|
|
1252
1267
|
let e = s.current;
|
|
1253
1268
|
i && r && e && (e.contains(document.activeElement) || e.focus({ preventScroll: !0 }));
|
|
1254
1269
|
}, [r, i]), !i) return null;
|
|
1255
|
-
let u =
|
|
1270
|
+
let u = q(Ce.dropdown, Ce[n.color], n.contentProps?.className, e), d = /* @__PURE__ */ _("ul", {
|
|
1256
1271
|
ref: l,
|
|
1257
1272
|
id: n.contentId,
|
|
1258
1273
|
role: "menu",
|
|
@@ -1267,11 +1282,12 @@ var kt = ({ className: e }) => {
|
|
|
1267
1282
|
},
|
|
1268
1283
|
className: u,
|
|
1269
1284
|
"data-color": n.color,
|
|
1285
|
+
"data-submenu-open": n.openSubId ? "true" : void 0,
|
|
1270
1286
|
children: [n.searchable && /* @__PURE__ */ _("li", {
|
|
1271
1287
|
role: "presentation",
|
|
1272
|
-
className:
|
|
1288
|
+
className: q(Ce.searchWrap, n.searchProps?.className),
|
|
1273
1289
|
children: [/* @__PURE__ */ g(w, { "aria-hidden": "true" }), /* @__PURE__ */ g("input", {
|
|
1274
|
-
className:
|
|
1290
|
+
className: Ce.search,
|
|
1275
1291
|
value: n.searchValue,
|
|
1276
1292
|
placeholder: n.searchPlaceholder,
|
|
1277
1293
|
"aria-label": n.searchProps?.["aria-label"] ?? n.searchPlaceholder,
|
|
@@ -1281,23 +1297,23 @@ var kt = ({ className: e }) => {
|
|
|
1281
1297
|
e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Enter" && e.key !== "Escape" && e.stopPropagation();
|
|
1282
1298
|
}
|
|
1283
1299
|
})]
|
|
1284
|
-
}), n.loading ? /* @__PURE__ */ g(
|
|
1300
|
+
}), n.loading ? /* @__PURE__ */ g(Ge, { children: n.loadingText }) : n.searchable && n.items.length === 0 ? /* @__PURE__ */ g(Te, { children: n.empty }) : n.entries.length ? n.entries.map((e) => e.type === "groupStart" ? /* @__PURE__ */ g(De, {}, e.id) : e.type === "groupEnd" ? null : e.type === "label" ? /* @__PURE__ */ g(Ue, { ...e.props }, e.id) : e.type === "separator" ? /* @__PURE__ */ g(Je, { ...e.props }, e.id) : e.type === "empty" ? /* @__PURE__ */ g(Te, { children: e.props.children }, e.id) : e.type === "loading" ? /* @__PURE__ */ g(Ge, { children: e.props.children }, e.id) : e.type === "arrow" ? /* @__PURE__ */ g(ge, { ...e.props }, e.id) : /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(Ie, {
|
|
1285
1301
|
item: e.item,
|
|
1286
1302
|
itemIndex: e.itemIndex
|
|
1287
|
-
}) }, e.item.id)) : /* @__PURE__ */ g(
|
|
1303
|
+
}) }, e.item.id)) : /* @__PURE__ */ g(Te, {})]
|
|
1288
1304
|
});
|
|
1289
|
-
return n.portal ? /* @__PURE__ */ g(
|
|
1305
|
+
return n.portal ? /* @__PURE__ */ g(kt, { children: d }) : d;
|
|
1290
1306
|
};
|
|
1291
|
-
F(
|
|
1307
|
+
F(At, "content"), At.displayName = "Dropdown.Content";
|
|
1292
1308
|
// src/components/Dropdown/ItemBadge/DropdownItemBadge.tsx
|
|
1293
|
-
var
|
|
1309
|
+
var jt = J("itemBadge", "Dropdown.ItemBadge"), Mt = J("itemDescription", "Dropdown.ItemDescription"), Nt = J("itemIcon", "Dropdown.ItemIcon"), Pt = J("itemShortcut", "Dropdown.ItemShortcut"), Ft = J("radioGroup", "Dropdown.RadioGroup"), It = J("radioItem", "Dropdown.RadioItem");
|
|
1294
1310
|
// src/utils/compose.ts
|
|
1295
|
-
function
|
|
1311
|
+
function Lt(e, t) {
|
|
1296
1312
|
return (n) => {
|
|
1297
1313
|
e?.(n), n.defaultPrevented || t(n);
|
|
1298
1314
|
};
|
|
1299
1315
|
}
|
|
1300
|
-
function
|
|
1316
|
+
function Rt(...e) {
|
|
1301
1317
|
return (t) => {
|
|
1302
1318
|
e.forEach((e) => {
|
|
1303
1319
|
e && (typeof e == "function" ? e(t) : e.current = t);
|
|
@@ -1305,44 +1321,44 @@ function Lt(...e) {
|
|
|
1305
1321
|
};
|
|
1306
1322
|
}
|
|
1307
1323
|
// src/components/Dropdown/internal/composeEventHandlers.ts
|
|
1308
|
-
function
|
|
1324
|
+
function zt(e) {
|
|
1309
1325
|
return typeof e == "number" ? `${e}px` : e;
|
|
1310
1326
|
}
|
|
1311
|
-
var
|
|
1312
|
-
let L = l(), R = `${L}-trigger`, z = `${L}-menu`,
|
|
1327
|
+
var Bt = { wrapper: "_wrapper_14ue8_1" }, Vt = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, size: i = "md", color: a = "primary", placement: s = "bottom-start", strategy: u, offset: m = 2, collisionPadding: h = 8, matchTriggerWidth: v = !1, minWidth: y, maxWidth: b, portal: x = !0, avoidCollisions: S = !0, modal: C = !1, closeOnSelect: w = !0, loop: T = !0, disabled: E = !1, loading: D = !1, loadingText: O = "Loading actions...", searchable: k = !1, command: A = !1, searchValue: j, defaultSearchValue: M = "", searchPlaceholder: N, onSearch: P, empty: F, className: I }) => {
|
|
1328
|
+
let L = l(), R = `${L}-trigger`, z = `${L}-menu`, B = f(null), V = f(null), [H, U] = p(), [W, G] = p(-1), [ee, te] = p({}), [ne, re] = p(M), ie = j ?? ne, K = d(() => ve(e), [e]), ae = K.content?.props.command ?? !1, oe = k || A || ae || !!K.search, se = d(() => Wt(K.items), [K.items]), ce = d(() => K.items.map((e) => ({
|
|
1313
1329
|
disabled: e.disabled,
|
|
1314
1330
|
label: e.label
|
|
1315
|
-
})), [
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
]),
|
|
1331
|
+
})), [K.items]), le = d(() => !oe || !ie.trim() ? K : Gt(K, ie), [
|
|
1332
|
+
oe,
|
|
1333
|
+
K,
|
|
1334
|
+
ie
|
|
1335
|
+
]), ue = d(() => le.items.map((e) => ({
|
|
1320
1336
|
disabled: e.disabled,
|
|
1321
1337
|
label: e.label
|
|
1322
|
-
})), [
|
|
1338
|
+
})), [le.items]);
|
|
1323
1339
|
c(() => {
|
|
1324
|
-
|
|
1340
|
+
te((e) => {
|
|
1325
1341
|
let t = { ...e };
|
|
1326
|
-
return
|
|
1342
|
+
return se.forEach((e) => {
|
|
1327
1343
|
e.type === "radio" && t[e.groupId] === void 0 && (t[e.groupId] = e.groupProps?.value ?? e.groupProps?.defaultValue);
|
|
1328
1344
|
}), t;
|
|
1329
1345
|
});
|
|
1330
|
-
}, [
|
|
1331
|
-
let { activeIndex:
|
|
1332
|
-
items:
|
|
1346
|
+
}, [se]);
|
|
1347
|
+
let { activeIndex: de, setActiveIndex: fe, isOpen: pe, closeDropdown: me, toggleDropdown: he, onKeyDown: ge } = Ct({
|
|
1348
|
+
items: oe ? ue : ce,
|
|
1333
1349
|
open: t,
|
|
1334
1350
|
defaultOpen: n,
|
|
1335
1351
|
disabled: E,
|
|
1336
1352
|
onOpenChange: r,
|
|
1337
|
-
getItemValue: (e, t) => (
|
|
1353
|
+
getItemValue: (e, t) => (oe ? le.items : K.items)[t]?.id ?? "",
|
|
1338
1354
|
getItemText: (e) => e.label,
|
|
1339
1355
|
loop: T
|
|
1340
1356
|
});
|
|
1341
1357
|
c(() => {
|
|
1342
|
-
|
|
1343
|
-
}, [
|
|
1344
|
-
let { floatingStyles:
|
|
1345
|
-
open:
|
|
1358
|
+
pe || (U(void 0), G(-1));
|
|
1359
|
+
}, [pe]);
|
|
1360
|
+
let { floatingStyles: _e, isMobileSheet: J, isPositioned: ye, setRef: be, setFloatingRef: xe } = pt({
|
|
1361
|
+
open: pe,
|
|
1346
1362
|
placement: s,
|
|
1347
1363
|
strategy: u,
|
|
1348
1364
|
portal: x,
|
|
@@ -1351,177 +1367,177 @@ var zt = { wrapper: "_wrapper_14ue8_1" }, Bt = ({ children: e, open: t, defaultO
|
|
|
1351
1367
|
offset: m,
|
|
1352
1368
|
collisionPadding: h,
|
|
1353
1369
|
mobileSheetBreakpoint: 640
|
|
1354
|
-
}),
|
|
1355
|
-
j === void 0 &&
|
|
1370
|
+
}), Se = o((e) => {
|
|
1371
|
+
j === void 0 && re(e), P?.(e), fe(0);
|
|
1356
1372
|
}, [
|
|
1357
1373
|
P,
|
|
1358
1374
|
j,
|
|
1359
|
-
|
|
1375
|
+
fe
|
|
1360
1376
|
]);
|
|
1361
|
-
|
|
1362
|
-
active:
|
|
1377
|
+
_t({
|
|
1378
|
+
active: pe,
|
|
1363
1379
|
enabled: C
|
|
1364
1380
|
});
|
|
1365
|
-
let
|
|
1366
|
-
|
|
1367
|
-
}, []),
|
|
1368
|
-
e.type !== "subTrigger" || e.disabled || (
|
|
1369
|
-
}, []),
|
|
1370
|
-
|
|
1371
|
-
}, [
|
|
1381
|
+
let Ce = o((e) => {
|
|
1382
|
+
U(e), G(-1);
|
|
1383
|
+
}, []), we = o((e) => {
|
|
1384
|
+
e.type !== "subTrigger" || e.disabled || (U(e.id), G(e.subItems.findIndex((e) => !e.disabled)));
|
|
1385
|
+
}, []), Te = o(() => {
|
|
1386
|
+
me(), Ce(void 0), B.current?.focus();
|
|
1387
|
+
}, [me, Ce]), Ee = o((e, t) => {
|
|
1372
1388
|
if (e.disabled || D) return;
|
|
1373
1389
|
if (e.type === "subTrigger") {
|
|
1374
|
-
|
|
1390
|
+
we(e);
|
|
1375
1391
|
return;
|
|
1376
1392
|
}
|
|
1377
|
-
e.type === "item" && e.props.onSelect?.(t), e.type === "radio" && (
|
|
1393
|
+
e.type === "item" && e.props.onSelect?.(t), e.type === "radio" && (te((t) => ({
|
|
1378
1394
|
...t,
|
|
1379
1395
|
[e.groupId]: e.props.value
|
|
1380
1396
|
})), e.groupProps?.onValueChange?.(e.props.value));
|
|
1381
1397
|
let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && w);
|
|
1382
|
-
!t.defaultPrevented && n &&
|
|
1398
|
+
!t.defaultPrevented && n && Te();
|
|
1383
1399
|
}, [
|
|
1384
|
-
|
|
1400
|
+
Te,
|
|
1385
1401
|
w,
|
|
1386
1402
|
D,
|
|
1387
|
-
|
|
1388
|
-
]),
|
|
1389
|
-
let t =
|
|
1390
|
-
if (r?.type === "subTrigger" &&
|
|
1403
|
+
we
|
|
1404
|
+
]), De = o((e) => {
|
|
1405
|
+
let t = le.items[de], n = le.items.findIndex((e) => e.type === "subTrigger" && e.id === H), r = le.items[n];
|
|
1406
|
+
if (r?.type === "subTrigger" && W >= 0) {
|
|
1391
1407
|
let t = r.subItems, i = t.findIndex((e) => !e.disabled), a = t.reduce((e, t, n) => t.disabled ? e : n, -1);
|
|
1392
1408
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
1393
|
-
e.preventDefault(),
|
|
1409
|
+
e.preventDefault(), G(Ht(t, W, e.key === "ArrowDown" ? 1 : -1, T));
|
|
1394
1410
|
return;
|
|
1395
1411
|
}
|
|
1396
1412
|
if (e.key === "Home" || e.key === "End") {
|
|
1397
|
-
e.preventDefault(),
|
|
1413
|
+
e.preventDefault(), G(e.key === "Home" ? i : a);
|
|
1398
1414
|
return;
|
|
1399
1415
|
}
|
|
1400
1416
|
if (e.key === "Enter" || e.key === " ") {
|
|
1401
1417
|
e.preventDefault();
|
|
1402
|
-
let r = t[
|
|
1403
|
-
r && !r.disabled && i instanceof HTMLElement &&
|
|
1418
|
+
let r = t[W], i = document.getElementById(`${z}-item-${n}-${W}`);
|
|
1419
|
+
r && !r.disabled && i instanceof HTMLElement && V.current?.contains(i) && i.click();
|
|
1404
1420
|
return;
|
|
1405
1421
|
}
|
|
1406
1422
|
if (e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
1407
|
-
let n = e.key.toLocaleLowerCase(), r = t.findIndex((e, t) => t >
|
|
1423
|
+
let n = e.key.toLocaleLowerCase(), r = t.findIndex((e, t) => t > W && !e.disabled && e.label.toLocaleLowerCase().startsWith(n)), i = r < 0 ? t.findIndex((e) => !e.disabled && e.label.toLocaleLowerCase().startsWith(n)) : r;
|
|
1408
1424
|
if (i >= 0) {
|
|
1409
|
-
e.preventDefault(),
|
|
1425
|
+
e.preventDefault(), G(i);
|
|
1410
1426
|
return;
|
|
1411
1427
|
}
|
|
1412
1428
|
}
|
|
1413
1429
|
}
|
|
1414
|
-
if (
|
|
1415
|
-
else if (e.key === "ArrowRight" && t?.type === "subTrigger") e.preventDefault(),
|
|
1430
|
+
if (H && (e.key === "ArrowLeft" || e.key === "Escape")) e.preventDefault(), e.key === "Escape" && e.stopPropagation(), Ce(void 0);
|
|
1431
|
+
else if (e.key === "ArrowRight" && t?.type === "subTrigger") e.preventDefault(), we(t);
|
|
1416
1432
|
else if ((e.key === "Enter" || e.key === " ") && t) {
|
|
1417
1433
|
if (e.preventDefault(), t.type === "subTrigger") {
|
|
1418
|
-
|
|
1434
|
+
we(t);
|
|
1419
1435
|
return;
|
|
1420
1436
|
}
|
|
1421
1437
|
if (t.type === "checkbox") {
|
|
1422
|
-
let e = document.getElementById(`${z}-item-${
|
|
1423
|
-
e instanceof HTMLElement &&
|
|
1438
|
+
let e = document.getElementById(`${z}-item-${de}`);
|
|
1439
|
+
e instanceof HTMLElement && V.current?.contains(e) && e.click();
|
|
1424
1440
|
return;
|
|
1425
1441
|
}
|
|
1426
|
-
let n =
|
|
1427
|
-
|
|
1428
|
-
} else
|
|
1442
|
+
let n = Ut(e);
|
|
1443
|
+
Ee(t, n);
|
|
1444
|
+
} else ge(e), e.key === "Escape" && B.current?.focus();
|
|
1429
1445
|
}, [
|
|
1430
|
-
|
|
1431
|
-
|
|
1446
|
+
de,
|
|
1447
|
+
W,
|
|
1432
1448
|
z,
|
|
1433
|
-
|
|
1449
|
+
le.items,
|
|
1434
1450
|
T,
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
]),
|
|
1441
|
-
e.preventDefault(),
|
|
1442
|
-
}, [
|
|
1443
|
-
|
|
1444
|
-
}, [
|
|
1445
|
-
|
|
1446
|
-
}, [
|
|
1447
|
-
active:
|
|
1451
|
+
ge,
|
|
1452
|
+
we,
|
|
1453
|
+
H,
|
|
1454
|
+
Ee,
|
|
1455
|
+
Ce
|
|
1456
|
+
]), Oe = o((e) => {
|
|
1457
|
+
e.preventDefault(), he();
|
|
1458
|
+
}, [he]), ke = o((e) => {
|
|
1459
|
+
B.current = e, be(e);
|
|
1460
|
+
}, [be]), Ae = o((e) => {
|
|
1461
|
+
V.current = e, xe(e), J && e?.focus({ preventScroll: !0 });
|
|
1462
|
+
}, [J, xe]), Ne = ft({
|
|
1463
|
+
active: pe,
|
|
1448
1464
|
id: z,
|
|
1449
1465
|
zIndexLevel: "dropdown",
|
|
1450
1466
|
closeOnEscape: !0,
|
|
1451
1467
|
closeOnOutsidePress: !0,
|
|
1452
|
-
contentRef:
|
|
1453
|
-
ignoreRefs: [
|
|
1454
|
-
requestClose: () =>
|
|
1455
|
-
}),
|
|
1456
|
-
...
|
|
1457
|
-
zIndex:
|
|
1458
|
-
minWidth:
|
|
1459
|
-
maxWidth:
|
|
1460
|
-
},
|
|
1468
|
+
contentRef: V,
|
|
1469
|
+
ignoreRefs: [B],
|
|
1470
|
+
requestClose: () => me()
|
|
1471
|
+
}), Pe = {
|
|
1472
|
+
..._e,
|
|
1473
|
+
zIndex: Ne.zIndex,
|
|
1474
|
+
minWidth: zt(y),
|
|
1475
|
+
maxWidth: zt(b)
|
|
1476
|
+
}, Y = {
|
|
1461
1477
|
disabled: E,
|
|
1462
|
-
isOpen:
|
|
1478
|
+
isOpen: pe,
|
|
1463
1479
|
contentId: z,
|
|
1464
1480
|
triggerId: R,
|
|
1465
|
-
setTriggerRef:
|
|
1466
|
-
onClick:
|
|
1467
|
-
onKeyDown:
|
|
1468
|
-
},
|
|
1469
|
-
activeDescendantId:
|
|
1470
|
-
activeIndex:
|
|
1471
|
-
activeSubIndex:
|
|
1481
|
+
setTriggerRef: ke,
|
|
1482
|
+
onClick: Oe,
|
|
1483
|
+
onKeyDown: De
|
|
1484
|
+
}, Fe = le.items.findIndex((e) => e.type === "subTrigger" && e.id === H), X = le.items[Fe], Ie = X?.type === "subTrigger" ? X.subItems[W] : void 0, Le = {
|
|
1485
|
+
activeDescendantId: Ie && !Ie.disabled ? `${z}-item-${Fe}-${W}` : de >= 0 && de < le.items.length ? `${z}-item-${de}` : void 0,
|
|
1486
|
+
activeIndex: de,
|
|
1487
|
+
activeSubIndex: W,
|
|
1472
1488
|
closeOnSelect: w,
|
|
1473
1489
|
color: a,
|
|
1474
|
-
contentReadyToFocus:
|
|
1490
|
+
contentReadyToFocus: J || ye,
|
|
1475
1491
|
contentId: z,
|
|
1476
|
-
contentProps:
|
|
1492
|
+
contentProps: K.content?.props,
|
|
1477
1493
|
disabled: E,
|
|
1478
|
-
entries:
|
|
1494
|
+
entries: le.entries,
|
|
1479
1495
|
getItemId: (e) => `${z}-item-${e}`,
|
|
1480
|
-
isOpen:
|
|
1481
|
-
items:
|
|
1496
|
+
isOpen: pe,
|
|
1497
|
+
items: le.items,
|
|
1482
1498
|
loading: D,
|
|
1483
1499
|
loadingText: O,
|
|
1484
1500
|
empty: F,
|
|
1485
1501
|
maxWidth: b,
|
|
1486
1502
|
minWidth: y,
|
|
1487
|
-
openSubId:
|
|
1488
|
-
onKeyDown:
|
|
1489
|
-
portal: !
|
|
1490
|
-
radioValues:
|
|
1491
|
-
searchPlaceholder:
|
|
1492
|
-
searchProps:
|
|
1493
|
-
searchValue:
|
|
1494
|
-
searchable:
|
|
1495
|
-
selectItem:
|
|
1496
|
-
setActiveIndex:
|
|
1497
|
-
setActiveSubIndex:
|
|
1498
|
-
setContentRef:
|
|
1499
|
-
setOpenSubId:
|
|
1503
|
+
openSubId: H,
|
|
1504
|
+
onKeyDown: De,
|
|
1505
|
+
portal: !K.portal && x,
|
|
1506
|
+
radioValues: ee,
|
|
1507
|
+
searchPlaceholder: K.search?.props.placeholder ?? N ?? (A || ae ? "Type a command..." : "Search actions..."),
|
|
1508
|
+
searchProps: K.search?.props,
|
|
1509
|
+
searchValue: ie,
|
|
1510
|
+
searchable: oe,
|
|
1511
|
+
selectItem: Ee,
|
|
1512
|
+
setActiveIndex: fe,
|
|
1513
|
+
setActiveSubIndex: G,
|
|
1514
|
+
setContentRef: Ae,
|
|
1515
|
+
setOpenSubId: Ce,
|
|
1500
1516
|
setRadioValue: (e, t) => {
|
|
1501
|
-
|
|
1517
|
+
te((n) => ({
|
|
1502
1518
|
...n,
|
|
1503
1519
|
[e]: t
|
|
1504
1520
|
}));
|
|
1505
1521
|
},
|
|
1506
|
-
setSearchValue:
|
|
1522
|
+
setSearchValue: Se,
|
|
1507
1523
|
size: i,
|
|
1508
|
-
surfaceStyle:
|
|
1524
|
+
surfaceStyle: Pe,
|
|
1509
1525
|
triggerId: R
|
|
1510
1526
|
};
|
|
1511
|
-
return /* @__PURE__ */ g(
|
|
1512
|
-
value:
|
|
1513
|
-
children: /* @__PURE__ */ g(
|
|
1527
|
+
return /* @__PURE__ */ g(Me, {
|
|
1528
|
+
value: Y,
|
|
1529
|
+
children: /* @__PURE__ */ g(je, {
|
|
1514
1530
|
value: Le,
|
|
1515
1531
|
children: /* @__PURE__ */ _("div", {
|
|
1516
|
-
className:
|
|
1532
|
+
className: q(Bt.wrapper, I),
|
|
1517
1533
|
"data-disabled": E || void 0,
|
|
1518
|
-
children: [
|
|
1534
|
+
children: [K.trigger ?? null, K.portal ?? K.content ?? /* @__PURE__ */ g(At, {})]
|
|
1519
1535
|
})
|
|
1520
1536
|
})
|
|
1521
1537
|
});
|
|
1522
1538
|
};
|
|
1523
|
-
|
|
1524
|
-
function
|
|
1539
|
+
Vt.displayName = "DropdownRoot";
|
|
1540
|
+
function Ht(e, t, n, r) {
|
|
1525
1541
|
let i = t;
|
|
1526
1542
|
for (let a = 0; a < e.length; a++) {
|
|
1527
1543
|
let a = i + n;
|
|
@@ -1530,7 +1546,7 @@ function Vt(e, t, n, r) {
|
|
|
1530
1546
|
}
|
|
1531
1547
|
return t;
|
|
1532
1548
|
}
|
|
1533
|
-
function
|
|
1549
|
+
function Ut(e) {
|
|
1534
1550
|
let t = !1;
|
|
1535
1551
|
return {
|
|
1536
1552
|
originalEvent: e,
|
|
@@ -1542,13 +1558,13 @@ function Ht(e) {
|
|
|
1542
1558
|
}
|
|
1543
1559
|
};
|
|
1544
1560
|
}
|
|
1545
|
-
function
|
|
1561
|
+
function Wt(e) {
|
|
1546
1562
|
let t = [];
|
|
1547
1563
|
return e.forEach((e) => {
|
|
1548
|
-
t.push(e), e.type === "subTrigger" && t.push(...
|
|
1564
|
+
t.push(e), e.type === "subTrigger" && t.push(...Wt(e.subItems));
|
|
1549
1565
|
}), t;
|
|
1550
1566
|
}
|
|
1551
|
-
function
|
|
1567
|
+
function Gt(e, t) {
|
|
1552
1568
|
let n = t.trim().toLocaleLowerCase(), r = new Set(e.items.filter((e) => e.label.toLocaleLowerCase().includes(n)).map((e) => e.id)), i = e.items.filter((e) => r.has(e.id));
|
|
1553
1569
|
return {
|
|
1554
1570
|
...e,
|
|
@@ -1557,7 +1573,7 @@ function Wt(e, t) {
|
|
|
1557
1573
|
};
|
|
1558
1574
|
}
|
|
1559
1575
|
// src/components/Dropdown/Search/DropdownSearch.tsx
|
|
1560
|
-
var
|
|
1576
|
+
var Kt = J("search", "Dropdown.Search"), qt = J("subContent", "Dropdown.SubContent"), Jt = J("subTrigger", "Dropdown.SubTrigger"), Yt = J("sub", "Dropdown.Sub"), Xt = {
|
|
1561
1577
|
button: "_button_5pol3_1",
|
|
1562
1578
|
disabled: "_disabled_5pol3_63",
|
|
1563
1579
|
arrow: "_arrow_5pol3_71",
|
|
@@ -1573,96 +1589,96 @@ var Gt = q("search", "Dropdown.Search"), Kt = q("subContent", "Dropdown.SubConte
|
|
|
1573
1589
|
lg: "_lg_5pol3_350",
|
|
1574
1590
|
label: "_label_5pol3_362",
|
|
1575
1591
|
open: "_open_5pol3_390"
|
|
1576
|
-
},
|
|
1577
|
-
F(
|
|
1578
|
-
var
|
|
1579
|
-
let o =
|
|
1592
|
+
}, Zt = (e) => /* @__PURE__ */ g(Qt, { ...e });
|
|
1593
|
+
F(Zt, "trigger"), Zt.displayName = "Dropdown.Trigger";
|
|
1594
|
+
var Qt = ({ children: e, asChild: t = !1, disabled: r, className: i }) => {
|
|
1595
|
+
let o = Ne(), s = Pe(), c = t && a(e) ? e : void 0, l = o.disabled || r, u = {
|
|
1580
1596
|
id: s.triggerId,
|
|
1581
|
-
ref: c ?
|
|
1597
|
+
ref: c ? Rt(c.props.ref, s.setTriggerRef) : s.setTriggerRef,
|
|
1582
1598
|
"aria-controls": s.isOpen ? s.contentId : void 0,
|
|
1583
1599
|
"aria-disabled": l || void 0,
|
|
1584
1600
|
"aria-expanded": s.isOpen,
|
|
1585
1601
|
"aria-haspopup": "menu",
|
|
1586
|
-
className:
|
|
1602
|
+
className: q(!c && Xt.button, !c && Xt[o.size], !c && Xt[o.color], i),
|
|
1587
1603
|
"data-state": s.isOpen ? "open" : "closed",
|
|
1588
1604
|
disabled: l || void 0,
|
|
1589
|
-
onClick:
|
|
1590
|
-
onKeyDown:
|
|
1605
|
+
onClick: Lt(c?.props.onClick, s.onClick),
|
|
1606
|
+
onKeyDown: Lt(c?.props.onKeyDown, s.onKeyDown)
|
|
1591
1607
|
};
|
|
1592
1608
|
return c ? n(c, {
|
|
1593
1609
|
...u,
|
|
1594
|
-
className:
|
|
1610
|
+
className: q(c.props.className, i)
|
|
1595
1611
|
}) : /* @__PURE__ */ _("button", {
|
|
1596
1612
|
type: "button",
|
|
1597
1613
|
...u,
|
|
1598
1614
|
children: [/* @__PURE__ */ g("span", {
|
|
1599
|
-
className:
|
|
1615
|
+
className: Xt.label,
|
|
1600
1616
|
children: e
|
|
1601
1617
|
}), /* @__PURE__ */ g("span", {
|
|
1602
|
-
className:
|
|
1618
|
+
className: q(Xt.arrow, { [Xt.open]: s.isOpen }),
|
|
1603
1619
|
"aria-hidden": "true",
|
|
1604
1620
|
children: /* @__PURE__ */ g(y, {})
|
|
1605
1621
|
})]
|
|
1606
1622
|
});
|
|
1607
1623
|
};
|
|
1608
|
-
|
|
1624
|
+
Qt.displayName = "DropdownTriggerSurface";
|
|
1609
1625
|
// src/components/Dropdown/Dropdown.tsx
|
|
1610
|
-
var
|
|
1611
|
-
Trigger:
|
|
1612
|
-
Content:
|
|
1613
|
-
Search:
|
|
1614
|
-
Item:
|
|
1615
|
-
CheckboxItem:
|
|
1616
|
-
RadioGroup:
|
|
1617
|
-
RadioItem:
|
|
1618
|
-
Group:
|
|
1619
|
-
Label:
|
|
1620
|
-
Separator:
|
|
1621
|
-
Sub:
|
|
1622
|
-
SubTrigger:
|
|
1623
|
-
SubContent:
|
|
1624
|
-
ItemIcon:
|
|
1625
|
-
ItemDescription:
|
|
1626
|
-
ItemBadge:
|
|
1627
|
-
ItemShortcut:
|
|
1628
|
-
Arrow:
|
|
1629
|
-
Empty:
|
|
1630
|
-
Loading:
|
|
1626
|
+
var $t = Object.assign(Vt, {
|
|
1627
|
+
Trigger: Zt,
|
|
1628
|
+
Content: At,
|
|
1629
|
+
Search: Kt,
|
|
1630
|
+
Item: X,
|
|
1631
|
+
CheckboxItem: Se,
|
|
1632
|
+
RadioGroup: Ft,
|
|
1633
|
+
RadioItem: It,
|
|
1634
|
+
Group: Ee,
|
|
1635
|
+
Label: He,
|
|
1636
|
+
Separator: qe,
|
|
1637
|
+
Sub: Yt,
|
|
1638
|
+
SubTrigger: Jt,
|
|
1639
|
+
SubContent: qt,
|
|
1640
|
+
ItemIcon: Nt,
|
|
1641
|
+
ItemDescription: Mt,
|
|
1642
|
+
ItemBadge: jt,
|
|
1643
|
+
ItemShortcut: Pt,
|
|
1644
|
+
Arrow: ge,
|
|
1645
|
+
Empty: we,
|
|
1646
|
+
Loading: We
|
|
1631
1647
|
});
|
|
1632
|
-
|
|
1648
|
+
$t.displayName = "Dropdown";
|
|
1633
1649
|
// src/components/Modal/internal/ModalContext.tsx
|
|
1634
|
-
var
|
|
1635
|
-
let e = s(
|
|
1650
|
+
var en = r(void 0), tn = r(void 0), nn = () => {
|
|
1651
|
+
let e = s(en);
|
|
1636
1652
|
if (e === void 0) throw Error("Modal compound components must be used inside Modal");
|
|
1637
1653
|
return e;
|
|
1638
|
-
},
|
|
1639
|
-
|
|
1640
|
-
var
|
|
1654
|
+
}, rn = () => s(tn), an = en.Provider, on = tn.Provider;
|
|
1655
|
+
en.displayName = "ModalContext", tn.displayName = "ModalContentContext";
|
|
1656
|
+
var sn = {
|
|
1641
1657
|
modalBody: "_modalBody_ou4ff_1",
|
|
1642
1658
|
inside: "_inside_ou4ff_6"
|
|
1643
|
-
},
|
|
1644
|
-
let n =
|
|
1659
|
+
}, cn = ({ children: e, className: t }) => {
|
|
1660
|
+
let n = rn();
|
|
1645
1661
|
return /* @__PURE__ */ g("div", {
|
|
1646
|
-
className:
|
|
1662
|
+
className: q(sn.modalBody, n?.scrollBehavior === "inside" && sn.inside, t),
|
|
1647
1663
|
children: e
|
|
1648
1664
|
});
|
|
1649
1665
|
};
|
|
1650
|
-
|
|
1651
|
-
var
|
|
1666
|
+
cn.displayName = "ModalBody";
|
|
1667
|
+
var ln = {
|
|
1652
1668
|
modalHeader: "_modalHeader_1xg08_1",
|
|
1653
1669
|
modalHeaderText: "_modalHeaderText_1xg08_8",
|
|
1654
1670
|
modalHeaderTitle: "_modalHeaderTitle_1xg08_13",
|
|
1655
1671
|
modalHeaderDescription: "_modalHeaderDescription_1xg08_20",
|
|
1656
1672
|
modalHeaderCloseButton: "_modalHeaderCloseButton_1xg08_25"
|
|
1657
|
-
},
|
|
1658
|
-
let o =
|
|
1673
|
+
}, un = ({ asChild: e = !1, children: t, className: r, "aria-label": i }) => {
|
|
1674
|
+
let o = nn(), s = e && a(t) ? t : void 0, c = {
|
|
1659
1675
|
"aria-label": s ? i : i ?? "Close dialog",
|
|
1660
|
-
className:
|
|
1661
|
-
onClick:
|
|
1676
|
+
className: q(!s && ln.modalHeaderCloseButton, r),
|
|
1677
|
+
onClick: Lt(s?.props.onClick, o.requestClose)
|
|
1662
1678
|
};
|
|
1663
1679
|
return s ? n(s, {
|
|
1664
1680
|
...c,
|
|
1665
|
-
className:
|
|
1681
|
+
className: q(s.props.className, r),
|
|
1666
1682
|
"aria-label": i ?? s.props["aria-label"]
|
|
1667
1683
|
}) : /* @__PURE__ */ g("button", {
|
|
1668
1684
|
type: "button",
|
|
@@ -1670,8 +1686,8 @@ var cn = {
|
|
|
1670
1686
|
children: /* @__PURE__ */ g(x, { size: 16 })
|
|
1671
1687
|
});
|
|
1672
1688
|
};
|
|
1673
|
-
|
|
1674
|
-
var
|
|
1689
|
+
un.displayName = "Modal.Close";
|
|
1690
|
+
var dn = {
|
|
1675
1691
|
content: "_content_1tnw8_1",
|
|
1676
1692
|
animated: "_animated_1tnw8_24",
|
|
1677
1693
|
"modal-content-open": "_modal-content-open_1tnw8_1",
|
|
@@ -1685,11 +1701,11 @@ var un = {
|
|
|
1685
1701
|
full: "_full_1tnw8_107",
|
|
1686
1702
|
inside: "_inside_1tnw8_113",
|
|
1687
1703
|
outside: "_outside_1tnw8_117"
|
|
1688
|
-
},
|
|
1689
|
-
let f =
|
|
1704
|
+
}, fn = ({ children: e, size: t = "md", placement: n = "center", scrollBehavior: r = "inside", animated: i = !0, forceMount: a = !1, ariaLabel: s, ariaLabelledBy: c, ariaDescribedBy: l, className: u, style: d }) => {
|
|
1705
|
+
let f = nn(), m = f.open, h = m && f.shouldRender, [_, v] = p(null), y = o((e) => {
|
|
1690
1706
|
f.setContentRef(e), v(e);
|
|
1691
1707
|
}, [f]);
|
|
1692
|
-
if (
|
|
1708
|
+
if (Qe({
|
|
1693
1709
|
active: h,
|
|
1694
1710
|
contentRef: f.contentRef,
|
|
1695
1711
|
enabled: f.trapFocus,
|
|
@@ -1698,19 +1714,19 @@ var un = {
|
|
|
1698
1714
|
onCloseAutoFocus: f.onCloseAutoFocus,
|
|
1699
1715
|
onOpenAutoFocus: f.onOpenAutoFocus,
|
|
1700
1716
|
restoreFocus: f.restoreFocus
|
|
1701
|
-
}),
|
|
1717
|
+
}), Ye({
|
|
1702
1718
|
active: m,
|
|
1703
1719
|
content: _,
|
|
1704
1720
|
enabled: f.modal
|
|
1705
1721
|
}), !f.shouldRender && !a) return null;
|
|
1706
1722
|
let b = c ?? (s ? void 0 : f.titleId), x = l ?? f.descriptionId;
|
|
1707
|
-
return /* @__PURE__ */ g(
|
|
1723
|
+
return /* @__PURE__ */ g(on, {
|
|
1708
1724
|
value: { scrollBehavior: r },
|
|
1709
1725
|
children: /* @__PURE__ */ g("div", {
|
|
1710
1726
|
id: f.contentId,
|
|
1711
|
-
ref:
|
|
1727
|
+
ref: Rt(y),
|
|
1712
1728
|
tabIndex: -1,
|
|
1713
|
-
className:
|
|
1729
|
+
className: q(dn.content, dn[t], dn[n], dn[r], i && dn.animated, u),
|
|
1714
1730
|
style: {
|
|
1715
1731
|
...f.animationStyle,
|
|
1716
1732
|
...d
|
|
@@ -1726,57 +1742,57 @@ var un = {
|
|
|
1726
1742
|
})
|
|
1727
1743
|
});
|
|
1728
1744
|
};
|
|
1729
|
-
|
|
1730
|
-
var
|
|
1731
|
-
className:
|
|
1745
|
+
fn.displayName = "ModalContent";
|
|
1746
|
+
var pn = { modalFooter: "_modalFooter_sb1pn_1" }, mn = ({ children: e, className: t }) => /* @__PURE__ */ g("div", {
|
|
1747
|
+
className: q(pn.modalFooter, t),
|
|
1732
1748
|
children: e
|
|
1733
1749
|
});
|
|
1734
|
-
|
|
1750
|
+
mn.displayName = "ModalFooter";
|
|
1735
1751
|
// src/components/Modal/Header/ModalDescription.tsx
|
|
1736
|
-
var
|
|
1737
|
-
let { descriptionId: t, setDescriptionPresent: n } =
|
|
1752
|
+
var hn = ({ children: e }) => {
|
|
1753
|
+
let { descriptionId: t, setDescriptionPresent: n } = nn();
|
|
1738
1754
|
return c(() => (n(!0), () => n(!1)), [n]), /* @__PURE__ */ g("p", {
|
|
1739
1755
|
id: t,
|
|
1740
|
-
className:
|
|
1756
|
+
className: ln.modalHeaderDescription,
|
|
1741
1757
|
children: e
|
|
1742
1758
|
});
|
|
1743
1759
|
};
|
|
1744
|
-
|
|
1760
|
+
hn.displayName = "Modal.Description";
|
|
1745
1761
|
// src/components/Modal/Header/ModalHeader.tsx
|
|
1746
|
-
var
|
|
1747
|
-
className:
|
|
1762
|
+
var gn = ({ children: e, className: t }) => /* @__PURE__ */ g("div", {
|
|
1763
|
+
className: q(ln.modalHeader, t),
|
|
1748
1764
|
children: e
|
|
1749
1765
|
});
|
|
1750
|
-
|
|
1766
|
+
gn.displayName = "ModalHeader";
|
|
1751
1767
|
// src/components/Modal/Header/ModalTitle.tsx
|
|
1752
|
-
var
|
|
1753
|
-
let { setTitlePresent: t, titleId: n } =
|
|
1768
|
+
var _n = ({ children: e }) => {
|
|
1769
|
+
let { setTitlePresent: t, titleId: n } = nn();
|
|
1754
1770
|
return u(() => (t(!0), () => t(!1)), [t]), /* @__PURE__ */ g("h2", {
|
|
1755
1771
|
id: n,
|
|
1756
|
-
className:
|
|
1772
|
+
className: ln.modalHeaderTitle,
|
|
1757
1773
|
children: e
|
|
1758
1774
|
});
|
|
1759
1775
|
};
|
|
1760
|
-
|
|
1761
|
-
var
|
|
1776
|
+
_n.displayName = "Modal.Title";
|
|
1777
|
+
var vn = {
|
|
1762
1778
|
overlay: "_overlay_d6wdf_1",
|
|
1763
1779
|
"overlay--open": "_overlay--open_d6wdf_10",
|
|
1764
1780
|
"overlay--animated": "_overlay--animated_d6wdf_15",
|
|
1765
1781
|
"modal-overlay-open": "_modal-overlay-open_d6wdf_1",
|
|
1766
1782
|
"modal-overlay-close": "_modal-overlay-close_d6wdf_1"
|
|
1767
|
-
},
|
|
1768
|
-
let { animation: r, animationStyle: i, open: a, shouldRender: o } =
|
|
1783
|
+
}, yn = ({ className: e, animated: t = !0, forceMount: n = !1 }) => {
|
|
1784
|
+
let { animation: r, animationStyle: i, open: a, shouldRender: o } = nn();
|
|
1769
1785
|
return !o && !n ? null : /* @__PURE__ */ g("div", {
|
|
1770
|
-
className:
|
|
1786
|
+
className: q(vn.overlay, a && vn["overlay--open"], t && vn["overlay--animated"], e),
|
|
1771
1787
|
style: i,
|
|
1772
1788
|
"data-state": a ? "open" : "closed",
|
|
1773
1789
|
"data-animation": r,
|
|
1774
1790
|
"aria-hidden": "true"
|
|
1775
1791
|
});
|
|
1776
1792
|
};
|
|
1777
|
-
|
|
1793
|
+
yn.displayName = "ModalOverlay";
|
|
1778
1794
|
// src/components/Modal/internal/useModalDismiss.ts
|
|
1779
|
-
var
|
|
1795
|
+
var bn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnEscape: i, closeOnOutsidePress: a, onEscapeKeyDown: o, onPointerDownOutside: s, onInteractOutside: c, requestClose: l }) => ft({
|
|
1780
1796
|
active: e,
|
|
1781
1797
|
registrationActive: t,
|
|
1782
1798
|
id: n,
|
|
@@ -1788,55 +1804,55 @@ var yn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1788
1804
|
onInteractOutside: c ? (e) => c(e) : void 0,
|
|
1789
1805
|
onPointerDownOutside: s ? (e) => s(e) : void 0,
|
|
1790
1806
|
requestClose: l
|
|
1791
|
-
}),
|
|
1792
|
-
standard:
|
|
1807
|
+
}), xn = {
|
|
1808
|
+
standard: oe.components.modal.motion.easing,
|
|
1793
1809
|
linear: "linear",
|
|
1794
1810
|
ease: "ease",
|
|
1795
1811
|
"ease-in": "ease-in",
|
|
1796
1812
|
"ease-out": "ease-out",
|
|
1797
1813
|
"ease-in-out": "ease-in-out"
|
|
1798
|
-
},
|
|
1814
|
+
}, Sn = (e) => Number.parseFloat(e), Cn = (e) => typeof e == "number" ? {
|
|
1799
1815
|
close: e,
|
|
1800
1816
|
open: e
|
|
1801
1817
|
} : {
|
|
1802
|
-
close: e?.close ??
|
|
1803
|
-
open: e?.open ??
|
|
1804
|
-
},
|
|
1805
|
-
let T = f(null), E = f(null), { contentId: D, descriptionId: O, open: k, requestClose: A, setOpen: j, titleId: M } =
|
|
1818
|
+
close: e?.close ?? Sn(oe.components.modal.motion.closeDuration),
|
|
1819
|
+
open: e?.open ?? Sn(oe.components.modal.motion.openDuration)
|
|
1820
|
+
}, wn = ({ open: e, defaultOpen: t = !1, onOpenChange: n, animation: r = "scale", duration: i, easing: a = "standard", modal: s = !0, closeOnEscape: l = !0, closeOnOutsidePress: u = !0, preventScroll: m = !0, restoreFocus: h = !0, trapFocus: g = !0, initialFocus: _, finalFocus: v, onOpenAutoFocus: y, onCloseAutoFocus: b, onEscapeKeyDown: x, onPointerDownOutside: S, onInteractOutside: C, role: w = "dialog" }) => {
|
|
1821
|
+
let T = f(null), E = f(null), { contentId: D, descriptionId: O, open: k, requestClose: A, setOpen: j, titleId: M } = wt({
|
|
1806
1822
|
open: e,
|
|
1807
1823
|
defaultOpen: t,
|
|
1808
1824
|
onOpenChange: n,
|
|
1809
1825
|
closeOnEscape: l,
|
|
1810
1826
|
closeOnOutsidePress: u
|
|
1811
|
-
}), [N, P] = p(!1), [F, I] = p(!1), [L, R] = p(0), z =
|
|
1827
|
+
}), [N, P] = p(!1), [F, I] = p(!1), [L, R] = p(0), z = Cn(i), B = r === "none" ? 0 : z.close, [V, H] = p(k);
|
|
1812
1828
|
c(() => {
|
|
1813
1829
|
if (k) {
|
|
1814
|
-
|
|
1830
|
+
H(!0);
|
|
1815
1831
|
return;
|
|
1816
1832
|
}
|
|
1817
|
-
if (
|
|
1818
|
-
|
|
1833
|
+
if (B === 0) {
|
|
1834
|
+
H(!1);
|
|
1819
1835
|
return;
|
|
1820
1836
|
}
|
|
1821
1837
|
let e = window.setTimeout(() => {
|
|
1822
|
-
|
|
1823
|
-
},
|
|
1838
|
+
H(!1);
|
|
1839
|
+
}, B);
|
|
1824
1840
|
return () => {
|
|
1825
1841
|
window.clearTimeout(e);
|
|
1826
1842
|
};
|
|
1827
|
-
}, [
|
|
1828
|
-
let
|
|
1843
|
+
}, [B, k]);
|
|
1844
|
+
let U = o(() => {
|
|
1829
1845
|
A();
|
|
1830
|
-
}, [A]),
|
|
1846
|
+
}, [A]), W = o((e) => {
|
|
1831
1847
|
T.current !== e && (T.current = e, R((e) => e + 1));
|
|
1832
1848
|
}, []);
|
|
1833
|
-
|
|
1849
|
+
_t({
|
|
1834
1850
|
active: k,
|
|
1835
1851
|
enabled: m
|
|
1836
1852
|
});
|
|
1837
|
-
let
|
|
1853
|
+
let G = bn({
|
|
1838
1854
|
active: k,
|
|
1839
|
-
registrationActive:
|
|
1855
|
+
registrationActive: V,
|
|
1840
1856
|
id: D,
|
|
1841
1857
|
contentRef: T,
|
|
1842
1858
|
closeOnEscape: l,
|
|
@@ -1844,21 +1860,21 @@ var yn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1844
1860
|
onEscapeKeyDown: x,
|
|
1845
1861
|
onInteractOutside: C,
|
|
1846
1862
|
onPointerDownOutside: S,
|
|
1847
|
-
requestClose:
|
|
1848
|
-
}),
|
|
1863
|
+
requestClose: U
|
|
1864
|
+
}), ee = d(() => ({
|
|
1849
1865
|
"--modal-animation-close-duration": `${z.close}ms`,
|
|
1850
|
-
"--modal-animation-easing":
|
|
1866
|
+
"--modal-animation-easing": xn[a],
|
|
1851
1867
|
"--modal-animation-open-duration": `${z.open}ms`,
|
|
1852
|
-
"--z-index-modal":
|
|
1868
|
+
"--z-index-modal": G.zIndex === void 0 ? void 0 : `${G.zIndex}`
|
|
1853
1869
|
}), [
|
|
1854
1870
|
z.close,
|
|
1855
1871
|
z.open,
|
|
1856
1872
|
a,
|
|
1857
|
-
|
|
1858
|
-
]),
|
|
1873
|
+
G.zIndex
|
|
1874
|
+
]), te = pt({
|
|
1859
1875
|
presentation: "modal",
|
|
1860
|
-
animationStyle:
|
|
1861
|
-
}).animationStyle ??
|
|
1876
|
+
animationStyle: ee
|
|
1877
|
+
}).animationStyle ?? ee;
|
|
1862
1878
|
return c(() => {
|
|
1863
1879
|
if (process.env.NODE_ENV === "production" || !k || N || !T.current) return;
|
|
1864
1880
|
let e = window.setTimeout(() => {
|
|
@@ -1881,7 +1897,7 @@ var yn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1881
1897
|
]), {
|
|
1882
1898
|
context: d(() => ({
|
|
1883
1899
|
animation: r,
|
|
1884
|
-
animationStyle:
|
|
1900
|
+
animationStyle: te,
|
|
1885
1901
|
closeOnEscape: l,
|
|
1886
1902
|
closeOnOutsidePress: u,
|
|
1887
1903
|
contentId: D,
|
|
@@ -1889,7 +1905,7 @@ var yn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1889
1905
|
descriptionId: O,
|
|
1890
1906
|
finalFocus: v,
|
|
1891
1907
|
initialFocus: _,
|
|
1892
|
-
zIndex:
|
|
1908
|
+
zIndex: G.zIndex,
|
|
1893
1909
|
modal: s,
|
|
1894
1910
|
onCloseAutoFocus: b,
|
|
1895
1911
|
onEscapeKeyDown: x,
|
|
@@ -1898,27 +1914,27 @@ var yn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1898
1914
|
onPointerDownOutside: S,
|
|
1899
1915
|
open: k,
|
|
1900
1916
|
preventScroll: m,
|
|
1901
|
-
requestClose:
|
|
1917
|
+
requestClose: U,
|
|
1902
1918
|
restoreFocus: h,
|
|
1903
1919
|
role: w,
|
|
1904
|
-
setContentRef:
|
|
1920
|
+
setContentRef: W,
|
|
1905
1921
|
setDescriptionPresent: I,
|
|
1906
1922
|
setOpen: j,
|
|
1907
1923
|
setTitlePresent: P,
|
|
1908
|
-
shouldRender:
|
|
1924
|
+
shouldRender: V,
|
|
1909
1925
|
titleId: M,
|
|
1910
1926
|
trapFocus: g,
|
|
1911
1927
|
triggerRef: E
|
|
1912
1928
|
}), [
|
|
1913
1929
|
r,
|
|
1914
|
-
|
|
1930
|
+
te,
|
|
1915
1931
|
l,
|
|
1916
1932
|
u,
|
|
1917
1933
|
D,
|
|
1918
1934
|
O,
|
|
1919
1935
|
v,
|
|
1920
1936
|
_,
|
|
1921
|
-
|
|
1937
|
+
G.zIndex,
|
|
1922
1938
|
k,
|
|
1923
1939
|
s,
|
|
1924
1940
|
b,
|
|
@@ -1927,47 +1943,47 @@ var yn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1927
1943
|
y,
|
|
1928
1944
|
S,
|
|
1929
1945
|
m,
|
|
1930
|
-
|
|
1946
|
+
U,
|
|
1931
1947
|
h,
|
|
1932
1948
|
w,
|
|
1933
|
-
|
|
1949
|
+
W,
|
|
1934
1950
|
j,
|
|
1935
|
-
|
|
1951
|
+
V,
|
|
1936
1952
|
M,
|
|
1937
1953
|
g
|
|
1938
1954
|
]),
|
|
1939
1955
|
open: k
|
|
1940
1956
|
};
|
|
1941
|
-
},
|
|
1942
|
-
let { context: r, open: i } =
|
|
1943
|
-
return /* @__PURE__ */ g(
|
|
1957
|
+
}, Tn = ({ children: e, className: t, ...n }) => {
|
|
1958
|
+
let { context: r, open: i } = wn(n);
|
|
1959
|
+
return /* @__PURE__ */ g(an, {
|
|
1944
1960
|
value: r,
|
|
1945
1961
|
children: /* @__PURE__ */ g("div", {
|
|
1946
|
-
className:
|
|
1962
|
+
className: q(t),
|
|
1947
1963
|
"data-state": i ? "open" : "closed",
|
|
1948
1964
|
children: e
|
|
1949
1965
|
})
|
|
1950
1966
|
});
|
|
1951
1967
|
};
|
|
1952
|
-
|
|
1968
|
+
Tn.displayName = "ModalRoot";
|
|
1953
1969
|
// src/components/Modal/Trigger/ModalTrigger.tsx
|
|
1954
|
-
var
|
|
1955
|
-
let o =
|
|
1970
|
+
var En = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
1971
|
+
let o = nn(), s = t && a(e) ? e : void 0, c = r, l = {
|
|
1956
1972
|
"aria-controls": o.contentId,
|
|
1957
1973
|
"aria-disabled": c || void 0,
|
|
1958
1974
|
"aria-expanded": o.open,
|
|
1959
1975
|
"aria-haspopup": "dialog",
|
|
1960
|
-
className:
|
|
1976
|
+
className: q(i),
|
|
1961
1977
|
"data-state": o.open ? "open" : "closed",
|
|
1962
1978
|
disabled: c || void 0,
|
|
1963
|
-
onClick:
|
|
1979
|
+
onClick: Lt(s?.props.onClick, () => {
|
|
1964
1980
|
c || o.setOpen(!0);
|
|
1965
1981
|
})
|
|
1966
1982
|
};
|
|
1967
1983
|
return s ? n(s, {
|
|
1968
1984
|
...l,
|
|
1969
|
-
ref:
|
|
1970
|
-
className:
|
|
1985
|
+
ref: Rt(s.props.ref, o.triggerRef),
|
|
1986
|
+
className: q(s.props.className, i)
|
|
1971
1987
|
}) : /* @__PURE__ */ g("button", {
|
|
1972
1988
|
ref: (e) => {
|
|
1973
1989
|
o.triggerRef.current = e;
|
|
@@ -1977,45 +1993,45 @@ var Tn = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
|
1977
1993
|
children: e
|
|
1978
1994
|
});
|
|
1979
1995
|
};
|
|
1980
|
-
|
|
1996
|
+
En.displayName = "Modal.Trigger";
|
|
1981
1997
|
// src/components/Modal/Modal.tsx
|
|
1982
|
-
var
|
|
1983
|
-
Trigger:
|
|
1984
|
-
Overlay:
|
|
1985
|
-
Content:
|
|
1986
|
-
Header:
|
|
1987
|
-
Title:
|
|
1988
|
-
Description:
|
|
1989
|
-
Body:
|
|
1990
|
-
Footer:
|
|
1991
|
-
Close:
|
|
1998
|
+
var Dn = Object.assign(Tn, {
|
|
1999
|
+
Trigger: En,
|
|
2000
|
+
Overlay: yn,
|
|
2001
|
+
Content: fn,
|
|
2002
|
+
Header: gn,
|
|
2003
|
+
Title: _n,
|
|
2004
|
+
Description: hn,
|
|
2005
|
+
Body: cn,
|
|
2006
|
+
Footer: mn,
|
|
2007
|
+
Close: un
|
|
1992
2008
|
});
|
|
1993
|
-
|
|
2009
|
+
Dn.displayName = "Modal";
|
|
1994
2010
|
// src/components/Popover/Context/PopoverContext.tsx
|
|
1995
|
-
var
|
|
1996
|
-
function
|
|
1997
|
-
return /* @__PURE__ */ g(
|
|
2011
|
+
var On = r(null);
|
|
2012
|
+
function kn({ children: e, value: t }) {
|
|
2013
|
+
return /* @__PURE__ */ g(On.Provider, {
|
|
1998
2014
|
value: t,
|
|
1999
2015
|
children: e
|
|
2000
2016
|
});
|
|
2001
2017
|
}
|
|
2002
|
-
function
|
|
2003
|
-
let t = s(
|
|
2018
|
+
function An(e) {
|
|
2019
|
+
let t = s(On);
|
|
2004
2020
|
if (!t) throw Error(`${e} must be used within Popover.Root`);
|
|
2005
2021
|
return t;
|
|
2006
2022
|
}
|
|
2007
2023
|
// src/components/Popover/Anchor/PopoverAnchor.tsx
|
|
2008
|
-
function
|
|
2024
|
+
function jn(e, t) {
|
|
2009
2025
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2010
2026
|
}
|
|
2011
|
-
function
|
|
2012
|
-
let { setAnchorRef: o } =
|
|
2027
|
+
function Mn({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
2028
|
+
let { setAnchorRef: o } = An("Popover.Anchor"), s = t && a(e) ? e : void 0;
|
|
2013
2029
|
return s ? n(s, {
|
|
2014
2030
|
...i,
|
|
2015
2031
|
ref: (e) => {
|
|
2016
|
-
|
|
2032
|
+
jn(s.props.ref, e), o(e);
|
|
2017
2033
|
},
|
|
2018
|
-
className:
|
|
2034
|
+
className: q(s.props.className, r)
|
|
2019
2035
|
}) : /* @__PURE__ */ g("div", {
|
|
2020
2036
|
...i,
|
|
2021
2037
|
ref: o,
|
|
@@ -2023,15 +2039,15 @@ function jn({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
|
2023
2039
|
children: e
|
|
2024
2040
|
});
|
|
2025
2041
|
}
|
|
2026
|
-
|
|
2027
|
-
var
|
|
2042
|
+
Mn.displayName = "Popover.Anchor";
|
|
2043
|
+
var Nn = { arrow: "_arrow_6lbs0_1" }, Pn = {
|
|
2028
2044
|
start: "20%",
|
|
2029
2045
|
center: null,
|
|
2030
2046
|
end: "80%"
|
|
2031
2047
|
};
|
|
2032
|
-
function
|
|
2033
|
-
let { arrowRef: s, floatingContext: c, placement: l } =
|
|
2034
|
-
return /* @__PURE__ */ g(
|
|
2048
|
+
function Fn({ width: e = 14, height: t = 7, tipRadius: n = 1, align: r = "center", offset: i, className: a, ...o }) {
|
|
2049
|
+
let { arrowRef: s, floatingContext: c, placement: l } = An("Popover.Arrow"), u = i ?? Pn[r], d = l.split("-")[0];
|
|
2050
|
+
return /* @__PURE__ */ g(V, {
|
|
2035
2051
|
...o,
|
|
2036
2052
|
ref: s,
|
|
2037
2053
|
context: c,
|
|
@@ -2043,13 +2059,13 @@ function Pn({ width: e = 14, height: t = 7, tipRadius: n = 1, align: r = "center
|
|
|
2043
2059
|
stroke: "var(--border-muted)",
|
|
2044
2060
|
strokeWidth: 1,
|
|
2045
2061
|
"data-side": d,
|
|
2046
|
-
className:
|
|
2062
|
+
className: q(Nn.arrow, a)
|
|
2047
2063
|
});
|
|
2048
2064
|
}
|
|
2049
|
-
|
|
2065
|
+
Fn.displayName = "Popover.Arrow";
|
|
2050
2066
|
// src/components/Popover/Close/PopoverClose.tsx
|
|
2051
|
-
function
|
|
2052
|
-
let { setOpen: c } =
|
|
2067
|
+
function In({ children: e, asChild: t = !1, className: r, disabled: i, onClick: o, ...s }) {
|
|
2068
|
+
let { setOpen: c } = An("Popover.Close"), l = t && a(e) ? e : void 0, u = i || l?.props.disabled === !0, d = (e) => {
|
|
2053
2069
|
l?.props.onClick?.(e), o?.(e), !(e.defaultPrevented || u) && c(!1, {
|
|
2054
2070
|
reason: "close",
|
|
2055
2071
|
event: e.nativeEvent
|
|
@@ -2062,7 +2078,7 @@ function Fn({ children: e, asChild: t = !1, className: r, disabled: i, onClick:
|
|
|
2062
2078
|
};
|
|
2063
2079
|
return l ? n(l, {
|
|
2064
2080
|
...f,
|
|
2065
|
-
className:
|
|
2081
|
+
className: q(l.props.className, r)
|
|
2066
2082
|
}) : /* @__PURE__ */ g("button", {
|
|
2067
2083
|
type: "button",
|
|
2068
2084
|
...f,
|
|
@@ -2070,19 +2086,19 @@ function Fn({ children: e, asChild: t = !1, className: r, disabled: i, onClick:
|
|
|
2070
2086
|
children: e
|
|
2071
2087
|
});
|
|
2072
2088
|
}
|
|
2073
|
-
|
|
2074
|
-
var
|
|
2089
|
+
In.displayName = "Popover.Close";
|
|
2090
|
+
var Ln = {
|
|
2075
2091
|
content: "_content_1jzfn_1",
|
|
2076
2092
|
"popover-in": "_popover-in_1jzfn_1"
|
|
2077
2093
|
};
|
|
2078
2094
|
// src/components/Popover/Content/PopoverContent.tsx
|
|
2079
|
-
function
|
|
2080
|
-
let { open: y, modal: b, portal: x, triggerRef: S, anchorRef: C, contentRef: w, contentId: T, titleId: E, descriptionId: D, placement: O, floatingStyles: k, setOpen: A, setContentRef: j } =
|
|
2095
|
+
function Rn({ children: e, asChild: t = !1, className: r, style: i, initialFocus: s, returnFocus: c = !0, closeOnEscape: l = !0, closeOnOutsidePress: u = !0, onEscapeKeyDown: d, onPointerDownOutside: f, onInteractOutside: m, onOpenAutoFocus: h, onCloseAutoFocus: _, ...v }) {
|
|
2096
|
+
let { open: y, modal: b, portal: x, triggerRef: S, anchorRef: C, contentRef: w, contentId: T, titleId: E, descriptionId: D, placement: O, floatingStyles: k, setOpen: A, setContentRef: j } = An("Popover.Content"), [M, N] = p(null), P = o((e, t) => {
|
|
2081
2097
|
A(!1, {
|
|
2082
2098
|
reason: e,
|
|
2083
2099
|
event: t
|
|
2084
2100
|
});
|
|
2085
|
-
}, [A]), F =
|
|
2101
|
+
}, [A]), F = ft({
|
|
2086
2102
|
active: y,
|
|
2087
2103
|
id: T,
|
|
2088
2104
|
zIndexLevel: "popover",
|
|
@@ -2095,7 +2111,7 @@ function Ln({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2095
2111
|
onInteractOutside: m,
|
|
2096
2112
|
requestClose: P
|
|
2097
2113
|
});
|
|
2098
|
-
|
|
2114
|
+
Qe({
|
|
2099
2115
|
active: y,
|
|
2100
2116
|
contentRef: w,
|
|
2101
2117
|
enabled: b,
|
|
@@ -2110,10 +2126,10 @@ function Ln({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2110
2126
|
h
|
|
2111
2127
|
]),
|
|
2112
2128
|
onCloseAutoFocus: _
|
|
2113
|
-
}),
|
|
2129
|
+
}), _t({
|
|
2114
2130
|
active: y,
|
|
2115
2131
|
enabled: b
|
|
2116
|
-
}),
|
|
2132
|
+
}), Ye({
|
|
2117
2133
|
active: y,
|
|
2118
2134
|
enabled: b,
|
|
2119
2135
|
content: M
|
|
@@ -2131,16 +2147,16 @@ function Ln({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2131
2147
|
"aria-describedby": D,
|
|
2132
2148
|
"data-state": "open",
|
|
2133
2149
|
"data-side": L,
|
|
2134
|
-
className:
|
|
2150
|
+
className: q(Ln.content, r),
|
|
2135
2151
|
style: {
|
|
2136
2152
|
...k,
|
|
2137
2153
|
zIndex: F.zIndex,
|
|
2138
2154
|
...i
|
|
2139
2155
|
}
|
|
2140
|
-
}, z = t && a(e) ? e : void 0,
|
|
2156
|
+
}, z = t && a(e) ? e : void 0, B = z ? n(z, {
|
|
2141
2157
|
...R,
|
|
2142
2158
|
ref: I,
|
|
2143
|
-
className:
|
|
2159
|
+
className: q(z.props.className, Ln.content, r),
|
|
2144
2160
|
style: {
|
|
2145
2161
|
...k,
|
|
2146
2162
|
zIndex: F.zIndex,
|
|
@@ -2152,31 +2168,31 @@ function Ln({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2152
2168
|
...R,
|
|
2153
2169
|
children: e
|
|
2154
2170
|
});
|
|
2155
|
-
return x ? /* @__PURE__ */ g(
|
|
2171
|
+
return x ? /* @__PURE__ */ g(kt, { children: B }) : B;
|
|
2156
2172
|
}
|
|
2157
|
-
|
|
2158
|
-
var
|
|
2173
|
+
Rn.displayName = "Popover.Content";
|
|
2174
|
+
var zn = { description: "_description_hji8o_1" };
|
|
2159
2175
|
// src/components/Popover/Description/PopoverDescription.tsx
|
|
2160
|
-
function
|
|
2161
|
-
let { descriptionId: o } =
|
|
2176
|
+
function Bn({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
2177
|
+
let { descriptionId: o } = An("Popover.Description"), s = t && a(e) ? e : void 0;
|
|
2162
2178
|
return s ? n(s, {
|
|
2163
2179
|
...i,
|
|
2164
2180
|
id: o,
|
|
2165
|
-
className:
|
|
2181
|
+
className: q(s.props.className, zn.description, r)
|
|
2166
2182
|
}) : /* @__PURE__ */ g("p", {
|
|
2167
2183
|
...i,
|
|
2168
2184
|
id: o,
|
|
2169
|
-
className:
|
|
2185
|
+
className: q(zn.description, r),
|
|
2170
2186
|
children: e
|
|
2171
2187
|
});
|
|
2172
2188
|
}
|
|
2173
|
-
|
|
2189
|
+
Bn.displayName = "Popover.Description";
|
|
2174
2190
|
// src/components/Popover/Root/PopoverRoot.tsx
|
|
2175
|
-
function
|
|
2191
|
+
function Vn(e, t) {
|
|
2176
2192
|
return t === "center" ? e : `${e}-${t}`;
|
|
2177
2193
|
}
|
|
2178
|
-
function
|
|
2179
|
-
let _ = f(null), v = f(null), y = f(null), b = f({ reason: "programmatic" }), x = l(), S = `vellira-popover-trigger-${x}`, C = `vellira-popover-content-${x}`, w = `vellira-popover-title-${x}`, T = `vellira-popover-description-${x}`, [E, D] =
|
|
2194
|
+
function Hn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenChange: i, side: a = "bottom", align: s = "center", sideOffset: c = 8, collisionPadding: u = 8, avoidCollisions: p = !0, portal: m = !0, strategy: h }) {
|
|
2195
|
+
let _ = f(null), v = f(null), y = f(null), b = f({ reason: "programmatic" }), x = l(), S = `vellira-popover-trigger-${x}`, C = `vellira-popover-content-${x}`, w = `vellira-popover-title-${x}`, T = `vellira-popover-description-${x}`, [E, D] = xt({
|
|
2180
2196
|
value: t,
|
|
2181
2197
|
defaultValue: n,
|
|
2182
2198
|
onChange: (e) => {
|
|
@@ -2184,12 +2200,12 @@ function Vn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenCh
|
|
|
2184
2200
|
}
|
|
2185
2201
|
}), O = o((e, t) => {
|
|
2186
2202
|
b.current = t, D(e);
|
|
2187
|
-
}, [D]), k = f(null), A = d(() => [
|
|
2203
|
+
}, [D]), k = f(null), A = d(() => [H({
|
|
2188
2204
|
element: k,
|
|
2189
2205
|
padding: 8
|
|
2190
|
-
})], []), { context: j, floatingStyles: M, isPositioned: N, placement: P, setFloatingRef: F, setRef: I } =
|
|
2206
|
+
})], []), { context: j, floatingStyles: M, isPositioned: N, placement: P, setFloatingRef: F, setRef: I } = pt({
|
|
2191
2207
|
open: E,
|
|
2192
|
-
placement:
|
|
2208
|
+
placement: Vn(a, s),
|
|
2193
2209
|
strategy: h,
|
|
2194
2210
|
portal: m,
|
|
2195
2211
|
offset: c + 7,
|
|
@@ -2203,7 +2219,7 @@ function Vn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenCh
|
|
|
2203
2219
|
}, [I]), z = o((e) => {
|
|
2204
2220
|
y.current = e, F(e);
|
|
2205
2221
|
}, [F]);
|
|
2206
|
-
return /* @__PURE__ */ g(
|
|
2222
|
+
return /* @__PURE__ */ g(kn, {
|
|
2207
2223
|
value: {
|
|
2208
2224
|
open: E,
|
|
2209
2225
|
modal: r,
|
|
@@ -2228,25 +2244,25 @@ function Vn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenCh
|
|
|
2228
2244
|
children: e
|
|
2229
2245
|
});
|
|
2230
2246
|
}
|
|
2231
|
-
var
|
|
2247
|
+
var Un = { title: "_title_1gham_1" };
|
|
2232
2248
|
// src/components/Popover/Title/PopoverTitle.tsx
|
|
2233
|
-
function
|
|
2234
|
-
let { titleId: o } =
|
|
2249
|
+
function Wn({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
2250
|
+
let { titleId: o } = An("Popover.Title"), s = t && a(e) ? e : void 0;
|
|
2235
2251
|
return s ? n(s, {
|
|
2236
2252
|
...i,
|
|
2237
2253
|
id: o,
|
|
2238
|
-
className:
|
|
2254
|
+
className: q(s.props.className, Un.title, r)
|
|
2239
2255
|
}) : /* @__PURE__ */ g("h2", {
|
|
2240
2256
|
...i,
|
|
2241
2257
|
id: o,
|
|
2242
|
-
className:
|
|
2258
|
+
className: q(Un.title, r),
|
|
2243
2259
|
children: e
|
|
2244
2260
|
});
|
|
2245
2261
|
}
|
|
2246
|
-
|
|
2262
|
+
Wn.displayName = "Popover.Title";
|
|
2247
2263
|
// src/components/Popover/Trigger/PopoverTrigger.tsx
|
|
2248
|
-
function
|
|
2249
|
-
let { open: c, triggerId: l, contentId: u, setOpen: d, setTriggerRef: f } =
|
|
2264
|
+
function Gn({ children: e, asChild: t = !1, disabled: r = !1, className: i, onClick: o, ...s }) {
|
|
2265
|
+
let { open: c, triggerId: l, contentId: u, setOpen: d, setTriggerRef: f } = An("Popover.Trigger"), p = t && a(e) ? e : void 0, m = r || p?.props.disabled === !0, h = {
|
|
2250
2266
|
id: l,
|
|
2251
2267
|
"aria-controls": c ? u : void 0,
|
|
2252
2268
|
"aria-expanded": c,
|
|
@@ -2264,7 +2280,7 @@ function Wn({ children: e, asChild: t = !1, disabled: r = !1, className: i, onCl
|
|
|
2264
2280
|
...s,
|
|
2265
2281
|
...h,
|
|
2266
2282
|
disabled: m || void 0,
|
|
2267
|
-
className:
|
|
2283
|
+
className: q(p.props.className, i),
|
|
2268
2284
|
ref: (e) => {
|
|
2269
2285
|
let t = p.props.ref;
|
|
2270
2286
|
typeof t == "function" ? t(e) : t && (t.current = e), f(e);
|
|
@@ -2279,21 +2295,21 @@ function Wn({ children: e, asChild: t = !1, disabled: r = !1, className: i, onCl
|
|
|
2279
2295
|
children: e
|
|
2280
2296
|
});
|
|
2281
2297
|
}
|
|
2282
|
-
|
|
2298
|
+
Gn.displayName = "Popover.Trigger";
|
|
2283
2299
|
// src/components/Popover/Popover.tsx
|
|
2284
|
-
var
|
|
2285
|
-
Anchor:
|
|
2286
|
-
Arrow:
|
|
2287
|
-
Close:
|
|
2288
|
-
Content:
|
|
2289
|
-
Description:
|
|
2290
|
-
Title:
|
|
2291
|
-
Trigger:
|
|
2292
|
-
}),
|
|
2293
|
-
function
|
|
2294
|
-
return s(
|
|
2300
|
+
var Kn = Object.assign(Hn, {
|
|
2301
|
+
Anchor: Mn,
|
|
2302
|
+
Arrow: Fn,
|
|
2303
|
+
Close: In,
|
|
2304
|
+
Content: Rn,
|
|
2305
|
+
Description: Bn,
|
|
2306
|
+
Title: Wn,
|
|
2307
|
+
Trigger: Gn
|
|
2308
|
+
}), qn = r(null), Jn = qn.Provider;
|
|
2309
|
+
function Yn() {
|
|
2310
|
+
return s(qn);
|
|
2295
2311
|
}
|
|
2296
|
-
var
|
|
2312
|
+
var Xn = {
|
|
2297
2313
|
root: "_root_goond_1",
|
|
2298
2314
|
invalid: "_invalid_goond_34",
|
|
2299
2315
|
control: "_control_goond_34",
|
|
@@ -2316,19 +2332,19 @@ var Yn = {
|
|
|
2316
2332
|
"radio-indicator-in": "_radio-indicator-in_goond_1",
|
|
2317
2333
|
content: "_content_goond_346",
|
|
2318
2334
|
error: "_error_goond_363"
|
|
2319
|
-
},
|
|
2320
|
-
primary:
|
|
2321
|
-
neutral:
|
|
2322
|
-
success:
|
|
2323
|
-
warning:
|
|
2324
|
-
danger:
|
|
2325
|
-
},
|
|
2326
|
-
let S =
|
|
2335
|
+
}, Zn = {
|
|
2336
|
+
primary: Xn.colorPrimary,
|
|
2337
|
+
neutral: Xn.colorNeutral,
|
|
2338
|
+
success: Xn.colorSuccess,
|
|
2339
|
+
warning: Xn.colorWarning,
|
|
2340
|
+
danger: Xn.colorDanger
|
|
2341
|
+
}, Qn = i(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: a, color: o, error: s, onCheckedChange: c, label: u, description: d, icon: f, wrapperClassName: p, className: m, id: h, name: v, "aria-describedby": y, ...b }, x) => {
|
|
2342
|
+
let S = Yn(), C = l(), w = h ?? C, T = d ? `${w}-description` : void 0, E = s ? `${w}-error` : void 0, D = [
|
|
2327
2343
|
T,
|
|
2328
2344
|
E,
|
|
2329
2345
|
S?.describedBy,
|
|
2330
2346
|
y
|
|
2331
|
-
].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] =
|
|
2347
|
+
].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = xt({
|
|
2332
2348
|
value: t,
|
|
2333
2349
|
defaultValue: n,
|
|
2334
2350
|
onChange: c
|
|
@@ -2336,10 +2352,10 @@ var Yn = {
|
|
|
2336
2352
|
M || (O ? S.onValueChange(e) : A(t.currentTarget.checked));
|
|
2337
2353
|
};
|
|
2338
2354
|
return /* @__PURE__ */ _("div", {
|
|
2339
|
-
className:
|
|
2355
|
+
className: q(Xn.root, Xn[I], F && Xn.invalid, M && Xn.disabled, Zn[L], m),
|
|
2340
2356
|
children: [/* @__PURE__ */ _("label", {
|
|
2341
2357
|
htmlFor: w,
|
|
2342
|
-
className:
|
|
2358
|
+
className: q(Xn.wrapper, p),
|
|
2343
2359
|
children: [
|
|
2344
2360
|
/* @__PURE__ */ g("input", {
|
|
2345
2361
|
...b,
|
|
@@ -2353,53 +2369,53 @@ var Yn = {
|
|
|
2353
2369
|
required: N,
|
|
2354
2370
|
"aria-invalid": F || void 0,
|
|
2355
2371
|
"aria-describedby": D,
|
|
2356
|
-
className:
|
|
2372
|
+
className: Xn.input,
|
|
2357
2373
|
onChange: R
|
|
2358
2374
|
}),
|
|
2359
2375
|
/* @__PURE__ */ g("span", {
|
|
2360
|
-
className:
|
|
2376
|
+
className: Xn.control,
|
|
2361
2377
|
"aria-hidden": "true",
|
|
2362
2378
|
children: /* @__PURE__ */ g("span", {
|
|
2363
|
-
className:
|
|
2379
|
+
className: q(Xn.indicator, f && Xn.customIcon),
|
|
2364
2380
|
children: f
|
|
2365
2381
|
})
|
|
2366
2382
|
}),
|
|
2367
2383
|
(u || d) && /* @__PURE__ */ _("span", {
|
|
2368
|
-
className:
|
|
2384
|
+
className: Xn.content,
|
|
2369
2385
|
children: [u && /* @__PURE__ */ g("span", {
|
|
2370
|
-
className:
|
|
2386
|
+
className: Xn.label,
|
|
2371
2387
|
children: u
|
|
2372
2388
|
}), d && /* @__PURE__ */ g("span", {
|
|
2373
2389
|
id: T,
|
|
2374
|
-
className:
|
|
2390
|
+
className: Xn.description,
|
|
2375
2391
|
children: d
|
|
2376
2392
|
})]
|
|
2377
2393
|
})
|
|
2378
2394
|
]
|
|
2379
2395
|
}), s && /* @__PURE__ */ g("div", {
|
|
2380
2396
|
id: E,
|
|
2381
|
-
className:
|
|
2397
|
+
className: Xn.error,
|
|
2382
2398
|
children: s
|
|
2383
2399
|
})]
|
|
2384
2400
|
});
|
|
2385
2401
|
});
|
|
2386
|
-
|
|
2402
|
+
Qn.displayName = "Radio";
|
|
2387
2403
|
// src/components/RadioGroup/Item/RadioGroupItem.tsx
|
|
2388
|
-
var
|
|
2404
|
+
var $n = i((e, t) => /* @__PURE__ */ g(Qn, {
|
|
2389
2405
|
...e,
|
|
2390
2406
|
ref: t
|
|
2391
2407
|
}));
|
|
2392
|
-
|
|
2408
|
+
$n.displayName = "RadioGroup.Item";
|
|
2393
2409
|
// src/components/RadioGroup/internal/useRadioGroupCollection.ts
|
|
2394
|
-
var
|
|
2410
|
+
var er = (e) => {
|
|
2395
2411
|
let t = e.current;
|
|
2396
2412
|
return t ? Array.from(t.querySelectorAll("input[type=\"radio\"]")) : [];
|
|
2397
|
-
},
|
|
2398
|
-
function
|
|
2413
|
+
}, tr = (e) => er(e).filter((e) => !e.disabled), nr = ["ArrowLeft", "ArrowRight"], rr = ["ArrowUp", "ArrowDown"];
|
|
2414
|
+
function ir({ rootRef: e, orientation: t }) {
|
|
2399
2415
|
return o((n) => {
|
|
2400
|
-
let r =
|
|
2416
|
+
let r = nr.includes(n.key), i = rr.includes(n.key), a = n.key === "Home" || n.key === "End";
|
|
2401
2417
|
if (!r && !i && !a || t === "horizontal" && i || t === "vertical" && r) return;
|
|
2402
|
-
let o =
|
|
2418
|
+
let o = tr(e);
|
|
2403
2419
|
if (o.length === 0) return;
|
|
2404
2420
|
n.preventDefault();
|
|
2405
2421
|
let s = document.activeElement, c = o.findIndex((e) => e === s), l = o.findIndex((e) => e.checked), u = c >= 0 ? c : Math.max(l, 0), d = u;
|
|
@@ -2408,7 +2424,7 @@ function rr({ rootRef: e, orientation: t }) {
|
|
|
2408
2424
|
f?.focus(), f?.click();
|
|
2409
2425
|
}, [t, e]);
|
|
2410
2426
|
}
|
|
2411
|
-
var
|
|
2427
|
+
var ar = {
|
|
2412
2428
|
root: "_root_1s3vp_1",
|
|
2413
2429
|
sm: "_sm_1s3vp_32",
|
|
2414
2430
|
md: "_md_1s3vp_58",
|
|
@@ -2422,12 +2438,12 @@ var ir = {
|
|
|
2422
2438
|
error: "_error_1s3vp_152",
|
|
2423
2439
|
disabled: "_disabled_1s3vp_160",
|
|
2424
2440
|
invalid: "_invalid_1s3vp_176"
|
|
2425
|
-
},
|
|
2426
|
-
let C = f(null), w = l(), T = y ?? w, E = u ? `${T}-label` : void 0, D = d ? `${T}-description` : void 0, O = p ? `${T}-error` : void 0, k = [D, O].filter(Boolean).join(" ") || void 0, A = c ?? `${T}-radio`, [j, M] =
|
|
2441
|
+
}, or = i(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, invalid: a = !1, size: o = "md", color: s = "primary", name: c, label: u, description: d, error: p, orientation: m = "vertical", children: h, className: v, id: y, onKeyDown: b, ...x }, S) => {
|
|
2442
|
+
let C = f(null), w = l(), T = y ?? w, E = u ? `${T}-label` : void 0, D = d ? `${T}-description` : void 0, O = p ? `${T}-error` : void 0, k = [D, O].filter(Boolean).join(" ") || void 0, A = c ?? `${T}-radio`, [j, M] = xt({
|
|
2427
2443
|
value: e,
|
|
2428
2444
|
defaultValue: t,
|
|
2429
2445
|
onChange: n
|
|
2430
|
-
}), N = a || !!p, P =
|
|
2446
|
+
}), N = a || !!p, P = ir({
|
|
2431
2447
|
rootRef: C,
|
|
2432
2448
|
orientation: m
|
|
2433
2449
|
}), F = (e) => {
|
|
@@ -2446,23 +2462,23 @@ var ir = {
|
|
|
2446
2462
|
onKeyDown: (e) => {
|
|
2447
2463
|
b?.(e), e.defaultPrevented || P(e);
|
|
2448
2464
|
},
|
|
2449
|
-
className:
|
|
2465
|
+
className: q(ar.root, ar[o], N && ar.invalid, r && ar.disabled, v),
|
|
2450
2466
|
children: [
|
|
2451
2467
|
u && /* @__PURE__ */ _("div", {
|
|
2452
2468
|
id: E,
|
|
2453
|
-
className:
|
|
2469
|
+
className: ar.label,
|
|
2454
2470
|
children: [u, i && /* @__PURE__ */ g("span", {
|
|
2455
|
-
className:
|
|
2471
|
+
className: ar.required,
|
|
2456
2472
|
"aria-hidden": "true",
|
|
2457
2473
|
children: "*"
|
|
2458
2474
|
})]
|
|
2459
2475
|
}),
|
|
2460
2476
|
d && /* @__PURE__ */ g("div", {
|
|
2461
2477
|
id: D,
|
|
2462
|
-
className:
|
|
2478
|
+
className: ar.description,
|
|
2463
2479
|
children: d
|
|
2464
2480
|
}),
|
|
2465
|
-
/* @__PURE__ */ g(
|
|
2481
|
+
/* @__PURE__ */ g(Jn, {
|
|
2466
2482
|
value: {
|
|
2467
2483
|
name: A,
|
|
2468
2484
|
value: j,
|
|
@@ -2475,32 +2491,32 @@ var ir = {
|
|
|
2475
2491
|
onValueChange: M
|
|
2476
2492
|
},
|
|
2477
2493
|
children: /* @__PURE__ */ g("div", {
|
|
2478
|
-
className:
|
|
2494
|
+
className: q(ar.items, ar[m]),
|
|
2479
2495
|
children: h
|
|
2480
2496
|
})
|
|
2481
2497
|
}),
|
|
2482
2498
|
p && /* @__PURE__ */ g("div", {
|
|
2483
2499
|
id: O,
|
|
2484
|
-
className:
|
|
2500
|
+
className: ar.error,
|
|
2485
2501
|
children: p
|
|
2486
2502
|
})
|
|
2487
2503
|
]
|
|
2488
2504
|
});
|
|
2489
2505
|
});
|
|
2490
|
-
|
|
2506
|
+
or.displayName = "RadioGroup.Root";
|
|
2491
2507
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2492
|
-
var
|
|
2493
|
-
|
|
2508
|
+
var sr = Object.assign(or, { Item: $n });
|
|
2509
|
+
sr.displayName = "RadioGroup";
|
|
2494
2510
|
// src/components/Select/internal/SelectContext.tsx
|
|
2495
|
-
var
|
|
2496
|
-
function
|
|
2497
|
-
let e = s(
|
|
2511
|
+
var cr = r(null), lr = cr.Provider;
|
|
2512
|
+
function ur() {
|
|
2513
|
+
let e = s(cr);
|
|
2498
2514
|
if (!e) throw Error("Select compound components must be used inside <Select>");
|
|
2499
2515
|
return e;
|
|
2500
2516
|
}
|
|
2501
|
-
|
|
2517
|
+
cr.displayName = "SelectContext";
|
|
2502
2518
|
// src/components/Select/internal/SelectVirtualization.ts
|
|
2503
|
-
function
|
|
2519
|
+
function dr({ loading: e, options: t, scrollTop: n, virtual: r, viewportHeight: i }) {
|
|
2504
2520
|
let a = typeof r == "object" ? r : r ? {} : void 0, o = a?.itemHeight ?? 40, s = a?.overscan ?? 2, c = i ?? a?.viewportHeight ?? 300, l = !!(a && t.length > 0 && !e), u = l ? Math.max(0, Math.floor(n / o) - s) : 0, d = l ? Math.ceil(c / o) + s * 2 : t.length, f = l ? t.slice(u, u + d) : t, p = l ? u * o : 0;
|
|
2505
2521
|
return {
|
|
2506
2522
|
bottomSpacerHeight: l ? Math.max(0, (t.length - u - f.length) * o) : 0,
|
|
@@ -2515,13 +2531,13 @@ function ur({ loading: e, options: t, scrollTop: n, virtual: r, viewportHeight:
|
|
|
2515
2531
|
};
|
|
2516
2532
|
}
|
|
2517
2533
|
// src/components/Select/internal/types.ts
|
|
2518
|
-
function
|
|
2534
|
+
function fr(e, t) {
|
|
2519
2535
|
return F(e, t);
|
|
2520
2536
|
}
|
|
2521
|
-
function
|
|
2537
|
+
function pr(e) {
|
|
2522
2538
|
return N(e);
|
|
2523
2539
|
}
|
|
2524
|
-
var
|
|
2540
|
+
var mr = {
|
|
2525
2541
|
option: "_option_7msws_1",
|
|
2526
2542
|
selected: "_selected_7msws_38",
|
|
2527
2543
|
disabled: "_disabled_7msws_38",
|
|
@@ -2539,18 +2555,18 @@ var pr = {
|
|
|
2539
2555
|
danger: "_danger_7msws_313",
|
|
2540
2556
|
check: "_check_7msws_377",
|
|
2541
2557
|
checkPop: "_checkPop_7msws_1"
|
|
2542
|
-
},
|
|
2543
|
-
|
|
2544
|
-
var
|
|
2545
|
-
let f = !!e.disabled, p = e.asChild && a(e.children) ? e.children : void 0, m =
|
|
2546
|
-
[
|
|
2547
|
-
[
|
|
2548
|
-
[
|
|
2549
|
-
[
|
|
2550
|
-
[
|
|
2551
|
-
[
|
|
2558
|
+
}, hr = () => null;
|
|
2559
|
+
fr(hr, "item"), hr.displayName = "Select.Item";
|
|
2560
|
+
var gr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o, selectedValues: s, multiple: c, renderOption: l, onSelect: u, onMouseEnter: d }) => {
|
|
2561
|
+
let f = !!e.disabled, p = e.asChild && a(e.children) ? e.children : void 0, m = q(mr.option, {
|
|
2562
|
+
[mr.selected]: t,
|
|
2563
|
+
[mr.active]: r,
|
|
2564
|
+
[mr.disabled]: f,
|
|
2565
|
+
[mr.success]: e.color === "success",
|
|
2566
|
+
[mr.warning]: e.color === "warning",
|
|
2567
|
+
[mr.danger]: e.color === "danger"
|
|
2552
2568
|
});
|
|
2553
|
-
|
|
2569
|
+
Fe(!e.asChild || !!p, "Select.Item: asChild requires a single valid React element child.");
|
|
2554
2570
|
let y = (t) => {
|
|
2555
2571
|
f ? t.preventDefault() : u(e.value);
|
|
2556
2572
|
}, b = () => {
|
|
@@ -2561,7 +2577,7 @@ var hr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o,
|
|
|
2561
2577
|
role: "option",
|
|
2562
2578
|
"aria-selected": t,
|
|
2563
2579
|
"aria-disabled": f || void 0,
|
|
2564
|
-
className:
|
|
2580
|
+
className: q(p.props.className, m),
|
|
2565
2581
|
onClick: (e) => {
|
|
2566
2582
|
p.props.onClick?.(e), e.defaultPrevented || y(e);
|
|
2567
2583
|
},
|
|
@@ -2578,7 +2594,7 @@ var hr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o,
|
|
|
2578
2594
|
onClick: y,
|
|
2579
2595
|
onMouseEnter: b,
|
|
2580
2596
|
children: [l ? /* @__PURE__ */ g("span", {
|
|
2581
|
-
className:
|
|
2597
|
+
className: mr.custom,
|
|
2582
2598
|
children: l({
|
|
2583
2599
|
option: e,
|
|
2584
2600
|
selected: t,
|
|
@@ -2591,36 +2607,36 @@ var hr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o,
|
|
|
2591
2607
|
})
|
|
2592
2608
|
}) : /* @__PURE__ */ _(h, { children: [
|
|
2593
2609
|
e.icon && /* @__PURE__ */ g("span", {
|
|
2594
|
-
className:
|
|
2610
|
+
className: mr.icon,
|
|
2595
2611
|
children: e.icon
|
|
2596
2612
|
}),
|
|
2597
2613
|
/* @__PURE__ */ _("span", {
|
|
2598
|
-
className:
|
|
2614
|
+
className: mr.content,
|
|
2599
2615
|
children: [/* @__PURE__ */ g("span", {
|
|
2600
|
-
className:
|
|
2616
|
+
className: mr.label,
|
|
2601
2617
|
children: e.label
|
|
2602
2618
|
}), e.description && /* @__PURE__ */ g("span", {
|
|
2603
|
-
className:
|
|
2619
|
+
className: mr.description,
|
|
2604
2620
|
children: e.description
|
|
2605
2621
|
})]
|
|
2606
2622
|
}),
|
|
2607
2623
|
e.badge && /* @__PURE__ */ g("span", {
|
|
2608
|
-
className:
|
|
2624
|
+
className: mr.badge,
|
|
2609
2625
|
children: e.badge
|
|
2610
2626
|
}),
|
|
2611
2627
|
e.shortcut && /* @__PURE__ */ g("kbd", {
|
|
2612
|
-
className:
|
|
2628
|
+
className: mr.shortcut,
|
|
2613
2629
|
children: e.shortcut
|
|
2614
2630
|
})
|
|
2615
2631
|
] }), /* @__PURE__ */ g("span", {
|
|
2616
|
-
className:
|
|
2632
|
+
className: mr.check,
|
|
2617
2633
|
"aria-hidden": "true",
|
|
2618
2634
|
children: t && /* @__PURE__ */ g(v, {})
|
|
2619
2635
|
})]
|
|
2620
2636
|
});
|
|
2621
2637
|
};
|
|
2622
|
-
|
|
2623
|
-
var
|
|
2638
|
+
gr.displayName = "SelectItemRow";
|
|
2639
|
+
var _r = {
|
|
2624
2640
|
dropdown: "_dropdown_1lvgh_1",
|
|
2625
2641
|
dropdownIn: "_dropdownIn_1lvgh_1",
|
|
2626
2642
|
primary: "_primary_1lvgh_103",
|
|
@@ -2645,107 +2661,107 @@ var gr = {
|
|
|
2645
2661
|
separator: "_separator_1lvgh_1575",
|
|
2646
2662
|
virtualSpacer: "_virtualSpacer_1lvgh_1581",
|
|
2647
2663
|
mobileDropdownIn: "_mobileDropdownIn_1lvgh_1"
|
|
2648
|
-
},
|
|
2649
|
-
let { contentProps: n } =
|
|
2650
|
-
return /* @__PURE__ */ g(
|
|
2664
|
+
}, vr = ({ children: e, className: t }) => {
|
|
2665
|
+
let { contentProps: n } = ur(), r = br(e);
|
|
2666
|
+
return /* @__PURE__ */ g(yr, {
|
|
2651
2667
|
...n,
|
|
2652
2668
|
...r,
|
|
2653
2669
|
className: [n.className, t].filter(Boolean).join(" ")
|
|
2654
2670
|
});
|
|
2655
2671
|
};
|
|
2656
|
-
|
|
2657
|
-
var
|
|
2658
|
-
let
|
|
2672
|
+
fr(vr, "content"), vr.displayName = "Select.Content";
|
|
2673
|
+
var yr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, entries: s, multiple: l, selectedValues: u, color: m = "primary", variant: v = "outline", searchable: y, command: b, virtual: S, portal: C = !0, searchValue: w = "", searchPlaceholder: T = "Search...", loading: E, loadingText: D = "Loading...", emptyText: O, searchSlot: k, headerSlot: A, emptySlot: j, loadingSlot: M, renderOption: N, selectedValue: P, activeIndex: F, visualActiveIndex: I = F, className: L, onSelect: R, onSelectGroup: z, onMouseEnter: B, onSearchChange: V }) => {
|
|
2674
|
+
let H = f(null), U = f(!1), [W, G] = p(null), [ee, te] = p(0), [ne, re] = p(), { bottomSpacerHeight: ie, isVirtual: K, itemHeight: ae, maxHeight: oe, startIndex: se, topSpacerHeight: ce, viewportHeight: le, visibleOptions: ue } = d(() => dr({
|
|
2659
2675
|
loading: E,
|
|
2660
2676
|
options: a,
|
|
2661
|
-
scrollTop:
|
|
2677
|
+
scrollTop: ee,
|
|
2662
2678
|
virtual: S,
|
|
2663
|
-
viewportHeight:
|
|
2679
|
+
viewportHeight: ne
|
|
2664
2680
|
}), [
|
|
2665
2681
|
E,
|
|
2666
2682
|
a,
|
|
2667
|
-
|
|
2668
|
-
|
|
2683
|
+
ee,
|
|
2684
|
+
ne,
|
|
2669
2685
|
S
|
|
2670
|
-
]),
|
|
2671
|
-
|
|
2686
|
+
]), de = o((e) => {
|
|
2687
|
+
G(e), r(e), e && re(e.clientHeight || void 0);
|
|
2672
2688
|
}, [r]);
|
|
2673
2689
|
c(() => {
|
|
2674
|
-
e || (
|
|
2690
|
+
e || (U.current = !1, te(0), re(void 0));
|
|
2675
2691
|
}, [e, w]), c(() => {
|
|
2676
|
-
if (!e || !
|
|
2692
|
+
if (!e || !W || (re(W.clientHeight || void 0), !("ResizeObserver" in window))) return;
|
|
2677
2693
|
let t = new ResizeObserver(([e]) => {
|
|
2678
|
-
|
|
2694
|
+
re(e?.contentRect.height || void 0);
|
|
2679
2695
|
});
|
|
2680
|
-
return t.observe(
|
|
2681
|
-
}, [
|
|
2696
|
+
return t.observe(W), () => t.disconnect();
|
|
2697
|
+
}, [W, e]), c(() => {
|
|
2682
2698
|
if (!e || !y) return;
|
|
2683
2699
|
let t = window.setTimeout(() => {
|
|
2684
|
-
|
|
2700
|
+
H.current?.focus({ preventScroll: !0 });
|
|
2685
2701
|
}, 0);
|
|
2686
2702
|
return () => window.clearTimeout(t);
|
|
2687
2703
|
}, [e, y]), c(() => {
|
|
2688
|
-
if (!e || E || !
|
|
2704
|
+
if (!e || E || !W || U.current) return;
|
|
2689
2705
|
let n = a.findIndex((e) => u ? u.includes(e.value) : e.value === P), r = n >= 0 ? n : F;
|
|
2690
|
-
if (r < 0)
|
|
2691
|
-
else if (
|
|
2692
|
-
let e = Math.max(0, r *
|
|
2693
|
-
|
|
2706
|
+
if (r < 0) U.current = !0;
|
|
2707
|
+
else if (U.current = !0, K) {
|
|
2708
|
+
let e = Math.max(0, r * ae - (le - ae) / 2);
|
|
2709
|
+
te(e), W.scrollTop = e;
|
|
2694
2710
|
} else document.getElementById(`${t}-option-${r}`)?.scrollIntoView?.({ block: "nearest" });
|
|
2695
2711
|
}, [
|
|
2696
2712
|
F,
|
|
2697
|
-
|
|
2713
|
+
W,
|
|
2698
2714
|
e,
|
|
2699
|
-
|
|
2700
|
-
|
|
2715
|
+
K,
|
|
2716
|
+
ae,
|
|
2701
2717
|
t,
|
|
2702
2718
|
E,
|
|
2703
2719
|
a,
|
|
2704
2720
|
P,
|
|
2705
2721
|
u,
|
|
2706
|
-
|
|
2722
|
+
le
|
|
2707
2723
|
]);
|
|
2708
|
-
let
|
|
2724
|
+
let fe = d(() => ({
|
|
2709
2725
|
...i,
|
|
2710
|
-
"--select-dropdown-max-height": typeof
|
|
2711
|
-
}), [
|
|
2726
|
+
"--select-dropdown-max-height": typeof oe == "number" ? `${oe}px` : oe
|
|
2727
|
+
}), [oe, i]);
|
|
2712
2728
|
if (!e) return null;
|
|
2713
|
-
let
|
|
2729
|
+
let pe = s && !K ? s : ue.map((e, t) => ({
|
|
2714
2730
|
type: "option",
|
|
2715
2731
|
option: e,
|
|
2716
|
-
optionIndex:
|
|
2717
|
-
})),
|
|
2718
|
-
ref:
|
|
2732
|
+
optionIndex: se + t
|
|
2733
|
+
})), me = /* @__PURE__ */ _("div", {
|
|
2734
|
+
ref: de,
|
|
2719
2735
|
tabIndex: 0,
|
|
2720
2736
|
className: [
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
b ?
|
|
2737
|
+
_r.dropdown,
|
|
2738
|
+
_r[m],
|
|
2739
|
+
_r[v],
|
|
2740
|
+
b ? _r.command : void 0,
|
|
2725
2741
|
L
|
|
2726
2742
|
].filter(Boolean).join(" "),
|
|
2727
|
-
style:
|
|
2743
|
+
style: fe,
|
|
2728
2744
|
onScroll: (e) => {
|
|
2729
|
-
|
|
2745
|
+
K && te(e.currentTarget.scrollTop);
|
|
2730
2746
|
},
|
|
2731
2747
|
children: [
|
|
2732
2748
|
A,
|
|
2733
2749
|
k ?? (y && /* @__PURE__ */ _("div", {
|
|
2734
|
-
className:
|
|
2750
|
+
className: _r.searchWrap,
|
|
2735
2751
|
children: [/* @__PURE__ */ g("input", {
|
|
2736
|
-
ref:
|
|
2737
|
-
className:
|
|
2752
|
+
ref: H,
|
|
2753
|
+
className: _r.search,
|
|
2738
2754
|
value: w,
|
|
2739
2755
|
placeholder: b ? "Type a command..." : T,
|
|
2740
2756
|
"aria-label": "Search options",
|
|
2741
|
-
onInput: (e) =>
|
|
2742
|
-
onChange: (e) =>
|
|
2757
|
+
onInput: (e) => V?.(e.currentTarget.value),
|
|
2758
|
+
onChange: (e) => V?.(e.target.value)
|
|
2743
2759
|
}), w && /* @__PURE__ */ g("button", {
|
|
2744
2760
|
type: "button",
|
|
2745
|
-
className:
|
|
2761
|
+
className: _r.searchClear,
|
|
2746
2762
|
"aria-label": "Clear search",
|
|
2747
2763
|
onClick: () => {
|
|
2748
|
-
|
|
2764
|
+
V?.(""), H.current?.focus();
|
|
2749
2765
|
},
|
|
2750
2766
|
children: /* @__PURE__ */ g(x, {})
|
|
2751
2767
|
})]
|
|
@@ -2759,15 +2775,15 @@ var vr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2759
2775
|
role: "option",
|
|
2760
2776
|
"aria-disabled": "true",
|
|
2761
2777
|
"aria-selected": "false",
|
|
2762
|
-
className:
|
|
2778
|
+
className: _r.empty,
|
|
2763
2779
|
children: M ?? D
|
|
2764
2780
|
}) : a.length ? /* @__PURE__ */ _(h, { children: [
|
|
2765
|
-
|
|
2781
|
+
K && /* @__PURE__ */ g("li", {
|
|
2766
2782
|
"aria-hidden": "true",
|
|
2767
|
-
className:
|
|
2768
|
-
style: { height:
|
|
2783
|
+
className: _r.virtualSpacer,
|
|
2784
|
+
style: { height: ce }
|
|
2769
2785
|
}),
|
|
2770
|
-
|
|
2786
|
+
pe.map((e) => {
|
|
2771
2787
|
if (e.type === "group") {
|
|
2772
2788
|
if (e.selectable && l) {
|
|
2773
2789
|
let t = e.itemValues.filter((e) => a.some((t) => t.value === e && !t.disabled)), n = u ? t.filter((e) => u.includes(e)).length : 0, r = t.length > 0 && n === t.length, i = n > 0 && n < t.length;
|
|
@@ -2775,16 +2791,16 @@ var vr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2775
2791
|
role: "presentation",
|
|
2776
2792
|
children: /* @__PURE__ */ _("button", {
|
|
2777
2793
|
type: "button",
|
|
2778
|
-
className:
|
|
2779
|
-
"aria-label":
|
|
2794
|
+
className: _r.groupAction,
|
|
2795
|
+
"aria-label": xr(e.selectLabel ?? e.label),
|
|
2780
2796
|
"aria-pressed": i ? "mixed" : r ? "true" : "false",
|
|
2781
2797
|
disabled: t.length === 0,
|
|
2782
2798
|
onClick: () => z(t),
|
|
2783
2799
|
children: [/* @__PURE__ */ g("span", {
|
|
2784
|
-
className:
|
|
2800
|
+
className: _r.groupActionText,
|
|
2785
2801
|
children: e.selectLabel ?? e.label
|
|
2786
2802
|
}), /* @__PURE__ */ _("span", {
|
|
2787
|
-
className:
|
|
2803
|
+
className: _r.groupActionMeta,
|
|
2788
2804
|
children: [
|
|
2789
2805
|
n,
|
|
2790
2806
|
"/",
|
|
@@ -2796,18 +2812,18 @@ var vr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2796
2812
|
}
|
|
2797
2813
|
return /* @__PURE__ */ g("li", {
|
|
2798
2814
|
role: "presentation",
|
|
2799
|
-
className:
|
|
2815
|
+
className: _r.groupLabel,
|
|
2800
2816
|
children: e.label
|
|
2801
2817
|
}, e.id);
|
|
2802
2818
|
}
|
|
2803
2819
|
if (e.type === "separator") return /* @__PURE__ */ g("li", {
|
|
2804
2820
|
role: "presentation",
|
|
2805
2821
|
"aria-hidden": "true",
|
|
2806
|
-
className:
|
|
2822
|
+
className: _r.separator,
|
|
2807
2823
|
"data-vellira-select-separator": "true"
|
|
2808
2824
|
}, e.id);
|
|
2809
2825
|
let { option: n, optionIndex: r } = e;
|
|
2810
|
-
return /* @__PURE__ */ g(
|
|
2826
|
+
return /* @__PURE__ */ g(gr, {
|
|
2811
2827
|
option: n,
|
|
2812
2828
|
isSelected: u ? u.includes(n.value) : n.value === P,
|
|
2813
2829
|
isActive: r === I,
|
|
@@ -2817,32 +2833,32 @@ var vr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2817
2833
|
multiple: !!l,
|
|
2818
2834
|
renderOption: N,
|
|
2819
2835
|
onSelect: R,
|
|
2820
|
-
onMouseEnter: () =>
|
|
2836
|
+
onMouseEnter: () => B(r)
|
|
2821
2837
|
}, n.value);
|
|
2822
2838
|
}),
|
|
2823
|
-
|
|
2839
|
+
K && /* @__PURE__ */ g("li", {
|
|
2824
2840
|
"aria-hidden": "true",
|
|
2825
|
-
className:
|
|
2826
|
-
style: { height:
|
|
2841
|
+
className: _r.virtualSpacer,
|
|
2842
|
+
style: { height: ie }
|
|
2827
2843
|
})
|
|
2828
2844
|
] }) : /* @__PURE__ */ g("li", {
|
|
2829
2845
|
role: "option",
|
|
2830
2846
|
"aria-disabled": "true",
|
|
2831
2847
|
"aria-selected": "false",
|
|
2832
|
-
className:
|
|
2848
|
+
className: _r.empty,
|
|
2833
2849
|
children: j ?? O
|
|
2834
2850
|
})
|
|
2835
2851
|
})
|
|
2836
2852
|
]
|
|
2837
2853
|
});
|
|
2838
|
-
return C ? /* @__PURE__ */ g(
|
|
2854
|
+
return C ? /* @__PURE__ */ g(kt, { children: me }) : me;
|
|
2839
2855
|
};
|
|
2840
|
-
|
|
2841
|
-
function
|
|
2856
|
+
yr.displayName = "SelectContentSurface";
|
|
2857
|
+
function br(t) {
|
|
2842
2858
|
let n, r, i, o;
|
|
2843
2859
|
return e.forEach(t, (e) => {
|
|
2844
2860
|
if (!a(e)) return;
|
|
2845
|
-
let t =
|
|
2861
|
+
let t = pr(e.type);
|
|
2846
2862
|
t === "label" && (n = e), t === "search" && (r = e), t === "empty" && (i = e), t === "loading" && (o = e);
|
|
2847
2863
|
}), {
|
|
2848
2864
|
emptySlot: i,
|
|
@@ -2851,15 +2867,15 @@ function yr(t) {
|
|
|
2851
2867
|
searchSlot: r
|
|
2852
2868
|
};
|
|
2853
2869
|
}
|
|
2854
|
-
function
|
|
2870
|
+
function xr(e) {
|
|
2855
2871
|
return typeof e == "string" || typeof e == "number" ? String(e) : "Select group";
|
|
2856
2872
|
}
|
|
2857
2873
|
// src/components/Select/Empty/SelectEmpty.tsx
|
|
2858
|
-
var
|
|
2859
|
-
|
|
2874
|
+
var Sr = ({ children: e }) => /* @__PURE__ */ g(h, { children: e });
|
|
2875
|
+
fr(Sr, "empty"), Sr.displayName = "Select.Empty";
|
|
2860
2876
|
// src/components/Select/Group/SelectGroup.tsx
|
|
2861
|
-
var
|
|
2862
|
-
|
|
2877
|
+
var Cr = () => null;
|
|
2878
|
+
fr(Cr, "group"), Cr.displayName = "Select.Group";
|
|
2863
2879
|
var Z = {
|
|
2864
2880
|
root: "_root_jn0gk_1",
|
|
2865
2881
|
control: "_control_jn0gk_8",
|
|
@@ -2888,45 +2904,45 @@ var Z = {
|
|
|
2888
2904
|
spin: "_spin_jn0gk_817",
|
|
2889
2905
|
loading: "_loading_jn0gk_826",
|
|
2890
2906
|
open: "_open_jn0gk_845"
|
|
2891
|
-
},
|
|
2892
|
-
let { triggerProps: n } =
|
|
2907
|
+
}, wr = ({ children: e, className: t }) => {
|
|
2908
|
+
let { triggerProps: n } = ur();
|
|
2893
2909
|
return /* @__PURE__ */ g("span", {
|
|
2894
|
-
className:
|
|
2910
|
+
className: q(Z.arrow, { [Z.open]: n.isOpen }, t),
|
|
2895
2911
|
"aria-hidden": "true",
|
|
2896
2912
|
children: n.loading ? /* @__PURE__ */ g("span", { className: Z.spinner }) : e ?? n.endIcon ?? /* @__PURE__ */ g(y, {})
|
|
2897
2913
|
});
|
|
2898
2914
|
};
|
|
2899
|
-
|
|
2915
|
+
fr(wr, "icon"), wr.displayName = "Select.Icon";
|
|
2900
2916
|
// src/components/Select/ItemBadge/SelectItemBadge.tsx
|
|
2901
|
-
var wr = () => null;
|
|
2902
|
-
dr(wr, "itemBadge"), wr.displayName = "Select.ItemBadge";
|
|
2903
|
-
// src/components/Select/ItemDescription/SelectItemDescription.tsx
|
|
2904
2917
|
var Tr = () => null;
|
|
2905
|
-
|
|
2906
|
-
// src/components/Select/
|
|
2918
|
+
fr(Tr, "itemBadge"), Tr.displayName = "Select.ItemBadge";
|
|
2919
|
+
// src/components/Select/ItemDescription/SelectItemDescription.tsx
|
|
2907
2920
|
var Er = () => null;
|
|
2908
|
-
|
|
2921
|
+
fr(Er, "itemDescription"), Er.displayName = "Select.ItemDescription";
|
|
2922
|
+
// src/components/Select/ItemIcon/SelectItemIcon.tsx
|
|
2923
|
+
var Dr = () => null;
|
|
2924
|
+
fr(Dr, "itemIcon"), Dr.displayName = "Select.ItemIcon";
|
|
2909
2925
|
// src/components/Select/Label/SelectLabel.tsx
|
|
2910
|
-
var
|
|
2926
|
+
var Or = ({ children: e }) => /* @__PURE__ */ g("div", {
|
|
2911
2927
|
role: "presentation",
|
|
2912
|
-
className:
|
|
2928
|
+
className: _r.groupLabel,
|
|
2913
2929
|
children: e
|
|
2914
2930
|
});
|
|
2915
|
-
|
|
2931
|
+
fr(Or, "label"), Or.displayName = "Select.Label";
|
|
2916
2932
|
// src/components/Select/Loading/SelectLoading.tsx
|
|
2917
|
-
var
|
|
2918
|
-
|
|
2933
|
+
var kr = ({ children: e }) => /* @__PURE__ */ g(h, { children: e });
|
|
2934
|
+
fr(kr, "loading"), kr.displayName = "Select.Loading";
|
|
2919
2935
|
// src/components/Select/Trigger/SelectTrigger.tsx
|
|
2920
|
-
var
|
|
2921
|
-
let { triggerProps: n } =
|
|
2922
|
-
return /* @__PURE__ */ g(
|
|
2936
|
+
var Ar = ({ children: e, className: t }) => {
|
|
2937
|
+
let { triggerProps: n } = ur();
|
|
2938
|
+
return /* @__PURE__ */ g(jr, {
|
|
2923
2939
|
...n,
|
|
2924
2940
|
className: [n.className, t].filter(Boolean).join(" "),
|
|
2925
2941
|
children: e
|
|
2926
2942
|
});
|
|
2927
2943
|
};
|
|
2928
|
-
|
|
2929
|
-
var
|
|
2944
|
+
fr(Ar, "trigger"), Ar.displayName = "Select.Trigger";
|
|
2945
|
+
var jr = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabled: a, required: o, listboxId: s, activeIndex: c, ariaLabel: l, error: u, displayText: d, isPlaceholder: f, size: p = "md", color: m, variant: v, loading: b, startIcon: S, endIcon: C, prefix: w, suffix: T, clearable: E, onClear: D, className: O, buttonRef: k, onClick: A, onKeyDown: j, onBlur: M, onFocus: N }) => /* @__PURE__ */ _("span", {
|
|
2930
2946
|
className: Z.root,
|
|
2931
2947
|
children: [/* @__PURE__ */ g("button", {
|
|
2932
2948
|
id: t,
|
|
@@ -2944,7 +2960,7 @@ var Ar = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabl
|
|
|
2944
2960
|
"aria-controls": i ? s : void 0,
|
|
2945
2961
|
"aria-describedby": n,
|
|
2946
2962
|
"aria-activedescendant": i && c >= 0 ? `${s}-option-${c}` : void 0,
|
|
2947
|
-
className:
|
|
2963
|
+
className: q(Z.control, Z[p], Z[v], Z[m], {
|
|
2948
2964
|
[Z.error]: !!u,
|
|
2949
2965
|
[Z.disabled]: a,
|
|
2950
2966
|
[Z.loading]: b,
|
|
@@ -2966,7 +2982,7 @@ var Ar = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabl
|
|
|
2966
2982
|
/* @__PURE__ */ g("span", {
|
|
2967
2983
|
className: Z.valueWrap,
|
|
2968
2984
|
children: /* @__PURE__ */ g("span", {
|
|
2969
|
-
className:
|
|
2985
|
+
className: q(Z.value, { [Z.placeholder]: f }),
|
|
2970
2986
|
children: d
|
|
2971
2987
|
})
|
|
2972
2988
|
}),
|
|
@@ -2975,7 +2991,7 @@ var Ar = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabl
|
|
|
2975
2991
|
children: T
|
|
2976
2992
|
}),
|
|
2977
2993
|
/* @__PURE__ */ g("span", {
|
|
2978
|
-
className:
|
|
2994
|
+
className: q(Z.arrow, { [Z.open]: i }),
|
|
2979
2995
|
"aria-hidden": "true",
|
|
2980
2996
|
children: b ? /* @__PURE__ */ g("span", { className: Z.spinner }) : C ?? /* @__PURE__ */ g(y, {})
|
|
2981
2997
|
})
|
|
@@ -2990,16 +3006,16 @@ var Ar = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabl
|
|
|
2990
3006
|
children: /* @__PURE__ */ g(x, {})
|
|
2991
3007
|
})]
|
|
2992
3008
|
});
|
|
2993
|
-
|
|
3009
|
+
jr.displayName = "SelectTriggerSurface";
|
|
2994
3010
|
// src/components/Select/internal/SelectCollection.ts
|
|
2995
|
-
function
|
|
3011
|
+
function Mr(t) {
|
|
2996
3012
|
let n = [], r = [], i = 0;
|
|
2997
3013
|
function o(t) {
|
|
2998
3014
|
e.forEach(t, (e) => {
|
|
2999
3015
|
if (!a(e)) return;
|
|
3000
|
-
let t =
|
|
3016
|
+
let t = pr(e.type);
|
|
3001
3017
|
if (t === "group") {
|
|
3002
|
-
let t = e.props, r =
|
|
3018
|
+
let t = e.props, r = Pr(t.children);
|
|
3003
3019
|
n.push({
|
|
3004
3020
|
type: "group",
|
|
3005
3021
|
id: `group-${i++}`,
|
|
@@ -3009,7 +3025,7 @@ function jr(t) {
|
|
|
3009
3025
|
itemValues: r
|
|
3010
3026
|
}), o(t.children);
|
|
3011
3027
|
} else if (t === "item") {
|
|
3012
|
-
let t = e.props, i =
|
|
3028
|
+
let t = e.props, i = Fr(t.children, t.value), a = t.label ?? i.label, o = r.length, s = {
|
|
3013
3029
|
asChild: t.asChild,
|
|
3014
3030
|
children: t.children,
|
|
3015
3031
|
label: a,
|
|
@@ -3037,27 +3053,27 @@ function jr(t) {
|
|
|
3037
3053
|
options: r
|
|
3038
3054
|
};
|
|
3039
3055
|
}
|
|
3040
|
-
function
|
|
3056
|
+
function Nr(t) {
|
|
3041
3057
|
let n = !1;
|
|
3042
3058
|
function r(t) {
|
|
3043
3059
|
e.forEach(t, (e) => {
|
|
3044
3060
|
if (!a(e) || n) return;
|
|
3045
|
-
let t =
|
|
3061
|
+
let t = pr(e.type);
|
|
3046
3062
|
t === "trigger" || t === "content" ? n = !0 : r(e.props.children);
|
|
3047
3063
|
});
|
|
3048
3064
|
}
|
|
3049
3065
|
return r(t), n;
|
|
3050
3066
|
}
|
|
3051
|
-
function
|
|
3067
|
+
function Pr(t) {
|
|
3052
3068
|
let n = [];
|
|
3053
3069
|
function r(t) {
|
|
3054
3070
|
e.forEach(t, (e) => {
|
|
3055
|
-
a(e) && (
|
|
3071
|
+
a(e) && (pr(e.type) === "item" ? n.push(e.props.value) : r(e.props.children));
|
|
3056
3072
|
});
|
|
3057
3073
|
}
|
|
3058
3074
|
return r(t), n;
|
|
3059
3075
|
}
|
|
3060
|
-
function
|
|
3076
|
+
function Fr(t, n) {
|
|
3061
3077
|
let r, i, o, s = [];
|
|
3062
3078
|
function c(t) {
|
|
3063
3079
|
e.forEach(t, (e) => {
|
|
@@ -3066,7 +3082,7 @@ function Pr(t, n) {
|
|
|
3066
3082
|
return;
|
|
3067
3083
|
}
|
|
3068
3084
|
if (!a(e)) return;
|
|
3069
|
-
let t =
|
|
3085
|
+
let t = pr(e.type);
|
|
3070
3086
|
t === "itemBadge" ? r = e.props.children : t === "itemIcon" ? o = e.props.children : t === "itemDescription" ? i = e.props.children : c(e.props.children);
|
|
3071
3087
|
});
|
|
3072
3088
|
}
|
|
@@ -3080,20 +3096,20 @@ function Pr(t, n) {
|
|
|
3080
3096
|
};
|
|
3081
3097
|
}
|
|
3082
3098
|
// src/components/Select/internal/SelectSearch.ts
|
|
3083
|
-
function
|
|
3099
|
+
function Ir({ options: e, searchable: t, searchValue: n }) {
|
|
3084
3100
|
if (!t || !n) return e;
|
|
3085
3101
|
let r = n.toLocaleLowerCase();
|
|
3086
|
-
return e.filter((e) => `${e.label} ${
|
|
3102
|
+
return e.filter((e) => `${e.label} ${Lr(e.description)}`.toLocaleLowerCase().includes(r));
|
|
3087
3103
|
}
|
|
3088
|
-
function
|
|
3104
|
+
function Lr(e) {
|
|
3089
3105
|
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
3090
3106
|
}
|
|
3091
3107
|
// src/components/Select/internal/useSelectCollection.ts
|
|
3092
|
-
function
|
|
3093
|
-
return d(() =>
|
|
3108
|
+
function Rr(e) {
|
|
3109
|
+
return d(() => Mr(e), [e]);
|
|
3094
3110
|
}
|
|
3095
3111
|
// src/patterns/FormField/FormFieldContext.ts
|
|
3096
|
-
var
|
|
3112
|
+
var zr = r(null), Br = () => s(zr), Vr = {
|
|
3097
3113
|
wrapper: "_wrapper_r078u_1",
|
|
3098
3114
|
sm: "_sm_r078u_41",
|
|
3099
3115
|
md: "_md_r078u_78",
|
|
@@ -3115,12 +3131,12 @@ var Rr = r(null), zr = () => s(Rr), Br = {
|
|
|
3115
3131
|
messageToneWarning: "_messageToneWarning_r078u_257",
|
|
3116
3132
|
messageToneDanger: "_messageToneDanger_r078u_261",
|
|
3117
3133
|
disabled: "_disabled_r078u_274"
|
|
3118
|
-
},
|
|
3119
|
-
function
|
|
3134
|
+
}, Hr = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
3135
|
+
function Ur(e, t) {
|
|
3120
3136
|
let n = () => null;
|
|
3121
3137
|
return n.__velliraFormFieldPart = e, n.displayName = t, n;
|
|
3122
3138
|
}
|
|
3123
|
-
function
|
|
3139
|
+
function Wr(t) {
|
|
3124
3140
|
let n = [], r = { hasSlots: !1 };
|
|
3125
3141
|
return e.forEach(t, (e) => {
|
|
3126
3142
|
if (!a(e)) e != null && e !== !1 && n.push(e);
|
|
@@ -3141,292 +3157,292 @@ function Ur(t) {
|
|
|
3141
3157
|
}
|
|
3142
3158
|
}), n.length > 0 && (r.fallbackChildren = n.length === 1 ? n[0] : n), r;
|
|
3143
3159
|
}
|
|
3144
|
-
var
|
|
3145
|
-
let j =
|
|
3146
|
-
neutral:
|
|
3147
|
-
success:
|
|
3148
|
-
warning:
|
|
3149
|
-
danger:
|
|
3150
|
-
}[
|
|
3151
|
-
controlId:
|
|
3152
|
-
labelId:
|
|
3153
|
-
descriptionId:
|
|
3154
|
-
errorId:
|
|
3155
|
-
messageId:
|
|
3160
|
+
var Gr = ({ id: e, label: r, description: i, error: o, message: s, messageTone: c, messageLive: u, required: d = !1, disabled: f = !1, invalid: p = !1, orientation: m = "vertical", labelPosition: h = "top", size: v = "md", labelInfo: y, labelAction: b, optionalText: x, children: S, bindControl: C = !0, className: w, controlClassName: T, labelClassName: E, descriptionClassName: D, errorClassName: O, messageClassName: k, ...A }) => {
|
|
3161
|
+
let j = Wr(S), M = r ?? j.label?.children, N = i ?? j.description?.children, P = s ?? j.message?.children, F = c ?? j.message?.tone ?? "neutral", I = u ?? j.message?.live ?? "off", L = y ?? j.label?.info, R = b ?? j.label?.action, z = x ?? j.label?.optionalText, B = j.hasSlots ? j.control?.children ?? j.fallbackChildren : S, V = j.control?.bindControl ?? C, H = l(), U = e ?? H, W = M ? `${U}-label` : void 0, G = N && U ? `${U}-description` : void 0, ee = o && U ? `${U}-error` : void 0, te = !o && P && U ? `${U}-message` : void 0, ne = p || !!o, re = o ?? P, ie = o ? "danger" : F, K = {
|
|
3162
|
+
neutral: Vr.messageToneNeutral,
|
|
3163
|
+
success: Vr.messageToneSuccess,
|
|
3164
|
+
warning: Vr.messageToneWarning,
|
|
3165
|
+
danger: Vr.messageToneDanger
|
|
3166
|
+
}[ie], ae = Hr(W), oe = Hr(G, ee, te), se = {
|
|
3167
|
+
controlId: U,
|
|
3168
|
+
labelId: W,
|
|
3169
|
+
descriptionId: G,
|
|
3170
|
+
errorId: ee,
|
|
3171
|
+
messageId: te,
|
|
3156
3172
|
required: d,
|
|
3157
3173
|
disabled: f,
|
|
3158
|
-
invalid:
|
|
3174
|
+
invalid: ne,
|
|
3159
3175
|
size: v,
|
|
3160
|
-
ariaLabelledBy:
|
|
3161
|
-
ariaDescribedBy:
|
|
3162
|
-
},
|
|
3163
|
-
id:
|
|
3164
|
-
required:
|
|
3165
|
-
disabled:
|
|
3166
|
-
"aria-invalid":
|
|
3167
|
-
"aria-labelledby":
|
|
3168
|
-
"aria-describedby":
|
|
3169
|
-
}) :
|
|
3176
|
+
ariaLabelledBy: ae,
|
|
3177
|
+
ariaDescribedBy: oe
|
|
3178
|
+
}, ce = a(B) && B.type !== t ? B : void 0, le = V && ce ? n(ce, {
|
|
3179
|
+
id: ce.props.id ?? U,
|
|
3180
|
+
required: ce.props.required ?? d,
|
|
3181
|
+
disabled: ce.props.disabled ?? f,
|
|
3182
|
+
"aria-invalid": ce.props["aria-invalid"] ?? (ne || void 0),
|
|
3183
|
+
"aria-labelledby": Hr(ce.props["aria-labelledby"], ae),
|
|
3184
|
+
"aria-describedby": Hr(ce.props["aria-describedby"], oe)
|
|
3185
|
+
}) : B;
|
|
3170
3186
|
return /* @__PURE__ */ _("div", {
|
|
3171
3187
|
...A,
|
|
3172
3188
|
"aria-disabled": f || void 0,
|
|
3173
|
-
className:
|
|
3189
|
+
className: q(Vr.wrapper, Vr[m], Vr[h], Vr[v], f && Vr.disabled, w),
|
|
3174
3190
|
"data-disabled": f || void 0,
|
|
3175
|
-
"data-invalid":
|
|
3191
|
+
"data-invalid": ne || void 0,
|
|
3176
3192
|
"data-orientation": m,
|
|
3177
3193
|
"data-size": v,
|
|
3178
3194
|
children: [
|
|
3179
3195
|
(M || R) && /* @__PURE__ */ _("div", {
|
|
3180
|
-
className:
|
|
3196
|
+
className: Vr.labelRow,
|
|
3181
3197
|
children: [M && /* @__PURE__ */ _("label", {
|
|
3182
|
-
id:
|
|
3183
|
-
htmlFor:
|
|
3184
|
-
className:
|
|
3198
|
+
id: W,
|
|
3199
|
+
htmlFor: U,
|
|
3200
|
+
className: q(Vr.label, j.label?.className, E),
|
|
3185
3201
|
children: [
|
|
3186
3202
|
/* @__PURE__ */ g("span", {
|
|
3187
|
-
className:
|
|
3203
|
+
className: Vr.labelText,
|
|
3188
3204
|
children: M
|
|
3189
3205
|
}),
|
|
3190
3206
|
d && /* @__PURE__ */ g("span", {
|
|
3191
|
-
className:
|
|
3207
|
+
className: Vr.required,
|
|
3192
3208
|
"aria-hidden": "true",
|
|
3193
3209
|
children: "*"
|
|
3194
3210
|
}),
|
|
3195
3211
|
!d && z && /* @__PURE__ */ g("span", {
|
|
3196
|
-
className:
|
|
3212
|
+
className: Vr.optional,
|
|
3197
3213
|
children: z
|
|
3198
3214
|
}),
|
|
3199
3215
|
L && /* @__PURE__ */ g("span", {
|
|
3200
|
-
className:
|
|
3216
|
+
className: Vr.labelInfo,
|
|
3201
3217
|
children: L
|
|
3202
3218
|
})
|
|
3203
3219
|
]
|
|
3204
3220
|
}), R && /* @__PURE__ */ g("div", {
|
|
3205
|
-
className:
|
|
3221
|
+
className: Vr.labelAction,
|
|
3206
3222
|
children: R
|
|
3207
3223
|
})]
|
|
3208
3224
|
}),
|
|
3209
3225
|
N && /* @__PURE__ */ g("div", {
|
|
3210
|
-
id:
|
|
3211
|
-
className:
|
|
3226
|
+
id: G,
|
|
3227
|
+
className: q(Vr.description, j.description?.className, D),
|
|
3212
3228
|
children: N
|
|
3213
3229
|
}),
|
|
3214
|
-
/* @__PURE__ */ g(
|
|
3215
|
-
value:
|
|
3230
|
+
/* @__PURE__ */ g(zr.Provider, {
|
|
3231
|
+
value: se,
|
|
3216
3232
|
children: /* @__PURE__ */ g("div", {
|
|
3217
|
-
className:
|
|
3218
|
-
children:
|
|
3233
|
+
className: q(Vr.control, j.control?.className, T),
|
|
3234
|
+
children: le
|
|
3219
3235
|
})
|
|
3220
3236
|
}),
|
|
3221
|
-
|
|
3222
|
-
id: o ?
|
|
3223
|
-
className:
|
|
3237
|
+
re && /* @__PURE__ */ g("div", {
|
|
3238
|
+
id: o ? ee : te,
|
|
3239
|
+
className: q(Vr.message, K, !o && j.message?.className, o ? O : k),
|
|
3224
3240
|
role: o ? "alert" : void 0,
|
|
3225
3241
|
"aria-live": !o && I === "polite" ? "polite" : void 0,
|
|
3226
|
-
children:
|
|
3242
|
+
children: re
|
|
3227
3243
|
})
|
|
3228
3244
|
]
|
|
3229
3245
|
});
|
|
3230
|
-
},
|
|
3231
|
-
Label:
|
|
3232
|
-
Description:
|
|
3233
|
-
Control:
|
|
3234
|
-
Message:
|
|
3246
|
+
}, Kr = Ur("label", "FormField.Label"), qr = Ur("description", "FormField.Description"), Jr = Ur("control", "FormField.Control"), Yr = Ur("message", "FormField.Message"), Xr = Object.assign(Gr, {
|
|
3247
|
+
Label: Kr,
|
|
3248
|
+
Description: qr,
|
|
3249
|
+
Control: Jr,
|
|
3250
|
+
Message: Yr,
|
|
3235
3251
|
displayName: "FormField"
|
|
3236
3252
|
});
|
|
3237
3253
|
// src/components/Select/Root/useSelectRootState.tsx
|
|
3238
|
-
function
|
|
3239
|
-
let { children: t, label: n, description: r, id: i, name: a, "aria-label": s, "aria-describedby": u, "aria-labelledby": m, multiple: v = !1, maxSelected: y, closeOnSelect: b, placeholder: x = "Select...", empty: S, loadingText: C = "Loading...", size: w, color: T = "primary", variant: E = "outline", required: D = !1, disabled: O = !1, invalid: k = !1, loading: A = !1, clearable: j = !1, searchable: M = !1, virtual: N, modal: P = !1, command: F = !1, error: I, placement: R = "bottom", matchTriggerWidth: z = !0, avoidCollisions:
|
|
3254
|
+
function Zr(e) {
|
|
3255
|
+
let { children: t, label: n, description: r, id: i, name: a, "aria-label": s, "aria-describedby": u, "aria-labelledby": m, multiple: v = !1, maxSelected: y, closeOnSelect: b, placeholder: x = "Select...", empty: S, loadingText: C = "Loading...", size: w, color: T = "primary", variant: E = "outline", required: D = !1, disabled: O = !1, invalid: k = !1, loading: A = !1, clearable: j = !1, searchable: M = !1, virtual: N, modal: P = !1, command: F = !1, error: I, placement: R = "bottom", matchTriggerWidth: z = !0, avoidCollisions: B = !0, portal: V = !0, open: H, defaultOpen: U = !1, onOpenChange: W, onSearch: G, onClear: ee, startIcon: te, endIcon: ne, prefix: re, suffix: ie, renderValue: K, renderOption: ae, onBlur: oe, onFocus: se, className: ce, triggerClassName: le, dropdownClassName: ue } = e, de = l(), fe = Br(), pe = !!(n || r || I), me = i ?? (pe ? void 0 : fe?.controlId) ?? de, he = `${me}-listbox`, [q, ge] = p(""), _e = !!I, J = _e ? `${me}-error` : void 0, ve = r ? `${me}-description` : void 0, ye = w ?? fe?.size ?? "md", be = k || _e || !pe && !!fe?.invalid, xe = O || !pe && !!fe?.disabled, Se = D || !pe && !!fe?.required, Ce = [
|
|
3240
3256
|
u,
|
|
3241
|
-
!
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
].filter(Boolean).join(" "),
|
|
3245
|
-
options:
|
|
3246
|
-
searchable:
|
|
3247
|
-
searchValue:
|
|
3257
|
+
!pe && !u ? fe?.ariaDescribedBy : void 0,
|
|
3258
|
+
ve,
|
|
3259
|
+
J
|
|
3260
|
+
].filter(Boolean).join(" "), we = f(null), Te = f(null), [Ee, De] = p(!1), Oe = M || F, { entries: ke, options: Ae } = Rr(t), je = d(() => Ir({
|
|
3261
|
+
options: Ae,
|
|
3262
|
+
searchable: Oe,
|
|
3263
|
+
searchValue: q
|
|
3248
3264
|
}), [
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
]),
|
|
3253
|
-
value:
|
|
3254
|
-
defaultValue:
|
|
3265
|
+
Oe,
|
|
3266
|
+
Ae,
|
|
3267
|
+
q
|
|
3268
|
+
]), Me = e.multiple === !0 ? e.value : e.value === null ? "" : e.value, Ne = e.multiple === !0 ? e.defaultValue : e.defaultValue === null ? "" : e.defaultValue, Pe = e.multiple === !0 ? e.onValueChange : void 0, Y = e.multiple === !0 ? void 0 : e.onValueChange, { selectedValue: Fe, selectedValues: X, isOpen: Ie, setIsOpen: Le, setSelectedValue: Re, activeIndex: ze, setActiveIndex: Be, closeDropdown: Ve, toggleDropdown: He, selectValue: Ue, onKeyDown: We } = Tt({
|
|
3269
|
+
value: Me,
|
|
3270
|
+
defaultValue: Ne,
|
|
3255
3271
|
onValueChange: o((e) => {
|
|
3256
|
-
v ?
|
|
3272
|
+
v ? Pe?.(Array.isArray(e) ? e : e ? [e] : []) : Y?.(Array.isArray(e) ? e[0] ?? null : e === "" ? null : e);
|
|
3257
3273
|
}, [
|
|
3258
3274
|
v,
|
|
3259
|
-
|
|
3260
|
-
|
|
3275
|
+
Pe,
|
|
3276
|
+
Y
|
|
3261
3277
|
]),
|
|
3262
|
-
options:
|
|
3278
|
+
options: je,
|
|
3263
3279
|
multiple: v,
|
|
3264
3280
|
maxSelected: y,
|
|
3265
3281
|
closeOnSelect: b,
|
|
3266
|
-
disabled:
|
|
3267
|
-
open:
|
|
3268
|
-
defaultOpen:
|
|
3269
|
-
onOpenChange:
|
|
3270
|
-
}), Ge = d(() =>
|
|
3271
|
-
isOpen:
|
|
3282
|
+
disabled: xe,
|
|
3283
|
+
open: H,
|
|
3284
|
+
defaultOpen: U,
|
|
3285
|
+
onOpenChange: W
|
|
3286
|
+
}), Ge = d(() => Ae.find((e) => X.includes(e.value)), [Ae, X]), Ke = d(() => Ae.filter((e) => X.includes(e.value)), [Ae, X]), qe = !!Ge, Je = Array.isArray(Fe) ? Fe[0] ?? "" : Fe, { floatingStyles: Ye, setRef: Xe, setFloatingRef: Ze } = bt({
|
|
3287
|
+
isOpen: Ie,
|
|
3272
3288
|
onOpenChange: Le,
|
|
3273
3289
|
placement: R,
|
|
3274
3290
|
matchTriggerWidth: z,
|
|
3275
|
-
avoidCollisions:
|
|
3291
|
+
avoidCollisions: B
|
|
3276
3292
|
}), Qe = o((e) => {
|
|
3277
|
-
Ue(e),
|
|
3293
|
+
Ue(e), we.current?.focus();
|
|
3278
3294
|
}, [Ue]), $e = o((e) => {
|
|
3279
3295
|
if (!v || e.length === 0) return;
|
|
3280
3296
|
let t = L({
|
|
3281
|
-
selectedValues:
|
|
3297
|
+
selectedValues: X,
|
|
3282
3298
|
groupValues: e,
|
|
3283
|
-
enabledValues: new Set(
|
|
3299
|
+
enabledValues: new Set(Ae.filter((e) => !e.disabled).map((e) => e.value)),
|
|
3284
3300
|
maxSelected: y
|
|
3285
3301
|
});
|
|
3286
|
-
t.clearedGroup ? Re(t.selectedValues) : (Re(t.selectedValues), b && (Ve(),
|
|
3302
|
+
t.clearedGroup ? Re(t.selectedValues) : (Re(t.selectedValues), b && (Ve(), we.current?.focus()));
|
|
3287
3303
|
}, [
|
|
3288
3304
|
Ve,
|
|
3289
3305
|
b,
|
|
3290
3306
|
y,
|
|
3291
3307
|
v,
|
|
3292
|
-
|
|
3293
|
-
|
|
3308
|
+
Ae,
|
|
3309
|
+
X,
|
|
3294
3310
|
Re
|
|
3295
3311
|
]), et = o(() => {
|
|
3296
|
-
Ue(""),
|
|
3297
|
-
}, [
|
|
3298
|
-
|
|
3299
|
-
}, [
|
|
3300
|
-
|
|
3301
|
-
}, [
|
|
3302
|
-
|
|
3312
|
+
Ue(""), ee?.(), we.current?.focus();
|
|
3313
|
+
}, [ee, Ue]), tt = o(() => {
|
|
3314
|
+
Ie || De(!1), He();
|
|
3315
|
+
}, [Ie, He]), nt = o((e) => {
|
|
3316
|
+
Qr(e, Ie) && De(!0), We(e);
|
|
3317
|
+
}, [Ie, We]), rt = o((e) => {
|
|
3318
|
+
De(!0), Be(e);
|
|
3303
3319
|
}, [Be]), it = o((e) => {
|
|
3304
|
-
|
|
3305
|
-
}, [
|
|
3306
|
-
active:
|
|
3307
|
-
id:
|
|
3320
|
+
ge(e), G?.(e);
|
|
3321
|
+
}, [G]), at = ft({
|
|
3322
|
+
active: Ie,
|
|
3323
|
+
id: he,
|
|
3308
3324
|
zIndexLevel: "dropdown",
|
|
3309
3325
|
closeOnEscape: !0,
|
|
3310
3326
|
closeOnOutsidePress: !0,
|
|
3311
|
-
contentRef:
|
|
3312
|
-
ignoreRefs: [
|
|
3327
|
+
contentRef: Te,
|
|
3328
|
+
ignoreRefs: [we],
|
|
3313
3329
|
requestClose: Ve
|
|
3314
3330
|
});
|
|
3315
3331
|
c(() => {
|
|
3316
|
-
|
|
3317
|
-
}, [
|
|
3318
|
-
!
|
|
3319
|
-
}, [
|
|
3320
|
-
active:
|
|
3332
|
+
Ie || De(!1);
|
|
3333
|
+
}, [Ie]), c(() => {
|
|
3334
|
+
!Ie && q && ge("");
|
|
3335
|
+
}, [Ie, q]), _t({
|
|
3336
|
+
active: Ie,
|
|
3321
3337
|
enabled: P
|
|
3322
3338
|
});
|
|
3323
3339
|
let ot = o((e) => {
|
|
3324
|
-
|
|
3340
|
+
we.current = e, Xe(e);
|
|
3325
3341
|
}, [Xe]), st = o((e) => {
|
|
3326
|
-
|
|
3327
|
-
}, [Ze]), ct = d(() =>
|
|
3342
|
+
Te.current = e, Ze(e);
|
|
3343
|
+
}, [Ze]), ct = d(() => K ? K({
|
|
3328
3344
|
multiple: v,
|
|
3329
3345
|
option: Ge,
|
|
3330
3346
|
options: Ke,
|
|
3331
3347
|
value: Je,
|
|
3332
|
-
values:
|
|
3348
|
+
values: X
|
|
3333
3349
|
}) : v && Ke.length ? Ke.map((e) => e.label).join(", ") : Ge?.label ?? x, [
|
|
3334
3350
|
v,
|
|
3335
3351
|
x,
|
|
3336
|
-
|
|
3352
|
+
K,
|
|
3337
3353
|
Ge,
|
|
3338
3354
|
Ke,
|
|
3339
|
-
|
|
3355
|
+
X,
|
|
3340
3356
|
Je
|
|
3341
|
-
]), lt = S ?? "No options available", ut = j &&
|
|
3357
|
+
]), lt = S ?? "No options available", ut = j && X.length > 0 && !xe && !A, dt = d(() => ({
|
|
3342
3358
|
...Ye,
|
|
3343
3359
|
zIndex: at.zIndex
|
|
3344
3360
|
}), [at.zIndex, Ye]), pt = d(() => ({
|
|
3345
|
-
id:
|
|
3346
|
-
describedBy:
|
|
3361
|
+
id: me,
|
|
3362
|
+
describedBy: Ce || void 0,
|
|
3347
3363
|
labelledBy: s ? void 0 : m,
|
|
3348
|
-
isOpen:
|
|
3349
|
-
disabled:
|
|
3350
|
-
required:
|
|
3351
|
-
listboxId:
|
|
3364
|
+
isOpen: Ie,
|
|
3365
|
+
disabled: xe,
|
|
3366
|
+
required: Se,
|
|
3367
|
+
listboxId: he,
|
|
3352
3368
|
activeIndex: ze,
|
|
3353
|
-
ariaLabel: s ?? (!n && !
|
|
3354
|
-
error:
|
|
3369
|
+
ariaLabel: s ?? (!n && !fe?.labelId ? Ge?.label || x : void 0),
|
|
3370
|
+
error: be,
|
|
3355
3371
|
loading: A,
|
|
3356
3372
|
displayText: ct,
|
|
3357
3373
|
isPlaceholder: !qe,
|
|
3358
|
-
size:
|
|
3374
|
+
size: ye,
|
|
3359
3375
|
color: T,
|
|
3360
3376
|
variant: E,
|
|
3361
|
-
startIcon:
|
|
3362
|
-
endIcon:
|
|
3363
|
-
prefix:
|
|
3364
|
-
suffix:
|
|
3377
|
+
startIcon: te,
|
|
3378
|
+
endIcon: ne,
|
|
3379
|
+
prefix: re,
|
|
3380
|
+
suffix: ie,
|
|
3365
3381
|
clearable: ut,
|
|
3366
|
-
className:
|
|
3382
|
+
className: le,
|
|
3367
3383
|
buttonRef: ot,
|
|
3368
3384
|
onClear: et,
|
|
3369
3385
|
onClick: tt,
|
|
3370
3386
|
onKeyDown: nt,
|
|
3371
|
-
onBlur:
|
|
3372
|
-
onFocus:
|
|
3387
|
+
onBlur: oe,
|
|
3388
|
+
onFocus: se
|
|
3373
3389
|
}), [
|
|
3374
3390
|
ze,
|
|
3375
3391
|
s,
|
|
3376
3392
|
m,
|
|
3377
3393
|
T,
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3394
|
+
Ce,
|
|
3395
|
+
ne,
|
|
3396
|
+
fe?.labelId,
|
|
3381
3397
|
et,
|
|
3382
3398
|
tt,
|
|
3383
3399
|
nt,
|
|
3384
3400
|
qe,
|
|
3385
|
-
Se,
|
|
3386
3401
|
xe,
|
|
3387
|
-
|
|
3388
|
-
|
|
3402
|
+
be,
|
|
3403
|
+
Ie,
|
|
3404
|
+
Se,
|
|
3389
3405
|
n,
|
|
3390
|
-
|
|
3406
|
+
he,
|
|
3391
3407
|
A,
|
|
3408
|
+
oe,
|
|
3392
3409
|
se,
|
|
3393
|
-
ce,
|
|
3394
3410
|
x,
|
|
3395
|
-
|
|
3396
|
-
|
|
3411
|
+
re,
|
|
3412
|
+
ye,
|
|
3397
3413
|
ct,
|
|
3398
3414
|
Ge?.label,
|
|
3399
3415
|
ot,
|
|
3400
3416
|
ut,
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3417
|
+
te,
|
|
3418
|
+
ie,
|
|
3419
|
+
le,
|
|
3420
|
+
me,
|
|
3405
3421
|
E
|
|
3406
3422
|
]), mt = d(() => ({
|
|
3407
|
-
isOpen:
|
|
3408
|
-
listboxId:
|
|
3409
|
-
labelledById:
|
|
3410
|
-
style:
|
|
3411
|
-
options:
|
|
3412
|
-
entries:
|
|
3423
|
+
isOpen: Ie,
|
|
3424
|
+
listboxId: he,
|
|
3425
|
+
labelledById: me,
|
|
3426
|
+
style: dt,
|
|
3427
|
+
options: je,
|
|
3428
|
+
entries: Oe || q ? void 0 : ke,
|
|
3413
3429
|
multiple: v,
|
|
3414
3430
|
color: T,
|
|
3415
3431
|
variant: E,
|
|
3416
|
-
searchable:
|
|
3432
|
+
searchable: Oe,
|
|
3417
3433
|
command: F,
|
|
3418
3434
|
virtual: N,
|
|
3419
|
-
portal:
|
|
3420
|
-
searchValue:
|
|
3435
|
+
portal: V,
|
|
3436
|
+
searchValue: q,
|
|
3421
3437
|
loading: A,
|
|
3422
3438
|
loadingText: C,
|
|
3423
3439
|
emptyText: lt,
|
|
3424
|
-
renderOption:
|
|
3440
|
+
renderOption: ae,
|
|
3425
3441
|
selectedValue: Je,
|
|
3426
|
-
selectedValues:
|
|
3442
|
+
selectedValues: X,
|
|
3427
3443
|
activeIndex: ze,
|
|
3428
|
-
visualActiveIndex:
|
|
3429
|
-
className:
|
|
3444
|
+
visualActiveIndex: Ee ? ze : -1,
|
|
3445
|
+
className: ue,
|
|
3430
3446
|
setDropdownRef: st,
|
|
3431
3447
|
onSelect: Qe,
|
|
3432
3448
|
onSelectGroup: $e,
|
|
@@ -3436,88 +3452,88 @@ function Xr(e) {
|
|
|
3436
3452
|
ze,
|
|
3437
3453
|
T,
|
|
3438
3454
|
F,
|
|
3439
|
-
|
|
3440
|
-
|
|
3455
|
+
dt,
|
|
3456
|
+
ue,
|
|
3441
3457
|
lt,
|
|
3442
|
-
|
|
3458
|
+
je,
|
|
3443
3459
|
rt,
|
|
3444
3460
|
it,
|
|
3445
3461
|
Qe,
|
|
3446
3462
|
$e,
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3463
|
+
Ee,
|
|
3464
|
+
Ie,
|
|
3465
|
+
Oe,
|
|
3466
|
+
he,
|
|
3451
3467
|
A,
|
|
3452
3468
|
C,
|
|
3453
3469
|
v,
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3470
|
+
V,
|
|
3471
|
+
ae,
|
|
3472
|
+
ke,
|
|
3473
|
+
q,
|
|
3474
|
+
X,
|
|
3459
3475
|
st,
|
|
3460
3476
|
Je,
|
|
3461
|
-
|
|
3477
|
+
me,
|
|
3462
3478
|
E,
|
|
3463
3479
|
N
|
|
3464
3480
|
]), ht = d(() => ({
|
|
3465
3481
|
triggerProps: pt,
|
|
3466
3482
|
contentProps: mt
|
|
3467
|
-
}), [mt, pt]),
|
|
3483
|
+
}), [mt, pt]), gt = d(() => /* @__PURE__ */ _(h, { children: [a && v && X.length > 0 && /* @__PURE__ */ g(h, { children: X.map((e) => /* @__PURE__ */ g("input", {
|
|
3468
3484
|
type: "hidden",
|
|
3469
3485
|
name: a,
|
|
3470
3486
|
value: e,
|
|
3471
|
-
disabled:
|
|
3487
|
+
disabled: xe
|
|
3472
3488
|
}, e)) }), a && !v && /* @__PURE__ */ g("input", {
|
|
3473
3489
|
type: "hidden",
|
|
3474
3490
|
name: a,
|
|
3475
3491
|
value: Je,
|
|
3476
|
-
disabled:
|
|
3492
|
+
disabled: xe
|
|
3477
3493
|
})] }), [
|
|
3478
|
-
|
|
3494
|
+
xe,
|
|
3479
3495
|
v,
|
|
3480
3496
|
a,
|
|
3481
|
-
|
|
3497
|
+
X,
|
|
3482
3498
|
Je
|
|
3483
3499
|
]);
|
|
3484
3500
|
return {
|
|
3485
3501
|
children: t,
|
|
3486
|
-
className:
|
|
3502
|
+
className: ce,
|
|
3487
3503
|
contentProps: mt,
|
|
3488
3504
|
contextValue: ht,
|
|
3489
3505
|
description: r,
|
|
3490
3506
|
error: I,
|
|
3491
|
-
hasCompoundLayout: d(() =>
|
|
3492
|
-
hasExternalField: !
|
|
3493
|
-
hiddenInputs:
|
|
3494
|
-
isDisabled:
|
|
3495
|
-
isRequired:
|
|
3507
|
+
hasCompoundLayout: d(() => Nr(t), [t]),
|
|
3508
|
+
hasExternalField: !pe && !!fe,
|
|
3509
|
+
hiddenInputs: gt,
|
|
3510
|
+
isDisabled: xe,
|
|
3511
|
+
isRequired: Se,
|
|
3496
3512
|
label: n,
|
|
3497
|
-
resolvedSize:
|
|
3498
|
-
triggerId:
|
|
3513
|
+
resolvedSize: ye,
|
|
3514
|
+
triggerId: me,
|
|
3499
3515
|
triggerProps: pt
|
|
3500
3516
|
};
|
|
3501
3517
|
}
|
|
3502
|
-
function
|
|
3518
|
+
function Qr(e, t) {
|
|
3503
3519
|
return e.altKey || e.ctrlKey || e.metaKey ? !1 : t ? e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" || e.key === "Enter" || e.key === " " || e.key.length === 1 : e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === " ";
|
|
3504
3520
|
}
|
|
3505
3521
|
// src/components/Select/Root/SelectRoot.tsx
|
|
3506
|
-
var
|
|
3507
|
-
let { children: t, className: n, contentProps: r, contextValue: i, description: a, error: o, hasCompoundLayout: s, hasExternalField: c, hiddenInputs: l, isDisabled: u, isRequired: f, label: p, resolvedSize: m, triggerId: v, triggerProps: y } =
|
|
3522
|
+
var $r = (e) => {
|
|
3523
|
+
let { children: t, className: n, contentProps: r, contextValue: i, description: a, error: o, hasCompoundLayout: s, hasExternalField: c, hiddenInputs: l, isDisabled: u, isRequired: f, label: p, resolvedSize: m, triggerId: v, triggerProps: y } = Zr(e), b = d(() => /* @__PURE__ */ _(lr, {
|
|
3508
3524
|
value: i,
|
|
3509
|
-
children: [l, s ? t : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(
|
|
3525
|
+
children: [l, s ? t : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(Ar, {}), /* @__PURE__ */ g(vr, { children: t })] })]
|
|
3510
3526
|
}), [
|
|
3511
3527
|
t,
|
|
3512
3528
|
i,
|
|
3513
3529
|
s,
|
|
3514
3530
|
l
|
|
3515
|
-
]), x = d(() => /* @__PURE__ */ _(
|
|
3531
|
+
]), x = d(() => /* @__PURE__ */ _(lr, {
|
|
3516
3532
|
value: i,
|
|
3517
3533
|
children: [
|
|
3518
3534
|
l,
|
|
3519
|
-
/* @__PURE__ */ g(
|
|
3520
|
-
/* @__PURE__ */ g(
|
|
3535
|
+
/* @__PURE__ */ g(jr, { ...y }),
|
|
3536
|
+
/* @__PURE__ */ g(yr, { ...r })
|
|
3521
3537
|
]
|
|
3522
3538
|
}), [
|
|
3523
3539
|
r,
|
|
@@ -3525,7 +3541,7 @@ var Qr = (e) => {
|
|
|
3525
3541
|
l,
|
|
3526
3542
|
y
|
|
3527
3543
|
]);
|
|
3528
|
-
return c ? t ? b : x : /* @__PURE__ */ g(
|
|
3544
|
+
return c ? t ? b : x : /* @__PURE__ */ g(Xr, {
|
|
3529
3545
|
id: v,
|
|
3530
3546
|
label: p,
|
|
3531
3547
|
description: a,
|
|
@@ -3538,10 +3554,10 @@ var Qr = (e) => {
|
|
|
3538
3554
|
children: t ? b : x
|
|
3539
3555
|
});
|
|
3540
3556
|
};
|
|
3541
|
-
|
|
3557
|
+
$r.displayName = "SelectRoot";
|
|
3542
3558
|
// src/components/Select/Search/SelectSearch.tsx
|
|
3543
|
-
var
|
|
3544
|
-
let { contentProps: n } =
|
|
3559
|
+
var ei = ({ placeholder: e, className: t }) => {
|
|
3560
|
+
let { contentProps: n } = ur(), r = f(null), i = n.searchValue ?? "";
|
|
3545
3561
|
return c(() => {
|
|
3546
3562
|
if (!n.isOpen) return;
|
|
3547
3563
|
let e = window.setTimeout(() => {
|
|
@@ -3549,10 +3565,10 @@ var $r = ({ placeholder: e, className: t }) => {
|
|
|
3549
3565
|
}, 0);
|
|
3550
3566
|
return () => window.clearTimeout(e);
|
|
3551
3567
|
}, [n.isOpen]), /* @__PURE__ */ _("div", {
|
|
3552
|
-
className:
|
|
3568
|
+
className: _r.searchWrap,
|
|
3553
3569
|
children: [/* @__PURE__ */ g("input", {
|
|
3554
3570
|
ref: r,
|
|
3555
|
-
className:
|
|
3571
|
+
className: q(_r.search, t),
|
|
3556
3572
|
value: i,
|
|
3557
3573
|
placeholder: e ?? (n.command ? "Type a command..." : "Search..."),
|
|
3558
3574
|
"aria-label": "Search options",
|
|
@@ -3560,7 +3576,7 @@ var $r = ({ placeholder: e, className: t }) => {
|
|
|
3560
3576
|
onChange: (e) => n.onSearchChange?.(e.target.value)
|
|
3561
3577
|
}), i && /* @__PURE__ */ g("button", {
|
|
3562
3578
|
type: "button",
|
|
3563
|
-
className:
|
|
3579
|
+
className: _r.searchClear,
|
|
3564
3580
|
"aria-label": "Clear search",
|
|
3565
3581
|
onClick: () => {
|
|
3566
3582
|
n.onSearchChange?.(""), r.current?.focus();
|
|
@@ -3569,51 +3585,51 @@ var $r = ({ placeholder: e, className: t }) => {
|
|
|
3569
3585
|
})]
|
|
3570
3586
|
});
|
|
3571
3587
|
};
|
|
3572
|
-
|
|
3588
|
+
fr(ei, "search"), ei.displayName = "Select.Search";
|
|
3573
3589
|
// src/components/Select/Separator/SelectSeparator.tsx
|
|
3574
|
-
var
|
|
3575
|
-
|
|
3590
|
+
var ti = () => null;
|
|
3591
|
+
fr(ti, "separator"), ti.displayName = "Select.Separator";
|
|
3576
3592
|
// src/components/Select/Value/SelectValue.tsx
|
|
3577
|
-
var
|
|
3578
|
-
let { triggerProps: n } =
|
|
3593
|
+
var ni = ({ children: e, className: t }) => {
|
|
3594
|
+
let { triggerProps: n } = ur();
|
|
3579
3595
|
return /* @__PURE__ */ g("span", {
|
|
3580
|
-
className:
|
|
3596
|
+
className: q(Z.valueWrap, t),
|
|
3581
3597
|
children: /* @__PURE__ */ g("span", {
|
|
3582
|
-
className:
|
|
3598
|
+
className: q(Z.value, { [Z.placeholder]: n.isPlaceholder }),
|
|
3583
3599
|
children: e ?? n.displayText
|
|
3584
3600
|
})
|
|
3585
3601
|
});
|
|
3586
3602
|
};
|
|
3587
|
-
|
|
3603
|
+
fr(ni, "value"), ni.displayName = "Select.Value";
|
|
3588
3604
|
// src/components/Select/Select.tsx
|
|
3589
|
-
var
|
|
3590
|
-
Trigger:
|
|
3591
|
-
Value:
|
|
3592
|
-
Icon:
|
|
3593
|
-
Content:
|
|
3594
|
-
Search:
|
|
3595
|
-
Group:
|
|
3596
|
-
Label:
|
|
3597
|
-
Item:
|
|
3598
|
-
ItemIcon:
|
|
3599
|
-
ItemDescription:
|
|
3600
|
-
ItemBadge:
|
|
3601
|
-
Separator:
|
|
3602
|
-
Empty:
|
|
3603
|
-
Loading:
|
|
3605
|
+
var ri = Object.assign($r, {
|
|
3606
|
+
Trigger: Ar,
|
|
3607
|
+
Value: ni,
|
|
3608
|
+
Icon: wr,
|
|
3609
|
+
Content: vr,
|
|
3610
|
+
Search: ei,
|
|
3611
|
+
Group: Cr,
|
|
3612
|
+
Label: Or,
|
|
3613
|
+
Item: hr,
|
|
3614
|
+
ItemIcon: Dr,
|
|
3615
|
+
ItemDescription: Er,
|
|
3616
|
+
ItemBadge: Tr,
|
|
3617
|
+
Separator: ti,
|
|
3618
|
+
Empty: Sr,
|
|
3619
|
+
Loading: kr
|
|
3604
3620
|
});
|
|
3605
|
-
|
|
3621
|
+
ri.displayName = "Select";
|
|
3606
3622
|
// src/components/Tabs/internal/TabsContext.tsx
|
|
3607
|
-
var
|
|
3608
|
-
let e = s(
|
|
3623
|
+
var ii = r(null), ai = () => {
|
|
3624
|
+
let e = s(ii);
|
|
3609
3625
|
if (!e) throw Error("Tabs components must be used inside Tabs");
|
|
3610
3626
|
return e;
|
|
3611
|
-
},
|
|
3627
|
+
}, oi = {
|
|
3612
3628
|
panel: "_panel_1v1a9_1",
|
|
3613
3629
|
visible: "_visible_1v1a9_10",
|
|
3614
3630
|
vertical: "_vertical_1v1a9_14"
|
|
3615
|
-
},
|
|
3616
|
-
let { value: a, orientation: o, keepMounted: s, lazyMount: l, registerContent: u, getTriggerId: d, getContentId: f } =
|
|
3631
|
+
}, si = ({ value: e, children: t, className: n, forceMount: r = !1, ...i }) => {
|
|
3632
|
+
let { value: a, orientation: o, keepMounted: s, lazyMount: l, registerContent: u, getTriggerId: d, getContentId: f } = ai(), m = a === e, [h, _] = p(m);
|
|
3617
3633
|
return c(() => (u(e, !0), () => {
|
|
3618
3634
|
u(e, !1);
|
|
3619
3635
|
}), [u, e]), c(() => {
|
|
@@ -3627,14 +3643,14 @@ var ri = r(null), ii = () => {
|
|
|
3627
3643
|
tabIndex: 0,
|
|
3628
3644
|
"data-state": m ? "active" : "inactive",
|
|
3629
3645
|
"data-orientation": o,
|
|
3630
|
-
className:
|
|
3646
|
+
className: q(oi.panel, m && oi.visible, o === "vertical" && oi.vertical, n),
|
|
3631
3647
|
children: t
|
|
3632
3648
|
}) : null;
|
|
3633
3649
|
};
|
|
3634
|
-
|
|
3650
|
+
si.displayName = "Tabs.Content";
|
|
3635
3651
|
// src/components/Tabs/internal/useTabsIndicator.ts
|
|
3636
|
-
var
|
|
3637
|
-
let e = f(null), t = f(null), n = f(void 0), r = f(null), [i, a] = p({}), { value: o, orientation: s, variant: l, collectionVersion: m, getTriggerId: h } =
|
|
3652
|
+
var ci = 8, li = 360, ui = () => {
|
|
3653
|
+
let e = f(null), t = f(null), n = f(void 0), r = f(null), [i, a] = p({}), { value: o, orientation: s, variant: l, collectionVersion: m, getTriggerId: h } = ai();
|
|
3638
3654
|
return c(() => () => {
|
|
3639
3655
|
r.current?.cancel();
|
|
3640
3656
|
}, []), u(() => {
|
|
@@ -3670,7 +3686,7 @@ var si = 8, ci = 360, li = () => {
|
|
|
3670
3686
|
let s = t.current;
|
|
3671
3687
|
if (e && l === "line" && s && n.current !== o && !(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && typeof i.animate == "function") {
|
|
3672
3688
|
r.current?.cancel();
|
|
3673
|
-
let e = s.y + s.height / 2, t = p.y + p.height / 2, n = e -
|
|
3689
|
+
let e = s.y + s.height / 2, t = p.y + p.height / 2, n = e - ci / 2, a = t - ci / 2;
|
|
3674
3690
|
r.current = i.animate([
|
|
3675
3691
|
{
|
|
3676
3692
|
height: `${s.height}px`,
|
|
@@ -3678,12 +3694,12 @@ var si = 8, ci = 360, li = () => {
|
|
|
3678
3694
|
offset: 0
|
|
3679
3695
|
},
|
|
3680
3696
|
{
|
|
3681
|
-
height: `${
|
|
3697
|
+
height: `${ci}px`,
|
|
3682
3698
|
transform: `translate3d(0, ${n}px, 0)`,
|
|
3683
3699
|
offset: .28
|
|
3684
3700
|
},
|
|
3685
3701
|
{
|
|
3686
|
-
height: `${
|
|
3702
|
+
height: `${ci}px`,
|
|
3687
3703
|
transform: `translate3d(0, ${a}px, 0)`,
|
|
3688
3704
|
offset: .64
|
|
3689
3705
|
},
|
|
@@ -3693,7 +3709,7 @@ var si = 8, ci = 360, li = () => {
|
|
|
3693
3709
|
offset: 1
|
|
3694
3710
|
}
|
|
3695
3711
|
], {
|
|
3696
|
-
duration:
|
|
3712
|
+
duration: li,
|
|
3697
3713
|
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
3698
3714
|
fill: "none"
|
|
3699
3715
|
});
|
|
@@ -3709,7 +3725,7 @@ var si = 8, ci = 360, li = () => {
|
|
|
3709
3725
|
let h = t.current;
|
|
3710
3726
|
if (e && l === "line" && h && n.current !== o && !(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && typeof i.animate == "function") {
|
|
3711
3727
|
r.current?.cancel();
|
|
3712
|
-
let e = h.x + h.width / 2, t = p.x + p.width / 2, n = e -
|
|
3728
|
+
let e = h.x + h.width / 2, t = p.x + p.width / 2, n = e - ci / 2, a = t - ci / 2;
|
|
3713
3729
|
r.current = i.animate([
|
|
3714
3730
|
{
|
|
3715
3731
|
width: `${h.width}px`,
|
|
@@ -3717,12 +3733,12 @@ var si = 8, ci = 360, li = () => {
|
|
|
3717
3733
|
offset: 0
|
|
3718
3734
|
},
|
|
3719
3735
|
{
|
|
3720
|
-
width: `${
|
|
3736
|
+
width: `${ci}px`,
|
|
3721
3737
|
transform: `translate3d(${n}px, 0, 0)`,
|
|
3722
3738
|
offset: .28
|
|
3723
3739
|
},
|
|
3724
3740
|
{
|
|
3725
|
-
width: `${
|
|
3741
|
+
width: `${ci}px`,
|
|
3726
3742
|
transform: `translate3d(${a}px, 0, 0)`,
|
|
3727
3743
|
offset: .64
|
|
3728
3744
|
},
|
|
@@ -3732,7 +3748,7 @@ var si = 8, ci = 360, li = () => {
|
|
|
3732
3748
|
offset: 1
|
|
3733
3749
|
}
|
|
3734
3750
|
], {
|
|
3735
|
-
duration:
|
|
3751
|
+
duration: li,
|
|
3736
3752
|
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
3737
3753
|
fill: "none"
|
|
3738
3754
|
});
|
|
@@ -3760,7 +3776,7 @@ var si = 8, ci = 360, li = () => {
|
|
|
3760
3776
|
ref: e,
|
|
3761
3777
|
style: i
|
|
3762
3778
|
}), [i]);
|
|
3763
|
-
},
|
|
3779
|
+
}, di = {
|
|
3764
3780
|
list: "_list_1opuz_1",
|
|
3765
3781
|
vertical: "_vertical_1opuz_10",
|
|
3766
3782
|
line: "_line_1opuz_17",
|
|
@@ -3768,23 +3784,23 @@ var si = 8, ci = 360, li = () => {
|
|
|
3768
3784
|
segmented: "_segmented_1opuz_29",
|
|
3769
3785
|
scrollable: "_scrollable_1opuz_37",
|
|
3770
3786
|
indicator: "_indicator_1opuz_46"
|
|
3771
|
-
},
|
|
3772
|
-
let { ref: r, style: i } =
|
|
3787
|
+
}, fi = ({ className: e, style: t, ...n }) => {
|
|
3788
|
+
let { ref: r, style: i } = ui();
|
|
3773
3789
|
return /* @__PURE__ */ g("span", {
|
|
3774
3790
|
...n,
|
|
3775
3791
|
ref: r,
|
|
3776
3792
|
"aria-hidden": "true",
|
|
3777
|
-
className:
|
|
3793
|
+
className: q(di.indicator, e),
|
|
3778
3794
|
style: {
|
|
3779
3795
|
...i,
|
|
3780
3796
|
...t
|
|
3781
3797
|
}
|
|
3782
3798
|
});
|
|
3783
3799
|
};
|
|
3784
|
-
|
|
3800
|
+
fi.displayName = "Tabs.Indicator";
|
|
3785
3801
|
// src/components/Tabs/List/TabsList.tsx
|
|
3786
|
-
var
|
|
3787
|
-
let { mode: i, orientation: a, variant: o } =
|
|
3802
|
+
var pi = ({ children: e, className: t, scrollable: n, ...r }) => {
|
|
3803
|
+
let { mode: i, orientation: a, variant: o } = ai(), s = n ?? !1;
|
|
3788
3804
|
return /* @__PURE__ */ g("div", {
|
|
3789
3805
|
...r,
|
|
3790
3806
|
role: i === "tabs" ? "tablist" : void 0,
|
|
@@ -3792,17 +3808,17 @@ var fi = ({ children: e, className: t, scrollable: n, ...r }) => {
|
|
|
3792
3808
|
"data-orientation": a,
|
|
3793
3809
|
"data-variant": o,
|
|
3794
3810
|
"data-scrollable": s ? "" : void 0,
|
|
3795
|
-
className:
|
|
3811
|
+
className: q(di.list, a === "vertical" && di.vertical, o === "line" && di.line, o === "pills" && di.pills, o === "segmented" && di.segmented, s && di.scrollable, t),
|
|
3796
3812
|
children: e
|
|
3797
3813
|
});
|
|
3798
3814
|
};
|
|
3799
|
-
|
|
3815
|
+
pi.displayName = "TabsList";
|
|
3800
3816
|
// src/components/Tabs/internal/useTabsCollection.ts
|
|
3801
|
-
var
|
|
3817
|
+
var mi = (e) => [...e].sort((e, t) => {
|
|
3802
3818
|
if (e.element === t.element) return 0;
|
|
3803
3819
|
let n = e.element.compareDocumentPosition(t.element);
|
|
3804
3820
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
3805
|
-
}),
|
|
3821
|
+
}), hi = () => {
|
|
3806
3822
|
let e = f([]), t = f([]), [n, r] = p(0), i = o(() => {
|
|
3807
3823
|
r((e) => e + 1);
|
|
3808
3824
|
}, []);
|
|
@@ -3821,14 +3837,14 @@ var pi = (e) => [...e].sort((e, t) => {
|
|
|
3821
3837
|
element: n,
|
|
3822
3838
|
disabled: r
|
|
3823
3839
|
}, o = e.current.findIndex((e) => e.element === n);
|
|
3824
|
-
o >= 0 ? e.current[o] = a : e.current.push(a), e.current =
|
|
3840
|
+
o >= 0 ? e.current[o] = a : e.current.push(a), e.current = mi(e.current), i();
|
|
3825
3841
|
}, [i]),
|
|
3826
3842
|
registerContent: o((e, n) => {
|
|
3827
3843
|
let r = t.current.findIndex((t) => t.value === e);
|
|
3828
3844
|
n ? r < 0 && (t.current.push({ value: e }), i()) : r >= 0 && (t.current.splice(r, 1), i());
|
|
3829
3845
|
}, [i])
|
|
3830
3846
|
};
|
|
3831
|
-
},
|
|
3847
|
+
}, gi = ({ focusedValue: e, setValue: t, setFocusedValue: n, getTabs: r, orientation: i, activationMode: a, dir: o, loop: s }) => ({ onKeyDown: (c) => {
|
|
3832
3848
|
let l = r().filter((e) => !e.disabled);
|
|
3833
3849
|
if (l.length === 0) return;
|
|
3834
3850
|
let u = l.findIndex((e) => e.element === document.activeElement), d = l.findIndex((t) => t.value === e), f = u >= 0 ? u : d >= 0 ? d : 0, p = (e) => {
|
|
@@ -3863,15 +3879,15 @@ var pi = (e) => [...e].sort((e, t) => {
|
|
|
3863
3879
|
e && (c.preventDefault(), n(e.value), t(e.value));
|
|
3864
3880
|
}
|
|
3865
3881
|
}
|
|
3866
|
-
} }),
|
|
3882
|
+
} }), _i = {
|
|
3867
3883
|
tabs: "_tabs_1hj56_1",
|
|
3868
3884
|
vertical: "_vertical_1hj56_30"
|
|
3869
|
-
},
|
|
3870
|
-
let C = l(), w = t !== void 0, { value: T, setValue: E } =
|
|
3885
|
+
}, vi = ({ children: e, value: t, defaultValue: n, onValueChange: r, orientation: i = "horizontal", activationMode: a = "automatic", dir: s = "ltr", loop: u = !0, mode: d = "tabs", variant: m = "line", color: h = "primary", size: _ = "md", keepMounted: v = !1, lazyMount: y = !1, disabled: b = !1, className: x, ...S }) => {
|
|
3886
|
+
let C = l(), w = t !== void 0, { value: T, setValue: E } = Et({
|
|
3871
3887
|
value: t,
|
|
3872
3888
|
defaultValue: n,
|
|
3873
3889
|
onValueChange: r
|
|
3874
|
-
}), D = f(T), O = f(void 0), k = f(void 0), [A, j] = p(T), { version: M, triggersRef: N, contentsRef: P, registerTrigger: F, registerContent: I } =
|
|
3890
|
+
}), D = f(T), O = f(void 0), k = f(void 0), [A, j] = p(T), { version: M, triggersRef: N, contentsRef: P, registerTrigger: F, registerContent: I } = hi(), L = o((e, t, n = !1) => {
|
|
3875
3891
|
if (!t) {
|
|
3876
3892
|
let t = D.current, n = N.current, r = n.findIndex((t) => t.value === e);
|
|
3877
3893
|
if (t === e && r >= 0) {
|
|
@@ -3887,7 +3903,7 @@ var pi = (e) => [...e].sort((e, t) => {
|
|
|
3887
3903
|
j,
|
|
3888
3904
|
E,
|
|
3889
3905
|
N
|
|
3890
|
-
]), { onKeyDown: R } =
|
|
3906
|
+
]), { onKeyDown: R } = gi({
|
|
3891
3907
|
focusedValue: A,
|
|
3892
3908
|
setValue: E,
|
|
3893
3909
|
setFocusedValue: j,
|
|
@@ -3942,11 +3958,11 @@ var pi = (e) => [...e].sort((e, t) => {
|
|
|
3942
3958
|
d,
|
|
3943
3959
|
N,
|
|
3944
3960
|
M
|
|
3945
|
-
]), /* @__PURE__ */ g(
|
|
3961
|
+
]), /* @__PURE__ */ g(ii.Provider, {
|
|
3946
3962
|
value: z,
|
|
3947
3963
|
children: /* @__PURE__ */ g("div", {
|
|
3948
3964
|
...S,
|
|
3949
|
-
className:
|
|
3965
|
+
className: q(_i.tabs, i === "vertical" && _i.vertical, x),
|
|
3950
3966
|
"data-mode": d,
|
|
3951
3967
|
"data-orientation": i,
|
|
3952
3968
|
dir: s,
|
|
@@ -3958,8 +3974,8 @@ var pi = (e) => [...e].sort((e, t) => {
|
|
|
3958
3974
|
})
|
|
3959
3975
|
});
|
|
3960
3976
|
};
|
|
3961
|
-
|
|
3962
|
-
var
|
|
3977
|
+
vi.displayName = "Tabs";
|
|
3978
|
+
var yi = {
|
|
3963
3979
|
trigger: "_trigger_1xafk_1",
|
|
3964
3980
|
iconOnly: "_iconOnly_1xafk_49",
|
|
3965
3981
|
icon: "_icon_1xafk_49",
|
|
@@ -3974,76 +3990,76 @@ var vi = {
|
|
|
3974
3990
|
line: "_line_1xafk_196",
|
|
3975
3991
|
pills: "_pills_1xafk_228",
|
|
3976
3992
|
vertical: "_vertical_1xafk_256"
|
|
3977
|
-
},
|
|
3978
|
-
className:
|
|
3993
|
+
}, bi = ({ children: e, className: t }) => /* @__PURE__ */ g("span", {
|
|
3994
|
+
className: q(yi.badge, t),
|
|
3979
3995
|
children: e
|
|
3980
3996
|
});
|
|
3981
|
-
|
|
3997
|
+
bi.displayName = "Tabs.Badge";
|
|
3982
3998
|
// src/components/Tabs/Trigger/TabsIcon.tsx
|
|
3983
|
-
var
|
|
3984
|
-
className:
|
|
3999
|
+
var xi = ({ children: e, className: t }) => /* @__PURE__ */ g("span", {
|
|
4000
|
+
className: q(yi.icon, t),
|
|
3985
4001
|
"aria-hidden": "true",
|
|
3986
4002
|
children: e
|
|
3987
4003
|
});
|
|
3988
|
-
|
|
4004
|
+
xi.displayName = "Tabs.Icon";
|
|
3989
4005
|
// src/components/Tabs/Trigger/TabsTrigger.tsx
|
|
3990
|
-
var
|
|
3991
|
-
let { value: y, focusedValue: b, setValue: x, setFocusedValue: S, mode: C, orientation: w, variant: T, size: E, disabled: D, registerTrigger: O, onTriggerKeyDown: k, getTriggerId: A, getContentId: j } =
|
|
4006
|
+
var Si = i(({ value: t, children: r, className: i, disabled: s = !1, asChild: c = !1, icon: l, badge: u, description: d, onClick: f, onKeyDown: p, ...m }, v) => {
|
|
4007
|
+
let { value: y, focusedValue: b, setValue: x, setFocusedValue: S, mode: C, orientation: w, variant: T, size: E, disabled: D, registerTrigger: O, onTriggerKeyDown: k, getTriggerId: A, getContentId: j } = ai(), M = D || s, N = y === t, P = b === t || !b && N, F = c && a(r) ? r : void 0, I = F ? F.props.children : r, L = e.toArray(I), R = L.some((e) => a(e) && e.type.displayName === "Tabs.Icon"), z = !!l, B = (z || R) && I == null;
|
|
3992
4008
|
process.env.NODE_ENV !== "production" && z && R && console.warn(`Tabs.Trigger value "${t}" received both icon and Tabs.Icon. Tabs.Icon takes precedence.`);
|
|
3993
|
-
let
|
|
4009
|
+
let V = o((e) => {
|
|
3994
4010
|
O(t, e, M), typeof v == "function" ? v(e) : v && (v.current = e);
|
|
3995
4011
|
}, [
|
|
3996
4012
|
M,
|
|
3997
4013
|
v,
|
|
3998
4014
|
O,
|
|
3999
4015
|
t
|
|
4000
|
-
]),
|
|
4016
|
+
]), H = z && !R || u || d, U = L.every((e) => typeof e == "string" || typeof e == "number"), W = q(yi.trigger, yi[T], yi[E], w === "vertical" && yi.vertical, z && yi.withIcon, B && yi.iconOnly, i), G = (e) => {
|
|
4001
4017
|
M ? e.preventDefault() : (S(t), x(t));
|
|
4002
|
-
},
|
|
4018
|
+
}, ee = (e) => {
|
|
4003
4019
|
e.defaultPrevented || k(e);
|
|
4004
4020
|
};
|
|
4005
4021
|
return C === "navigation" && F ? n(F, {
|
|
4006
4022
|
...m,
|
|
4007
|
-
ref:
|
|
4023
|
+
ref: V,
|
|
4008
4024
|
id: A(t),
|
|
4009
|
-
className:
|
|
4025
|
+
className: q(F.props.className, W),
|
|
4010
4026
|
"aria-current": N ? "page" : void 0,
|
|
4011
4027
|
"aria-disabled": M || void 0,
|
|
4012
4028
|
"data-state": N ? "active" : "inactive",
|
|
4013
4029
|
tabIndex: M ? -1 : F.props.tabIndex,
|
|
4014
4030
|
onClick: (e) => {
|
|
4015
|
-
F.props.onClick?.(e), M ? e.preventDefault() :
|
|
4031
|
+
F.props.onClick?.(e), M ? e.preventDefault() : G(e);
|
|
4016
4032
|
},
|
|
4017
4033
|
onKeyDown: (e) => {
|
|
4018
|
-
F.props.onKeyDown?.(e), !e.defaultPrevented &&
|
|
4034
|
+
F.props.onKeyDown?.(e), !e.defaultPrevented && ee(e);
|
|
4019
4035
|
},
|
|
4020
4036
|
children: /* @__PURE__ */ _(h, { children: [
|
|
4021
4037
|
z && !R && /* @__PURE__ */ g("span", {
|
|
4022
|
-
className:
|
|
4038
|
+
className: yi.icon,
|
|
4023
4039
|
"aria-hidden": "true",
|
|
4024
4040
|
children: l
|
|
4025
4041
|
}),
|
|
4026
|
-
I != null && (
|
|
4027
|
-
className:
|
|
4042
|
+
I != null && (H ? /* @__PURE__ */ _("span", {
|
|
4043
|
+
className: yi.body,
|
|
4028
4044
|
children: [/* @__PURE__ */ g("span", {
|
|
4029
|
-
className:
|
|
4045
|
+
className: yi.label,
|
|
4030
4046
|
children: I
|
|
4031
4047
|
}), d != null && /* @__PURE__ */ g("span", {
|
|
4032
|
-
className:
|
|
4048
|
+
className: yi.description,
|
|
4033
4049
|
children: d
|
|
4034
4050
|
})]
|
|
4035
|
-
}) :
|
|
4036
|
-
className:
|
|
4051
|
+
}) : U ? /* @__PURE__ */ g("span", {
|
|
4052
|
+
className: yi.label,
|
|
4037
4053
|
children: I
|
|
4038
4054
|
}) : I),
|
|
4039
4055
|
u != null && /* @__PURE__ */ g("span", {
|
|
4040
|
-
className:
|
|
4056
|
+
className: yi.badge,
|
|
4041
4057
|
children: u
|
|
4042
4058
|
})
|
|
4043
4059
|
] })
|
|
4044
4060
|
}) : (process.env.NODE_ENV !== "production" && C === "tabs" && c && console.warn("Tabs.Trigger: asChild is only supported when Tabs mode=\"navigation\"."), process.env.NODE_ENV !== "production" && C === "navigation" && c && !F && console.warn("Tabs.Trigger: asChild requires a single valid React element child."), /* @__PURE__ */ _("button", {
|
|
4045
4061
|
...m,
|
|
4046
|
-
ref:
|
|
4062
|
+
ref: V,
|
|
4047
4063
|
type: "button",
|
|
4048
4064
|
role: "tab",
|
|
4049
4065
|
id: A(t),
|
|
@@ -4054,57 +4070,57 @@ var xi = i(({ value: t, children: r, className: i, disabled: s = !1, asChild: c
|
|
|
4054
4070
|
"data-state": N ? "active" : "inactive",
|
|
4055
4071
|
"data-orientation": w,
|
|
4056
4072
|
"data-disabled": M ? "" : void 0,
|
|
4057
|
-
className:
|
|
4073
|
+
className: W,
|
|
4058
4074
|
onClick: (e) => {
|
|
4059
|
-
f?.(e), !e.defaultPrevented &&
|
|
4075
|
+
f?.(e), !e.defaultPrevented && G(e);
|
|
4060
4076
|
},
|
|
4061
4077
|
onKeyDown: (e) => {
|
|
4062
|
-
p?.(e), !e.defaultPrevented &&
|
|
4078
|
+
p?.(e), !e.defaultPrevented && ee(e);
|
|
4063
4079
|
},
|
|
4064
4080
|
children: [
|
|
4065
4081
|
z && !R && /* @__PURE__ */ g("span", {
|
|
4066
|
-
className:
|
|
4082
|
+
className: yi.icon,
|
|
4067
4083
|
"aria-hidden": "true",
|
|
4068
4084
|
children: l
|
|
4069
4085
|
}),
|
|
4070
|
-
I != null && (
|
|
4071
|
-
className:
|
|
4086
|
+
I != null && (H ? /* @__PURE__ */ _("span", {
|
|
4087
|
+
className: yi.body,
|
|
4072
4088
|
children: [/* @__PURE__ */ g("span", {
|
|
4073
|
-
className:
|
|
4089
|
+
className: yi.label,
|
|
4074
4090
|
children: I
|
|
4075
4091
|
}), d != null && /* @__PURE__ */ g("span", {
|
|
4076
|
-
className:
|
|
4092
|
+
className: yi.description,
|
|
4077
4093
|
children: d
|
|
4078
4094
|
})]
|
|
4079
|
-
}) :
|
|
4080
|
-
className:
|
|
4095
|
+
}) : U ? /* @__PURE__ */ g("span", {
|
|
4096
|
+
className: yi.label,
|
|
4081
4097
|
children: I
|
|
4082
4098
|
}) : I),
|
|
4083
4099
|
u != null && /* @__PURE__ */ g("span", {
|
|
4084
|
-
className:
|
|
4100
|
+
className: yi.badge,
|
|
4085
4101
|
children: u
|
|
4086
4102
|
})
|
|
4087
4103
|
]
|
|
4088
4104
|
}));
|
|
4089
4105
|
});
|
|
4090
|
-
|
|
4106
|
+
Si.displayName = "Tabs.Trigger";
|
|
4091
4107
|
// src/components/Tabs/Tabs.tsx
|
|
4092
|
-
var
|
|
4093
|
-
List:
|
|
4094
|
-
Trigger:
|
|
4095
|
-
Content:
|
|
4096
|
-
Indicator:
|
|
4097
|
-
Icon:
|
|
4098
|
-
Badge:
|
|
4108
|
+
var Ci = Object.assign(vi, {
|
|
4109
|
+
List: pi,
|
|
4110
|
+
Trigger: Si,
|
|
4111
|
+
Content: si,
|
|
4112
|
+
Indicator: fi,
|
|
4113
|
+
Icon: xi,
|
|
4114
|
+
Badge: bi
|
|
4099
4115
|
});
|
|
4100
|
-
|
|
4116
|
+
Ci.displayName = "Tabs";
|
|
4101
4117
|
// src/components/Tooltip/internal/composeEventHandlers.ts
|
|
4102
|
-
function
|
|
4118
|
+
function wi(e, t) {
|
|
4103
4119
|
return (n) => {
|
|
4104
4120
|
e?.(n), n.defaultPrevented || t?.(n);
|
|
4105
4121
|
};
|
|
4106
4122
|
}
|
|
4107
|
-
function
|
|
4123
|
+
function Ti(...e) {
|
|
4108
4124
|
return (t) => {
|
|
4109
4125
|
e.forEach((e) => {
|
|
4110
4126
|
e && (typeof e == "function" ? e(t) : e.current = t);
|
|
@@ -4112,18 +4128,18 @@ function wi(...e) {
|
|
|
4112
4128
|
};
|
|
4113
4129
|
}
|
|
4114
4130
|
// src/components/Tooltip/internal/TooltipContext.tsx
|
|
4115
|
-
var
|
|
4131
|
+
var Ei = r(null), Di = r({
|
|
4116
4132
|
delay: {
|
|
4117
4133
|
open: 300,
|
|
4118
4134
|
close: 100
|
|
4119
4135
|
},
|
|
4120
4136
|
skipDelay: 300
|
|
4121
|
-
}),
|
|
4137
|
+
}), Oi = Ei.Provider, ki = ({ children: e, delay: t = 700, skipDelay: n = 300 }) => {
|
|
4122
4138
|
let r = typeof t == "number" ? {
|
|
4123
4139
|
open: t,
|
|
4124
4140
|
close: 100
|
|
4125
4141
|
} : t;
|
|
4126
|
-
return /* @__PURE__ */ g(
|
|
4142
|
+
return /* @__PURE__ */ g(Di.Provider, {
|
|
4127
4143
|
value: {
|
|
4128
4144
|
delay: r,
|
|
4129
4145
|
skipDelay: n
|
|
@@ -4131,19 +4147,19 @@ var Ti = r(null), Ei = r({
|
|
|
4131
4147
|
children: e
|
|
4132
4148
|
});
|
|
4133
4149
|
};
|
|
4134
|
-
function
|
|
4135
|
-
let e = s(
|
|
4150
|
+
function Ai() {
|
|
4151
|
+
let e = s(Ei);
|
|
4136
4152
|
if (!e) throw Error("Tooltip compound components must be rendered inside Tooltip");
|
|
4137
4153
|
return e;
|
|
4138
4154
|
}
|
|
4139
|
-
function
|
|
4140
|
-
return s(
|
|
4155
|
+
function ji() {
|
|
4156
|
+
return s(Di);
|
|
4141
4157
|
}
|
|
4142
|
-
var
|
|
4158
|
+
var Mi = {
|
|
4143
4159
|
tooltip: "_tooltip_god78_1",
|
|
4144
4160
|
arrow: "_arrow_god78_25"
|
|
4145
|
-
},
|
|
4146
|
-
let s =
|
|
4161
|
+
}, Ni = i(({ children: e, forceMount: t = !1, withArrow: n = !1, className: r, style: i, ...a }, o) => {
|
|
4162
|
+
let s = Ai();
|
|
4147
4163
|
if (!t && !s.open) return null;
|
|
4148
4164
|
let c = s.getContentProps({
|
|
4149
4165
|
id: s.contentId,
|
|
@@ -4152,20 +4168,20 @@ var ji = {
|
|
|
4152
4168
|
});
|
|
4153
4169
|
return /* @__PURE__ */ _("div", {
|
|
4154
4170
|
...c,
|
|
4155
|
-
ref:
|
|
4156
|
-
className:
|
|
4171
|
+
ref: Ti(o, s.setContentRef),
|
|
4172
|
+
className: q(Mi.tooltip, r),
|
|
4157
4173
|
"data-placement": s.placement,
|
|
4158
4174
|
"data-state": s.open ? "open" : "closed",
|
|
4159
4175
|
style: {
|
|
4160
4176
|
...s.floatingStyles,
|
|
4161
4177
|
...i
|
|
4162
4178
|
},
|
|
4163
|
-
children: [e, n && /* @__PURE__ */ g(
|
|
4179
|
+
children: [e, n && /* @__PURE__ */ g(Pi, {})]
|
|
4164
4180
|
});
|
|
4165
4181
|
});
|
|
4166
|
-
|
|
4167
|
-
function
|
|
4168
|
-
let e =
|
|
4182
|
+
Ni.displayName = "Tooltip.Content";
|
|
4183
|
+
function Pi() {
|
|
4184
|
+
let e = Ai(), t = e.placement.split("-")[0], n = {
|
|
4169
4185
|
top: "bottom",
|
|
4170
4186
|
right: "left",
|
|
4171
4187
|
bottom: "top",
|
|
@@ -4173,7 +4189,7 @@ function Ni() {
|
|
|
4173
4189
|
}[t];
|
|
4174
4190
|
return /* @__PURE__ */ g("div", {
|
|
4175
4191
|
ref: e.arrowRef,
|
|
4176
|
-
className:
|
|
4192
|
+
className: Mi.arrow,
|
|
4177
4193
|
"data-side": t,
|
|
4178
4194
|
style: {
|
|
4179
4195
|
left: e.arrowX == null ? void 0 : `${e.arrowX}px`,
|
|
@@ -4183,8 +4199,8 @@ function Ni() {
|
|
|
4183
4199
|
});
|
|
4184
4200
|
}
|
|
4185
4201
|
// src/components/Tooltip/internal/useTooltipDelay.ts
|
|
4186
|
-
function
|
|
4187
|
-
let n =
|
|
4202
|
+
function Fi(e, t) {
|
|
4203
|
+
let n = ji();
|
|
4188
4204
|
return e == null ? n.delay : typeof e == "number" ? {
|
|
4189
4205
|
open: e,
|
|
4190
4206
|
close: n.delay.close
|
|
@@ -4194,25 +4210,25 @@ function Pi(e, t) {
|
|
|
4194
4210
|
};
|
|
4195
4211
|
}
|
|
4196
4212
|
// src/components/Tooltip/internal/useTooltipInteractions.ts
|
|
4197
|
-
function
|
|
4198
|
-
let i =
|
|
4213
|
+
function Ii({ context: e, delay: t, disabled: n, interactive: r }) {
|
|
4214
|
+
let i = ie(e, {
|
|
4199
4215
|
delay: t,
|
|
4200
4216
|
enabled: !n,
|
|
4201
4217
|
move: !1,
|
|
4202
4218
|
handleClose: r ? void 0 : null
|
|
4203
|
-
}), a =
|
|
4204
|
-
return
|
|
4219
|
+
}), a = re(e, { enabled: !n });
|
|
4220
|
+
return K([i, a]);
|
|
4205
4221
|
}
|
|
4206
4222
|
// src/components/Tooltip/internal/useTooltipPosition.ts
|
|
4207
|
-
function
|
|
4208
|
-
let o = f(null), s =
|
|
4223
|
+
function Li({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions: i, matchTriggerWidth: a }) {
|
|
4224
|
+
let o = f(null), s = pt({
|
|
4209
4225
|
open: e,
|
|
4210
4226
|
onOpenChange: t,
|
|
4211
4227
|
placement: n,
|
|
4212
4228
|
offset: r,
|
|
4213
4229
|
avoidCollisions: i,
|
|
4214
4230
|
matchTriggerWidth: a,
|
|
4215
|
-
middleware: [
|
|
4231
|
+
middleware: [H({ element: o })]
|
|
4216
4232
|
});
|
|
4217
4233
|
return {
|
|
4218
4234
|
...s,
|
|
@@ -4222,26 +4238,26 @@ function Ii({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions
|
|
|
4222
4238
|
};
|
|
4223
4239
|
}
|
|
4224
4240
|
// src/components/Tooltip/Root/TooltipRoot.tsx
|
|
4225
|
-
var
|
|
4226
|
-
let m = `${l()}-content`, h = f(null), _ = f(null), [v, y] =
|
|
4241
|
+
var Ri = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placement: i = "top", offset: a = 8, delay: o, skipDelay: s, disabled: c = !1, interactive: u = !1, avoidCollisions: d = !0, matchTriggerWidth: p = !1 }) => {
|
|
4242
|
+
let m = `${l()}-content`, h = f(null), _ = f(null), [v, y] = xt({
|
|
4227
4243
|
value: t,
|
|
4228
4244
|
defaultValue: n,
|
|
4229
4245
|
onChange: r
|
|
4230
4246
|
}), b = (e) => {
|
|
4231
4247
|
c || y(e);
|
|
4232
|
-
}, x =
|
|
4248
|
+
}, x = Li({
|
|
4233
4249
|
open: v,
|
|
4234
4250
|
onOpenChange: b,
|
|
4235
4251
|
placement: i,
|
|
4236
4252
|
offset: a,
|
|
4237
4253
|
avoidCollisions: d,
|
|
4238
4254
|
matchTriggerWidth: p
|
|
4239
|
-
}), S =
|
|
4255
|
+
}), S = Fi(o, s), C = Ii({
|
|
4240
4256
|
context: x.context,
|
|
4241
4257
|
delay: S,
|
|
4242
4258
|
disabled: c,
|
|
4243
4259
|
interactive: u
|
|
4244
|
-
}), w =
|
|
4260
|
+
}), w = ft({
|
|
4245
4261
|
active: v,
|
|
4246
4262
|
id: m,
|
|
4247
4263
|
zIndexLevel: "tooltip",
|
|
@@ -4251,7 +4267,7 @@ var Li = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placemen
|
|
|
4251
4267
|
closeOnOutsidePress: !u,
|
|
4252
4268
|
requestClose: () => b(!1)
|
|
4253
4269
|
});
|
|
4254
|
-
return /* @__PURE__ */ g(
|
|
4270
|
+
return /* @__PURE__ */ g(Oi, {
|
|
4255
4271
|
value: {
|
|
4256
4272
|
contentId: m,
|
|
4257
4273
|
open: v,
|
|
@@ -4267,33 +4283,33 @@ var Li = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placemen
|
|
|
4267
4283
|
zIndex: w.zIndex
|
|
4268
4284
|
},
|
|
4269
4285
|
setOpen: b,
|
|
4270
|
-
setTriggerRef:
|
|
4271
|
-
setContentRef:
|
|
4286
|
+
setTriggerRef: Ti(_, x.setRef),
|
|
4287
|
+
setContentRef: Ti(h, x.setFloatingRef),
|
|
4272
4288
|
getTriggerProps: C.getReferenceProps,
|
|
4273
4289
|
getContentProps: C.getFloatingProps
|
|
4274
4290
|
},
|
|
4275
4291
|
children: e
|
|
4276
4292
|
});
|
|
4277
4293
|
};
|
|
4278
|
-
|
|
4294
|
+
Ri.displayName = "Tooltip.Root";
|
|
4279
4295
|
// src/components/Tooltip/Trigger/TooltipTrigger.tsx
|
|
4280
|
-
var
|
|
4281
|
-
let s =
|
|
4296
|
+
var zi = ({ asChild: e = !1, children: t, disabled: r = !1, className: i, ...o }) => {
|
|
4297
|
+
let s = Ai(), c = e && a(t) ? t : void 0, l = s.disabled || r || c?.props.disabled, u = s.getTriggerProps({
|
|
4282
4298
|
...o,
|
|
4283
4299
|
"aria-describedby": s.open ? s.contentId : void 0,
|
|
4284
4300
|
"aria-disabled": l || void 0,
|
|
4285
4301
|
"data-state": s.open ? "open" : "closed"
|
|
4286
4302
|
}), d = {
|
|
4287
4303
|
...u,
|
|
4288
|
-
ref: c ?
|
|
4289
|
-
className:
|
|
4304
|
+
ref: c ? Ti(c.props.ref, s.setTriggerRef) : s.setTriggerRef,
|
|
4305
|
+
className: q(c?.props.className, i),
|
|
4290
4306
|
disabled: l || void 0,
|
|
4291
|
-
onMouseEnter:
|
|
4292
|
-
onMouseLeave:
|
|
4293
|
-
onPointerEnter:
|
|
4294
|
-
onPointerLeave:
|
|
4295
|
-
onFocus:
|
|
4296
|
-
onBlur:
|
|
4307
|
+
onMouseEnter: wi(c?.props.onMouseEnter, u.onMouseEnter),
|
|
4308
|
+
onMouseLeave: wi(c?.props.onMouseLeave, u.onMouseLeave),
|
|
4309
|
+
onPointerEnter: wi(c?.props.onPointerEnter, u.onPointerEnter),
|
|
4310
|
+
onPointerLeave: wi(c?.props.onPointerLeave, u.onPointerLeave),
|
|
4311
|
+
onFocus: wi(c?.props.onFocus, u.onFocus),
|
|
4312
|
+
onBlur: wi(c?.props.onBlur, u.onBlur)
|
|
4297
4313
|
};
|
|
4298
4314
|
return c ? n(c, d) : /* @__PURE__ */ g("button", {
|
|
4299
4315
|
type: "button",
|
|
@@ -4301,15 +4317,15 @@ var Ri = ({ asChild: e = !1, children: t, disabled: r = !1, className: i, ...o }
|
|
|
4301
4317
|
children: t
|
|
4302
4318
|
});
|
|
4303
4319
|
};
|
|
4304
|
-
|
|
4320
|
+
zi.displayName = "Tooltip.Trigger";
|
|
4305
4321
|
// src/components/Tooltip/Tooltip.tsx
|
|
4306
|
-
var
|
|
4307
|
-
Trigger:
|
|
4308
|
-
Content:
|
|
4309
|
-
Provider:
|
|
4322
|
+
var Bi = Object.assign(Ri, {
|
|
4323
|
+
Trigger: zi,
|
|
4324
|
+
Content: Ni,
|
|
4325
|
+
Provider: ki
|
|
4310
4326
|
});
|
|
4311
|
-
|
|
4312
|
-
var
|
|
4327
|
+
Bi.displayName = "Tooltip";
|
|
4328
|
+
var Vi = {
|
|
4313
4329
|
button: "_button_1d6bh_1",
|
|
4314
4330
|
solid: "_solid_1d6bh_26",
|
|
4315
4331
|
primary: "_primary_1d6bh_26",
|
|
@@ -4340,54 +4356,54 @@ var Bi = {
|
|
|
4340
4356
|
"button-spin": "_button-spin_1d6bh_1",
|
|
4341
4357
|
badge: "_badge_1d6bh_870",
|
|
4342
4358
|
shortcut: "_shortcut_1d6bh_884"
|
|
4343
|
-
},
|
|
4344
|
-
let L = S && a(e) ? e : void 0, R = L ? L.props.children : e, z = x || !R && !!(d || f),
|
|
4345
|
-
"--button-height": `${
|
|
4346
|
-
"--button-font-size": `${
|
|
4347
|
-
"--button-line-height": `${
|
|
4348
|
-
"--icon-size": `${
|
|
4349
|
-
},
|
|
4350
|
-
[
|
|
4351
|
-
[
|
|
4352
|
-
[
|
|
4353
|
-
[
|
|
4359
|
+
}, Hi = i(({ children: e, color: t = "primary", appearance: r = "solid", size: i = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: p, badge: m, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, style: w, onClick: T, "aria-label": E, "aria-labelledby": D, href: O, target: k, rel: A, download: j, id: M, role: N, tabIndex: P, ...F }, I) => {
|
|
4360
|
+
let L = S && a(e) ? e : void 0, R = L ? L.props.children : e, z = x || !R && !!(d || f), B = !!(E || D || L?.props["aria-label"] || L?.props["aria-labelledby"]), V = c || l, H = r === "bare", U = ae[i], W = {
|
|
4361
|
+
"--button-height": `${U.height}px`,
|
|
4362
|
+
"--button-font-size": `${U.fontSize}px`,
|
|
4363
|
+
"--button-line-height": `${U.lineHeight}px`,
|
|
4364
|
+
"--icon-size": `${U.iconSize}px`
|
|
4365
|
+
}, G = l && u ? u : R, ee = u && R && !z && (typeof R == "string" || typeof R == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? R : u) : void 0, te = k === "_blank" && !A ? "noreferrer noopener" : A, ne = q(H ? Vi.bare : Vi.button, H ? null : Vi[t], H ? null : Vi[r], H ? null : Vi[i], H ? null : Vi[o], C, {
|
|
4366
|
+
[Vi.disabled]: V,
|
|
4367
|
+
[Vi.loading]: l,
|
|
4368
|
+
[Vi.fullWidth]: b,
|
|
4369
|
+
[Vi.iconOnly]: z
|
|
4354
4370
|
});
|
|
4355
|
-
|
|
4356
|
-
let
|
|
4371
|
+
Fe(!S || !O, "Button: pass href to the child element when using asChild."), Fe(!S || !!L, "Button: asChild requires a single valid React element child."), Fe(!z || B, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
|
|
4372
|
+
let re = (e) => {
|
|
4357
4373
|
e.preventDefault(), e.stopPropagation();
|
|
4358
|
-
},
|
|
4359
|
-
|
|
4360
|
-
},
|
|
4374
|
+
}, ie = (e) => {
|
|
4375
|
+
V ? re(e) : (L?.props.onClick?.(e), e.defaultPrevented || T?.(e));
|
|
4376
|
+
}, K = /* @__PURE__ */ _(h, { children: [
|
|
4361
4377
|
l && (p ? /* @__PURE__ */ g("span", {
|
|
4362
|
-
className:
|
|
4378
|
+
className: Vi.icon,
|
|
4363
4379
|
"aria-hidden": "true",
|
|
4364
4380
|
children: p
|
|
4365
4381
|
}) : /* @__PURE__ */ g("span", {
|
|
4366
|
-
className:
|
|
4382
|
+
className: Vi.spinner,
|
|
4367
4383
|
"aria-hidden": "true"
|
|
4368
4384
|
})),
|
|
4369
4385
|
!l && d && /* @__PURE__ */ g("span", {
|
|
4370
|
-
className:
|
|
4386
|
+
className: q(Vi.icon, Vi.iconStart),
|
|
4371
4387
|
children: d
|
|
4372
4388
|
}),
|
|
4373
|
-
|
|
4374
|
-
className:
|
|
4375
|
-
"data-measure":
|
|
4389
|
+
G && !z && (H ? G : /* @__PURE__ */ g("span", {
|
|
4390
|
+
className: Vi.label,
|
|
4391
|
+
"data-measure": ee,
|
|
4376
4392
|
children: /* @__PURE__ */ g("span", {
|
|
4377
|
-
className:
|
|
4378
|
-
children:
|
|
4393
|
+
className: Vi.labelText,
|
|
4394
|
+
children: G
|
|
4379
4395
|
})
|
|
4380
4396
|
})),
|
|
4381
|
-
m && !z && (
|
|
4382
|
-
className:
|
|
4397
|
+
m && !z && (H ? m : /* @__PURE__ */ g("span", {
|
|
4398
|
+
className: Vi.badge,
|
|
4383
4399
|
children: m
|
|
4384
4400
|
})),
|
|
4385
|
-
v && !z && (
|
|
4386
|
-
className:
|
|
4401
|
+
v && !z && (H ? v : /* @__PURE__ */ g("span", {
|
|
4402
|
+
className: Vi.shortcut,
|
|
4387
4403
|
children: v
|
|
4388
4404
|
})),
|
|
4389
4405
|
!l && f && /* @__PURE__ */ g("span", {
|
|
4390
|
-
className:
|
|
4406
|
+
className: q(Vi.icon, Vi.iconEnd),
|
|
4391
4407
|
children: f
|
|
4392
4408
|
})
|
|
4393
4409
|
] });
|
|
@@ -4395,41 +4411,41 @@ var Bi = {
|
|
|
4395
4411
|
...F,
|
|
4396
4412
|
ref: I,
|
|
4397
4413
|
style: {
|
|
4398
|
-
...
|
|
4414
|
+
...W,
|
|
4399
4415
|
...L.props.style,
|
|
4400
4416
|
...w
|
|
4401
4417
|
},
|
|
4402
4418
|
"aria-busy": l || void 0,
|
|
4403
|
-
"aria-disabled":
|
|
4419
|
+
"aria-disabled": V || void 0,
|
|
4404
4420
|
"aria-label": E || L.props["aria-label"] || void 0,
|
|
4405
4421
|
"aria-labelledby": D || L.props["aria-labelledby"] || void 0,
|
|
4406
|
-
className:
|
|
4407
|
-
href:
|
|
4408
|
-
onClick:
|
|
4409
|
-
tabIndex:
|
|
4422
|
+
className: q(L.props.className, ne),
|
|
4423
|
+
href: V ? void 0 : L.props.href,
|
|
4424
|
+
onClick: ie,
|
|
4425
|
+
tabIndex: V ? -1 : L.props.tabIndex,
|
|
4410
4426
|
title: y || L.props.title,
|
|
4411
|
-
children:
|
|
4427
|
+
children: K
|
|
4412
4428
|
}) : O ? /* @__PURE__ */ g("a", {
|
|
4413
4429
|
ref: I,
|
|
4414
|
-
href:
|
|
4430
|
+
href: V ? void 0 : O,
|
|
4415
4431
|
id: M,
|
|
4416
4432
|
role: N,
|
|
4417
|
-
tabIndex:
|
|
4433
|
+
tabIndex: V ? -1 : P,
|
|
4418
4434
|
target: k,
|
|
4419
|
-
rel:
|
|
4435
|
+
rel: te,
|
|
4420
4436
|
download: j,
|
|
4421
|
-
onClick:
|
|
4422
|
-
"aria-disabled":
|
|
4437
|
+
onClick: V ? re : T,
|
|
4438
|
+
"aria-disabled": V || void 0,
|
|
4423
4439
|
"aria-label": E || void 0,
|
|
4424
4440
|
"aria-labelledby": D || void 0,
|
|
4425
4441
|
"aria-busy": l || void 0,
|
|
4426
|
-
className:
|
|
4442
|
+
className: ne,
|
|
4427
4443
|
title: y,
|
|
4428
4444
|
style: {
|
|
4429
|
-
...
|
|
4445
|
+
...W,
|
|
4430
4446
|
...w
|
|
4431
4447
|
},
|
|
4432
|
-
children:
|
|
4448
|
+
children: K
|
|
4433
4449
|
}) : /* @__PURE__ */ g("button", {
|
|
4434
4450
|
...F,
|
|
4435
4451
|
ref: I,
|
|
@@ -4437,21 +4453,21 @@ var Bi = {
|
|
|
4437
4453
|
role: N,
|
|
4438
4454
|
tabIndex: P,
|
|
4439
4455
|
type: s,
|
|
4440
|
-
disabled:
|
|
4441
|
-
onClick:
|
|
4456
|
+
disabled: V,
|
|
4457
|
+
onClick: V ? void 0 : T,
|
|
4442
4458
|
"aria-label": E || void 0,
|
|
4443
4459
|
"aria-labelledby": D || void 0,
|
|
4444
4460
|
"aria-busy": l || void 0,
|
|
4445
|
-
className:
|
|
4461
|
+
className: ne,
|
|
4446
4462
|
title: y,
|
|
4447
4463
|
style: {
|
|
4448
|
-
...
|
|
4464
|
+
...W,
|
|
4449
4465
|
...w
|
|
4450
4466
|
},
|
|
4451
|
-
children:
|
|
4467
|
+
children: K
|
|
4452
4468
|
});
|
|
4453
4469
|
});
|
|
4454
|
-
|
|
4470
|
+
Hi.displayName = "Button";
|
|
4455
4471
|
var Q = {
|
|
4456
4472
|
wrapper: "_wrapper_jq9wv_1",
|
|
4457
4473
|
colorPrimary: "_colorPrimary_jq9wv_36",
|
|
@@ -4487,30 +4503,30 @@ var Q = {
|
|
|
4487
4503
|
"checkbox-checkmark-in": "_checkbox-checkmark-in_jq9wv_1",
|
|
4488
4504
|
"checkbox-indeterminate-in": "_checkbox-indeterminate-in_jq9wv_1",
|
|
4489
4505
|
disabled: "_disabled_jq9wv_370"
|
|
4490
|
-
},
|
|
4506
|
+
}, Ui = {
|
|
4491
4507
|
sm: Q.labelSm,
|
|
4492
4508
|
md: Q.labelMd,
|
|
4493
4509
|
lg: Q.labelLg
|
|
4494
|
-
},
|
|
4510
|
+
}, Wi = {
|
|
4495
4511
|
sm: Q.wrapperSm,
|
|
4496
4512
|
md: Q.wrapperMd,
|
|
4497
4513
|
lg: Q.wrapperLg
|
|
4498
|
-
},
|
|
4514
|
+
}, Gi = {
|
|
4499
4515
|
sm: Q.containerSm,
|
|
4500
4516
|
md: Q.containerMd,
|
|
4501
4517
|
lg: Q.containerLg
|
|
4502
|
-
},
|
|
4518
|
+
}, Ki = {
|
|
4503
4519
|
primary: Q.colorPrimary,
|
|
4504
4520
|
neutral: Q.colorNeutral,
|
|
4505
4521
|
success: Q.colorSuccess,
|
|
4506
4522
|
warning: Q.colorWarning,
|
|
4507
4523
|
danger: Q.colorDanger
|
|
4508
|
-
},
|
|
4524
|
+
}, qi = i(({ id: e, label: t, description: n, icon: r, indeterminateIcon: i, checked: a, size: s = "md", color: u = "primary", labelPosition: d = "end", defaultChecked: p = !1, disabled: m = !1, required: h = !1, indeterminate: y = !1, className: b, wrapperClassName: x, onCheckedChange: S, error: C, "aria-label": w, "aria-labelledby": T, "aria-describedby": E, ...D }, O) => {
|
|
4509
4525
|
let k = l(), A = e ?? k, j = f(null), M = !!C, N = n ? `${A}-description` : void 0, P = M ? `${A}-error` : void 0, F = [
|
|
4510
4526
|
E,
|
|
4511
4527
|
N,
|
|
4512
4528
|
P
|
|
4513
|
-
].filter(Boolean).join(" "), [I, L] =
|
|
4529
|
+
].filter(Boolean).join(" "), [I, L] = xt({
|
|
4514
4530
|
value: a,
|
|
4515
4531
|
defaultValue: p,
|
|
4516
4532
|
onChange: S
|
|
@@ -4523,12 +4539,12 @@ var Q = {
|
|
|
4523
4539
|
let z = (e) => {
|
|
4524
4540
|
L(e.target.checked);
|
|
4525
4541
|
};
|
|
4526
|
-
return
|
|
4527
|
-
className:
|
|
4542
|
+
return Fe(!!(t || w || T), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ _("div", {
|
|
4543
|
+
className: q(Q.container, Gi[s], d === "start" && Q.containerLabelStart, b),
|
|
4528
4544
|
children: [
|
|
4529
4545
|
/* @__PURE__ */ _("label", {
|
|
4530
4546
|
htmlFor: A,
|
|
4531
|
-
className:
|
|
4547
|
+
className: q(Q.wrapper, Wi[s], Ki[u], d === "start" && Q.labelStart, !t && Q.iconOnly, m && Q.disabled, x),
|
|
4532
4548
|
children: [
|
|
4533
4549
|
/* @__PURE__ */ g("input", {
|
|
4534
4550
|
...D,
|
|
@@ -4547,10 +4563,10 @@ var Q = {
|
|
|
4547
4563
|
"aria-describedby": F || void 0
|
|
4548
4564
|
}),
|
|
4549
4565
|
/* @__PURE__ */ g("span", {
|
|
4550
|
-
className:
|
|
4566
|
+
className: q(Q.customCheckbox, M && Q.error, y && Q.indeterminate),
|
|
4551
4567
|
"aria-hidden": "true",
|
|
4552
4568
|
children: y ? /* @__PURE__ */ g("span", {
|
|
4553
|
-
className:
|
|
4569
|
+
className: q(Q.indeterminateMark, i && Q.customMark),
|
|
4554
4570
|
children: i
|
|
4555
4571
|
}) : I && /* @__PURE__ */ g("span", {
|
|
4556
4572
|
className: Q.checkmark,
|
|
@@ -4558,7 +4574,7 @@ var Q = {
|
|
|
4558
4574
|
})
|
|
4559
4575
|
}),
|
|
4560
4576
|
t && /* @__PURE__ */ _("span", {
|
|
4561
|
-
className:
|
|
4577
|
+
className: q(Q.label, Ui[s]),
|
|
4562
4578
|
children: [t, h && /* @__PURE__ */ g("span", {
|
|
4563
4579
|
className: Q.requiredMark,
|
|
4564
4580
|
"aria-hidden": "true",
|
|
@@ -4580,7 +4596,7 @@ var Q = {
|
|
|
4580
4596
|
]
|
|
4581
4597
|
});
|
|
4582
4598
|
});
|
|
4583
|
-
|
|
4599
|
+
qi.displayName = "Checkbox";
|
|
4584
4600
|
var $ = {
|
|
4585
4601
|
inputGroup: "_inputGroup_1nr0h_1",
|
|
4586
4602
|
primary: "_primary_1nr0h_29",
|
|
@@ -4623,7 +4639,7 @@ var $ = {
|
|
|
4623
4639
|
toneMuted: "_toneMuted_1nr0h_881",
|
|
4624
4640
|
toneInverse: "_toneInverse_1nr0h_885",
|
|
4625
4641
|
bare: "_bare_1nr0h_889"
|
|
4626
|
-
},
|
|
4642
|
+
}, Ji = {
|
|
4627
4643
|
default: $.toneDefault,
|
|
4628
4644
|
primary: $.tonePrimary,
|
|
4629
4645
|
secondary: $.toneSecondary,
|
|
@@ -4631,7 +4647,7 @@ var $ = {
|
|
|
4631
4647
|
danger: $.toneDanger,
|
|
4632
4648
|
muted: $.toneMuted,
|
|
4633
4649
|
inverse: $.toneInverse
|
|
4634
|
-
},
|
|
4650
|
+
}, Yi = (e = "text", t) => {
|
|
4635
4651
|
if (t) return t;
|
|
4636
4652
|
switch (e) {
|
|
4637
4653
|
case "email": return "email";
|
|
@@ -4641,7 +4657,7 @@ var $ = {
|
|
|
4641
4657
|
case "search": return "off";
|
|
4642
4658
|
default: return;
|
|
4643
4659
|
}
|
|
4644
|
-
},
|
|
4660
|
+
}, Xi = (e, t) => {
|
|
4645
4661
|
let n = e.replace(/\D/g, ""), r = 0, i = "";
|
|
4646
4662
|
for (let e of t) if (e === "#") {
|
|
4647
4663
|
let e = n[r];
|
|
@@ -4649,40 +4665,40 @@ var $ = {
|
|
|
4649
4665
|
i += e, r += 1;
|
|
4650
4666
|
} else r < n.length && (i += e);
|
|
4651
4667
|
return i;
|
|
4652
|
-
},
|
|
4653
|
-
let
|
|
4654
|
-
"--input-height": `${
|
|
4655
|
-
"--input-font-size": `${
|
|
4656
|
-
"--input-line-height": `${
|
|
4657
|
-
"--input-icon-size": `${
|
|
4658
|
-
},
|
|
4659
|
-
|
|
4660
|
-
!
|
|
4668
|
+
}, Zi = (e, t) => t ? typeof t == "function" ? t(e) : Xi(e, t) : e, Qi = i(({ id: e, label: t, name: n, description: r, placeholder: i, value: a, defaultValue: s, type: c = "text", size: u, color: d = "primary", variant: m = "outline", error: v, invalid: y = !1, disabled: b = !1, required: T = !1, loading: E = !1, className: D, style: O, wrapperClassName: k, autoComplete: A, readOnly: j = !1, clearable: M = !1, onClear: N, onValueChange: P, revealPassword: F = !1, showCounter: I = !1, startIcon: L, endIcon: R, startAddon: z, endAddon: B, prefix: V, suffix: H, clearIcon: U, mask: W, format: G, parse: ee, startIconTone: te = "default", endIconTone: ne = "default", clearIconTone: re = "danger", autoFocus: ie, maxLength: K, onMouseEnter: oe, onMouseLeave: se, "aria-describedby": ce, "aria-invalid": le, "aria-labelledby": ue, ...de }, fe) => {
|
|
4669
|
+
let pe = l(), me = Br(), he = !!(t || r || v), ge = e ?? (he ? void 0 : me?.controlId) ?? pe, _e = f(null), [J, ve] = p(!1), [ye, be] = p(s ?? ""), xe = a !== void 0, Se = String((xe ? a : ye) ?? ""), Ce = G ? G(Se) : Se, we = Se.length > 0, Te = u ?? me?.size ?? "md", Ee = ae[Te], De = {
|
|
4670
|
+
"--input-height": `${Ee.height}px`,
|
|
4671
|
+
"--input-font-size": `${Ee.fontSize}px`,
|
|
4672
|
+
"--input-line-height": `${Ee.lineHeight}px`,
|
|
4673
|
+
"--input-icon-size": `${Ee.iconSize}px`
|
|
4674
|
+
}, Oe = y || !!v || !he && !!me?.invalid, ke = b || !he && !!me?.disabled, Ae = T || !he && !!me?.required, je = j || E, Me = c === "password", Ne = Me && F && J ? "text" : c, Pe = L ?? (c === "search" ? /* @__PURE__ */ g(w, {}) : null), Y = R, Fe = Yi(c, A), X = E && !ke, Ie = M && we && !ke && !je && !X, Le = F && Me && !ke && !X && !Ie, Re = !X && !Ie && !Le && !!Y, ze = !!(I && K), Be = r ? `${ge}-description` : void 0, Ve = v ? `${ge}-error` : void 0, He = ze ? `${ge}-counter` : void 0, Ue = [
|
|
4675
|
+
ce,
|
|
4676
|
+
!he && !ce ? me?.ariaDescribedBy : void 0,
|
|
4661
4677
|
Be,
|
|
4662
4678
|
Ve,
|
|
4663
4679
|
He
|
|
4664
|
-
].filter(Boolean).join(" "), We =
|
|
4665
|
-
|
|
4666
|
-
}, [
|
|
4667
|
-
let t =
|
|
4668
|
-
|
|
4680
|
+
].filter(Boolean).join(" "), We = U ?? /* @__PURE__ */ g(x, { "aria-hidden": "true" }), Ge = !!(Pe || V), Ke = !!(Y || H || Ie || Le || X), qe = !!(Pe && V), Je = !!(Y && H), Ye = !!(z || B), Xe = o((e) => {
|
|
4681
|
+
_e.current = e, typeof fe == "function" ? fe(e) : fe && (fe.current = e);
|
|
4682
|
+
}, [fe]), Ze = o((e) => {
|
|
4683
|
+
let t = Zi(ee ? ee(e.target.value) : e.target.value, W);
|
|
4684
|
+
xe || be(t), P?.(t);
|
|
4669
4685
|
}, [
|
|
4670
|
-
|
|
4671
|
-
|
|
4686
|
+
xe,
|
|
4687
|
+
W,
|
|
4672
4688
|
P,
|
|
4673
|
-
|
|
4689
|
+
ee
|
|
4674
4690
|
]), Qe = o(() => {
|
|
4675
|
-
|
|
4691
|
+
xe || be(""), P?.(""), N?.(), _e.current?.focus();
|
|
4676
4692
|
}, [
|
|
4677
|
-
|
|
4693
|
+
xe,
|
|
4678
4694
|
N,
|
|
4679
4695
|
P
|
|
4680
4696
|
]), $e = /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
|
|
4681
|
-
className:
|
|
4697
|
+
className: q($.inputGroup, $[m], $[d], {
|
|
4682
4698
|
[$.hasAddons]: Ye,
|
|
4683
|
-
[$.isDisabled]:
|
|
4684
|
-
[$.isInvalid]:
|
|
4685
|
-
[$.isLoading]:
|
|
4699
|
+
[$.isDisabled]: ke,
|
|
4700
|
+
[$.isInvalid]: Oe,
|
|
4701
|
+
[$.isLoading]: X
|
|
4686
4702
|
}),
|
|
4687
4703
|
children: [
|
|
4688
4704
|
z && /* @__PURE__ */ g("span", {
|
|
@@ -4690,57 +4706,57 @@ var $ = {
|
|
|
4690
4706
|
children: z
|
|
4691
4707
|
}),
|
|
4692
4708
|
/* @__PURE__ */ _("div", {
|
|
4693
|
-
className:
|
|
4709
|
+
className: q($.inputWrapper, {
|
|
4694
4710
|
[$.hasLeftAdornment]: Ge,
|
|
4695
4711
|
[$.hasRightAdornment]: Ke,
|
|
4696
4712
|
[$.hasStartIconAndPrefix]: qe,
|
|
4697
4713
|
[$.hasEndIconAndSuffix]: Je
|
|
4698
4714
|
}),
|
|
4699
4715
|
children: [
|
|
4700
|
-
|
|
4716
|
+
Pe && /* @__PURE__ */ g("span", {
|
|
4701
4717
|
"aria-hidden": "true",
|
|
4702
|
-
className:
|
|
4703
|
-
children:
|
|
4718
|
+
className: q($.startAdornment, Ji[te]),
|
|
4719
|
+
children: Pe
|
|
4704
4720
|
}),
|
|
4705
|
-
|
|
4721
|
+
V && /* @__PURE__ */ g("span", {
|
|
4706
4722
|
className: $.prefix,
|
|
4707
|
-
children:
|
|
4723
|
+
children: V
|
|
4708
4724
|
}),
|
|
4709
4725
|
/* @__PURE__ */ g("input", {
|
|
4710
|
-
...
|
|
4726
|
+
...de,
|
|
4711
4727
|
ref: Xe,
|
|
4712
|
-
id:
|
|
4728
|
+
id: ge,
|
|
4713
4729
|
name: n,
|
|
4714
|
-
type:
|
|
4715
|
-
autoComplete:
|
|
4716
|
-
className:
|
|
4730
|
+
type: Ne,
|
|
4731
|
+
autoComplete: Fe,
|
|
4732
|
+
className: q($.input, $[Te], { [$.error]: Oe }, D),
|
|
4717
4733
|
style: {
|
|
4718
|
-
...
|
|
4734
|
+
...De,
|
|
4719
4735
|
...O
|
|
4720
4736
|
},
|
|
4721
|
-
value:
|
|
4737
|
+
value: Ce,
|
|
4722
4738
|
onChange: Ze,
|
|
4723
4739
|
placeholder: i,
|
|
4724
|
-
disabled:
|
|
4725
|
-
readOnly:
|
|
4726
|
-
required:
|
|
4727
|
-
autoFocus:
|
|
4728
|
-
maxLength:
|
|
4729
|
-
"aria-invalid":
|
|
4730
|
-
"aria-labelledby":
|
|
4740
|
+
disabled: ke,
|
|
4741
|
+
readOnly: je,
|
|
4742
|
+
required: Ae,
|
|
4743
|
+
autoFocus: ie,
|
|
4744
|
+
maxLength: K,
|
|
4745
|
+
"aria-invalid": Oe ? !0 : le,
|
|
4746
|
+
"aria-labelledby": ue ?? (he ? void 0 : me?.ariaLabelledBy),
|
|
4731
4747
|
"aria-describedby": Ue || void 0,
|
|
4732
4748
|
"aria-busy": E || void 0,
|
|
4733
|
-
onMouseEnter:
|
|
4734
|
-
onMouseLeave:
|
|
4749
|
+
onMouseEnter: oe,
|
|
4750
|
+
onMouseLeave: se
|
|
4735
4751
|
}),
|
|
4736
|
-
|
|
4752
|
+
H && /* @__PURE__ */ g("span", {
|
|
4737
4753
|
className: $.suffix,
|
|
4738
|
-
children:
|
|
4754
|
+
children: H
|
|
4739
4755
|
}),
|
|
4740
4756
|
/* @__PURE__ */ _("div", {
|
|
4741
4757
|
className: $.endSlot,
|
|
4742
4758
|
children: [
|
|
4743
|
-
|
|
4759
|
+
X && /* @__PURE__ */ g("span", {
|
|
4744
4760
|
className: $.spinner,
|
|
4745
4761
|
"aria-hidden": "true",
|
|
4746
4762
|
"data-testid": "input-spinner"
|
|
@@ -4748,64 +4764,64 @@ var $ = {
|
|
|
4748
4764
|
Le && /* @__PURE__ */ g("button", {
|
|
4749
4765
|
type: "button",
|
|
4750
4766
|
className: $.iconButton,
|
|
4751
|
-
onClick: () =>
|
|
4752
|
-
"aria-label":
|
|
4753
|
-
children: g(
|
|
4767
|
+
onClick: () => ve((e) => !e),
|
|
4768
|
+
"aria-label": J ? "Hide password" : "Show password",
|
|
4769
|
+
children: g(J ? C : S, {
|
|
4754
4770
|
size: 18,
|
|
4755
4771
|
"aria-hidden": "true"
|
|
4756
4772
|
})
|
|
4757
4773
|
}),
|
|
4758
|
-
|
|
4774
|
+
Ie && /* @__PURE__ */ g("button", {
|
|
4759
4775
|
type: "button",
|
|
4760
|
-
className:
|
|
4776
|
+
className: q($.clearButton, Ji[re]),
|
|
4761
4777
|
onClick: Qe,
|
|
4762
4778
|
"aria-label": "Clear input",
|
|
4763
4779
|
children: We
|
|
4764
4780
|
}),
|
|
4765
|
-
Re &&
|
|
4781
|
+
Re && Y && /* @__PURE__ */ g("span", {
|
|
4766
4782
|
"aria-hidden": "true",
|
|
4767
|
-
className:
|
|
4768
|
-
children:
|
|
4783
|
+
className: q($.endAdornment, Ji[ne]),
|
|
4784
|
+
children: Y
|
|
4769
4785
|
})
|
|
4770
4786
|
]
|
|
4771
4787
|
})
|
|
4772
4788
|
]
|
|
4773
4789
|
}),
|
|
4774
|
-
|
|
4790
|
+
B && /* @__PURE__ */ g("span", {
|
|
4775
4791
|
className: $.addon,
|
|
4776
|
-
children:
|
|
4792
|
+
children: B
|
|
4777
4793
|
})
|
|
4778
4794
|
]
|
|
4779
4795
|
}), ze && /* @__PURE__ */ _("div", {
|
|
4780
4796
|
id: He,
|
|
4781
4797
|
className: $.counter,
|
|
4782
4798
|
children: [
|
|
4783
|
-
|
|
4799
|
+
Se.length,
|
|
4784
4800
|
" / ",
|
|
4785
|
-
|
|
4801
|
+
K
|
|
4786
4802
|
]
|
|
4787
4803
|
})] });
|
|
4788
|
-
return !
|
|
4789
|
-
id:
|
|
4804
|
+
return !he && me ? $e : /* @__PURE__ */ g(Xr, {
|
|
4805
|
+
id: ge,
|
|
4790
4806
|
label: t,
|
|
4791
4807
|
description: r,
|
|
4792
4808
|
error: v,
|
|
4793
|
-
required:
|
|
4794
|
-
disabled:
|
|
4795
|
-
invalid:
|
|
4796
|
-
size:
|
|
4809
|
+
required: Ae,
|
|
4810
|
+
disabled: ke,
|
|
4811
|
+
invalid: Oe,
|
|
4812
|
+
size: Te,
|
|
4797
4813
|
className: k,
|
|
4798
4814
|
bindControl: !1,
|
|
4799
4815
|
children: $e
|
|
4800
4816
|
});
|
|
4801
4817
|
});
|
|
4802
|
-
|
|
4803
|
-
var
|
|
4818
|
+
Qi.displayName = "Input";
|
|
4819
|
+
var $i = {
|
|
4804
4820
|
root: "_root_tczcc_1",
|
|
4805
4821
|
thumb: "_thumb_tczcc_54"
|
|
4806
4822
|
};
|
|
4807
4823
|
// src/primitives/Switch/Switch.tsx
|
|
4808
|
-
function
|
|
4824
|
+
function ea({ accessibilityLabel: e = "Switch", checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, invalid: a = !1, onCheckedChange: o }) {
|
|
4809
4825
|
let [s, c] = p(n), l = t !== void 0, u = l ? t : s;
|
|
4810
4826
|
return /* @__PURE__ */ g("button", {
|
|
4811
4827
|
type: "button",
|
|
@@ -4816,24 +4832,24 @@ function $i({ accessibilityLabel: e = "Switch", checked: t, defaultChecked: n =
|
|
|
4816
4832
|
"aria-required": i || void 0,
|
|
4817
4833
|
"aria-invalid": a || void 0,
|
|
4818
4834
|
"data-state": u ? "checked" : "unchecked",
|
|
4819
|
-
className:
|
|
4835
|
+
className: $i.root,
|
|
4820
4836
|
onClick: () => {
|
|
4821
4837
|
let e = !u;
|
|
4822
4838
|
l || c(e), o?.(e);
|
|
4823
4839
|
},
|
|
4824
4840
|
children: /* @__PURE__ */ g("span", {
|
|
4825
|
-
className:
|
|
4841
|
+
className: $i.thumb,
|
|
4826
4842
|
"aria-hidden": "true"
|
|
4827
4843
|
})
|
|
4828
4844
|
});
|
|
4829
4845
|
}
|
|
4830
|
-
var
|
|
4846
|
+
var ta = {
|
|
4831
4847
|
textarea: "_textarea_gl2my_1",
|
|
4832
4848
|
sm: "_sm_gl2my_58",
|
|
4833
4849
|
md: "_md_gl2my_62",
|
|
4834
4850
|
lg: "_lg_gl2my_66"
|
|
4835
|
-
},
|
|
4836
|
-
let w = l(), T =
|
|
4851
|
+
}, na = i(({ id: e, label: t, description: n, error: r, placeholder: i, value: a, defaultValue: o, size: s, disabled: c = !1, required: u = !1, invalid: d = !1, wrapperClassName: f, className: p, style: m, rows: h = 3, onChange: _, onValueChange: v, "aria-describedby": y, "aria-invalid": b, "aria-labelledby": x, ...S }, C) => {
|
|
4852
|
+
let w = l(), T = Br(), E = !!(t || n || r), D = e ?? (E ? void 0 : T?.controlId) ?? w, O = s ?? T?.size ?? "md", k = ae[O], A = {
|
|
4837
4853
|
"--textarea-font-size": `${k.fontSize}px`,
|
|
4838
4854
|
"--textarea-line-height": `${k.lineHeight}px`
|
|
4839
4855
|
}, j = d || !!r || !E && !!T?.invalid, M = c || !E && !!T?.disabled, N = u || !E && !!T?.required, P = n ? `${D}-description` : void 0, F = r ? `${D}-error` : void 0, I = [
|
|
@@ -4848,7 +4864,7 @@ var ea = {
|
|
|
4848
4864
|
ref: C,
|
|
4849
4865
|
id: D,
|
|
4850
4866
|
rows: h,
|
|
4851
|
-
className:
|
|
4867
|
+
className: q(ta.textarea, ta[O], p),
|
|
4852
4868
|
style: {
|
|
4853
4869
|
...A,
|
|
4854
4870
|
...m
|
|
@@ -4863,7 +4879,7 @@ var ea = {
|
|
|
4863
4879
|
"aria-describedby": I || void 0,
|
|
4864
4880
|
onChange: L
|
|
4865
4881
|
});
|
|
4866
|
-
return !E && T ? R : /* @__PURE__ */ g(
|
|
4882
|
+
return !E && T ? R : /* @__PURE__ */ g(Xr, {
|
|
4867
4883
|
id: D,
|
|
4868
4884
|
label: t,
|
|
4869
4885
|
description: n,
|
|
@@ -4877,14 +4893,14 @@ var ea = {
|
|
|
4877
4893
|
children: R
|
|
4878
4894
|
});
|
|
4879
4895
|
});
|
|
4880
|
-
|
|
4896
|
+
na.displayName = "Textarea";
|
|
4881
4897
|
// src/theme/ThemeContext.ts
|
|
4882
|
-
var
|
|
4883
|
-
let [a, o] =
|
|
4898
|
+
var ra = r(null), ia = (e) => e === "highContrast" ? "high-contrast" : e, aa = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, syncDocument: r = !0, children: i }) => {
|
|
4899
|
+
let [a, o] = xt({
|
|
4884
4900
|
value: e,
|
|
4885
4901
|
defaultValue: t,
|
|
4886
4902
|
onChange: n
|
|
4887
|
-
}), s =
|
|
4903
|
+
}), s = ia(a);
|
|
4888
4904
|
c(() => {
|
|
4889
4905
|
if (!r || typeof document > "u") return;
|
|
4890
4906
|
let { documentElement: e } = document, t = e.dataset.velliraTheme;
|
|
@@ -4896,7 +4912,7 @@ var na = r(null), ra = (e) => e === "highContrast" ? "high-contrast" : e, ia = (
|
|
|
4896
4912
|
theme: a,
|
|
4897
4913
|
setTheme: o
|
|
4898
4914
|
}), [a, o]);
|
|
4899
|
-
return /* @__PURE__ */ g(
|
|
4915
|
+
return /* @__PURE__ */ g(ra.Provider, {
|
|
4900
4916
|
value: l,
|
|
4901
4917
|
children: /* @__PURE__ */ g("div", {
|
|
4902
4918
|
"data-vellira-theme": s,
|
|
@@ -4904,11 +4920,11 @@ var na = r(null), ra = (e) => e === "highContrast" ? "high-contrast" : e, ia = (
|
|
|
4904
4920
|
})
|
|
4905
4921
|
});
|
|
4906
4922
|
};
|
|
4907
|
-
|
|
4923
|
+
aa.displayName = "ThemeProvider";
|
|
4908
4924
|
// src/theme/useTheme.ts
|
|
4909
|
-
function
|
|
4910
|
-
let e = s(
|
|
4925
|
+
function oa() {
|
|
4926
|
+
let e = s(ra);
|
|
4911
4927
|
if (!e) throw Error("useTheme must be used within ThemeProvider.");
|
|
4912
4928
|
return e;
|
|
4913
4929
|
}
|
|
4914
|
-
export {
|
|
4930
|
+
export { me as Accordion, Hi as Button, qi as Checkbox, $t as Dropdown, Xr as FormField, Qi as Input, Dn as Modal, Kn as Popover, kt as Portal, Ot as PortalProvider, Qn as Radio, sr as RadioGroup, ri as Select, ea as Switch, Ci as Tabs, na as Textarea, aa as ThemeProvider, Bi as Tooltip, oa as useTheme };
|