@datawire-ai/busyfile-design-library 1.30.3 → 1.30.4
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/index10.js +46 -46
- package/dist/index100.js +10 -69
- package/dist/index101.js +219 -10
- package/dist/index102.js +13 -124
- package/dist/index103.js +29 -135
- package/dist/index104.js +134 -13
- package/dist/index106.js +3 -3
- package/dist/index108.js +10 -181
- package/dist/index109.js +3 -7
- package/dist/index11.js +6 -6
- package/dist/index110.js +10 -217
- package/dist/index111.js +4 -30
- package/dist/index112.js +46 -10
- package/dist/index113.js +15 -4
- package/dist/index114.js +648 -10
- package/dist/index115.js +1 -1
- package/dist/index116.js +22 -22
- package/dist/index117.js +23 -649
- package/dist/index118.js +22 -15
- package/dist/index119.js +39 -4
- package/dist/index12.js +67 -67
- package/dist/index120.js +18 -47
- package/dist/index121.js +12 -25
- package/dist/index122.js +205 -21
- package/dist/index123.js +21 -38
- package/dist/index124.js +399 -17
- package/dist/index125.js +6 -2
- package/dist/index126.js +25 -2
- package/dist/index127.js +29 -12
- package/dist/index128.js +5 -206
- package/dist/index129.js +2 -22
- package/dist/index13.js +95 -95
- package/dist/index130.js +47 -394
- package/dist/index131.js +65 -6
- package/dist/index132.js +52 -25
- package/dist/index133.js +5 -29
- package/dist/index134.js +5 -5
- package/dist/index135.js +16 -2
- package/dist/index136.js +5 -52
- package/dist/index137.js +8 -64
- package/dist/index138.js +17 -52
- package/dist/index139.js +4 -4
- package/dist/index14.js +15 -15
- package/dist/index140.js +3 -3
- package/dist/index141.js +5 -15
- package/dist/index142.js +5 -5
- package/dist/index143.js +3 -7
- package/dist/index144.js +4 -16
- package/dist/index145.js +6 -4
- package/dist/index146.js +24 -4
- package/dist/index147.js +6 -5
- package/dist/index148.js +4 -5
- package/dist/index149.js +5 -3
- package/dist/index15.js +54 -54
- package/dist/index150.js +4 -3
- package/dist/index151.js +4 -6
- package/dist/index152.js +5 -24
- package/dist/index153.js +4 -6
- package/dist/index154.js +7 -3
- package/dist/index155.js +5 -6
- package/dist/index156.js +4 -5
- package/dist/index157.js +3 -3
- package/dist/index158.js +5 -4
- package/dist/index159.js +58 -4
- package/dist/index16.js +12 -12
- package/dist/index160.js +65 -7
- package/dist/index161.js +240 -5
- package/dist/index162.js +39 -4
- package/dist/index163.js +4 -4
- package/dist/index164.js +7 -6
- package/dist/index165.js +13 -58
- package/dist/index166.js +7 -66
- package/dist/index167.js +10 -240
- package/dist/index168.js +9 -38
- package/dist/index169.js +8 -4
- package/dist/index17.js +30 -30
- package/dist/index170.js +16 -7
- package/dist/index171.js +24 -14
- package/dist/index172.js +20 -8
- package/dist/index173.js +52 -9
- package/dist/index174.js +41 -10
- package/dist/index175.js +9 -8
- package/dist/index176.js +20 -16
- package/dist/index177.js +17 -24
- package/dist/index178.js +7 -20
- package/dist/index179.js +23 -53
- package/dist/index18.js +18 -18
- package/dist/index180.js +19 -42
- package/dist/index181.js +16 -10
- package/dist/index182.js +6 -20
- package/dist/index183.js +4 -16
- package/dist/index184.js +4 -6
- package/dist/index185.js +4 -23
- package/dist/index186.js +5 -19
- package/dist/index187.js +4 -16
- package/dist/index188.js +5 -5
- package/dist/index189.js +7 -4
- package/dist/index19.js +29 -29
- package/dist/index190.js +6 -4
- package/dist/index191.js +5 -4
- package/dist/index192.js +3 -4
- package/dist/index193.js +1 -1
- package/dist/index194.js +3 -6
- package/dist/index195.js +3 -7
- package/dist/index196.js +4 -6
- package/dist/index197.js +3 -5
- package/dist/index198.js +3 -3
- package/dist/index199.js +3 -3
- package/dist/index20.js +6 -6
- package/dist/index200.js +524 -3
- package/dist/index201.js +127 -3
- package/dist/index202.js +133 -4
- package/dist/index203.js +5 -4
- package/dist/index204.js +3 -4
- package/dist/index205.js +23 -3
- package/dist/index206.js +110 -5
- package/dist/index207.js +16 -3
- package/dist/index208.js +2 -24
- package/dist/index209.js +2 -110
- package/dist/index21.js +22 -22
- package/dist/index210.js +8 -15
- package/dist/index211.js +17 -522
- package/dist/index212.js +15 -126
- package/dist/index213.js +4 -132
- package/dist/index214.js +6 -2
- package/dist/index215.js +7 -2
- package/dist/index216.js +4 -8
- package/dist/index217.js +7 -19
- package/dist/index218.js +17 -16
- package/dist/index219.js +5 -5
- package/dist/index22.js +31 -32
- package/dist/index220.js +5 -5
- package/dist/index221.js +13 -6
- package/dist/index222.js +10 -4
- package/dist/index223.js +14 -7
- package/dist/index224.js +5 -17
- package/dist/index225.js +6 -5
- package/dist/index226.js +8 -5
- package/dist/index227.js +6 -13
- package/dist/index228.js +56 -10
- package/dist/index229.js +9 -14
- package/dist/index23.js +24 -24
- package/dist/index230.js +3 -3
- package/dist/index231.js +5 -6
- package/dist/index232.js +9 -8
- package/dist/index233.js +4 -5
- package/dist/index234.js +5 -56
- package/dist/index235.js +4 -9
- package/dist/index236.js +11 -5
- package/dist/index237.js +10 -5
- package/dist/index238.js +10 -9
- package/dist/index239.js +11 -5
- package/dist/index24.js +6 -6
- package/dist/index240.js +11 -5
- package/dist/index241.js +10 -4
- package/dist/index242.js +7 -11
- package/dist/index243.js +6 -10
- package/dist/index244.js +4 -9
- package/dist/index245.js +6 -11
- package/dist/index246.js +8 -11
- package/dist/index247.js +6 -10
- package/dist/index248.js +23 -7
- package/dist/index249.js +18 -6
- package/dist/index25.js +10 -10
- package/dist/index250.js +7 -5
- package/dist/index251.js +10 -6
- package/dist/index252.js +10 -8
- package/dist/index253.js +21 -6
- package/dist/index254.js +10 -23
- package/dist/index255.js +9 -18
- package/dist/index256.js +9 -7
- package/dist/index257.js +4 -10
- package/dist/index258.js +5 -10
- package/dist/index259.js +16 -21
- package/dist/index26.js +10 -10
- package/dist/index260.js +9 -10
- package/dist/index261.js +18 -9
- package/dist/index262.js +15 -9
- package/dist/index263.js +12 -4
- package/dist/index264.js +29 -5
- package/dist/index265.js +11 -15
- package/dist/index266.js +25 -9
- package/dist/index267.js +5 -18
- package/dist/index268.js +62 -13
- package/dist/index269.js +69 -13
- package/dist/index27.js +21 -21
- package/dist/index270.js +9 -30
- package/dist/index271.js +13 -12
- package/dist/index272.js +63 -23
- package/dist/index273.js +68 -6
- package/dist/index274.js +31 -65
- package/dist/index275.js +9 -69
- package/dist/index276.js +152 -8
- package/dist/index277.js +107 -13
- package/dist/index278.js +5 -66
- package/dist/index279.js +13 -68
- package/dist/index28.js +202 -214
- package/dist/index280.js +4 -31
- package/dist/index281.js +23 -9
- package/dist/index282.js +6 -153
- package/dist/index283.js +6 -108
- package/dist/index284.js +4 -5
- package/dist/index285.js +15 -12
- package/dist/index286.js +8 -3
- package/dist/index287.js +5 -22
- package/dist/index288.js +4 -5
- package/dist/index289.js +512 -5
- package/dist/index29.js +42 -42
- package/dist/index290.js +50 -4
- package/dist/index291.js +17 -15
- package/dist/index292.js +6 -8
- package/dist/index293.js +8 -5
- package/dist/index294.js +7 -4
- package/dist/index295.js +8 -512
- package/dist/index296.js +13 -50
- package/dist/index297.js +10 -17
- package/dist/index298.js +14 -6
- package/dist/index299.js +6 -8
- package/dist/index3.js +13 -14
- package/dist/index30.js +113 -113
- package/dist/index300.js +15 -7
- package/dist/index301.js +28 -8
- package/dist/index302.js +12 -12
- package/dist/index303.js +23 -11
- package/dist/index304.js +13 -15
- package/dist/index305.js +27 -6
- package/dist/index306.js +5 -16
- package/dist/index307.js +4 -28
- package/dist/index308.js +57 -13
- package/dist/index31.js +18 -18
- package/dist/index32.js +3 -3
- package/dist/index33.js +80 -80
- package/dist/index34.js +13 -13
- package/dist/index35.js +60 -60
- package/dist/index36.js +92 -92
- package/dist/index4.js +9 -9
- package/dist/index40.js +57 -6
- package/dist/index41.js +25 -55
- package/dist/index42.js +130 -25
- package/dist/index43.js +23 -132
- package/dist/index44.js +238 -23
- package/dist/index45.js +29 -238
- package/dist/index46.js +251 -29
- package/dist/index47.js +18 -251
- package/dist/index48.js +10 -18
- package/dist/index49.js +261 -10
- package/dist/index5.js +18 -18
- package/dist/index50.js +13 -261
- package/dist/index51.js +31 -13
- package/dist/index52.js +334 -26
- package/dist/index53.js +37 -335
- package/dist/index54.js +23 -37
- package/dist/index55.js +8 -16
- package/dist/index56.js +5 -11
- package/dist/index57.js +3 -6
- package/dist/index58.js +13 -10
- package/dist/index59.js +74 -12
- package/dist/index6.js +8 -8
- package/dist/index60.js +83 -69
- package/dist/index61.js +13 -89
- package/dist/index62.js +11 -5
- package/dist/index63.js +20 -17
- package/dist/index64.js +69 -20
- package/dist/index65.js +15 -71
- package/dist/index66.js +13 -9
- package/dist/index67.js +7 -7
- package/dist/index68.js +8 -13
- package/dist/index69.js +2 -14
- package/dist/index7.js +46 -46
- package/dist/index70.js +10 -2
- package/dist/index71.js +8 -4
- package/dist/index72.js +6 -14
- package/dist/index73.js +13 -6
- package/dist/index74.js +22 -13
- package/dist/index75.js +160 -19
- package/dist/index76.js +21 -161
- package/dist/index77.js +33 -23
- package/dist/index78.js +13 -33
- package/dist/index79.js +10 -4
- package/dist/index8.js +25 -28
- package/dist/index80.js +174 -17
- package/dist/index81.js +10 -176
- package/dist/index82.js +862 -10
- package/dist/index83.js +27 -853
- package/dist/index84.js +10 -36
- package/dist/index85.js +243 -10
- package/dist/index86.js +298 -230
- package/dist/index87.js +216 -300
- package/dist/index88.js +10 -227
- package/dist/index89.js +7 -10
- package/dist/index9.js +19 -19
- package/dist/index90.js +27 -2
- package/dist/index91.js +65 -30
- package/dist/index92.js +51 -242
- package/dist/index93.js +5 -26
- package/dist/index94.js +24 -6
- package/dist/index95.js +33 -67
- package/dist/index96.js +178 -48
- package/dist/index97.js +7 -5
- package/dist/index98.js +68 -23
- package/dist/index99.js +124 -32
- package/package.json +6 -7
- package/dist/index309.js +0 -25
- package/dist/index310.js +0 -15
- package/dist/index311.js +0 -30
- package/dist/index312.js +0 -7
- package/dist/index313.js +0 -7
- package/dist/index314.js +0 -59
package/dist/index83.js
CHANGED
|
@@ -1,864 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { useDirection as st } from "./index109.js";
|
|
10
|
-
import { DismissableLayer as lt } from "./index102.js";
|
|
11
|
-
import { useFocusGuards as ct } from "./index105.js";
|
|
12
|
-
import { FocusScope as it } from "./index103.js";
|
|
13
|
-
import { useId as ye } from "./index101.js";
|
|
14
|
-
import { createPopperScope as Ee, Root as at, Anchor as dt, Content as ut, Arrow as pt } from "./index110.js";
|
|
15
|
-
import { Portal as ft } from "./index104.js";
|
|
16
|
-
import { Primitive as M } from "./index99.js";
|
|
17
|
-
import { createSlot as mt } from "./index41.js";
|
|
18
|
-
import { useCallbackRef as ht } from "./index112.js";
|
|
19
|
-
import { useControllableState as Pe } from "./index96.js";
|
|
20
|
-
import { useLayoutEffect as z } from "./index113.js";
|
|
21
|
-
import { usePrevious as vt } from "./index97.js";
|
|
22
|
-
import { VISUALLY_HIDDEN_STYLES as gt } from "./index111.js";
|
|
23
|
-
import { hideOthers as St } from "./index107.js";
|
|
24
|
-
import xt from "./index106.js";
|
|
25
|
-
import { j as d } from "./index40.js";
|
|
26
|
-
var wt = [" ", "Enter", "ArrowUp", "ArrowDown"], Ct = [" ", "Enter"], J = "Select", [ie, ae, yt] = nt(J), [te, io] = rt(J, [
|
|
27
|
-
yt,
|
|
28
|
-
Ee
|
|
29
|
-
]), de = Ee(), [It, Y] = te(J), [Tt, Pt] = te(J), be = (n) => {
|
|
30
|
-
const {
|
|
31
|
-
__scopeSelect: c,
|
|
32
|
-
children: e,
|
|
33
|
-
open: i,
|
|
34
|
-
defaultOpen: l,
|
|
35
|
-
onOpenChange: p,
|
|
36
|
-
value: r,
|
|
37
|
-
defaultValue: s,
|
|
38
|
-
onValueChange: o,
|
|
39
|
-
dir: f,
|
|
40
|
-
name: g,
|
|
41
|
-
autoComplete: w,
|
|
42
|
-
disabled: P,
|
|
43
|
-
required: R,
|
|
44
|
-
form: T
|
|
45
|
-
} = n, a = de(c), [v, C] = t.useState(null), [u, h] = t.useState(null), [A, O] = t.useState(!1), oe = st(f), [b, L] = Pe({
|
|
46
|
-
prop: i,
|
|
47
|
-
defaultProp: l ?? !1,
|
|
48
|
-
onChange: p,
|
|
49
|
-
caller: J
|
|
50
|
-
}), [W, X] = Pe({
|
|
51
|
-
prop: r,
|
|
52
|
-
defaultProp: s,
|
|
53
|
-
onChange: o,
|
|
54
|
-
caller: J
|
|
55
|
-
}), B = t.useRef(null), V = v ? T || !!v.closest("form") : !0, [K, H] = t.useState(/* @__PURE__ */ new Set()), F = Array.from(K).map((_) => _.props.value).join(";");
|
|
56
|
-
return /* @__PURE__ */ d.jsx(at, { ...a, children: /* @__PURE__ */ d.jsxs(
|
|
57
|
-
It,
|
|
58
|
-
{
|
|
59
|
-
required: R,
|
|
60
|
-
scope: c,
|
|
61
|
-
trigger: v,
|
|
62
|
-
onTriggerChange: C,
|
|
63
|
-
valueNode: u,
|
|
64
|
-
onValueNodeChange: h,
|
|
65
|
-
valueNodeHasChildren: A,
|
|
66
|
-
onValueNodeHasChildrenChange: O,
|
|
67
|
-
contentId: ye(),
|
|
68
|
-
value: W,
|
|
69
|
-
onValueChange: X,
|
|
70
|
-
open: b,
|
|
71
|
-
onOpenChange: L,
|
|
72
|
-
dir: oe,
|
|
73
|
-
triggerPointerDownPosRef: B,
|
|
74
|
-
disabled: P,
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ d.jsx(ie.Provider, { scope: c, children: /* @__PURE__ */ d.jsx(
|
|
77
|
-
Tt,
|
|
78
|
-
{
|
|
79
|
-
scope: n.__scopeSelect,
|
|
80
|
-
onNativeOptionAdd: t.useCallback((_) => {
|
|
81
|
-
H((j) => new Set(j).add(_));
|
|
82
|
-
}, []),
|
|
83
|
-
onNativeOptionRemove: t.useCallback((_) => {
|
|
84
|
-
H((j) => {
|
|
85
|
-
const U = new Set(j);
|
|
86
|
-
return U.delete(_), U;
|
|
87
|
-
});
|
|
88
|
-
}, []),
|
|
89
|
-
children: e
|
|
90
|
-
}
|
|
91
|
-
) }),
|
|
92
|
-
V ? /* @__PURE__ */ d.jsxs(
|
|
93
|
-
Qe,
|
|
94
|
-
{
|
|
95
|
-
"aria-hidden": !0,
|
|
96
|
-
required: R,
|
|
97
|
-
tabIndex: -1,
|
|
98
|
-
name: g,
|
|
99
|
-
autoComplete: w,
|
|
100
|
-
value: W,
|
|
101
|
-
onChange: (_) => X(_.target.value),
|
|
102
|
-
disabled: P,
|
|
103
|
-
form: T,
|
|
104
|
-
children: [
|
|
105
|
-
W === void 0 ? /* @__PURE__ */ d.jsx("option", { value: "" }) : null,
|
|
106
|
-
Array.from(K)
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
F
|
|
110
|
-
) : null
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
) });
|
|
114
|
-
};
|
|
115
|
-
be.displayName = J;
|
|
116
|
-
var _e = "SelectTrigger", Ne = t.forwardRef(
|
|
117
|
-
(n, c) => {
|
|
118
|
-
const { __scopeSelect: e, disabled: i = !1, ...l } = n, p = de(e), r = Y(_e, e), s = r.disabled || i, o = k(c, r.onTriggerChange), f = ae(e), g = t.useRef("touch"), [w, P, R] = tt((a) => {
|
|
119
|
-
const v = f().filter((h) => !h.disabled), C = v.find((h) => h.value === r.value), u = ot(v, a, C);
|
|
120
|
-
u !== void 0 && r.onValueChange(u.value);
|
|
121
|
-
}), T = (a) => {
|
|
122
|
-
s || (r.onOpenChange(!0), R()), a && (r.triggerPointerDownPosRef.current = {
|
|
123
|
-
x: Math.round(a.pageX),
|
|
124
|
-
y: Math.round(a.pageY)
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
return /* @__PURE__ */ d.jsx(dt, { asChild: !0, ...p, children: /* @__PURE__ */ d.jsx(
|
|
128
|
-
M.button,
|
|
129
|
-
{
|
|
130
|
-
type: "button",
|
|
131
|
-
role: "combobox",
|
|
132
|
-
"aria-controls": r.contentId,
|
|
133
|
-
"aria-expanded": r.open,
|
|
134
|
-
"aria-required": r.required,
|
|
135
|
-
"aria-autocomplete": "none",
|
|
136
|
-
dir: r.dir,
|
|
137
|
-
"data-state": r.open ? "open" : "closed",
|
|
138
|
-
disabled: s,
|
|
139
|
-
"data-disabled": s ? "" : void 0,
|
|
140
|
-
"data-placeholder": et(r.value) ? "" : void 0,
|
|
141
|
-
...l,
|
|
142
|
-
ref: o,
|
|
143
|
-
onClick: E(l.onClick, (a) => {
|
|
144
|
-
a.currentTarget.focus(), g.current !== "mouse" && T(a);
|
|
145
|
-
}),
|
|
146
|
-
onPointerDown: E(l.onPointerDown, (a) => {
|
|
147
|
-
g.current = a.pointerType;
|
|
148
|
-
const v = a.target;
|
|
149
|
-
v.hasPointerCapture(a.pointerId) && v.releasePointerCapture(a.pointerId), a.button === 0 && a.ctrlKey === !1 && a.pointerType === "mouse" && (T(a), a.preventDefault());
|
|
150
|
-
}),
|
|
151
|
-
onKeyDown: E(l.onKeyDown, (a) => {
|
|
152
|
-
const v = w.current !== "";
|
|
153
|
-
!(a.ctrlKey || a.altKey || a.metaKey) && a.key.length === 1 && P(a.key), !(v && a.key === " ") && wt.includes(a.key) && (T(), a.preventDefault());
|
|
154
|
-
})
|
|
155
|
-
}
|
|
156
|
-
) });
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
Ne.displayName = _e;
|
|
160
|
-
var Me = "SelectValue", Ae = t.forwardRef(
|
|
161
|
-
(n, c) => {
|
|
162
|
-
const { __scopeSelect: e, className: i, style: l, children: p, placeholder: r = "", ...s } = n, o = Y(Me, e), { onValueNodeHasChildrenChange: f } = o, g = p !== void 0, w = k(c, o.onValueNodeChange);
|
|
163
|
-
return z(() => {
|
|
164
|
-
f(g);
|
|
165
|
-
}, [f, g]), /* @__PURE__ */ d.jsx(
|
|
166
|
-
M.span,
|
|
167
|
-
{
|
|
168
|
-
...s,
|
|
169
|
-
ref: w,
|
|
170
|
-
style: { pointerEvents: "none" },
|
|
171
|
-
children: et(o.value) ? /* @__PURE__ */ d.jsx(d.Fragment, { children: r }) : p
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
Ae.displayName = Me;
|
|
177
|
-
var Rt = "SelectIcon", Oe = t.forwardRef(
|
|
178
|
-
(n, c) => {
|
|
179
|
-
const { __scopeSelect: e, children: i, ...l } = n;
|
|
180
|
-
return /* @__PURE__ */ d.jsx(M.span, { "aria-hidden": !0, ...l, ref: c, children: i || "▼" });
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
Oe.displayName = Rt;
|
|
184
|
-
var Et = "SelectPortal", De = (n) => /* @__PURE__ */ d.jsx(ft, { asChild: !0, ...n });
|
|
185
|
-
De.displayName = Et;
|
|
186
|
-
var Q = "SelectContent", Le = t.forwardRef(
|
|
187
|
-
(n, c) => {
|
|
188
|
-
const e = Y(Q, n.__scopeSelect), [i, l] = t.useState();
|
|
189
|
-
if (z(() => {
|
|
190
|
-
l(new DocumentFragment());
|
|
191
|
-
}, []), !e.open) {
|
|
192
|
-
const p = i;
|
|
193
|
-
return p ? Re.createPortal(
|
|
194
|
-
/* @__PURE__ */ d.jsx(je, { scope: n.__scopeSelect, children: /* @__PURE__ */ d.jsx(ie.Slot, { scope: n.__scopeSelect, children: /* @__PURE__ */ d.jsx("div", { children: n.children }) }) }),
|
|
195
|
-
p
|
|
196
|
-
) : null;
|
|
197
|
-
}
|
|
198
|
-
return /* @__PURE__ */ d.jsx(ke, { ...n, ref: c });
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
Le.displayName = Q;
|
|
202
|
-
var D = 10, [je, q] = te(Q), bt = "SelectContentImpl", _t = mt("SelectContent.RemoveScroll"), ke = t.forwardRef(
|
|
203
|
-
(n, c) => {
|
|
204
|
-
const {
|
|
205
|
-
__scopeSelect: e,
|
|
206
|
-
position: i = "item-aligned",
|
|
207
|
-
onCloseAutoFocus: l,
|
|
208
|
-
onEscapeKeyDown: p,
|
|
209
|
-
onPointerDownOutside: r,
|
|
210
|
-
//
|
|
211
|
-
// PopperContent props
|
|
212
|
-
side: s,
|
|
213
|
-
sideOffset: o,
|
|
214
|
-
align: f,
|
|
215
|
-
alignOffset: g,
|
|
216
|
-
arrowPadding: w,
|
|
217
|
-
collisionBoundary: P,
|
|
218
|
-
collisionPadding: R,
|
|
219
|
-
sticky: T,
|
|
220
|
-
hideWhenDetached: a,
|
|
221
|
-
avoidCollisions: v,
|
|
222
|
-
//
|
|
223
|
-
...C
|
|
224
|
-
} = n, u = Y(Q, e), [h, A] = t.useState(null), [O, oe] = t.useState(null), b = k(c, (m) => A(m)), [L, W] = t.useState(null), [X, B] = t.useState(
|
|
225
|
-
null
|
|
226
|
-
), V = ae(e), [K, H] = t.useState(!1), F = t.useRef(!1);
|
|
227
|
-
t.useEffect(() => {
|
|
228
|
-
if (h) return St(h);
|
|
229
|
-
}, [h]), ct();
|
|
230
|
-
const _ = t.useCallback(
|
|
231
|
-
(m) => {
|
|
232
|
-
const [I, ...N] = V().map((x) => x.ref.current), [y] = N.slice(-1), S = document.activeElement;
|
|
233
|
-
for (const x of m)
|
|
234
|
-
if (x === S || (x == null || x.scrollIntoView({ block: "nearest" }), x === I && O && (O.scrollTop = 0), x === y && O && (O.scrollTop = O.scrollHeight), x == null || x.focus(), document.activeElement !== S)) return;
|
|
1
|
+
import { cva as t } from "./index77.js";
|
|
2
|
+
const a = t(
|
|
3
|
+
'flex items-center whitespace-nowrap justify-between gap-2 rounded-md border outline-none transition-[color,box-shadow] focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
outline: "border-input bg-transparent text-foreground",
|
|
8
|
+
filled: "bg-muted text-foreground border-none hover:bg-muted/80"
|
|
235
9
|
},
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
);
|
|
241
|
-
t.useEffect(() => {
|
|
242
|
-
K && j();
|
|
243
|
-
}, [K, j]);
|
|
244
|
-
const { onOpenChange: U, triggerPointerDownPosRef: G } = u;
|
|
245
|
-
t.useEffect(() => {
|
|
246
|
-
if (h) {
|
|
247
|
-
let m = { x: 0, y: 0 };
|
|
248
|
-
const I = (y) => {
|
|
249
|
-
var S, x;
|
|
250
|
-
m = {
|
|
251
|
-
x: Math.abs(Math.round(y.pageX) - (((S = G.current) == null ? void 0 : S.x) ?? 0)),
|
|
252
|
-
y: Math.abs(Math.round(y.pageY) - (((x = G.current) == null ? void 0 : x.y) ?? 0))
|
|
253
|
-
};
|
|
254
|
-
}, N = (y) => {
|
|
255
|
-
m.x <= 10 && m.y <= 10 ? y.preventDefault() : h.contains(y.target) || U(!1), document.removeEventListener("pointermove", I), G.current = null;
|
|
256
|
-
};
|
|
257
|
-
return G.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", N, { capture: !0, once: !0 })), () => {
|
|
258
|
-
document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", N, { capture: !0 });
|
|
259
|
-
};
|
|
10
|
+
size: {
|
|
11
|
+
sm: "h-8 px-2 text-sm",
|
|
12
|
+
default: "h-9 px-3 text-sm",
|
|
13
|
+
lg: "h-10 px-4 text-base"
|
|
260
14
|
}
|
|
261
|
-
}, [h, U, G]), t.useEffect(() => {
|
|
262
|
-
const m = () => U(!1);
|
|
263
|
-
return window.addEventListener("blur", m), window.addEventListener("resize", m), () => {
|
|
264
|
-
window.removeEventListener("blur", m), window.removeEventListener("resize", m);
|
|
265
|
-
};
|
|
266
|
-
}, [U]);
|
|
267
|
-
const [ue, se] = tt((m) => {
|
|
268
|
-
const I = V().filter((S) => !S.disabled), N = I.find((S) => S.ref.current === document.activeElement), y = ot(I, m, N);
|
|
269
|
-
y && setTimeout(() => y.ref.current.focus());
|
|
270
|
-
}), pe = t.useCallback(
|
|
271
|
-
(m, I, N) => {
|
|
272
|
-
const y = !F.current && !N;
|
|
273
|
-
(u.value !== void 0 && u.value === I || y) && (W(m), y && (F.current = !0));
|
|
274
|
-
},
|
|
275
|
-
[u.value]
|
|
276
|
-
), fe = t.useCallback(() => h == null ? void 0 : h.focus(), [h]), ee = t.useCallback(
|
|
277
|
-
(m, I, N) => {
|
|
278
|
-
const y = !F.current && !N;
|
|
279
|
-
(u.value !== void 0 && u.value === I || y) && B(m);
|
|
280
|
-
},
|
|
281
|
-
[u.value]
|
|
282
|
-
), le = i === "popper" ? ge : Be, ne = le === ge ? {
|
|
283
|
-
side: s,
|
|
284
|
-
sideOffset: o,
|
|
285
|
-
align: f,
|
|
286
|
-
alignOffset: g,
|
|
287
|
-
arrowPadding: w,
|
|
288
|
-
collisionBoundary: P,
|
|
289
|
-
collisionPadding: R,
|
|
290
|
-
sticky: T,
|
|
291
|
-
hideWhenDetached: a,
|
|
292
|
-
avoidCollisions: v
|
|
293
|
-
} : {};
|
|
294
|
-
return /* @__PURE__ */ d.jsx(
|
|
295
|
-
je,
|
|
296
|
-
{
|
|
297
|
-
scope: e,
|
|
298
|
-
content: h,
|
|
299
|
-
viewport: O,
|
|
300
|
-
onViewportChange: oe,
|
|
301
|
-
itemRefCallback: pe,
|
|
302
|
-
selectedItem: L,
|
|
303
|
-
onItemLeave: fe,
|
|
304
|
-
itemTextRefCallback: ee,
|
|
305
|
-
focusSelectedItem: j,
|
|
306
|
-
selectedItemText: X,
|
|
307
|
-
position: i,
|
|
308
|
-
isPositioned: K,
|
|
309
|
-
searchRef: ue,
|
|
310
|
-
children: /* @__PURE__ */ d.jsx(xt, { as: _t, allowPinchZoom: !0, children: /* @__PURE__ */ d.jsx(
|
|
311
|
-
it,
|
|
312
|
-
{
|
|
313
|
-
asChild: !0,
|
|
314
|
-
trapped: u.open,
|
|
315
|
-
onMountAutoFocus: (m) => {
|
|
316
|
-
m.preventDefault();
|
|
317
|
-
},
|
|
318
|
-
onUnmountAutoFocus: E(l, (m) => {
|
|
319
|
-
var I;
|
|
320
|
-
(I = u.trigger) == null || I.focus({ preventScroll: !0 }), m.preventDefault();
|
|
321
|
-
}),
|
|
322
|
-
children: /* @__PURE__ */ d.jsx(
|
|
323
|
-
lt,
|
|
324
|
-
{
|
|
325
|
-
asChild: !0,
|
|
326
|
-
disableOutsidePointerEvents: !0,
|
|
327
|
-
onEscapeKeyDown: p,
|
|
328
|
-
onPointerDownOutside: r,
|
|
329
|
-
onFocusOutside: (m) => m.preventDefault(),
|
|
330
|
-
onDismiss: () => u.onOpenChange(!1),
|
|
331
|
-
children: /* @__PURE__ */ d.jsx(
|
|
332
|
-
le,
|
|
333
|
-
{
|
|
334
|
-
role: "listbox",
|
|
335
|
-
id: u.contentId,
|
|
336
|
-
"data-state": u.open ? "open" : "closed",
|
|
337
|
-
dir: u.dir,
|
|
338
|
-
onContextMenu: (m) => m.preventDefault(),
|
|
339
|
-
...C,
|
|
340
|
-
...ne,
|
|
341
|
-
onPlaced: () => H(!0),
|
|
342
|
-
ref: b,
|
|
343
|
-
style: {
|
|
344
|
-
// flex layout so we can place the scroll buttons properly
|
|
345
|
-
display: "flex",
|
|
346
|
-
flexDirection: "column",
|
|
347
|
-
// reset the outline by default as the content MAY get focused
|
|
348
|
-
outline: "none",
|
|
349
|
-
...C.style
|
|
350
|
-
},
|
|
351
|
-
onKeyDown: E(C.onKeyDown, (m) => {
|
|
352
|
-
const I = m.ctrlKey || m.altKey || m.metaKey;
|
|
353
|
-
if (m.key === "Tab" && m.preventDefault(), !I && m.key.length === 1 && se(m.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(m.key)) {
|
|
354
|
-
let y = V().filter((S) => !S.disabled).map((S) => S.ref.current);
|
|
355
|
-
if (["ArrowUp", "End"].includes(m.key) && (y = y.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
|
|
356
|
-
const S = m.target, x = y.indexOf(S);
|
|
357
|
-
y = y.slice(x + 1);
|
|
358
|
-
}
|
|
359
|
-
setTimeout(() => _(y)), m.preventDefault();
|
|
360
|
-
}
|
|
361
|
-
})
|
|
362
|
-
}
|
|
363
|
-
)
|
|
364
|
-
}
|
|
365
|
-
)
|
|
366
|
-
}
|
|
367
|
-
) })
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
);
|
|
372
|
-
ke.displayName = bt;
|
|
373
|
-
var Nt = "SelectItemAlignedPosition", Be = t.forwardRef((n, c) => {
|
|
374
|
-
const { __scopeSelect: e, onPlaced: i, ...l } = n, p = Y(Q, e), r = q(Q, e), [s, o] = t.useState(null), [f, g] = t.useState(null), w = k(c, (b) => g(b)), P = ae(e), R = t.useRef(!1), T = t.useRef(!0), { viewport: a, selectedItem: v, selectedItemText: C, focusSelectedItem: u } = r, h = t.useCallback(() => {
|
|
375
|
-
if (p.trigger && p.valueNode && s && f && a && v && C) {
|
|
376
|
-
const b = p.trigger.getBoundingClientRect(), L = f.getBoundingClientRect(), W = p.valueNode.getBoundingClientRect(), X = C.getBoundingClientRect();
|
|
377
|
-
if (p.dir !== "rtl") {
|
|
378
|
-
const S = X.left - L.left, x = W.left - S, Z = b.left - x, $ = b.width + Z, me = Math.max($, L.width), he = window.innerWidth - D, ve = Te(x, [
|
|
379
|
-
D,
|
|
380
|
-
// Prevents the content from going off the starting edge of the
|
|
381
|
-
// viewport. It may still go off the ending edge, but this can be
|
|
382
|
-
// controlled by the user since they may want to manage overflow in a
|
|
383
|
-
// specific way.
|
|
384
|
-
// https://github.com/radix-ui/primitives/issues/2049
|
|
385
|
-
Math.max(D, he - me)
|
|
386
|
-
]);
|
|
387
|
-
s.style.minWidth = $ + "px", s.style.left = ve + "px";
|
|
388
|
-
} else {
|
|
389
|
-
const S = L.right - X.right, x = window.innerWidth - W.right - S, Z = window.innerWidth - b.right - x, $ = b.width + Z, me = Math.max($, L.width), he = window.innerWidth - D, ve = Te(x, [
|
|
390
|
-
D,
|
|
391
|
-
Math.max(D, he - me)
|
|
392
|
-
]);
|
|
393
|
-
s.style.minWidth = $ + "px", s.style.right = ve + "px";
|
|
394
|
-
}
|
|
395
|
-
const B = P(), V = window.innerHeight - D * 2, K = a.scrollHeight, H = window.getComputedStyle(f), F = parseInt(H.borderTopWidth, 10), _ = parseInt(H.paddingTop, 10), j = parseInt(H.borderBottomWidth, 10), U = parseInt(H.paddingBottom, 10), G = F + _ + K + U + j, ue = Math.min(v.offsetHeight * 5, G), se = window.getComputedStyle(a), pe = parseInt(se.paddingTop, 10), fe = parseInt(se.paddingBottom, 10), ee = b.top + b.height / 2 - D, le = V - ee, ne = v.offsetHeight / 2, m = v.offsetTop + ne, I = F + _ + m, N = G - I;
|
|
396
|
-
if (I <= ee) {
|
|
397
|
-
const S = B.length > 0 && v === B[B.length - 1].ref.current;
|
|
398
|
-
s.style.bottom = "0px";
|
|
399
|
-
const x = f.clientHeight - a.offsetTop - a.offsetHeight, Z = Math.max(
|
|
400
|
-
le,
|
|
401
|
-
ne + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
402
|
-
(S ? fe : 0) + x + j
|
|
403
|
-
), $ = I + Z;
|
|
404
|
-
s.style.height = $ + "px";
|
|
405
|
-
} else {
|
|
406
|
-
const S = B.length > 0 && v === B[0].ref.current;
|
|
407
|
-
s.style.top = "0px";
|
|
408
|
-
const Z = Math.max(
|
|
409
|
-
ee,
|
|
410
|
-
F + a.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
411
|
-
(S ? pe : 0) + ne
|
|
412
|
-
) + N;
|
|
413
|
-
s.style.height = Z + "px", a.scrollTop = I - ee + a.offsetTop;
|
|
414
|
-
}
|
|
415
|
-
s.style.margin = `${D}px 0`, s.style.minHeight = ue + "px", s.style.maxHeight = V + "px", i == null || i(), requestAnimationFrame(() => R.current = !0);
|
|
416
|
-
}
|
|
417
|
-
}, [
|
|
418
|
-
P,
|
|
419
|
-
p.trigger,
|
|
420
|
-
p.valueNode,
|
|
421
|
-
s,
|
|
422
|
-
f,
|
|
423
|
-
a,
|
|
424
|
-
v,
|
|
425
|
-
C,
|
|
426
|
-
p.dir,
|
|
427
|
-
i
|
|
428
|
-
]);
|
|
429
|
-
z(() => h(), [h]);
|
|
430
|
-
const [A, O] = t.useState();
|
|
431
|
-
z(() => {
|
|
432
|
-
f && O(window.getComputedStyle(f).zIndex);
|
|
433
|
-
}, [f]);
|
|
434
|
-
const oe = t.useCallback(
|
|
435
|
-
(b) => {
|
|
436
|
-
b && T.current === !0 && (h(), u == null || u(), T.current = !1);
|
|
437
15
|
},
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
At,
|
|
442
|
-
{
|
|
443
|
-
scope: e,
|
|
444
|
-
contentWrapper: s,
|
|
445
|
-
shouldExpandOnScrollRef: R,
|
|
446
|
-
onScrollButtonChange: oe,
|
|
447
|
-
children: /* @__PURE__ */ d.jsx(
|
|
448
|
-
"div",
|
|
449
|
-
{
|
|
450
|
-
ref: o,
|
|
451
|
-
style: {
|
|
452
|
-
display: "flex",
|
|
453
|
-
flexDirection: "column",
|
|
454
|
-
position: "fixed",
|
|
455
|
-
zIndex: A
|
|
456
|
-
},
|
|
457
|
-
children: /* @__PURE__ */ d.jsx(
|
|
458
|
-
M.div,
|
|
459
|
-
{
|
|
460
|
-
...l,
|
|
461
|
-
ref: w,
|
|
462
|
-
style: {
|
|
463
|
-
// When we get the height of the content, it includes borders. If we were to set
|
|
464
|
-
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
465
|
-
boxSizing: "border-box",
|
|
466
|
-
// We need to ensure the content doesn't get taller than the wrapper
|
|
467
|
-
maxHeight: "100%",
|
|
468
|
-
...l.style
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
)
|
|
472
|
-
}
|
|
473
|
-
)
|
|
474
|
-
}
|
|
475
|
-
);
|
|
476
|
-
});
|
|
477
|
-
Be.displayName = Nt;
|
|
478
|
-
var Mt = "SelectPopperPosition", ge = t.forwardRef((n, c) => {
|
|
479
|
-
const {
|
|
480
|
-
__scopeSelect: e,
|
|
481
|
-
align: i = "start",
|
|
482
|
-
collisionPadding: l = D,
|
|
483
|
-
...p
|
|
484
|
-
} = n, r = de(e);
|
|
485
|
-
return /* @__PURE__ */ d.jsx(
|
|
486
|
-
ut,
|
|
487
|
-
{
|
|
488
|
-
...r,
|
|
489
|
-
...p,
|
|
490
|
-
ref: c,
|
|
491
|
-
align: i,
|
|
492
|
-
collisionPadding: l,
|
|
493
|
-
style: {
|
|
494
|
-
// Ensure border-box for floating-ui calculations
|
|
495
|
-
boxSizing: "border-box",
|
|
496
|
-
...p.style,
|
|
497
|
-
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
498
|
-
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
499
|
-
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
500
|
-
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
501
|
-
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
502
|
-
}
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "outline",
|
|
18
|
+
size: "default"
|
|
503
19
|
}
|
|
504
|
-
);
|
|
505
|
-
});
|
|
506
|
-
ge.displayName = Mt;
|
|
507
|
-
var [At, Ie] = te(Q, {}), Se = "SelectViewport", Ve = t.forwardRef(
|
|
508
|
-
(n, c) => {
|
|
509
|
-
const { __scopeSelect: e, nonce: i, ...l } = n, p = q(Se, e), r = Ie(Se, e), s = k(c, p.onViewportChange), o = t.useRef(0);
|
|
510
|
-
return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
511
|
-
/* @__PURE__ */ d.jsx(
|
|
512
|
-
"style",
|
|
513
|
-
{
|
|
514
|
-
dangerouslySetInnerHTML: {
|
|
515
|
-
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
516
|
-
},
|
|
517
|
-
nonce: i
|
|
518
|
-
}
|
|
519
|
-
),
|
|
520
|
-
/* @__PURE__ */ d.jsx(ie.Slot, { scope: e, children: /* @__PURE__ */ d.jsx(
|
|
521
|
-
M.div,
|
|
522
|
-
{
|
|
523
|
-
"data-radix-select-viewport": "",
|
|
524
|
-
role: "presentation",
|
|
525
|
-
...l,
|
|
526
|
-
ref: s,
|
|
527
|
-
style: {
|
|
528
|
-
// we use position: 'relative' here on the `viewport` so that when we call
|
|
529
|
-
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
530
|
-
// (independent of the scrollUpButton).
|
|
531
|
-
position: "relative",
|
|
532
|
-
flex: 1,
|
|
533
|
-
// Viewport should only be scrollable in the vertical direction.
|
|
534
|
-
// This won't work in vertical writing modes, so we'll need to
|
|
535
|
-
// revisit this if/when that is supported
|
|
536
|
-
// https://developer.chrome.com/blog/vertical-form-controls
|
|
537
|
-
overflow: "hidden auto",
|
|
538
|
-
...l.style
|
|
539
|
-
},
|
|
540
|
-
onScroll: E(l.onScroll, (f) => {
|
|
541
|
-
const g = f.currentTarget, { contentWrapper: w, shouldExpandOnScrollRef: P } = r;
|
|
542
|
-
if (P != null && P.current && w) {
|
|
543
|
-
const R = Math.abs(o.current - g.scrollTop);
|
|
544
|
-
if (R > 0) {
|
|
545
|
-
const T = window.innerHeight - D * 2, a = parseFloat(w.style.minHeight), v = parseFloat(w.style.height), C = Math.max(a, v);
|
|
546
|
-
if (C < T) {
|
|
547
|
-
const u = C + R, h = Math.min(T, u), A = u - h;
|
|
548
|
-
w.style.height = h + "px", w.style.bottom === "0px" && (g.scrollTop = A > 0 ? A : 0, w.style.justifyContent = "flex-end");
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
o.current = g.scrollTop;
|
|
553
|
-
})
|
|
554
|
-
}
|
|
555
|
-
) })
|
|
556
|
-
] });
|
|
557
|
-
}
|
|
558
|
-
);
|
|
559
|
-
Ve.displayName = Se;
|
|
560
|
-
var He = "SelectGroup", [Ot, Dt] = te(He), Fe = t.forwardRef(
|
|
561
|
-
(n, c) => {
|
|
562
|
-
const { __scopeSelect: e, ...i } = n, l = ye();
|
|
563
|
-
return /* @__PURE__ */ d.jsx(Ot, { scope: e, id: l, children: /* @__PURE__ */ d.jsx(M.div, { role: "group", "aria-labelledby": l, ...i, ref: c }) });
|
|
564
20
|
}
|
|
565
|
-
)
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
);
|
|
573
|
-
We.displayName = Ue;
|
|
574
|
-
var ce = "SelectItem", [Lt, Ke] = te(ce), Ge = t.forwardRef(
|
|
575
|
-
(n, c) => {
|
|
576
|
-
const {
|
|
577
|
-
__scopeSelect: e,
|
|
578
|
-
value: i,
|
|
579
|
-
disabled: l = !1,
|
|
580
|
-
textValue: p,
|
|
581
|
-
...r
|
|
582
|
-
} = n, s = Y(ce, e), o = q(ce, e), f = s.value === i, [g, w] = t.useState(p ?? ""), [P, R] = t.useState(!1), T = k(
|
|
583
|
-
c,
|
|
584
|
-
(u) => {
|
|
585
|
-
var h;
|
|
586
|
-
return (h = o.itemRefCallback) == null ? void 0 : h.call(o, u, i, l);
|
|
587
|
-
}
|
|
588
|
-
), a = ye(), v = t.useRef("touch"), C = () => {
|
|
589
|
-
l || (s.onValueChange(i), s.onOpenChange(!1));
|
|
590
|
-
};
|
|
591
|
-
if (i === "")
|
|
592
|
-
throw new Error(
|
|
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."
|
|
594
|
-
);
|
|
595
|
-
return /* @__PURE__ */ d.jsx(
|
|
596
|
-
Lt,
|
|
597
|
-
{
|
|
598
|
-
scope: e,
|
|
599
|
-
value: i,
|
|
600
|
-
disabled: l,
|
|
601
|
-
textId: a,
|
|
602
|
-
isSelected: f,
|
|
603
|
-
onItemTextChange: t.useCallback((u) => {
|
|
604
|
-
w((h) => h || ((u == null ? void 0 : u.textContent) ?? "").trim());
|
|
605
|
-
}, []),
|
|
606
|
-
children: /* @__PURE__ */ d.jsx(
|
|
607
|
-
ie.ItemSlot,
|
|
608
|
-
{
|
|
609
|
-
scope: e,
|
|
610
|
-
value: i,
|
|
611
|
-
disabled: l,
|
|
612
|
-
textValue: g,
|
|
613
|
-
children: /* @__PURE__ */ d.jsx(
|
|
614
|
-
M.div,
|
|
615
|
-
{
|
|
616
|
-
role: "option",
|
|
617
|
-
"aria-labelledby": a,
|
|
618
|
-
"data-highlighted": P ? "" : void 0,
|
|
619
|
-
"aria-selected": f && P,
|
|
620
|
-
"data-state": f ? "checked" : "unchecked",
|
|
621
|
-
"aria-disabled": l || void 0,
|
|
622
|
-
"data-disabled": l ? "" : void 0,
|
|
623
|
-
tabIndex: l ? void 0 : -1,
|
|
624
|
-
...r,
|
|
625
|
-
ref: T,
|
|
626
|
-
onFocus: E(r.onFocus, () => R(!0)),
|
|
627
|
-
onBlur: E(r.onBlur, () => R(!1)),
|
|
628
|
-
onClick: E(r.onClick, () => {
|
|
629
|
-
v.current !== "mouse" && C();
|
|
630
|
-
}),
|
|
631
|
-
onPointerUp: E(r.onPointerUp, () => {
|
|
632
|
-
v.current === "mouse" && C();
|
|
633
|
-
}),
|
|
634
|
-
onPointerDown: E(r.onPointerDown, (u) => {
|
|
635
|
-
v.current = u.pointerType;
|
|
636
|
-
}),
|
|
637
|
-
onPointerMove: E(r.onPointerMove, (u) => {
|
|
638
|
-
var h;
|
|
639
|
-
v.current = u.pointerType, l ? (h = o.onItemLeave) == null || h.call(o) : v.current === "mouse" && u.currentTarget.focus({ preventScroll: !0 });
|
|
640
|
-
}),
|
|
641
|
-
onPointerLeave: E(r.onPointerLeave, (u) => {
|
|
642
|
-
var h;
|
|
643
|
-
u.currentTarget === document.activeElement && ((h = o.onItemLeave) == null || h.call(o));
|
|
644
|
-
}),
|
|
645
|
-
onKeyDown: E(r.onKeyDown, (u) => {
|
|
646
|
-
var A;
|
|
647
|
-
((A = o.searchRef) == null ? void 0 : A.current) !== "" && u.key === " " || (Ct.includes(u.key) && C(), u.key === " " && u.preventDefault());
|
|
648
|
-
})
|
|
649
|
-
}
|
|
650
|
-
)
|
|
651
|
-
}
|
|
652
|
-
)
|
|
653
|
-
}
|
|
654
|
-
);
|
|
655
|
-
}
|
|
656
|
-
);
|
|
657
|
-
Ge.displayName = ce;
|
|
658
|
-
var re = "SelectItemText", ze = t.forwardRef(
|
|
659
|
-
(n, c) => {
|
|
660
|
-
const { __scopeSelect: e, className: i, style: l, ...p } = n, r = Y(re, e), s = q(re, e), o = Ke(re, e), f = Pt(re, e), [g, w] = t.useState(null), P = k(
|
|
661
|
-
c,
|
|
662
|
-
(C) => w(C),
|
|
663
|
-
o.onItemTextChange,
|
|
664
|
-
(C) => {
|
|
665
|
-
var u;
|
|
666
|
-
return (u = s.itemTextRefCallback) == null ? void 0 : u.call(s, C, o.value, o.disabled);
|
|
667
|
-
}
|
|
668
|
-
), R = g == null ? void 0 : g.textContent, T = t.useMemo(
|
|
669
|
-
() => /* @__PURE__ */ d.jsx("option", { value: o.value, disabled: o.disabled, children: R }, o.value),
|
|
670
|
-
[o.disabled, o.value, R]
|
|
671
|
-
), { onNativeOptionAdd: a, onNativeOptionRemove: v } = f;
|
|
672
|
-
return z(() => (a(T), () => v(T)), [a, v, T]), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
673
|
-
/* @__PURE__ */ d.jsx(M.span, { id: o.textId, ...p, ref: P }),
|
|
674
|
-
o.isSelected && r.valueNode && !r.valueNodeHasChildren ? Re.createPortal(p.children, r.valueNode) : null
|
|
675
|
-
] });
|
|
676
|
-
}
|
|
677
|
-
);
|
|
678
|
-
ze.displayName = re;
|
|
679
|
-
var Ye = "SelectItemIndicator", qe = t.forwardRef(
|
|
680
|
-
(n, c) => {
|
|
681
|
-
const { __scopeSelect: e, ...i } = n;
|
|
682
|
-
return Ke(Ye, e).isSelected ? /* @__PURE__ */ d.jsx(M.span, { "aria-hidden": !0, ...i, ref: c }) : null;
|
|
683
|
-
}
|
|
684
|
-
);
|
|
685
|
-
qe.displayName = Ye;
|
|
686
|
-
var xe = "SelectScrollUpButton", Xe = t.forwardRef((n, c) => {
|
|
687
|
-
const e = q(xe, n.__scopeSelect), i = Ie(xe, n.__scopeSelect), [l, p] = t.useState(!1), r = k(c, i.onScrollButtonChange);
|
|
688
|
-
return z(() => {
|
|
689
|
-
if (e.viewport && e.isPositioned) {
|
|
690
|
-
let s = function() {
|
|
691
|
-
const f = o.scrollTop > 0;
|
|
692
|
-
p(f);
|
|
693
|
-
};
|
|
694
|
-
const o = e.viewport;
|
|
695
|
-
return s(), o.addEventListener("scroll", s), () => o.removeEventListener("scroll", s);
|
|
696
|
-
}
|
|
697
|
-
}, [e.viewport, e.isPositioned]), l ? /* @__PURE__ */ d.jsx(
|
|
698
|
-
$e,
|
|
699
|
-
{
|
|
700
|
-
...n,
|
|
701
|
-
ref: r,
|
|
702
|
-
onAutoScroll: () => {
|
|
703
|
-
const { viewport: s, selectedItem: o } = e;
|
|
704
|
-
s && o && (s.scrollTop = s.scrollTop - o.offsetHeight);
|
|
21
|
+
), n = t(
|
|
22
|
+
"bg-white text-neutral-black-1 rounded-md border border-neutral-black-4 shadow-md overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
23
|
+
{
|
|
24
|
+
variants: {
|
|
25
|
+
position: {
|
|
26
|
+
popper: "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1",
|
|
27
|
+
"item-aligned": ""
|
|
705
28
|
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
position: "popper"
|
|
706
32
|
}
|
|
707
|
-
) : null;
|
|
708
|
-
});
|
|
709
|
-
Xe.displayName = xe;
|
|
710
|
-
var we = "SelectScrollDownButton", Ze = t.forwardRef((n, c) => {
|
|
711
|
-
const e = q(we, n.__scopeSelect), i = Ie(we, n.__scopeSelect), [l, p] = t.useState(!1), r = k(c, i.onScrollButtonChange);
|
|
712
|
-
return z(() => {
|
|
713
|
-
if (e.viewport && e.isPositioned) {
|
|
714
|
-
let s = function() {
|
|
715
|
-
const f = o.scrollHeight - o.clientHeight, g = Math.ceil(o.scrollTop) < f;
|
|
716
|
-
p(g);
|
|
717
|
-
};
|
|
718
|
-
const o = e.viewport;
|
|
719
|
-
return s(), o.addEventListener("scroll", s), () => o.removeEventListener("scroll", s);
|
|
720
|
-
}
|
|
721
|
-
}, [e.viewport, e.isPositioned]), l ? /* @__PURE__ */ d.jsx(
|
|
722
|
-
$e,
|
|
723
|
-
{
|
|
724
|
-
...n,
|
|
725
|
-
ref: r,
|
|
726
|
-
onAutoScroll: () => {
|
|
727
|
-
const { viewport: s, selectedItem: o } = e;
|
|
728
|
-
s && o && (s.scrollTop = s.scrollTop + o.offsetHeight);
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
) : null;
|
|
732
|
-
});
|
|
733
|
-
Ze.displayName = we;
|
|
734
|
-
var $e = t.forwardRef((n, c) => {
|
|
735
|
-
const { __scopeSelect: e, onAutoScroll: i, ...l } = n, p = q("SelectScrollButton", e), r = t.useRef(null), s = ae(e), o = t.useCallback(() => {
|
|
736
|
-
r.current !== null && (window.clearInterval(r.current), r.current = null);
|
|
737
|
-
}, []);
|
|
738
|
-
return t.useEffect(() => () => o(), [o]), z(() => {
|
|
739
|
-
var g;
|
|
740
|
-
const f = s().find((w) => w.ref.current === document.activeElement);
|
|
741
|
-
(g = f == null ? void 0 : f.ref.current) == null || g.scrollIntoView({ block: "nearest" });
|
|
742
|
-
}, [s]), /* @__PURE__ */ d.jsx(
|
|
743
|
-
M.div,
|
|
744
|
-
{
|
|
745
|
-
"aria-hidden": !0,
|
|
746
|
-
...l,
|
|
747
|
-
ref: c,
|
|
748
|
-
style: { flexShrink: 0, ...l.style },
|
|
749
|
-
onPointerDown: E(l.onPointerDown, () => {
|
|
750
|
-
r.current === null && (r.current = window.setInterval(i, 50));
|
|
751
|
-
}),
|
|
752
|
-
onPointerMove: E(l.onPointerMove, () => {
|
|
753
|
-
var f;
|
|
754
|
-
(f = p.onItemLeave) == null || f.call(p), r.current === null && (r.current = window.setInterval(i, 50));
|
|
755
|
-
}),
|
|
756
|
-
onPointerLeave: E(l.onPointerLeave, () => {
|
|
757
|
-
o();
|
|
758
|
-
})
|
|
759
|
-
}
|
|
760
|
-
);
|
|
761
|
-
}), jt = "SelectSeparator", Je = t.forwardRef(
|
|
762
|
-
(n, c) => {
|
|
763
|
-
const { __scopeSelect: e, ...i } = n;
|
|
764
|
-
return /* @__PURE__ */ d.jsx(M.div, { "aria-hidden": !0, ...i, ref: c });
|
|
765
|
-
}
|
|
766
|
-
);
|
|
767
|
-
Je.displayName = jt;
|
|
768
|
-
var Ce = "SelectArrow", kt = t.forwardRef(
|
|
769
|
-
(n, c) => {
|
|
770
|
-
const { __scopeSelect: e, ...i } = n, l = de(e), p = Y(Ce, e), r = q(Ce, e);
|
|
771
|
-
return p.open && r.position === "popper" ? /* @__PURE__ */ d.jsx(pt, { ...l, ...i, ref: c }) : null;
|
|
772
|
-
}
|
|
773
|
-
);
|
|
774
|
-
kt.displayName = Ce;
|
|
775
|
-
var Bt = "SelectBubbleInput", Qe = t.forwardRef(
|
|
776
|
-
({ __scopeSelect: n, value: c, ...e }, i) => {
|
|
777
|
-
const l = t.useRef(null), p = k(i, l), r = vt(c);
|
|
778
|
-
return t.useEffect(() => {
|
|
779
|
-
const s = l.current;
|
|
780
|
-
if (!s) return;
|
|
781
|
-
const o = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
782
|
-
o,
|
|
783
|
-
"value"
|
|
784
|
-
).set;
|
|
785
|
-
if (r !== c && g) {
|
|
786
|
-
const w = new Event("change", { bubbles: !0 });
|
|
787
|
-
g.call(s, c), s.dispatchEvent(w);
|
|
788
|
-
}
|
|
789
|
-
}, [r, c]), /* @__PURE__ */ d.jsx(
|
|
790
|
-
M.select,
|
|
791
|
-
{
|
|
792
|
-
...e,
|
|
793
|
-
style: { ...gt, ...e.style },
|
|
794
|
-
ref: p,
|
|
795
|
-
defaultValue: c
|
|
796
|
-
}
|
|
797
|
-
);
|
|
798
33
|
}
|
|
799
34
|
);
|
|
800
|
-
Qe.displayName = Bt;
|
|
801
|
-
function et(n) {
|
|
802
|
-
return n === "" || n === void 0;
|
|
803
|
-
}
|
|
804
|
-
function tt(n) {
|
|
805
|
-
const c = ht(n), e = t.useRef(""), i = t.useRef(0), l = t.useCallback(
|
|
806
|
-
(r) => {
|
|
807
|
-
const s = e.current + r;
|
|
808
|
-
c(s), function o(f) {
|
|
809
|
-
e.current = f, window.clearTimeout(i.current), f !== "" && (i.current = window.setTimeout(() => o(""), 1e3));
|
|
810
|
-
}(s);
|
|
811
|
-
},
|
|
812
|
-
[c]
|
|
813
|
-
), p = t.useCallback(() => {
|
|
814
|
-
e.current = "", window.clearTimeout(i.current);
|
|
815
|
-
}, []);
|
|
816
|
-
return t.useEffect(() => () => window.clearTimeout(i.current), []), [e, l, p];
|
|
817
|
-
}
|
|
818
|
-
function ot(n, c, e) {
|
|
819
|
-
const l = c.length > 1 && Array.from(c).every((f) => f === c[0]) ? c[0] : c, p = e ? n.indexOf(e) : -1;
|
|
820
|
-
let r = Vt(n, Math.max(p, 0));
|
|
821
|
-
l.length === 1 && (r = r.filter((f) => f !== e));
|
|
822
|
-
const o = r.find(
|
|
823
|
-
(f) => f.textValue.toLowerCase().startsWith(l.toLowerCase())
|
|
824
|
-
);
|
|
825
|
-
return o !== e ? o : void 0;
|
|
826
|
-
}
|
|
827
|
-
function Vt(n, c) {
|
|
828
|
-
return n.map((e, i) => n[(c + i) % n.length]);
|
|
829
|
-
}
|
|
830
|
-
var ao = be, uo = Ne, po = Ae, fo = Oe, mo = De, ho = Le, vo = Ve, go = Fe, So = We, xo = Ge, wo = ze, Co = qe, yo = Xe, Io = Ze, To = Je;
|
|
831
35
|
export {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
fo as Icon,
|
|
835
|
-
xo as Item,
|
|
836
|
-
Co as ItemIndicator,
|
|
837
|
-
wo as ItemText,
|
|
838
|
-
So as Label,
|
|
839
|
-
mo as Portal,
|
|
840
|
-
ao as Root,
|
|
841
|
-
Io as ScrollDownButton,
|
|
842
|
-
yo as ScrollUpButton,
|
|
843
|
-
be as Select,
|
|
844
|
-
kt as SelectArrow,
|
|
845
|
-
Le as SelectContent,
|
|
846
|
-
Fe as SelectGroup,
|
|
847
|
-
Oe as SelectIcon,
|
|
848
|
-
Ge as SelectItem,
|
|
849
|
-
qe as SelectItemIndicator,
|
|
850
|
-
ze as SelectItemText,
|
|
851
|
-
We as SelectLabel,
|
|
852
|
-
De as SelectPortal,
|
|
853
|
-
Ze as SelectScrollDownButton,
|
|
854
|
-
Xe as SelectScrollUpButton,
|
|
855
|
-
Je as SelectSeparator,
|
|
856
|
-
Ne as SelectTrigger,
|
|
857
|
-
Ae as SelectValue,
|
|
858
|
-
Ve as SelectViewport,
|
|
859
|
-
To as Separator,
|
|
860
|
-
uo as Trigger,
|
|
861
|
-
po as Value,
|
|
862
|
-
vo as Viewport,
|
|
863
|
-
io as createSelectScope
|
|
36
|
+
n as selectContentVariants,
|
|
37
|
+
a as selectTriggerVariants
|
|
864
38
|
};
|