lizaui 6.0.4 → 6.0.6
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/chunks/chevron-down-BJdjIpSS.js +2 -0
- package/dist/chunks/chevron-down-BJdjIpSS.js.map +1 -0
- package/dist/chunks/chevron-down-BarFwo2L.js +75 -0
- package/dist/chunks/chevron-down-BarFwo2L.js.map +1 -0
- package/dist/chunks/search-BUtVV_ij.js +2 -0
- package/dist/chunks/search-BUtVV_ij.js.map +1 -0
- package/dist/chunks/search-YTvzxtJf.js +9 -0
- package/dist/chunks/search-YTvzxtJf.js.map +1 -0
- package/dist/chunks/select-BBV4-uzN.js +2 -0
- package/dist/chunks/select-BBV4-uzN.js.map +1 -0
- package/dist/chunks/select-KroYdQPb.js +1251 -0
- package/dist/chunks/select-KroYdQPb.js.map +1 -0
- package/dist/components/phone-input/index.d.ts +2 -0
- package/dist/components/phone-input/index.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.d.ts +28 -0
- package/dist/components/phone-input/phone-input.d.ts.map +1 -0
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +1 -1
- package/dist/phone-input/index.cjs.js +15 -0
- package/dist/phone-input/index.cjs.js.map +1 -0
- package/dist/phone-input/index.es.js +3403 -0
- package/dist/phone-input/index.es.js.map +1 -0
- package/dist/phone-input.d.ts +2 -0
- package/dist/ui/index.cjs.js +4 -4
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +743 -745
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +7 -1
- package/dist/chunks/select-C25qmFpo.js +0 -1321
- package/dist/chunks/select-C25qmFpo.js.map +0 -1
- package/dist/chunks/select-DW1tRhcQ.js +0 -2
- package/dist/chunks/select-DW1tRhcQ.js.map +0 -1
|
@@ -1,1321 +0,0 @@
|
|
|
1
|
-
import { j as i } from "./jsx-runtime-Cl_4eDuT.js";
|
|
2
|
-
import * as n from "react";
|
|
3
|
-
import ne, { forwardRef as De, createElement as we } from "react";
|
|
4
|
-
import * as ke from "react-dom";
|
|
5
|
-
import { c as Re, P as A, u as Y, a as Le, b as je, d as Te, e as Nt, f as _, h as _t, g as At, R as Et, F as jt, D as Mt } from "./textarea-ClUh9LtQ.js";
|
|
6
|
-
import { u as k, c as Se } from "./index-Do-g2tEs.js";
|
|
7
|
-
import { u as Ot, o as Dt, s as kt, f as Lt, b as Ht, a as Bt, h as Vt, l as zt } from "./floating-ui.react-dom-DoFTdqmA.js";
|
|
8
|
-
import { q as $t } from "./floating-ui.dom-DvdgQsph.js";
|
|
9
|
-
import { c as Z } from "./utils-BFAOD39w.js";
|
|
10
|
-
function Wt(e) {
|
|
11
|
-
const t = e + "CollectionProvider", [o, r] = Re(t), [a, d] = o(
|
|
12
|
-
t,
|
|
13
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
14
|
-
), s = (u) => {
|
|
15
|
-
const { scope: h, children: x } = u, f = ne.useRef(null), g = ne.useRef(/* @__PURE__ */ new Map()).current;
|
|
16
|
-
return /* @__PURE__ */ i.jsx(a, { scope: h, itemMap: g, collectionRef: f, children: x });
|
|
17
|
-
};
|
|
18
|
-
s.displayName = t;
|
|
19
|
-
const c = e + "CollectionSlot", l = Se(c), p = ne.forwardRef(
|
|
20
|
-
(u, h) => {
|
|
21
|
-
const { scope: x, children: f } = u, g = d(c, x), R = k(h, g.collectionRef);
|
|
22
|
-
return /* @__PURE__ */ i.jsx(l, { ref: R, children: f });
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
p.displayName = c;
|
|
26
|
-
const v = e + "CollectionItemSlot", w = "data-radix-collection-item", P = Se(v), C = ne.forwardRef(
|
|
27
|
-
(u, h) => {
|
|
28
|
-
const { scope: x, children: f, ...g } = u, R = ne.useRef(null), E = k(h, R), L = d(v, x);
|
|
29
|
-
return ne.useEffect(() => (L.itemMap.set(R, { ref: R, ...g }), () => void L.itemMap.delete(R))), /* @__PURE__ */ i.jsx(P, { [w]: "", ref: E, children: f });
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
C.displayName = v;
|
|
33
|
-
function S(u) {
|
|
34
|
-
const h = d(e + "CollectionConsumer", u);
|
|
35
|
-
return ne.useCallback(() => {
|
|
36
|
-
const f = h.collectionRef.current;
|
|
37
|
-
if (!f) return [];
|
|
38
|
-
const g = Array.from(f.querySelectorAll(`[${w}]`));
|
|
39
|
-
return Array.from(h.itemMap.values()).sort(
|
|
40
|
-
(L, N) => g.indexOf(L.ref.current) - g.indexOf(N.ref.current)
|
|
41
|
-
);
|
|
42
|
-
}, [h.collectionRef, h.itemMap]);
|
|
43
|
-
}
|
|
44
|
-
return [
|
|
45
|
-
{ Provider: s, Slot: p, ItemSlot: C },
|
|
46
|
-
S,
|
|
47
|
-
r
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
var Ft = n.createContext(void 0);
|
|
51
|
-
function Ut(e) {
|
|
52
|
-
const t = n.useContext(Ft);
|
|
53
|
-
return e || t || "ltr";
|
|
54
|
-
}
|
|
55
|
-
var Kt = "Arrow", He = n.forwardRef((e, t) => {
|
|
56
|
-
const { children: o, width: r = 10, height: a = 5, ...d } = e;
|
|
57
|
-
return /* @__PURE__ */ i.jsx(
|
|
58
|
-
A.svg,
|
|
59
|
-
{
|
|
60
|
-
...d,
|
|
61
|
-
ref: t,
|
|
62
|
-
width: r,
|
|
63
|
-
height: a,
|
|
64
|
-
viewBox: "0 0 30 10",
|
|
65
|
-
preserveAspectRatio: "none",
|
|
66
|
-
children: e.asChild ? o : /* @__PURE__ */ i.jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
He.displayName = Kt;
|
|
71
|
-
var Yt = He;
|
|
72
|
-
function Gt(e) {
|
|
73
|
-
const [t, o] = n.useState(void 0);
|
|
74
|
-
return Y(() => {
|
|
75
|
-
if (e) {
|
|
76
|
-
o({ width: e.offsetWidth, height: e.offsetHeight });
|
|
77
|
-
const r = new ResizeObserver((a) => {
|
|
78
|
-
if (!Array.isArray(a) || !a.length)
|
|
79
|
-
return;
|
|
80
|
-
const d = a[0];
|
|
81
|
-
let s, c;
|
|
82
|
-
if ("borderBoxSize" in d) {
|
|
83
|
-
const l = d.borderBoxSize, p = Array.isArray(l) ? l[0] : l;
|
|
84
|
-
s = p.inlineSize, c = p.blockSize;
|
|
85
|
-
} else
|
|
86
|
-
s = e.offsetWidth, c = e.offsetHeight;
|
|
87
|
-
o({ width: s, height: c });
|
|
88
|
-
});
|
|
89
|
-
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
90
|
-
} else
|
|
91
|
-
o(void 0);
|
|
92
|
-
}, [e]), t;
|
|
93
|
-
}
|
|
94
|
-
var Ne = "Popper", [Be, Ve] = Re(Ne), [qt, ze] = Be(Ne), $e = (e) => {
|
|
95
|
-
const { __scopePopper: t, children: o } = e, [r, a] = n.useState(null);
|
|
96
|
-
return /* @__PURE__ */ i.jsx(qt, { scope: t, anchor: r, onAnchorChange: a, children: o });
|
|
97
|
-
};
|
|
98
|
-
$e.displayName = Ne;
|
|
99
|
-
var We = "PopperAnchor", Fe = n.forwardRef(
|
|
100
|
-
(e, t) => {
|
|
101
|
-
const { __scopePopper: o, virtualRef: r, ...a } = e, d = ze(We, o), s = n.useRef(null), c = k(t, s), l = n.useRef(null);
|
|
102
|
-
return n.useEffect(() => {
|
|
103
|
-
const p = l.current;
|
|
104
|
-
l.current = r?.current || s.current, p !== l.current && d.onAnchorChange(l.current);
|
|
105
|
-
}), r ? null : /* @__PURE__ */ i.jsx(A.div, { ...a, ref: c });
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
Fe.displayName = We;
|
|
109
|
-
var _e = "PopperContent", [Xt, Zt] = Be(_e), Ue = n.forwardRef(
|
|
110
|
-
(e, t) => {
|
|
111
|
-
const {
|
|
112
|
-
__scopePopper: o,
|
|
113
|
-
side: r = "bottom",
|
|
114
|
-
sideOffset: a = 0,
|
|
115
|
-
align: d = "center",
|
|
116
|
-
alignOffset: s = 0,
|
|
117
|
-
arrowPadding: c = 0,
|
|
118
|
-
avoidCollisions: l = !0,
|
|
119
|
-
collisionBoundary: p = [],
|
|
120
|
-
collisionPadding: v = 0,
|
|
121
|
-
sticky: w = "partial",
|
|
122
|
-
hideWhenDetached: P = !1,
|
|
123
|
-
updatePositionStrategy: C = "optimized",
|
|
124
|
-
onPlaced: S,
|
|
125
|
-
...u
|
|
126
|
-
} = e, h = ze(_e, o), [x, f] = n.useState(null), g = k(t, (m) => f(m)), [R, E] = n.useState(null), L = Gt(R), N = L?.width ?? 0, H = L?.height ?? 0, G = r + (d !== "center" ? "-" + d : ""), q = typeof v == "number" ? v : { top: 0, right: 0, bottom: 0, left: 0, ...v }, V = Array.isArray(p) ? p : [p], W = V.length > 0, B = {
|
|
127
|
-
padding: q,
|
|
128
|
-
boundary: V.filter(Qt),
|
|
129
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
130
|
-
altBoundary: W
|
|
131
|
-
}, { refs: F, floatingStyles: z, placement: j, isPositioned: O, middlewareData: M } = Ot({
|
|
132
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
133
|
-
strategy: "fixed",
|
|
134
|
-
placement: G,
|
|
135
|
-
whileElementsMounted: (...m) => $t(...m, {
|
|
136
|
-
animationFrame: C === "always"
|
|
137
|
-
}),
|
|
138
|
-
elements: {
|
|
139
|
-
reference: h.anchor
|
|
140
|
-
},
|
|
141
|
-
middleware: [
|
|
142
|
-
Dt({ mainAxis: a + H, alignmentAxis: s }),
|
|
143
|
-
l && kt({
|
|
144
|
-
mainAxis: !0,
|
|
145
|
-
crossAxis: !1,
|
|
146
|
-
limiter: w === "partial" ? zt() : void 0,
|
|
147
|
-
...B
|
|
148
|
-
}),
|
|
149
|
-
l && Lt({ ...B }),
|
|
150
|
-
Ht({
|
|
151
|
-
...B,
|
|
152
|
-
apply: ({ elements: m, rects: I, availableWidth: D, availableHeight: y }) => {
|
|
153
|
-
const { width: b, height: T } = I.reference, $ = m.floating.style;
|
|
154
|
-
$.setProperty("--radix-popper-available-width", `${D}px`), $.setProperty("--radix-popper-available-height", `${y}px`), $.setProperty("--radix-popper-anchor-width", `${b}px`), $.setProperty("--radix-popper-anchor-height", `${T}px`);
|
|
155
|
-
}
|
|
156
|
-
}),
|
|
157
|
-
R && Bt({ element: R, padding: c }),
|
|
158
|
-
eo({ arrowWidth: N, arrowHeight: H }),
|
|
159
|
-
P && Vt({ strategy: "referenceHidden", ...B })
|
|
160
|
-
]
|
|
161
|
-
}), [U, le] = Ge(j), ee = Le(S);
|
|
162
|
-
Y(() => {
|
|
163
|
-
O && ee?.();
|
|
164
|
-
}, [O, ee]);
|
|
165
|
-
const ce = M.arrow?.x, de = M.arrow?.y, X = M.arrow?.centerOffset !== 0, [ae, te] = n.useState();
|
|
166
|
-
return Y(() => {
|
|
167
|
-
x && te(window.getComputedStyle(x).zIndex);
|
|
168
|
-
}, [x]), /* @__PURE__ */ i.jsx(
|
|
169
|
-
"div",
|
|
170
|
-
{
|
|
171
|
-
ref: F.setFloating,
|
|
172
|
-
"data-radix-popper-content-wrapper": "",
|
|
173
|
-
style: {
|
|
174
|
-
...z,
|
|
175
|
-
transform: O ? z.transform : "translate(0, -200%)",
|
|
176
|
-
// keep off the page when measuring
|
|
177
|
-
minWidth: "max-content",
|
|
178
|
-
zIndex: ae,
|
|
179
|
-
"--radix-popper-transform-origin": [
|
|
180
|
-
M.transformOrigin?.x,
|
|
181
|
-
M.transformOrigin?.y
|
|
182
|
-
].join(" "),
|
|
183
|
-
// hide the content if using the hide middleware and should be hidden
|
|
184
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
185
|
-
// as if the PopperContent isn't there at all
|
|
186
|
-
...M.hide?.referenceHidden && {
|
|
187
|
-
visibility: "hidden",
|
|
188
|
-
pointerEvents: "none"
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
dir: e.dir,
|
|
192
|
-
children: /* @__PURE__ */ i.jsx(
|
|
193
|
-
Xt,
|
|
194
|
-
{
|
|
195
|
-
scope: o,
|
|
196
|
-
placedSide: U,
|
|
197
|
-
onArrowChange: E,
|
|
198
|
-
arrowX: ce,
|
|
199
|
-
arrowY: de,
|
|
200
|
-
shouldHideArrow: X,
|
|
201
|
-
children: /* @__PURE__ */ i.jsx(
|
|
202
|
-
A.div,
|
|
203
|
-
{
|
|
204
|
-
"data-side": U,
|
|
205
|
-
"data-align": le,
|
|
206
|
-
...u,
|
|
207
|
-
ref: g,
|
|
208
|
-
style: {
|
|
209
|
-
...u.style,
|
|
210
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
211
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
212
|
-
animation: O ? void 0 : "none"
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
)
|
|
216
|
-
}
|
|
217
|
-
)
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
);
|
|
222
|
-
Ue.displayName = _e;
|
|
223
|
-
var Ke = "PopperArrow", Jt = {
|
|
224
|
-
top: "bottom",
|
|
225
|
-
right: "left",
|
|
226
|
-
bottom: "top",
|
|
227
|
-
left: "right"
|
|
228
|
-
}, Ye = n.forwardRef(function(t, o) {
|
|
229
|
-
const { __scopePopper: r, ...a } = t, d = Zt(Ke, r), s = Jt[d.placedSide];
|
|
230
|
-
return (
|
|
231
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
232
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
233
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
234
|
-
/* @__PURE__ */ i.jsx(
|
|
235
|
-
"span",
|
|
236
|
-
{
|
|
237
|
-
ref: d.onArrowChange,
|
|
238
|
-
style: {
|
|
239
|
-
position: "absolute",
|
|
240
|
-
left: d.arrowX,
|
|
241
|
-
top: d.arrowY,
|
|
242
|
-
[s]: 0,
|
|
243
|
-
transformOrigin: {
|
|
244
|
-
top: "",
|
|
245
|
-
right: "0 0",
|
|
246
|
-
bottom: "center 0",
|
|
247
|
-
left: "100% 0"
|
|
248
|
-
}[d.placedSide],
|
|
249
|
-
transform: {
|
|
250
|
-
top: "translateY(100%)",
|
|
251
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
252
|
-
bottom: "rotate(180deg)",
|
|
253
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
254
|
-
}[d.placedSide],
|
|
255
|
-
visibility: d.shouldHideArrow ? "hidden" : void 0
|
|
256
|
-
},
|
|
257
|
-
children: /* @__PURE__ */ i.jsx(
|
|
258
|
-
Yt,
|
|
259
|
-
{
|
|
260
|
-
...a,
|
|
261
|
-
ref: o,
|
|
262
|
-
style: {
|
|
263
|
-
...a.style,
|
|
264
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
265
|
-
display: "block"
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
)
|
|
269
|
-
}
|
|
270
|
-
)
|
|
271
|
-
);
|
|
272
|
-
});
|
|
273
|
-
Ye.displayName = Ke;
|
|
274
|
-
function Qt(e) {
|
|
275
|
-
return e !== null;
|
|
276
|
-
}
|
|
277
|
-
var eo = (e) => ({
|
|
278
|
-
name: "transformOrigin",
|
|
279
|
-
options: e,
|
|
280
|
-
fn(t) {
|
|
281
|
-
const { placement: o, rects: r, middlewareData: a } = t, s = a.arrow?.centerOffset !== 0, c = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [p, v] = Ge(o), w = { start: "0%", center: "50%", end: "100%" }[v], P = (a.arrow?.x ?? 0) + c / 2, C = (a.arrow?.y ?? 0) + l / 2;
|
|
282
|
-
let S = "", u = "";
|
|
283
|
-
return p === "bottom" ? (S = s ? w : `${P}px`, u = `${-l}px`) : p === "top" ? (S = s ? w : `${P}px`, u = `${r.floating.height + l}px`) : p === "right" ? (S = `${-l}px`, u = s ? w : `${C}px`) : p === "left" && (S = `${r.floating.width + l}px`, u = s ? w : `${C}px`), { data: { x: S, y: u } };
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
function Ge(e) {
|
|
287
|
-
const [t, o = "center"] = e.split("-");
|
|
288
|
-
return [t, o];
|
|
289
|
-
}
|
|
290
|
-
var to = $e, oo = Fe, no = Ue, ro = Ye;
|
|
291
|
-
const so = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ao = (e) => e.replace(
|
|
292
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
293
|
-
(t, o, r) => r ? r.toUpperCase() : o.toLowerCase()
|
|
294
|
-
), Me = (e) => {
|
|
295
|
-
const t = ao(e);
|
|
296
|
-
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
297
|
-
}, qe = (...e) => e.filter((t, o, r) => !!t && t.trim() !== "" && r.indexOf(t) === o).join(" ").trim(), io = (e) => {
|
|
298
|
-
for (const t in e)
|
|
299
|
-
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
300
|
-
return !0;
|
|
301
|
-
};
|
|
302
|
-
var lo = {
|
|
303
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
304
|
-
width: 24,
|
|
305
|
-
height: 24,
|
|
306
|
-
viewBox: "0 0 24 24",
|
|
307
|
-
fill: "none",
|
|
308
|
-
stroke: "currentColor",
|
|
309
|
-
strokeWidth: 2,
|
|
310
|
-
strokeLinecap: "round",
|
|
311
|
-
strokeLinejoin: "round"
|
|
312
|
-
};
|
|
313
|
-
const co = De(
|
|
314
|
-
({
|
|
315
|
-
color: e = "currentColor",
|
|
316
|
-
size: t = 24,
|
|
317
|
-
strokeWidth: o = 2,
|
|
318
|
-
absoluteStrokeWidth: r,
|
|
319
|
-
className: a = "",
|
|
320
|
-
children: d,
|
|
321
|
-
iconNode: s,
|
|
322
|
-
...c
|
|
323
|
-
}, l) => we(
|
|
324
|
-
"svg",
|
|
325
|
-
{
|
|
326
|
-
ref: l,
|
|
327
|
-
...lo,
|
|
328
|
-
width: t,
|
|
329
|
-
height: t,
|
|
330
|
-
stroke: e,
|
|
331
|
-
strokeWidth: r ? Number(o) * 24 / Number(t) : o,
|
|
332
|
-
className: qe("lucide", a),
|
|
333
|
-
...!d && !io(c) && { "aria-hidden": "true" },
|
|
334
|
-
...c
|
|
335
|
-
},
|
|
336
|
-
[
|
|
337
|
-
...s.map(([p, v]) => we(p, v)),
|
|
338
|
-
...Array.isArray(d) ? d : [d]
|
|
339
|
-
]
|
|
340
|
-
)
|
|
341
|
-
);
|
|
342
|
-
const Ae = (e, t) => {
|
|
343
|
-
const o = De(
|
|
344
|
-
({ className: r, ...a }, d) => we(co, {
|
|
345
|
-
ref: d,
|
|
346
|
-
iconNode: t,
|
|
347
|
-
className: qe(
|
|
348
|
-
`lucide-${so(Me(e))}`,
|
|
349
|
-
`lucide-${e}`,
|
|
350
|
-
r
|
|
351
|
-
),
|
|
352
|
-
...a
|
|
353
|
-
})
|
|
354
|
-
);
|
|
355
|
-
return o.displayName = Me(e), o;
|
|
356
|
-
};
|
|
357
|
-
const uo = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], po = Ae("check", uo);
|
|
358
|
-
const fo = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Xe = Ae("chevron-down", fo);
|
|
359
|
-
const mo = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], ho = Ae("chevron-up", mo);
|
|
360
|
-
function go(e) {
|
|
361
|
-
const t = n.useRef({ value: e, previous: e });
|
|
362
|
-
return n.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
363
|
-
}
|
|
364
|
-
var Ze = Object.freeze({
|
|
365
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
366
|
-
position: "absolute",
|
|
367
|
-
border: 0,
|
|
368
|
-
width: 1,
|
|
369
|
-
height: 1,
|
|
370
|
-
padding: 0,
|
|
371
|
-
margin: -1,
|
|
372
|
-
overflow: "hidden",
|
|
373
|
-
clip: "rect(0, 0, 0, 0)",
|
|
374
|
-
whiteSpace: "nowrap",
|
|
375
|
-
wordWrap: "normal"
|
|
376
|
-
}), vo = "VisuallyHidden", Je = n.forwardRef(
|
|
377
|
-
(e, t) => /* @__PURE__ */ i.jsx(
|
|
378
|
-
A.span,
|
|
379
|
-
{
|
|
380
|
-
...e,
|
|
381
|
-
ref: t,
|
|
382
|
-
style: { ...Ze, ...e.style }
|
|
383
|
-
}
|
|
384
|
-
)
|
|
385
|
-
);
|
|
386
|
-
Je.displayName = vo;
|
|
387
|
-
var cn = Je;
|
|
388
|
-
function Oe(e, [t, o]) {
|
|
389
|
-
return Math.min(o, Math.max(t, e));
|
|
390
|
-
}
|
|
391
|
-
var xo = [" ", "Enter", "ArrowUp", "ArrowDown"], wo = [" ", "Enter"], re = "Select", [fe, me, So] = Wt(re), [ie, dn] = Re(re, [
|
|
392
|
-
So,
|
|
393
|
-
Ve
|
|
394
|
-
]), he = Ve(), [Co, J] = ie(re), [yo, bo] = ie(re), Qe = (e) => {
|
|
395
|
-
const {
|
|
396
|
-
__scopeSelect: t,
|
|
397
|
-
children: o,
|
|
398
|
-
open: r,
|
|
399
|
-
defaultOpen: a,
|
|
400
|
-
onOpenChange: d,
|
|
401
|
-
value: s,
|
|
402
|
-
defaultValue: c,
|
|
403
|
-
onValueChange: l,
|
|
404
|
-
dir: p,
|
|
405
|
-
name: v,
|
|
406
|
-
autoComplete: w,
|
|
407
|
-
disabled: P,
|
|
408
|
-
required: C,
|
|
409
|
-
form: S
|
|
410
|
-
} = e, u = he(t), [h, x] = n.useState(null), [f, g] = n.useState(null), [R, E] = n.useState(!1), L = Ut(p), [N, H] = je({
|
|
411
|
-
prop: r,
|
|
412
|
-
defaultProp: a ?? !1,
|
|
413
|
-
onChange: d,
|
|
414
|
-
caller: re
|
|
415
|
-
}), [G, q] = je({
|
|
416
|
-
prop: s,
|
|
417
|
-
defaultProp: c,
|
|
418
|
-
onChange: l,
|
|
419
|
-
caller: re
|
|
420
|
-
}), V = n.useRef(null), W = h ? S || !!h.closest("form") : !0, [B, F] = n.useState(/* @__PURE__ */ new Set()), z = Array.from(B).map((j) => j.props.value).join(";");
|
|
421
|
-
return /* @__PURE__ */ i.jsx(to, { ...u, children: /* @__PURE__ */ i.jsxs(
|
|
422
|
-
Co,
|
|
423
|
-
{
|
|
424
|
-
required: C,
|
|
425
|
-
scope: t,
|
|
426
|
-
trigger: h,
|
|
427
|
-
onTriggerChange: x,
|
|
428
|
-
valueNode: f,
|
|
429
|
-
onValueNodeChange: g,
|
|
430
|
-
valueNodeHasChildren: R,
|
|
431
|
-
onValueNodeHasChildrenChange: E,
|
|
432
|
-
contentId: Te(),
|
|
433
|
-
value: G,
|
|
434
|
-
onValueChange: q,
|
|
435
|
-
open: N,
|
|
436
|
-
onOpenChange: H,
|
|
437
|
-
dir: L,
|
|
438
|
-
triggerPointerDownPosRef: V,
|
|
439
|
-
disabled: P,
|
|
440
|
-
children: [
|
|
441
|
-
/* @__PURE__ */ i.jsx(fe.Provider, { scope: t, children: /* @__PURE__ */ i.jsx(
|
|
442
|
-
yo,
|
|
443
|
-
{
|
|
444
|
-
scope: e.__scopeSelect,
|
|
445
|
-
onNativeOptionAdd: n.useCallback((j) => {
|
|
446
|
-
F((O) => new Set(O).add(j));
|
|
447
|
-
}, []),
|
|
448
|
-
onNativeOptionRemove: n.useCallback((j) => {
|
|
449
|
-
F((O) => {
|
|
450
|
-
const M = new Set(O);
|
|
451
|
-
return M.delete(j), M;
|
|
452
|
-
});
|
|
453
|
-
}, []),
|
|
454
|
-
children: o
|
|
455
|
-
}
|
|
456
|
-
) }),
|
|
457
|
-
W ? /* @__PURE__ */ i.jsxs(
|
|
458
|
-
Pt,
|
|
459
|
-
{
|
|
460
|
-
"aria-hidden": !0,
|
|
461
|
-
required: C,
|
|
462
|
-
tabIndex: -1,
|
|
463
|
-
name: v,
|
|
464
|
-
autoComplete: w,
|
|
465
|
-
value: G,
|
|
466
|
-
onChange: (j) => q(j.target.value),
|
|
467
|
-
disabled: P,
|
|
468
|
-
form: S,
|
|
469
|
-
children: [
|
|
470
|
-
G === void 0 ? /* @__PURE__ */ i.jsx("option", { value: "" }) : null,
|
|
471
|
-
Array.from(B)
|
|
472
|
-
]
|
|
473
|
-
},
|
|
474
|
-
z
|
|
475
|
-
) : null
|
|
476
|
-
]
|
|
477
|
-
}
|
|
478
|
-
) });
|
|
479
|
-
};
|
|
480
|
-
Qe.displayName = re;
|
|
481
|
-
var et = "SelectTrigger", tt = n.forwardRef(
|
|
482
|
-
(e, t) => {
|
|
483
|
-
const { __scopeSelect: o, disabled: r = !1, ...a } = e, d = he(o), s = J(et, o), c = s.disabled || r, l = k(t, s.onTriggerChange), p = me(o), v = n.useRef("touch"), [w, P, C] = Rt((u) => {
|
|
484
|
-
const h = p().filter((g) => !g.disabled), x = h.find((g) => g.value === s.value), f = Tt(h, u, x);
|
|
485
|
-
f !== void 0 && s.onValueChange(f.value);
|
|
486
|
-
}), S = (u) => {
|
|
487
|
-
c || (s.onOpenChange(!0), C()), u && (s.triggerPointerDownPosRef.current = {
|
|
488
|
-
x: Math.round(u.pageX),
|
|
489
|
-
y: Math.round(u.pageY)
|
|
490
|
-
});
|
|
491
|
-
};
|
|
492
|
-
return /* @__PURE__ */ i.jsx(oo, { asChild: !0, ...d, children: /* @__PURE__ */ i.jsx(
|
|
493
|
-
A.button,
|
|
494
|
-
{
|
|
495
|
-
type: "button",
|
|
496
|
-
role: "combobox",
|
|
497
|
-
"aria-controls": s.contentId,
|
|
498
|
-
"aria-expanded": s.open,
|
|
499
|
-
"aria-required": s.required,
|
|
500
|
-
"aria-autocomplete": "none",
|
|
501
|
-
dir: s.dir,
|
|
502
|
-
"data-state": s.open ? "open" : "closed",
|
|
503
|
-
disabled: c,
|
|
504
|
-
"data-disabled": c ? "" : void 0,
|
|
505
|
-
"data-placeholder": It(s.value) ? "" : void 0,
|
|
506
|
-
...a,
|
|
507
|
-
ref: l,
|
|
508
|
-
onClick: _(a.onClick, (u) => {
|
|
509
|
-
u.currentTarget.focus(), v.current !== "mouse" && S(u);
|
|
510
|
-
}),
|
|
511
|
-
onPointerDown: _(a.onPointerDown, (u) => {
|
|
512
|
-
v.current = u.pointerType;
|
|
513
|
-
const h = u.target;
|
|
514
|
-
h.hasPointerCapture(u.pointerId) && h.releasePointerCapture(u.pointerId), u.button === 0 && u.ctrlKey === !1 && u.pointerType === "mouse" && (S(u), u.preventDefault());
|
|
515
|
-
}),
|
|
516
|
-
onKeyDown: _(a.onKeyDown, (u) => {
|
|
517
|
-
const h = w.current !== "";
|
|
518
|
-
!(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && P(u.key), !(h && u.key === " ") && xo.includes(u.key) && (S(), u.preventDefault());
|
|
519
|
-
})
|
|
520
|
-
}
|
|
521
|
-
) });
|
|
522
|
-
}
|
|
523
|
-
);
|
|
524
|
-
tt.displayName = et;
|
|
525
|
-
var ot = "SelectValue", nt = n.forwardRef(
|
|
526
|
-
(e, t) => {
|
|
527
|
-
const { __scopeSelect: o, className: r, style: a, children: d, placeholder: s = "", ...c } = e, l = J(ot, o), { onValueNodeHasChildrenChange: p } = l, v = d !== void 0, w = k(t, l.onValueNodeChange);
|
|
528
|
-
return Y(() => {
|
|
529
|
-
p(v);
|
|
530
|
-
}, [p, v]), /* @__PURE__ */ i.jsx(
|
|
531
|
-
A.span,
|
|
532
|
-
{
|
|
533
|
-
...c,
|
|
534
|
-
ref: w,
|
|
535
|
-
style: { pointerEvents: "none" },
|
|
536
|
-
children: It(l.value) ? /* @__PURE__ */ i.jsx(i.Fragment, { children: s }) : d
|
|
537
|
-
}
|
|
538
|
-
);
|
|
539
|
-
}
|
|
540
|
-
);
|
|
541
|
-
nt.displayName = ot;
|
|
542
|
-
var Po = "SelectIcon", rt = n.forwardRef(
|
|
543
|
-
(e, t) => {
|
|
544
|
-
const { __scopeSelect: o, children: r, ...a } = e;
|
|
545
|
-
return /* @__PURE__ */ i.jsx(A.span, { "aria-hidden": !0, ...a, ref: t, children: r || "▼" });
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
rt.displayName = Po;
|
|
549
|
-
var Io = "SelectPortal", st = (e) => /* @__PURE__ */ i.jsx(Nt, { asChild: !0, ...e });
|
|
550
|
-
st.displayName = Io;
|
|
551
|
-
var se = "SelectContent", at = n.forwardRef(
|
|
552
|
-
(e, t) => {
|
|
553
|
-
const o = J(se, e.__scopeSelect), [r, a] = n.useState();
|
|
554
|
-
if (Y(() => {
|
|
555
|
-
a(new DocumentFragment());
|
|
556
|
-
}, []), !o.open) {
|
|
557
|
-
const d = r;
|
|
558
|
-
return d ? ke.createPortal(
|
|
559
|
-
/* @__PURE__ */ i.jsx(it, { scope: e.__scopeSelect, children: /* @__PURE__ */ i.jsx(fe.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ i.jsx("div", { children: e.children }) }) }),
|
|
560
|
-
d
|
|
561
|
-
) : null;
|
|
562
|
-
}
|
|
563
|
-
return /* @__PURE__ */ i.jsx(lt, { ...e, ref: t });
|
|
564
|
-
}
|
|
565
|
-
);
|
|
566
|
-
at.displayName = se;
|
|
567
|
-
var K = 10, [it, Q] = ie(se), Ro = "SelectContentImpl", To = Se("SelectContent.RemoveScroll"), lt = n.forwardRef(
|
|
568
|
-
(e, t) => {
|
|
569
|
-
const {
|
|
570
|
-
__scopeSelect: o,
|
|
571
|
-
position: r = "item-aligned",
|
|
572
|
-
onCloseAutoFocus: a,
|
|
573
|
-
onEscapeKeyDown: d,
|
|
574
|
-
onPointerDownOutside: s,
|
|
575
|
-
//
|
|
576
|
-
// PopperContent props
|
|
577
|
-
side: c,
|
|
578
|
-
sideOffset: l,
|
|
579
|
-
align: p,
|
|
580
|
-
alignOffset: v,
|
|
581
|
-
arrowPadding: w,
|
|
582
|
-
collisionBoundary: P,
|
|
583
|
-
collisionPadding: C,
|
|
584
|
-
sticky: S,
|
|
585
|
-
hideWhenDetached: u,
|
|
586
|
-
avoidCollisions: h,
|
|
587
|
-
//
|
|
588
|
-
...x
|
|
589
|
-
} = e, f = J(se, o), [g, R] = n.useState(null), [E, L] = n.useState(null), N = k(t, (m) => R(m)), [H, G] = n.useState(null), [q, V] = n.useState(
|
|
590
|
-
null
|
|
591
|
-
), W = me(o), [B, F] = n.useState(!1), z = n.useRef(!1);
|
|
592
|
-
n.useEffect(() => {
|
|
593
|
-
if (g) return _t(g);
|
|
594
|
-
}, [g]), At();
|
|
595
|
-
const j = n.useCallback(
|
|
596
|
-
(m) => {
|
|
597
|
-
const [I, ...D] = W().map((T) => T.ref.current), [y] = D.slice(-1), b = document.activeElement;
|
|
598
|
-
for (const T of m)
|
|
599
|
-
if (T === b || (T?.scrollIntoView({ block: "nearest" }), T === I && E && (E.scrollTop = 0), T === y && E && (E.scrollTop = E.scrollHeight), T?.focus(), document.activeElement !== b)) return;
|
|
600
|
-
},
|
|
601
|
-
[W, E]
|
|
602
|
-
), O = n.useCallback(
|
|
603
|
-
() => j([H, g]),
|
|
604
|
-
[j, H, g]
|
|
605
|
-
);
|
|
606
|
-
n.useEffect(() => {
|
|
607
|
-
B && O();
|
|
608
|
-
}, [B, O]);
|
|
609
|
-
const { onOpenChange: M, triggerPointerDownPosRef: U } = f;
|
|
610
|
-
n.useEffect(() => {
|
|
611
|
-
if (g) {
|
|
612
|
-
let m = { x: 0, y: 0 };
|
|
613
|
-
const I = (y) => {
|
|
614
|
-
m = {
|
|
615
|
-
x: Math.abs(Math.round(y.pageX) - (U.current?.x ?? 0)),
|
|
616
|
-
y: Math.abs(Math.round(y.pageY) - (U.current?.y ?? 0))
|
|
617
|
-
};
|
|
618
|
-
}, D = (y) => {
|
|
619
|
-
m.x <= 10 && m.y <= 10 ? y.preventDefault() : g.contains(y.target) || M(!1), document.removeEventListener("pointermove", I), U.current = null;
|
|
620
|
-
};
|
|
621
|
-
return U.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", D, { capture: !0, once: !0 })), () => {
|
|
622
|
-
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", D, { capture: !0 });
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
}, [g, M, U]), n.useEffect(() => {
|
|
626
|
-
const m = () => M(!1);
|
|
627
|
-
return window.addEventListener("blur", m), window.addEventListener("resize", m), () => {
|
|
628
|
-
window.removeEventListener("blur", m), window.removeEventListener("resize", m);
|
|
629
|
-
};
|
|
630
|
-
}, [M]);
|
|
631
|
-
const [le, ee] = Rt((m) => {
|
|
632
|
-
const I = W().filter((b) => !b.disabled), D = I.find((b) => b.ref.current === document.activeElement), y = Tt(I, m, D);
|
|
633
|
-
y && setTimeout(() => y.ref.current.focus());
|
|
634
|
-
}), ce = n.useCallback(
|
|
635
|
-
(m, I, D) => {
|
|
636
|
-
const y = !z.current && !D;
|
|
637
|
-
(f.value !== void 0 && f.value === I || y) && (G(m), y && (z.current = !0));
|
|
638
|
-
},
|
|
639
|
-
[f.value]
|
|
640
|
-
), de = n.useCallback(() => g?.focus(), [g]), X = n.useCallback(
|
|
641
|
-
(m, I, D) => {
|
|
642
|
-
const y = !z.current && !D;
|
|
643
|
-
(f.value !== void 0 && f.value === I || y) && V(m);
|
|
644
|
-
},
|
|
645
|
-
[f.value]
|
|
646
|
-
), ae = r === "popper" ? Ce : ct, te = ae === Ce ? {
|
|
647
|
-
side: c,
|
|
648
|
-
sideOffset: l,
|
|
649
|
-
align: p,
|
|
650
|
-
alignOffset: v,
|
|
651
|
-
arrowPadding: w,
|
|
652
|
-
collisionBoundary: P,
|
|
653
|
-
collisionPadding: C,
|
|
654
|
-
sticky: S,
|
|
655
|
-
hideWhenDetached: u,
|
|
656
|
-
avoidCollisions: h
|
|
657
|
-
} : {};
|
|
658
|
-
return /* @__PURE__ */ i.jsx(
|
|
659
|
-
it,
|
|
660
|
-
{
|
|
661
|
-
scope: o,
|
|
662
|
-
content: g,
|
|
663
|
-
viewport: E,
|
|
664
|
-
onViewportChange: L,
|
|
665
|
-
itemRefCallback: ce,
|
|
666
|
-
selectedItem: H,
|
|
667
|
-
onItemLeave: de,
|
|
668
|
-
itemTextRefCallback: X,
|
|
669
|
-
focusSelectedItem: O,
|
|
670
|
-
selectedItemText: q,
|
|
671
|
-
position: r,
|
|
672
|
-
isPositioned: B,
|
|
673
|
-
searchRef: le,
|
|
674
|
-
children: /* @__PURE__ */ i.jsx(Et, { as: To, allowPinchZoom: !0, children: /* @__PURE__ */ i.jsx(
|
|
675
|
-
jt,
|
|
676
|
-
{
|
|
677
|
-
asChild: !0,
|
|
678
|
-
trapped: f.open,
|
|
679
|
-
onMountAutoFocus: (m) => {
|
|
680
|
-
m.preventDefault();
|
|
681
|
-
},
|
|
682
|
-
onUnmountAutoFocus: _(a, (m) => {
|
|
683
|
-
f.trigger?.focus({ preventScroll: !0 }), m.preventDefault();
|
|
684
|
-
}),
|
|
685
|
-
children: /* @__PURE__ */ i.jsx(
|
|
686
|
-
Mt,
|
|
687
|
-
{
|
|
688
|
-
asChild: !0,
|
|
689
|
-
disableOutsidePointerEvents: !0,
|
|
690
|
-
onEscapeKeyDown: d,
|
|
691
|
-
onPointerDownOutside: s,
|
|
692
|
-
onFocusOutside: (m) => m.preventDefault(),
|
|
693
|
-
onDismiss: () => f.onOpenChange(!1),
|
|
694
|
-
children: /* @__PURE__ */ i.jsx(
|
|
695
|
-
ae,
|
|
696
|
-
{
|
|
697
|
-
role: "listbox",
|
|
698
|
-
id: f.contentId,
|
|
699
|
-
"data-state": f.open ? "open" : "closed",
|
|
700
|
-
dir: f.dir,
|
|
701
|
-
onContextMenu: (m) => m.preventDefault(),
|
|
702
|
-
...x,
|
|
703
|
-
...te,
|
|
704
|
-
onPlaced: () => F(!0),
|
|
705
|
-
ref: N,
|
|
706
|
-
style: {
|
|
707
|
-
// flex layout so we can place the scroll buttons properly
|
|
708
|
-
display: "flex",
|
|
709
|
-
flexDirection: "column",
|
|
710
|
-
// reset the outline by default as the content MAY get focused
|
|
711
|
-
outline: "none",
|
|
712
|
-
...x.style
|
|
713
|
-
},
|
|
714
|
-
onKeyDown: _(x.onKeyDown, (m) => {
|
|
715
|
-
const I = m.ctrlKey || m.altKey || m.metaKey;
|
|
716
|
-
if (m.key === "Tab" && m.preventDefault(), !I && m.key.length === 1 && ee(m.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(m.key)) {
|
|
717
|
-
let y = W().filter((b) => !b.disabled).map((b) => b.ref.current);
|
|
718
|
-
if (["ArrowUp", "End"].includes(m.key) && (y = y.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
|
|
719
|
-
const b = m.target, T = y.indexOf(b);
|
|
720
|
-
y = y.slice(T + 1);
|
|
721
|
-
}
|
|
722
|
-
setTimeout(() => j(y)), m.preventDefault();
|
|
723
|
-
}
|
|
724
|
-
})
|
|
725
|
-
}
|
|
726
|
-
)
|
|
727
|
-
}
|
|
728
|
-
)
|
|
729
|
-
}
|
|
730
|
-
) })
|
|
731
|
-
}
|
|
732
|
-
);
|
|
733
|
-
}
|
|
734
|
-
);
|
|
735
|
-
lt.displayName = Ro;
|
|
736
|
-
var No = "SelectItemAlignedPosition", ct = n.forwardRef((e, t) => {
|
|
737
|
-
const { __scopeSelect: o, onPlaced: r, ...a } = e, d = J(se, o), s = Q(se, o), [c, l] = n.useState(null), [p, v] = n.useState(null), w = k(t, (N) => v(N)), P = me(o), C = n.useRef(!1), S = n.useRef(!0), { viewport: u, selectedItem: h, selectedItemText: x, focusSelectedItem: f } = s, g = n.useCallback(() => {
|
|
738
|
-
if (d.trigger && d.valueNode && c && p && u && h && x) {
|
|
739
|
-
const N = d.trigger.getBoundingClientRect(), H = p.getBoundingClientRect(), G = d.valueNode.getBoundingClientRect(), q = x.getBoundingClientRect();
|
|
740
|
-
if (d.dir !== "rtl") {
|
|
741
|
-
const b = q.left - H.left, T = G.left - b, $ = N.left - T, oe = N.width + $, ge = Math.max(oe, H.width), ve = window.innerWidth - K, xe = Oe(T, [
|
|
742
|
-
K,
|
|
743
|
-
// Prevents the content from going off the starting edge of the
|
|
744
|
-
// viewport. It may still go off the ending edge, but this can be
|
|
745
|
-
// controlled by the user since they may want to manage overflow in a
|
|
746
|
-
// specific way.
|
|
747
|
-
// https://github.com/radix-ui/primitives/issues/2049
|
|
748
|
-
Math.max(K, ve - ge)
|
|
749
|
-
]);
|
|
750
|
-
c.style.minWidth = oe + "px", c.style.left = xe + "px";
|
|
751
|
-
} else {
|
|
752
|
-
const b = H.right - q.right, T = window.innerWidth - G.right - b, $ = window.innerWidth - N.right - T, oe = N.width + $, ge = Math.max(oe, H.width), ve = window.innerWidth - K, xe = Oe(T, [
|
|
753
|
-
K,
|
|
754
|
-
Math.max(K, ve - ge)
|
|
755
|
-
]);
|
|
756
|
-
c.style.minWidth = oe + "px", c.style.right = xe + "px";
|
|
757
|
-
}
|
|
758
|
-
const V = P(), W = window.innerHeight - K * 2, B = u.scrollHeight, F = window.getComputedStyle(p), z = parseInt(F.borderTopWidth, 10), j = parseInt(F.paddingTop, 10), O = parseInt(F.borderBottomWidth, 10), M = parseInt(F.paddingBottom, 10), U = z + j + B + M + O, le = Math.min(h.offsetHeight * 5, U), ee = window.getComputedStyle(u), ce = parseInt(ee.paddingTop, 10), de = parseInt(ee.paddingBottom, 10), X = N.top + N.height / 2 - K, ae = W - X, te = h.offsetHeight / 2, m = h.offsetTop + te, I = z + j + m, D = U - I;
|
|
759
|
-
if (I <= X) {
|
|
760
|
-
const b = V.length > 0 && h === V[V.length - 1].ref.current;
|
|
761
|
-
c.style.bottom = "0px";
|
|
762
|
-
const T = p.clientHeight - u.offsetTop - u.offsetHeight, $ = Math.max(
|
|
763
|
-
ae,
|
|
764
|
-
te + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
765
|
-
(b ? de : 0) + T + O
|
|
766
|
-
), oe = I + $;
|
|
767
|
-
c.style.height = oe + "px";
|
|
768
|
-
} else {
|
|
769
|
-
const b = V.length > 0 && h === V[0].ref.current;
|
|
770
|
-
c.style.top = "0px";
|
|
771
|
-
const $ = Math.max(
|
|
772
|
-
X,
|
|
773
|
-
z + u.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
774
|
-
(b ? ce : 0) + te
|
|
775
|
-
) + D;
|
|
776
|
-
c.style.height = $ + "px", u.scrollTop = I - X + u.offsetTop;
|
|
777
|
-
}
|
|
778
|
-
c.style.margin = `${K}px 0`, c.style.minHeight = le + "px", c.style.maxHeight = W + "px", r?.(), requestAnimationFrame(() => C.current = !0);
|
|
779
|
-
}
|
|
780
|
-
}, [
|
|
781
|
-
P,
|
|
782
|
-
d.trigger,
|
|
783
|
-
d.valueNode,
|
|
784
|
-
c,
|
|
785
|
-
p,
|
|
786
|
-
u,
|
|
787
|
-
h,
|
|
788
|
-
x,
|
|
789
|
-
d.dir,
|
|
790
|
-
r
|
|
791
|
-
]);
|
|
792
|
-
Y(() => g(), [g]);
|
|
793
|
-
const [R, E] = n.useState();
|
|
794
|
-
Y(() => {
|
|
795
|
-
p && E(window.getComputedStyle(p).zIndex);
|
|
796
|
-
}, [p]);
|
|
797
|
-
const L = n.useCallback(
|
|
798
|
-
(N) => {
|
|
799
|
-
N && S.current === !0 && (g(), f?.(), S.current = !1);
|
|
800
|
-
},
|
|
801
|
-
[g, f]
|
|
802
|
-
);
|
|
803
|
-
return /* @__PURE__ */ i.jsx(
|
|
804
|
-
Ao,
|
|
805
|
-
{
|
|
806
|
-
scope: o,
|
|
807
|
-
contentWrapper: c,
|
|
808
|
-
shouldExpandOnScrollRef: C,
|
|
809
|
-
onScrollButtonChange: L,
|
|
810
|
-
children: /* @__PURE__ */ i.jsx(
|
|
811
|
-
"div",
|
|
812
|
-
{
|
|
813
|
-
ref: l,
|
|
814
|
-
style: {
|
|
815
|
-
display: "flex",
|
|
816
|
-
flexDirection: "column",
|
|
817
|
-
position: "fixed",
|
|
818
|
-
zIndex: R
|
|
819
|
-
},
|
|
820
|
-
children: /* @__PURE__ */ i.jsx(
|
|
821
|
-
A.div,
|
|
822
|
-
{
|
|
823
|
-
...a,
|
|
824
|
-
ref: w,
|
|
825
|
-
style: {
|
|
826
|
-
// When we get the height of the content, it includes borders. If we were to set
|
|
827
|
-
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
828
|
-
boxSizing: "border-box",
|
|
829
|
-
// We need to ensure the content doesn't get taller than the wrapper
|
|
830
|
-
maxHeight: "100%",
|
|
831
|
-
...a.style
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
)
|
|
835
|
-
}
|
|
836
|
-
)
|
|
837
|
-
}
|
|
838
|
-
);
|
|
839
|
-
});
|
|
840
|
-
ct.displayName = No;
|
|
841
|
-
var _o = "SelectPopperPosition", Ce = n.forwardRef((e, t) => {
|
|
842
|
-
const {
|
|
843
|
-
__scopeSelect: o,
|
|
844
|
-
align: r = "start",
|
|
845
|
-
collisionPadding: a = K,
|
|
846
|
-
...d
|
|
847
|
-
} = e, s = he(o);
|
|
848
|
-
return /* @__PURE__ */ i.jsx(
|
|
849
|
-
no,
|
|
850
|
-
{
|
|
851
|
-
...s,
|
|
852
|
-
...d,
|
|
853
|
-
ref: t,
|
|
854
|
-
align: r,
|
|
855
|
-
collisionPadding: a,
|
|
856
|
-
style: {
|
|
857
|
-
// Ensure border-box for floating-ui calculations
|
|
858
|
-
boxSizing: "border-box",
|
|
859
|
-
...d.style,
|
|
860
|
-
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
861
|
-
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
862
|
-
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
863
|
-
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
864
|
-
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
);
|
|
868
|
-
});
|
|
869
|
-
Ce.displayName = _o;
|
|
870
|
-
var [Ao, Ee] = ie(se, {}), ye = "SelectViewport", dt = n.forwardRef(
|
|
871
|
-
(e, t) => {
|
|
872
|
-
const { __scopeSelect: o, nonce: r, ...a } = e, d = Q(ye, o), s = Ee(ye, o), c = k(t, d.onViewportChange), l = n.useRef(0);
|
|
873
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
874
|
-
/* @__PURE__ */ i.jsx(
|
|
875
|
-
"style",
|
|
876
|
-
{
|
|
877
|
-
dangerouslySetInnerHTML: {
|
|
878
|
-
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
879
|
-
},
|
|
880
|
-
nonce: r
|
|
881
|
-
}
|
|
882
|
-
),
|
|
883
|
-
/* @__PURE__ */ i.jsx(fe.Slot, { scope: o, children: /* @__PURE__ */ i.jsx(
|
|
884
|
-
A.div,
|
|
885
|
-
{
|
|
886
|
-
"data-radix-select-viewport": "",
|
|
887
|
-
role: "presentation",
|
|
888
|
-
...a,
|
|
889
|
-
ref: c,
|
|
890
|
-
style: {
|
|
891
|
-
// we use position: 'relative' here on the `viewport` so that when we call
|
|
892
|
-
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
893
|
-
// (independent of the scrollUpButton).
|
|
894
|
-
position: "relative",
|
|
895
|
-
flex: 1,
|
|
896
|
-
// Viewport should only be scrollable in the vertical direction.
|
|
897
|
-
// This won't work in vertical writing modes, so we'll need to
|
|
898
|
-
// revisit this if/when that is supported
|
|
899
|
-
// https://developer.chrome.com/blog/vertical-form-controls
|
|
900
|
-
overflow: "hidden auto",
|
|
901
|
-
...a.style
|
|
902
|
-
},
|
|
903
|
-
onScroll: _(a.onScroll, (p) => {
|
|
904
|
-
const v = p.currentTarget, { contentWrapper: w, shouldExpandOnScrollRef: P } = s;
|
|
905
|
-
if (P?.current && w) {
|
|
906
|
-
const C = Math.abs(l.current - v.scrollTop);
|
|
907
|
-
if (C > 0) {
|
|
908
|
-
const S = window.innerHeight - K * 2, u = parseFloat(w.style.minHeight), h = parseFloat(w.style.height), x = Math.max(u, h);
|
|
909
|
-
if (x < S) {
|
|
910
|
-
const f = x + C, g = Math.min(S, f), R = f - g;
|
|
911
|
-
w.style.height = g + "px", w.style.bottom === "0px" && (v.scrollTop = R > 0 ? R : 0, w.style.justifyContent = "flex-end");
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
l.current = v.scrollTop;
|
|
916
|
-
})
|
|
917
|
-
}
|
|
918
|
-
) })
|
|
919
|
-
] });
|
|
920
|
-
}
|
|
921
|
-
);
|
|
922
|
-
dt.displayName = ye;
|
|
923
|
-
var ut = "SelectGroup", [Eo, jo] = ie(ut), pt = n.forwardRef(
|
|
924
|
-
(e, t) => {
|
|
925
|
-
const { __scopeSelect: o, ...r } = e, a = Te();
|
|
926
|
-
return /* @__PURE__ */ i.jsx(Eo, { scope: o, id: a, children: /* @__PURE__ */ i.jsx(A.div, { role: "group", "aria-labelledby": a, ...r, ref: t }) });
|
|
927
|
-
}
|
|
928
|
-
);
|
|
929
|
-
pt.displayName = ut;
|
|
930
|
-
var ft = "SelectLabel", mt = n.forwardRef(
|
|
931
|
-
(e, t) => {
|
|
932
|
-
const { __scopeSelect: o, ...r } = e, a = jo(ft, o);
|
|
933
|
-
return /* @__PURE__ */ i.jsx(A.div, { id: a.id, ...r, ref: t });
|
|
934
|
-
}
|
|
935
|
-
);
|
|
936
|
-
mt.displayName = ft;
|
|
937
|
-
var pe = "SelectItem", [Mo, ht] = ie(pe), gt = n.forwardRef(
|
|
938
|
-
(e, t) => {
|
|
939
|
-
const {
|
|
940
|
-
__scopeSelect: o,
|
|
941
|
-
value: r,
|
|
942
|
-
disabled: a = !1,
|
|
943
|
-
textValue: d,
|
|
944
|
-
...s
|
|
945
|
-
} = e, c = J(pe, o), l = Q(pe, o), p = c.value === r, [v, w] = n.useState(d ?? ""), [P, C] = n.useState(!1), S = k(
|
|
946
|
-
t,
|
|
947
|
-
(f) => l.itemRefCallback?.(f, r, a)
|
|
948
|
-
), u = Te(), h = n.useRef("touch"), x = () => {
|
|
949
|
-
a || (c.onValueChange(r), c.onOpenChange(!1));
|
|
950
|
-
};
|
|
951
|
-
if (r === "")
|
|
952
|
-
throw new Error(
|
|
953
|
-
"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."
|
|
954
|
-
);
|
|
955
|
-
return /* @__PURE__ */ i.jsx(
|
|
956
|
-
Mo,
|
|
957
|
-
{
|
|
958
|
-
scope: o,
|
|
959
|
-
value: r,
|
|
960
|
-
disabled: a,
|
|
961
|
-
textId: u,
|
|
962
|
-
isSelected: p,
|
|
963
|
-
onItemTextChange: n.useCallback((f) => {
|
|
964
|
-
w((g) => g || (f?.textContent ?? "").trim());
|
|
965
|
-
}, []),
|
|
966
|
-
children: /* @__PURE__ */ i.jsx(
|
|
967
|
-
fe.ItemSlot,
|
|
968
|
-
{
|
|
969
|
-
scope: o,
|
|
970
|
-
value: r,
|
|
971
|
-
disabled: a,
|
|
972
|
-
textValue: v,
|
|
973
|
-
children: /* @__PURE__ */ i.jsx(
|
|
974
|
-
A.div,
|
|
975
|
-
{
|
|
976
|
-
role: "option",
|
|
977
|
-
"aria-labelledby": u,
|
|
978
|
-
"data-highlighted": P ? "" : void 0,
|
|
979
|
-
"aria-selected": p && P,
|
|
980
|
-
"data-state": p ? "checked" : "unchecked",
|
|
981
|
-
"aria-disabled": a || void 0,
|
|
982
|
-
"data-disabled": a ? "" : void 0,
|
|
983
|
-
tabIndex: a ? void 0 : -1,
|
|
984
|
-
...s,
|
|
985
|
-
ref: S,
|
|
986
|
-
onFocus: _(s.onFocus, () => C(!0)),
|
|
987
|
-
onBlur: _(s.onBlur, () => C(!1)),
|
|
988
|
-
onClick: _(s.onClick, () => {
|
|
989
|
-
h.current !== "mouse" && x();
|
|
990
|
-
}),
|
|
991
|
-
onPointerUp: _(s.onPointerUp, () => {
|
|
992
|
-
h.current === "mouse" && x();
|
|
993
|
-
}),
|
|
994
|
-
onPointerDown: _(s.onPointerDown, (f) => {
|
|
995
|
-
h.current = f.pointerType;
|
|
996
|
-
}),
|
|
997
|
-
onPointerMove: _(s.onPointerMove, (f) => {
|
|
998
|
-
h.current = f.pointerType, a ? l.onItemLeave?.() : h.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
|
|
999
|
-
}),
|
|
1000
|
-
onPointerLeave: _(s.onPointerLeave, (f) => {
|
|
1001
|
-
f.currentTarget === document.activeElement && l.onItemLeave?.();
|
|
1002
|
-
}),
|
|
1003
|
-
onKeyDown: _(s.onKeyDown, (f) => {
|
|
1004
|
-
l.searchRef?.current !== "" && f.key === " " || (wo.includes(f.key) && x(), f.key === " " && f.preventDefault());
|
|
1005
|
-
})
|
|
1006
|
-
}
|
|
1007
|
-
)
|
|
1008
|
-
}
|
|
1009
|
-
)
|
|
1010
|
-
}
|
|
1011
|
-
);
|
|
1012
|
-
}
|
|
1013
|
-
);
|
|
1014
|
-
gt.displayName = pe;
|
|
1015
|
-
var ue = "SelectItemText", vt = n.forwardRef(
|
|
1016
|
-
(e, t) => {
|
|
1017
|
-
const { __scopeSelect: o, className: r, style: a, ...d } = e, s = J(ue, o), c = Q(ue, o), l = ht(ue, o), p = bo(ue, o), [v, w] = n.useState(null), P = k(
|
|
1018
|
-
t,
|
|
1019
|
-
(x) => w(x),
|
|
1020
|
-
l.onItemTextChange,
|
|
1021
|
-
(x) => c.itemTextRefCallback?.(x, l.value, l.disabled)
|
|
1022
|
-
), C = v?.textContent, S = n.useMemo(
|
|
1023
|
-
() => /* @__PURE__ */ i.jsx("option", { value: l.value, disabled: l.disabled, children: C }, l.value),
|
|
1024
|
-
[l.disabled, l.value, C]
|
|
1025
|
-
), { onNativeOptionAdd: u, onNativeOptionRemove: h } = p;
|
|
1026
|
-
return Y(() => (u(S), () => h(S)), [u, h, S]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1027
|
-
/* @__PURE__ */ i.jsx(A.span, { id: l.textId, ...d, ref: P }),
|
|
1028
|
-
l.isSelected && s.valueNode && !s.valueNodeHasChildren ? ke.createPortal(d.children, s.valueNode) : null
|
|
1029
|
-
] });
|
|
1030
|
-
}
|
|
1031
|
-
);
|
|
1032
|
-
vt.displayName = ue;
|
|
1033
|
-
var xt = "SelectItemIndicator", wt = n.forwardRef(
|
|
1034
|
-
(e, t) => {
|
|
1035
|
-
const { __scopeSelect: o, ...r } = e;
|
|
1036
|
-
return ht(xt, o).isSelected ? /* @__PURE__ */ i.jsx(A.span, { "aria-hidden": !0, ...r, ref: t }) : null;
|
|
1037
|
-
}
|
|
1038
|
-
);
|
|
1039
|
-
wt.displayName = xt;
|
|
1040
|
-
var be = "SelectScrollUpButton", St = n.forwardRef((e, t) => {
|
|
1041
|
-
const o = Q(be, e.__scopeSelect), r = Ee(be, e.__scopeSelect), [a, d] = n.useState(!1), s = k(t, r.onScrollButtonChange);
|
|
1042
|
-
return Y(() => {
|
|
1043
|
-
if (o.viewport && o.isPositioned) {
|
|
1044
|
-
let c = function() {
|
|
1045
|
-
const p = l.scrollTop > 0;
|
|
1046
|
-
d(p);
|
|
1047
|
-
};
|
|
1048
|
-
const l = o.viewport;
|
|
1049
|
-
return c(), l.addEventListener("scroll", c), () => l.removeEventListener("scroll", c);
|
|
1050
|
-
}
|
|
1051
|
-
}, [o.viewport, o.isPositioned]), a ? /* @__PURE__ */ i.jsx(
|
|
1052
|
-
yt,
|
|
1053
|
-
{
|
|
1054
|
-
...e,
|
|
1055
|
-
ref: s,
|
|
1056
|
-
onAutoScroll: () => {
|
|
1057
|
-
const { viewport: c, selectedItem: l } = o;
|
|
1058
|
-
c && l && (c.scrollTop = c.scrollTop - l.offsetHeight);
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
) : null;
|
|
1062
|
-
});
|
|
1063
|
-
St.displayName = be;
|
|
1064
|
-
var Pe = "SelectScrollDownButton", Ct = n.forwardRef((e, t) => {
|
|
1065
|
-
const o = Q(Pe, e.__scopeSelect), r = Ee(Pe, e.__scopeSelect), [a, d] = n.useState(!1), s = k(t, r.onScrollButtonChange);
|
|
1066
|
-
return Y(() => {
|
|
1067
|
-
if (o.viewport && o.isPositioned) {
|
|
1068
|
-
let c = function() {
|
|
1069
|
-
const p = l.scrollHeight - l.clientHeight, v = Math.ceil(l.scrollTop) < p;
|
|
1070
|
-
d(v);
|
|
1071
|
-
};
|
|
1072
|
-
const l = o.viewport;
|
|
1073
|
-
return c(), l.addEventListener("scroll", c), () => l.removeEventListener("scroll", c);
|
|
1074
|
-
}
|
|
1075
|
-
}, [o.viewport, o.isPositioned]), a ? /* @__PURE__ */ i.jsx(
|
|
1076
|
-
yt,
|
|
1077
|
-
{
|
|
1078
|
-
...e,
|
|
1079
|
-
ref: s,
|
|
1080
|
-
onAutoScroll: () => {
|
|
1081
|
-
const { viewport: c, selectedItem: l } = o;
|
|
1082
|
-
c && l && (c.scrollTop = c.scrollTop + l.offsetHeight);
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
) : null;
|
|
1086
|
-
});
|
|
1087
|
-
Ct.displayName = Pe;
|
|
1088
|
-
var yt = n.forwardRef((e, t) => {
|
|
1089
|
-
const { __scopeSelect: o, onAutoScroll: r, ...a } = e, d = Q("SelectScrollButton", o), s = n.useRef(null), c = me(o), l = n.useCallback(() => {
|
|
1090
|
-
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
1091
|
-
}, []);
|
|
1092
|
-
return n.useEffect(() => () => l(), [l]), Y(() => {
|
|
1093
|
-
c().find((v) => v.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1094
|
-
}, [c]), /* @__PURE__ */ i.jsx(
|
|
1095
|
-
A.div,
|
|
1096
|
-
{
|
|
1097
|
-
"aria-hidden": !0,
|
|
1098
|
-
...a,
|
|
1099
|
-
ref: t,
|
|
1100
|
-
style: { flexShrink: 0, ...a.style },
|
|
1101
|
-
onPointerDown: _(a.onPointerDown, () => {
|
|
1102
|
-
s.current === null && (s.current = window.setInterval(r, 50));
|
|
1103
|
-
}),
|
|
1104
|
-
onPointerMove: _(a.onPointerMove, () => {
|
|
1105
|
-
d.onItemLeave?.(), s.current === null && (s.current = window.setInterval(r, 50));
|
|
1106
|
-
}),
|
|
1107
|
-
onPointerLeave: _(a.onPointerLeave, () => {
|
|
1108
|
-
l();
|
|
1109
|
-
})
|
|
1110
|
-
}
|
|
1111
|
-
);
|
|
1112
|
-
}), Oo = "SelectSeparator", bt = n.forwardRef(
|
|
1113
|
-
(e, t) => {
|
|
1114
|
-
const { __scopeSelect: o, ...r } = e;
|
|
1115
|
-
return /* @__PURE__ */ i.jsx(A.div, { "aria-hidden": !0, ...r, ref: t });
|
|
1116
|
-
}
|
|
1117
|
-
);
|
|
1118
|
-
bt.displayName = Oo;
|
|
1119
|
-
var Ie = "SelectArrow", Do = n.forwardRef(
|
|
1120
|
-
(e, t) => {
|
|
1121
|
-
const { __scopeSelect: o, ...r } = e, a = he(o), d = J(Ie, o), s = Q(Ie, o);
|
|
1122
|
-
return d.open && s.position === "popper" ? /* @__PURE__ */ i.jsx(ro, { ...a, ...r, ref: t }) : null;
|
|
1123
|
-
}
|
|
1124
|
-
);
|
|
1125
|
-
Do.displayName = Ie;
|
|
1126
|
-
var ko = "SelectBubbleInput", Pt = n.forwardRef(
|
|
1127
|
-
({ __scopeSelect: e, value: t, ...o }, r) => {
|
|
1128
|
-
const a = n.useRef(null), d = k(r, a), s = go(t);
|
|
1129
|
-
return n.useEffect(() => {
|
|
1130
|
-
const c = a.current;
|
|
1131
|
-
if (!c) return;
|
|
1132
|
-
const l = window.HTMLSelectElement.prototype, v = Object.getOwnPropertyDescriptor(
|
|
1133
|
-
l,
|
|
1134
|
-
"value"
|
|
1135
|
-
).set;
|
|
1136
|
-
if (s !== t && v) {
|
|
1137
|
-
const w = new Event("change", { bubbles: !0 });
|
|
1138
|
-
v.call(c, t), c.dispatchEvent(w);
|
|
1139
|
-
}
|
|
1140
|
-
}, [s, t]), /* @__PURE__ */ i.jsx(
|
|
1141
|
-
A.select,
|
|
1142
|
-
{
|
|
1143
|
-
...o,
|
|
1144
|
-
style: { ...Ze, ...o.style },
|
|
1145
|
-
ref: d,
|
|
1146
|
-
defaultValue: t
|
|
1147
|
-
}
|
|
1148
|
-
);
|
|
1149
|
-
}
|
|
1150
|
-
);
|
|
1151
|
-
Pt.displayName = ko;
|
|
1152
|
-
function It(e) {
|
|
1153
|
-
return e === "" || e === void 0;
|
|
1154
|
-
}
|
|
1155
|
-
function Rt(e) {
|
|
1156
|
-
const t = Le(e), o = n.useRef(""), r = n.useRef(0), a = n.useCallback(
|
|
1157
|
-
(s) => {
|
|
1158
|
-
const c = o.current + s;
|
|
1159
|
-
t(c), (function l(p) {
|
|
1160
|
-
o.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() => l(""), 1e3));
|
|
1161
|
-
})(c);
|
|
1162
|
-
},
|
|
1163
|
-
[t]
|
|
1164
|
-
), d = n.useCallback(() => {
|
|
1165
|
-
o.current = "", window.clearTimeout(r.current);
|
|
1166
|
-
}, []);
|
|
1167
|
-
return n.useEffect(() => () => window.clearTimeout(r.current), []), [o, a, d];
|
|
1168
|
-
}
|
|
1169
|
-
function Tt(e, t, o) {
|
|
1170
|
-
const a = t.length > 1 && Array.from(t).every((p) => p === t[0]) ? t[0] : t, d = o ? e.indexOf(o) : -1;
|
|
1171
|
-
let s = Lo(e, Math.max(d, 0));
|
|
1172
|
-
a.length === 1 && (s = s.filter((p) => p !== o));
|
|
1173
|
-
const l = s.find(
|
|
1174
|
-
(p) => p.textValue.toLowerCase().startsWith(a.toLowerCase())
|
|
1175
|
-
);
|
|
1176
|
-
return l !== o ? l : void 0;
|
|
1177
|
-
}
|
|
1178
|
-
function Lo(e, t) {
|
|
1179
|
-
return e.map((o, r) => e[(t + r) % e.length]);
|
|
1180
|
-
}
|
|
1181
|
-
var Ho = Qe, Bo = tt, Vo = nt, zo = rt, $o = st, Wo = at, Fo = dt, Uo = pt, Ko = mt, Yo = gt, Go = vt, qo = wt, Xo = St, Zo = Ct, Jo = bt;
|
|
1182
|
-
function un({ ...e }) {
|
|
1183
|
-
return /* @__PURE__ */ i.jsx(Ho, { "data-slot": "select", ...e });
|
|
1184
|
-
}
|
|
1185
|
-
function pn({ ...e }) {
|
|
1186
|
-
return /* @__PURE__ */ i.jsx(Uo, { "data-slot": "select-group", ...e });
|
|
1187
|
-
}
|
|
1188
|
-
function fn({ ...e }) {
|
|
1189
|
-
return /* @__PURE__ */ i.jsx(Vo, { "data-slot": "select-value", ...e });
|
|
1190
|
-
}
|
|
1191
|
-
function mn({
|
|
1192
|
-
className: e,
|
|
1193
|
-
size: t = "default",
|
|
1194
|
-
children: o,
|
|
1195
|
-
...r
|
|
1196
|
-
}) {
|
|
1197
|
-
return /* @__PURE__ */ i.jsxs(
|
|
1198
|
-
Bo,
|
|
1199
|
-
{
|
|
1200
|
-
"data-slot": "select-trigger",
|
|
1201
|
-
"data-size": t,
|
|
1202
|
-
className: Z(
|
|
1203
|
-
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1204
|
-
e
|
|
1205
|
-
),
|
|
1206
|
-
...r,
|
|
1207
|
-
children: [
|
|
1208
|
-
o,
|
|
1209
|
-
/* @__PURE__ */ i.jsx(zo, { asChild: !0, children: /* @__PURE__ */ i.jsx(Xe, { className: "size-4 opacity-50" }) })
|
|
1210
|
-
]
|
|
1211
|
-
}
|
|
1212
|
-
);
|
|
1213
|
-
}
|
|
1214
|
-
function hn({ className: e, children: t, position: o = "popper", ...r }) {
|
|
1215
|
-
return /* @__PURE__ */ i.jsx($o, { children: /* @__PURE__ */ i.jsxs(
|
|
1216
|
-
Wo,
|
|
1217
|
-
{
|
|
1218
|
-
"data-slot": "select-content",
|
|
1219
|
-
className: Z(
|
|
1220
|
-
"bg-content1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-medium",
|
|
1221
|
-
o === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1222
|
-
e
|
|
1223
|
-
),
|
|
1224
|
-
position: o,
|
|
1225
|
-
...r,
|
|
1226
|
-
children: [
|
|
1227
|
-
/* @__PURE__ */ i.jsx(Qo, {}),
|
|
1228
|
-
/* @__PURE__ */ i.jsx(
|
|
1229
|
-
Fo,
|
|
1230
|
-
{
|
|
1231
|
-
className: Z(
|
|
1232
|
-
"p-1",
|
|
1233
|
-
o === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
1234
|
-
),
|
|
1235
|
-
children: t
|
|
1236
|
-
}
|
|
1237
|
-
),
|
|
1238
|
-
/* @__PURE__ */ i.jsx(en, {})
|
|
1239
|
-
]
|
|
1240
|
-
}
|
|
1241
|
-
) });
|
|
1242
|
-
}
|
|
1243
|
-
function gn({ className: e, ...t }) {
|
|
1244
|
-
return /* @__PURE__ */ i.jsx(Ko, { "data-slot": "select-label", className: Z("text-muted-foreground px-2 py-1.5 text-xs", e), ...t });
|
|
1245
|
-
}
|
|
1246
|
-
function vn({ className: e, children: t, ...o }) {
|
|
1247
|
-
return /* @__PURE__ */ i.jsxs(
|
|
1248
|
-
Yo,
|
|
1249
|
-
{
|
|
1250
|
-
"data-slot": "select-item",
|
|
1251
|
-
className: Z(
|
|
1252
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1253
|
-
e
|
|
1254
|
-
),
|
|
1255
|
-
...o,
|
|
1256
|
-
children: [
|
|
1257
|
-
/* @__PURE__ */ i.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ i.jsx(qo, { children: /* @__PURE__ */ i.jsx(po, { className: "size-4" }) }) }),
|
|
1258
|
-
/* @__PURE__ */ i.jsx(Go, { children: t })
|
|
1259
|
-
]
|
|
1260
|
-
}
|
|
1261
|
-
);
|
|
1262
|
-
}
|
|
1263
|
-
function xn({ className: e, ...t }) {
|
|
1264
|
-
return /* @__PURE__ */ i.jsx(
|
|
1265
|
-
Jo,
|
|
1266
|
-
{
|
|
1267
|
-
"data-slot": "select-separator",
|
|
1268
|
-
className: Z("bg-border pointer-events-none -mx-1 my-1 h-px", e),
|
|
1269
|
-
...t
|
|
1270
|
-
}
|
|
1271
|
-
);
|
|
1272
|
-
}
|
|
1273
|
-
function Qo({ className: e, ...t }) {
|
|
1274
|
-
return /* @__PURE__ */ i.jsx(
|
|
1275
|
-
Xo,
|
|
1276
|
-
{
|
|
1277
|
-
"data-slot": "select-scroll-up-button",
|
|
1278
|
-
className: Z("flex cursor-default items-center justify-center py-1", e),
|
|
1279
|
-
...t,
|
|
1280
|
-
children: /* @__PURE__ */ i.jsx(ho, { className: "size-4" })
|
|
1281
|
-
}
|
|
1282
|
-
);
|
|
1283
|
-
}
|
|
1284
|
-
function en({ className: e, ...t }) {
|
|
1285
|
-
return /* @__PURE__ */ i.jsx(
|
|
1286
|
-
Zo,
|
|
1287
|
-
{
|
|
1288
|
-
"data-slot": "select-scroll-down-button",
|
|
1289
|
-
className: Z("flex cursor-default items-center justify-center py-1", e),
|
|
1290
|
-
...t,
|
|
1291
|
-
children: /* @__PURE__ */ i.jsx(Xe, { className: "size-4" })
|
|
1292
|
-
}
|
|
1293
|
-
);
|
|
1294
|
-
}
|
|
1295
|
-
export {
|
|
1296
|
-
oo as A,
|
|
1297
|
-
no as C,
|
|
1298
|
-
to as R,
|
|
1299
|
-
un as S,
|
|
1300
|
-
mn as a,
|
|
1301
|
-
fn as b,
|
|
1302
|
-
hn as c,
|
|
1303
|
-
pn as d,
|
|
1304
|
-
gn as e,
|
|
1305
|
-
vn as f,
|
|
1306
|
-
Wt as g,
|
|
1307
|
-
Ve as h,
|
|
1308
|
-
ro as i,
|
|
1309
|
-
Ae as j,
|
|
1310
|
-
po as k,
|
|
1311
|
-
Xe as l,
|
|
1312
|
-
cn as m,
|
|
1313
|
-
go as n,
|
|
1314
|
-
Oe as o,
|
|
1315
|
-
Gt as p,
|
|
1316
|
-
en as q,
|
|
1317
|
-
Qo as r,
|
|
1318
|
-
xn as s,
|
|
1319
|
-
Ut as u
|
|
1320
|
-
};
|
|
1321
|
-
//# sourceMappingURL=select-C25qmFpo.js.map
|