@arcadeai/design-system 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/{check-CxcShTlQ.js → check-B5h1DvDs.js} +2 -2
- package/dist/{chevron-down-D_a-ccxi.js → chevron-down-DmZMdOiC.js} +2 -2
- package/dist/{chevron-right-DriXIqe5.js → chevron-right-BYYHEJjK.js} +2 -2
- package/dist/components/ui/atoms/accordion.js +70 -74
- package/dist/components/ui/atoms/alert.js +2 -2
- package/dist/components/ui/atoms/avatar.js +5 -5
- package/dist/components/ui/atoms/badge.js +3 -3
- package/dist/components/ui/atoms/breadcrumb.js +5 -5
- package/dist/components/ui/atoms/button.js +3 -3
- package/dist/components/ui/atoms/card.js +1 -1
- package/dist/components/ui/atoms/chart.js +2153 -2154
- package/dist/components/ui/atoms/collapsible.js +1 -1
- package/dist/components/ui/atoms/command.js +15 -15
- package/dist/components/ui/atoms/dialog.js +2 -2
- package/dist/components/ui/atoms/dropdown-menu.js +367 -384
- package/dist/components/ui/atoms/form.d.ts +1 -1
- package/dist/components/ui/atoms/form.js +182 -199
- package/dist/components/ui/atoms/hover-card.js +40 -41
- package/dist/components/ui/atoms/input.js +1 -1
- package/dist/components/ui/atoms/label.js +18 -19
- package/dist/components/ui/atoms/popover.js +107 -110
- package/dist/components/ui/atoms/progress.js +3 -3
- package/dist/components/ui/atoms/resizable.js +8 -8
- package/dist/components/ui/atoms/scroll-area.js +82 -84
- package/dist/components/ui/atoms/select.js +393 -407
- package/dist/components/ui/atoms/separator.js +2 -2
- package/dist/components/ui/atoms/sheet.js +2 -2
- package/dist/components/ui/atoms/sidebar.js +17 -17
- package/dist/components/ui/atoms/skeleton.js +1 -1
- package/dist/components/ui/atoms/slider.js +213 -214
- package/dist/components/ui/atoms/sonner.js +28 -28
- package/dist/components/ui/atoms/switch.js +7 -7
- package/dist/components/ui/atoms/table.js +1 -1
- package/dist/components/ui/atoms/tabs.js +8 -8
- package/dist/components/ui/atoms/textarea.js +1 -1
- package/dist/components/ui/atoms/toggle.js +5 -5
- package/dist/components/ui/atoms/tooltip.js +103 -104
- package/dist/{createLucideIcon-B6fy1GTR.js → createLucideIcon-XRdN60yz.js} +4 -4
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/index-437EL2iq.js +52 -0
- package/dist/{index-CB1Wkg0G.js → index-5Bhkapwi.js} +2 -3
- package/dist/index-B695uy69.js +9 -0
- package/dist/{index-CHDs-SiB.js → index-BGQepRFJ.js} +1 -1
- package/dist/{index-BAhNQL1u.js → index-BvWMjxZ5.js} +22 -23
- package/dist/index-C8_QusYl.js +70 -0
- package/dist/index-CCKe-Mpx.js +6 -0
- package/dist/{index-DdnpnyX2.js → index-CQhYMnjT.js} +4 -4
- package/dist/{index-C9KW2H79.js → index-CpDnqHCm.js} +1 -1
- package/dist/{index-CxK6rt_N.js → index-CtSXVDca.js} +8 -8
- package/dist/{index-umR1UobZ.js → index-Cv867SGx.js} +1 -1
- package/dist/{index-CuMpq4Un.js → index-CxO14pcK.js} +2 -2
- package/dist/index-DFZozV_h.js +68 -0
- package/dist/index-DLfXSskr.js +255 -0
- package/dist/{index-D2uXV4lz.js → index-DMCYNwtg.js} +8 -8
- package/dist/index-DYHsXnnS.js +144 -0
- package/dist/{index-nluJZSbA.js → index-DfNPZZ8M.js} +1 -1
- package/dist/{index-Dy7YuPrV.js → index-f0YS5Ufh.js} +319 -321
- package/dist/lib/utils.js +1 -1
- package/dist/{utils-Dy2WjYNJ.js → utils-CRiPKpXj.js} +41 -42
- package/package.json +32 -26
- package/dist/index-CL4N9wMT.js +0 -259
- package/dist/index-DLeNytVF.js +0 -9
- package/dist/index-DYfkNB0n.js +0 -54
- package/dist/index-DuekHEmj.js +0 -6
- package/dist/index-DwYXX2sM.js +0 -13
- package/dist/index-QMp1pYFl.js +0 -145
- package/dist/index-UFb2E87s.js +0 -70
- package/dist/index-p7nYL7BU.js +0 -71
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s, jsxs as Q, Fragment as be } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import * as Re from "react-dom";
|
|
4
4
|
import { c as Ne } from "../../../index-rKs9bXHr.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { c as lt } from "../../../index-
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
5
|
+
import { c as P } from "../../../index-B695uy69.js";
|
|
6
|
+
import { c as lt } from "../../../index-CxO14pcK.js";
|
|
7
|
+
import { u as k, c as ct } from "../../../index-5Bhkapwi.js";
|
|
8
|
+
import { c as it } from "../../../index-DFZozV_h.js";
|
|
9
9
|
import { u as dt } from "../../../index-ByaXH_ih.js";
|
|
10
|
-
import { P as ut, D as pt } from "../../../index-
|
|
11
|
-
import { h as ft, u as mt, R as ht, F as vt } from "../../../index-
|
|
12
|
-
import { u as Te } from "../../../index-
|
|
13
|
-
import { c as Ee, R as gt, A as St, C as wt, a as xt } from "../../../index-
|
|
14
|
-
import { P as M } from "../../../index-
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as _e } from "../../../index-
|
|
17
|
-
import { u as G } from "../../../index-
|
|
18
|
-
import { u as
|
|
19
|
-
import { V as It } from "../../../index-
|
|
20
|
-
import { c as j } from "../../../utils-
|
|
21
|
-
import { C as bt } from "../../../check-
|
|
22
|
-
import { C as Me } from "../../../chevron-down-
|
|
23
|
-
import { c as Tt } from "../../../createLucideIcon-
|
|
10
|
+
import { P as ut, D as pt } from "../../../index-DYHsXnnS.js";
|
|
11
|
+
import { h as ft, u as mt, R as ht, F as vt } from "../../../index-BvWMjxZ5.js";
|
|
12
|
+
import { u as Te } from "../../../index-Cv867SGx.js";
|
|
13
|
+
import { c as Ee, R as gt, A as St, C as wt, a as xt } from "../../../index-f0YS5Ufh.js";
|
|
14
|
+
import { P as M } from "../../../index-CpDnqHCm.js";
|
|
15
|
+
import { u as Ct } from "../../../index-0ioNhtNM.js";
|
|
16
|
+
import { u as _e } from "../../../index-437EL2iq.js";
|
|
17
|
+
import { u as G } from "../../../index-CCKe-Mpx.js";
|
|
18
|
+
import { u as yt } from "../../../index-BZPx6jYI.js";
|
|
19
|
+
import { V as It } from "../../../index-DfNPZZ8M.js";
|
|
20
|
+
import { c as j } from "../../../utils-CRiPKpXj.js";
|
|
21
|
+
import { C as bt } from "../../../check-B5h1DvDs.js";
|
|
22
|
+
import { C as Me } from "../../../chevron-down-DmZMdOiC.js";
|
|
23
|
+
import { c as Tt } from "../../../createLucideIcon-XRdN60yz.js";
|
|
24
24
|
/**
|
|
25
|
-
* @license lucide-react v0.
|
|
25
|
+
* @license lucide-react v0.525.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
29
|
*/
|
|
30
30
|
const Pt = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Nt = Tt("chevron-up", Pt);
|
|
31
|
-
var _t = [" ", "Enter", "ArrowUp", "ArrowDown"], Rt = [" ", "Enter"], ee = "Select", [de, ue, Et] = lt(ee), [ne, Oo] =
|
|
31
|
+
var _t = [" ", "Enter", "ArrowUp", "ArrowDown"], Rt = [" ", "Enter"], ee = "Select", [de, ue, Et] = lt(ee), [ne, Oo] = it(ee, [
|
|
32
32
|
Et,
|
|
33
33
|
Ee
|
|
34
34
|
]), pe = Ee(), [Mt, Y] = ne(ee), [At, Ot] = ne(ee), Ae = (t) => {
|
|
35
35
|
const {
|
|
36
36
|
__scopeSelect: o,
|
|
37
37
|
children: e,
|
|
38
|
-
open:
|
|
39
|
-
defaultOpen:
|
|
40
|
-
onOpenChange:
|
|
41
|
-
value:
|
|
38
|
+
open: c,
|
|
39
|
+
defaultOpen: l,
|
|
40
|
+
onOpenChange: u,
|
|
41
|
+
value: r,
|
|
42
42
|
defaultValue: a,
|
|
43
|
-
onValueChange:
|
|
43
|
+
onValueChange: i,
|
|
44
44
|
dir: f,
|
|
45
45
|
name: g,
|
|
46
46
|
autoComplete: x,
|
|
47
|
-
disabled:
|
|
48
|
-
required:
|
|
49
|
-
form:
|
|
50
|
-
} = t, d = pe(o), [
|
|
51
|
-
prop:
|
|
52
|
-
defaultProp:
|
|
53
|
-
onChange:
|
|
47
|
+
disabled: N,
|
|
48
|
+
required: b,
|
|
49
|
+
form: y
|
|
50
|
+
} = t, d = pe(o), [h, S] = n.useState(null), [m, v] = n.useState(null), [W, A] = n.useState(!1), re = dt(f), [_, D] = _e({
|
|
51
|
+
prop: c,
|
|
52
|
+
defaultProp: l ?? !1,
|
|
53
|
+
onChange: u,
|
|
54
54
|
caller: ee
|
|
55
55
|
}), [z, X] = _e({
|
|
56
|
-
prop:
|
|
56
|
+
prop: r,
|
|
57
57
|
defaultProp: a,
|
|
58
|
-
onChange:
|
|
58
|
+
onChange: i,
|
|
59
59
|
caller: ee
|
|
60
|
-
}),
|
|
61
|
-
return /* @__PURE__ */
|
|
60
|
+
}), B = n.useRef(null), V = h ? y || !!h.closest("form") : !0, [K, H] = n.useState(/* @__PURE__ */ new Set()), U = Array.from(K).map((R) => R.props.value).join(";");
|
|
61
|
+
return /* @__PURE__ */ s(gt, { ...d, children: /* @__PURE__ */ Q(
|
|
62
62
|
Mt,
|
|
63
63
|
{
|
|
64
|
-
required:
|
|
64
|
+
required: b,
|
|
65
65
|
scope: o,
|
|
66
|
-
trigger:
|
|
67
|
-
onTriggerChange:
|
|
68
|
-
valueNode:
|
|
69
|
-
onValueNodeChange:
|
|
70
|
-
valueNodeHasChildren:
|
|
71
|
-
onValueNodeHasChildrenChange:
|
|
66
|
+
trigger: h,
|
|
67
|
+
onTriggerChange: S,
|
|
68
|
+
valueNode: m,
|
|
69
|
+
onValueNodeChange: v,
|
|
70
|
+
valueNodeHasChildren: W,
|
|
71
|
+
onValueNodeHasChildrenChange: A,
|
|
72
72
|
contentId: Te(),
|
|
73
73
|
value: z,
|
|
74
74
|
onValueChange: X,
|
|
75
75
|
open: _,
|
|
76
|
-
onOpenChange:
|
|
76
|
+
onOpenChange: D,
|
|
77
77
|
dir: re,
|
|
78
|
-
triggerPointerDownPosRef:
|
|
79
|
-
disabled:
|
|
78
|
+
triggerPointerDownPosRef: B,
|
|
79
|
+
disabled: N,
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ s(de.Provider, { scope: o, children: /* @__PURE__ */ s(
|
|
82
82
|
At,
|
|
83
83
|
{
|
|
84
84
|
scope: t.__scopeSelect,
|
|
85
85
|
onNativeOptionAdd: n.useCallback((R) => {
|
|
86
|
-
|
|
86
|
+
H((L) => new Set(L).add(R));
|
|
87
87
|
}, []),
|
|
88
88
|
onNativeOptionRemove: n.useCallback((R) => {
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
return
|
|
89
|
+
H((L) => {
|
|
90
|
+
const F = new Set(L);
|
|
91
|
+
return F.delete(R), F;
|
|
92
92
|
});
|
|
93
93
|
}, []),
|
|
94
94
|
children: e
|
|
95
95
|
}
|
|
96
96
|
) }),
|
|
97
|
-
|
|
97
|
+
V ? /* @__PURE__ */ Q(
|
|
98
98
|
nt,
|
|
99
99
|
{
|
|
100
100
|
"aria-hidden": !0,
|
|
101
|
-
required:
|
|
101
|
+
required: b,
|
|
102
102
|
tabIndex: -1,
|
|
103
103
|
name: g,
|
|
104
104
|
autoComplete: x,
|
|
105
105
|
value: z,
|
|
106
106
|
onChange: (R) => X(R.target.value),
|
|
107
|
-
disabled:
|
|
108
|
-
form:
|
|
107
|
+
disabled: N,
|
|
108
|
+
form: y,
|
|
109
109
|
children: [
|
|
110
|
-
z === void 0 ? /* @__PURE__ */
|
|
110
|
+
z === void 0 ? /* @__PURE__ */ s("option", { value: "" }) : null,
|
|
111
111
|
Array.from(K)
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
|
-
|
|
114
|
+
U
|
|
115
115
|
) : null
|
|
116
116
|
]
|
|
117
117
|
}
|
|
@@ -120,42 +120,42 @@ var _t = [" ", "Enter", "ArrowUp", "ArrowDown"], Rt = [" ", "Enter"], ee = "Sele
|
|
|
120
120
|
Ae.displayName = ee;
|
|
121
121
|
var Oe = "SelectTrigger", De = n.forwardRef(
|
|
122
122
|
(t, o) => {
|
|
123
|
-
const { __scopeSelect: e, disabled:
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
}),
|
|
127
|
-
a || (
|
|
123
|
+
const { __scopeSelect: e, disabled: c = !1, ...l } = t, u = pe(e), r = Y(Oe, e), a = r.disabled || c, i = k(o, r.onTriggerChange), f = ue(e), g = n.useRef("touch"), [x, N, b] = st((d) => {
|
|
124
|
+
const h = f().filter((v) => !v.disabled), S = h.find((v) => v.value === r.value), m = at(h, d, S);
|
|
125
|
+
m !== void 0 && r.onValueChange(m.value);
|
|
126
|
+
}), y = (d) => {
|
|
127
|
+
a || (r.onOpenChange(!0), b()), d && (r.triggerPointerDownPosRef.current = {
|
|
128
128
|
x: Math.round(d.pageX),
|
|
129
129
|
y: Math.round(d.pageY)
|
|
130
130
|
});
|
|
131
131
|
};
|
|
132
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ s(St, { asChild: !0, ...u, children: /* @__PURE__ */ s(
|
|
133
133
|
M.button,
|
|
134
134
|
{
|
|
135
135
|
type: "button",
|
|
136
136
|
role: "combobox",
|
|
137
|
-
"aria-controls":
|
|
138
|
-
"aria-expanded":
|
|
139
|
-
"aria-required":
|
|
137
|
+
"aria-controls": r.contentId,
|
|
138
|
+
"aria-expanded": r.open,
|
|
139
|
+
"aria-required": r.required,
|
|
140
140
|
"aria-autocomplete": "none",
|
|
141
|
-
dir:
|
|
142
|
-
"data-state":
|
|
141
|
+
dir: r.dir,
|
|
142
|
+
"data-state": r.open ? "open" : "closed",
|
|
143
143
|
disabled: a,
|
|
144
144
|
"data-disabled": a ? "" : void 0,
|
|
145
|
-
"data-placeholder": rt(
|
|
146
|
-
...
|
|
147
|
-
ref:
|
|
148
|
-
onClick:
|
|
149
|
-
d.currentTarget.focus(), g.current !== "mouse" &&
|
|
145
|
+
"data-placeholder": rt(r.value) ? "" : void 0,
|
|
146
|
+
...l,
|
|
147
|
+
ref: i,
|
|
148
|
+
onClick: P(l.onClick, (d) => {
|
|
149
|
+
d.currentTarget.focus(), g.current !== "mouse" && y(d);
|
|
150
150
|
}),
|
|
151
|
-
onPointerDown:
|
|
151
|
+
onPointerDown: P(l.onPointerDown, (d) => {
|
|
152
152
|
g.current = d.pointerType;
|
|
153
|
-
const
|
|
154
|
-
|
|
153
|
+
const h = d.target;
|
|
154
|
+
h.hasPointerCapture(d.pointerId) && h.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (y(d), d.preventDefault());
|
|
155
155
|
}),
|
|
156
|
-
onKeyDown:
|
|
157
|
-
const
|
|
158
|
-
!(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 &&
|
|
156
|
+
onKeyDown: P(l.onKeyDown, (d) => {
|
|
157
|
+
const h = x.current !== "";
|
|
158
|
+
!(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && N(d.key), !(h && d.key === " ") && _t.includes(d.key) && (y(), d.preventDefault());
|
|
159
159
|
})
|
|
160
160
|
}
|
|
161
161
|
) });
|
|
@@ -164,16 +164,16 @@ var Oe = "SelectTrigger", De = n.forwardRef(
|
|
|
164
164
|
De.displayName = Oe;
|
|
165
165
|
var Le = "SelectValue", ke = n.forwardRef(
|
|
166
166
|
(t, o) => {
|
|
167
|
-
const { __scopeSelect: e, className:
|
|
167
|
+
const { __scopeSelect: e, className: c, style: l, children: u, placeholder: r = "", ...a } = t, i = Y(Le, e), { onValueNodeHasChildrenChange: f } = i, g = u !== void 0, x = k(o, i.onValueNodeChange);
|
|
168
168
|
return G(() => {
|
|
169
169
|
f(g);
|
|
170
|
-
}, [f, g]), /* @__PURE__ */
|
|
170
|
+
}, [f, g]), /* @__PURE__ */ s(
|
|
171
171
|
M.span,
|
|
172
172
|
{
|
|
173
173
|
...a,
|
|
174
174
|
ref: x,
|
|
175
175
|
style: { pointerEvents: "none" },
|
|
176
|
-
children: rt(
|
|
176
|
+
children: rt(i.value) ? /* @__PURE__ */ s(be, { children: r }) : u
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
179
|
}
|
|
@@ -181,169 +181,167 @@ var Le = "SelectValue", ke = n.forwardRef(
|
|
|
181
181
|
ke.displayName = Le;
|
|
182
182
|
var Dt = "SelectIcon", Be = n.forwardRef(
|
|
183
183
|
(t, o) => {
|
|
184
|
-
const { __scopeSelect: e, children:
|
|
185
|
-
return /* @__PURE__ */
|
|
184
|
+
const { __scopeSelect: e, children: c, ...l } = t;
|
|
185
|
+
return /* @__PURE__ */ s(M.span, { "aria-hidden": !0, ...l, ref: o, children: c || "▼" });
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
Be.displayName = Dt;
|
|
189
|
-
var Lt = "SelectPortal", Ve = (t) => /* @__PURE__ */
|
|
189
|
+
var Lt = "SelectPortal", Ve = (t) => /* @__PURE__ */ s(ut, { asChild: !0, ...t });
|
|
190
190
|
Ve.displayName = Lt;
|
|
191
191
|
var te = "SelectContent", He = n.forwardRef(
|
|
192
192
|
(t, o) => {
|
|
193
|
-
const e = Y(te, t.__scopeSelect), [
|
|
193
|
+
const e = Y(te, t.__scopeSelect), [c, l] = n.useState();
|
|
194
194
|
if (G(() => {
|
|
195
|
-
|
|
195
|
+
l(new DocumentFragment());
|
|
196
196
|
}, []), !e.open) {
|
|
197
|
-
const
|
|
198
|
-
return
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
197
|
+
const u = c;
|
|
198
|
+
return u ? Re.createPortal(
|
|
199
|
+
/* @__PURE__ */ s(Ue, { scope: t.__scopeSelect, children: /* @__PURE__ */ s(de.Slot, { scope: t.__scopeSelect, children: /* @__PURE__ */ s("div", { children: t.children }) }) }),
|
|
200
|
+
u
|
|
201
201
|
) : null;
|
|
202
202
|
}
|
|
203
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ s(Fe, { ...t, ref: o });
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
He.displayName = te;
|
|
207
|
-
var
|
|
207
|
+
var O = 10, [Ue, q] = ne(te), kt = "SelectContentImpl", Bt = ct("SelectContent.RemoveScroll"), Fe = n.forwardRef(
|
|
208
208
|
(t, o) => {
|
|
209
209
|
const {
|
|
210
210
|
__scopeSelect: e,
|
|
211
|
-
position:
|
|
212
|
-
onCloseAutoFocus:
|
|
213
|
-
onEscapeKeyDown:
|
|
214
|
-
onPointerDownOutside:
|
|
211
|
+
position: c = "item-aligned",
|
|
212
|
+
onCloseAutoFocus: l,
|
|
213
|
+
onEscapeKeyDown: u,
|
|
214
|
+
onPointerDownOutside: r,
|
|
215
215
|
//
|
|
216
216
|
// PopperContent props
|
|
217
217
|
side: a,
|
|
218
|
-
sideOffset:
|
|
218
|
+
sideOffset: i,
|
|
219
219
|
align: f,
|
|
220
220
|
alignOffset: g,
|
|
221
221
|
arrowPadding: x,
|
|
222
|
-
collisionBoundary:
|
|
223
|
-
collisionPadding:
|
|
224
|
-
sticky:
|
|
222
|
+
collisionBoundary: N,
|
|
223
|
+
collisionPadding: b,
|
|
224
|
+
sticky: y,
|
|
225
225
|
hideWhenDetached: d,
|
|
226
|
-
avoidCollisions:
|
|
226
|
+
avoidCollisions: h,
|
|
227
227
|
//
|
|
228
|
-
...
|
|
229
|
-
} = t,
|
|
228
|
+
...S
|
|
229
|
+
} = t, m = Y(te, e), [v, W] = n.useState(null), [A, re] = n.useState(null), _ = k(o, (p) => W(p)), [D, z] = n.useState(null), [X, B] = n.useState(
|
|
230
230
|
null
|
|
231
|
-
),
|
|
231
|
+
), V = ue(e), [K, H] = n.useState(!1), U = n.useRef(!1);
|
|
232
232
|
n.useEffect(() => {
|
|
233
|
-
if (
|
|
234
|
-
}, [
|
|
233
|
+
if (v) return ft(v);
|
|
234
|
+
}, [v]), mt();
|
|
235
235
|
const R = n.useCallback(
|
|
236
|
-
(
|
|
237
|
-
const [I, ...E] =
|
|
238
|
-
for (const
|
|
239
|
-
if (
|
|
236
|
+
(p) => {
|
|
237
|
+
const [I, ...E] = V().map((T) => T.ref.current), [w] = E.slice(-1), C = document.activeElement;
|
|
238
|
+
for (const T of p)
|
|
239
|
+
if (T === C || (T?.scrollIntoView({ block: "nearest" }), T === I && A && (A.scrollTop = 0), T === w && A && (A.scrollTop = A.scrollHeight), T?.focus(), document.activeElement !== C)) return;
|
|
240
240
|
},
|
|
241
|
-
[
|
|
242
|
-
),
|
|
243
|
-
() => R([
|
|
244
|
-
[R,
|
|
241
|
+
[V, A]
|
|
242
|
+
), L = n.useCallback(
|
|
243
|
+
() => R([D, v]),
|
|
244
|
+
[R, D, v]
|
|
245
245
|
);
|
|
246
246
|
n.useEffect(() => {
|
|
247
|
-
K &&
|
|
248
|
-
}, [K,
|
|
249
|
-
const { onOpenChange:
|
|
247
|
+
K && L();
|
|
248
|
+
}, [K, L]);
|
|
249
|
+
const { onOpenChange: F, triggerPointerDownPosRef: $ } = m;
|
|
250
250
|
n.useEffect(() => {
|
|
251
|
-
if (
|
|
252
|
-
let
|
|
253
|
-
const I = (
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
y: Math.abs(Math.round(C.pageY) - (((w = $.current) == null ? void 0 : w.y) ?? 0))
|
|
251
|
+
if (v) {
|
|
252
|
+
let p = { x: 0, y: 0 };
|
|
253
|
+
const I = (w) => {
|
|
254
|
+
p = {
|
|
255
|
+
x: Math.abs(Math.round(w.pageX) - ($.current?.x ?? 0)),
|
|
256
|
+
y: Math.abs(Math.round(w.pageY) - ($.current?.y ?? 0))
|
|
258
257
|
};
|
|
259
|
-
}, E = (
|
|
260
|
-
|
|
258
|
+
}, E = (w) => {
|
|
259
|
+
p.x <= 10 && p.y <= 10 ? w.preventDefault() : v.contains(w.target) || F(!1), document.removeEventListener("pointermove", I), $.current = null;
|
|
261
260
|
};
|
|
262
261
|
return $.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", E, { capture: !0, once: !0 })), () => {
|
|
263
262
|
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", E, { capture: !0 });
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
|
-
}, [
|
|
267
|
-
const
|
|
268
|
-
return window.addEventListener("blur",
|
|
269
|
-
window.removeEventListener("blur",
|
|
265
|
+
}, [v, F, $]), n.useEffect(() => {
|
|
266
|
+
const p = () => F(!1);
|
|
267
|
+
return window.addEventListener("blur", p), window.addEventListener("resize", p), () => {
|
|
268
|
+
window.removeEventListener("blur", p), window.removeEventListener("resize", p);
|
|
270
269
|
};
|
|
271
|
-
}, [
|
|
272
|
-
const [fe, le] = st((
|
|
273
|
-
const I =
|
|
274
|
-
|
|
270
|
+
}, [F]);
|
|
271
|
+
const [fe, le] = st((p) => {
|
|
272
|
+
const I = V().filter((C) => !C.disabled), E = I.find((C) => C.ref.current === document.activeElement), w = at(I, p, E);
|
|
273
|
+
w && setTimeout(() => w.ref.current.focus());
|
|
275
274
|
}), me = n.useCallback(
|
|
276
|
-
(
|
|
277
|
-
const
|
|
278
|
-
(
|
|
275
|
+
(p, I, E) => {
|
|
276
|
+
const w = !U.current && !E;
|
|
277
|
+
(m.value !== void 0 && m.value === I || w) && (z(p), w && (U.current = !0));
|
|
279
278
|
},
|
|
280
|
-
[
|
|
281
|
-
), he = n.useCallback(() =>
|
|
282
|
-
(
|
|
283
|
-
const
|
|
284
|
-
(
|
|
279
|
+
[m.value]
|
|
280
|
+
), he = n.useCallback(() => v?.focus(), [v]), oe = n.useCallback(
|
|
281
|
+
(p, I, E) => {
|
|
282
|
+
const w = !U.current && !E;
|
|
283
|
+
(m.value !== void 0 && m.value === I || w) && B(p);
|
|
285
284
|
},
|
|
286
|
-
[
|
|
287
|
-
),
|
|
285
|
+
[m.value]
|
|
286
|
+
), ce = c === "popper" ? we : We, se = ce === we ? {
|
|
288
287
|
side: a,
|
|
289
|
-
sideOffset:
|
|
288
|
+
sideOffset: i,
|
|
290
289
|
align: f,
|
|
291
290
|
alignOffset: g,
|
|
292
291
|
arrowPadding: x,
|
|
293
|
-
collisionBoundary:
|
|
294
|
-
collisionPadding:
|
|
295
|
-
sticky:
|
|
292
|
+
collisionBoundary: N,
|
|
293
|
+
collisionPadding: b,
|
|
294
|
+
sticky: y,
|
|
296
295
|
hideWhenDetached: d,
|
|
297
|
-
avoidCollisions:
|
|
296
|
+
avoidCollisions: h
|
|
298
297
|
} : {};
|
|
299
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ s(
|
|
300
299
|
Ue,
|
|
301
300
|
{
|
|
302
301
|
scope: e,
|
|
303
|
-
content:
|
|
304
|
-
viewport:
|
|
302
|
+
content: v,
|
|
303
|
+
viewport: A,
|
|
305
304
|
onViewportChange: re,
|
|
306
305
|
itemRefCallback: me,
|
|
307
|
-
selectedItem:
|
|
306
|
+
selectedItem: D,
|
|
308
307
|
onItemLeave: he,
|
|
309
308
|
itemTextRefCallback: oe,
|
|
310
|
-
focusSelectedItem:
|
|
309
|
+
focusSelectedItem: L,
|
|
311
310
|
selectedItemText: X,
|
|
312
|
-
position:
|
|
311
|
+
position: c,
|
|
313
312
|
isPositioned: K,
|
|
314
313
|
searchRef: fe,
|
|
315
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ s(ht, { as: Bt, allowPinchZoom: !0, children: /* @__PURE__ */ s(
|
|
316
315
|
vt,
|
|
317
316
|
{
|
|
318
317
|
asChild: !0,
|
|
319
|
-
trapped:
|
|
320
|
-
onMountAutoFocus: (
|
|
321
|
-
|
|
318
|
+
trapped: m.open,
|
|
319
|
+
onMountAutoFocus: (p) => {
|
|
320
|
+
p.preventDefault();
|
|
322
321
|
},
|
|
323
|
-
onUnmountAutoFocus:
|
|
324
|
-
|
|
325
|
-
(I = u.trigger) == null || I.focus({ preventScroll: !0 }), m.preventDefault();
|
|
322
|
+
onUnmountAutoFocus: P(l, (p) => {
|
|
323
|
+
m.trigger?.focus({ preventScroll: !0 }), p.preventDefault();
|
|
326
324
|
}),
|
|
327
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ s(
|
|
328
326
|
pt,
|
|
329
327
|
{
|
|
330
328
|
asChild: !0,
|
|
331
329
|
disableOutsidePointerEvents: !0,
|
|
332
|
-
onEscapeKeyDown:
|
|
333
|
-
onPointerDownOutside:
|
|
334
|
-
onFocusOutside: (
|
|
335
|
-
onDismiss: () =>
|
|
336
|
-
children: /* @__PURE__ */
|
|
337
|
-
|
|
330
|
+
onEscapeKeyDown: u,
|
|
331
|
+
onPointerDownOutside: r,
|
|
332
|
+
onFocusOutside: (p) => p.preventDefault(),
|
|
333
|
+
onDismiss: () => m.onOpenChange(!1),
|
|
334
|
+
children: /* @__PURE__ */ s(
|
|
335
|
+
ce,
|
|
338
336
|
{
|
|
339
337
|
role: "listbox",
|
|
340
|
-
id:
|
|
341
|
-
"data-state":
|
|
342
|
-
dir:
|
|
343
|
-
onContextMenu: (
|
|
344
|
-
...
|
|
338
|
+
id: m.contentId,
|
|
339
|
+
"data-state": m.open ? "open" : "closed",
|
|
340
|
+
dir: m.dir,
|
|
341
|
+
onContextMenu: (p) => p.preventDefault(),
|
|
342
|
+
...S,
|
|
345
343
|
...se,
|
|
346
|
-
onPlaced: () =>
|
|
344
|
+
onPlaced: () => H(!0),
|
|
347
345
|
ref: _,
|
|
348
346
|
style: {
|
|
349
347
|
// flex layout so we can place the scroll buttons properly
|
|
@@ -351,17 +349,17 @@ var D = 10, [Ue, q] = ne(te), kt = "SelectContentImpl", Bt = it("SelectContent.R
|
|
|
351
349
|
flexDirection: "column",
|
|
352
350
|
// reset the outline by default as the content MAY get focused
|
|
353
351
|
outline: "none",
|
|
354
|
-
...
|
|
352
|
+
...S.style
|
|
355
353
|
},
|
|
356
|
-
onKeyDown:
|
|
357
|
-
const I =
|
|
358
|
-
if (
|
|
359
|
-
let
|
|
360
|
-
if (["ArrowUp", "End"].includes(
|
|
361
|
-
const
|
|
362
|
-
|
|
354
|
+
onKeyDown: P(S.onKeyDown, (p) => {
|
|
355
|
+
const I = p.ctrlKey || p.altKey || p.metaKey;
|
|
356
|
+
if (p.key === "Tab" && p.preventDefault(), !I && p.key.length === 1 && le(p.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(p.key)) {
|
|
357
|
+
let w = V().filter((C) => !C.disabled).map((C) => C.ref.current);
|
|
358
|
+
if (["ArrowUp", "End"].includes(p.key) && (w = w.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(p.key)) {
|
|
359
|
+
const C = p.target, T = w.indexOf(C);
|
|
360
|
+
w = w.slice(T + 1);
|
|
363
361
|
}
|
|
364
|
-
setTimeout(() => R(
|
|
362
|
+
setTimeout(() => R(w)), p.preventDefault();
|
|
365
363
|
}
|
|
366
364
|
})
|
|
367
365
|
}
|
|
@@ -376,93 +374,93 @@ var D = 10, [Ue, q] = ne(te), kt = "SelectContentImpl", Bt = it("SelectContent.R
|
|
|
376
374
|
);
|
|
377
375
|
Fe.displayName = kt;
|
|
378
376
|
var Vt = "SelectItemAlignedPosition", We = n.forwardRef((t, o) => {
|
|
379
|
-
const { __scopeSelect: e, onPlaced:
|
|
380
|
-
if (
|
|
381
|
-
const _ =
|
|
382
|
-
if (
|
|
383
|
-
const
|
|
384
|
-
|
|
377
|
+
const { __scopeSelect: e, onPlaced: c, ...l } = t, u = Y(te, e), r = q(te, e), [a, i] = n.useState(null), [f, g] = n.useState(null), x = k(o, (_) => g(_)), N = ue(e), b = n.useRef(!1), y = n.useRef(!0), { viewport: d, selectedItem: h, selectedItemText: S, focusSelectedItem: m } = r, v = n.useCallback(() => {
|
|
378
|
+
if (u.trigger && u.valueNode && a && f && d && h && S) {
|
|
379
|
+
const _ = u.trigger.getBoundingClientRect(), D = f.getBoundingClientRect(), z = u.valueNode.getBoundingClientRect(), X = S.getBoundingClientRect();
|
|
380
|
+
if (u.dir !== "rtl") {
|
|
381
|
+
const C = X.left - D.left, T = z.left - C, Z = _.left - T, J = _.width + Z, ve = Math.max(J, D.width), ge = window.innerWidth - O, Se = Ne(T, [
|
|
382
|
+
O,
|
|
385
383
|
// Prevents the content from going off the starting edge of the
|
|
386
384
|
// viewport. It may still go off the ending edge, but this can be
|
|
387
385
|
// controlled by the user since they may want to manage overflow in a
|
|
388
386
|
// specific way.
|
|
389
387
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
390
|
-
Math.max(
|
|
388
|
+
Math.max(O, ge - ve)
|
|
391
389
|
]);
|
|
392
390
|
a.style.minWidth = J + "px", a.style.left = Se + "px";
|
|
393
391
|
} else {
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
Math.max(
|
|
392
|
+
const C = D.right - X.right, T = window.innerWidth - z.right - C, Z = window.innerWidth - _.right - T, J = _.width + Z, ve = Math.max(J, D.width), ge = window.innerWidth - O, Se = Ne(T, [
|
|
393
|
+
O,
|
|
394
|
+
Math.max(O, ge - ve)
|
|
397
395
|
]);
|
|
398
396
|
a.style.minWidth = J + "px", a.style.right = Se + "px";
|
|
399
397
|
}
|
|
400
|
-
const
|
|
398
|
+
const B = N(), V = window.innerHeight - O * 2, K = d.scrollHeight, H = window.getComputedStyle(f), U = parseInt(H.borderTopWidth, 10), R = parseInt(H.paddingTop, 10), L = parseInt(H.borderBottomWidth, 10), F = parseInt(H.paddingBottom, 10), $ = U + R + K + F + L, fe = Math.min(h.offsetHeight * 5, $), le = window.getComputedStyle(d), me = parseInt(le.paddingTop, 10), he = parseInt(le.paddingBottom, 10), oe = _.top + _.height / 2 - O, ce = V - oe, se = h.offsetHeight / 2, p = h.offsetTop + se, I = U + R + p, E = $ - I;
|
|
401
399
|
if (I <= oe) {
|
|
402
|
-
const
|
|
400
|
+
const C = B.length > 0 && h === B[B.length - 1].ref.current;
|
|
403
401
|
a.style.bottom = "0px";
|
|
404
|
-
const
|
|
405
|
-
|
|
402
|
+
const T = f.clientHeight - d.offsetTop - d.offsetHeight, Z = Math.max(
|
|
403
|
+
ce,
|
|
406
404
|
se + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
407
|
-
(
|
|
405
|
+
(C ? he : 0) + T + L
|
|
408
406
|
), J = I + Z;
|
|
409
407
|
a.style.height = J + "px";
|
|
410
408
|
} else {
|
|
411
|
-
const
|
|
409
|
+
const C = B.length > 0 && h === B[0].ref.current;
|
|
412
410
|
a.style.top = "0px";
|
|
413
411
|
const Z = Math.max(
|
|
414
412
|
oe,
|
|
415
|
-
|
|
416
|
-
(
|
|
413
|
+
U + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
414
|
+
(C ? me : 0) + se
|
|
417
415
|
) + E;
|
|
418
416
|
a.style.height = Z + "px", d.scrollTop = I - oe + d.offsetTop;
|
|
419
417
|
}
|
|
420
|
-
a.style.margin = `${
|
|
418
|
+
a.style.margin = `${O}px 0`, a.style.minHeight = fe + "px", a.style.maxHeight = V + "px", c?.(), requestAnimationFrame(() => b.current = !0);
|
|
421
419
|
}
|
|
422
420
|
}, [
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
421
|
+
N,
|
|
422
|
+
u.trigger,
|
|
423
|
+
u.valueNode,
|
|
426
424
|
a,
|
|
427
425
|
f,
|
|
428
426
|
d,
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
427
|
+
h,
|
|
428
|
+
S,
|
|
429
|
+
u.dir,
|
|
430
|
+
c
|
|
433
431
|
]);
|
|
434
|
-
G(() =>
|
|
435
|
-
const [
|
|
432
|
+
G(() => v(), [v]);
|
|
433
|
+
const [W, A] = n.useState();
|
|
436
434
|
G(() => {
|
|
437
|
-
f &&
|
|
435
|
+
f && A(window.getComputedStyle(f).zIndex);
|
|
438
436
|
}, [f]);
|
|
439
437
|
const re = n.useCallback(
|
|
440
438
|
(_) => {
|
|
441
|
-
_ &&
|
|
439
|
+
_ && y.current === !0 && (v(), m?.(), y.current = !1);
|
|
442
440
|
},
|
|
443
|
-
[
|
|
441
|
+
[v, m]
|
|
444
442
|
);
|
|
445
|
-
return /* @__PURE__ */
|
|
443
|
+
return /* @__PURE__ */ s(
|
|
446
444
|
Ut,
|
|
447
445
|
{
|
|
448
446
|
scope: e,
|
|
449
447
|
contentWrapper: a,
|
|
450
|
-
shouldExpandOnScrollRef:
|
|
448
|
+
shouldExpandOnScrollRef: b,
|
|
451
449
|
onScrollButtonChange: re,
|
|
452
|
-
children: /* @__PURE__ */
|
|
450
|
+
children: /* @__PURE__ */ s(
|
|
453
451
|
"div",
|
|
454
452
|
{
|
|
455
|
-
ref:
|
|
453
|
+
ref: i,
|
|
456
454
|
style: {
|
|
457
455
|
display: "flex",
|
|
458
456
|
flexDirection: "column",
|
|
459
457
|
position: "fixed",
|
|
460
|
-
zIndex:
|
|
458
|
+
zIndex: W
|
|
461
459
|
},
|
|
462
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ s(
|
|
463
461
|
M.div,
|
|
464
462
|
{
|
|
465
|
-
...
|
|
463
|
+
...l,
|
|
466
464
|
ref: x,
|
|
467
465
|
style: {
|
|
468
466
|
// When we get the height of the content, it includes borders. If we were to set
|
|
@@ -470,7 +468,7 @@ var Vt = "SelectItemAlignedPosition", We = n.forwardRef((t, o) => {
|
|
|
470
468
|
boxSizing: "border-box",
|
|
471
469
|
// We need to ensure the content doesn't get taller than the wrapper
|
|
472
470
|
maxHeight: "100%",
|
|
473
|
-
...
|
|
471
|
+
...l.style
|
|
474
472
|
}
|
|
475
473
|
}
|
|
476
474
|
)
|
|
@@ -483,22 +481,22 @@ We.displayName = Vt;
|
|
|
483
481
|
var Ht = "SelectPopperPosition", we = n.forwardRef((t, o) => {
|
|
484
482
|
const {
|
|
485
483
|
__scopeSelect: e,
|
|
486
|
-
align:
|
|
487
|
-
collisionPadding:
|
|
488
|
-
...
|
|
489
|
-
} = t,
|
|
490
|
-
return /* @__PURE__ */
|
|
484
|
+
align: c = "start",
|
|
485
|
+
collisionPadding: l = O,
|
|
486
|
+
...u
|
|
487
|
+
} = t, r = pe(e);
|
|
488
|
+
return /* @__PURE__ */ s(
|
|
491
489
|
wt,
|
|
492
490
|
{
|
|
493
|
-
...
|
|
494
|
-
...
|
|
491
|
+
...r,
|
|
492
|
+
...u,
|
|
495
493
|
ref: o,
|
|
496
|
-
align:
|
|
497
|
-
collisionPadding:
|
|
494
|
+
align: c,
|
|
495
|
+
collisionPadding: l,
|
|
498
496
|
style: {
|
|
499
497
|
// Ensure border-box for floating-ui calculations
|
|
500
498
|
boxSizing: "border-box",
|
|
501
|
-
...
|
|
499
|
+
...u.style,
|
|
502
500
|
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
503
501
|
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
504
502
|
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -511,23 +509,23 @@ var Ht = "SelectPopperPosition", we = n.forwardRef((t, o) => {
|
|
|
511
509
|
we.displayName = Ht;
|
|
512
510
|
var [Ut, Pe] = ne(te, {}), xe = "SelectViewport", ze = n.forwardRef(
|
|
513
511
|
(t, o) => {
|
|
514
|
-
const { __scopeSelect: e, nonce:
|
|
512
|
+
const { __scopeSelect: e, nonce: c, ...l } = t, u = q(xe, e), r = Pe(xe, e), a = k(o, u.onViewportChange), i = n.useRef(0);
|
|
515
513
|
return /* @__PURE__ */ Q(be, { children: [
|
|
516
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ s(
|
|
517
515
|
"style",
|
|
518
516
|
{
|
|
519
517
|
dangerouslySetInnerHTML: {
|
|
520
518
|
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
521
519
|
},
|
|
522
|
-
nonce:
|
|
520
|
+
nonce: c
|
|
523
521
|
}
|
|
524
522
|
),
|
|
525
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ s(de.Slot, { scope: e, children: /* @__PURE__ */ s(
|
|
526
524
|
M.div,
|
|
527
525
|
{
|
|
528
526
|
"data-radix-select-viewport": "",
|
|
529
527
|
role: "presentation",
|
|
530
|
-
...
|
|
528
|
+
...l,
|
|
531
529
|
ref: a,
|
|
532
530
|
style: {
|
|
533
531
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
@@ -540,21 +538,21 @@ var [Ut, Pe] = ne(te, {}), xe = "SelectViewport", ze = n.forwardRef(
|
|
|
540
538
|
// revisit this if/when that is supported
|
|
541
539
|
// https://developer.chrome.com/blog/vertical-form-controls
|
|
542
540
|
overflow: "hidden auto",
|
|
543
|
-
...
|
|
541
|
+
...l.style
|
|
544
542
|
},
|
|
545
|
-
onScroll:
|
|
546
|
-
const g = f.currentTarget, { contentWrapper: x, shouldExpandOnScrollRef:
|
|
547
|
-
if (
|
|
548
|
-
const
|
|
549
|
-
if (
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
x.style.height =
|
|
543
|
+
onScroll: P(l.onScroll, (f) => {
|
|
544
|
+
const g = f.currentTarget, { contentWrapper: x, shouldExpandOnScrollRef: N } = r;
|
|
545
|
+
if (N?.current && x) {
|
|
546
|
+
const b = Math.abs(i.current - g.scrollTop);
|
|
547
|
+
if (b > 0) {
|
|
548
|
+
const y = window.innerHeight - O * 2, d = parseFloat(x.style.minHeight), h = parseFloat(x.style.height), S = Math.max(d, h);
|
|
549
|
+
if (S < y) {
|
|
550
|
+
const m = S + b, v = Math.min(y, m), W = m - v;
|
|
551
|
+
x.style.height = v + "px", x.style.bottom === "0px" && (g.scrollTop = W > 0 ? W : 0, x.style.justifyContent = "flex-end");
|
|
554
552
|
}
|
|
555
553
|
}
|
|
556
554
|
}
|
|
557
|
-
|
|
555
|
+
i.current = g.scrollTop;
|
|
558
556
|
})
|
|
559
557
|
}
|
|
560
558
|
) })
|
|
@@ -564,92 +562,86 @@ var [Ut, Pe] = ne(te, {}), xe = "SelectViewport", ze = n.forwardRef(
|
|
|
564
562
|
ze.displayName = xe;
|
|
565
563
|
var Ke = "SelectGroup", [Ft, Wt] = ne(Ke), $e = n.forwardRef(
|
|
566
564
|
(t, o) => {
|
|
567
|
-
const { __scopeSelect: e, ...
|
|
568
|
-
return /* @__PURE__ */
|
|
565
|
+
const { __scopeSelect: e, ...c } = t, l = Te();
|
|
566
|
+
return /* @__PURE__ */ s(Ft, { scope: e, id: l, children: /* @__PURE__ */ s(M.div, { role: "group", "aria-labelledby": l, ...c, ref: o }) });
|
|
569
567
|
}
|
|
570
568
|
);
|
|
571
569
|
$e.displayName = Ke;
|
|
572
570
|
var Ge = "SelectLabel", je = n.forwardRef(
|
|
573
571
|
(t, o) => {
|
|
574
|
-
const { __scopeSelect: e, ...
|
|
575
|
-
return /* @__PURE__ */
|
|
572
|
+
const { __scopeSelect: e, ...c } = t, l = Wt(Ge, e);
|
|
573
|
+
return /* @__PURE__ */ s(M.div, { id: l.id, ...c, ref: o });
|
|
576
574
|
}
|
|
577
575
|
);
|
|
578
576
|
je.displayName = Ge;
|
|
579
|
-
var
|
|
577
|
+
var ie = "SelectItem", [zt, Ye] = ne(ie), qe = n.forwardRef(
|
|
580
578
|
(t, o) => {
|
|
581
579
|
const {
|
|
582
580
|
__scopeSelect: e,
|
|
583
|
-
value:
|
|
584
|
-
disabled:
|
|
585
|
-
textValue:
|
|
586
|
-
...
|
|
587
|
-
} = t, a = Y(
|
|
581
|
+
value: c,
|
|
582
|
+
disabled: l = !1,
|
|
583
|
+
textValue: u,
|
|
584
|
+
...r
|
|
585
|
+
} = t, a = Y(ie, e), i = q(ie, e), f = a.value === c, [g, x] = n.useState(u ?? ""), [N, b] = n.useState(!1), y = k(
|
|
588
586
|
o,
|
|
589
|
-
(
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
), d = Te(), v = n.useRef("touch"), y = () => {
|
|
594
|
-
c || (a.onValueChange(i), a.onOpenChange(!1));
|
|
587
|
+
(m) => i.itemRefCallback?.(m, c, l)
|
|
588
|
+
), d = Te(), h = n.useRef("touch"), S = () => {
|
|
589
|
+
l || (a.onValueChange(c), a.onOpenChange(!1));
|
|
595
590
|
};
|
|
596
|
-
if (
|
|
591
|
+
if (c === "")
|
|
597
592
|
throw new Error(
|
|
598
593
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
599
594
|
);
|
|
600
|
-
return /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ s(
|
|
601
596
|
zt,
|
|
602
597
|
{
|
|
603
598
|
scope: e,
|
|
604
|
-
value:
|
|
605
|
-
disabled:
|
|
599
|
+
value: c,
|
|
600
|
+
disabled: l,
|
|
606
601
|
textId: d,
|
|
607
602
|
isSelected: f,
|
|
608
|
-
onItemTextChange: n.useCallback((
|
|
609
|
-
x((
|
|
603
|
+
onItemTextChange: n.useCallback((m) => {
|
|
604
|
+
x((v) => v || (m?.textContent ?? "").trim());
|
|
610
605
|
}, []),
|
|
611
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ s(
|
|
612
607
|
de.ItemSlot,
|
|
613
608
|
{
|
|
614
609
|
scope: e,
|
|
615
|
-
value:
|
|
616
|
-
disabled:
|
|
610
|
+
value: c,
|
|
611
|
+
disabled: l,
|
|
617
612
|
textValue: g,
|
|
618
|
-
children: /* @__PURE__ */
|
|
613
|
+
children: /* @__PURE__ */ s(
|
|
619
614
|
M.div,
|
|
620
615
|
{
|
|
621
616
|
role: "option",
|
|
622
617
|
"aria-labelledby": d,
|
|
623
|
-
"data-highlighted":
|
|
624
|
-
"aria-selected": f &&
|
|
618
|
+
"data-highlighted": N ? "" : void 0,
|
|
619
|
+
"aria-selected": f && N,
|
|
625
620
|
"data-state": f ? "checked" : "unchecked",
|
|
626
|
-
"aria-disabled":
|
|
627
|
-
"data-disabled":
|
|
628
|
-
tabIndex:
|
|
629
|
-
...
|
|
630
|
-
ref:
|
|
631
|
-
onFocus:
|
|
632
|
-
onBlur:
|
|
633
|
-
onClick:
|
|
634
|
-
|
|
621
|
+
"aria-disabled": l || void 0,
|
|
622
|
+
"data-disabled": l ? "" : void 0,
|
|
623
|
+
tabIndex: l ? void 0 : -1,
|
|
624
|
+
...r,
|
|
625
|
+
ref: y,
|
|
626
|
+
onFocus: P(r.onFocus, () => b(!0)),
|
|
627
|
+
onBlur: P(r.onBlur, () => b(!1)),
|
|
628
|
+
onClick: P(r.onClick, () => {
|
|
629
|
+
h.current !== "mouse" && S();
|
|
635
630
|
}),
|
|
636
|
-
onPointerUp:
|
|
637
|
-
|
|
631
|
+
onPointerUp: P(r.onPointerUp, () => {
|
|
632
|
+
h.current === "mouse" && S();
|
|
638
633
|
}),
|
|
639
|
-
onPointerDown:
|
|
640
|
-
|
|
634
|
+
onPointerDown: P(r.onPointerDown, (m) => {
|
|
635
|
+
h.current = m.pointerType;
|
|
641
636
|
}),
|
|
642
|
-
onPointerMove:
|
|
643
|
-
|
|
644
|
-
v.current = u.pointerType, c ? (h = r.onItemLeave) == null || h.call(r) : v.current === "mouse" && u.currentTarget.focus({ preventScroll: !0 });
|
|
637
|
+
onPointerMove: P(r.onPointerMove, (m) => {
|
|
638
|
+
h.current = m.pointerType, l ? i.onItemLeave?.() : h.current === "mouse" && m.currentTarget.focus({ preventScroll: !0 });
|
|
645
639
|
}),
|
|
646
|
-
onPointerLeave:
|
|
647
|
-
|
|
648
|
-
u.currentTarget === document.activeElement && ((h = r.onItemLeave) == null || h.call(r));
|
|
640
|
+
onPointerLeave: P(r.onPointerLeave, (m) => {
|
|
641
|
+
m.currentTarget === document.activeElement && i.onItemLeave?.();
|
|
649
642
|
}),
|
|
650
|
-
onKeyDown:
|
|
651
|
-
|
|
652
|
-
((A = r.searchRef) == null ? void 0 : A.current) !== "" && u.key === " " || (Rt.includes(u.key) && y(), u.key === " " && u.preventDefault());
|
|
643
|
+
onKeyDown: P(r.onKeyDown, (m) => {
|
|
644
|
+
i.searchRef?.current !== "" && m.key === " " || (Rt.includes(m.key) && S(), m.key === " " && m.preventDefault());
|
|
653
645
|
})
|
|
654
646
|
}
|
|
655
647
|
)
|
|
@@ -659,144 +651,138 @@ var ce = "SelectItem", [zt, Ye] = ne(ce), qe = n.forwardRef(
|
|
|
659
651
|
);
|
|
660
652
|
}
|
|
661
653
|
);
|
|
662
|
-
qe.displayName =
|
|
654
|
+
qe.displayName = ie;
|
|
663
655
|
var ae = "SelectItemText", Xe = n.forwardRef(
|
|
664
656
|
(t, o) => {
|
|
665
|
-
const { __scopeSelect: e, className:
|
|
657
|
+
const { __scopeSelect: e, className: c, style: l, ...u } = t, r = Y(ae, e), a = q(ae, e), i = Ye(ae, e), f = Ot(ae, e), [g, x] = n.useState(null), N = k(
|
|
666
658
|
o,
|
|
667
|
-
(
|
|
668
|
-
|
|
669
|
-
(
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
),
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
return G(() => (d(b), () => v(b)), [d, v, b]), /* @__PURE__ */ Q(be, { children: [
|
|
678
|
-
/* @__PURE__ */ l(M.span, { id: r.textId, ...p, ref: T }),
|
|
679
|
-
r.isSelected && s.valueNode && !s.valueNodeHasChildren ? Re.createPortal(p.children, s.valueNode) : null
|
|
659
|
+
(S) => x(S),
|
|
660
|
+
i.onItemTextChange,
|
|
661
|
+
(S) => a.itemTextRefCallback?.(S, i.value, i.disabled)
|
|
662
|
+
), b = g?.textContent, y = n.useMemo(
|
|
663
|
+
() => /* @__PURE__ */ s("option", { value: i.value, disabled: i.disabled, children: b }, i.value),
|
|
664
|
+
[i.disabled, i.value, b]
|
|
665
|
+
), { onNativeOptionAdd: d, onNativeOptionRemove: h } = f;
|
|
666
|
+
return G(() => (d(y), () => h(y)), [d, h, y]), /* @__PURE__ */ Q(be, { children: [
|
|
667
|
+
/* @__PURE__ */ s(M.span, { id: i.textId, ...u, ref: N }),
|
|
668
|
+
i.isSelected && r.valueNode && !r.valueNodeHasChildren ? Re.createPortal(u.children, r.valueNode) : null
|
|
680
669
|
] });
|
|
681
670
|
}
|
|
682
671
|
);
|
|
683
672
|
Xe.displayName = ae;
|
|
684
673
|
var Ze = "SelectItemIndicator", Je = n.forwardRef(
|
|
685
674
|
(t, o) => {
|
|
686
|
-
const { __scopeSelect: e, ...
|
|
687
|
-
return Ye(Ze, e).isSelected ? /* @__PURE__ */
|
|
675
|
+
const { __scopeSelect: e, ...c } = t;
|
|
676
|
+
return Ye(Ze, e).isSelected ? /* @__PURE__ */ s(M.span, { "aria-hidden": !0, ...c, ref: o }) : null;
|
|
688
677
|
}
|
|
689
678
|
);
|
|
690
679
|
Je.displayName = Ze;
|
|
691
|
-
var
|
|
692
|
-
const e = q(
|
|
680
|
+
var Ce = "SelectScrollUpButton", Qe = n.forwardRef((t, o) => {
|
|
681
|
+
const e = q(Ce, t.__scopeSelect), c = Pe(Ce, t.__scopeSelect), [l, u] = n.useState(!1), r = k(o, c.onScrollButtonChange);
|
|
693
682
|
return G(() => {
|
|
694
683
|
if (e.viewport && e.isPositioned) {
|
|
695
684
|
let a = function() {
|
|
696
|
-
const f =
|
|
697
|
-
|
|
685
|
+
const f = i.scrollTop > 0;
|
|
686
|
+
u(f);
|
|
698
687
|
};
|
|
699
|
-
const
|
|
700
|
-
return a(),
|
|
688
|
+
const i = e.viewport;
|
|
689
|
+
return a(), i.addEventListener("scroll", a), () => i.removeEventListener("scroll", a);
|
|
701
690
|
}
|
|
702
|
-
}, [e.viewport, e.isPositioned]),
|
|
691
|
+
}, [e.viewport, e.isPositioned]), l ? /* @__PURE__ */ s(
|
|
703
692
|
tt,
|
|
704
693
|
{
|
|
705
694
|
...t,
|
|
706
|
-
ref:
|
|
695
|
+
ref: r,
|
|
707
696
|
onAutoScroll: () => {
|
|
708
|
-
const { viewport: a, selectedItem:
|
|
709
|
-
a &&
|
|
697
|
+
const { viewport: a, selectedItem: i } = e;
|
|
698
|
+
a && i && (a.scrollTop = a.scrollTop - i.offsetHeight);
|
|
710
699
|
}
|
|
711
700
|
}
|
|
712
701
|
) : null;
|
|
713
702
|
});
|
|
714
|
-
Qe.displayName =
|
|
715
|
-
var
|
|
716
|
-
const e = q(
|
|
703
|
+
Qe.displayName = Ce;
|
|
704
|
+
var ye = "SelectScrollDownButton", et = n.forwardRef((t, o) => {
|
|
705
|
+
const e = q(ye, t.__scopeSelect), c = Pe(ye, t.__scopeSelect), [l, u] = n.useState(!1), r = k(o, c.onScrollButtonChange);
|
|
717
706
|
return G(() => {
|
|
718
707
|
if (e.viewport && e.isPositioned) {
|
|
719
708
|
let a = function() {
|
|
720
|
-
const f =
|
|
721
|
-
|
|
709
|
+
const f = i.scrollHeight - i.clientHeight, g = Math.ceil(i.scrollTop) < f;
|
|
710
|
+
u(g);
|
|
722
711
|
};
|
|
723
|
-
const
|
|
724
|
-
return a(),
|
|
712
|
+
const i = e.viewport;
|
|
713
|
+
return a(), i.addEventListener("scroll", a), () => i.removeEventListener("scroll", a);
|
|
725
714
|
}
|
|
726
|
-
}, [e.viewport, e.isPositioned]),
|
|
715
|
+
}, [e.viewport, e.isPositioned]), l ? /* @__PURE__ */ s(
|
|
727
716
|
tt,
|
|
728
717
|
{
|
|
729
718
|
...t,
|
|
730
|
-
ref:
|
|
719
|
+
ref: r,
|
|
731
720
|
onAutoScroll: () => {
|
|
732
|
-
const { viewport: a, selectedItem:
|
|
733
|
-
a &&
|
|
721
|
+
const { viewport: a, selectedItem: i } = e;
|
|
722
|
+
a && i && (a.scrollTop = a.scrollTop + i.offsetHeight);
|
|
734
723
|
}
|
|
735
724
|
}
|
|
736
725
|
) : null;
|
|
737
726
|
});
|
|
738
|
-
et.displayName =
|
|
727
|
+
et.displayName = ye;
|
|
739
728
|
var tt = n.forwardRef((t, o) => {
|
|
740
|
-
const { __scopeSelect: e, onAutoScroll:
|
|
741
|
-
|
|
729
|
+
const { __scopeSelect: e, onAutoScroll: c, ...l } = t, u = q("SelectScrollButton", e), r = n.useRef(null), a = ue(e), i = n.useCallback(() => {
|
|
730
|
+
r.current !== null && (window.clearInterval(r.current), r.current = null);
|
|
742
731
|
}, []);
|
|
743
|
-
return n.useEffect(() => () =>
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
(g = f == null ? void 0 : f.ref.current) == null || g.scrollIntoView({ block: "nearest" });
|
|
747
|
-
}, [a]), /* @__PURE__ */ l(
|
|
732
|
+
return n.useEffect(() => () => i(), [i]), G(() => {
|
|
733
|
+
a().find((g) => g.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
734
|
+
}, [a]), /* @__PURE__ */ s(
|
|
748
735
|
M.div,
|
|
749
736
|
{
|
|
750
737
|
"aria-hidden": !0,
|
|
751
|
-
...
|
|
738
|
+
...l,
|
|
752
739
|
ref: o,
|
|
753
|
-
style: { flexShrink: 0, ...
|
|
754
|
-
onPointerDown:
|
|
755
|
-
|
|
740
|
+
style: { flexShrink: 0, ...l.style },
|
|
741
|
+
onPointerDown: P(l.onPointerDown, () => {
|
|
742
|
+
r.current === null && (r.current = window.setInterval(c, 50));
|
|
756
743
|
}),
|
|
757
|
-
onPointerMove:
|
|
758
|
-
|
|
759
|
-
(f = p.onItemLeave) == null || f.call(p), s.current === null && (s.current = window.setInterval(i, 50));
|
|
744
|
+
onPointerMove: P(l.onPointerMove, () => {
|
|
745
|
+
u.onItemLeave?.(), r.current === null && (r.current = window.setInterval(c, 50));
|
|
760
746
|
}),
|
|
761
|
-
onPointerLeave:
|
|
762
|
-
|
|
747
|
+
onPointerLeave: P(l.onPointerLeave, () => {
|
|
748
|
+
i();
|
|
763
749
|
})
|
|
764
750
|
}
|
|
765
751
|
);
|
|
766
752
|
}), Kt = "SelectSeparator", ot = n.forwardRef(
|
|
767
753
|
(t, o) => {
|
|
768
|
-
const { __scopeSelect: e, ...
|
|
769
|
-
return /* @__PURE__ */
|
|
754
|
+
const { __scopeSelect: e, ...c } = t;
|
|
755
|
+
return /* @__PURE__ */ s(M.div, { "aria-hidden": !0, ...c, ref: o });
|
|
770
756
|
}
|
|
771
757
|
);
|
|
772
758
|
ot.displayName = Kt;
|
|
773
759
|
var Ie = "SelectArrow", $t = n.forwardRef(
|
|
774
760
|
(t, o) => {
|
|
775
|
-
const { __scopeSelect: e, ...
|
|
776
|
-
return
|
|
761
|
+
const { __scopeSelect: e, ...c } = t, l = pe(e), u = Y(Ie, e), r = q(Ie, e);
|
|
762
|
+
return u.open && r.position === "popper" ? /* @__PURE__ */ s(xt, { ...l, ...c, ref: o }) : null;
|
|
777
763
|
}
|
|
778
764
|
);
|
|
779
765
|
$t.displayName = Ie;
|
|
780
766
|
var Gt = "SelectBubbleInput", nt = n.forwardRef(
|
|
781
|
-
({ __scopeSelect: t, value: o, ...e },
|
|
782
|
-
const
|
|
767
|
+
({ __scopeSelect: t, value: o, ...e }, c) => {
|
|
768
|
+
const l = n.useRef(null), u = k(c, l), r = yt(o);
|
|
783
769
|
return n.useEffect(() => {
|
|
784
|
-
const a =
|
|
770
|
+
const a = l.current;
|
|
785
771
|
if (!a) return;
|
|
786
|
-
const
|
|
787
|
-
|
|
772
|
+
const i = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
773
|
+
i,
|
|
788
774
|
"value"
|
|
789
775
|
).set;
|
|
790
|
-
if (
|
|
776
|
+
if (r !== o && g) {
|
|
791
777
|
const x = new Event("change", { bubbles: !0 });
|
|
792
778
|
g.call(a, o), a.dispatchEvent(x);
|
|
793
779
|
}
|
|
794
|
-
}, [
|
|
780
|
+
}, [r, o]), /* @__PURE__ */ s(
|
|
795
781
|
M.select,
|
|
796
782
|
{
|
|
797
783
|
...e,
|
|
798
784
|
style: { ...It, ...e.style },
|
|
799
|
-
ref:
|
|
785
|
+
ref: u,
|
|
800
786
|
defaultValue: o
|
|
801
787
|
}
|
|
802
788
|
);
|
|
@@ -807,52 +793,52 @@ function rt(t) {
|
|
|
807
793
|
return t === "" || t === void 0;
|
|
808
794
|
}
|
|
809
795
|
function st(t) {
|
|
810
|
-
const o =
|
|
811
|
-
(
|
|
812
|
-
const a = e.current +
|
|
813
|
-
o(a), function
|
|
814
|
-
e.current = f, window.clearTimeout(
|
|
796
|
+
const o = Ct(t), e = n.useRef(""), c = n.useRef(0), l = n.useCallback(
|
|
797
|
+
(r) => {
|
|
798
|
+
const a = e.current + r;
|
|
799
|
+
o(a), function i(f) {
|
|
800
|
+
e.current = f, window.clearTimeout(c.current), f !== "" && (c.current = window.setTimeout(() => i(""), 1e3));
|
|
815
801
|
}(a);
|
|
816
802
|
},
|
|
817
803
|
[o]
|
|
818
|
-
),
|
|
819
|
-
e.current = "", window.clearTimeout(
|
|
804
|
+
), u = n.useCallback(() => {
|
|
805
|
+
e.current = "", window.clearTimeout(c.current);
|
|
820
806
|
}, []);
|
|
821
|
-
return n.useEffect(() => () => window.clearTimeout(
|
|
807
|
+
return n.useEffect(() => () => window.clearTimeout(c.current), []), [e, l, u];
|
|
822
808
|
}
|
|
823
809
|
function at(t, o, e) {
|
|
824
|
-
const
|
|
825
|
-
let
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
(f) => f.textValue.toLowerCase().startsWith(
|
|
810
|
+
const l = o.length > 1 && Array.from(o).every((f) => f === o[0]) ? o[0] : o, u = e ? t.indexOf(e) : -1;
|
|
811
|
+
let r = jt(t, Math.max(u, 0));
|
|
812
|
+
l.length === 1 && (r = r.filter((f) => f !== e));
|
|
813
|
+
const i = r.find(
|
|
814
|
+
(f) => f.textValue.toLowerCase().startsWith(l.toLowerCase())
|
|
829
815
|
);
|
|
830
|
-
return
|
|
816
|
+
return i !== e ? i : void 0;
|
|
831
817
|
}
|
|
832
818
|
function jt(t, o) {
|
|
833
|
-
return t.map((e,
|
|
819
|
+
return t.map((e, c) => t[(o + c) % t.length]);
|
|
834
820
|
}
|
|
835
|
-
var Yt = Ae, qt = De, Xt = ke, Zt = Be, Jt = Ve, Qt = He, eo = ze, to = $e, oo = je, no = qe, ro = Xe, so = Je, ao = Qe, lo = et,
|
|
821
|
+
var Yt = Ae, qt = De, Xt = ke, Zt = Be, Jt = Ve, Qt = He, eo = ze, to = $e, oo = je, no = qe, ro = Xe, so = Je, ao = Qe, lo = et, co = ot;
|
|
836
822
|
function Do({
|
|
837
823
|
...t
|
|
838
824
|
}) {
|
|
839
|
-
return /* @__PURE__ */
|
|
825
|
+
return /* @__PURE__ */ s(Yt, { "data-slot": "select", ...t });
|
|
840
826
|
}
|
|
841
827
|
function Lo({
|
|
842
828
|
...t
|
|
843
829
|
}) {
|
|
844
|
-
return /* @__PURE__ */
|
|
830
|
+
return /* @__PURE__ */ s(to, { "data-slot": "select-group", ...t });
|
|
845
831
|
}
|
|
846
832
|
function ko({
|
|
847
833
|
...t
|
|
848
834
|
}) {
|
|
849
|
-
return /* @__PURE__ */
|
|
835
|
+
return /* @__PURE__ */ s(Xt, { "data-slot": "select-value", ...t });
|
|
850
836
|
}
|
|
851
837
|
function Bo({
|
|
852
838
|
className: t,
|
|
853
839
|
size: o = "default",
|
|
854
840
|
children: e,
|
|
855
|
-
...
|
|
841
|
+
...c
|
|
856
842
|
}) {
|
|
857
843
|
return /* @__PURE__ */ Q(
|
|
858
844
|
qt,
|
|
@@ -863,10 +849,10 @@ function Bo({
|
|
|
863
849
|
),
|
|
864
850
|
"data-size": o,
|
|
865
851
|
"data-slot": "select-trigger",
|
|
866
|
-
...
|
|
852
|
+
...c,
|
|
867
853
|
children: [
|
|
868
854
|
e,
|
|
869
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ s(Zt, { asChild: !0, children: /* @__PURE__ */ s(Me, { className: "size-4 opacity-50" }) })
|
|
870
856
|
]
|
|
871
857
|
}
|
|
872
858
|
);
|
|
@@ -875,9 +861,9 @@ function Vo({
|
|
|
875
861
|
className: t,
|
|
876
862
|
children: o,
|
|
877
863
|
position: e = "popper",
|
|
878
|
-
...
|
|
864
|
+
...c
|
|
879
865
|
}) {
|
|
880
|
-
return /* @__PURE__ */
|
|
866
|
+
return /* @__PURE__ */ s(Jt, { children: /* @__PURE__ */ Q(
|
|
881
867
|
Qt,
|
|
882
868
|
{
|
|
883
869
|
className: j(
|
|
@@ -887,10 +873,10 @@ function Vo({
|
|
|
887
873
|
),
|
|
888
874
|
"data-slot": "select-content",
|
|
889
875
|
position: e,
|
|
890
|
-
...
|
|
876
|
+
...c,
|
|
891
877
|
children: [
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ s(io, {}),
|
|
879
|
+
/* @__PURE__ */ s(
|
|
894
880
|
eo,
|
|
895
881
|
{
|
|
896
882
|
className: j(
|
|
@@ -900,7 +886,7 @@ function Vo({
|
|
|
900
886
|
children: o
|
|
901
887
|
}
|
|
902
888
|
),
|
|
903
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ s(uo, {})
|
|
904
890
|
]
|
|
905
891
|
}
|
|
906
892
|
) });
|
|
@@ -909,7 +895,7 @@ function Ho({
|
|
|
909
895
|
className: t,
|
|
910
896
|
...o
|
|
911
897
|
}) {
|
|
912
|
-
return /* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ s(
|
|
913
899
|
oo,
|
|
914
900
|
{
|
|
915
901
|
className: j("px-2 py-1.5 text-muted-foreground text-xs", t),
|
|
@@ -933,8 +919,8 @@ function Uo({
|
|
|
933
919
|
"data-slot": "select-item",
|
|
934
920
|
...e,
|
|
935
921
|
children: [
|
|
936
|
-
/* @__PURE__ */
|
|
937
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ s("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ s(so, { children: /* @__PURE__ */ s(bt, { className: "size-4" }) }) }),
|
|
923
|
+
/* @__PURE__ */ s(ro, { children: o })
|
|
938
924
|
]
|
|
939
925
|
}
|
|
940
926
|
);
|
|
@@ -943,8 +929,8 @@ function Fo({
|
|
|
943
929
|
className: t,
|
|
944
930
|
...o
|
|
945
931
|
}) {
|
|
946
|
-
return /* @__PURE__ */
|
|
947
|
-
|
|
932
|
+
return /* @__PURE__ */ s(
|
|
933
|
+
co,
|
|
948
934
|
{
|
|
949
935
|
className: j("-mx-1 pointer-events-none my-1 h-px bg-border", t),
|
|
950
936
|
"data-slot": "select-separator",
|
|
@@ -952,11 +938,11 @@ function Fo({
|
|
|
952
938
|
}
|
|
953
939
|
);
|
|
954
940
|
}
|
|
955
|
-
function
|
|
941
|
+
function io({
|
|
956
942
|
className: t,
|
|
957
943
|
...o
|
|
958
944
|
}) {
|
|
959
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ s(
|
|
960
946
|
ao,
|
|
961
947
|
{
|
|
962
948
|
className: j(
|
|
@@ -965,7 +951,7 @@ function co({
|
|
|
965
951
|
),
|
|
966
952
|
"data-slot": "select-scroll-up-button",
|
|
967
953
|
...o,
|
|
968
|
-
children: /* @__PURE__ */
|
|
954
|
+
children: /* @__PURE__ */ s(Nt, { className: "size-4" })
|
|
969
955
|
}
|
|
970
956
|
);
|
|
971
957
|
}
|
|
@@ -973,7 +959,7 @@ function uo({
|
|
|
973
959
|
className: t,
|
|
974
960
|
...o
|
|
975
961
|
}) {
|
|
976
|
-
return /* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ s(
|
|
977
963
|
lo,
|
|
978
964
|
{
|
|
979
965
|
className: j(
|
|
@@ -982,7 +968,7 @@ function uo({
|
|
|
982
968
|
),
|
|
983
969
|
"data-slot": "select-scroll-down-button",
|
|
984
970
|
...o,
|
|
985
|
-
children: /* @__PURE__ */
|
|
971
|
+
children: /* @__PURE__ */ s(Me, { className: "size-4" })
|
|
986
972
|
}
|
|
987
973
|
);
|
|
988
974
|
}
|
|
@@ -993,7 +979,7 @@ export {
|
|
|
993
979
|
Uo as SelectItem,
|
|
994
980
|
Ho as SelectLabel,
|
|
995
981
|
uo as SelectScrollDownButton,
|
|
996
|
-
|
|
982
|
+
io as SelectScrollUpButton,
|
|
997
983
|
Fo as SelectSeparator,
|
|
998
984
|
Bo as SelectTrigger,
|
|
999
985
|
ko as SelectValue
|