@vellira-ui/react 2.140.1 → 2.141.1
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 +962 -959
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, cloneElement as n, createContext as r, forwardRef as i, isValidElement as a, useCallback as o, useContext as s, useEffect as c, useId as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p, useSyncExternalStore as m } from "react";
|
|
2
2
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
3
|
-
import { Check as v, ChevronDown as y, ChevronRight as b, Close as x,
|
|
4
|
-
import { createAutoFocusEvent as
|
|
5
|
-
import
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { FloatingArrow as
|
|
8
|
-
import { controlSizes as
|
|
9
|
-
var
|
|
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
|
+
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
|
+
import z from "clsx";
|
|
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 K, useHover as re, useInteractions as q } from "@floating-ui/react";
|
|
8
|
+
import { controlSizes as ie, lightTheme as ae } from "@vellira-ui/tokens";
|
|
9
|
+
var oe = {
|
|
10
10
|
root: "_root_n1iaz_1",
|
|
11
11
|
item: "_item_n1iaz_11",
|
|
12
12
|
trigger: "_trigger_n1iaz_15",
|
|
@@ -17,37 +17,37 @@ var ae = {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/Accordion/Content/AccordionContent.tsx
|
|
20
|
-
function
|
|
20
|
+
function se({ children: e, forceMount: t = !1, hidden: n = !1, contentId: r }) {
|
|
21
21
|
return n && !t ? null : /* @__PURE__ */ g("div", {
|
|
22
22
|
id: r,
|
|
23
|
-
className:
|
|
23
|
+
className: oe.content,
|
|
24
24
|
hidden: n,
|
|
25
25
|
children: /* @__PURE__ */ g("div", {
|
|
26
|
-
className:
|
|
26
|
+
className: oe.contentInner,
|
|
27
27
|
children: e
|
|
28
28
|
})
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/components/Accordion/Item/AccordionItem.tsx
|
|
33
|
-
function
|
|
33
|
+
function ce({ children: e, className: t }) {
|
|
34
34
|
return /* @__PURE__ */ g("div", {
|
|
35
|
-
className: t ??
|
|
35
|
+
className: t ?? oe.item,
|
|
36
36
|
children: e
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/components/Accordion/Trigger/AccordionTrigger.tsx
|
|
41
|
-
function
|
|
41
|
+
function le({ children: e, disabled: t = !1, contentId: n, expanded: r = !1, onActivate: i }) {
|
|
42
42
|
return /* @__PURE__ */ _("button", {
|
|
43
43
|
type: "button",
|
|
44
|
-
className:
|
|
44
|
+
className: oe.trigger,
|
|
45
45
|
disabled: t,
|
|
46
46
|
"aria-expanded": r,
|
|
47
47
|
"aria-controls": n,
|
|
48
48
|
onClick: i,
|
|
49
49
|
children: [/* @__PURE__ */ g("span", { children: e }), /* @__PURE__ */ g("span", {
|
|
50
|
-
className:
|
|
50
|
+
className: oe.indicator,
|
|
51
51
|
"aria-hidden": "true",
|
|
52
52
|
children: /* @__PURE__ */ g(y, { size: 16 })
|
|
53
53
|
})]
|
|
@@ -55,7 +55,7 @@ function ce({ children: e, disabled: t = !1, contentId: n, expanded: r = !1, onA
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/Accordion/Root/AccordionRoot.tsx
|
|
58
|
-
function
|
|
58
|
+
function ue(t) {
|
|
59
59
|
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(() => {
|
|
60
60
|
let e = (h ? i : _) ?? [];
|
|
61
61
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
@@ -82,21 +82,21 @@ function le(t) {
|
|
|
82
82
|
t.type
|
|
83
83
|
]);
|
|
84
84
|
return /* @__PURE__ */ g("div", {
|
|
85
|
-
className:
|
|
85
|
+
className: oe.root,
|
|
86
86
|
"data-disabled": c || void 0,
|
|
87
87
|
children: e.map(r, (t) => {
|
|
88
|
-
if (!a(t) || t.type !==
|
|
89
|
-
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 ===
|
|
88
|
+
if (!a(t) || t.type !== ce) return t;
|
|
89
|
+
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 === le ? n(e, {
|
|
90
90
|
contentId: s,
|
|
91
91
|
disabled: i,
|
|
92
92
|
expanded: o,
|
|
93
93
|
onActivate: i ? void 0 : () => b(r.props.value)
|
|
94
|
-
}) : e.type ===
|
|
94
|
+
}) : e.type === se ? n(e, {
|
|
95
95
|
contentId: s,
|
|
96
96
|
hidden: !o
|
|
97
97
|
}) : e : e);
|
|
98
98
|
return n(r, {
|
|
99
|
-
className: `${
|
|
99
|
+
className: `${oe.item} ${o ? oe.expanded : ""}`,
|
|
100
100
|
children: l
|
|
101
101
|
});
|
|
102
102
|
})
|
|
@@ -104,37 +104,37 @@ function le(t) {
|
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/components/Accordion/Accordion.tsx
|
|
107
|
-
function
|
|
108
|
-
return e.toArray(n).flatMap((e) => a(e) && e.type === t ?
|
|
107
|
+
function de(n) {
|
|
108
|
+
return e.toArray(n).flatMap((e) => a(e) && e.type === t ? de(e.props.children) : e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return /* @__PURE__ */ g(
|
|
110
|
+
function fe({ children: e, ...t }) {
|
|
111
|
+
return /* @__PURE__ */ g(ue, {
|
|
112
112
|
...t,
|
|
113
|
-
children:
|
|
113
|
+
children: de(e)
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
var
|
|
116
|
+
var pe = Object.assign(fe, {
|
|
117
117
|
displayName: "Accordion",
|
|
118
|
-
Item:
|
|
119
|
-
Trigger:
|
|
120
|
-
Content:
|
|
121
|
-
}),
|
|
118
|
+
Item: ce,
|
|
119
|
+
Trigger: le,
|
|
120
|
+
Content: se
|
|
121
|
+
}), me = { arrow: "_arrow_8b0vb_1" }, J = (...e) => z(e), he = ({ className: e }) => /* @__PURE__ */ g("span", {
|
|
122
122
|
"aria-hidden": "true",
|
|
123
|
-
className: J(
|
|
123
|
+
className: J(me.arrow, e)
|
|
124
124
|
});
|
|
125
|
-
|
|
125
|
+
F(he, "arrow"), he.displayName = "Dropdown.Arrow";
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/components/Dropdown/internal/types.ts
|
|
128
|
-
function
|
|
129
|
-
return
|
|
128
|
+
function ge(e) {
|
|
129
|
+
return N(e);
|
|
130
130
|
}
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region src/components/Dropdown/internal/DropdownCollection.ts
|
|
133
133
|
function Y(e, t) {
|
|
134
134
|
let n = () => null;
|
|
135
|
-
return
|
|
135
|
+
return F(n, e), n.displayName = t, n;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function _e(t) {
|
|
138
138
|
let n = 0, r, i, o, s, c = [], l = [], u = (e) => `${e}-${n++}`;
|
|
139
139
|
function d(e) {
|
|
140
140
|
l.push(e), c.push({
|
|
@@ -146,7 +146,7 @@ function he(t) {
|
|
|
146
146
|
function f(t, n = {}) {
|
|
147
147
|
e.forEach(t, (e) => {
|
|
148
148
|
if (!a(e)) return;
|
|
149
|
-
let t =
|
|
149
|
+
let t = ge(e.type);
|
|
150
150
|
if (e.type.__velliraPortal) {
|
|
151
151
|
o = e, f(e.props.children, n);
|
|
152
152
|
return;
|
|
@@ -214,7 +214,7 @@ function he(t) {
|
|
|
214
214
|
type: "item",
|
|
215
215
|
id: u("item"),
|
|
216
216
|
props: t,
|
|
217
|
-
label:
|
|
217
|
+
label: be(t.children),
|
|
218
218
|
disabled: t.disabled
|
|
219
219
|
});
|
|
220
220
|
return;
|
|
@@ -225,7 +225,7 @@ function he(t) {
|
|
|
225
225
|
type: "checkbox",
|
|
226
226
|
id: u("checkbox"),
|
|
227
227
|
props: t,
|
|
228
|
-
label:
|
|
228
|
+
label: be(t.children),
|
|
229
229
|
disabled: t.disabled
|
|
230
230
|
});
|
|
231
231
|
return;
|
|
@@ -247,20 +247,20 @@ function he(t) {
|
|
|
247
247
|
props: t,
|
|
248
248
|
groupId: n.radioGroupId ?? u("radio-group"),
|
|
249
249
|
groupProps: n.radioGroupProps,
|
|
250
|
-
label:
|
|
250
|
+
label: be(t.children),
|
|
251
251
|
disabled: t.disabled
|
|
252
252
|
});
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
255
|
case "sub": {
|
|
256
|
-
let t = e.props, n =
|
|
256
|
+
let t = e.props, n = ye(t.children);
|
|
257
257
|
if (!n.trigger) return;
|
|
258
|
-
let r = n.trigger.props, i =
|
|
258
|
+
let r = n.trigger.props, i = _e(n.content?.props.children);
|
|
259
259
|
d({
|
|
260
260
|
type: "subTrigger",
|
|
261
261
|
id: u("sub"),
|
|
262
262
|
props: r,
|
|
263
|
-
label:
|
|
263
|
+
label: be(r.children),
|
|
264
264
|
disabled: r.disabled,
|
|
265
265
|
content: n.content?.props.children,
|
|
266
266
|
subEntries: i.entries,
|
|
@@ -287,14 +287,14 @@ function he(t) {
|
|
|
287
287
|
trigger: r
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function ve(t) {
|
|
291
291
|
let n, r, i, o, s = [];
|
|
292
292
|
return e.forEach(t, (e) => {
|
|
293
293
|
if (!a(e)) {
|
|
294
294
|
s.push(e);
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
let t =
|
|
297
|
+
let t = ge(e.type);
|
|
298
298
|
if (t === "itemIcon") {
|
|
299
299
|
i = e.props.children;
|
|
300
300
|
return;
|
|
@@ -320,18 +320,18 @@ function ge(t) {
|
|
|
320
320
|
shortcut: o
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function ye(t) {
|
|
324
324
|
let n, r;
|
|
325
325
|
return e.forEach(t, (e) => {
|
|
326
326
|
if (!a(e)) return;
|
|
327
|
-
let t =
|
|
327
|
+
let t = ge(e.type);
|
|
328
328
|
t === "subTrigger" && (n = e), t === "subContent" && (r = e);
|
|
329
329
|
}), {
|
|
330
330
|
content: r,
|
|
331
331
|
trigger: n
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function be(t) {
|
|
335
335
|
let n = [];
|
|
336
336
|
function r(t) {
|
|
337
337
|
e.forEach(t, (e) => {
|
|
@@ -340,7 +340,7 @@ function ve(t) {
|
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
342
|
if (!a(e)) return;
|
|
343
|
-
let t =
|
|
343
|
+
let t = ge(e.type);
|
|
344
344
|
t !== "itemBadge" && t !== "itemDescription" && t !== "itemIcon" && t !== "itemShortcut" && r(e.props.children);
|
|
345
345
|
});
|
|
346
346
|
}
|
|
@@ -348,7 +348,7 @@ function ve(t) {
|
|
|
348
348
|
}
|
|
349
349
|
//#endregion
|
|
350
350
|
//#region src/components/Dropdown/CheckboxItem/DropdownCheckboxItem.tsx
|
|
351
|
-
var
|
|
351
|
+
var xe = Y("checkboxItem", "Dropdown.CheckboxItem"), Se = {
|
|
352
352
|
dropdown: "_dropdown_m7rnq_1",
|
|
353
353
|
"dropdown-in": "_dropdown-in_m7rnq_1",
|
|
354
354
|
primary: "_primary_m7rnq_42",
|
|
@@ -360,27 +360,27 @@ var ye = Y("checkboxItem", "Dropdown.CheckboxItem"), be = {
|
|
|
360
360
|
searchWrap: "_searchWrap_m7rnq_165",
|
|
361
361
|
search: "_search_m7rnq_165",
|
|
362
362
|
"dropdown-sheet-in": "_dropdown-sheet-in_m7rnq_1"
|
|
363
|
-
},
|
|
363
|
+
}, Ce = Y("empty", "Dropdown.Empty"), we = ({ children: e }) => /* @__PURE__ */ g("li", {
|
|
364
364
|
role: "presentation",
|
|
365
|
-
className:
|
|
365
|
+
className: Se.empty,
|
|
366
366
|
children: e ?? "No actions available"
|
|
367
367
|
});
|
|
368
|
-
|
|
368
|
+
we.displayName = "DropdownEmptySurface";
|
|
369
369
|
//#endregion
|
|
370
370
|
//#region src/components/Dropdown/Group/DropdownGroup.tsx
|
|
371
|
-
var
|
|
372
|
-
|
|
371
|
+
var Te = Y("group", "Dropdown.Group"), Ee = () => null;
|
|
372
|
+
Ee.displayName = "DropdownGroupSurface";
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region src/components/Dropdown/internal/DropdownContext.tsx
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
function
|
|
378
|
-
let e = s(
|
|
375
|
+
var De = r(null), Oe = r(null), ke = r(null), Ae = De.Provider, je = Oe.Provider;
|
|
376
|
+
ke.Provider;
|
|
377
|
+
function Me() {
|
|
378
|
+
let e = s(De);
|
|
379
379
|
if (!e) throw Error("Dropdown compound components must be used inside Dropdown.");
|
|
380
380
|
return e;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
let e = s(
|
|
382
|
+
function Ne() {
|
|
383
|
+
let e = s(Oe);
|
|
384
384
|
if (!e) throw Error("Dropdown.Trigger must be used inside Dropdown.");
|
|
385
385
|
return e;
|
|
386
386
|
}
|
|
@@ -409,15 +409,15 @@ var X = {
|
|
|
409
409
|
"dropdown-sub-in": "_dropdown-sub-in_xmygj_1",
|
|
410
410
|
subLabel: "_subLabel_xmygj_300",
|
|
411
411
|
subSeparator: "_subSeparator_xmygj_308"
|
|
412
|
-
},
|
|
412
|
+
}, Pe = (e, t) => {
|
|
413
413
|
process.env.NODE_ENV !== "production" && !e && console.warn(t);
|
|
414
|
-
},
|
|
415
|
-
let r =
|
|
414
|
+
}, Fe = Y("item", "Dropdown.Item"), Ie = ({ item: e, itemIndex: t }) => {
|
|
415
|
+
let r = Me(), 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", y = u ? e.props.checked ?? o : d ? (e.groupProps?.value ?? r.radioValues[e.groupId]) === e.props.value : !1, x = r.loading || e.disabled, S = e.props, C = ve(S.children), w = C.icon ?? S.icon, T = C.description ?? ("description" in S ? S.description : void 0), E = C.badge ?? ("badge" in S ? S.badge : void 0), D = C.shortcut ?? S.shortcut, O = C.content.length ? C.content : S.children, k = "color" in S ? S.color : void 0, A = e.type === "item" ? e.props.href : void 0, j = e.type === "item" ? e.props.target : void 0, M = e.type === "item" ? e.props.download : void 0, N = r.getItemId(t), P = u ? "menuitemcheckbox" : d ? "menuitemradio" : "menuitem", F = e.type === "item" && j === "_blank" && !e.props.rel ? "noreferrer noopener" : e.type === "item" ? e.props.rel : void 0, I = A ? "a" : "li", L = u || d, R = S.asChild && a(S.children) ? S.children : void 0, z = J(X.item, X[r.size], {
|
|
416
416
|
[X.active]: c,
|
|
417
417
|
[X.disabled]: x,
|
|
418
418
|
[X.checked]: y
|
|
419
419
|
}, k && k !== "default" ? X[k] : void 0, S.className);
|
|
420
|
-
|
|
420
|
+
Pe(!S.asChild || !!R, "Dropdown.Item: asChild requires a single valid React element child.");
|
|
421
421
|
let B = (t) => {
|
|
422
422
|
if (x) {
|
|
423
423
|
t.preventDefault();
|
|
@@ -427,7 +427,7 @@ var X = {
|
|
|
427
427
|
let t = !y;
|
|
428
428
|
s(t), e.props.onCheckedChange?.(t);
|
|
429
429
|
}
|
|
430
|
-
r.selectItem(e,
|
|
430
|
+
r.selectItem(e, Le(t));
|
|
431
431
|
}, V = () => {
|
|
432
432
|
x || (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)));
|
|
433
433
|
}, H = () => {
|
|
@@ -453,7 +453,7 @@ var X = {
|
|
|
453
453
|
onMouseLeave: (e) => {
|
|
454
454
|
R.props.onMouseLeave?.(e), e.defaultPrevented || H(e);
|
|
455
455
|
}
|
|
456
|
-
}),
|
|
456
|
+
}), Re(e, N, m, l, () => r.setOpenSubId(e.id))] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _(I, {
|
|
457
457
|
id: N,
|
|
458
458
|
role: P,
|
|
459
459
|
href: I === "a" && !x ? A : void 0,
|
|
@@ -505,10 +505,10 @@ var X = {
|
|
|
505
505
|
children: /* @__PURE__ */ g(b, {})
|
|
506
506
|
})
|
|
507
507
|
]
|
|
508
|
-
}),
|
|
508
|
+
}), Re(e, N, m, l, () => r.setOpenSubId(e.id))] });
|
|
509
509
|
};
|
|
510
|
-
|
|
511
|
-
function
|
|
510
|
+
Ie.displayName = "DropdownItemRow";
|
|
511
|
+
function Le(e) {
|
|
512
512
|
let t = !1;
|
|
513
513
|
return {
|
|
514
514
|
originalEvent: e,
|
|
@@ -520,7 +520,7 @@ function Fe(e) {
|
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Re(e, t, n, r, i) {
|
|
524
524
|
return !n || !r || e.type !== "subTrigger" || e.subEntries.length === 0 ? null : /* @__PURE__ */ g("ul", {
|
|
525
525
|
role: "menu",
|
|
526
526
|
className: X.subContent,
|
|
@@ -533,14 +533,14 @@ function Ie(e, t, n, r, i) {
|
|
|
533
533
|
role: "separator",
|
|
534
534
|
className: X.subSeparator,
|
|
535
535
|
"aria-hidden": "true"
|
|
536
|
-
}, e.id) : e.type === "item" ? /* @__PURE__ */ g(
|
|
536
|
+
}, e.id) : e.type === "item" ? /* @__PURE__ */ g(ze, {
|
|
537
537
|
item: e.item,
|
|
538
538
|
id: `${t}-${e.itemIndex}`
|
|
539
539
|
}, e.item.id) : null)
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
let n =
|
|
542
|
+
function ze({ id: e, item: t }) {
|
|
543
|
+
let n = Me(), [r, i] = p(t.type === "checkbox" ? t.props.defaultChecked ?? !1 : !1), a = t.type === "checkbox", o = t.type === "radio", s = a ? t.props.checked ?? r : o ? (t.groupProps?.value ?? n.radioValues[t.groupId]) === t.props.value : !1, c = t.props, l = ve(c.children), u = l.icon ?? c.icon, d = l.description ?? ("description" in c ? c.description : void 0), f = l.badge ?? ("badge" in c ? c.badge : void 0), m = l.shortcut ?? c.shortcut, h = l.content.length ? l.content : c.children, y = "color" in c ? c.color : void 0, b = n.loading || t.disabled, x = t.type === "item" ? t.props.href : void 0, S = t.type === "item" ? t.props.target : void 0, C = t.type === "item" ? t.props.download : void 0, w = a ? "menuitemcheckbox" : o ? "menuitemradio" : "menuitem", T = t.type === "item" && S === "_blank" && !t.props.rel ? "noreferrer noopener" : t.type === "item" ? t.props.rel : void 0, E = x ? "a" : "li", D = a || o, O = (e) => {
|
|
544
544
|
if (b) {
|
|
545
545
|
e.preventDefault();
|
|
546
546
|
return;
|
|
@@ -549,7 +549,7 @@ function Le({ id: e, item: t }) {
|
|
|
549
549
|
let e = !s;
|
|
550
550
|
i(e), t.props.onCheckedChange?.(e);
|
|
551
551
|
}
|
|
552
|
-
n.selectItem(t,
|
|
552
|
+
n.selectItem(t, Le(e));
|
|
553
553
|
};
|
|
554
554
|
return /* @__PURE__ */ _(E, {
|
|
555
555
|
id: e,
|
|
@@ -597,30 +597,30 @@ function Le({ id: e, item: t }) {
|
|
|
597
597
|
]
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
|
-
var
|
|
600
|
+
var Be = { group: "_group_aviwv_1" }, Ve = Y("label", "Dropdown.Label"), He = ({ children: e, className: t }) => /* @__PURE__ */ g("li", {
|
|
601
601
|
role: "presentation",
|
|
602
|
-
className: J(
|
|
602
|
+
className: J(Be.group, t),
|
|
603
603
|
children: e
|
|
604
604
|
});
|
|
605
|
-
|
|
605
|
+
He.displayName = "DropdownLabelSurface";
|
|
606
606
|
//#endregion
|
|
607
607
|
//#region src/components/Dropdown/Loading/DropdownLoading.tsx
|
|
608
|
-
var
|
|
608
|
+
var Ue = Y("loading", "Dropdown.Loading"), We = ({ children: e }) => /* @__PURE__ */ g("li", {
|
|
609
609
|
role: "presentation",
|
|
610
610
|
"aria-live": "polite",
|
|
611
|
-
className:
|
|
611
|
+
className: Se.empty,
|
|
612
612
|
children: e ?? "Loading actions..."
|
|
613
613
|
});
|
|
614
|
-
|
|
615
|
-
var
|
|
614
|
+
We.displayName = "DropdownLoadingSurface";
|
|
615
|
+
var Ge = { separator: "_separator_1v11r_1" }, Ke = Y("separator", "Dropdown.Separator"), qe = ({ className: e }) => /* @__PURE__ */ g("li", {
|
|
616
616
|
role: "separator",
|
|
617
|
-
className: J(
|
|
617
|
+
className: J(Ge.separator, e),
|
|
618
618
|
"aria-hidden": "true"
|
|
619
619
|
});
|
|
620
|
-
|
|
620
|
+
qe.displayName = "DropdownSeparatorSurface";
|
|
621
621
|
//#endregion
|
|
622
622
|
//#region src/hooks/behavior/focus/useAriaIsolation.ts
|
|
623
|
-
var
|
|
623
|
+
var Je = ({ active: e, enabled: t, content: n }) => {
|
|
624
624
|
c(() => {
|
|
625
625
|
if (!e || !t || !n) return;
|
|
626
626
|
let r = [], i = n.parentElement;
|
|
@@ -646,22 +646,22 @@ var Ke = ({ active: e, enabled: t, content: n }) => {
|
|
|
646
646
|
};
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/hooks/behavior/overlay/useOverlayFocusRestore.ts
|
|
649
|
-
function
|
|
649
|
+
function Ye(e) {
|
|
650
650
|
return !(e instanceof HTMLElement) || !e.isConnected ? !1 : (e.focus(), document.activeElement === e);
|
|
651
651
|
}
|
|
652
|
-
var
|
|
652
|
+
var Xe = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) => {
|
|
653
653
|
let i = f(null), a = f(t), s = f(n), l = f(r);
|
|
654
654
|
a.current = t, s.current = n, l.current = r;
|
|
655
655
|
let u = o(() => {
|
|
656
656
|
typeof document > "u" || (i.current = document.activeElement);
|
|
657
657
|
}, []), d = o(() => {
|
|
658
|
-
a.current && (
|
|
658
|
+
a.current && (Ye(s.current?.current) || Ye(i.current));
|
|
659
659
|
}, []), p = o((e) => {
|
|
660
|
-
|
|
660
|
+
R({
|
|
661
661
|
enabled: a.current,
|
|
662
662
|
event: e,
|
|
663
663
|
onCloseAutoFocus: l.current
|
|
664
|
-
}) &&
|
|
664
|
+
}) && j(d);
|
|
665
665
|
}, [d]);
|
|
666
666
|
return c(() => {
|
|
667
667
|
if (e) return u(), () => {
|
|
@@ -676,17 +676,17 @@ var Je = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
676
676
|
restoreFocusAfterClose: p,
|
|
677
677
|
saveFocusSnapshot: u
|
|
678
678
|
};
|
|
679
|
-
},
|
|
680
|
-
|
|
679
|
+
}, Ze = ({ active: e, contentRef: t, enabled: n, initialFocus: r, finalFocus: i, restoreFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: s }) => {
|
|
680
|
+
Xe({
|
|
681
681
|
active: e,
|
|
682
682
|
enabled: a,
|
|
683
683
|
finalFocus: i,
|
|
684
684
|
onCloseAutoFocus: s
|
|
685
685
|
}), c(() => {
|
|
686
686
|
if (!e) return;
|
|
687
|
-
let n =
|
|
687
|
+
let n = T();
|
|
688
688
|
o?.(n), n.defaultPrevented || queueMicrotask(() => {
|
|
689
|
-
r?.current?.focus(), !r?.current && t.current &&
|
|
689
|
+
r?.current?.focus(), !r?.current && t.current && M(t.current);
|
|
690
690
|
});
|
|
691
691
|
}, [
|
|
692
692
|
e,
|
|
@@ -697,7 +697,7 @@ var Je = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
697
697
|
if (!e || !n) return;
|
|
698
698
|
let r = (e) => {
|
|
699
699
|
if (e.key !== "Tab" || !t.current) return;
|
|
700
|
-
let n =
|
|
700
|
+
let n = P(t.current);
|
|
701
701
|
if (n.length === 0) {
|
|
702
702
|
e.preventDefault(), t.current.focus();
|
|
703
703
|
return;
|
|
@@ -717,7 +717,7 @@ var Je = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
717
717
|
t,
|
|
718
718
|
n
|
|
719
719
|
]);
|
|
720
|
-
},
|
|
720
|
+
}, Qe = (e) => {
|
|
721
721
|
let [t, n] = p(() => typeof window > "u" || typeof window.matchMedia != "function" || !e ? !1 : window.matchMedia(`(max-width: ${e}px)`).matches);
|
|
722
722
|
return c(() => {
|
|
723
723
|
if (typeof window > "u" || typeof window.matchMedia != "function" || !e) return;
|
|
@@ -726,14 +726,14 @@ var Je = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
726
726
|
t.removeEventListener("change", r);
|
|
727
727
|
};
|
|
728
728
|
}, [e]), t;
|
|
729
|
-
},
|
|
730
|
-
let f =
|
|
731
|
-
|
|
732
|
-
...s ? [
|
|
733
|
-
|
|
729
|
+
}, $e = ({ 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 = [] } = {}) => {
|
|
730
|
+
let f = Qe(l), p = d(() => [
|
|
731
|
+
G(i),
|
|
732
|
+
...s ? [W({ padding: a })] : [],
|
|
733
|
+
te({ apply({ rects: e, elements: t }) {
|
|
734
734
|
o && !f && Object.assign(t.floating.style, { width: `${e.reference.width}px` });
|
|
735
735
|
} }),
|
|
736
|
-
...s ? [
|
|
736
|
+
...s ? [ee({ padding: a })] : [],
|
|
737
737
|
...u
|
|
738
738
|
], [
|
|
739
739
|
s,
|
|
@@ -742,14 +742,14 @@ var Je = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
742
742
|
f,
|
|
743
743
|
o,
|
|
744
744
|
i
|
|
745
|
-
]), { refs: m, floatingStyles: h, isPositioned: g, update: _, context: v, middlewareData: y, placement: b } =
|
|
745
|
+
]), { refs: m, floatingStyles: h, isPositioned: g, update: _, context: v, middlewareData: y, placement: b } = ne({
|
|
746
746
|
open: e,
|
|
747
747
|
onOpenChange: t,
|
|
748
748
|
placement: n,
|
|
749
749
|
strategy: r,
|
|
750
750
|
transform: !1,
|
|
751
751
|
middleware: p,
|
|
752
|
-
whileElementsMounted:
|
|
752
|
+
whileElementsMounted: U
|
|
753
753
|
});
|
|
754
754
|
return c(() => {
|
|
755
755
|
f && m.floating.current?.style.removeProperty("width");
|
|
@@ -767,14 +767,14 @@ var Je = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
767
767
|
setFloatingRef: m.setFloating,
|
|
768
768
|
updatePosition: _
|
|
769
769
|
};
|
|
770
|
-
},
|
|
770
|
+
}, et = k({
|
|
771
771
|
defaultLevel: "popover",
|
|
772
|
-
levels:
|
|
773
|
-
}),
|
|
774
|
-
function
|
|
775
|
-
let e =
|
|
776
|
-
diagnostics:
|
|
777
|
-
policy:
|
|
772
|
+
levels: ae.tokens.zIndex
|
|
773
|
+
}), tt = E("WebOverlayManager");
|
|
774
|
+
function nt() {
|
|
775
|
+
let e = O({
|
|
776
|
+
diagnostics: tt,
|
|
777
|
+
policy: et
|
|
778
778
|
}), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
779
779
|
return {
|
|
780
780
|
register(t) {
|
|
@@ -834,8 +834,8 @@ function et() {
|
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
var
|
|
838
|
-
let i =
|
|
837
|
+
var rt = nt(), it = r(null), at = () => s(it) ?? rt, ot = ({ active: e, id: t, zIndexLevel: n, zIndex: r }) => {
|
|
838
|
+
let i = at(), a = m(i.subscribe, i.getSnapshot, i.getSnapshot);
|
|
839
839
|
c(() => {
|
|
840
840
|
if (e) return i.register({
|
|
841
841
|
id: t,
|
|
@@ -858,7 +858,7 @@ var tt = et(), nt = r(null), rt = () => s(nt) ?? tt, it = ({ active: e, id: t, z
|
|
|
858
858
|
order: l?.order,
|
|
859
859
|
zIndex: i.getZIndex(t)
|
|
860
860
|
};
|
|
861
|
-
},
|
|
861
|
+
}, st = A((e) => {
|
|
862
862
|
if (typeof document > "u") return;
|
|
863
863
|
let t = (t) => {
|
|
864
864
|
t.key === "Escape" && e.dispatchEscapeKeyDown(t);
|
|
@@ -866,7 +866,7 @@ var tt = et(), nt = r(null), rt = () => s(nt) ?? tt, it = ({ active: e, id: t, z
|
|
|
866
866
|
return document.addEventListener("keydown", t), () => {
|
|
867
867
|
document.removeEventListener("keydown", t);
|
|
868
868
|
};
|
|
869
|
-
}),
|
|
869
|
+
}), ct = A((e) => {
|
|
870
870
|
if (typeof document > "u") return;
|
|
871
871
|
let t = (t) => {
|
|
872
872
|
e.dispatchPointerDownOutside(t);
|
|
@@ -875,14 +875,14 @@ var tt = et(), nt = r(null), rt = () => s(nt) ?? tt, it = ({ active: e, id: t, z
|
|
|
875
875
|
document.removeEventListener("pointerdown", t);
|
|
876
876
|
};
|
|
877
877
|
});
|
|
878
|
-
function
|
|
879
|
-
return
|
|
878
|
+
function lt(e) {
|
|
879
|
+
return st.retain(e);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
return
|
|
881
|
+
function ut(e) {
|
|
882
|
+
return ct.retain(e);
|
|
883
883
|
}
|
|
884
|
-
var
|
|
885
|
-
let g =
|
|
884
|
+
var dt = ({ 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 }) => {
|
|
885
|
+
let g = at(), _ = ot({
|
|
886
886
|
active: r && !i,
|
|
887
887
|
id: t,
|
|
888
888
|
zIndexLevel: n,
|
|
@@ -890,7 +890,7 @@ var lt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
890
890
|
}), v = f(s);
|
|
891
891
|
return v.current = s, c(() => {
|
|
892
892
|
if (!e) return;
|
|
893
|
-
let n =
|
|
893
|
+
let n = lt(g), r = g.registerEscapeHandler(t, (e) => {
|
|
894
894
|
d?.(e), !e.defaultPrevented && l && h("escape-key", e);
|
|
895
895
|
});
|
|
896
896
|
return () => {
|
|
@@ -905,9 +905,9 @@ var lt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
905
905
|
h
|
|
906
906
|
]), c(() => {
|
|
907
907
|
if (!e) return;
|
|
908
|
-
let n =
|
|
908
|
+
let n = ut(g), r = g.registerPointerDownOutsideHandler(t, (e) => {
|
|
909
909
|
if (e.target instanceof Node && [o, ...v.current].some((t) => t.current?.contains(e.target))) return;
|
|
910
|
-
let t =
|
|
910
|
+
let t = D(e);
|
|
911
911
|
p?.(t), m?.(t), !t.defaultPrevented && u && h("outside-press", e);
|
|
912
912
|
});
|
|
913
913
|
return () => {
|
|
@@ -923,8 +923,8 @@ var lt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
923
923
|
p,
|
|
924
924
|
h
|
|
925
925
|
]), _;
|
|
926
|
-
},
|
|
927
|
-
|
|
926
|
+
}, ft = ({ 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 } = {}) => ({
|
|
927
|
+
...$e({
|
|
928
928
|
open: e,
|
|
929
929
|
onOpenChange: t,
|
|
930
930
|
placement: n,
|
|
@@ -937,33 +937,33 @@ var lt = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
937
937
|
middleware: f
|
|
938
938
|
}),
|
|
939
939
|
animationStyle: o,
|
|
940
|
-
presentation:
|
|
940
|
+
presentation: I({
|
|
941
941
|
presentation: a,
|
|
942
942
|
defaultPresentation: i ? "floating" : "inline"
|
|
943
943
|
})
|
|
944
|
-
}),
|
|
944
|
+
}), pt = 0, mt = "", ht = {
|
|
945
945
|
lock() {
|
|
946
|
-
typeof document > "u" || (
|
|
946
|
+
typeof document > "u" || (pt === 0 && (mt = document.body.style.overflow, document.body.style.overflow = "hidden"), pt += 1);
|
|
947
947
|
},
|
|
948
948
|
unlock() {
|
|
949
|
-
typeof document > "u" || (
|
|
949
|
+
typeof document > "u" || (pt = Math.max(0, pt - 1), pt === 0 && (document.body.style.overflow = mt));
|
|
950
950
|
}
|
|
951
|
-
},
|
|
951
|
+
}, gt = ({ active: e, enabled: t = !0 }) => {
|
|
952
952
|
c(() => {
|
|
953
|
-
if (e && t) return
|
|
954
|
-
|
|
953
|
+
if (e && t) return ht.lock(), () => {
|
|
954
|
+
ht.unlock();
|
|
955
955
|
};
|
|
956
956
|
}, [e, t]);
|
|
957
|
-
},
|
|
957
|
+
}, _t = () => typeof document > "u" ? null : document.body, vt = ({ container: e } = {}) => {
|
|
958
958
|
let [t, n] = p(!1);
|
|
959
959
|
return c(() => {
|
|
960
960
|
n(!0);
|
|
961
|
-
}, []), t ? e ?? document.getElementById("overlay-root") ??
|
|
961
|
+
}, []), t ? e ?? document.getElementById("overlay-root") ?? _t() : null;
|
|
962
962
|
};
|
|
963
963
|
//#endregion
|
|
964
964
|
//#region src/hooks/behavior/select/useSelectPosition.ts
|
|
965
|
-
function
|
|
966
|
-
return
|
|
965
|
+
function yt({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange: r, placement: i }) {
|
|
966
|
+
return ft({
|
|
967
967
|
open: t,
|
|
968
968
|
onOpenChange: r,
|
|
969
969
|
placement: i === "bottom" || i === "top" ? `${i}-start` : i,
|
|
@@ -974,7 +974,7 @@ function _t({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange:
|
|
|
974
974
|
}
|
|
975
975
|
//#endregion
|
|
976
976
|
//#region src/hooks/useControllableState.ts
|
|
977
|
-
var
|
|
977
|
+
var bt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
978
978
|
let [r, i] = p(t), a = f(n);
|
|
979
979
|
u(() => {
|
|
980
980
|
a.current = n;
|
|
@@ -983,7 +983,7 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
983
983
|
return [s ? e : r, o((e) => {
|
|
984
984
|
s || i(e), a.current?.(e);
|
|
985
985
|
}, [s])];
|
|
986
|
-
},
|
|
986
|
+
}, xt = ({ activeIndex: e, setActiveIndex: t, items: n, isOpen: r, onOpen: i, onSelect: a, onClose: s, getItemText: l, loop: u = !0 }) => {
|
|
987
987
|
let d = f({
|
|
988
988
|
value: "",
|
|
989
989
|
timeoutId: void 0
|
|
@@ -1064,7 +1064,7 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1064
1064
|
h,
|
|
1065
1065
|
g
|
|
1066
1066
|
]) };
|
|
1067
|
-
},
|
|
1067
|
+
}, St = ({ items: e, open: t, defaultOpen: n = !1, disabled: r = !1, onOpenChange: i, onSelect: a, getItemValue: s, getItemText: l, loop: u = !0 }) => {
|
|
1068
1068
|
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(() => {
|
|
1069
1069
|
for (let t = e.length - 1; t >= 0; t--) if (!e[t]?.disabled) return t;
|
|
1070
1070
|
return -1;
|
|
@@ -1119,7 +1119,7 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1119
1119
|
m,
|
|
1120
1120
|
e,
|
|
1121
1121
|
T
|
|
1122
|
-
]), { onKeyDown: D } =
|
|
1122
|
+
]), { onKeyDown: D } = xt({
|
|
1123
1123
|
activeIndex: m,
|
|
1124
1124
|
setActiveIndex: h,
|
|
1125
1125
|
items: e,
|
|
@@ -1148,8 +1148,8 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1148
1148
|
getFirstEnabledIndex: v,
|
|
1149
1149
|
getLastEnabledIndex: y
|
|
1150
1150
|
};
|
|
1151
|
-
},
|
|
1152
|
-
let a = l(), s = l(), c = l(), [u, d] =
|
|
1151
|
+
}, Ct = ({ open: e, defaultOpen: t = !1, onOpenChange: n, closeOnEscape: r, closeOnOutsidePress: i }) => {
|
|
1152
|
+
let a = l(), s = l(), c = l(), [u, d] = bt({
|
|
1153
1153
|
value: e,
|
|
1154
1154
|
defaultValue: t,
|
|
1155
1155
|
onChange: n
|
|
@@ -1167,7 +1167,7 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1167
1167
|
titleId: s,
|
|
1168
1168
|
descriptionId: c
|
|
1169
1169
|
};
|
|
1170
|
-
},
|
|
1170
|
+
}, wt = ({ 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 }) => {
|
|
1171
1171
|
let h = o((e) => {
|
|
1172
1172
|
if (n) {
|
|
1173
1173
|
if (i) {
|
|
@@ -1180,11 +1180,11 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
n(Array.isArray(e) ? e[0] ?? "" : e);
|
|
1182
1182
|
}
|
|
1183
|
-
}, [i, n]), [g, _] =
|
|
1183
|
+
}, [i, n]), [g, _] = bt({
|
|
1184
1184
|
value: e,
|
|
1185
1185
|
defaultValue: t ?? (i ? [] : ""),
|
|
1186
1186
|
onChange: h
|
|
1187
|
-
}), [v, y] =
|
|
1187
|
+
}), [v, y] = bt({
|
|
1188
1188
|
value: u,
|
|
1189
1189
|
defaultValue: f,
|
|
1190
1190
|
onChange: m
|
|
@@ -1253,7 +1253,7 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1253
1253
|
b,
|
|
1254
1254
|
r,
|
|
1255
1255
|
k
|
|
1256
|
-
]), { onKeyDown: j } =
|
|
1256
|
+
]), { onKeyDown: j } = xt({
|
|
1257
1257
|
activeIndex: b,
|
|
1258
1258
|
setActiveIndex: x,
|
|
1259
1259
|
items: r,
|
|
@@ -1283,8 +1283,8 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1283
1283
|
selectActiveOption: A,
|
|
1284
1284
|
onKeyDown: j
|
|
1285
1285
|
};
|
|
1286
|
-
},
|
|
1287
|
-
let [r, i] =
|
|
1286
|
+
}, Tt = ({ value: e, defaultValue: t = "", onValueChange: n }) => {
|
|
1287
|
+
let [r, i] = bt({
|
|
1288
1288
|
value: e,
|
|
1289
1289
|
defaultValue: t,
|
|
1290
1290
|
onChange: n
|
|
@@ -1293,25 +1293,25 @@ var vt = ({ value: e, defaultValue: t, onChange: n }) => {
|
|
|
1293
1293
|
value: r,
|
|
1294
1294
|
setValue: i
|
|
1295
1295
|
};
|
|
1296
|
-
},
|
|
1296
|
+
}, Et = r(null), Dt = ({ children: e, container: t = null }) => /* @__PURE__ */ g(Et.Provider, {
|
|
1297
1297
|
value: t,
|
|
1298
1298
|
children: e
|
|
1299
|
-
}),
|
|
1300
|
-
let n = s(
|
|
1301
|
-
return r ?
|
|
1299
|
+
}), Ot = ({ children: e, container: t }) => {
|
|
1300
|
+
let n = s(Et), r = vt({ container: t ?? n });
|
|
1301
|
+
return r ? B(e, r) : null;
|
|
1302
1302
|
};
|
|
1303
|
-
|
|
1303
|
+
Ot.__velliraPortal = !0, Ot.displayName = "Portal", Dt.displayName = "PortalProvider";
|
|
1304
1304
|
//#endregion
|
|
1305
1305
|
//#region src/components/Dropdown/Content/DropdownContent.tsx
|
|
1306
|
-
var
|
|
1307
|
-
let n =
|
|
1306
|
+
var kt = ({ className: e }) => {
|
|
1307
|
+
let n = Me(), { contentReadyToFocus: r, isOpen: i, setContentRef: a } = n, s = f(null), l = o((e) => {
|
|
1308
1308
|
s.current = e, a(e);
|
|
1309
1309
|
}, [a]);
|
|
1310
1310
|
if (c(() => {
|
|
1311
1311
|
let e = s.current;
|
|
1312
1312
|
i && r && e && (e.contains(document.activeElement) || e.focus({ preventScroll: !0 }));
|
|
1313
1313
|
}, [r, i]), !i) return null;
|
|
1314
|
-
let u = J(
|
|
1314
|
+
let u = J(Se.dropdown, Se[n.color], n.contentProps?.className, e), d = /* @__PURE__ */ _("ul", {
|
|
1315
1315
|
ref: l,
|
|
1316
1316
|
id: n.contentId,
|
|
1317
1317
|
role: "menu",
|
|
@@ -1328,9 +1328,9 @@ var Dt = ({ className: e }) => {
|
|
|
1328
1328
|
"data-color": n.color,
|
|
1329
1329
|
children: [n.searchable && /* @__PURE__ */ _("li", {
|
|
1330
1330
|
role: "presentation",
|
|
1331
|
-
className: J(
|
|
1332
|
-
children: [/* @__PURE__ */ g(
|
|
1333
|
-
className:
|
|
1331
|
+
className: J(Se.searchWrap, n.searchProps?.className),
|
|
1332
|
+
children: [/* @__PURE__ */ g(w, { "aria-hidden": "true" }), /* @__PURE__ */ g("input", {
|
|
1333
|
+
className: Se.search,
|
|
1334
1334
|
value: n.searchValue,
|
|
1335
1335
|
placeholder: n.searchPlaceholder,
|
|
1336
1336
|
"aria-label": n.searchProps?.["aria-label"] ?? n.searchPlaceholder,
|
|
@@ -1340,25 +1340,25 @@ var Dt = ({ className: e }) => {
|
|
|
1340
1340
|
e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Enter" && e.key !== "Escape" && e.stopPropagation();
|
|
1341
1341
|
}
|
|
1342
1342
|
})]
|
|
1343
|
-
}), n.loading ? /* @__PURE__ */ g(
|
|
1343
|
+
}), n.loading ? /* @__PURE__ */ g(We, { children: n.loadingText }) : n.searchable && n.items.length === 0 ? /* @__PURE__ */ g(we, { children: n.empty }) : n.entries.length ? n.entries.map((e) => e.type === "groupStart" ? /* @__PURE__ */ g(Ee, {}, e.id) : e.type === "groupEnd" ? null : e.type === "label" ? /* @__PURE__ */ g(He, { ...e.props }, e.id) : e.type === "separator" ? /* @__PURE__ */ g(qe, { ...e.props }, e.id) : e.type === "empty" ? /* @__PURE__ */ g(we, { children: e.props.children }, e.id) : e.type === "loading" ? /* @__PURE__ */ g(We, { children: e.props.children }, e.id) : e.type === "arrow" ? /* @__PURE__ */ g(he, { ...e.props }, e.id) : /* @__PURE__ */ g(t, { children: /* @__PURE__ */ g(Ie, {
|
|
1344
1344
|
item: e.item,
|
|
1345
1345
|
itemIndex: e.itemIndex
|
|
1346
|
-
}) }, e.item.id)) : /* @__PURE__ */ g(
|
|
1346
|
+
}) }, e.item.id)) : /* @__PURE__ */ g(we, {})]
|
|
1347
1347
|
});
|
|
1348
|
-
return n.portal ? /* @__PURE__ */ g(
|
|
1348
|
+
return n.portal ? /* @__PURE__ */ g(Ot, { children: d }) : d;
|
|
1349
1349
|
};
|
|
1350
|
-
|
|
1350
|
+
F(kt, "content"), kt.displayName = "Dropdown.Content";
|
|
1351
1351
|
//#endregion
|
|
1352
1352
|
//#region src/components/Dropdown/ItemBadge/DropdownItemBadge.tsx
|
|
1353
|
-
var
|
|
1353
|
+
var At = Y("itemBadge", "Dropdown.ItemBadge"), jt = Y("itemDescription", "Dropdown.ItemDescription"), Mt = Y("itemIcon", "Dropdown.ItemIcon"), Nt = Y("itemShortcut", "Dropdown.ItemShortcut"), Pt = Y("radioGroup", "Dropdown.RadioGroup"), Ft = Y("radioItem", "Dropdown.RadioItem");
|
|
1354
1354
|
//#endregion
|
|
1355
1355
|
//#region src/utils/compose.ts
|
|
1356
|
-
function
|
|
1356
|
+
function It(e, t) {
|
|
1357
1357
|
return (n) => {
|
|
1358
1358
|
e?.(n), n.defaultPrevented || t(n);
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Lt(...e) {
|
|
1362
1362
|
return (t) => {
|
|
1363
1363
|
e.forEach((e) => {
|
|
1364
1364
|
if (e) {
|
|
@@ -1373,40 +1373,40 @@ function Ft(...e) {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
//#endregion
|
|
1375
1375
|
//#region src/components/Dropdown/internal/composeEventHandlers.ts
|
|
1376
|
-
function
|
|
1376
|
+
function Rt(e) {
|
|
1377
1377
|
return typeof e == "number" ? `${e}px` : e;
|
|
1378
1378
|
}
|
|
1379
|
-
var
|
|
1380
|
-
let L = l(), R = `${L}-trigger`, z = `${L}-menu`, B = f(null), V = f(null), [H, U] = p(), [W, G] = p({}), [ee, te] = p(M), ne = j ?? ee, K = d(() =>
|
|
1379
|
+
var zt = { wrapper: "_wrapper_14ue8_1" }, Bt = ({ 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 }) => {
|
|
1380
|
+
let L = l(), R = `${L}-trigger`, z = `${L}-menu`, B = f(null), V = f(null), [H, U] = p(), [W, G] = p({}), [ee, te] = p(M), ne = j ?? ee, K = d(() => _e(e), [e]), re = K.content?.props.command ?? !1, q = k || A || re || !!K.search, ie = d(() => Ht(K.items), [K.items]), ae = d(() => K.items.map((e) => ({
|
|
1381
1381
|
disabled: e.disabled,
|
|
1382
1382
|
label: e.label
|
|
1383
|
-
})), [K.items]),
|
|
1384
|
-
|
|
1383
|
+
})), [K.items]), oe = d(() => !q || !ne.trim() ? K : Ut(K, ne), [
|
|
1384
|
+
q,
|
|
1385
1385
|
K,
|
|
1386
1386
|
ne
|
|
1387
|
-
]),
|
|
1387
|
+
]), se = d(() => oe.items.map((e) => ({
|
|
1388
1388
|
disabled: e.disabled,
|
|
1389
1389
|
label: e.label
|
|
1390
|
-
})), [
|
|
1390
|
+
})), [oe.items]);
|
|
1391
1391
|
c(() => {
|
|
1392
1392
|
G((e) => {
|
|
1393
1393
|
let t = { ...e };
|
|
1394
|
-
return
|
|
1394
|
+
return ie.forEach((e) => {
|
|
1395
1395
|
e.type === "radio" && t[e.groupId] === void 0 && (t[e.groupId] = e.groupProps?.value ?? e.groupProps?.defaultValue);
|
|
1396
1396
|
}), t;
|
|
1397
1397
|
});
|
|
1398
|
-
}, [
|
|
1399
|
-
let { activeIndex:
|
|
1400
|
-
items:
|
|
1398
|
+
}, [ie]);
|
|
1399
|
+
let { activeIndex: ce, setActiveIndex: le, isOpen: ue, closeDropdown: de, toggleDropdown: fe, onKeyDown: pe } = St({
|
|
1400
|
+
items: q ? se : ae,
|
|
1401
1401
|
open: t,
|
|
1402
1402
|
defaultOpen: n,
|
|
1403
1403
|
disabled: E,
|
|
1404
1404
|
onOpenChange: r,
|
|
1405
|
-
getItemValue: (e, t) => (
|
|
1405
|
+
getItemValue: (e, t) => (q ? oe.items : K.items)[t]?.id ?? "",
|
|
1406
1406
|
getItemText: (e) => e.label,
|
|
1407
1407
|
loop: T
|
|
1408
|
-
}), { floatingStyles: me, isMobileSheet:
|
|
1409
|
-
open:
|
|
1408
|
+
}), { floatingStyles: me, isMobileSheet: he, isPositioned: ge, setRef: Y, setFloatingRef: ve } = ft({
|
|
1409
|
+
open: ue,
|
|
1410
1410
|
placement: s,
|
|
1411
1411
|
strategy: u,
|
|
1412
1412
|
portal: x,
|
|
@@ -1416,19 +1416,19 @@ var Lt = { wrapper: "_wrapper_14ue8_1" }, Rt = ({ children: e, open: t, defaultO
|
|
|
1416
1416
|
collisionPadding: h,
|
|
1417
1417
|
mobileSheetBreakpoint: 640
|
|
1418
1418
|
}), ye = o((e) => {
|
|
1419
|
-
j === void 0 && te(e), P?.(e),
|
|
1419
|
+
j === void 0 && te(e), P?.(e), le(0);
|
|
1420
1420
|
}, [
|
|
1421
1421
|
P,
|
|
1422
1422
|
j,
|
|
1423
|
-
|
|
1423
|
+
le
|
|
1424
1424
|
]);
|
|
1425
|
-
|
|
1426
|
-
active:
|
|
1425
|
+
gt({
|
|
1426
|
+
active: ue,
|
|
1427
1427
|
enabled: C
|
|
1428
1428
|
});
|
|
1429
1429
|
let be = o(() => {
|
|
1430
|
-
|
|
1431
|
-
}, [
|
|
1430
|
+
de(), B.current?.focus();
|
|
1431
|
+
}, [de]), xe = o((e, t) => {
|
|
1432
1432
|
if (e.disabled || D) return;
|
|
1433
1433
|
if (e.type === "subTrigger") {
|
|
1434
1434
|
U(e.id);
|
|
@@ -1445,7 +1445,7 @@ var Lt = { wrapper: "_wrapper_14ue8_1" }, Rt = ({ children: e, open: t, defaultO
|
|
|
1445
1445
|
w,
|
|
1446
1446
|
D
|
|
1447
1447
|
]), Se = o((e) => {
|
|
1448
|
-
let t =
|
|
1448
|
+
let t = oe.items[ce];
|
|
1449
1449
|
if (e.key === "ArrowRight" && t?.type === "subTrigger") {
|
|
1450
1450
|
e.preventDefault(), U(t.id);
|
|
1451
1451
|
return;
|
|
@@ -1456,57 +1456,57 @@ var Lt = { wrapper: "_wrapper_14ue8_1" }, Rt = ({ children: e, open: t, defaultO
|
|
|
1456
1456
|
}
|
|
1457
1457
|
if ((e.key === "Enter" || e.key === " ") && t) {
|
|
1458
1458
|
e.preventDefault();
|
|
1459
|
-
let n =
|
|
1459
|
+
let n = Vt(e);
|
|
1460
1460
|
xe(t, n);
|
|
1461
1461
|
return;
|
|
1462
1462
|
}
|
|
1463
1463
|
pe(e), e.key === "Escape" && B.current?.focus();
|
|
1464
1464
|
}, [
|
|
1465
|
-
|
|
1466
|
-
|
|
1465
|
+
ce,
|
|
1466
|
+
oe.items,
|
|
1467
1467
|
pe,
|
|
1468
1468
|
H,
|
|
1469
1469
|
xe
|
|
1470
1470
|
]), Ce = o((e) => {
|
|
1471
1471
|
e.preventDefault(), fe();
|
|
1472
1472
|
}, [fe]), we = o((e) => {
|
|
1473
|
-
B.current = e,
|
|
1474
|
-
}, [
|
|
1475
|
-
V.current = e, ve(e),
|
|
1476
|
-
}, [
|
|
1477
|
-
active:
|
|
1473
|
+
B.current = e, Y(e);
|
|
1474
|
+
}, [Y]), Te = o((e) => {
|
|
1475
|
+
V.current = e, ve(e), he && e?.focus({ preventScroll: !0 });
|
|
1476
|
+
}, [he, ve]), Ee = dt({
|
|
1477
|
+
active: ue,
|
|
1478
1478
|
id: z,
|
|
1479
1479
|
zIndexLevel: "dropdown",
|
|
1480
1480
|
closeOnEscape: !0,
|
|
1481
1481
|
closeOnOutsidePress: !0,
|
|
1482
1482
|
contentRef: V,
|
|
1483
1483
|
ignoreRefs: [B],
|
|
1484
|
-
requestClose: () =>
|
|
1484
|
+
requestClose: () => de()
|
|
1485
1485
|
}), De = {
|
|
1486
1486
|
...me,
|
|
1487
1487
|
zIndex: Ee.zIndex,
|
|
1488
|
-
minWidth:
|
|
1489
|
-
maxWidth:
|
|
1490
|
-
},
|
|
1488
|
+
minWidth: Rt(y),
|
|
1489
|
+
maxWidth: Rt(b)
|
|
1490
|
+
}, Oe = {
|
|
1491
1491
|
disabled: E,
|
|
1492
|
-
isOpen:
|
|
1492
|
+
isOpen: ue,
|
|
1493
1493
|
contentId: z,
|
|
1494
1494
|
triggerId: R,
|
|
1495
1495
|
setTriggerRef: we,
|
|
1496
1496
|
onClick: Ce,
|
|
1497
1497
|
onKeyDown: Se
|
|
1498
|
-
},
|
|
1499
|
-
activeIndex:
|
|
1498
|
+
}, ke = {
|
|
1499
|
+
activeIndex: ce,
|
|
1500
1500
|
closeOnSelect: w,
|
|
1501
1501
|
color: a,
|
|
1502
|
-
contentReadyToFocus:
|
|
1502
|
+
contentReadyToFocus: he || ge,
|
|
1503
1503
|
contentId: z,
|
|
1504
1504
|
contentProps: K.content?.props,
|
|
1505
1505
|
disabled: E,
|
|
1506
|
-
entries:
|
|
1506
|
+
entries: oe.entries,
|
|
1507
1507
|
getItemId: (e) => `${z}-item-${e}`,
|
|
1508
|
-
isOpen:
|
|
1509
|
-
items:
|
|
1508
|
+
isOpen: ue,
|
|
1509
|
+
items: oe.items,
|
|
1510
1510
|
loading: D,
|
|
1511
1511
|
loadingText: O,
|
|
1512
1512
|
empty: F,
|
|
@@ -1519,9 +1519,9 @@ var Lt = { wrapper: "_wrapper_14ue8_1" }, Rt = ({ children: e, open: t, defaultO
|
|
|
1519
1519
|
searchPlaceholder: K.search?.props.placeholder ?? N ?? (A || re ? "Type a command..." : "Search actions..."),
|
|
1520
1520
|
searchProps: K.search?.props,
|
|
1521
1521
|
searchValue: ne,
|
|
1522
|
-
searchable:
|
|
1522
|
+
searchable: q,
|
|
1523
1523
|
selectItem: xe,
|
|
1524
|
-
setActiveIndex:
|
|
1524
|
+
setActiveIndex: le,
|
|
1525
1525
|
setContentRef: Te,
|
|
1526
1526
|
setOpenSubId: U,
|
|
1527
1527
|
setRadioValue: (e, t) => {
|
|
@@ -1535,20 +1535,20 @@ var Lt = { wrapper: "_wrapper_14ue8_1" }, Rt = ({ children: e, open: t, defaultO
|
|
|
1535
1535
|
surfaceStyle: De,
|
|
1536
1536
|
triggerId: R
|
|
1537
1537
|
};
|
|
1538
|
-
return /* @__PURE__ */ g(
|
|
1539
|
-
value:
|
|
1540
|
-
children: /* @__PURE__ */ g(
|
|
1541
|
-
value:
|
|
1538
|
+
return /* @__PURE__ */ g(je, {
|
|
1539
|
+
value: Oe,
|
|
1540
|
+
children: /* @__PURE__ */ g(Ae, {
|
|
1541
|
+
value: ke,
|
|
1542
1542
|
children: /* @__PURE__ */ _("div", {
|
|
1543
|
-
className: J(
|
|
1543
|
+
className: J(zt.wrapper, I),
|
|
1544
1544
|
"data-disabled": E || void 0,
|
|
1545
|
-
children: [K.trigger ?? null, K.portal ?? K.content ?? /* @__PURE__ */ g(
|
|
1545
|
+
children: [K.trigger ?? null, K.portal ?? K.content ?? /* @__PURE__ */ g(kt, {})]
|
|
1546
1546
|
})
|
|
1547
1547
|
})
|
|
1548
1548
|
});
|
|
1549
1549
|
};
|
|
1550
|
-
|
|
1551
|
-
function
|
|
1550
|
+
Bt.displayName = "DropdownRoot";
|
|
1551
|
+
function Vt(e) {
|
|
1552
1552
|
let t = !1;
|
|
1553
1553
|
return {
|
|
1554
1554
|
originalEvent: e,
|
|
@@ -1560,13 +1560,13 @@ function zt(e) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Ht(e) {
|
|
1564
1564
|
let t = [];
|
|
1565
1565
|
return e.forEach((e) => {
|
|
1566
|
-
t.push(e), e.type === "subTrigger" && t.push(...
|
|
1566
|
+
t.push(e), e.type === "subTrigger" && t.push(...Ht(e.subItems));
|
|
1567
1567
|
}), t;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Ut(e, t) {
|
|
1570
1570
|
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));
|
|
1571
1571
|
return {
|
|
1572
1572
|
...e,
|
|
@@ -1576,7 +1576,7 @@ function Vt(e, t) {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
//#endregion
|
|
1578
1578
|
//#region src/components/Dropdown/Search/DropdownSearch.tsx
|
|
1579
|
-
var
|
|
1579
|
+
var Wt = Y("search", "Dropdown.Search"), Gt = Y("subContent", "Dropdown.SubContent"), Kt = Y("subTrigger", "Dropdown.SubTrigger"), qt = Y("sub", "Dropdown.Sub"), Jt = {
|
|
1580
1580
|
button: "_button_5pol3_1",
|
|
1581
1581
|
disabled: "_disabled_5pol3_63",
|
|
1582
1582
|
arrow: "_arrow_5pol3_71",
|
|
@@ -1592,21 +1592,21 @@ var Ht = Y("search", "Dropdown.Search"), Ut = Y("subContent", "Dropdown.SubConte
|
|
|
1592
1592
|
lg: "_lg_5pol3_350",
|
|
1593
1593
|
label: "_label_5pol3_362",
|
|
1594
1594
|
open: "_open_5pol3_390"
|
|
1595
|
-
},
|
|
1596
|
-
|
|
1597
|
-
var
|
|
1598
|
-
let o =
|
|
1595
|
+
}, Yt = (e) => /* @__PURE__ */ g(Xt, { ...e });
|
|
1596
|
+
F(Yt, "trigger"), Yt.displayName = "Dropdown.Trigger";
|
|
1597
|
+
var Xt = ({ children: e, asChild: t = !1, disabled: r, className: i }) => {
|
|
1598
|
+
let o = Me(), s = Ne(), c = t && a(e) ? e : void 0, l = o.disabled || r, u = {
|
|
1599
1599
|
id: s.triggerId,
|
|
1600
|
-
ref: c ?
|
|
1600
|
+
ref: c ? Lt(c.props.ref, s.setTriggerRef) : s.setTriggerRef,
|
|
1601
1601
|
"aria-controls": s.isOpen ? s.contentId : void 0,
|
|
1602
1602
|
"aria-disabled": l || void 0,
|
|
1603
1603
|
"aria-expanded": s.isOpen,
|
|
1604
1604
|
"aria-haspopup": "menu",
|
|
1605
|
-
className: J(!c &&
|
|
1605
|
+
className: J(!c && Jt.button, !c && Jt[o.size], !c && Jt[o.color], i),
|
|
1606
1606
|
"data-state": s.isOpen ? "open" : "closed",
|
|
1607
1607
|
disabled: l || void 0,
|
|
1608
|
-
onClick:
|
|
1609
|
-
onKeyDown:
|
|
1608
|
+
onClick: It(c?.props.onClick, s.onClick),
|
|
1609
|
+
onKeyDown: It(c?.props.onKeyDown, s.onKeyDown)
|
|
1610
1610
|
};
|
|
1611
1611
|
return c ? n(c, {
|
|
1612
1612
|
...u,
|
|
@@ -1615,71 +1615,71 @@ var Jt = ({ children: e, asChild: t = !1, disabled: r, className: i }) => {
|
|
|
1615
1615
|
type: "button",
|
|
1616
1616
|
...u,
|
|
1617
1617
|
children: [/* @__PURE__ */ g("span", {
|
|
1618
|
-
className:
|
|
1618
|
+
className: Jt.label,
|
|
1619
1619
|
children: e
|
|
1620
1620
|
}), /* @__PURE__ */ g("span", {
|
|
1621
|
-
className: J(
|
|
1621
|
+
className: J(Jt.arrow, { [Jt.open]: s.isOpen }),
|
|
1622
1622
|
"aria-hidden": "true",
|
|
1623
1623
|
children: /* @__PURE__ */ g(y, {})
|
|
1624
1624
|
})]
|
|
1625
1625
|
});
|
|
1626
1626
|
};
|
|
1627
|
-
|
|
1627
|
+
Xt.displayName = "DropdownTriggerSurface";
|
|
1628
1628
|
//#endregion
|
|
1629
1629
|
//#region src/components/Dropdown/Dropdown.tsx
|
|
1630
|
-
var
|
|
1631
|
-
Trigger:
|
|
1632
|
-
Content:
|
|
1633
|
-
Search:
|
|
1634
|
-
Item:
|
|
1635
|
-
CheckboxItem:
|
|
1636
|
-
RadioGroup:
|
|
1637
|
-
RadioItem:
|
|
1638
|
-
Group:
|
|
1639
|
-
Label:
|
|
1640
|
-
Separator:
|
|
1641
|
-
Sub:
|
|
1642
|
-
SubTrigger:
|
|
1643
|
-
SubContent:
|
|
1644
|
-
ItemIcon:
|
|
1645
|
-
ItemDescription:
|
|
1646
|
-
ItemBadge:
|
|
1647
|
-
ItemShortcut:
|
|
1648
|
-
Arrow:
|
|
1649
|
-
Empty:
|
|
1650
|
-
Loading:
|
|
1630
|
+
var Zt = Object.assign(Bt, {
|
|
1631
|
+
Trigger: Yt,
|
|
1632
|
+
Content: kt,
|
|
1633
|
+
Search: Wt,
|
|
1634
|
+
Item: Fe,
|
|
1635
|
+
CheckboxItem: xe,
|
|
1636
|
+
RadioGroup: Pt,
|
|
1637
|
+
RadioItem: Ft,
|
|
1638
|
+
Group: Te,
|
|
1639
|
+
Label: Ve,
|
|
1640
|
+
Separator: Ke,
|
|
1641
|
+
Sub: qt,
|
|
1642
|
+
SubTrigger: Kt,
|
|
1643
|
+
SubContent: Gt,
|
|
1644
|
+
ItemIcon: Mt,
|
|
1645
|
+
ItemDescription: jt,
|
|
1646
|
+
ItemBadge: At,
|
|
1647
|
+
ItemShortcut: Nt,
|
|
1648
|
+
Arrow: he,
|
|
1649
|
+
Empty: Ce,
|
|
1650
|
+
Loading: Ue
|
|
1651
1651
|
});
|
|
1652
|
-
|
|
1652
|
+
Zt.displayName = "Dropdown";
|
|
1653
1653
|
//#endregion
|
|
1654
1654
|
//#region src/components/Modal/internal/ModalContext.tsx
|
|
1655
|
-
var
|
|
1656
|
-
let e = s(
|
|
1655
|
+
var Qt = r(void 0), $t = r(void 0), en = () => {
|
|
1656
|
+
let e = s(Qt);
|
|
1657
1657
|
if (e === void 0) throw Error("Modal compound components must be used inside Modal");
|
|
1658
1658
|
return e;
|
|
1659
|
-
},
|
|
1660
|
-
|
|
1661
|
-
var
|
|
1659
|
+
}, tn = () => s($t), nn = Qt.Provider, rn = $t.Provider;
|
|
1660
|
+
Qt.displayName = "ModalContext", $t.displayName = "ModalContentContext";
|
|
1661
|
+
var an = {
|
|
1662
1662
|
modalBody: "_modalBody_ou4ff_1",
|
|
1663
1663
|
inside: "_inside_ou4ff_6"
|
|
1664
|
-
},
|
|
1665
|
-
let n =
|
|
1664
|
+
}, on = ({ children: e, className: t }) => {
|
|
1665
|
+
let n = tn();
|
|
1666
1666
|
return /* @__PURE__ */ g("div", {
|
|
1667
|
-
className: J(
|
|
1667
|
+
className: J(an.modalBody, n?.scrollBehavior === "inside" && an.inside, t),
|
|
1668
1668
|
children: e
|
|
1669
1669
|
});
|
|
1670
1670
|
};
|
|
1671
|
-
|
|
1672
|
-
var
|
|
1671
|
+
on.displayName = "ModalBody";
|
|
1672
|
+
var sn = {
|
|
1673
1673
|
modalHeader: "_modalHeader_1xg08_1",
|
|
1674
1674
|
modalHeaderText: "_modalHeaderText_1xg08_8",
|
|
1675
1675
|
modalHeaderTitle: "_modalHeaderTitle_1xg08_13",
|
|
1676
1676
|
modalHeaderDescription: "_modalHeaderDescription_1xg08_20",
|
|
1677
1677
|
modalHeaderCloseButton: "_modalHeaderCloseButton_1xg08_25"
|
|
1678
|
-
},
|
|
1679
|
-
let o =
|
|
1678
|
+
}, cn = ({ asChild: e = !1, children: t, className: r, "aria-label": i }) => {
|
|
1679
|
+
let o = en(), s = e && a(t) ? t : void 0, c = {
|
|
1680
1680
|
"aria-label": s ? i : i ?? "Close dialog",
|
|
1681
|
-
className: J(!s &&
|
|
1682
|
-
onClick:
|
|
1681
|
+
className: J(!s && sn.modalHeaderCloseButton, r),
|
|
1682
|
+
onClick: It(s?.props.onClick, o.requestClose)
|
|
1683
1683
|
};
|
|
1684
1684
|
return s ? n(s, {
|
|
1685
1685
|
...c,
|
|
@@ -1691,8 +1691,8 @@ var an = {
|
|
|
1691
1691
|
children: /* @__PURE__ */ g(x, { size: 16 })
|
|
1692
1692
|
});
|
|
1693
1693
|
};
|
|
1694
|
-
|
|
1695
|
-
var
|
|
1694
|
+
cn.displayName = "Modal.Close";
|
|
1695
|
+
var ln = {
|
|
1696
1696
|
content: "_content_1tnw8_1",
|
|
1697
1697
|
animated: "_animated_1tnw8_24",
|
|
1698
1698
|
"modal-content-open": "_modal-content-open_1tnw8_1",
|
|
@@ -1706,11 +1706,11 @@ var sn = {
|
|
|
1706
1706
|
full: "_full_1tnw8_107",
|
|
1707
1707
|
inside: "_inside_1tnw8_113",
|
|
1708
1708
|
outside: "_outside_1tnw8_117"
|
|
1709
|
-
},
|
|
1710
|
-
let f =
|
|
1709
|
+
}, un = ({ 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 }) => {
|
|
1710
|
+
let f = en(), m = f.open, h = m && f.shouldRender, [_, v] = p(null), y = o((e) => {
|
|
1711
1711
|
f.setContentRef(e), v(e);
|
|
1712
1712
|
}, [f]);
|
|
1713
|
-
if (
|
|
1713
|
+
if (Ze({
|
|
1714
1714
|
active: h,
|
|
1715
1715
|
contentRef: f.contentRef,
|
|
1716
1716
|
enabled: f.trapFocus,
|
|
@@ -1719,19 +1719,19 @@ var sn = {
|
|
|
1719
1719
|
onCloseAutoFocus: f.onCloseAutoFocus,
|
|
1720
1720
|
onOpenAutoFocus: f.onOpenAutoFocus,
|
|
1721
1721
|
restoreFocus: f.restoreFocus
|
|
1722
|
-
}),
|
|
1722
|
+
}), Je({
|
|
1723
1723
|
active: m,
|
|
1724
1724
|
content: _,
|
|
1725
1725
|
enabled: f.modal
|
|
1726
1726
|
}), !f.shouldRender && !a) return null;
|
|
1727
1727
|
let b = c ?? (s ? void 0 : f.titleId), x = l ?? f.descriptionId;
|
|
1728
|
-
return /* @__PURE__ */ g(
|
|
1728
|
+
return /* @__PURE__ */ g(rn, {
|
|
1729
1729
|
value: { scrollBehavior: r },
|
|
1730
1730
|
children: /* @__PURE__ */ g("div", {
|
|
1731
1731
|
id: f.contentId,
|
|
1732
|
-
ref:
|
|
1732
|
+
ref: Lt(y),
|
|
1733
1733
|
tabIndex: -1,
|
|
1734
|
-
className: J(
|
|
1734
|
+
className: J(ln.content, ln[t], ln[n], ln[r], i && ln.animated, u),
|
|
1735
1735
|
style: {
|
|
1736
1736
|
...f.animationStyle,
|
|
1737
1737
|
...d
|
|
@@ -1747,61 +1747,61 @@ var sn = {
|
|
|
1747
1747
|
})
|
|
1748
1748
|
});
|
|
1749
1749
|
};
|
|
1750
|
-
|
|
1751
|
-
var
|
|
1752
|
-
className: J(
|
|
1750
|
+
un.displayName = "ModalContent";
|
|
1751
|
+
var dn = { modalFooter: "_modalFooter_sb1pn_1" }, fn = ({ children: e, className: t }) => /* @__PURE__ */ g("div", {
|
|
1752
|
+
className: J(dn.modalFooter, t),
|
|
1753
1753
|
children: e
|
|
1754
1754
|
});
|
|
1755
|
-
|
|
1755
|
+
fn.displayName = "ModalFooter";
|
|
1756
1756
|
//#endregion
|
|
1757
1757
|
//#region src/components/Modal/Header/ModalDescription.tsx
|
|
1758
|
-
var
|
|
1759
|
-
let { descriptionId: t, setDescriptionPresent: n } =
|
|
1758
|
+
var pn = ({ children: e }) => {
|
|
1759
|
+
let { descriptionId: t, setDescriptionPresent: n } = en();
|
|
1760
1760
|
return c(() => (n(!0), () => n(!1)), [n]), /* @__PURE__ */ g("p", {
|
|
1761
1761
|
id: t,
|
|
1762
|
-
className:
|
|
1762
|
+
className: sn.modalHeaderDescription,
|
|
1763
1763
|
children: e
|
|
1764
1764
|
});
|
|
1765
1765
|
};
|
|
1766
|
-
|
|
1766
|
+
pn.displayName = "Modal.Description";
|
|
1767
1767
|
//#endregion
|
|
1768
1768
|
//#region src/components/Modal/Header/ModalHeader.tsx
|
|
1769
|
-
var
|
|
1770
|
-
className: J(
|
|
1769
|
+
var mn = ({ children: e, className: t }) => /* @__PURE__ */ g("div", {
|
|
1770
|
+
className: J(sn.modalHeader, t),
|
|
1771
1771
|
children: e
|
|
1772
1772
|
});
|
|
1773
|
-
|
|
1773
|
+
mn.displayName = "ModalHeader";
|
|
1774
1774
|
//#endregion
|
|
1775
1775
|
//#region src/components/Modal/Header/ModalTitle.tsx
|
|
1776
|
-
var
|
|
1777
|
-
let { setTitlePresent: t, titleId: n } =
|
|
1776
|
+
var hn = ({ children: e }) => {
|
|
1777
|
+
let { setTitlePresent: t, titleId: n } = en();
|
|
1778
1778
|
return u(() => (t(!0), () => t(!1)), [t]), /* @__PURE__ */ g("h2", {
|
|
1779
1779
|
id: n,
|
|
1780
|
-
className:
|
|
1780
|
+
className: sn.modalHeaderTitle,
|
|
1781
1781
|
children: e
|
|
1782
1782
|
});
|
|
1783
1783
|
};
|
|
1784
|
-
|
|
1785
|
-
var
|
|
1784
|
+
hn.displayName = "Modal.Title";
|
|
1785
|
+
var gn = {
|
|
1786
1786
|
overlay: "_overlay_d6wdf_1",
|
|
1787
1787
|
"overlay--open": "_overlay--open_d6wdf_10",
|
|
1788
1788
|
"overlay--animated": "_overlay--animated_d6wdf_15",
|
|
1789
1789
|
"modal-overlay-open": "_modal-overlay-open_d6wdf_1",
|
|
1790
1790
|
"modal-overlay-close": "_modal-overlay-close_d6wdf_1"
|
|
1791
|
-
},
|
|
1792
|
-
let { animation: r, animationStyle: i, open: a, shouldRender: o } =
|
|
1791
|
+
}, _n = ({ className: e, animated: t = !0, forceMount: n = !1 }) => {
|
|
1792
|
+
let { animation: r, animationStyle: i, open: a, shouldRender: o } = en();
|
|
1793
1793
|
return !o && !n ? null : /* @__PURE__ */ g("div", {
|
|
1794
|
-
className: J(
|
|
1794
|
+
className: J(gn.overlay, a && gn["overlay--open"], t && gn["overlay--animated"], e),
|
|
1795
1795
|
style: i,
|
|
1796
1796
|
"data-state": a ? "open" : "closed",
|
|
1797
1797
|
"data-animation": r,
|
|
1798
1798
|
"aria-hidden": "true"
|
|
1799
1799
|
});
|
|
1800
1800
|
};
|
|
1801
|
-
|
|
1801
|
+
_n.displayName = "ModalOverlay";
|
|
1802
1802
|
//#endregion
|
|
1803
1803
|
//#region src/components/Modal/internal/useModalDismiss.ts
|
|
1804
|
-
var
|
|
1804
|
+
var vn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnEscape: i, closeOnOutsidePress: a, onEscapeKeyDown: o, onPointerDownOutside: s, onInteractOutside: c, requestClose: l }) => dt({
|
|
1805
1805
|
active: e,
|
|
1806
1806
|
registrationActive: t,
|
|
1807
1807
|
id: n,
|
|
@@ -1813,27 +1813,27 @@ var gn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1813
1813
|
onInteractOutside: c ? (e) => c(e) : void 0,
|
|
1814
1814
|
onPointerDownOutside: s ? (e) => s(e) : void 0,
|
|
1815
1815
|
requestClose: l
|
|
1816
|
-
}),
|
|
1817
|
-
standard:
|
|
1816
|
+
}), yn = {
|
|
1817
|
+
standard: ae.components.modal.motion.easing,
|
|
1818
1818
|
linear: "linear",
|
|
1819
1819
|
ease: "ease",
|
|
1820
1820
|
"ease-in": "ease-in",
|
|
1821
1821
|
"ease-out": "ease-out",
|
|
1822
1822
|
"ease-in-out": "ease-in-out"
|
|
1823
|
-
},
|
|
1823
|
+
}, bn = (e) => Number.parseFloat(e), xn = (e) => typeof e == "number" ? {
|
|
1824
1824
|
close: e,
|
|
1825
1825
|
open: e
|
|
1826
1826
|
} : {
|
|
1827
|
-
close: e?.close ??
|
|
1828
|
-
open: e?.open ??
|
|
1829
|
-
},
|
|
1830
|
-
let T = f(null), E = f(null), { contentId: D, descriptionId: O, open: k, requestClose: A, setOpen: j, titleId: M } =
|
|
1827
|
+
close: e?.close ?? bn(ae.components.modal.motion.closeDuration),
|
|
1828
|
+
open: e?.open ?? bn(ae.components.modal.motion.openDuration)
|
|
1829
|
+
}, Sn = ({ 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" }) => {
|
|
1830
|
+
let T = f(null), E = f(null), { contentId: D, descriptionId: O, open: k, requestClose: A, setOpen: j, titleId: M } = Ct({
|
|
1831
1831
|
open: e,
|
|
1832
1832
|
defaultOpen: t,
|
|
1833
1833
|
onOpenChange: n,
|
|
1834
1834
|
closeOnEscape: l,
|
|
1835
1835
|
closeOnOutsidePress: u
|
|
1836
|
-
}), [N, P] = p(!1), [F, I] = p(!1), [L, R] = p(0), z =
|
|
1836
|
+
}), [N, P] = p(!1), [F, I] = p(!1), [L, R] = p(0), z = xn(i), B = r === "none" ? 0 : z.close, [V, H] = p(k);
|
|
1837
1837
|
c(() => {
|
|
1838
1838
|
if (k) {
|
|
1839
1839
|
H(!0);
|
|
@@ -1855,11 +1855,11 @@ var gn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1855
1855
|
}, [A]), W = o((e) => {
|
|
1856
1856
|
T.current !== e && (T.current = e, R((e) => e + 1));
|
|
1857
1857
|
}, []);
|
|
1858
|
-
|
|
1858
|
+
gt({
|
|
1859
1859
|
active: k,
|
|
1860
1860
|
enabled: m
|
|
1861
1861
|
});
|
|
1862
|
-
let G =
|
|
1862
|
+
let G = vn({
|
|
1863
1863
|
active: k,
|
|
1864
1864
|
registrationActive: V,
|
|
1865
1865
|
id: D,
|
|
@@ -1872,7 +1872,7 @@ var gn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1872
1872
|
requestClose: U
|
|
1873
1873
|
}), ee = d(() => ({
|
|
1874
1874
|
"--modal-animation-close-duration": `${z.close}ms`,
|
|
1875
|
-
"--modal-animation-easing":
|
|
1875
|
+
"--modal-animation-easing": yn[a],
|
|
1876
1876
|
"--modal-animation-open-duration": `${z.open}ms`,
|
|
1877
1877
|
"--z-index-modal": G.zIndex === void 0 ? void 0 : `${G.zIndex}`
|
|
1878
1878
|
}), [
|
|
@@ -1880,7 +1880,7 @@ var gn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1880
1880
|
z.open,
|
|
1881
1881
|
a,
|
|
1882
1882
|
G.zIndex
|
|
1883
|
-
]), te =
|
|
1883
|
+
]), te = ft({
|
|
1884
1884
|
presentation: "modal",
|
|
1885
1885
|
animationStyle: ee
|
|
1886
1886
|
}).animationStyle ?? ee;
|
|
@@ -1963,9 +1963,9 @@ var gn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1963
1963
|
]),
|
|
1964
1964
|
open: k
|
|
1965
1965
|
};
|
|
1966
|
-
},
|
|
1967
|
-
let { context: r, open: i } =
|
|
1968
|
-
return /* @__PURE__ */ g(
|
|
1966
|
+
}, Cn = ({ children: e, className: t, ...n }) => {
|
|
1967
|
+
let { context: r, open: i } = Sn(n);
|
|
1968
|
+
return /* @__PURE__ */ g(nn, {
|
|
1969
1969
|
value: r,
|
|
1970
1970
|
children: /* @__PURE__ */ g("div", {
|
|
1971
1971
|
className: J(t),
|
|
@@ -1974,11 +1974,11 @@ var gn = ({ active: e, registrationActive: t = e, id: n, contentRef: r, closeOnE
|
|
|
1974
1974
|
})
|
|
1975
1975
|
});
|
|
1976
1976
|
};
|
|
1977
|
-
|
|
1977
|
+
Cn.displayName = "ModalRoot";
|
|
1978
1978
|
//#endregion
|
|
1979
1979
|
//#region src/components/Modal/Trigger/ModalTrigger.tsx
|
|
1980
|
-
var
|
|
1981
|
-
let o =
|
|
1980
|
+
var wn = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
1981
|
+
let o = en(), s = t && a(e) ? e : void 0, c = r, l = {
|
|
1982
1982
|
"aria-controls": o.contentId,
|
|
1983
1983
|
"aria-disabled": c || void 0,
|
|
1984
1984
|
"aria-expanded": o.open,
|
|
@@ -1986,13 +1986,13 @@ var Sn = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
|
1986
1986
|
className: J(i),
|
|
1987
1987
|
"data-state": o.open ? "open" : "closed",
|
|
1988
1988
|
disabled: c || void 0,
|
|
1989
|
-
onClick:
|
|
1989
|
+
onClick: It(s?.props.onClick, () => {
|
|
1990
1990
|
c || o.setOpen(!0);
|
|
1991
1991
|
})
|
|
1992
1992
|
};
|
|
1993
1993
|
return s ? n(s, {
|
|
1994
1994
|
...l,
|
|
1995
|
-
ref:
|
|
1995
|
+
ref: Lt(s.props.ref, o.triggerRef),
|
|
1996
1996
|
className: J(s.props.className, i)
|
|
1997
1997
|
}) : /* @__PURE__ */ g("button", {
|
|
1998
1998
|
ref: (e) => {
|
|
@@ -2003,50 +2003,50 @@ var Sn = ({ children: e, asChild: t = !1, disabled: r = !1, className: i }) => {
|
|
|
2003
2003
|
children: e
|
|
2004
2004
|
});
|
|
2005
2005
|
};
|
|
2006
|
-
|
|
2006
|
+
wn.displayName = "Modal.Trigger";
|
|
2007
2007
|
//#endregion
|
|
2008
2008
|
//#region src/components/Modal/Modal.tsx
|
|
2009
|
-
var
|
|
2010
|
-
Trigger:
|
|
2011
|
-
Overlay:
|
|
2012
|
-
Content:
|
|
2013
|
-
Header:
|
|
2014
|
-
Title:
|
|
2015
|
-
Description:
|
|
2016
|
-
Body:
|
|
2017
|
-
Footer:
|
|
2018
|
-
Close:
|
|
2009
|
+
var Tn = Object.assign(Cn, {
|
|
2010
|
+
Trigger: wn,
|
|
2011
|
+
Overlay: _n,
|
|
2012
|
+
Content: un,
|
|
2013
|
+
Header: mn,
|
|
2014
|
+
Title: hn,
|
|
2015
|
+
Description: pn,
|
|
2016
|
+
Body: on,
|
|
2017
|
+
Footer: fn,
|
|
2018
|
+
Close: cn
|
|
2019
2019
|
});
|
|
2020
|
-
|
|
2020
|
+
Tn.displayName = "Modal";
|
|
2021
2021
|
//#endregion
|
|
2022
2022
|
//#region src/components/Popover/Context/PopoverContext.tsx
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
return /* @__PURE__ */ g(
|
|
2023
|
+
var En = r(null);
|
|
2024
|
+
function Dn({ children: e, value: t }) {
|
|
2025
|
+
return /* @__PURE__ */ g(En.Provider, {
|
|
2026
2026
|
value: t,
|
|
2027
2027
|
children: e
|
|
2028
2028
|
});
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2031
|
-
let t = s(
|
|
2030
|
+
function On(e) {
|
|
2031
|
+
let t = s(En);
|
|
2032
2032
|
if (!t) throw Error(`${e} must be used within Popover.Root`);
|
|
2033
2033
|
return t;
|
|
2034
2034
|
}
|
|
2035
2035
|
//#endregion
|
|
2036
2036
|
//#region src/components/Popover/Anchor/PopoverAnchor.tsx
|
|
2037
|
-
function
|
|
2037
|
+
function kn(e, t) {
|
|
2038
2038
|
if (typeof e == "function") {
|
|
2039
2039
|
e(t);
|
|
2040
2040
|
return;
|
|
2041
2041
|
}
|
|
2042
2042
|
e && (e.current = t);
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2045
|
-
let { setAnchorRef: o } =
|
|
2044
|
+
function An({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
2045
|
+
let { setAnchorRef: o } = On("Popover.Anchor"), s = t && a(e) ? e : void 0;
|
|
2046
2046
|
return s ? n(s, {
|
|
2047
2047
|
...i,
|
|
2048
2048
|
ref: (e) => {
|
|
2049
|
-
|
|
2049
|
+
kn(s.props.ref, e), o(e);
|
|
2050
2050
|
},
|
|
2051
2051
|
className: J(s.props.className, r)
|
|
2052
2052
|
}) : /* @__PURE__ */ g("div", {
|
|
@@ -2056,15 +2056,15 @@ function On({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
|
2056
2056
|
children: e
|
|
2057
2057
|
});
|
|
2058
2058
|
}
|
|
2059
|
-
|
|
2060
|
-
var
|
|
2059
|
+
An.displayName = "Popover.Anchor";
|
|
2060
|
+
var jn = { arrow: "_arrow_6lbs0_1" }, Mn = {
|
|
2061
2061
|
start: "20%",
|
|
2062
2062
|
center: null,
|
|
2063
2063
|
end: "80%"
|
|
2064
2064
|
};
|
|
2065
|
-
function
|
|
2066
|
-
let { arrowRef: s, floatingContext: c, placement: l } =
|
|
2067
|
-
return /* @__PURE__ */ g(
|
|
2065
|
+
function Nn({ width: e = 14, height: t = 7, tipRadius: n = 1, align: r = "center", offset: i, className: a, ...o }) {
|
|
2066
|
+
let { arrowRef: s, floatingContext: c, placement: l } = On("Popover.Arrow"), u = i ?? Mn[r], d = l.split("-")[0];
|
|
2067
|
+
return /* @__PURE__ */ g(V, {
|
|
2068
2068
|
...o,
|
|
2069
2069
|
ref: s,
|
|
2070
2070
|
context: c,
|
|
@@ -2076,14 +2076,14 @@ function jn({ width: e = 14, height: t = 7, tipRadius: n = 1, align: r = "center
|
|
|
2076
2076
|
stroke: "var(--border-muted)",
|
|
2077
2077
|
strokeWidth: 1,
|
|
2078
2078
|
"data-side": d,
|
|
2079
|
-
className: J(
|
|
2079
|
+
className: J(jn.arrow, a)
|
|
2080
2080
|
});
|
|
2081
2081
|
}
|
|
2082
|
-
|
|
2082
|
+
Nn.displayName = "Popover.Arrow";
|
|
2083
2083
|
//#endregion
|
|
2084
2084
|
//#region src/components/Popover/Close/PopoverClose.tsx
|
|
2085
|
-
function
|
|
2086
|
-
let { setOpen: c } =
|
|
2085
|
+
function Pn({ children: e, asChild: t = !1, className: r, disabled: i, onClick: o, ...s }) {
|
|
2086
|
+
let { setOpen: c } = On("Popover.Close"), l = t && a(e) ? e : void 0, u = i || l?.props.disabled === !0, d = (e) => {
|
|
2087
2087
|
l?.props.onClick?.(e), o?.(e), !(e.defaultPrevented || u) && c(!1, {
|
|
2088
2088
|
reason: "close",
|
|
2089
2089
|
event: e.nativeEvent
|
|
@@ -2104,20 +2104,20 @@ function Mn({ children: e, asChild: t = !1, className: r, disabled: i, onClick:
|
|
|
2104
2104
|
children: e
|
|
2105
2105
|
});
|
|
2106
2106
|
}
|
|
2107
|
-
|
|
2108
|
-
var
|
|
2107
|
+
Pn.displayName = "Popover.Close";
|
|
2108
|
+
var Fn = {
|
|
2109
2109
|
content: "_content_1jzfn_1",
|
|
2110
2110
|
"popover-in": "_popover-in_1jzfn_1"
|
|
2111
2111
|
};
|
|
2112
2112
|
//#endregion
|
|
2113
2113
|
//#region src/components/Popover/Content/PopoverContent.tsx
|
|
2114
|
-
function
|
|
2115
|
-
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 } =
|
|
2114
|
+
function In({ 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 }) {
|
|
2115
|
+
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 } = On("Popover.Content"), [M, N] = p(null), P = o((e, t) => {
|
|
2116
2116
|
A(!1, {
|
|
2117
2117
|
reason: e,
|
|
2118
2118
|
event: t
|
|
2119
2119
|
});
|
|
2120
|
-
}, [A]), F =
|
|
2120
|
+
}, [A]), F = dt({
|
|
2121
2121
|
active: y,
|
|
2122
2122
|
id: T,
|
|
2123
2123
|
zIndexLevel: "popover",
|
|
@@ -2130,7 +2130,7 @@ function Pn({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2130
2130
|
onInteractOutside: m,
|
|
2131
2131
|
requestClose: P
|
|
2132
2132
|
});
|
|
2133
|
-
|
|
2133
|
+
Ze({
|
|
2134
2134
|
active: y,
|
|
2135
2135
|
contentRef: w,
|
|
2136
2136
|
enabled: b,
|
|
@@ -2145,10 +2145,10 @@ function Pn({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2145
2145
|
h
|
|
2146
2146
|
]),
|
|
2147
2147
|
onCloseAutoFocus: _
|
|
2148
|
-
}),
|
|
2148
|
+
}), gt({
|
|
2149
2149
|
active: y,
|
|
2150
2150
|
enabled: b
|
|
2151
|
-
}),
|
|
2151
|
+
}), Je({
|
|
2152
2152
|
active: y,
|
|
2153
2153
|
enabled: b,
|
|
2154
2154
|
content: M
|
|
@@ -2166,7 +2166,7 @@ function Pn({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2166
2166
|
"aria-describedby": D,
|
|
2167
2167
|
"data-state": "open",
|
|
2168
2168
|
"data-side": L,
|
|
2169
|
-
className: J(
|
|
2169
|
+
className: J(Fn.content, r),
|
|
2170
2170
|
style: {
|
|
2171
2171
|
...k,
|
|
2172
2172
|
zIndex: F.zIndex,
|
|
@@ -2175,7 +2175,7 @@ function Pn({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2175
2175
|
}, z = t && a(e) ? e : void 0, B = z ? n(z, {
|
|
2176
2176
|
...R,
|
|
2177
2177
|
ref: I,
|
|
2178
|
-
className: J(z.props.className,
|
|
2178
|
+
className: J(z.props.className, Fn.content, r),
|
|
2179
2179
|
style: {
|
|
2180
2180
|
...k,
|
|
2181
2181
|
zIndex: F.zIndex,
|
|
@@ -2187,33 +2187,33 @@ function Pn({ children: e, asChild: t = !1, className: r, style: i, initialFocus
|
|
|
2187
2187
|
...R,
|
|
2188
2188
|
children: e
|
|
2189
2189
|
});
|
|
2190
|
-
return x ? /* @__PURE__ */ g(
|
|
2190
|
+
return x ? /* @__PURE__ */ g(Ot, { children: B }) : B;
|
|
2191
2191
|
}
|
|
2192
|
-
|
|
2193
|
-
var
|
|
2192
|
+
In.displayName = "Popover.Content";
|
|
2193
|
+
var Ln = { description: "_description_hji8o_1" };
|
|
2194
2194
|
//#endregion
|
|
2195
2195
|
//#region src/components/Popover/Description/PopoverDescription.tsx
|
|
2196
|
-
function
|
|
2197
|
-
let { descriptionId: o } =
|
|
2196
|
+
function Rn({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
2197
|
+
let { descriptionId: o } = On("Popover.Description"), s = t && a(e) ? e : void 0;
|
|
2198
2198
|
return s ? n(s, {
|
|
2199
2199
|
...i,
|
|
2200
2200
|
id: o,
|
|
2201
|
-
className: J(s.props.className,
|
|
2201
|
+
className: J(s.props.className, Ln.description, r)
|
|
2202
2202
|
}) : /* @__PURE__ */ g("p", {
|
|
2203
2203
|
...i,
|
|
2204
2204
|
id: o,
|
|
2205
|
-
className: J(
|
|
2205
|
+
className: J(Ln.description, r),
|
|
2206
2206
|
children: e
|
|
2207
2207
|
});
|
|
2208
2208
|
}
|
|
2209
|
-
|
|
2209
|
+
Rn.displayName = "Popover.Description";
|
|
2210
2210
|
//#endregion
|
|
2211
2211
|
//#region src/components/Popover/Root/PopoverRoot.tsx
|
|
2212
|
-
function
|
|
2212
|
+
function zn(e, t) {
|
|
2213
2213
|
return t === "center" ? e : `${e}-${t}`;
|
|
2214
2214
|
}
|
|
2215
|
-
function
|
|
2216
|
-
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] =
|
|
2215
|
+
function Bn({ 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 }) {
|
|
2216
|
+
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] = bt({
|
|
2217
2217
|
value: t,
|
|
2218
2218
|
defaultValue: n,
|
|
2219
2219
|
onChange: (e) => {
|
|
@@ -2221,12 +2221,12 @@ function Rn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenCh
|
|
|
2221
2221
|
}
|
|
2222
2222
|
}), O = o((e, t) => {
|
|
2223
2223
|
b.current = t, D(e);
|
|
2224
|
-
}, [D]), k = f(null), A = d(() => [
|
|
2224
|
+
}, [D]), k = f(null), A = d(() => [H({
|
|
2225
2225
|
element: k,
|
|
2226
2226
|
padding: 8
|
|
2227
|
-
})], []), { context: j, floatingStyles: M, isPositioned: N, placement: P, setFloatingRef: F, setRef: I } =
|
|
2227
|
+
})], []), { context: j, floatingStyles: M, isPositioned: N, placement: P, setFloatingRef: F, setRef: I } = ft({
|
|
2228
2228
|
open: E,
|
|
2229
|
-
placement:
|
|
2229
|
+
placement: zn(a, s),
|
|
2230
2230
|
strategy: h,
|
|
2231
2231
|
portal: m,
|
|
2232
2232
|
offset: c + 7,
|
|
@@ -2240,7 +2240,7 @@ function Rn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenCh
|
|
|
2240
2240
|
}, [I]), z = o((e) => {
|
|
2241
2241
|
y.current = e, F(e);
|
|
2242
2242
|
}, [F]);
|
|
2243
|
-
return /* @__PURE__ */ g(
|
|
2243
|
+
return /* @__PURE__ */ g(Dn, {
|
|
2244
2244
|
value: {
|
|
2245
2245
|
open: E,
|
|
2246
2246
|
modal: r,
|
|
@@ -2265,27 +2265,27 @@ function Rn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenCh
|
|
|
2265
2265
|
children: e
|
|
2266
2266
|
});
|
|
2267
2267
|
}
|
|
2268
|
-
var
|
|
2268
|
+
var Vn = { title: "_title_1gham_1" };
|
|
2269
2269
|
//#endregion
|
|
2270
2270
|
//#region src/components/Popover/Title/PopoverTitle.tsx
|
|
2271
|
-
function
|
|
2272
|
-
let { titleId: o } =
|
|
2271
|
+
function Hn({ children: e, asChild: t = !1, className: r, ...i }) {
|
|
2272
|
+
let { titleId: o } = On("Popover.Title"), s = t && a(e) ? e : void 0;
|
|
2273
2273
|
return s ? n(s, {
|
|
2274
2274
|
...i,
|
|
2275
2275
|
id: o,
|
|
2276
|
-
className: J(s.props.className,
|
|
2276
|
+
className: J(s.props.className, Vn.title, r)
|
|
2277
2277
|
}) : /* @__PURE__ */ g("h2", {
|
|
2278
2278
|
...i,
|
|
2279
2279
|
id: o,
|
|
2280
|
-
className: J(
|
|
2280
|
+
className: J(Vn.title, r),
|
|
2281
2281
|
children: e
|
|
2282
2282
|
});
|
|
2283
2283
|
}
|
|
2284
|
-
|
|
2284
|
+
Hn.displayName = "Popover.Title";
|
|
2285
2285
|
//#endregion
|
|
2286
2286
|
//#region src/components/Popover/Trigger/PopoverTrigger.tsx
|
|
2287
|
-
function
|
|
2288
|
-
let { open: c, triggerId: l, contentId: u, setOpen: d, setTriggerRef: f } =
|
|
2287
|
+
function Un({ children: e, asChild: t = !1, disabled: r = !1, className: i, onClick: o, ...s }) {
|
|
2288
|
+
let { open: c, triggerId: l, contentId: u, setOpen: d, setTriggerRef: f } = On("Popover.Trigger"), p = t && a(e) ? e : void 0, m = r || p?.props.disabled === !0, h = {
|
|
2289
2289
|
id: l,
|
|
2290
2290
|
"aria-controls": c ? u : void 0,
|
|
2291
2291
|
"aria-expanded": c,
|
|
@@ -2318,22 +2318,22 @@ function Vn({ children: e, asChild: t = !1, disabled: r = !1, className: i, onCl
|
|
|
2318
2318
|
children: e
|
|
2319
2319
|
});
|
|
2320
2320
|
}
|
|
2321
|
-
|
|
2321
|
+
Un.displayName = "Popover.Trigger";
|
|
2322
2322
|
//#endregion
|
|
2323
2323
|
//#region src/components/Popover/Popover.tsx
|
|
2324
|
-
var
|
|
2325
|
-
Anchor:
|
|
2326
|
-
Arrow:
|
|
2327
|
-
Close:
|
|
2328
|
-
Content:
|
|
2329
|
-
Description:
|
|
2330
|
-
Title:
|
|
2331
|
-
Trigger:
|
|
2332
|
-
}),
|
|
2333
|
-
function
|
|
2334
|
-
return s(
|
|
2324
|
+
var Wn = Object.assign(Bn, {
|
|
2325
|
+
Anchor: An,
|
|
2326
|
+
Arrow: Nn,
|
|
2327
|
+
Close: Pn,
|
|
2328
|
+
Content: In,
|
|
2329
|
+
Description: Rn,
|
|
2330
|
+
Title: Hn,
|
|
2331
|
+
Trigger: Un
|
|
2332
|
+
}), Gn = r(null), Kn = Gn.Provider;
|
|
2333
|
+
function qn() {
|
|
2334
|
+
return s(Gn);
|
|
2335
2335
|
}
|
|
2336
|
-
var
|
|
2336
|
+
var Jn = {
|
|
2337
2337
|
root: "_root_goond_1",
|
|
2338
2338
|
invalid: "_invalid_goond_34",
|
|
2339
2339
|
control: "_control_goond_34",
|
|
@@ -2356,19 +2356,19 @@ var Kn = {
|
|
|
2356
2356
|
"radio-indicator-in": "_radio-indicator-in_goond_1",
|
|
2357
2357
|
content: "_content_goond_346",
|
|
2358
2358
|
error: "_error_goond_363"
|
|
2359
|
-
},
|
|
2360
|
-
primary:
|
|
2361
|
-
neutral:
|
|
2362
|
-
success:
|
|
2363
|
-
warning:
|
|
2364
|
-
danger:
|
|
2365
|
-
},
|
|
2366
|
-
let S =
|
|
2359
|
+
}, Yn = {
|
|
2360
|
+
primary: Jn.colorPrimary,
|
|
2361
|
+
neutral: Jn.colorNeutral,
|
|
2362
|
+
success: Jn.colorSuccess,
|
|
2363
|
+
warning: Jn.colorWarning,
|
|
2364
|
+
danger: Jn.colorDanger
|
|
2365
|
+
}, Xn = 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) => {
|
|
2366
|
+
let S = qn(), C = l(), w = h ?? C, T = d ? `${w}-description` : void 0, E = s ? `${w}-error` : void 0, D = [
|
|
2367
2367
|
T,
|
|
2368
2368
|
E,
|
|
2369
2369
|
S?.describedBy,
|
|
2370
2370
|
y
|
|
2371
|
-
].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] =
|
|
2371
|
+
].filter(Boolean).join(" ") || void 0, O = S !== null, [k, A] = bt({
|
|
2372
2372
|
value: t,
|
|
2373
2373
|
defaultValue: n,
|
|
2374
2374
|
onChange: c
|
|
@@ -2382,10 +2382,10 @@ var Kn = {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
};
|
|
2384
2384
|
return /* @__PURE__ */ _("div", {
|
|
2385
|
-
className: J(
|
|
2385
|
+
className: J(Jn.root, Jn[I], F && Jn.invalid, M && Jn.disabled, Yn[L], m),
|
|
2386
2386
|
children: [/* @__PURE__ */ _("label", {
|
|
2387
2387
|
htmlFor: w,
|
|
2388
|
-
className: J(
|
|
2388
|
+
className: J(Jn.wrapper, p),
|
|
2389
2389
|
children: [
|
|
2390
2390
|
/* @__PURE__ */ g("input", {
|
|
2391
2391
|
...b,
|
|
@@ -2399,55 +2399,55 @@ var Kn = {
|
|
|
2399
2399
|
required: N,
|
|
2400
2400
|
"aria-invalid": F || void 0,
|
|
2401
2401
|
"aria-describedby": D,
|
|
2402
|
-
className:
|
|
2402
|
+
className: Jn.input,
|
|
2403
2403
|
onChange: R
|
|
2404
2404
|
}),
|
|
2405
2405
|
/* @__PURE__ */ g("span", {
|
|
2406
|
-
className:
|
|
2406
|
+
className: Jn.control,
|
|
2407
2407
|
"aria-hidden": "true",
|
|
2408
2408
|
children: /* @__PURE__ */ g("span", {
|
|
2409
|
-
className: J(
|
|
2409
|
+
className: J(Jn.indicator, f && Jn.customIcon),
|
|
2410
2410
|
children: f
|
|
2411
2411
|
})
|
|
2412
2412
|
}),
|
|
2413
2413
|
(u || d) && /* @__PURE__ */ _("span", {
|
|
2414
|
-
className:
|
|
2414
|
+
className: Jn.content,
|
|
2415
2415
|
children: [u && /* @__PURE__ */ g("span", {
|
|
2416
|
-
className:
|
|
2416
|
+
className: Jn.label,
|
|
2417
2417
|
children: u
|
|
2418
2418
|
}), d && /* @__PURE__ */ g("span", {
|
|
2419
2419
|
id: T,
|
|
2420
|
-
className:
|
|
2420
|
+
className: Jn.description,
|
|
2421
2421
|
children: d
|
|
2422
2422
|
})]
|
|
2423
2423
|
})
|
|
2424
2424
|
]
|
|
2425
2425
|
}), s && /* @__PURE__ */ g("div", {
|
|
2426
2426
|
id: E,
|
|
2427
|
-
className:
|
|
2427
|
+
className: Jn.error,
|
|
2428
2428
|
children: s
|
|
2429
2429
|
})]
|
|
2430
2430
|
});
|
|
2431
2431
|
});
|
|
2432
|
-
|
|
2432
|
+
Xn.displayName = "Radio";
|
|
2433
2433
|
//#endregion
|
|
2434
2434
|
//#region src/components/RadioGroup/Item/RadioGroupItem.tsx
|
|
2435
|
-
var
|
|
2435
|
+
var Zn = i((e, t) => /* @__PURE__ */ g(Xn, {
|
|
2436
2436
|
...e,
|
|
2437
2437
|
ref: t
|
|
2438
2438
|
}));
|
|
2439
|
-
|
|
2439
|
+
Zn.displayName = "RadioGroup.Item";
|
|
2440
2440
|
//#endregion
|
|
2441
2441
|
//#region src/components/RadioGroup/internal/useRadioGroupCollection.ts
|
|
2442
|
-
var
|
|
2442
|
+
var Qn = (e) => {
|
|
2443
2443
|
let t = e.current;
|
|
2444
2444
|
return t ? Array.from(t.querySelectorAll("input[type=\"radio\"]")) : [];
|
|
2445
|
-
},
|
|
2446
|
-
function
|
|
2445
|
+
}, $n = (e) => Qn(e).filter((e) => !e.disabled), er = ["ArrowLeft", "ArrowRight"], tr = ["ArrowUp", "ArrowDown"];
|
|
2446
|
+
function nr({ rootRef: e, orientation: t }) {
|
|
2447
2447
|
return o((n) => {
|
|
2448
|
-
let r =
|
|
2448
|
+
let r = er.includes(n.key), i = tr.includes(n.key), a = n.key === "Home" || n.key === "End";
|
|
2449
2449
|
if (!r && !i && !a || t === "horizontal" && i || t === "vertical" && r) return;
|
|
2450
|
-
let o =
|
|
2450
|
+
let o = $n(e);
|
|
2451
2451
|
if (o.length === 0) return;
|
|
2452
2452
|
n.preventDefault();
|
|
2453
2453
|
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;
|
|
@@ -2456,7 +2456,7 @@ function er({ rootRef: e, orientation: t }) {
|
|
|
2456
2456
|
f?.focus(), f?.click();
|
|
2457
2457
|
}, [t, e]);
|
|
2458
2458
|
}
|
|
2459
|
-
var
|
|
2459
|
+
var rr = {
|
|
2460
2460
|
root: "_root_1s3vp_1",
|
|
2461
2461
|
sm: "_sm_1s3vp_32",
|
|
2462
2462
|
md: "_md_1s3vp_58",
|
|
@@ -2470,12 +2470,12 @@ var tr = {
|
|
|
2470
2470
|
error: "_error_1s3vp_152",
|
|
2471
2471
|
disabled: "_disabled_1s3vp_160",
|
|
2472
2472
|
invalid: "_invalid_1s3vp_176"
|
|
2473
|
-
},
|
|
2474
|
-
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] =
|
|
2473
|
+
}, ir = 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) => {
|
|
2474
|
+
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] = bt({
|
|
2475
2475
|
value: e,
|
|
2476
2476
|
defaultValue: t,
|
|
2477
2477
|
onChange: n
|
|
2478
|
-
}), N = a || !!p, P =
|
|
2478
|
+
}), N = a || !!p, P = nr({
|
|
2479
2479
|
rootRef: C,
|
|
2480
2480
|
orientation: m
|
|
2481
2481
|
}), F = (e) => {
|
|
@@ -2498,23 +2498,23 @@ var tr = {
|
|
|
2498
2498
|
onKeyDown: (e) => {
|
|
2499
2499
|
b?.(e), e.defaultPrevented || P(e);
|
|
2500
2500
|
},
|
|
2501
|
-
className: J(
|
|
2501
|
+
className: J(rr.root, rr[o], N && rr.invalid, r && rr.disabled, v),
|
|
2502
2502
|
children: [
|
|
2503
2503
|
u && /* @__PURE__ */ _("div", {
|
|
2504
2504
|
id: E,
|
|
2505
|
-
className:
|
|
2505
|
+
className: rr.label,
|
|
2506
2506
|
children: [u, i && /* @__PURE__ */ g("span", {
|
|
2507
|
-
className:
|
|
2507
|
+
className: rr.required,
|
|
2508
2508
|
"aria-hidden": "true",
|
|
2509
2509
|
children: "*"
|
|
2510
2510
|
})]
|
|
2511
2511
|
}),
|
|
2512
2512
|
d && /* @__PURE__ */ g("div", {
|
|
2513
2513
|
id: D,
|
|
2514
|
-
className:
|
|
2514
|
+
className: rr.description,
|
|
2515
2515
|
children: d
|
|
2516
2516
|
}),
|
|
2517
|
-
/* @__PURE__ */ g(
|
|
2517
|
+
/* @__PURE__ */ g(Kn, {
|
|
2518
2518
|
value: {
|
|
2519
2519
|
name: A,
|
|
2520
2520
|
value: j,
|
|
@@ -2527,35 +2527,35 @@ var tr = {
|
|
|
2527
2527
|
onValueChange: M
|
|
2528
2528
|
},
|
|
2529
2529
|
children: /* @__PURE__ */ g("div", {
|
|
2530
|
-
className: J(
|
|
2530
|
+
className: J(rr.items, rr[m]),
|
|
2531
2531
|
children: h
|
|
2532
2532
|
})
|
|
2533
2533
|
}),
|
|
2534
2534
|
p && /* @__PURE__ */ g("div", {
|
|
2535
2535
|
id: O,
|
|
2536
|
-
className:
|
|
2536
|
+
className: rr.error,
|
|
2537
2537
|
children: p
|
|
2538
2538
|
})
|
|
2539
2539
|
]
|
|
2540
2540
|
});
|
|
2541
2541
|
});
|
|
2542
|
-
|
|
2542
|
+
ir.displayName = "RadioGroup.Root";
|
|
2543
2543
|
//#endregion
|
|
2544
2544
|
//#region src/components/RadioGroup/RadioGroup.tsx
|
|
2545
|
-
var
|
|
2546
|
-
|
|
2545
|
+
var ar = Object.assign(ir, { Item: Zn });
|
|
2546
|
+
ar.displayName = "RadioGroup";
|
|
2547
2547
|
//#endregion
|
|
2548
2548
|
//#region src/components/Select/internal/SelectContext.tsx
|
|
2549
|
-
var
|
|
2550
|
-
function
|
|
2551
|
-
let e = s(
|
|
2549
|
+
var or = r(null), sr = or.Provider;
|
|
2550
|
+
function cr() {
|
|
2551
|
+
let e = s(or);
|
|
2552
2552
|
if (!e) throw Error("Select compound components must be used inside <Select>");
|
|
2553
2553
|
return e;
|
|
2554
2554
|
}
|
|
2555
|
-
|
|
2555
|
+
or.displayName = "SelectContext";
|
|
2556
2556
|
//#endregion
|
|
2557
2557
|
//#region src/components/Select/internal/SelectVirtualization.ts
|
|
2558
|
-
function
|
|
2558
|
+
function lr({ loading: e, options: t, scrollTop: n, virtual: r, viewportHeight: i }) {
|
|
2559
2559
|
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;
|
|
2560
2560
|
return {
|
|
2561
2561
|
bottomSpacerHeight: l ? Math.max(0, (t.length - u - f.length) * o) : 0,
|
|
@@ -2571,13 +2571,13 @@ function sr({ loading: e, options: t, scrollTop: n, virtual: r, viewportHeight:
|
|
|
2571
2571
|
}
|
|
2572
2572
|
//#endregion
|
|
2573
2573
|
//#region src/components/Select/internal/types.ts
|
|
2574
|
-
function
|
|
2575
|
-
return
|
|
2574
|
+
function ur(e, t) {
|
|
2575
|
+
return F(e, t);
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2578
|
-
return
|
|
2577
|
+
function dr(e) {
|
|
2578
|
+
return N(e);
|
|
2579
2579
|
}
|
|
2580
|
-
var
|
|
2580
|
+
var fr = {
|
|
2581
2581
|
option: "_option_7msws_1",
|
|
2582
2582
|
selected: "_selected_7msws_38",
|
|
2583
2583
|
disabled: "_disabled_7msws_38",
|
|
@@ -2595,18 +2595,18 @@ var ur = {
|
|
|
2595
2595
|
danger: "_danger_7msws_313",
|
|
2596
2596
|
check: "_check_7msws_377",
|
|
2597
2597
|
checkPop: "_checkPop_7msws_1"
|
|
2598
|
-
},
|
|
2599
|
-
|
|
2600
|
-
var
|
|
2601
|
-
let f = !!e.disabled, p = e.asChild && a(e.children) ? e.children : void 0, m = J(
|
|
2602
|
-
[
|
|
2603
|
-
[
|
|
2604
|
-
[
|
|
2605
|
-
[
|
|
2606
|
-
[
|
|
2607
|
-
[
|
|
2598
|
+
}, pr = () => null;
|
|
2599
|
+
ur(pr, "item"), pr.displayName = "Select.Item";
|
|
2600
|
+
var mr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o, selectedValues: s, multiple: c, renderOption: l, onSelect: u, onMouseEnter: d }) => {
|
|
2601
|
+
let f = !!e.disabled, p = e.asChild && a(e.children) ? e.children : void 0, m = J(fr.option, {
|
|
2602
|
+
[fr.selected]: t,
|
|
2603
|
+
[fr.active]: r,
|
|
2604
|
+
[fr.disabled]: f,
|
|
2605
|
+
[fr.success]: e.color === "success",
|
|
2606
|
+
[fr.warning]: e.color === "warning",
|
|
2607
|
+
[fr.danger]: e.color === "danger"
|
|
2608
2608
|
});
|
|
2609
|
-
|
|
2609
|
+
Pe(!e.asChild || !!p, "Select.Item: asChild requires a single valid React element child.");
|
|
2610
2610
|
let y = (t) => {
|
|
2611
2611
|
if (f) {
|
|
2612
2612
|
t.preventDefault();
|
|
@@ -2638,7 +2638,7 @@ var fr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o,
|
|
|
2638
2638
|
onClick: y,
|
|
2639
2639
|
onMouseEnter: b,
|
|
2640
2640
|
children: [l ? /* @__PURE__ */ g("span", {
|
|
2641
|
-
className:
|
|
2641
|
+
className: fr.custom,
|
|
2642
2642
|
children: l({
|
|
2643
2643
|
option: e,
|
|
2644
2644
|
selected: t,
|
|
@@ -2651,36 +2651,36 @@ var fr = ({ option: e, isSelected: t, isActive: r, optionId: i, optionIndex: o,
|
|
|
2651
2651
|
})
|
|
2652
2652
|
}) : /* @__PURE__ */ _(h, { children: [
|
|
2653
2653
|
e.icon && /* @__PURE__ */ g("span", {
|
|
2654
|
-
className:
|
|
2654
|
+
className: fr.icon,
|
|
2655
2655
|
children: e.icon
|
|
2656
2656
|
}),
|
|
2657
2657
|
/* @__PURE__ */ _("span", {
|
|
2658
|
-
className:
|
|
2658
|
+
className: fr.content,
|
|
2659
2659
|
children: [/* @__PURE__ */ g("span", {
|
|
2660
|
-
className:
|
|
2660
|
+
className: fr.label,
|
|
2661
2661
|
children: e.label
|
|
2662
2662
|
}), e.description && /* @__PURE__ */ g("span", {
|
|
2663
|
-
className:
|
|
2663
|
+
className: fr.description,
|
|
2664
2664
|
children: e.description
|
|
2665
2665
|
})]
|
|
2666
2666
|
}),
|
|
2667
2667
|
e.badge && /* @__PURE__ */ g("span", {
|
|
2668
|
-
className:
|
|
2668
|
+
className: fr.badge,
|
|
2669
2669
|
children: e.badge
|
|
2670
2670
|
}),
|
|
2671
2671
|
e.shortcut && /* @__PURE__ */ g("kbd", {
|
|
2672
|
-
className:
|
|
2672
|
+
className: fr.shortcut,
|
|
2673
2673
|
children: e.shortcut
|
|
2674
2674
|
})
|
|
2675
2675
|
] }), /* @__PURE__ */ g("span", {
|
|
2676
|
-
className:
|
|
2676
|
+
className: fr.check,
|
|
2677
2677
|
"aria-hidden": "true",
|
|
2678
2678
|
children: t && /* @__PURE__ */ g(v, {})
|
|
2679
2679
|
})]
|
|
2680
2680
|
});
|
|
2681
2681
|
};
|
|
2682
|
-
|
|
2683
|
-
var
|
|
2682
|
+
mr.displayName = "SelectItemRow";
|
|
2683
|
+
var hr = {
|
|
2684
2684
|
dropdown: "_dropdown_1lvgh_1",
|
|
2685
2685
|
dropdownIn: "_dropdownIn_1lvgh_1",
|
|
2686
2686
|
primary: "_primary_1lvgh_103",
|
|
@@ -2705,17 +2705,17 @@ var pr = {
|
|
|
2705
2705
|
separator: "_separator_1lvgh_1575",
|
|
2706
2706
|
virtualSpacer: "_virtualSpacer_1lvgh_1581",
|
|
2707
2707
|
mobileDropdownIn: "_mobileDropdownIn_1lvgh_1"
|
|
2708
|
-
},
|
|
2709
|
-
let { contentProps: n } =
|
|
2710
|
-
return /* @__PURE__ */ g(
|
|
2708
|
+
}, gr = ({ children: e, className: t }) => {
|
|
2709
|
+
let { contentProps: n } = cr(), r = vr(e);
|
|
2710
|
+
return /* @__PURE__ */ g(_r, {
|
|
2711
2711
|
...n,
|
|
2712
2712
|
...r,
|
|
2713
2713
|
className: [n.className, t].filter(Boolean).join(" ")
|
|
2714
2714
|
});
|
|
2715
2715
|
};
|
|
2716
|
-
|
|
2717
|
-
var
|
|
2718
|
-
let H = f(null), U = f(!1), [W, G] = p(null), [ee, te] = p(0), [ne, K] = p(), { bottomSpacerHeight: re, isVirtual:
|
|
2716
|
+
ur(gr, "content"), gr.displayName = "Select.Content";
|
|
2717
|
+
var _r = ({ 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 }) => {
|
|
2718
|
+
let H = f(null), U = f(!1), [W, G] = p(null), [ee, te] = p(0), [ne, K] = p(), { bottomSpacerHeight: re, isVirtual: q, itemHeight: ie, maxHeight: ae, startIndex: oe, topSpacerHeight: se, viewportHeight: ce, visibleOptions: le } = d(() => lr({
|
|
2719
2719
|
loading: E,
|
|
2720
2720
|
options: a,
|
|
2721
2721
|
scrollTop: ee,
|
|
@@ -2727,7 +2727,7 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2727
2727
|
ee,
|
|
2728
2728
|
ne,
|
|
2729
2729
|
S
|
|
2730
|
-
]),
|
|
2730
|
+
]), ue = o((e) => {
|
|
2731
2731
|
G(e), r(e), e && K(e.clientHeight || void 0);
|
|
2732
2732
|
}, [r]);
|
|
2733
2733
|
c(() => {
|
|
@@ -2751,8 +2751,8 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2751
2751
|
U.current = !0;
|
|
2752
2752
|
return;
|
|
2753
2753
|
}
|
|
2754
|
-
if (U.current = !0,
|
|
2755
|
-
let e = Math.max(0, r *
|
|
2754
|
+
if (U.current = !0, q) {
|
|
2755
|
+
let e = Math.max(0, r * ie - (ce - ie) / 2);
|
|
2756
2756
|
te(e), W.scrollTop = e;
|
|
2757
2757
|
return;
|
|
2758
2758
|
}
|
|
@@ -2761,45 +2761,45 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2761
2761
|
F,
|
|
2762
2762
|
W,
|
|
2763
2763
|
e,
|
|
2764
|
+
q,
|
|
2764
2765
|
ie,
|
|
2765
|
-
ae,
|
|
2766
2766
|
t,
|
|
2767
2767
|
E,
|
|
2768
2768
|
a,
|
|
2769
2769
|
P,
|
|
2770
2770
|
u,
|
|
2771
|
-
|
|
2771
|
+
ce
|
|
2772
2772
|
]);
|
|
2773
|
-
let
|
|
2773
|
+
let de = d(() => ({
|
|
2774
2774
|
...i,
|
|
2775
|
-
"--select-dropdown-max-height": typeof
|
|
2776
|
-
}), [
|
|
2775
|
+
"--select-dropdown-max-height": typeof ae == "number" ? `${ae}px` : ae
|
|
2776
|
+
}), [ae, i]);
|
|
2777
2777
|
if (!e) return null;
|
|
2778
|
-
let fe = s && !
|
|
2778
|
+
let fe = s && !q ? s : le.map((e, t) => ({
|
|
2779
2779
|
type: "option",
|
|
2780
2780
|
option: e,
|
|
2781
|
-
optionIndex:
|
|
2782
|
-
})),
|
|
2783
|
-
ref:
|
|
2781
|
+
optionIndex: oe + t
|
|
2782
|
+
})), pe = /* @__PURE__ */ _("div", {
|
|
2783
|
+
ref: ue,
|
|
2784
2784
|
tabIndex: 0,
|
|
2785
2785
|
className: [
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
b ?
|
|
2786
|
+
hr.dropdown,
|
|
2787
|
+
hr[m],
|
|
2788
|
+
hr[v],
|
|
2789
|
+
b ? hr.command : void 0,
|
|
2790
2790
|
L
|
|
2791
2791
|
].filter(Boolean).join(" "),
|
|
2792
|
-
style:
|
|
2792
|
+
style: de,
|
|
2793
2793
|
onScroll: (e) => {
|
|
2794
|
-
|
|
2794
|
+
q && te(e.currentTarget.scrollTop);
|
|
2795
2795
|
},
|
|
2796
2796
|
children: [
|
|
2797
2797
|
A,
|
|
2798
2798
|
k ?? (y && /* @__PURE__ */ _("div", {
|
|
2799
|
-
className:
|
|
2799
|
+
className: hr.searchWrap,
|
|
2800
2800
|
children: [/* @__PURE__ */ g("input", {
|
|
2801
2801
|
ref: H,
|
|
2802
|
-
className:
|
|
2802
|
+
className: hr.search,
|
|
2803
2803
|
value: w,
|
|
2804
2804
|
placeholder: b ? "Type a command..." : T,
|
|
2805
2805
|
"aria-label": "Search options",
|
|
@@ -2807,7 +2807,7 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2807
2807
|
onChange: (e) => V?.(e.target.value)
|
|
2808
2808
|
}), w && /* @__PURE__ */ g("button", {
|
|
2809
2809
|
type: "button",
|
|
2810
|
-
className:
|
|
2810
|
+
className: hr.searchClear,
|
|
2811
2811
|
"aria-label": "Clear search",
|
|
2812
2812
|
onClick: () => {
|
|
2813
2813
|
V?.(""), H.current?.focus();
|
|
@@ -2824,13 +2824,13 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2824
2824
|
role: "option",
|
|
2825
2825
|
"aria-disabled": "true",
|
|
2826
2826
|
"aria-selected": "false",
|
|
2827
|
-
className:
|
|
2827
|
+
className: hr.empty,
|
|
2828
2828
|
children: M ?? D
|
|
2829
2829
|
}) : a.length ? /* @__PURE__ */ _(h, { children: [
|
|
2830
|
-
|
|
2830
|
+
q && /* @__PURE__ */ g("li", {
|
|
2831
2831
|
"aria-hidden": "true",
|
|
2832
|
-
className:
|
|
2833
|
-
style: { height:
|
|
2832
|
+
className: hr.virtualSpacer,
|
|
2833
|
+
style: { height: se }
|
|
2834
2834
|
}),
|
|
2835
2835
|
fe.map((e) => {
|
|
2836
2836
|
if (e.type === "group") {
|
|
@@ -2840,16 +2840,16 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2840
2840
|
role: "presentation",
|
|
2841
2841
|
children: /* @__PURE__ */ _("button", {
|
|
2842
2842
|
type: "button",
|
|
2843
|
-
className:
|
|
2844
|
-
"aria-label":
|
|
2843
|
+
className: hr.groupAction,
|
|
2844
|
+
"aria-label": yr(e.selectLabel ?? e.label),
|
|
2845
2845
|
"aria-pressed": i ? "mixed" : r ? "true" : "false",
|
|
2846
2846
|
disabled: t.length === 0,
|
|
2847
2847
|
onClick: () => z(t),
|
|
2848
2848
|
children: [/* @__PURE__ */ g("span", {
|
|
2849
|
-
className:
|
|
2849
|
+
className: hr.groupActionText,
|
|
2850
2850
|
children: e.selectLabel ?? e.label
|
|
2851
2851
|
}), /* @__PURE__ */ _("span", {
|
|
2852
|
-
className:
|
|
2852
|
+
className: hr.groupActionMeta,
|
|
2853
2853
|
children: [
|
|
2854
2854
|
n,
|
|
2855
2855
|
"/",
|
|
@@ -2861,18 +2861,18 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2861
2861
|
}
|
|
2862
2862
|
return /* @__PURE__ */ g("li", {
|
|
2863
2863
|
role: "presentation",
|
|
2864
|
-
className:
|
|
2864
|
+
className: hr.groupLabel,
|
|
2865
2865
|
children: e.label
|
|
2866
2866
|
}, e.id);
|
|
2867
2867
|
}
|
|
2868
2868
|
if (e.type === "separator") return /* @__PURE__ */ g("li", {
|
|
2869
2869
|
role: "presentation",
|
|
2870
2870
|
"aria-hidden": "true",
|
|
2871
|
-
className:
|
|
2871
|
+
className: hr.separator,
|
|
2872
2872
|
"data-vellira-select-separator": "true"
|
|
2873
2873
|
}, e.id);
|
|
2874
2874
|
let { option: n, optionIndex: r } = e;
|
|
2875
|
-
return /* @__PURE__ */ g(
|
|
2875
|
+
return /* @__PURE__ */ g(mr, {
|
|
2876
2876
|
option: n,
|
|
2877
2877
|
isSelected: u ? u.includes(n.value) : n.value === P,
|
|
2878
2878
|
isActive: r === I,
|
|
@@ -2885,29 +2885,29 @@ var hr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2885
2885
|
onMouseEnter: () => B(r)
|
|
2886
2886
|
}, n.value);
|
|
2887
2887
|
}),
|
|
2888
|
-
|
|
2888
|
+
q && /* @__PURE__ */ g("li", {
|
|
2889
2889
|
"aria-hidden": "true",
|
|
2890
|
-
className:
|
|
2890
|
+
className: hr.virtualSpacer,
|
|
2891
2891
|
style: { height: re }
|
|
2892
2892
|
})
|
|
2893
2893
|
] }) : /* @__PURE__ */ g("li", {
|
|
2894
2894
|
role: "option",
|
|
2895
2895
|
"aria-disabled": "true",
|
|
2896
2896
|
"aria-selected": "false",
|
|
2897
|
-
className:
|
|
2897
|
+
className: hr.empty,
|
|
2898
2898
|
children: j ?? O
|
|
2899
2899
|
})
|
|
2900
2900
|
})
|
|
2901
2901
|
]
|
|
2902
2902
|
});
|
|
2903
|
-
return C ? /* @__PURE__ */ g(
|
|
2903
|
+
return C ? /* @__PURE__ */ g(Ot, { children: pe }) : pe;
|
|
2904
2904
|
};
|
|
2905
|
-
|
|
2906
|
-
function
|
|
2905
|
+
_r.displayName = "SelectContentSurface";
|
|
2906
|
+
function vr(t) {
|
|
2907
2907
|
let n, r, i, o;
|
|
2908
2908
|
return e.forEach(t, (e) => {
|
|
2909
2909
|
if (!a(e)) return;
|
|
2910
|
-
let t =
|
|
2910
|
+
let t = dr(e.type);
|
|
2911
2911
|
t === "label" && (n = e), t === "search" && (r = e), t === "empty" && (i = e), t === "loading" && (o = e);
|
|
2912
2912
|
}), {
|
|
2913
2913
|
emptySlot: i,
|
|
@@ -2916,17 +2916,17 @@ function gr(t) {
|
|
|
2916
2916
|
searchSlot: r
|
|
2917
2917
|
};
|
|
2918
2918
|
}
|
|
2919
|
-
function
|
|
2919
|
+
function yr(e) {
|
|
2920
2920
|
return typeof e == "string" || typeof e == "number" ? String(e) : "Select group";
|
|
2921
2921
|
}
|
|
2922
2922
|
//#endregion
|
|
2923
2923
|
//#region src/components/Select/Empty/SelectEmpty.tsx
|
|
2924
|
-
var
|
|
2925
|
-
|
|
2924
|
+
var br = ({ children: e }) => /* @__PURE__ */ g(h, { children: e });
|
|
2925
|
+
ur(br, "empty"), br.displayName = "Select.Empty";
|
|
2926
2926
|
//#endregion
|
|
2927
2927
|
//#region src/components/Select/Group/SelectGroup.tsx
|
|
2928
|
-
var
|
|
2929
|
-
|
|
2928
|
+
var xr = () => null;
|
|
2929
|
+
ur(xr, "group"), xr.displayName = "Select.Group";
|
|
2930
2930
|
var Z = {
|
|
2931
2931
|
root: "_root_jn0gk_1",
|
|
2932
2932
|
control: "_control_jn0gk_8",
|
|
@@ -2955,51 +2955,51 @@ var Z = {
|
|
|
2955
2955
|
spin: "_spin_jn0gk_817",
|
|
2956
2956
|
loading: "_loading_jn0gk_826",
|
|
2957
2957
|
open: "_open_jn0gk_845"
|
|
2958
|
-
},
|
|
2959
|
-
let { triggerProps: n } =
|
|
2958
|
+
}, Sr = ({ children: e, className: t }) => {
|
|
2959
|
+
let { triggerProps: n } = cr();
|
|
2960
2960
|
return /* @__PURE__ */ g("span", {
|
|
2961
2961
|
className: J(Z.arrow, { [Z.open]: n.isOpen }, t),
|
|
2962
2962
|
"aria-hidden": "true",
|
|
2963
2963
|
children: n.loading ? /* @__PURE__ */ g("span", { className: Z.spinner }) : e ?? n.endIcon ?? /* @__PURE__ */ g(y, {})
|
|
2964
2964
|
});
|
|
2965
2965
|
};
|
|
2966
|
-
|
|
2966
|
+
ur(Sr, "icon"), Sr.displayName = "Select.Icon";
|
|
2967
2967
|
//#endregion
|
|
2968
2968
|
//#region src/components/Select/ItemBadge/SelectItemBadge.tsx
|
|
2969
|
-
var
|
|
2970
|
-
|
|
2969
|
+
var Cr = () => null;
|
|
2970
|
+
ur(Cr, "itemBadge"), Cr.displayName = "Select.ItemBadge";
|
|
2971
2971
|
//#endregion
|
|
2972
2972
|
//#region src/components/Select/ItemDescription/SelectItemDescription.tsx
|
|
2973
|
-
var
|
|
2974
|
-
|
|
2973
|
+
var wr = () => null;
|
|
2974
|
+
ur(wr, "itemDescription"), wr.displayName = "Select.ItemDescription";
|
|
2975
2975
|
//#endregion
|
|
2976
2976
|
//#region src/components/Select/ItemIcon/SelectItemIcon.tsx
|
|
2977
|
-
var
|
|
2978
|
-
|
|
2977
|
+
var Tr = () => null;
|
|
2978
|
+
ur(Tr, "itemIcon"), Tr.displayName = "Select.ItemIcon";
|
|
2979
2979
|
//#endregion
|
|
2980
2980
|
//#region src/components/Select/Label/SelectLabel.tsx
|
|
2981
|
-
var
|
|
2981
|
+
var Er = ({ children: e }) => /* @__PURE__ */ g("div", {
|
|
2982
2982
|
role: "presentation",
|
|
2983
|
-
className:
|
|
2983
|
+
className: hr.groupLabel,
|
|
2984
2984
|
children: e
|
|
2985
2985
|
});
|
|
2986
|
-
|
|
2986
|
+
ur(Er, "label"), Er.displayName = "Select.Label";
|
|
2987
2987
|
//#endregion
|
|
2988
2988
|
//#region src/components/Select/Loading/SelectLoading.tsx
|
|
2989
|
-
var
|
|
2990
|
-
|
|
2989
|
+
var Dr = ({ children: e }) => /* @__PURE__ */ g(h, { children: e });
|
|
2990
|
+
ur(Dr, "loading"), Dr.displayName = "Select.Loading";
|
|
2991
2991
|
//#endregion
|
|
2992
2992
|
//#region src/components/Select/Trigger/SelectTrigger.tsx
|
|
2993
|
-
var
|
|
2994
|
-
let { triggerProps: n } =
|
|
2995
|
-
return /* @__PURE__ */ g(
|
|
2993
|
+
var Or = ({ children: e, className: t }) => {
|
|
2994
|
+
let { triggerProps: n } = cr();
|
|
2995
|
+
return /* @__PURE__ */ g(kr, {
|
|
2996
2996
|
...n,
|
|
2997
2997
|
className: [n.className, t].filter(Boolean).join(" "),
|
|
2998
2998
|
children: e
|
|
2999
2999
|
});
|
|
3000
3000
|
};
|
|
3001
|
-
|
|
3002
|
-
var
|
|
3001
|
+
ur(Or, "trigger"), Or.displayName = "Select.Trigger";
|
|
3002
|
+
var kr = ({ 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", {
|
|
3003
3003
|
className: Z.root,
|
|
3004
3004
|
children: [/* @__PURE__ */ g("button", {
|
|
3005
3005
|
id: t,
|
|
@@ -3063,17 +3063,17 @@ var Dr = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabl
|
|
|
3063
3063
|
children: /* @__PURE__ */ g(x, {})
|
|
3064
3064
|
})]
|
|
3065
3065
|
});
|
|
3066
|
-
|
|
3066
|
+
kr.displayName = "SelectTriggerSurface";
|
|
3067
3067
|
//#endregion
|
|
3068
3068
|
//#region src/components/Select/internal/SelectCollection.ts
|
|
3069
|
-
function
|
|
3069
|
+
function Ar(t) {
|
|
3070
3070
|
let n = [], r = [], i = 0;
|
|
3071
3071
|
function o(t) {
|
|
3072
3072
|
e.forEach(t, (e) => {
|
|
3073
3073
|
if (!a(e)) return;
|
|
3074
|
-
let t =
|
|
3074
|
+
let t = dr(e.type);
|
|
3075
3075
|
if (t === "group") {
|
|
3076
|
-
let t = e.props, r =
|
|
3076
|
+
let t = e.props, r = Mr(t.children);
|
|
3077
3077
|
n.push({
|
|
3078
3078
|
type: "group",
|
|
3079
3079
|
id: `group-${i++}`,
|
|
@@ -3085,7 +3085,7 @@ function Or(t) {
|
|
|
3085
3085
|
return;
|
|
3086
3086
|
}
|
|
3087
3087
|
if (t === "item") {
|
|
3088
|
-
let t = e.props, i =
|
|
3088
|
+
let t = e.props, i = Nr(t.children, t.value), a = t.label ?? i.label, o = r.length, s = {
|
|
3089
3089
|
asChild: t.asChild,
|
|
3090
3090
|
children: t.children,
|
|
3091
3091
|
label: a,
|
|
@@ -3119,12 +3119,12 @@ function Or(t) {
|
|
|
3119
3119
|
options: r
|
|
3120
3120
|
};
|
|
3121
3121
|
}
|
|
3122
|
-
function
|
|
3122
|
+
function jr(t) {
|
|
3123
3123
|
let n = !1;
|
|
3124
3124
|
function r(t) {
|
|
3125
3125
|
e.forEach(t, (e) => {
|
|
3126
3126
|
if (!a(e) || n) return;
|
|
3127
|
-
let t =
|
|
3127
|
+
let t = dr(e.type);
|
|
3128
3128
|
if (t === "trigger" || t === "content") {
|
|
3129
3129
|
n = !0;
|
|
3130
3130
|
return;
|
|
@@ -3134,12 +3134,12 @@ function kr(t) {
|
|
|
3134
3134
|
}
|
|
3135
3135
|
return r(t), n;
|
|
3136
3136
|
}
|
|
3137
|
-
function
|
|
3137
|
+
function Mr(t) {
|
|
3138
3138
|
let n = [];
|
|
3139
3139
|
function r(t) {
|
|
3140
3140
|
e.forEach(t, (e) => {
|
|
3141
3141
|
if (a(e)) {
|
|
3142
|
-
if (
|
|
3142
|
+
if (dr(e.type) === "item") {
|
|
3143
3143
|
n.push(e.props.value);
|
|
3144
3144
|
return;
|
|
3145
3145
|
}
|
|
@@ -3149,7 +3149,7 @@ function Ar(t) {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
return r(t), n;
|
|
3151
3151
|
}
|
|
3152
|
-
function
|
|
3152
|
+
function Nr(t, n) {
|
|
3153
3153
|
let r, i, o, s = [];
|
|
3154
3154
|
function c(t) {
|
|
3155
3155
|
e.forEach(t, (e) => {
|
|
@@ -3158,7 +3158,7 @@ function jr(t, n) {
|
|
|
3158
3158
|
return;
|
|
3159
3159
|
}
|
|
3160
3160
|
if (!a(e)) return;
|
|
3161
|
-
let t =
|
|
3161
|
+
let t = dr(e.type);
|
|
3162
3162
|
if (t === "itemBadge") {
|
|
3163
3163
|
r = e.props.children;
|
|
3164
3164
|
return;
|
|
@@ -3185,22 +3185,22 @@ function jr(t, n) {
|
|
|
3185
3185
|
}
|
|
3186
3186
|
//#endregion
|
|
3187
3187
|
//#region src/components/Select/internal/SelectSearch.ts
|
|
3188
|
-
function
|
|
3188
|
+
function Pr({ options: e, searchable: t, searchValue: n }) {
|
|
3189
3189
|
if (!t || !n) return e;
|
|
3190
3190
|
let r = n.toLocaleLowerCase();
|
|
3191
|
-
return e.filter((e) => `${e.label} ${
|
|
3191
|
+
return e.filter((e) => `${e.label} ${Fr(e.description)}`.toLocaleLowerCase().includes(r));
|
|
3192
3192
|
}
|
|
3193
|
-
function
|
|
3193
|
+
function Fr(e) {
|
|
3194
3194
|
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
3195
3195
|
}
|
|
3196
3196
|
//#endregion
|
|
3197
3197
|
//#region src/components/Select/internal/useSelectCollection.ts
|
|
3198
|
-
function
|
|
3199
|
-
return d(() =>
|
|
3198
|
+
function Ir(e) {
|
|
3199
|
+
return d(() => Ar(e), [e]);
|
|
3200
3200
|
}
|
|
3201
3201
|
//#endregion
|
|
3202
3202
|
//#region src/patterns/FormField/FormFieldContext.ts
|
|
3203
|
-
var
|
|
3203
|
+
var Lr = r(null), Rr = () => s(Lr), zr = {
|
|
3204
3204
|
wrapper: "_wrapper_r078u_1",
|
|
3205
3205
|
sm: "_sm_r078u_41",
|
|
3206
3206
|
md: "_md_r078u_78",
|
|
@@ -3222,12 +3222,12 @@ var Fr = r(null), Ir = () => s(Fr), Lr = {
|
|
|
3222
3222
|
messageToneWarning: "_messageToneWarning_r078u_257",
|
|
3223
3223
|
messageToneDanger: "_messageToneDanger_r078u_261",
|
|
3224
3224
|
disabled: "_disabled_r078u_274"
|
|
3225
|
-
},
|
|
3226
|
-
function
|
|
3225
|
+
}, Br = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
3226
|
+
function Vr(e, t) {
|
|
3227
3227
|
let n = () => null;
|
|
3228
3228
|
return n.__velliraFormFieldPart = e, n.displayName = t, n;
|
|
3229
3229
|
}
|
|
3230
|
-
function
|
|
3230
|
+
function Hr(t) {
|
|
3231
3231
|
let n = [], r = { hasSlots: !1 };
|
|
3232
3232
|
return e.forEach(t, (e) => {
|
|
3233
3233
|
if (!a(e)) {
|
|
@@ -3251,13 +3251,13 @@ function Br(t) {
|
|
|
3251
3251
|
}
|
|
3252
3252
|
}), n.length > 0 && (r.fallbackChildren = n.length === 1 ? n[0] : n), r;
|
|
3253
3253
|
}
|
|
3254
|
-
var
|
|
3255
|
-
let j =
|
|
3256
|
-
neutral:
|
|
3257
|
-
success:
|
|
3258
|
-
warning:
|
|
3259
|
-
danger:
|
|
3260
|
-
}[re],
|
|
3254
|
+
var Ur = ({ 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 }) => {
|
|
3255
|
+
let j = Hr(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, K = o ?? P, re = o ? "danger" : F, q = {
|
|
3256
|
+
neutral: zr.messageToneNeutral,
|
|
3257
|
+
success: zr.messageToneSuccess,
|
|
3258
|
+
warning: zr.messageToneWarning,
|
|
3259
|
+
danger: zr.messageToneDanger
|
|
3260
|
+
}[re], ie = Br(W), ae = Br(G, ee, te), oe = {
|
|
3261
3261
|
controlId: U,
|
|
3262
3262
|
labelId: W,
|
|
3263
3263
|
descriptionId: G,
|
|
@@ -3267,112 +3267,112 @@ var Vr = ({ id: e, label: r, description: i, error: o, message: s, messageTone:
|
|
|
3267
3267
|
disabled: f,
|
|
3268
3268
|
invalid: ne,
|
|
3269
3269
|
size: v,
|
|
3270
|
-
ariaLabelledBy:
|
|
3271
|
-
ariaDescribedBy:
|
|
3272
|
-
},
|
|
3273
|
-
id:
|
|
3274
|
-
required:
|
|
3275
|
-
disabled:
|
|
3276
|
-
"aria-invalid":
|
|
3277
|
-
"aria-labelledby":
|
|
3278
|
-
"aria-describedby":
|
|
3270
|
+
ariaLabelledBy: ie,
|
|
3271
|
+
ariaDescribedBy: ae
|
|
3272
|
+
}, se = a(B) && B.type !== t ? B : void 0, ce = V && se ? n(se, {
|
|
3273
|
+
id: se.props.id ?? U,
|
|
3274
|
+
required: se.props.required ?? d,
|
|
3275
|
+
disabled: se.props.disabled ?? f,
|
|
3276
|
+
"aria-invalid": se.props["aria-invalid"] ?? (ne || void 0),
|
|
3277
|
+
"aria-labelledby": Br(se.props["aria-labelledby"], ie),
|
|
3278
|
+
"aria-describedby": Br(se.props["aria-describedby"], ae)
|
|
3279
3279
|
}) : B;
|
|
3280
3280
|
return /* @__PURE__ */ _("div", {
|
|
3281
3281
|
...A,
|
|
3282
3282
|
"aria-disabled": f || void 0,
|
|
3283
|
-
className: J(
|
|
3283
|
+
className: J(zr.wrapper, zr[m], zr[h], zr[v], f && zr.disabled, w),
|
|
3284
3284
|
"data-disabled": f || void 0,
|
|
3285
3285
|
"data-invalid": ne || void 0,
|
|
3286
3286
|
"data-orientation": m,
|
|
3287
3287
|
"data-size": v,
|
|
3288
3288
|
children: [
|
|
3289
3289
|
(M || R) && /* @__PURE__ */ _("div", {
|
|
3290
|
-
className:
|
|
3290
|
+
className: zr.labelRow,
|
|
3291
3291
|
children: [M && /* @__PURE__ */ _("label", {
|
|
3292
3292
|
id: W,
|
|
3293
3293
|
htmlFor: U,
|
|
3294
|
-
className: J(
|
|
3294
|
+
className: J(zr.label, j.label?.className, E),
|
|
3295
3295
|
children: [
|
|
3296
3296
|
/* @__PURE__ */ g("span", {
|
|
3297
|
-
className:
|
|
3297
|
+
className: zr.labelText,
|
|
3298
3298
|
children: M
|
|
3299
3299
|
}),
|
|
3300
3300
|
d && /* @__PURE__ */ g("span", {
|
|
3301
|
-
className:
|
|
3301
|
+
className: zr.required,
|
|
3302
3302
|
"aria-hidden": "true",
|
|
3303
3303
|
children: "*"
|
|
3304
3304
|
}),
|
|
3305
3305
|
!d && z && /* @__PURE__ */ g("span", {
|
|
3306
|
-
className:
|
|
3306
|
+
className: zr.optional,
|
|
3307
3307
|
children: z
|
|
3308
3308
|
}),
|
|
3309
3309
|
L && /* @__PURE__ */ g("span", {
|
|
3310
|
-
className:
|
|
3310
|
+
className: zr.labelInfo,
|
|
3311
3311
|
children: L
|
|
3312
3312
|
})
|
|
3313
3313
|
]
|
|
3314
3314
|
}), R && /* @__PURE__ */ g("div", {
|
|
3315
|
-
className:
|
|
3315
|
+
className: zr.labelAction,
|
|
3316
3316
|
children: R
|
|
3317
3317
|
})]
|
|
3318
3318
|
}),
|
|
3319
3319
|
N && /* @__PURE__ */ g("div", {
|
|
3320
3320
|
id: G,
|
|
3321
|
-
className: J(
|
|
3321
|
+
className: J(zr.description, j.description?.className, D),
|
|
3322
3322
|
children: N
|
|
3323
3323
|
}),
|
|
3324
|
-
/* @__PURE__ */ g(
|
|
3325
|
-
value:
|
|
3324
|
+
/* @__PURE__ */ g(Lr.Provider, {
|
|
3325
|
+
value: oe,
|
|
3326
3326
|
children: /* @__PURE__ */ g("div", {
|
|
3327
|
-
className: J(
|
|
3328
|
-
children:
|
|
3327
|
+
className: J(zr.control, j.control?.className, T),
|
|
3328
|
+
children: ce
|
|
3329
3329
|
})
|
|
3330
3330
|
}),
|
|
3331
3331
|
K && /* @__PURE__ */ g("div", {
|
|
3332
3332
|
id: o ? ee : te,
|
|
3333
|
-
className: J(
|
|
3333
|
+
className: J(zr.message, q, !o && j.message?.className, o ? O : k),
|
|
3334
3334
|
role: o ? "alert" : void 0,
|
|
3335
3335
|
"aria-live": !o && I === "polite" ? "polite" : void 0,
|
|
3336
3336
|
children: K
|
|
3337
3337
|
})
|
|
3338
3338
|
]
|
|
3339
3339
|
});
|
|
3340
|
-
},
|
|
3341
|
-
Label:
|
|
3342
|
-
Description:
|
|
3343
|
-
Control:
|
|
3344
|
-
Message:
|
|
3340
|
+
}, Wr = Vr("label", "FormField.Label"), Gr = Vr("description", "FormField.Description"), Kr = Vr("control", "FormField.Control"), qr = Vr("message", "FormField.Message"), Jr = Object.assign(Ur, {
|
|
3341
|
+
Label: Wr,
|
|
3342
|
+
Description: Gr,
|
|
3343
|
+
Control: Kr,
|
|
3344
|
+
Message: qr,
|
|
3345
3345
|
displayName: "FormField"
|
|
3346
3346
|
});
|
|
3347
3347
|
//#endregion
|
|
3348
3348
|
//#region src/components/Select/Root/useSelectRootState.tsx
|
|
3349
|
-
function
|
|
3350
|
-
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:
|
|
3349
|
+
function Yr(e) {
|
|
3350
|
+
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: K, suffix: re, renderValue: q, renderOption: ie, onBlur: ae, onFocus: oe, className: se, triggerClassName: ce, dropdownClassName: le } = e, ue = l(), de = Rr(), fe = !!(n || r || I), pe = i ?? (fe ? void 0 : de?.controlId) ?? ue, me = `${pe}-listbox`, [J, he] = p(""), ge = !!I, Y = ge ? `${pe}-error` : void 0, _e = r ? `${pe}-description` : void 0, ve = w ?? de?.size ?? "md", ye = k || ge || !fe && !!de?.invalid, be = O || !fe && !!de?.disabled, xe = D || !fe && !!de?.required, Se = [
|
|
3351
3351
|
u,
|
|
3352
|
-
!fe && !u ?
|
|
3352
|
+
!fe && !u ? de?.ariaDescribedBy : void 0,
|
|
3353
3353
|
_e,
|
|
3354
|
-
|
|
3355
|
-
].filter(Boolean).join(" "), Ce = f(null), we = f(null), [Te, Ee] = p(!1), De = M ||
|
|
3354
|
+
Y
|
|
3355
|
+
].filter(Boolean).join(" "), Ce = f(null), we = f(null), [Te, Ee] = p(!1), De = M || F, { entries: Oe, options: ke } = Ir(t), Ae = d(() => Pr({
|
|
3356
3356
|
options: ke,
|
|
3357
3357
|
searchable: De,
|
|
3358
|
-
searchValue:
|
|
3358
|
+
searchValue: J
|
|
3359
3359
|
}), [
|
|
3360
3360
|
De,
|
|
3361
3361
|
ke,
|
|
3362
|
-
|
|
3363
|
-
]), je = e.multiple === !0 ? e.value : e.value === null ? "" : e.value,
|
|
3362
|
+
J
|
|
3363
|
+
]), je = e.multiple === !0 ? e.value : e.value === null ? "" : e.value, Me = e.multiple === !0 ? e.defaultValue : e.defaultValue === null ? "" : e.defaultValue, Ne = e.multiple === !0 ? e.onValueChange : void 0, X = e.multiple === !0 ? void 0 : e.onValueChange, { selectedValue: Pe, selectedValues: Fe, isOpen: Ie, setIsOpen: Le, setSelectedValue: Re, activeIndex: ze, setActiveIndex: Be, closeDropdown: Ve, toggleDropdown: He, selectValue: Ue, onKeyDown: We } = wt({
|
|
3364
3364
|
value: je,
|
|
3365
|
-
defaultValue:
|
|
3365
|
+
defaultValue: Me,
|
|
3366
3366
|
onValueChange: o((e) => {
|
|
3367
3367
|
if (v) {
|
|
3368
|
-
|
|
3368
|
+
Ne?.(Array.isArray(e) ? e : e ? [e] : []);
|
|
3369
3369
|
return;
|
|
3370
3370
|
}
|
|
3371
|
-
|
|
3371
|
+
X?.(Array.isArray(e) ? e[0] ?? null : e === "" ? null : e);
|
|
3372
3372
|
}, [
|
|
3373
3373
|
v,
|
|
3374
|
-
|
|
3375
|
-
|
|
3374
|
+
Ne,
|
|
3375
|
+
X
|
|
3376
3376
|
]),
|
|
3377
3377
|
options: Ae,
|
|
3378
3378
|
multiple: v,
|
|
@@ -3382,7 +3382,7 @@ function qr(e) {
|
|
|
3382
3382
|
open: H,
|
|
3383
3383
|
defaultOpen: U,
|
|
3384
3384
|
onOpenChange: W
|
|
3385
|
-
}), Ge = d(() => ke.find((e) => Fe.includes(e.value)), [ke, Fe]), Ke = d(() => ke.filter((e) => Fe.includes(e.value)), [ke, Fe]), qe = !!Ge, Je = Array.isArray(Pe) ? Pe[0] ?? "" : Pe, { floatingStyles: Ye, setRef: Xe, setFloatingRef: Ze } =
|
|
3385
|
+
}), Ge = d(() => ke.find((e) => Fe.includes(e.value)), [ke, Fe]), Ke = d(() => ke.filter((e) => Fe.includes(e.value)), [ke, Fe]), qe = !!Ge, Je = Array.isArray(Pe) ? Pe[0] ?? "" : Pe, { floatingStyles: Ye, setRef: Xe, setFloatingRef: Ze } = yt({
|
|
3386
3386
|
isOpen: Ie,
|
|
3387
3387
|
onOpenChange: Le,
|
|
3388
3388
|
placement: R,
|
|
@@ -3392,7 +3392,7 @@ function qr(e) {
|
|
|
3392
3392
|
Ue(e), Ce.current?.focus();
|
|
3393
3393
|
}, [Ue]), $e = o((e) => {
|
|
3394
3394
|
if (!v || e.length === 0) return;
|
|
3395
|
-
let t =
|
|
3395
|
+
let t = L({
|
|
3396
3396
|
selectedValues: Fe,
|
|
3397
3397
|
groupValues: e,
|
|
3398
3398
|
enabledValues: new Set(ke.filter((e) => !e.disabled).map((e) => e.value)),
|
|
@@ -3416,14 +3416,14 @@ function qr(e) {
|
|
|
3416
3416
|
}, [ee, Ue]), tt = o(() => {
|
|
3417
3417
|
Ie || Ee(!1), He();
|
|
3418
3418
|
}, [Ie, He]), nt = o((e) => {
|
|
3419
|
-
|
|
3419
|
+
Xr(e, Ie) && Ee(!0), We(e);
|
|
3420
3420
|
}, [Ie, We]), rt = o((e) => {
|
|
3421
3421
|
Ee(!0), Be(e);
|
|
3422
3422
|
}, [Be]), it = o((e) => {
|
|
3423
|
-
|
|
3424
|
-
}, [G]), at =
|
|
3423
|
+
he(e), G?.(e);
|
|
3424
|
+
}, [G]), at = dt({
|
|
3425
3425
|
active: Ie,
|
|
3426
|
-
id:
|
|
3426
|
+
id: me,
|
|
3427
3427
|
zIndexLevel: "dropdown",
|
|
3428
3428
|
closeOnEscape: !0,
|
|
3429
3429
|
closeOnOutsidePress: !0,
|
|
@@ -3434,8 +3434,8 @@ function qr(e) {
|
|
|
3434
3434
|
c(() => {
|
|
3435
3435
|
Ie || Ee(!1);
|
|
3436
3436
|
}, [Ie]), c(() => {
|
|
3437
|
-
!Ie &&
|
|
3438
|
-
}, [Ie,
|
|
3437
|
+
!Ie && J && he("");
|
|
3438
|
+
}, [Ie, J]), gt({
|
|
3439
3439
|
active: Ie,
|
|
3440
3440
|
enabled: P
|
|
3441
3441
|
});
|
|
@@ -3443,7 +3443,7 @@ function qr(e) {
|
|
|
3443
3443
|
Ce.current = e, Xe(e);
|
|
3444
3444
|
}, [Xe]), st = o((e) => {
|
|
3445
3445
|
we.current = e, Ze(e);
|
|
3446
|
-
}, [Ze]), ct = d(() =>
|
|
3446
|
+
}, [Ze]), ct = d(() => q ? q({
|
|
3447
3447
|
multiple: v,
|
|
3448
3448
|
option: Ge,
|
|
3449
3449
|
options: Ke,
|
|
@@ -3452,24 +3452,24 @@ function qr(e) {
|
|
|
3452
3452
|
}) : v && Ke.length ? Ke.map((e) => e.label).join(", ") : Ge?.label ?? x, [
|
|
3453
3453
|
v,
|
|
3454
3454
|
x,
|
|
3455
|
-
|
|
3455
|
+
q,
|
|
3456
3456
|
Ge,
|
|
3457
3457
|
Ke,
|
|
3458
3458
|
Fe,
|
|
3459
3459
|
Je
|
|
3460
|
-
]),
|
|
3460
|
+
]), lt = S ?? "No options available", ut = j && Fe.length > 0 && !be && !A, ft = d(() => ({
|
|
3461
3461
|
...Ye,
|
|
3462
3462
|
zIndex: at.zIndex
|
|
3463
3463
|
}), [at.zIndex, Ye]), pt = d(() => ({
|
|
3464
|
-
id:
|
|
3464
|
+
id: pe,
|
|
3465
3465
|
describedBy: Se || void 0,
|
|
3466
3466
|
labelledBy: s ? void 0 : m,
|
|
3467
3467
|
isOpen: Ie,
|
|
3468
3468
|
disabled: be,
|
|
3469
3469
|
required: xe,
|
|
3470
|
-
listboxId:
|
|
3470
|
+
listboxId: me,
|
|
3471
3471
|
activeIndex: ze,
|
|
3472
|
-
ariaLabel: s ?? (!n && !
|
|
3472
|
+
ariaLabel: s ?? (!n && !de?.labelId ? Ge?.label || x : void 0),
|
|
3473
3473
|
error: ye,
|
|
3474
3474
|
loading: A,
|
|
3475
3475
|
displayText: ct,
|
|
@@ -3481,14 +3481,14 @@ function qr(e) {
|
|
|
3481
3481
|
endIcon: ne,
|
|
3482
3482
|
prefix: K,
|
|
3483
3483
|
suffix: re,
|
|
3484
|
-
clearable:
|
|
3485
|
-
className:
|
|
3484
|
+
clearable: ut,
|
|
3485
|
+
className: ce,
|
|
3486
3486
|
buttonRef: ot,
|
|
3487
3487
|
onClear: et,
|
|
3488
3488
|
onClick: tt,
|
|
3489
3489
|
onKeyDown: nt,
|
|
3490
|
-
onBlur:
|
|
3491
|
-
onFocus:
|
|
3490
|
+
onBlur: ae,
|
|
3491
|
+
onFocus: oe
|
|
3492
3492
|
}), [
|
|
3493
3493
|
ze,
|
|
3494
3494
|
s,
|
|
@@ -3496,7 +3496,7 @@ function qr(e) {
|
|
|
3496
3496
|
T,
|
|
3497
3497
|
Se,
|
|
3498
3498
|
ne,
|
|
3499
|
-
|
|
3499
|
+
de?.labelId,
|
|
3500
3500
|
et,
|
|
3501
3501
|
tt,
|
|
3502
3502
|
nt,
|
|
@@ -3506,46 +3506,46 @@ function qr(e) {
|
|
|
3506
3506
|
Ie,
|
|
3507
3507
|
xe,
|
|
3508
3508
|
n,
|
|
3509
|
-
|
|
3509
|
+
me,
|
|
3510
3510
|
A,
|
|
3511
|
+
ae,
|
|
3511
3512
|
oe,
|
|
3512
|
-
se,
|
|
3513
3513
|
x,
|
|
3514
3514
|
K,
|
|
3515
3515
|
ve,
|
|
3516
3516
|
ct,
|
|
3517
3517
|
Ge?.label,
|
|
3518
3518
|
ot,
|
|
3519
|
-
|
|
3519
|
+
ut,
|
|
3520
3520
|
te,
|
|
3521
3521
|
re,
|
|
3522
|
-
|
|
3523
|
-
|
|
3522
|
+
ce,
|
|
3523
|
+
pe,
|
|
3524
3524
|
E
|
|
3525
|
-
]),
|
|
3525
|
+
]), mt = d(() => ({
|
|
3526
3526
|
isOpen: Ie,
|
|
3527
|
-
listboxId:
|
|
3528
|
-
labelledById:
|
|
3527
|
+
listboxId: me,
|
|
3528
|
+
labelledById: pe,
|
|
3529
3529
|
style: ft,
|
|
3530
3530
|
options: Ae,
|
|
3531
|
-
entries: De ||
|
|
3531
|
+
entries: De || J ? void 0 : Oe,
|
|
3532
3532
|
multiple: v,
|
|
3533
3533
|
color: T,
|
|
3534
3534
|
variant: E,
|
|
3535
3535
|
searchable: De,
|
|
3536
|
-
command:
|
|
3536
|
+
command: F,
|
|
3537
3537
|
virtual: N,
|
|
3538
3538
|
portal: V,
|
|
3539
|
-
searchValue:
|
|
3539
|
+
searchValue: J,
|
|
3540
3540
|
loading: A,
|
|
3541
3541
|
loadingText: C,
|
|
3542
|
-
emptyText:
|
|
3543
|
-
renderOption:
|
|
3542
|
+
emptyText: lt,
|
|
3543
|
+
renderOption: ie,
|
|
3544
3544
|
selectedValue: Je,
|
|
3545
3545
|
selectedValues: Fe,
|
|
3546
3546
|
activeIndex: ze,
|
|
3547
3547
|
visualActiveIndex: Te ? ze : -1,
|
|
3548
|
-
className:
|
|
3548
|
+
className: le,
|
|
3549
3549
|
setDropdownRef: st,
|
|
3550
3550
|
onSelect: Qe,
|
|
3551
3551
|
onSelectGroup: $e,
|
|
@@ -3554,10 +3554,10 @@ function qr(e) {
|
|
|
3554
3554
|
}), [
|
|
3555
3555
|
ze,
|
|
3556
3556
|
T,
|
|
3557
|
-
|
|
3557
|
+
F,
|
|
3558
3558
|
ft,
|
|
3559
|
-
|
|
3560
|
-
|
|
3559
|
+
le,
|
|
3560
|
+
lt,
|
|
3561
3561
|
Ae,
|
|
3562
3562
|
rt,
|
|
3563
3563
|
it,
|
|
@@ -3566,24 +3566,24 @@ function qr(e) {
|
|
|
3566
3566
|
Te,
|
|
3567
3567
|
Ie,
|
|
3568
3568
|
De,
|
|
3569
|
-
|
|
3569
|
+
me,
|
|
3570
3570
|
A,
|
|
3571
3571
|
C,
|
|
3572
3572
|
v,
|
|
3573
3573
|
V,
|
|
3574
|
-
|
|
3574
|
+
ie,
|
|
3575
3575
|
Oe,
|
|
3576
|
-
|
|
3576
|
+
J,
|
|
3577
3577
|
Fe,
|
|
3578
3578
|
st,
|
|
3579
3579
|
Je,
|
|
3580
|
-
|
|
3580
|
+
pe,
|
|
3581
3581
|
E,
|
|
3582
3582
|
N
|
|
3583
|
-
]),
|
|
3583
|
+
]), ht = d(() => ({
|
|
3584
3584
|
triggerProps: pt,
|
|
3585
|
-
contentProps:
|
|
3586
|
-
}), [
|
|
3585
|
+
contentProps: mt
|
|
3586
|
+
}), [mt, pt]), _t = d(() => /* @__PURE__ */ _(h, { children: [a && v && Fe.length > 0 && /* @__PURE__ */ g(h, { children: Fe.map((e) => /* @__PURE__ */ g("input", {
|
|
3587
3587
|
type: "hidden",
|
|
3588
3588
|
name: a,
|
|
3589
3589
|
value: e,
|
|
@@ -3602,42 +3602,42 @@ function qr(e) {
|
|
|
3602
3602
|
]);
|
|
3603
3603
|
return {
|
|
3604
3604
|
children: t,
|
|
3605
|
-
className:
|
|
3606
|
-
contentProps:
|
|
3607
|
-
contextValue:
|
|
3605
|
+
className: se,
|
|
3606
|
+
contentProps: mt,
|
|
3607
|
+
contextValue: ht,
|
|
3608
3608
|
description: r,
|
|
3609
|
-
error:
|
|
3610
|
-
hasCompoundLayout: d(() =>
|
|
3611
|
-
hasExternalField: !fe && !!
|
|
3612
|
-
hiddenInputs:
|
|
3609
|
+
error: I,
|
|
3610
|
+
hasCompoundLayout: d(() => jr(t), [t]),
|
|
3611
|
+
hasExternalField: !fe && !!de,
|
|
3612
|
+
hiddenInputs: _t,
|
|
3613
3613
|
isDisabled: be,
|
|
3614
3614
|
isRequired: xe,
|
|
3615
3615
|
label: n,
|
|
3616
3616
|
resolvedSize: ve,
|
|
3617
|
-
triggerId:
|
|
3617
|
+
triggerId: pe,
|
|
3618
3618
|
triggerProps: pt
|
|
3619
3619
|
};
|
|
3620
3620
|
}
|
|
3621
|
-
function
|
|
3621
|
+
function Xr(e, t) {
|
|
3622
3622
|
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 === " ";
|
|
3623
3623
|
}
|
|
3624
3624
|
//#endregion
|
|
3625
3625
|
//#region src/components/Select/Root/SelectRoot.tsx
|
|
3626
|
-
var
|
|
3627
|
-
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 } =
|
|
3626
|
+
var Zr = (e) => {
|
|
3627
|
+
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 } = Yr(e), b = d(() => /* @__PURE__ */ _(sr, {
|
|
3628
3628
|
value: i,
|
|
3629
|
-
children: [l, s ? t : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(
|
|
3629
|
+
children: [l, s ? t : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(Or, {}), /* @__PURE__ */ g(gr, { children: t })] })]
|
|
3630
3630
|
}), [
|
|
3631
3631
|
t,
|
|
3632
3632
|
i,
|
|
3633
3633
|
s,
|
|
3634
3634
|
l
|
|
3635
|
-
]), x = d(() => /* @__PURE__ */ _(
|
|
3635
|
+
]), x = d(() => /* @__PURE__ */ _(sr, {
|
|
3636
3636
|
value: i,
|
|
3637
3637
|
children: [
|
|
3638
3638
|
l,
|
|
3639
|
-
/* @__PURE__ */ g(
|
|
3640
|
-
/* @__PURE__ */ g(
|
|
3639
|
+
/* @__PURE__ */ g(kr, { ...y }),
|
|
3640
|
+
/* @__PURE__ */ g(_r, { ...r })
|
|
3641
3641
|
]
|
|
3642
3642
|
}), [
|
|
3643
3643
|
r,
|
|
@@ -3645,7 +3645,7 @@ var Yr = (e) => {
|
|
|
3645
3645
|
l,
|
|
3646
3646
|
y
|
|
3647
3647
|
]);
|
|
3648
|
-
return c ? t ? b : x : /* @__PURE__ */ g(
|
|
3648
|
+
return c ? t ? b : x : /* @__PURE__ */ g(Jr, {
|
|
3649
3649
|
id: v,
|
|
3650
3650
|
label: p,
|
|
3651
3651
|
description: a,
|
|
@@ -3658,11 +3658,11 @@ var Yr = (e) => {
|
|
|
3658
3658
|
children: t ? b : x
|
|
3659
3659
|
});
|
|
3660
3660
|
};
|
|
3661
|
-
|
|
3661
|
+
Zr.displayName = "SelectRoot";
|
|
3662
3662
|
//#endregion
|
|
3663
3663
|
//#region src/components/Select/Search/SelectSearch.tsx
|
|
3664
|
-
var
|
|
3665
|
-
let { contentProps: n } =
|
|
3664
|
+
var Qr = ({ placeholder: e, className: t }) => {
|
|
3665
|
+
let { contentProps: n } = cr(), r = f(null), i = n.searchValue ?? "";
|
|
3666
3666
|
return c(() => {
|
|
3667
3667
|
if (!n.isOpen) return;
|
|
3668
3668
|
let e = window.setTimeout(() => {
|
|
@@ -3670,10 +3670,10 @@ var Xr = ({ placeholder: e, className: t }) => {
|
|
|
3670
3670
|
}, 0);
|
|
3671
3671
|
return () => window.clearTimeout(e);
|
|
3672
3672
|
}, [n.isOpen]), /* @__PURE__ */ _("div", {
|
|
3673
|
-
className:
|
|
3673
|
+
className: hr.searchWrap,
|
|
3674
3674
|
children: [/* @__PURE__ */ g("input", {
|
|
3675
3675
|
ref: r,
|
|
3676
|
-
className: J(
|
|
3676
|
+
className: J(hr.search, t),
|
|
3677
3677
|
value: i,
|
|
3678
3678
|
placeholder: e ?? (n.command ? "Type a command..." : "Search..."),
|
|
3679
3679
|
"aria-label": "Search options",
|
|
@@ -3681,7 +3681,7 @@ var Xr = ({ placeholder: e, className: t }) => {
|
|
|
3681
3681
|
onChange: (e) => n.onSearchChange?.(e.target.value)
|
|
3682
3682
|
}), i && /* @__PURE__ */ g("button", {
|
|
3683
3683
|
type: "button",
|
|
3684
|
-
className:
|
|
3684
|
+
className: hr.searchClear,
|
|
3685
3685
|
"aria-label": "Clear search",
|
|
3686
3686
|
onClick: () => {
|
|
3687
3687
|
n.onSearchChange?.(""), r.current?.focus();
|
|
@@ -3690,15 +3690,15 @@ var Xr = ({ placeholder: e, className: t }) => {
|
|
|
3690
3690
|
})]
|
|
3691
3691
|
});
|
|
3692
3692
|
};
|
|
3693
|
-
|
|
3693
|
+
ur(Qr, "search"), Qr.displayName = "Select.Search";
|
|
3694
3694
|
//#endregion
|
|
3695
3695
|
//#region src/components/Select/Separator/SelectSeparator.tsx
|
|
3696
|
-
var
|
|
3697
|
-
|
|
3696
|
+
var $r = () => null;
|
|
3697
|
+
ur($r, "separator"), $r.displayName = "Select.Separator";
|
|
3698
3698
|
//#endregion
|
|
3699
3699
|
//#region src/components/Select/Value/SelectValue.tsx
|
|
3700
|
-
var
|
|
3701
|
-
let { triggerProps: n } =
|
|
3700
|
+
var ei = ({ children: e, className: t }) => {
|
|
3701
|
+
let { triggerProps: n } = cr();
|
|
3702
3702
|
return /* @__PURE__ */ g("span", {
|
|
3703
3703
|
className: J(Z.valueWrap, t),
|
|
3704
3704
|
children: /* @__PURE__ */ g("span", {
|
|
@@ -3707,38 +3707,38 @@ var Qr = ({ children: e, className: t }) => {
|
|
|
3707
3707
|
})
|
|
3708
3708
|
});
|
|
3709
3709
|
};
|
|
3710
|
-
|
|
3710
|
+
ur(ei, "value"), ei.displayName = "Select.Value";
|
|
3711
3711
|
//#endregion
|
|
3712
3712
|
//#region src/components/Select/Select.tsx
|
|
3713
|
-
var
|
|
3714
|
-
Trigger:
|
|
3715
|
-
Value:
|
|
3716
|
-
Icon:
|
|
3717
|
-
Content:
|
|
3718
|
-
Search:
|
|
3719
|
-
Group:
|
|
3720
|
-
Label:
|
|
3721
|
-
Item:
|
|
3722
|
-
ItemIcon:
|
|
3723
|
-
ItemDescription:
|
|
3724
|
-
ItemBadge:
|
|
3725
|
-
Separator:
|
|
3726
|
-
Empty:
|
|
3727
|
-
Loading:
|
|
3713
|
+
var ti = Object.assign(Zr, {
|
|
3714
|
+
Trigger: Or,
|
|
3715
|
+
Value: ei,
|
|
3716
|
+
Icon: Sr,
|
|
3717
|
+
Content: gr,
|
|
3718
|
+
Search: Qr,
|
|
3719
|
+
Group: xr,
|
|
3720
|
+
Label: Er,
|
|
3721
|
+
Item: pr,
|
|
3722
|
+
ItemIcon: Tr,
|
|
3723
|
+
ItemDescription: wr,
|
|
3724
|
+
ItemBadge: Cr,
|
|
3725
|
+
Separator: $r,
|
|
3726
|
+
Empty: br,
|
|
3727
|
+
Loading: Dr
|
|
3728
3728
|
});
|
|
3729
|
-
|
|
3729
|
+
ti.displayName = "Select";
|
|
3730
3730
|
//#endregion
|
|
3731
3731
|
//#region src/components/Tabs/internal/TabsContext.tsx
|
|
3732
|
-
var
|
|
3733
|
-
let e = s(
|
|
3732
|
+
var ni = r(null), ri = () => {
|
|
3733
|
+
let e = s(ni);
|
|
3734
3734
|
if (!e) throw Error("Tabs components must be used inside Tabs");
|
|
3735
3735
|
return e;
|
|
3736
|
-
},
|
|
3736
|
+
}, ii = {
|
|
3737
3737
|
panel: "_panel_1v1a9_1",
|
|
3738
3738
|
visible: "_visible_1v1a9_10",
|
|
3739
3739
|
vertical: "_vertical_1v1a9_14"
|
|
3740
|
-
},
|
|
3741
|
-
let { value: a, orientation: o, keepMounted: s, lazyMount: l, registerContent: u, getTriggerId: d, getContentId: f } =
|
|
3740
|
+
}, ai = ({ value: e, children: t, className: n, forceMount: r = !1, ...i }) => {
|
|
3741
|
+
let { value: a, orientation: o, keepMounted: s, lazyMount: l, registerContent: u, getTriggerId: d, getContentId: f } = ri(), m = a === e, [h, _] = p(m);
|
|
3742
3742
|
return c(() => (u(e, !0), () => {
|
|
3743
3743
|
u(e, !1);
|
|
3744
3744
|
}), [u, e]), c(() => {
|
|
@@ -3752,15 +3752,15 @@ var ei = r(null), ti = () => {
|
|
|
3752
3752
|
tabIndex: 0,
|
|
3753
3753
|
"data-state": m ? "active" : "inactive",
|
|
3754
3754
|
"data-orientation": o,
|
|
3755
|
-
className: J(
|
|
3755
|
+
className: J(ii.panel, m && ii.visible, o === "vertical" && ii.vertical, n),
|
|
3756
3756
|
children: t
|
|
3757
3757
|
}) : null;
|
|
3758
3758
|
};
|
|
3759
|
-
|
|
3759
|
+
ai.displayName = "Tabs.Content";
|
|
3760
3760
|
//#endregion
|
|
3761
3761
|
//#region src/components/Tabs/internal/useTabsIndicator.ts
|
|
3762
|
-
var
|
|
3763
|
-
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 } =
|
|
3762
|
+
var oi = 8, si = 360, ci = () => {
|
|
3763
|
+
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 } = ri();
|
|
3764
3764
|
return c(() => () => {
|
|
3765
3765
|
r.current?.cancel();
|
|
3766
3766
|
}, []), u(() => {
|
|
@@ -3796,7 +3796,7 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3796
3796
|
let s = t.current;
|
|
3797
3797
|
if (e && l === "line" && s && n.current !== o && !(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && typeof i.animate == "function") {
|
|
3798
3798
|
r.current?.cancel();
|
|
3799
|
-
let e = s.y + s.height / 2, t = p.y + p.height / 2, n = e -
|
|
3799
|
+
let e = s.y + s.height / 2, t = p.y + p.height / 2, n = e - oi / 2, a = t - oi / 2;
|
|
3800
3800
|
r.current = i.animate([
|
|
3801
3801
|
{
|
|
3802
3802
|
height: `${s.height}px`,
|
|
@@ -3804,12 +3804,12 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3804
3804
|
offset: 0
|
|
3805
3805
|
},
|
|
3806
3806
|
{
|
|
3807
|
-
height: `${
|
|
3807
|
+
height: `${oi}px`,
|
|
3808
3808
|
transform: `translate3d(0, ${n}px, 0)`,
|
|
3809
3809
|
offset: .28
|
|
3810
3810
|
},
|
|
3811
3811
|
{
|
|
3812
|
-
height: `${
|
|
3812
|
+
height: `${oi}px`,
|
|
3813
3813
|
transform: `translate3d(0, ${a}px, 0)`,
|
|
3814
3814
|
offset: .64
|
|
3815
3815
|
},
|
|
@@ -3819,7 +3819,7 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3819
3819
|
offset: 1
|
|
3820
3820
|
}
|
|
3821
3821
|
], {
|
|
3822
|
-
duration:
|
|
3822
|
+
duration: si,
|
|
3823
3823
|
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
3824
3824
|
fill: "none"
|
|
3825
3825
|
});
|
|
@@ -3835,7 +3835,7 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3835
3835
|
let h = t.current;
|
|
3836
3836
|
if (e && l === "line" && h && n.current !== o && !(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && typeof i.animate == "function") {
|
|
3837
3837
|
r.current?.cancel();
|
|
3838
|
-
let e = h.x + h.width / 2, t = p.x + p.width / 2, n = e -
|
|
3838
|
+
let e = h.x + h.width / 2, t = p.x + p.width / 2, n = e - oi / 2, a = t - oi / 2;
|
|
3839
3839
|
r.current = i.animate([
|
|
3840
3840
|
{
|
|
3841
3841
|
width: `${h.width}px`,
|
|
@@ -3843,12 +3843,12 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3843
3843
|
offset: 0
|
|
3844
3844
|
},
|
|
3845
3845
|
{
|
|
3846
|
-
width: `${
|
|
3846
|
+
width: `${oi}px`,
|
|
3847
3847
|
transform: `translate3d(${n}px, 0, 0)`,
|
|
3848
3848
|
offset: .28
|
|
3849
3849
|
},
|
|
3850
3850
|
{
|
|
3851
|
-
width: `${
|
|
3851
|
+
width: `${oi}px`,
|
|
3852
3852
|
transform: `translate3d(${a}px, 0, 0)`,
|
|
3853
3853
|
offset: .64
|
|
3854
3854
|
},
|
|
@@ -3858,7 +3858,7 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3858
3858
|
offset: 1
|
|
3859
3859
|
}
|
|
3860
3860
|
], {
|
|
3861
|
-
duration:
|
|
3861
|
+
duration: si,
|
|
3862
3862
|
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
3863
3863
|
fill: "none"
|
|
3864
3864
|
});
|
|
@@ -3886,7 +3886,7 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3886
3886
|
ref: e,
|
|
3887
3887
|
style: i
|
|
3888
3888
|
}), [i]);
|
|
3889
|
-
},
|
|
3889
|
+
}, li = {
|
|
3890
3890
|
list: "_list_1opuz_1",
|
|
3891
3891
|
vertical: "_vertical_1opuz_10",
|
|
3892
3892
|
line: "_line_1opuz_17",
|
|
@@ -3894,24 +3894,24 @@ var ii = 8, ai = 360, oi = () => {
|
|
|
3894
3894
|
segmented: "_segmented_1opuz_29",
|
|
3895
3895
|
scrollable: "_scrollable_1opuz_37",
|
|
3896
3896
|
indicator: "_indicator_1opuz_46"
|
|
3897
|
-
},
|
|
3898
|
-
let { ref: r, style: i } =
|
|
3897
|
+
}, ui = ({ className: e, style: t, ...n }) => {
|
|
3898
|
+
let { ref: r, style: i } = ci();
|
|
3899
3899
|
return /* @__PURE__ */ g("span", {
|
|
3900
3900
|
...n,
|
|
3901
3901
|
ref: r,
|
|
3902
3902
|
"aria-hidden": "true",
|
|
3903
|
-
className: J(
|
|
3903
|
+
className: J(li.indicator, e),
|
|
3904
3904
|
style: {
|
|
3905
3905
|
...i,
|
|
3906
3906
|
...t
|
|
3907
3907
|
}
|
|
3908
3908
|
});
|
|
3909
3909
|
};
|
|
3910
|
-
|
|
3910
|
+
ui.displayName = "Tabs.Indicator";
|
|
3911
3911
|
//#endregion
|
|
3912
3912
|
//#region src/components/Tabs/List/TabsList.tsx
|
|
3913
|
-
var
|
|
3914
|
-
let { mode: i, orientation: a, variant: o } =
|
|
3913
|
+
var di = ({ children: e, className: t, scrollable: n, ...r }) => {
|
|
3914
|
+
let { mode: i, orientation: a, variant: o } = ri(), s = n ?? !1;
|
|
3915
3915
|
return /* @__PURE__ */ g("div", {
|
|
3916
3916
|
...r,
|
|
3917
3917
|
role: i === "tabs" ? "tablist" : void 0,
|
|
@@ -3919,18 +3919,18 @@ var li = ({ children: e, className: t, scrollable: n, ...r }) => {
|
|
|
3919
3919
|
"data-orientation": a,
|
|
3920
3920
|
"data-variant": o,
|
|
3921
3921
|
"data-scrollable": s ? "" : void 0,
|
|
3922
|
-
className: J(
|
|
3922
|
+
className: J(li.list, a === "vertical" && li.vertical, o === "line" && li.line, o === "pills" && li.pills, o === "segmented" && li.segmented, s && li.scrollable, t),
|
|
3923
3923
|
children: e
|
|
3924
3924
|
});
|
|
3925
3925
|
};
|
|
3926
|
-
|
|
3926
|
+
di.displayName = "TabsList";
|
|
3927
3927
|
//#endregion
|
|
3928
3928
|
//#region src/components/Tabs/internal/useTabsCollection.ts
|
|
3929
|
-
var
|
|
3929
|
+
var fi = (e) => [...e].sort((e, t) => {
|
|
3930
3930
|
if (e.element === t.element) return 0;
|
|
3931
3931
|
let n = e.element.compareDocumentPosition(t.element);
|
|
3932
3932
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
3933
|
-
}),
|
|
3933
|
+
}), pi = () => {
|
|
3934
3934
|
let e = f([]), t = f([]), [n, r] = p(0), i = o(() => {
|
|
3935
3935
|
r((e) => e + 1);
|
|
3936
3936
|
}, []);
|
|
@@ -3949,7 +3949,7 @@ var ui = (e) => [...e].sort((e, t) => {
|
|
|
3949
3949
|
element: n,
|
|
3950
3950
|
disabled: r
|
|
3951
3951
|
}, o = e.current.findIndex((e) => e.element === n);
|
|
3952
|
-
o >= 0 ? e.current[o] = a : e.current.push(a), e.current =
|
|
3952
|
+
o >= 0 ? e.current[o] = a : e.current.push(a), e.current = fi(e.current), i();
|
|
3953
3953
|
}, [i]),
|
|
3954
3954
|
registerContent: o((e, n) => {
|
|
3955
3955
|
let r = t.current.findIndex((t) => t.value === e);
|
|
@@ -3960,7 +3960,7 @@ var ui = (e) => [...e].sort((e, t) => {
|
|
|
3960
3960
|
r < 0 && (t.current.push({ value: e }), i());
|
|
3961
3961
|
}, [i])
|
|
3962
3962
|
};
|
|
3963
|
-
},
|
|
3963
|
+
}, mi = ({ focusedValue: e, setValue: t, setFocusedValue: n, getTabs: r, orientation: i, activationMode: a, dir: o, loop: s }) => ({ onKeyDown: (c) => {
|
|
3964
3964
|
let l = r().filter((e) => !e.disabled);
|
|
3965
3965
|
if (l.length === 0) return;
|
|
3966
3966
|
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) => {
|
|
@@ -3995,15 +3995,15 @@ var ui = (e) => [...e].sort((e, t) => {
|
|
|
3995
3995
|
e && (c.preventDefault(), n(e.value), t(e.value));
|
|
3996
3996
|
}
|
|
3997
3997
|
}
|
|
3998
|
-
} }),
|
|
3998
|
+
} }), hi = {
|
|
3999
3999
|
tabs: "_tabs_1hj56_1",
|
|
4000
4000
|
vertical: "_vertical_1hj56_30"
|
|
4001
|
-
},
|
|
4002
|
-
let C = l(), w = t !== void 0, { value: T, setValue: E } =
|
|
4001
|
+
}, gi = ({ 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 }) => {
|
|
4002
|
+
let C = l(), w = t !== void 0, { value: T, setValue: E } = Tt({
|
|
4003
4003
|
value: t,
|
|
4004
4004
|
defaultValue: n,
|
|
4005
4005
|
onValueChange: r
|
|
4006
|
-
}), 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 } =
|
|
4006
|
+
}), 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 } = pi(), L = o((e, t, n = !1) => {
|
|
4007
4007
|
if (!t) {
|
|
4008
4008
|
let t = D.current, n = N.current, r = n.findIndex((t) => t.value === e);
|
|
4009
4009
|
if (t === e && r >= 0) {
|
|
@@ -4019,7 +4019,7 @@ var ui = (e) => [...e].sort((e, t) => {
|
|
|
4019
4019
|
j,
|
|
4020
4020
|
E,
|
|
4021
4021
|
N
|
|
4022
|
-
]), { onKeyDown: R } =
|
|
4022
|
+
]), { onKeyDown: R } = mi({
|
|
4023
4023
|
focusedValue: A,
|
|
4024
4024
|
setValue: E,
|
|
4025
4025
|
setFocusedValue: j,
|
|
@@ -4082,11 +4082,11 @@ var ui = (e) => [...e].sort((e, t) => {
|
|
|
4082
4082
|
d,
|
|
4083
4083
|
N,
|
|
4084
4084
|
M
|
|
4085
|
-
]), /* @__PURE__ */ g(
|
|
4085
|
+
]), /* @__PURE__ */ g(ni.Provider, {
|
|
4086
4086
|
value: z,
|
|
4087
4087
|
children: /* @__PURE__ */ g("div", {
|
|
4088
4088
|
...S,
|
|
4089
|
-
className: J(
|
|
4089
|
+
className: J(hi.tabs, i === "vertical" && hi.vertical, x),
|
|
4090
4090
|
"data-mode": d,
|
|
4091
4091
|
"data-orientation": i,
|
|
4092
4092
|
dir: s,
|
|
@@ -4098,8 +4098,8 @@ var ui = (e) => [...e].sort((e, t) => {
|
|
|
4098
4098
|
})
|
|
4099
4099
|
});
|
|
4100
4100
|
};
|
|
4101
|
-
|
|
4102
|
-
var
|
|
4101
|
+
gi.displayName = "Tabs";
|
|
4102
|
+
var _i = {
|
|
4103
4103
|
trigger: "_trigger_1xafk_1",
|
|
4104
4104
|
iconOnly: "_iconOnly_1xafk_49",
|
|
4105
4105
|
icon: "_icon_1xafk_49",
|
|
@@ -4114,23 +4114,23 @@ var hi = {
|
|
|
4114
4114
|
line: "_line_1xafk_196",
|
|
4115
4115
|
pills: "_pills_1xafk_228",
|
|
4116
4116
|
vertical: "_vertical_1xafk_256"
|
|
4117
|
-
},
|
|
4118
|
-
className: J(
|
|
4117
|
+
}, vi = ({ children: e, className: t }) => /* @__PURE__ */ g("span", {
|
|
4118
|
+
className: J(_i.badge, t),
|
|
4119
4119
|
children: e
|
|
4120
4120
|
});
|
|
4121
|
-
|
|
4121
|
+
vi.displayName = "Tabs.Badge";
|
|
4122
4122
|
//#endregion
|
|
4123
4123
|
//#region src/components/Tabs/Trigger/TabsIcon.tsx
|
|
4124
|
-
var
|
|
4125
|
-
className: J(
|
|
4124
|
+
var yi = ({ children: e, className: t }) => /* @__PURE__ */ g("span", {
|
|
4125
|
+
className: J(_i.icon, t),
|
|
4126
4126
|
"aria-hidden": "true",
|
|
4127
4127
|
children: e
|
|
4128
4128
|
});
|
|
4129
|
-
|
|
4129
|
+
yi.displayName = "Tabs.Icon";
|
|
4130
4130
|
//#endregion
|
|
4131
4131
|
//#region src/components/Tabs/Trigger/TabsTrigger.tsx
|
|
4132
|
-
var
|
|
4133
|
-
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 } =
|
|
4132
|
+
var bi = 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) => {
|
|
4133
|
+
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 } = ri(), 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;
|
|
4134
4134
|
process.env.NODE_ENV !== "production" && z && R && console.warn(`Tabs.Trigger value "${t}" received both icon and Tabs.Icon. Tabs.Icon takes precedence.`);
|
|
4135
4135
|
let V = o((e) => {
|
|
4136
4136
|
O(t, e, M), typeof v == "function" ? v(e) : v && (v.current = e);
|
|
@@ -4139,7 +4139,7 @@ var vi = i(({ value: t, children: r, className: i, disabled: s = !1, asChild: c
|
|
|
4139
4139
|
v,
|
|
4140
4140
|
O,
|
|
4141
4141
|
t
|
|
4142
|
-
]), H = z && !R || u || d, U = L.every((e) => typeof e == "string" || typeof e == "number"), W = J(
|
|
4142
|
+
]), H = z && !R || u || d, U = L.every((e) => typeof e == "string" || typeof e == "number"), W = J(_i.trigger, _i[T], _i[E], w === "vertical" && _i.vertical, z && _i.withIcon, B && _i.iconOnly, i), G = (e) => {
|
|
4143
4143
|
if (M) {
|
|
4144
4144
|
e.preventDefault();
|
|
4145
4145
|
return;
|
|
@@ -4169,25 +4169,25 @@ var vi = i(({ value: t, children: r, className: i, disabled: s = !1, asChild: c
|
|
|
4169
4169
|
},
|
|
4170
4170
|
children: /* @__PURE__ */ _(h, { children: [
|
|
4171
4171
|
z && !R && /* @__PURE__ */ g("span", {
|
|
4172
|
-
className:
|
|
4172
|
+
className: _i.icon,
|
|
4173
4173
|
"aria-hidden": "true",
|
|
4174
4174
|
children: l
|
|
4175
4175
|
}),
|
|
4176
4176
|
I != null && (H ? /* @__PURE__ */ _("span", {
|
|
4177
|
-
className:
|
|
4177
|
+
className: _i.body,
|
|
4178
4178
|
children: [/* @__PURE__ */ g("span", {
|
|
4179
|
-
className:
|
|
4179
|
+
className: _i.label,
|
|
4180
4180
|
children: I
|
|
4181
4181
|
}), d != null && /* @__PURE__ */ g("span", {
|
|
4182
|
-
className:
|
|
4182
|
+
className: _i.description,
|
|
4183
4183
|
children: d
|
|
4184
4184
|
})]
|
|
4185
4185
|
}) : U ? /* @__PURE__ */ g("span", {
|
|
4186
|
-
className:
|
|
4186
|
+
className: _i.label,
|
|
4187
4187
|
children: I
|
|
4188
4188
|
}) : I),
|
|
4189
4189
|
u != null && /* @__PURE__ */ g("span", {
|
|
4190
|
-
className:
|
|
4190
|
+
className: _i.badge,
|
|
4191
4191
|
children: u
|
|
4192
4192
|
})
|
|
4193
4193
|
] })
|
|
@@ -4213,50 +4213,50 @@ var vi = i(({ value: t, children: r, className: i, disabled: s = !1, asChild: c
|
|
|
4213
4213
|
},
|
|
4214
4214
|
children: [
|
|
4215
4215
|
z && !R && /* @__PURE__ */ g("span", {
|
|
4216
|
-
className:
|
|
4216
|
+
className: _i.icon,
|
|
4217
4217
|
"aria-hidden": "true",
|
|
4218
4218
|
children: l
|
|
4219
4219
|
}),
|
|
4220
4220
|
I != null && (H ? /* @__PURE__ */ _("span", {
|
|
4221
|
-
className:
|
|
4221
|
+
className: _i.body,
|
|
4222
4222
|
children: [/* @__PURE__ */ g("span", {
|
|
4223
|
-
className:
|
|
4223
|
+
className: _i.label,
|
|
4224
4224
|
children: I
|
|
4225
4225
|
}), d != null && /* @__PURE__ */ g("span", {
|
|
4226
|
-
className:
|
|
4226
|
+
className: _i.description,
|
|
4227
4227
|
children: d
|
|
4228
4228
|
})]
|
|
4229
4229
|
}) : U ? /* @__PURE__ */ g("span", {
|
|
4230
|
-
className:
|
|
4230
|
+
className: _i.label,
|
|
4231
4231
|
children: I
|
|
4232
4232
|
}) : I),
|
|
4233
4233
|
u != null && /* @__PURE__ */ g("span", {
|
|
4234
|
-
className:
|
|
4234
|
+
className: _i.badge,
|
|
4235
4235
|
children: u
|
|
4236
4236
|
})
|
|
4237
4237
|
]
|
|
4238
4238
|
}));
|
|
4239
4239
|
});
|
|
4240
|
-
|
|
4240
|
+
bi.displayName = "Tabs.Trigger";
|
|
4241
4241
|
//#endregion
|
|
4242
4242
|
//#region src/components/Tabs/Tabs.tsx
|
|
4243
|
-
var
|
|
4244
|
-
List:
|
|
4245
|
-
Trigger:
|
|
4246
|
-
Content:
|
|
4247
|
-
Indicator:
|
|
4248
|
-
Icon:
|
|
4249
|
-
Badge:
|
|
4243
|
+
var xi = Object.assign(gi, {
|
|
4244
|
+
List: di,
|
|
4245
|
+
Trigger: bi,
|
|
4246
|
+
Content: ai,
|
|
4247
|
+
Indicator: ui,
|
|
4248
|
+
Icon: yi,
|
|
4249
|
+
Badge: vi
|
|
4250
4250
|
});
|
|
4251
|
-
|
|
4251
|
+
xi.displayName = "Tabs";
|
|
4252
4252
|
//#endregion
|
|
4253
4253
|
//#region src/components/Tooltip/internal/composeEventHandlers.ts
|
|
4254
|
-
function
|
|
4254
|
+
function Si(e, t) {
|
|
4255
4255
|
return (n) => {
|
|
4256
4256
|
e?.(n), n.defaultPrevented || t?.(n);
|
|
4257
4257
|
};
|
|
4258
4258
|
}
|
|
4259
|
-
function
|
|
4259
|
+
function Ci(...e) {
|
|
4260
4260
|
return (t) => {
|
|
4261
4261
|
e.forEach((e) => {
|
|
4262
4262
|
if (e) {
|
|
@@ -4271,18 +4271,18 @@ function xi(...e) {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
//#endregion
|
|
4273
4273
|
//#region src/components/Tooltip/internal/TooltipContext.tsx
|
|
4274
|
-
var
|
|
4274
|
+
var wi = r(null), Ti = r({
|
|
4275
4275
|
delay: {
|
|
4276
4276
|
open: 300,
|
|
4277
4277
|
close: 100
|
|
4278
4278
|
},
|
|
4279
4279
|
skipDelay: 300
|
|
4280
|
-
}),
|
|
4280
|
+
}), Ei = wi.Provider, Di = ({ children: e, delay: t = 700, skipDelay: n = 300 }) => {
|
|
4281
4281
|
let r = typeof t == "number" ? {
|
|
4282
4282
|
open: t,
|
|
4283
4283
|
close: 100
|
|
4284
4284
|
} : t;
|
|
4285
|
-
return /* @__PURE__ */ g(
|
|
4285
|
+
return /* @__PURE__ */ g(Ti.Provider, {
|
|
4286
4286
|
value: {
|
|
4287
4287
|
delay: r,
|
|
4288
4288
|
skipDelay: n
|
|
@@ -4290,19 +4290,19 @@ var Si = r(null), Ci = r({
|
|
|
4290
4290
|
children: e
|
|
4291
4291
|
});
|
|
4292
4292
|
};
|
|
4293
|
-
function
|
|
4294
|
-
let e = s(
|
|
4293
|
+
function Oi() {
|
|
4294
|
+
let e = s(wi);
|
|
4295
4295
|
if (!e) throw Error("Tooltip compound components must be rendered inside Tooltip");
|
|
4296
4296
|
return e;
|
|
4297
4297
|
}
|
|
4298
|
-
function
|
|
4299
|
-
return s(
|
|
4298
|
+
function ki() {
|
|
4299
|
+
return s(Ti);
|
|
4300
4300
|
}
|
|
4301
|
-
var
|
|
4301
|
+
var Ai = {
|
|
4302
4302
|
tooltip: "_tooltip_god78_1",
|
|
4303
4303
|
arrow: "_arrow_god78_25"
|
|
4304
|
-
},
|
|
4305
|
-
let s =
|
|
4304
|
+
}, ji = i(({ children: e, forceMount: t = !1, withArrow: n = !1, className: r, style: i, ...a }, o) => {
|
|
4305
|
+
let s = Oi();
|
|
4306
4306
|
if (!t && !s.open) return null;
|
|
4307
4307
|
let c = s.getContentProps({
|
|
4308
4308
|
id: s.contentId,
|
|
@@ -4311,20 +4311,20 @@ var Oi = {
|
|
|
4311
4311
|
});
|
|
4312
4312
|
return /* @__PURE__ */ _("div", {
|
|
4313
4313
|
...c,
|
|
4314
|
-
ref:
|
|
4315
|
-
className: J(
|
|
4314
|
+
ref: Ci(o, s.setContentRef),
|
|
4315
|
+
className: J(Ai.tooltip, r),
|
|
4316
4316
|
"data-placement": s.placement,
|
|
4317
4317
|
"data-state": s.open ? "open" : "closed",
|
|
4318
4318
|
style: {
|
|
4319
4319
|
...s.floatingStyles,
|
|
4320
4320
|
...i
|
|
4321
4321
|
},
|
|
4322
|
-
children: [e, n && /* @__PURE__ */ g(
|
|
4322
|
+
children: [e, n && /* @__PURE__ */ g(Mi, {})]
|
|
4323
4323
|
});
|
|
4324
4324
|
});
|
|
4325
|
-
|
|
4326
|
-
function
|
|
4327
|
-
let e =
|
|
4325
|
+
ji.displayName = "Tooltip.Content";
|
|
4326
|
+
function Mi() {
|
|
4327
|
+
let e = Oi(), t = e.placement.split("-")[0], n = {
|
|
4328
4328
|
top: "bottom",
|
|
4329
4329
|
right: "left",
|
|
4330
4330
|
bottom: "top",
|
|
@@ -4332,7 +4332,7 @@ function Ai() {
|
|
|
4332
4332
|
}[t];
|
|
4333
4333
|
return /* @__PURE__ */ g("div", {
|
|
4334
4334
|
ref: e.arrowRef,
|
|
4335
|
-
className:
|
|
4335
|
+
className: Ai.arrow,
|
|
4336
4336
|
"data-side": t,
|
|
4337
4337
|
style: {
|
|
4338
4338
|
left: e.arrowX == null ? void 0 : `${e.arrowX}px`,
|
|
@@ -4343,8 +4343,8 @@ function Ai() {
|
|
|
4343
4343
|
}
|
|
4344
4344
|
//#endregion
|
|
4345
4345
|
//#region src/components/Tooltip/internal/useTooltipDelay.ts
|
|
4346
|
-
function
|
|
4347
|
-
let n =
|
|
4346
|
+
function Ni(e, t) {
|
|
4347
|
+
let n = ki();
|
|
4348
4348
|
return e == null ? n.delay : typeof e == "number" ? {
|
|
4349
4349
|
open: e,
|
|
4350
4350
|
close: n.delay.close
|
|
@@ -4355,26 +4355,26 @@ function ji(e, t) {
|
|
|
4355
4355
|
}
|
|
4356
4356
|
//#endregion
|
|
4357
4357
|
//#region src/components/Tooltip/internal/useTooltipInteractions.ts
|
|
4358
|
-
function
|
|
4359
|
-
let i =
|
|
4358
|
+
function Pi({ context: e, delay: t, disabled: n, interactive: r }) {
|
|
4359
|
+
let i = re(e, {
|
|
4360
4360
|
delay: t,
|
|
4361
4361
|
enabled: !n,
|
|
4362
4362
|
move: !1,
|
|
4363
4363
|
handleClose: r ? void 0 : null
|
|
4364
|
-
}), a =
|
|
4365
|
-
return
|
|
4364
|
+
}), a = K(e, { enabled: !n });
|
|
4365
|
+
return q([i, a]);
|
|
4366
4366
|
}
|
|
4367
4367
|
//#endregion
|
|
4368
4368
|
//#region src/components/Tooltip/internal/useTooltipPosition.ts
|
|
4369
|
-
function
|
|
4370
|
-
let o = f(null), s =
|
|
4369
|
+
function Fi({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions: i, matchTriggerWidth: a }) {
|
|
4370
|
+
let o = f(null), s = ft({
|
|
4371
4371
|
open: e,
|
|
4372
4372
|
onOpenChange: t,
|
|
4373
4373
|
placement: n,
|
|
4374
4374
|
offset: r,
|
|
4375
4375
|
avoidCollisions: i,
|
|
4376
4376
|
matchTriggerWidth: a,
|
|
4377
|
-
middleware: [
|
|
4377
|
+
middleware: [H({ element: o })]
|
|
4378
4378
|
});
|
|
4379
4379
|
return {
|
|
4380
4380
|
...s,
|
|
@@ -4385,26 +4385,26 @@ function Ni({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions
|
|
|
4385
4385
|
}
|
|
4386
4386
|
//#endregion
|
|
4387
4387
|
//#region src/components/Tooltip/Root/TooltipRoot.tsx
|
|
4388
|
-
var
|
|
4389
|
-
let m = `${l()}-content`, h = f(null), _ = f(null), [v, y] =
|
|
4388
|
+
var Ii = ({ 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 }) => {
|
|
4389
|
+
let m = `${l()}-content`, h = f(null), _ = f(null), [v, y] = bt({
|
|
4390
4390
|
value: t,
|
|
4391
4391
|
defaultValue: n,
|
|
4392
4392
|
onChange: r
|
|
4393
4393
|
}), b = (e) => {
|
|
4394
4394
|
c || y(e);
|
|
4395
|
-
}, x =
|
|
4395
|
+
}, x = Fi({
|
|
4396
4396
|
open: v,
|
|
4397
4397
|
onOpenChange: b,
|
|
4398
4398
|
placement: i,
|
|
4399
4399
|
offset: a,
|
|
4400
4400
|
avoidCollisions: d,
|
|
4401
4401
|
matchTriggerWidth: p
|
|
4402
|
-
}), S =
|
|
4402
|
+
}), S = Ni(o, s), C = Pi({
|
|
4403
4403
|
context: x.context,
|
|
4404
4404
|
delay: S,
|
|
4405
4405
|
disabled: c,
|
|
4406
4406
|
interactive: u
|
|
4407
|
-
}), w =
|
|
4407
|
+
}), w = dt({
|
|
4408
4408
|
active: v,
|
|
4409
4409
|
id: m,
|
|
4410
4410
|
zIndexLevel: "tooltip",
|
|
@@ -4414,7 +4414,7 @@ var Pi = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placemen
|
|
|
4414
4414
|
closeOnOutsidePress: !u,
|
|
4415
4415
|
requestClose: () => b(!1)
|
|
4416
4416
|
});
|
|
4417
|
-
return /* @__PURE__ */ g(
|
|
4417
|
+
return /* @__PURE__ */ g(Ei, {
|
|
4418
4418
|
value: {
|
|
4419
4419
|
contentId: m,
|
|
4420
4420
|
open: v,
|
|
@@ -4430,34 +4430,34 @@ var Pi = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placemen
|
|
|
4430
4430
|
zIndex: w.zIndex
|
|
4431
4431
|
},
|
|
4432
4432
|
setOpen: b,
|
|
4433
|
-
setTriggerRef:
|
|
4434
|
-
setContentRef:
|
|
4433
|
+
setTriggerRef: Ci(_, x.setRef),
|
|
4434
|
+
setContentRef: Ci(h, x.setFloatingRef),
|
|
4435
4435
|
getTriggerProps: C.getReferenceProps,
|
|
4436
4436
|
getContentProps: C.getFloatingProps
|
|
4437
4437
|
},
|
|
4438
4438
|
children: e
|
|
4439
4439
|
});
|
|
4440
4440
|
};
|
|
4441
|
-
|
|
4441
|
+
Ii.displayName = "Tooltip.Root";
|
|
4442
4442
|
//#endregion
|
|
4443
4443
|
//#region src/components/Tooltip/Trigger/TooltipTrigger.tsx
|
|
4444
|
-
var
|
|
4445
|
-
let s =
|
|
4444
|
+
var Li = ({ asChild: e = !1, children: t, disabled: r = !1, className: i, ...o }) => {
|
|
4445
|
+
let s = Oi(), c = e && a(t) ? t : void 0, l = s.disabled || r || c?.props.disabled, u = s.getTriggerProps({
|
|
4446
4446
|
...o,
|
|
4447
4447
|
"aria-describedby": s.open ? s.contentId : void 0,
|
|
4448
4448
|
"aria-disabled": l || void 0,
|
|
4449
4449
|
"data-state": s.open ? "open" : "closed"
|
|
4450
4450
|
}), d = {
|
|
4451
4451
|
...u,
|
|
4452
|
-
ref: c ?
|
|
4452
|
+
ref: c ? Ci(c.props.ref, s.setTriggerRef) : s.setTriggerRef,
|
|
4453
4453
|
className: J(c?.props.className, i),
|
|
4454
4454
|
disabled: l || void 0,
|
|
4455
|
-
onMouseEnter:
|
|
4456
|
-
onMouseLeave:
|
|
4457
|
-
onPointerEnter:
|
|
4458
|
-
onPointerLeave:
|
|
4459
|
-
onFocus:
|
|
4460
|
-
onBlur:
|
|
4455
|
+
onMouseEnter: Si(c?.props.onMouseEnter, u.onMouseEnter),
|
|
4456
|
+
onMouseLeave: Si(c?.props.onMouseLeave, u.onMouseLeave),
|
|
4457
|
+
onPointerEnter: Si(c?.props.onPointerEnter, u.onPointerEnter),
|
|
4458
|
+
onPointerLeave: Si(c?.props.onPointerLeave, u.onPointerLeave),
|
|
4459
|
+
onFocus: Si(c?.props.onFocus, u.onFocus),
|
|
4460
|
+
onBlur: Si(c?.props.onBlur, u.onBlur)
|
|
4461
4461
|
};
|
|
4462
4462
|
return c ? n(c, d) : /* @__PURE__ */ g("button", {
|
|
4463
4463
|
type: "button",
|
|
@@ -4465,16 +4465,16 @@ var Fi = ({ asChild: e = !1, children: t, disabled: r = !1, className: i, ...o }
|
|
|
4465
4465
|
children: t
|
|
4466
4466
|
});
|
|
4467
4467
|
};
|
|
4468
|
-
|
|
4468
|
+
Li.displayName = "Tooltip.Trigger";
|
|
4469
4469
|
//#endregion
|
|
4470
4470
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
4471
|
-
var
|
|
4472
|
-
Trigger:
|
|
4473
|
-
Content:
|
|
4474
|
-
Provider:
|
|
4471
|
+
var Ri = Object.assign(Ii, {
|
|
4472
|
+
Trigger: Li,
|
|
4473
|
+
Content: ji,
|
|
4474
|
+
Provider: Di
|
|
4475
4475
|
});
|
|
4476
|
-
|
|
4477
|
-
var
|
|
4476
|
+
Ri.displayName = "Tooltip";
|
|
4477
|
+
var zi = {
|
|
4478
4478
|
button: "_button_1d6bh_1",
|
|
4479
4479
|
solid: "_solid_1d6bh_26",
|
|
4480
4480
|
primary: "_primary_1d6bh_26",
|
|
@@ -4505,58 +4505,58 @@ var Li = {
|
|
|
4505
4505
|
"button-spin": "_button-spin_1d6bh_1",
|
|
4506
4506
|
badge: "_badge_1d6bh_870",
|
|
4507
4507
|
shortcut: "_shortcut_1d6bh_884"
|
|
4508
|
-
},
|
|
4509
|
-
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 =
|
|
4508
|
+
}, Bi = 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) => {
|
|
4509
|
+
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 = ie[i], W = {
|
|
4510
4510
|
"--button-height": `${U.height}px`,
|
|
4511
4511
|
"--button-font-size": `${U.fontSize}px`,
|
|
4512
4512
|
"--button-line-height": `${U.lineHeight}px`,
|
|
4513
4513
|
"--icon-size": `${U.iconSize}px`
|
|
4514
|
-
}, 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 = J(H ?
|
|
4515
|
-
[
|
|
4516
|
-
[
|
|
4517
|
-
[
|
|
4518
|
-
[
|
|
4514
|
+
}, 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 = J(H ? zi.bare : zi.button, H ? null : zi[t], H ? null : zi[r], H ? null : zi[i], H ? null : zi[o], C, {
|
|
4515
|
+
[zi.disabled]: V,
|
|
4516
|
+
[zi.loading]: l,
|
|
4517
|
+
[zi.fullWidth]: b,
|
|
4518
|
+
[zi.iconOnly]: z
|
|
4519
4519
|
});
|
|
4520
|
-
|
|
4520
|
+
Pe(!S || !O, "Button: pass href to the child element when using asChild."), Pe(!S || !!L, "Button: asChild requires a single valid React element child."), Pe(!z || B, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
|
|
4521
4521
|
let K = (e) => {
|
|
4522
4522
|
e.preventDefault(), e.stopPropagation();
|
|
4523
|
-
},
|
|
4523
|
+
}, re = (e) => {
|
|
4524
4524
|
if (V) {
|
|
4525
4525
|
K(e);
|
|
4526
4526
|
return;
|
|
4527
4527
|
}
|
|
4528
4528
|
L?.props.onClick?.(e), e.defaultPrevented || T?.(e);
|
|
4529
|
-
},
|
|
4529
|
+
}, q = /* @__PURE__ */ _(h, { children: [
|
|
4530
4530
|
l && (p ? /* @__PURE__ */ g("span", {
|
|
4531
|
-
className:
|
|
4531
|
+
className: zi.icon,
|
|
4532
4532
|
"aria-hidden": "true",
|
|
4533
4533
|
children: p
|
|
4534
4534
|
}) : /* @__PURE__ */ g("span", {
|
|
4535
|
-
className:
|
|
4535
|
+
className: zi.spinner,
|
|
4536
4536
|
"aria-hidden": "true"
|
|
4537
4537
|
})),
|
|
4538
4538
|
!l && d && /* @__PURE__ */ g("span", {
|
|
4539
|
-
className: J(
|
|
4539
|
+
className: J(zi.icon, zi.iconStart),
|
|
4540
4540
|
children: d
|
|
4541
4541
|
}),
|
|
4542
4542
|
G && !z && (H ? G : /* @__PURE__ */ g("span", {
|
|
4543
|
-
className:
|
|
4543
|
+
className: zi.label,
|
|
4544
4544
|
"data-measure": ee,
|
|
4545
4545
|
children: /* @__PURE__ */ g("span", {
|
|
4546
|
-
className:
|
|
4546
|
+
className: zi.labelText,
|
|
4547
4547
|
children: G
|
|
4548
4548
|
})
|
|
4549
4549
|
})),
|
|
4550
4550
|
m && !z && (H ? m : /* @__PURE__ */ g("span", {
|
|
4551
|
-
className:
|
|
4551
|
+
className: zi.badge,
|
|
4552
4552
|
children: m
|
|
4553
4553
|
})),
|
|
4554
4554
|
v && !z && (H ? v : /* @__PURE__ */ g("span", {
|
|
4555
|
-
className:
|
|
4555
|
+
className: zi.shortcut,
|
|
4556
4556
|
children: v
|
|
4557
4557
|
})),
|
|
4558
4558
|
!l && f && /* @__PURE__ */ g("span", {
|
|
4559
|
-
className: J(
|
|
4559
|
+
className: J(zi.icon, zi.iconEnd),
|
|
4560
4560
|
children: f
|
|
4561
4561
|
})
|
|
4562
4562
|
] });
|
|
@@ -4574,10 +4574,10 @@ var Li = {
|
|
|
4574
4574
|
"aria-labelledby": D || L.props["aria-labelledby"] || void 0,
|
|
4575
4575
|
className: J(L.props.className, ne),
|
|
4576
4576
|
href: V ? void 0 : L.props.href,
|
|
4577
|
-
onClick:
|
|
4577
|
+
onClick: re,
|
|
4578
4578
|
tabIndex: V ? -1 : L.props.tabIndex,
|
|
4579
4579
|
title: y || L.props.title,
|
|
4580
|
-
children:
|
|
4580
|
+
children: q
|
|
4581
4581
|
}) : O ? /* @__PURE__ */ g("a", {
|
|
4582
4582
|
ref: I,
|
|
4583
4583
|
href: V ? void 0 : O,
|
|
@@ -4598,7 +4598,7 @@ var Li = {
|
|
|
4598
4598
|
...W,
|
|
4599
4599
|
...w
|
|
4600
4600
|
},
|
|
4601
|
-
children:
|
|
4601
|
+
children: q
|
|
4602
4602
|
}) : /* @__PURE__ */ g("button", {
|
|
4603
4603
|
...F,
|
|
4604
4604
|
ref: I,
|
|
@@ -4617,10 +4617,10 @@ var Li = {
|
|
|
4617
4617
|
...W,
|
|
4618
4618
|
...w
|
|
4619
4619
|
},
|
|
4620
|
-
children:
|
|
4620
|
+
children: q
|
|
4621
4621
|
});
|
|
4622
4622
|
});
|
|
4623
|
-
|
|
4623
|
+
Bi.displayName = "Button";
|
|
4624
4624
|
var Q = {
|
|
4625
4625
|
wrapper: "_wrapper_jq9wv_1",
|
|
4626
4626
|
colorPrimary: "_colorPrimary_jq9wv_36",
|
|
@@ -4656,30 +4656,30 @@ var Q = {
|
|
|
4656
4656
|
"checkbox-checkmark-in": "_checkbox-checkmark-in_jq9wv_1",
|
|
4657
4657
|
"checkbox-indeterminate-in": "_checkbox-indeterminate-in_jq9wv_1",
|
|
4658
4658
|
disabled: "_disabled_jq9wv_370"
|
|
4659
|
-
},
|
|
4659
|
+
}, Vi = {
|
|
4660
4660
|
sm: Q.labelSm,
|
|
4661
4661
|
md: Q.labelMd,
|
|
4662
4662
|
lg: Q.labelLg
|
|
4663
|
-
},
|
|
4663
|
+
}, Hi = {
|
|
4664
4664
|
sm: Q.wrapperSm,
|
|
4665
4665
|
md: Q.wrapperMd,
|
|
4666
4666
|
lg: Q.wrapperLg
|
|
4667
|
-
},
|
|
4667
|
+
}, Ui = {
|
|
4668
4668
|
sm: Q.containerSm,
|
|
4669
4669
|
md: Q.containerMd,
|
|
4670
4670
|
lg: Q.containerLg
|
|
4671
|
-
},
|
|
4671
|
+
}, Wi = {
|
|
4672
4672
|
primary: Q.colorPrimary,
|
|
4673
4673
|
neutral: Q.colorNeutral,
|
|
4674
4674
|
success: Q.colorSuccess,
|
|
4675
4675
|
warning: Q.colorWarning,
|
|
4676
4676
|
danger: Q.colorDanger
|
|
4677
|
-
},
|
|
4677
|
+
}, Gi = 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) => {
|
|
4678
4678
|
let k = l(), A = e ?? k, j = f(null), M = !!C, N = n ? `${A}-description` : void 0, P = M ? `${A}-error` : void 0, F = [
|
|
4679
4679
|
E,
|
|
4680
4680
|
N,
|
|
4681
4681
|
P
|
|
4682
|
-
].filter(Boolean).join(" "), [I, L] =
|
|
4682
|
+
].filter(Boolean).join(" "), [I, L] = bt({
|
|
4683
4683
|
value: a,
|
|
4684
4684
|
defaultValue: p,
|
|
4685
4685
|
onChange: S
|
|
@@ -4696,12 +4696,12 @@ var Q = {
|
|
|
4696
4696
|
let z = (e) => {
|
|
4697
4697
|
L(e.target.checked);
|
|
4698
4698
|
};
|
|
4699
|
-
return
|
|
4700
|
-
className: J(Q.container,
|
|
4699
|
+
return Pe(!!(t || w || T), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ _("div", {
|
|
4700
|
+
className: J(Q.container, Ui[s], d === "start" && Q.containerLabelStart, b),
|
|
4701
4701
|
children: [
|
|
4702
4702
|
/* @__PURE__ */ _("label", {
|
|
4703
4703
|
htmlFor: A,
|
|
4704
|
-
className: J(Q.wrapper,
|
|
4704
|
+
className: J(Q.wrapper, Hi[s], Wi[u], d === "start" && Q.labelStart, !t && Q.iconOnly, m && Q.disabled, x),
|
|
4705
4705
|
children: [
|
|
4706
4706
|
/* @__PURE__ */ g("input", {
|
|
4707
4707
|
...D,
|
|
@@ -4731,7 +4731,7 @@ var Q = {
|
|
|
4731
4731
|
})
|
|
4732
4732
|
}),
|
|
4733
4733
|
t && /* @__PURE__ */ _("span", {
|
|
4734
|
-
className: J(Q.label,
|
|
4734
|
+
className: J(Q.label, Vi[s]),
|
|
4735
4735
|
children: [t, h && /* @__PURE__ */ g("span", {
|
|
4736
4736
|
className: Q.requiredMark,
|
|
4737
4737
|
"aria-hidden": "true",
|
|
@@ -4753,7 +4753,7 @@ var Q = {
|
|
|
4753
4753
|
]
|
|
4754
4754
|
});
|
|
4755
4755
|
});
|
|
4756
|
-
|
|
4756
|
+
Gi.displayName = "Checkbox";
|
|
4757
4757
|
var $ = {
|
|
4758
4758
|
inputGroup: "_inputGroup_1nr0h_1",
|
|
4759
4759
|
primary: "_primary_1nr0h_29",
|
|
@@ -4796,7 +4796,7 @@ var $ = {
|
|
|
4796
4796
|
toneMuted: "_toneMuted_1nr0h_881",
|
|
4797
4797
|
toneInverse: "_toneInverse_1nr0h_885",
|
|
4798
4798
|
bare: "_bare_1nr0h_889"
|
|
4799
|
-
},
|
|
4799
|
+
}, Ki = {
|
|
4800
4800
|
default: $.toneDefault,
|
|
4801
4801
|
primary: $.tonePrimary,
|
|
4802
4802
|
secondary: $.toneSecondary,
|
|
@@ -4804,7 +4804,7 @@ var $ = {
|
|
|
4804
4804
|
danger: $.toneDanger,
|
|
4805
4805
|
muted: $.toneMuted,
|
|
4806
4806
|
inverse: $.toneInverse
|
|
4807
|
-
},
|
|
4807
|
+
}, qi = (e = "text", t) => {
|
|
4808
4808
|
if (t) return t;
|
|
4809
4809
|
switch (e) {
|
|
4810
4810
|
case "email": return "email";
|
|
@@ -4814,7 +4814,7 @@ var $ = {
|
|
|
4814
4814
|
case "search": return "off";
|
|
4815
4815
|
default: return;
|
|
4816
4816
|
}
|
|
4817
|
-
},
|
|
4817
|
+
}, Ji = (e, t) => {
|
|
4818
4818
|
let n = e.replace(/\D/g, ""), r = 0, i = "";
|
|
4819
4819
|
for (let e of t) {
|
|
4820
4820
|
if (e === "#") {
|
|
@@ -4826,165 +4826,168 @@ var $ = {
|
|
|
4826
4826
|
r < n.length && (i += e);
|
|
4827
4827
|
}
|
|
4828
4828
|
return i;
|
|
4829
|
-
},
|
|
4830
|
-
let
|
|
4831
|
-
"--input-height": `${
|
|
4832
|
-
"--input-font-size": `${
|
|
4833
|
-
"--input-line-height": `${
|
|
4834
|
-
"--input-icon-size": `${
|
|
4835
|
-
},
|
|
4836
|
-
|
|
4837
|
-
!
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
].filter(Boolean).join(" "),
|
|
4842
|
-
if (
|
|
4843
|
-
|
|
4829
|
+
}, Yi = (e, t) => t ? typeof t == "function" ? t(e) : Ji(e, t) : e, Xi = 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: K = "danger", autoFocus: re, maxLength: q, onMouseEnter: ae, onMouseLeave: oe, "aria-describedby": se, "aria-invalid": ce, "aria-labelledby": le, ...ue }, de) => {
|
|
4830
|
+
let fe = l(), pe = Rr(), me = !!(t || r || v), he = e ?? (me ? void 0 : pe?.controlId) ?? fe, ge = f(null), [Y, _e] = p(!1), [ve, ye] = p(s ?? ""), be = a !== void 0, xe = String((be ? a : ve) ?? ""), Se = G ? G(xe) : xe, Ce = xe.length > 0, we = u ?? pe?.size ?? "md", Te = ie[we], Ee = {
|
|
4831
|
+
"--input-height": `${Te.height}px`,
|
|
4832
|
+
"--input-font-size": `${Te.fontSize}px`,
|
|
4833
|
+
"--input-line-height": `${Te.lineHeight}px`,
|
|
4834
|
+
"--input-icon-size": `${Te.iconSize}px`
|
|
4835
|
+
}, De = y || !!v || !me && !!pe?.invalid, Oe = b || !me && !!pe?.disabled, ke = T || !me && !!pe?.required, Ae = j || E, je = c === "password", Me = je && F && Y ? "text" : c, Ne = L ?? (c === "search" ? /* @__PURE__ */ g(w, {}) : null), X = R, Pe = qi(c, A), Fe = E && !Oe, Ie = M && Ce && !Oe && !Ae && !Fe, Le = F && je && !Oe && !Fe && !Ie, Re = !Fe && !Ie && !Le && !!X, ze = !!(I && q), Be = r ? `${he}-description` : void 0, Ve = v ? `${he}-error` : void 0, He = ze ? `${he}-counter` : void 0, Ue = [
|
|
4836
|
+
se,
|
|
4837
|
+
!me && !se ? pe?.ariaDescribedBy : void 0,
|
|
4838
|
+
Be,
|
|
4839
|
+
Ve,
|
|
4840
|
+
He
|
|
4841
|
+
].filter(Boolean).join(" "), We = U ?? /* @__PURE__ */ g(x, { "aria-hidden": "true" }), Ge = !!(Ne || V), Ke = !!(X || H || Ie || Le || Fe), qe = !!(Ne && V), Je = !!(X && H), Ye = !!(z || B), Xe = o((e) => {
|
|
4842
|
+
if (ge.current = e, typeof de == "function") {
|
|
4843
|
+
de(e);
|
|
4844
4844
|
return;
|
|
4845
4845
|
}
|
|
4846
|
-
|
|
4847
|
-
}, [
|
|
4848
|
-
let t =
|
|
4849
|
-
|
|
4846
|
+
de && (de.current = e);
|
|
4847
|
+
}, [de]), Ze = o((e) => {
|
|
4848
|
+
let t = Yi(ee ? ee(e.target.value) : e.target.value, W);
|
|
4849
|
+
be || ye(t), P?.(t);
|
|
4850
4850
|
}, [
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
]),
|
|
4856
|
-
|
|
4851
|
+
be,
|
|
4852
|
+
W,
|
|
4853
|
+
P,
|
|
4854
|
+
ee
|
|
4855
|
+
]), Qe = o(() => {
|
|
4856
|
+
be || ye(""), P?.(""), N?.(), ge.current?.focus();
|
|
4857
4857
|
}, [
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
]),
|
|
4858
|
+
be,
|
|
4859
|
+
N,
|
|
4860
|
+
P
|
|
4861
|
+
]), $e = /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
|
|
4862
4862
|
className: J($.inputGroup, $[m], $[d], {
|
|
4863
|
-
[$.hasAddons]:
|
|
4864
|
-
[$.isDisabled]:
|
|
4865
|
-
[$.isInvalid]:
|
|
4866
|
-
[$.isLoading]:
|
|
4863
|
+
[$.hasAddons]: Ye,
|
|
4864
|
+
[$.isDisabled]: Oe,
|
|
4865
|
+
[$.isInvalid]: De,
|
|
4866
|
+
[$.isLoading]: Fe
|
|
4867
4867
|
}),
|
|
4868
4868
|
children: [
|
|
4869
|
-
|
|
4869
|
+
z && /* @__PURE__ */ g("span", {
|
|
4870
4870
|
className: $.addon,
|
|
4871
|
-
children:
|
|
4871
|
+
children: z
|
|
4872
4872
|
}),
|
|
4873
4873
|
/* @__PURE__ */ _("div", {
|
|
4874
4874
|
className: J($.inputWrapper, {
|
|
4875
|
-
[$.hasLeftAdornment]:
|
|
4876
|
-
[$.hasRightAdornment]:
|
|
4877
|
-
[$.hasStartIconAndPrefix]:
|
|
4878
|
-
[$.hasEndIconAndSuffix]:
|
|
4875
|
+
[$.hasLeftAdornment]: Ge,
|
|
4876
|
+
[$.hasRightAdornment]: Ke,
|
|
4877
|
+
[$.hasStartIconAndPrefix]: qe,
|
|
4878
|
+
[$.hasEndIconAndSuffix]: Je
|
|
4879
4879
|
}),
|
|
4880
4880
|
children: [
|
|
4881
|
-
|
|
4881
|
+
Ne && /* @__PURE__ */ g("span", {
|
|
4882
4882
|
"aria-hidden": "true",
|
|
4883
|
-
className: J($.startAdornment,
|
|
4884
|
-
children:
|
|
4883
|
+
className: J($.startAdornment, Ki[te]),
|
|
4884
|
+
children: Ne
|
|
4885
4885
|
}),
|
|
4886
|
-
|
|
4886
|
+
V && /* @__PURE__ */ g("span", {
|
|
4887
4887
|
className: $.prefix,
|
|
4888
|
-
children:
|
|
4888
|
+
children: V
|
|
4889
4889
|
}),
|
|
4890
4890
|
/* @__PURE__ */ g("input", {
|
|
4891
|
-
...
|
|
4892
|
-
ref:
|
|
4893
|
-
id:
|
|
4891
|
+
...ue,
|
|
4892
|
+
ref: Xe,
|
|
4893
|
+
id: he,
|
|
4894
4894
|
name: n,
|
|
4895
|
-
type:
|
|
4896
|
-
autoComplete:
|
|
4897
|
-
className: J($.input, $[
|
|
4895
|
+
type: Me,
|
|
4896
|
+
autoComplete: Pe,
|
|
4897
|
+
className: J($.input, $[we], { [$.error]: De }, D),
|
|
4898
4898
|
style: {
|
|
4899
|
-
...
|
|
4900
|
-
...
|
|
4899
|
+
...Ee,
|
|
4900
|
+
...O
|
|
4901
4901
|
},
|
|
4902
|
-
value:
|
|
4903
|
-
onChange:
|
|
4902
|
+
value: Se,
|
|
4903
|
+
onChange: Ze,
|
|
4904
4904
|
placeholder: i,
|
|
4905
|
-
disabled:
|
|
4906
|
-
readOnly:
|
|
4907
|
-
required:
|
|
4908
|
-
autoFocus:
|
|
4909
|
-
maxLength:
|
|
4910
|
-
"aria-invalid":
|
|
4911
|
-
"aria-labelledby":
|
|
4912
|
-
"aria-describedby":
|
|
4913
|
-
"aria-busy":
|
|
4914
|
-
onMouseEnter:
|
|
4915
|
-
onMouseLeave:
|
|
4905
|
+
disabled: Oe,
|
|
4906
|
+
readOnly: Ae,
|
|
4907
|
+
required: ke,
|
|
4908
|
+
autoFocus: re,
|
|
4909
|
+
maxLength: q,
|
|
4910
|
+
"aria-invalid": De ? !0 : ce,
|
|
4911
|
+
"aria-labelledby": le ?? (me ? void 0 : pe?.ariaLabelledBy),
|
|
4912
|
+
"aria-describedby": Ue || void 0,
|
|
4913
|
+
"aria-busy": E || void 0,
|
|
4914
|
+
onMouseEnter: ae,
|
|
4915
|
+
onMouseLeave: oe
|
|
4916
4916
|
}),
|
|
4917
|
-
|
|
4917
|
+
H && /* @__PURE__ */ g("span", {
|
|
4918
4918
|
className: $.suffix,
|
|
4919
|
-
children:
|
|
4919
|
+
children: H
|
|
4920
4920
|
}),
|
|
4921
4921
|
/* @__PURE__ */ _("div", {
|
|
4922
4922
|
className: $.endSlot,
|
|
4923
4923
|
children: [
|
|
4924
|
-
|
|
4924
|
+
Fe && /* @__PURE__ */ g("span", {
|
|
4925
4925
|
className: $.spinner,
|
|
4926
4926
|
"aria-hidden": "true",
|
|
4927
4927
|
"data-testid": "input-spinner"
|
|
4928
4928
|
}),
|
|
4929
|
-
|
|
4929
|
+
Le && /* @__PURE__ */ g("button", {
|
|
4930
4930
|
type: "button",
|
|
4931
4931
|
className: $.iconButton,
|
|
4932
|
-
onClick: () =>
|
|
4932
|
+
onClick: () => _e((e) => !e),
|
|
4933
4933
|
"aria-label": Y ? "Hide password" : "Show password",
|
|
4934
|
-
children: Y ?
|
|
4934
|
+
children: g(Y ? C : S, {
|
|
4935
|
+
size: 18,
|
|
4936
|
+
"aria-hidden": "true"
|
|
4937
|
+
})
|
|
4935
4938
|
}),
|
|
4936
|
-
|
|
4939
|
+
Ie && /* @__PURE__ */ g("button", {
|
|
4937
4940
|
type: "button",
|
|
4938
|
-
className: J($.clearButton,
|
|
4939
|
-
onClick:
|
|
4941
|
+
className: J($.clearButton, Ki[K]),
|
|
4942
|
+
onClick: Qe,
|
|
4940
4943
|
"aria-label": "Clear input",
|
|
4941
|
-
children:
|
|
4944
|
+
children: We
|
|
4942
4945
|
}),
|
|
4943
|
-
|
|
4946
|
+
Re && X && /* @__PURE__ */ g("span", {
|
|
4944
4947
|
"aria-hidden": "true",
|
|
4945
|
-
className: J($.endAdornment,
|
|
4948
|
+
className: J($.endAdornment, Ki[ne]),
|
|
4946
4949
|
children: X
|
|
4947
4950
|
})
|
|
4948
4951
|
]
|
|
4949
4952
|
})
|
|
4950
4953
|
]
|
|
4951
4954
|
}),
|
|
4952
|
-
|
|
4955
|
+
B && /* @__PURE__ */ g("span", {
|
|
4953
4956
|
className: $.addon,
|
|
4954
|
-
children:
|
|
4957
|
+
children: B
|
|
4955
4958
|
})
|
|
4956
4959
|
]
|
|
4957
|
-
}),
|
|
4958
|
-
id:
|
|
4960
|
+
}), ze && /* @__PURE__ */ _("div", {
|
|
4961
|
+
id: He,
|
|
4959
4962
|
className: $.counter,
|
|
4960
4963
|
children: [
|
|
4961
|
-
|
|
4964
|
+
xe.length,
|
|
4962
4965
|
" / ",
|
|
4963
|
-
|
|
4966
|
+
q
|
|
4964
4967
|
]
|
|
4965
4968
|
})] });
|
|
4966
|
-
return !
|
|
4967
|
-
id:
|
|
4969
|
+
return !me && pe ? $e : /* @__PURE__ */ g(Jr, {
|
|
4970
|
+
id: he,
|
|
4968
4971
|
label: t,
|
|
4969
4972
|
description: r,
|
|
4970
4973
|
error: v,
|
|
4971
|
-
required:
|
|
4972
|
-
disabled:
|
|
4973
|
-
invalid:
|
|
4974
|
-
size:
|
|
4975
|
-
className:
|
|
4974
|
+
required: ke,
|
|
4975
|
+
disabled: Oe,
|
|
4976
|
+
invalid: De,
|
|
4977
|
+
size: we,
|
|
4978
|
+
className: k,
|
|
4976
4979
|
bindControl: !1,
|
|
4977
|
-
children:
|
|
4980
|
+
children: $e
|
|
4978
4981
|
});
|
|
4979
4982
|
});
|
|
4980
|
-
|
|
4981
|
-
var
|
|
4983
|
+
Xi.displayName = "Input";
|
|
4984
|
+
var Zi = {
|
|
4982
4985
|
root: "_root_tczcc_1",
|
|
4983
4986
|
thumb: "_thumb_tczcc_54"
|
|
4984
4987
|
};
|
|
4985
4988
|
//#endregion
|
|
4986
4989
|
//#region src/primitives/Switch/Switch.tsx
|
|
4987
|
-
function
|
|
4990
|
+
function Qi({ accessibilityLabel: e = "Switch", checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, invalid: a = !1, onCheckedChange: o }) {
|
|
4988
4991
|
let [s, c] = p(n), l = t !== void 0, u = l ? t : s;
|
|
4989
4992
|
return /* @__PURE__ */ g("button", {
|
|
4990
4993
|
type: "button",
|
|
@@ -4995,24 +4998,24 @@ function Xi({ accessibilityLabel: e = "Switch", checked: t, defaultChecked: n =
|
|
|
4995
4998
|
"aria-required": i || void 0,
|
|
4996
4999
|
"aria-invalid": a || void 0,
|
|
4997
5000
|
"data-state": u ? "checked" : "unchecked",
|
|
4998
|
-
className:
|
|
5001
|
+
className: Zi.root,
|
|
4999
5002
|
onClick: () => {
|
|
5000
5003
|
let e = !u;
|
|
5001
5004
|
l || c(e), o?.(e);
|
|
5002
5005
|
},
|
|
5003
5006
|
children: /* @__PURE__ */ g("span", {
|
|
5004
|
-
className:
|
|
5007
|
+
className: Zi.thumb,
|
|
5005
5008
|
"aria-hidden": "true"
|
|
5006
5009
|
})
|
|
5007
5010
|
});
|
|
5008
5011
|
}
|
|
5009
|
-
var
|
|
5012
|
+
var $i = {
|
|
5010
5013
|
textarea: "_textarea_gl2my_1",
|
|
5011
5014
|
sm: "_sm_gl2my_58",
|
|
5012
5015
|
md: "_md_gl2my_62",
|
|
5013
5016
|
lg: "_lg_gl2my_66"
|
|
5014
|
-
},
|
|
5015
|
-
let w = l(), T =
|
|
5017
|
+
}, ea = 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) => {
|
|
5018
|
+
let w = l(), T = Rr(), E = !!(t || n || r), D = e ?? (E ? void 0 : T?.controlId) ?? w, O = s ?? T?.size ?? "md", k = ie[O], A = {
|
|
5016
5019
|
"--textarea-font-size": `${k.fontSize}px`,
|
|
5017
5020
|
"--textarea-line-height": `${k.lineHeight}px`
|
|
5018
5021
|
}, 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 = [
|
|
@@ -5027,7 +5030,7 @@ var Zi = {
|
|
|
5027
5030
|
ref: C,
|
|
5028
5031
|
id: D,
|
|
5029
5032
|
rows: h,
|
|
5030
|
-
className: J(
|
|
5033
|
+
className: J($i.textarea, $i[O], p),
|
|
5031
5034
|
style: {
|
|
5032
5035
|
...A,
|
|
5033
5036
|
...m
|
|
@@ -5042,7 +5045,7 @@ var Zi = {
|
|
|
5042
5045
|
"aria-describedby": I || void 0,
|
|
5043
5046
|
onChange: L
|
|
5044
5047
|
});
|
|
5045
|
-
return !E && T ? R : /* @__PURE__ */ g(
|
|
5048
|
+
return !E && T ? R : /* @__PURE__ */ g(Jr, {
|
|
5046
5049
|
id: D,
|
|
5047
5050
|
label: t,
|
|
5048
5051
|
description: n,
|
|
@@ -5056,15 +5059,15 @@ var Zi = {
|
|
|
5056
5059
|
children: R
|
|
5057
5060
|
});
|
|
5058
5061
|
});
|
|
5059
|
-
|
|
5062
|
+
ea.displayName = "Textarea";
|
|
5060
5063
|
//#endregion
|
|
5061
5064
|
//#region src/theme/ThemeContext.ts
|
|
5062
|
-
var
|
|
5063
|
-
let [a, o] =
|
|
5065
|
+
var ta = r(null), na = (e) => e === "highContrast" ? "high-contrast" : e, ra = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, syncDocument: r = !0, children: i }) => {
|
|
5066
|
+
let [a, o] = bt({
|
|
5064
5067
|
value: e,
|
|
5065
5068
|
defaultValue: t,
|
|
5066
5069
|
onChange: n
|
|
5067
|
-
}), s =
|
|
5070
|
+
}), s = na(a);
|
|
5068
5071
|
c(() => {
|
|
5069
5072
|
if (!r || typeof document > "u") return;
|
|
5070
5073
|
let { documentElement: e } = document, t = e.dataset.velliraTheme;
|
|
@@ -5080,7 +5083,7 @@ var $i = r(null), ea = (e) => e === "highContrast" ? "high-contrast" : e, ta = (
|
|
|
5080
5083
|
theme: a,
|
|
5081
5084
|
setTheme: o
|
|
5082
5085
|
}), [a, o]);
|
|
5083
|
-
return /* @__PURE__ */ g(
|
|
5086
|
+
return /* @__PURE__ */ g(ta.Provider, {
|
|
5084
5087
|
value: l,
|
|
5085
5088
|
children: /* @__PURE__ */ g("div", {
|
|
5086
5089
|
"data-vellira-theme": s,
|
|
@@ -5088,13 +5091,13 @@ var $i = r(null), ea = (e) => e === "highContrast" ? "high-contrast" : e, ta = (
|
|
|
5088
5091
|
})
|
|
5089
5092
|
});
|
|
5090
5093
|
};
|
|
5091
|
-
|
|
5094
|
+
ra.displayName = "ThemeProvider";
|
|
5092
5095
|
//#endregion
|
|
5093
5096
|
//#region src/theme/useTheme.ts
|
|
5094
|
-
function
|
|
5095
|
-
let e = s(
|
|
5097
|
+
function ia() {
|
|
5098
|
+
let e = s(ta);
|
|
5096
5099
|
if (!e) throw Error("useTheme must be used within ThemeProvider.");
|
|
5097
5100
|
return e;
|
|
5098
5101
|
}
|
|
5099
5102
|
//#endregion
|
|
5100
|
-
export {
|
|
5103
|
+
export { pe as Accordion, Bi as Button, Gi as Checkbox, Zt as Dropdown, Jr as FormField, Xi as Input, Tn as Modal, Wn as Popover, Ot as Portal, Dt as PortalProvider, Xn as Radio, ar as RadioGroup, ti as Select, Qi as Switch, xi as Tabs, ea as Textarea, ra as ThemeProvider, Ri as Tooltip, ia as useTheme };
|