@still-forest/canopy 0.41.0 → 0.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{Switch-CPNkbAg3.js → Switch--oDkbenp.js} +534 -529
- package/dist/forms.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-B0GD0xBr.js";
|
|
2
|
-
import { e as Q, J as ve, aa as dt, K as te, M as
|
|
2
|
+
import { e as Q, J as ve, aa as dt, K as te, M as j, U as P, ab as V, G as Me, H as de, ac as yt, B as Ae, Q as Ct, ad as De, L as ue, ae as It, af as Rt, ag as kt, ah as or, b as Oe, c as Pe, ai as Et, aj as ar, ak as sr, al as re, am as ir, an as cr, ao as lr, ap as dr, aq as ur, ar as pr, as as fr, at as mr, au as hr, av as vr, aw as _t, R as gr, P as xr, O as br, w as Sr, ax as Re, ay as wr } from "./sidebar-5TOTH-eb.js";
|
|
3
3
|
import * as c from "react";
|
|
4
|
-
import { useState as ke, useEffect as jt, useRef as
|
|
5
|
-
import { F as pe, G as
|
|
6
|
-
import { T as
|
|
7
|
-
import { L as
|
|
4
|
+
import { useState as ke, useEffect as jt, useRef as yr, useMemo as Cr, useId as Ir } from "react";
|
|
5
|
+
import { F as pe, G as Rr } from "./Layout-CvVv48kM.js";
|
|
6
|
+
import { T as Pt } from "./Heading-DjVutKs1.js";
|
|
7
|
+
import { L as kr } from "./Loader-DW_x9PM7.js";
|
|
8
8
|
import { c as B } from "./index-CRiPKpXj.js";
|
|
9
|
-
import * as
|
|
9
|
+
import * as Nt from "react-dom";
|
|
10
10
|
/**
|
|
11
11
|
* @license lucide-react v0.544.0 - ISC
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the ISC license.
|
|
14
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const Er = [
|
|
17
17
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
18
18
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
19
19
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
20
20
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
21
|
-
],
|
|
21
|
+
], _r = Q("calendar", Er);
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.544.0 - ISC
|
|
24
24
|
*
|
|
@@ -32,31 +32,31 @@ const jr = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], ut = Q("check",
|
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const Pr = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Nr = Q("chevron-up", Pr);
|
|
36
36
|
/**
|
|
37
37
|
* @license lucide-react v0.544.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
41
|
*/
|
|
42
|
-
const
|
|
42
|
+
const Tr = [
|
|
43
43
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
44
44
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
45
|
-
],
|
|
45
|
+
], Mr = Q("chevrons-up-down", Tr);
|
|
46
46
|
/**
|
|
47
47
|
* @license lucide-react v0.544.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
51
|
*/
|
|
52
|
-
const
|
|
52
|
+
const Ar = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Dr = Q("circle", Ar);
|
|
53
53
|
/**
|
|
54
54
|
* @license lucide-react v0.544.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/
|
|
59
|
-
const
|
|
59
|
+
const Or = [
|
|
60
60
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
61
61
|
[
|
|
62
62
|
"path",
|
|
@@ -66,14 +66,14 @@ const Dr = [
|
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
68
|
["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
|
|
69
|
-
],
|
|
69
|
+
], Lr = Q("clipboard-check", Or);
|
|
70
70
|
/**
|
|
71
71
|
* @license lucide-react v0.544.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
75
|
*/
|
|
76
|
-
const
|
|
76
|
+
const Br = [
|
|
77
77
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
78
78
|
[
|
|
79
79
|
"path",
|
|
@@ -82,14 +82,14 @@ const Lr = [
|
|
|
82
82
|
key: "116196"
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
|
-
],
|
|
85
|
+
], Fr = Q("clipboard", Br);
|
|
86
86
|
/**
|
|
87
87
|
* @license lucide-react v0.544.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/
|
|
92
|
-
const
|
|
92
|
+
const $r = [
|
|
93
93
|
[
|
|
94
94
|
"path",
|
|
95
95
|
{
|
|
@@ -106,14 +106,14 @@ const Fr = [
|
|
|
106
106
|
}
|
|
107
107
|
],
|
|
108
108
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
109
|
-
],
|
|
109
|
+
], Vr = Q("eye-off", $r);
|
|
110
110
|
/**
|
|
111
111
|
* @license lucide-react v0.544.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
115
|
*/
|
|
116
|
-
const
|
|
116
|
+
const Kr = [
|
|
117
117
|
[
|
|
118
118
|
"path",
|
|
119
119
|
{
|
|
@@ -122,14 +122,14 @@ const Vr = [
|
|
|
122
122
|
}
|
|
123
123
|
],
|
|
124
124
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
125
|
-
],
|
|
125
|
+
], Hr = Q("eye", Kr);
|
|
126
126
|
/**
|
|
127
127
|
* @license lucide-react v0.544.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
131
|
*/
|
|
132
|
-
const
|
|
132
|
+
const Ur = [
|
|
133
133
|
[
|
|
134
134
|
"path",
|
|
135
135
|
{
|
|
@@ -139,24 +139,24 @@ const Hr = [
|
|
|
139
139
|
],
|
|
140
140
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
141
141
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
142
|
-
],
|
|
142
|
+
], Gr = Q("save", Ur);
|
|
143
143
|
/**
|
|
144
144
|
* @license lucide-react v0.544.0 - ISC
|
|
145
145
|
*
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
148
|
*/
|
|
149
|
-
const
|
|
149
|
+
const zr = [
|
|
150
150
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
151
151
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
152
|
-
],
|
|
152
|
+
], Wr = Q("search", zr);
|
|
153
153
|
/**
|
|
154
154
|
* @license lucide-react v0.544.0 - ISC
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the ISC license.
|
|
157
157
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
158
|
*/
|
|
159
|
-
const
|
|
159
|
+
const qr = [
|
|
160
160
|
[
|
|
161
161
|
"path",
|
|
162
162
|
{
|
|
@@ -165,28 +165,28 @@ const Wr = [
|
|
|
165
165
|
}
|
|
166
166
|
],
|
|
167
167
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
168
|
-
], qe = Q("send",
|
|
168
|
+
], qe = Q("send", qr);
|
|
169
169
|
/**
|
|
170
170
|
* @license lucide-react v0.544.0 - ISC
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
174
|
*/
|
|
175
|
-
const
|
|
175
|
+
const Yr = [
|
|
176
176
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
177
177
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
178
178
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
179
179
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
180
180
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
181
|
-
],
|
|
182
|
-
var Ye = "rovingFocusGroup.onEntryFocus",
|
|
181
|
+
], Xr = Q("trash-2", Yr);
|
|
182
|
+
var Ye = "rovingFocusGroup.onEntryFocus", Zr = { bubbles: !1, cancelable: !0 }, Ee = "RovingFocusGroup", [Qe, Tt, Jr] = dt(Ee), [Qr, Mt] = ve(
|
|
183
183
|
Ee,
|
|
184
|
-
[
|
|
185
|
-
), [
|
|
186
|
-
(e, n) => /* @__PURE__ */ a.jsx(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(
|
|
184
|
+
[Jr]
|
|
185
|
+
), [eo, to] = Qr(Ee), At = c.forwardRef(
|
|
186
|
+
(e, n) => /* @__PURE__ */ a.jsx(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a.jsx(no, { ...e, ref: n }) }) })
|
|
187
187
|
);
|
|
188
|
-
|
|
189
|
-
var
|
|
188
|
+
At.displayName = Ee;
|
|
189
|
+
var no = c.forwardRef((e, n) => {
|
|
190
190
|
const {
|
|
191
191
|
__scopeRovingFocusGroup: t,
|
|
192
192
|
orientation: o,
|
|
@@ -198,39 +198,39 @@ var to = c.forwardRef((e, n) => {
|
|
|
198
198
|
onEntryFocus: u,
|
|
199
199
|
preventScrollOnEntryFocus: p = !1,
|
|
200
200
|
...f
|
|
201
|
-
} = e, g = c.useRef(null), x = V(n, g), S = Me(i), [
|
|
201
|
+
} = e, g = c.useRef(null), x = V(n, g), S = Me(i), [h, m] = de({
|
|
202
202
|
prop: s,
|
|
203
203
|
defaultProp: l ?? null,
|
|
204
204
|
onChange: d,
|
|
205
205
|
caller: Ee
|
|
206
|
-
}), [b, w] = c.useState(!1), y =
|
|
206
|
+
}), [b, w] = c.useState(!1), y = yt(u), R = Tt(t), A = c.useRef(!1), [N, _] = c.useState(0);
|
|
207
207
|
return c.useEffect(() => {
|
|
208
208
|
const L = g.current;
|
|
209
209
|
if (L)
|
|
210
210
|
return L.addEventListener(Ye, y), () => L.removeEventListener(Ye, y);
|
|
211
211
|
}, [y]), /* @__PURE__ */ a.jsx(
|
|
212
|
-
|
|
212
|
+
eo,
|
|
213
213
|
{
|
|
214
214
|
scope: t,
|
|
215
215
|
orientation: o,
|
|
216
216
|
dir: S,
|
|
217
217
|
loop: r,
|
|
218
|
-
currentTabStopId:
|
|
218
|
+
currentTabStopId: h,
|
|
219
219
|
onItemFocus: c.useCallback(
|
|
220
|
-
(L) =>
|
|
221
|
-
[
|
|
220
|
+
(L) => m(L),
|
|
221
|
+
[m]
|
|
222
222
|
),
|
|
223
223
|
onItemShiftTab: c.useCallback(() => w(!0), []),
|
|
224
224
|
onFocusableItemAdd: c.useCallback(
|
|
225
|
-
() =>
|
|
225
|
+
() => _((L) => L + 1),
|
|
226
226
|
[]
|
|
227
227
|
),
|
|
228
228
|
onFocusableItemRemove: c.useCallback(
|
|
229
|
-
() =>
|
|
229
|
+
() => _((L) => L - 1),
|
|
230
230
|
[]
|
|
231
231
|
),
|
|
232
232
|
children: /* @__PURE__ */ a.jsx(
|
|
233
|
-
|
|
233
|
+
j.div,
|
|
234
234
|
{
|
|
235
235
|
tabIndex: b || N === 0 ? -1 : 0,
|
|
236
236
|
"data-orientation": o,
|
|
@@ -243,12 +243,12 @@ var to = c.forwardRef((e, n) => {
|
|
|
243
243
|
onFocus: P(e.onFocus, (L) => {
|
|
244
244
|
const Z = !A.current;
|
|
245
245
|
if (L.target === L.currentTarget && Z && !b) {
|
|
246
|
-
const z = new CustomEvent(Ye,
|
|
246
|
+
const z = new CustomEvent(Ye, Zr);
|
|
247
247
|
if (L.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
|
|
248
|
-
const D = R().filter((O) => O.focusable), K = D.find((O) => O.active), X = D.find((O) => O.id ===
|
|
248
|
+
const D = R().filter((O) => O.focusable), K = D.find((O) => O.active), X = D.find((O) => O.id === h), U = [K, X, ...D].filter(
|
|
249
249
|
Boolean
|
|
250
250
|
).map((O) => O.ref.current);
|
|
251
|
-
|
|
251
|
+
Lt(U, p);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
A.current = !1;
|
|
@@ -258,7 +258,7 @@ var to = c.forwardRef((e, n) => {
|
|
|
258
258
|
)
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
|
-
}),
|
|
261
|
+
}), Dt = "RovingFocusGroupItem", Ot = c.forwardRef(
|
|
262
262
|
(e, n) => {
|
|
263
263
|
const {
|
|
264
264
|
__scopeRovingFocusGroup: t,
|
|
@@ -267,7 +267,7 @@ var to = c.forwardRef((e, n) => {
|
|
|
267
267
|
tabStopId: i,
|
|
268
268
|
children: s,
|
|
269
269
|
...l
|
|
270
|
-
} = e, d = te(), u = i || d, p =
|
|
270
|
+
} = e, d = te(), u = i || d, p = to(Dt, t), f = p.currentTabStopId === u, g = Tt(t), { onFocusableItemAdd: x, onFocusableItemRemove: S, currentTabStopId: h } = p;
|
|
271
271
|
return c.useEffect(() => {
|
|
272
272
|
if (o)
|
|
273
273
|
return x(), () => S();
|
|
@@ -279,45 +279,45 @@ var to = c.forwardRef((e, n) => {
|
|
|
279
279
|
focusable: o,
|
|
280
280
|
active: r,
|
|
281
281
|
children: /* @__PURE__ */ a.jsx(
|
|
282
|
-
|
|
282
|
+
j.span,
|
|
283
283
|
{
|
|
284
284
|
tabIndex: f ? 0 : -1,
|
|
285
285
|
"data-orientation": p.orientation,
|
|
286
286
|
...l,
|
|
287
287
|
ref: n,
|
|
288
|
-
onMouseDown: P(e.onMouseDown, (
|
|
289
|
-
o ? p.onItemFocus(u) :
|
|
288
|
+
onMouseDown: P(e.onMouseDown, (m) => {
|
|
289
|
+
o ? p.onItemFocus(u) : m.preventDefault();
|
|
290
290
|
}),
|
|
291
291
|
onFocus: P(e.onFocus, () => p.onItemFocus(u)),
|
|
292
|
-
onKeyDown: P(e.onKeyDown, (
|
|
293
|
-
if (
|
|
292
|
+
onKeyDown: P(e.onKeyDown, (m) => {
|
|
293
|
+
if (m.key === "Tab" && m.shiftKey) {
|
|
294
294
|
p.onItemShiftTab();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
if (
|
|
298
|
-
const b =
|
|
297
|
+
if (m.target !== m.currentTarget) return;
|
|
298
|
+
const b = ao(m, p.orientation, p.dir);
|
|
299
299
|
if (b !== void 0) {
|
|
300
|
-
if (
|
|
301
|
-
|
|
300
|
+
if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
|
|
301
|
+
m.preventDefault();
|
|
302
302
|
let y = g().filter((R) => R.focusable).map((R) => R.ref.current);
|
|
303
303
|
if (b === "last") y.reverse();
|
|
304
304
|
else if (b === "prev" || b === "next") {
|
|
305
305
|
b === "prev" && y.reverse();
|
|
306
|
-
const R = y.indexOf(
|
|
307
|
-
y = p.loop ?
|
|
306
|
+
const R = y.indexOf(m.currentTarget);
|
|
307
|
+
y = p.loop ? so(y, R + 1) : y.slice(R + 1);
|
|
308
308
|
}
|
|
309
|
-
setTimeout(() =>
|
|
309
|
+
setTimeout(() => Lt(y));
|
|
310
310
|
}
|
|
311
311
|
}),
|
|
312
|
-
children: typeof s == "function" ? s({ isCurrentTabStop: f, hasTabStop:
|
|
312
|
+
children: typeof s == "function" ? s({ isCurrentTabStop: f, hasTabStop: h != null }) : s
|
|
313
313
|
}
|
|
314
314
|
)
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
317
|
}
|
|
318
318
|
);
|
|
319
|
-
|
|
320
|
-
var
|
|
319
|
+
Ot.displayName = Dt;
|
|
320
|
+
var ro = {
|
|
321
321
|
ArrowLeft: "prev",
|
|
322
322
|
ArrowUp: "prev",
|
|
323
323
|
ArrowRight: "next",
|
|
@@ -327,28 +327,28 @@ var no = {
|
|
|
327
327
|
PageDown: "last",
|
|
328
328
|
End: "last"
|
|
329
329
|
};
|
|
330
|
-
function
|
|
330
|
+
function oo(e, n) {
|
|
331
331
|
return n !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
const o =
|
|
333
|
+
function ao(e, n, t) {
|
|
334
|
+
const o = oo(e.key, t);
|
|
335
335
|
if (!(n === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(n === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
336
|
-
return
|
|
336
|
+
return ro[o];
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Lt(e, n = !1) {
|
|
339
339
|
const t = document.activeElement;
|
|
340
340
|
for (const o of e)
|
|
341
341
|
if (o === t || (o.focus({ preventScroll: n }), document.activeElement !== t)) return;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function so(e, n) {
|
|
344
344
|
return e.map((t, o) => e[(n + o) % e.length]);
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
const
|
|
346
|
+
var io = At, co = Ot;
|
|
347
|
+
const _s = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.jsx(
|
|
348
348
|
Ae,
|
|
349
349
|
{
|
|
350
350
|
disabled: e,
|
|
351
|
-
icon: /* @__PURE__ */ a.jsx(
|
|
351
|
+
icon: /* @__PURE__ */ a.jsx(Xr, {}),
|
|
352
352
|
onClick: n,
|
|
353
353
|
variant: "outline",
|
|
354
354
|
...t,
|
|
@@ -358,9 +358,9 @@ const js = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.js
|
|
|
358
358
|
), gt = {
|
|
359
359
|
default: { label: "Submit", submittingLabel: "Submitting", IconComponent: qe },
|
|
360
360
|
submit: { label: "Submit", submittingLabel: "Submitting", IconComponent: qe },
|
|
361
|
-
save: { label: "Save", submittingLabel: "Saving", IconComponent:
|
|
361
|
+
save: { label: "Save", submittingLabel: "Saving", IconComponent: Gr },
|
|
362
362
|
send: { label: "Send", submittingLabel: "Sending", IconComponent: qe }
|
|
363
|
-
},
|
|
363
|
+
}, js = ({
|
|
364
364
|
submitting: e = !1,
|
|
365
365
|
disabled: n = !1,
|
|
366
366
|
submittingIcon: t,
|
|
@@ -373,7 +373,7 @@ const js = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.js
|
|
|
373
373
|
}) => {
|
|
374
374
|
if (!gt[o])
|
|
375
375
|
throw new Error(`Invalid action: ${o}`);
|
|
376
|
-
const u = gt[o], p = r || u.label, f = i || u.submittingLabel, g = s || u.IconComponent, x = e ? /* @__PURE__ */ a.jsx(
|
|
376
|
+
const u = gt[o], p = r || u.label, f = i || u.submittingLabel, g = s || u.IconComponent, x = e ? /* @__PURE__ */ a.jsx(kr, { icon: t }) : /* @__PURE__ */ a.jsx(g, {});
|
|
377
377
|
return /* @__PURE__ */ a.jsx(
|
|
378
378
|
Ae,
|
|
379
379
|
{
|
|
@@ -386,12 +386,12 @@ const js = ({ disabled: e = !1, handleDelete: n, ...t }) => /* @__PURE__ */ a.js
|
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
};
|
|
389
|
-
function
|
|
389
|
+
function _e(e) {
|
|
390
390
|
const n = c.useRef({ value: e, previous: e });
|
|
391
391
|
return c.useMemo(() => (n.current.value !== e && (n.current.previous = n.current.value, n.current.value = e), n.current.previous), [e]);
|
|
392
392
|
}
|
|
393
|
-
var Le = "Checkbox", [
|
|
394
|
-
function
|
|
393
|
+
var Le = "Checkbox", [lo, Ps] = ve(Le), [uo, pt] = lo(Le);
|
|
394
|
+
function po(e) {
|
|
395
395
|
const {
|
|
396
396
|
__scopeCheckbox: n,
|
|
397
397
|
checked: t,
|
|
@@ -410,7 +410,7 @@ function uo(e) {
|
|
|
410
410
|
defaultProp: r ?? !1,
|
|
411
411
|
onChange: d,
|
|
412
412
|
caller: Le
|
|
413
|
-
}), [S,
|
|
413
|
+
}), [S, h] = c.useState(null), [m, b] = c.useState(null), w = c.useRef(!1), y = S ? !!s || !!S.closest("form") : (
|
|
414
414
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
415
415
|
!0
|
|
416
416
|
), R = {
|
|
@@ -418,7 +418,7 @@ function uo(e) {
|
|
|
418
418
|
disabled: i,
|
|
419
419
|
setChecked: x,
|
|
420
420
|
control: S,
|
|
421
|
-
setControl:
|
|
421
|
+
setControl: h,
|
|
422
422
|
name: l,
|
|
423
423
|
form: s,
|
|
424
424
|
value: p,
|
|
@@ -426,19 +426,19 @@ function uo(e) {
|
|
|
426
426
|
required: u,
|
|
427
427
|
defaultChecked: ne(r) ? !1 : r,
|
|
428
428
|
isFormControl: y,
|
|
429
|
-
bubbleInput:
|
|
429
|
+
bubbleInput: m,
|
|
430
430
|
setBubbleInput: b
|
|
431
431
|
};
|
|
432
432
|
return /* @__PURE__ */ a.jsx(
|
|
433
|
-
|
|
433
|
+
uo,
|
|
434
434
|
{
|
|
435
435
|
scope: n,
|
|
436
436
|
...R,
|
|
437
|
-
children:
|
|
437
|
+
children: fo(f) ? f(R) : o
|
|
438
438
|
}
|
|
439
439
|
);
|
|
440
440
|
}
|
|
441
|
-
var
|
|
441
|
+
var Bt = "CheckboxTrigger", Ft = c.forwardRef(
|
|
442
442
|
({ __scopeCheckbox: e, onKeyDown: n, onClick: t, ...o }, r) => {
|
|
443
443
|
const {
|
|
444
444
|
control: i,
|
|
@@ -451,26 +451,26 @@ var Lt = "CheckboxTrigger", Bt = c.forwardRef(
|
|
|
451
451
|
hasConsumerStoppedPropagationRef: g,
|
|
452
452
|
isFormControl: x,
|
|
453
453
|
bubbleInput: S
|
|
454
|
-
} = pt(
|
|
454
|
+
} = pt(Bt, e), h = V(r, p), m = c.useRef(d);
|
|
455
455
|
return c.useEffect(() => {
|
|
456
456
|
const b = i?.form;
|
|
457
457
|
if (b) {
|
|
458
|
-
const w = () => f(
|
|
458
|
+
const w = () => f(m.current);
|
|
459
459
|
return b.addEventListener("reset", w), () => b.removeEventListener("reset", w);
|
|
460
460
|
}
|
|
461
461
|
}, [i, f]), /* @__PURE__ */ a.jsx(
|
|
462
|
-
|
|
462
|
+
j.button,
|
|
463
463
|
{
|
|
464
464
|
type: "button",
|
|
465
465
|
role: "checkbox",
|
|
466
466
|
"aria-checked": ne(d) ? "mixed" : d,
|
|
467
467
|
"aria-required": u,
|
|
468
|
-
"data-state":
|
|
468
|
+
"data-state": Gt(d),
|
|
469
469
|
"data-disabled": l ? "" : void 0,
|
|
470
470
|
disabled: l,
|
|
471
471
|
value: s,
|
|
472
472
|
...o,
|
|
473
|
-
ref:
|
|
473
|
+
ref: h,
|
|
474
474
|
onKeyDown: P(n, (b) => {
|
|
475
475
|
b.key === "Enter" && b.preventDefault();
|
|
476
476
|
}),
|
|
@@ -481,8 +481,8 @@ var Lt = "CheckboxTrigger", Bt = c.forwardRef(
|
|
|
481
481
|
);
|
|
482
482
|
}
|
|
483
483
|
);
|
|
484
|
-
|
|
485
|
-
var
|
|
484
|
+
Ft.displayName = Bt;
|
|
485
|
+
var $t = c.forwardRef(
|
|
486
486
|
(e, n) => {
|
|
487
487
|
const {
|
|
488
488
|
__scopeCheckbox: t,
|
|
@@ -497,7 +497,7 @@ var Ft = c.forwardRef(
|
|
|
497
497
|
...f
|
|
498
498
|
} = e;
|
|
499
499
|
return /* @__PURE__ */ a.jsx(
|
|
500
|
-
|
|
500
|
+
po,
|
|
501
501
|
{
|
|
502
502
|
__scopeCheckbox: t,
|
|
503
503
|
checked: r,
|
|
@@ -510,7 +510,7 @@ var Ft = c.forwardRef(
|
|
|
510
510
|
value: d,
|
|
511
511
|
internal_do_not_use_render: ({ isFormControl: g }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
512
512
|
/* @__PURE__ */ a.jsx(
|
|
513
|
-
|
|
513
|
+
Ft,
|
|
514
514
|
{
|
|
515
515
|
...f,
|
|
516
516
|
ref: n,
|
|
@@ -518,7 +518,7 @@ var Ft = c.forwardRef(
|
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
520
|
g && /* @__PURE__ */ a.jsx(
|
|
521
|
-
|
|
521
|
+
Ut,
|
|
522
522
|
{
|
|
523
523
|
__scopeCheckbox: t
|
|
524
524
|
}
|
|
@@ -528,18 +528,18 @@ var Ft = c.forwardRef(
|
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
530
|
);
|
|
531
|
-
|
|
532
|
-
var
|
|
531
|
+
$t.displayName = Le;
|
|
532
|
+
var Vt = "CheckboxIndicator", Kt = c.forwardRef(
|
|
533
533
|
(e, n) => {
|
|
534
|
-
const { __scopeCheckbox: t, forceMount: o, ...r } = e, i = pt(
|
|
534
|
+
const { __scopeCheckbox: t, forceMount: o, ...r } = e, i = pt(Vt, t);
|
|
535
535
|
return /* @__PURE__ */ a.jsx(
|
|
536
|
-
|
|
536
|
+
Ct,
|
|
537
537
|
{
|
|
538
538
|
present: o || ne(i.checked) || i.checked === !0,
|
|
539
539
|
children: /* @__PURE__ */ a.jsx(
|
|
540
|
-
|
|
540
|
+
j.span,
|
|
541
541
|
{
|
|
542
|
-
"data-state":
|
|
542
|
+
"data-state": Gt(i.checked),
|
|
543
543
|
"data-disabled": i.disabled ? "" : void 0,
|
|
544
544
|
...r,
|
|
545
545
|
ref: n,
|
|
@@ -550,8 +550,8 @@ var $t = "CheckboxIndicator", Vt = c.forwardRef(
|
|
|
550
550
|
);
|
|
551
551
|
}
|
|
552
552
|
);
|
|
553
|
-
|
|
554
|
-
var
|
|
553
|
+
Kt.displayName = Vt;
|
|
554
|
+
var Ht = "CheckboxBubbleInput", Ut = c.forwardRef(
|
|
555
555
|
({ __scopeCheckbox: e, ...n }, t) => {
|
|
556
556
|
const {
|
|
557
557
|
control: o,
|
|
@@ -565,7 +565,7 @@ var Kt = "CheckboxBubbleInput", Ht = c.forwardRef(
|
|
|
565
565
|
form: f,
|
|
566
566
|
bubbleInput: g,
|
|
567
567
|
setBubbleInput: x
|
|
568
|
-
} = pt(
|
|
568
|
+
} = pt(Ht, e), S = V(t, x), h = _e(i), m = De(o);
|
|
569
569
|
c.useEffect(() => {
|
|
570
570
|
const w = g;
|
|
571
571
|
if (!w) return;
|
|
@@ -573,14 +573,14 @@ var Kt = "CheckboxBubbleInput", Ht = c.forwardRef(
|
|
|
573
573
|
y,
|
|
574
574
|
"checked"
|
|
575
575
|
).set, N = !r.current;
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
578
|
-
w.indeterminate = ne(i), A.call(w, ne(i) ? !1 : i), w.dispatchEvent(
|
|
576
|
+
if (h !== i && A) {
|
|
577
|
+
const _ = new Event("click", { bubbles: N });
|
|
578
|
+
w.indeterminate = ne(i), A.call(w, ne(i) ? !1 : i), w.dispatchEvent(_);
|
|
579
579
|
}
|
|
580
|
-
}, [g,
|
|
580
|
+
}, [g, h, i, r]);
|
|
581
581
|
const b = c.useRef(ne(i) ? !1 : i);
|
|
582
582
|
return /* @__PURE__ */ a.jsx(
|
|
583
|
-
|
|
583
|
+
j.input,
|
|
584
584
|
{
|
|
585
585
|
type: "checkbox",
|
|
586
586
|
"aria-hidden": !0,
|
|
@@ -595,7 +595,7 @@ var Kt = "CheckboxBubbleInput", Ht = c.forwardRef(
|
|
|
595
595
|
ref: S,
|
|
596
596
|
style: {
|
|
597
597
|
...n.style,
|
|
598
|
-
...
|
|
598
|
+
...m,
|
|
599
599
|
position: "absolute",
|
|
600
600
|
pointerEvents: "none",
|
|
601
601
|
opacity: 0,
|
|
@@ -609,19 +609,19 @@ var Kt = "CheckboxBubbleInput", Ht = c.forwardRef(
|
|
|
609
609
|
);
|
|
610
610
|
}
|
|
611
611
|
);
|
|
612
|
-
|
|
613
|
-
function
|
|
612
|
+
Ut.displayName = Ht;
|
|
613
|
+
function fo(e) {
|
|
614
614
|
return typeof e == "function";
|
|
615
615
|
}
|
|
616
616
|
function ne(e) {
|
|
617
617
|
return e === "indeterminate";
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Gt(e) {
|
|
620
620
|
return ne(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function mo({ className: e, ...n }) {
|
|
623
623
|
return /* @__PURE__ */ a.jsx(
|
|
624
|
-
|
|
624
|
+
$t,
|
|
625
625
|
{
|
|
626
626
|
className: B(
|
|
627
627
|
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -630,7 +630,7 @@ function fo({ className: e, ...n }) {
|
|
|
630
630
|
"data-slot": "checkbox",
|
|
631
631
|
...n,
|
|
632
632
|
children: /* @__PURE__ */ a.jsx(
|
|
633
|
-
|
|
633
|
+
Kt,
|
|
634
634
|
{
|
|
635
635
|
className: "flex items-center justify-center text-current transition-none",
|
|
636
636
|
"data-slot": "checkbox-indicator",
|
|
@@ -653,7 +653,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
653
653
|
};
|
|
654
654
|
return /* @__PURE__ */ a.jsxs(pe, { align: "center", gap: "2", children: [
|
|
655
655
|
/* @__PURE__ */ a.jsx(
|
|
656
|
-
|
|
656
|
+
mo,
|
|
657
657
|
{
|
|
658
658
|
checked: i,
|
|
659
659
|
id: l,
|
|
@@ -665,7 +665,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
665
665
|
/* @__PURE__ */ a.jsx(ue, { className: "cursor-pointer", htmlFor: l, children: e })
|
|
666
666
|
] });
|
|
667
667
|
}, Ts = ({ content: e, className: n, size: t = "md", ...o }) => {
|
|
668
|
-
const [r, i] = ke(!1), s =
|
|
668
|
+
const [r, i] = ke(!1), s = yr(null);
|
|
669
669
|
jt(() => () => {
|
|
670
670
|
s.current && clearTimeout(s.current);
|
|
671
671
|
}, []);
|
|
@@ -694,7 +694,7 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
694
694
|
n
|
|
695
695
|
),
|
|
696
696
|
disabled: r,
|
|
697
|
-
icon: r ? /* @__PURE__ */ a.jsx(
|
|
697
|
+
icon: r ? /* @__PURE__ */ a.jsx(Lr, {}) : /* @__PURE__ */ a.jsx(Fr, {}),
|
|
698
698
|
label: r ? "Copied" : "Copy",
|
|
699
699
|
onClick: l,
|
|
700
700
|
size: t,
|
|
@@ -706,24 +706,24 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
706
706
|
s(d), d && e(d);
|
|
707
707
|
};
|
|
708
708
|
return /* @__PURE__ */ a.jsxs(pe, { direction: "col", gap: "2", children: [
|
|
709
|
-
/* @__PURE__ */ a.jsxs(
|
|
710
|
-
/* @__PURE__ */ a.jsx(
|
|
709
|
+
/* @__PURE__ */ a.jsxs(It, { children: [
|
|
710
|
+
/* @__PURE__ */ a.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ a.jsxs(
|
|
711
711
|
Ae,
|
|
712
712
|
{
|
|
713
713
|
className: B("w-[280px] justify-start text-left font-normal", !i && "text-muted-foreground", t),
|
|
714
714
|
size: o,
|
|
715
715
|
variant: "outline",
|
|
716
716
|
children: [
|
|
717
|
-
/* @__PURE__ */ a.jsx(
|
|
717
|
+
/* @__PURE__ */ a.jsx(_r, { className: "mr-2 h-4 w-4" }),
|
|
718
718
|
i ? i.toISOString().split("T")[0] : /* @__PURE__ */ a.jsx("span", { children: "Select a date" })
|
|
719
719
|
]
|
|
720
720
|
}
|
|
721
721
|
) }),
|
|
722
|
-
/* @__PURE__ */ a.jsx(
|
|
722
|
+
/* @__PURE__ */ a.jsx(kt, { className: "w-auto p-0", children: /* @__PURE__ */ a.jsx(or, { autoFocus: !0, mode: "single", onSelect: l, selected: i }) })
|
|
723
723
|
] }),
|
|
724
724
|
r && /* @__PURE__ */ a.jsx(Oe, { message: r })
|
|
725
725
|
] });
|
|
726
|
-
},
|
|
726
|
+
}, ho = ({
|
|
727
727
|
label: e,
|
|
728
728
|
labelFor: n,
|
|
729
729
|
className: t = "",
|
|
@@ -756,15 +756,15 @@ const Ns = ({ label: e, name: n, value: t, checked: o, onCheckedChange: r }) =>
|
|
|
756
756
|
onClick: u,
|
|
757
757
|
size: "xs",
|
|
758
758
|
variant: "ghost",
|
|
759
|
-
children: l ? /* @__PURE__ */ a.jsx(
|
|
759
|
+
children: l ? /* @__PURE__ */ a.jsx(Hr, {}) : /* @__PURE__ */ a.jsx(Vr, {})
|
|
760
760
|
}
|
|
761
761
|
) })
|
|
762
762
|
] }),
|
|
763
|
-
r && /* @__PURE__ */ a.jsx(
|
|
763
|
+
r && /* @__PURE__ */ a.jsx(Pt, { size: "sm", variant: "muted", children: r }),
|
|
764
764
|
i && /* @__PURE__ */ a.jsx(Oe, { message: i })
|
|
765
765
|
] });
|
|
766
766
|
};
|
|
767
|
-
var ft = "Radio", [
|
|
767
|
+
var ft = "Radio", [vo, zt] = ve(ft), [go, xo] = vo(ft), Wt = c.forwardRef(
|
|
768
768
|
(e, n) => {
|
|
769
769
|
const {
|
|
770
770
|
__scopeRadio: t,
|
|
@@ -776,27 +776,27 @@ var ft = "Radio", [ho, Gt] = ve(ft), [vo, go] = ho(ft), zt = c.forwardRef(
|
|
|
776
776
|
onCheck: d,
|
|
777
777
|
form: u,
|
|
778
778
|
...p
|
|
779
|
-
} = e, [f, g] = c.useState(null), x = V(n, (
|
|
780
|
-
return /* @__PURE__ */ a.jsxs(
|
|
779
|
+
} = e, [f, g] = c.useState(null), x = V(n, (m) => g(m)), S = c.useRef(!1), h = f ? u || !!f.closest("form") : !0;
|
|
780
|
+
return /* @__PURE__ */ a.jsxs(go, { scope: t, checked: r, disabled: s, children: [
|
|
781
781
|
/* @__PURE__ */ a.jsx(
|
|
782
|
-
|
|
782
|
+
j.button,
|
|
783
783
|
{
|
|
784
784
|
type: "button",
|
|
785
785
|
role: "radio",
|
|
786
786
|
"aria-checked": r,
|
|
787
|
-
"data-state":
|
|
787
|
+
"data-state": Zt(r),
|
|
788
788
|
"data-disabled": s ? "" : void 0,
|
|
789
789
|
disabled: s,
|
|
790
790
|
value: l,
|
|
791
791
|
...p,
|
|
792
792
|
ref: x,
|
|
793
|
-
onClick: P(e.onClick, (
|
|
794
|
-
r || d?.(),
|
|
793
|
+
onClick: P(e.onClick, (m) => {
|
|
794
|
+
r || d?.(), h && (S.current = m.isPropagationStopped(), S.current || m.stopPropagation());
|
|
795
795
|
})
|
|
796
796
|
}
|
|
797
797
|
),
|
|
798
|
-
|
|
799
|
-
|
|
798
|
+
h && /* @__PURE__ */ a.jsx(
|
|
799
|
+
Xt,
|
|
800
800
|
{
|
|
801
801
|
control: f,
|
|
802
802
|
bubbles: !S.current,
|
|
@@ -812,14 +812,14 @@ var ft = "Radio", [ho, Gt] = ve(ft), [vo, go] = ho(ft), zt = c.forwardRef(
|
|
|
812
812
|
] });
|
|
813
813
|
}
|
|
814
814
|
);
|
|
815
|
-
|
|
816
|
-
var
|
|
815
|
+
Wt.displayName = ft;
|
|
816
|
+
var qt = "RadioIndicator", Yt = c.forwardRef(
|
|
817
817
|
(e, n) => {
|
|
818
|
-
const { __scopeRadio: t, forceMount: o, ...r } = e, i =
|
|
819
|
-
return /* @__PURE__ */ a.jsx(
|
|
820
|
-
|
|
818
|
+
const { __scopeRadio: t, forceMount: o, ...r } = e, i = xo(qt, t);
|
|
819
|
+
return /* @__PURE__ */ a.jsx(Ct, { present: o || i.checked, children: /* @__PURE__ */ a.jsx(
|
|
820
|
+
j.span,
|
|
821
821
|
{
|
|
822
|
-
"data-state":
|
|
822
|
+
"data-state": Zt(i.checked),
|
|
823
823
|
"data-disabled": i.disabled ? "" : void 0,
|
|
824
824
|
...r,
|
|
825
825
|
ref: n
|
|
@@ -827,8 +827,8 @@ var Wt = "RadioIndicator", qt = c.forwardRef(
|
|
|
827
827
|
) });
|
|
828
828
|
}
|
|
829
829
|
);
|
|
830
|
-
|
|
831
|
-
var
|
|
830
|
+
Yt.displayName = qt;
|
|
831
|
+
var bo = "RadioBubbleInput", Xt = c.forwardRef(
|
|
832
832
|
({
|
|
833
833
|
__scopeRadio: e,
|
|
834
834
|
control: n,
|
|
@@ -836,7 +836,7 @@ var xo = "RadioBubbleInput", Yt = c.forwardRef(
|
|
|
836
836
|
bubbles: o = !0,
|
|
837
837
|
...r
|
|
838
838
|
}, i) => {
|
|
839
|
-
const s = c.useRef(null), l = V(s, i), d =
|
|
839
|
+
const s = c.useRef(null), l = V(s, i), d = _e(t), u = De(n);
|
|
840
840
|
return c.useEffect(() => {
|
|
841
841
|
const p = s.current;
|
|
842
842
|
if (!p) return;
|
|
@@ -849,7 +849,7 @@ var xo = "RadioBubbleInput", Yt = c.forwardRef(
|
|
|
849
849
|
x.call(p, t), p.dispatchEvent(S);
|
|
850
850
|
}
|
|
851
851
|
}, [d, t, o]), /* @__PURE__ */ a.jsx(
|
|
852
|
-
|
|
852
|
+
j.input,
|
|
853
853
|
{
|
|
854
854
|
type: "radio",
|
|
855
855
|
"aria-hidden": !0,
|
|
@@ -869,14 +869,14 @@ var xo = "RadioBubbleInput", Yt = c.forwardRef(
|
|
|
869
869
|
);
|
|
870
870
|
}
|
|
871
871
|
);
|
|
872
|
-
|
|
873
|
-
function
|
|
872
|
+
Xt.displayName = bo;
|
|
873
|
+
function Zt(e) {
|
|
874
874
|
return e ? "checked" : "unchecked";
|
|
875
875
|
}
|
|
876
|
-
var
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
]),
|
|
876
|
+
var So = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Be = "RadioGroup", [wo, Ds] = ve(Be, [
|
|
877
|
+
Mt,
|
|
878
|
+
zt
|
|
879
|
+
]), Jt = Mt(), Qt = zt(), [yo, Co] = wo(Be), en = c.forwardRef(
|
|
880
880
|
(e, n) => {
|
|
881
881
|
const {
|
|
882
882
|
__scopeRadioGroup: t,
|
|
@@ -890,23 +890,23 @@ var bo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Be = "RadioGroup",
|
|
|
890
890
|
loop: p = !0,
|
|
891
891
|
onValueChange: f,
|
|
892
892
|
...g
|
|
893
|
-
} = e, x =
|
|
893
|
+
} = e, x = Jt(t), S = Me(u), [h, m] = de({
|
|
894
894
|
prop: i,
|
|
895
895
|
defaultProp: r ?? null,
|
|
896
896
|
onChange: f,
|
|
897
897
|
caller: Be
|
|
898
898
|
});
|
|
899
899
|
return /* @__PURE__ */ a.jsx(
|
|
900
|
-
|
|
900
|
+
yo,
|
|
901
901
|
{
|
|
902
902
|
scope: t,
|
|
903
903
|
name: o,
|
|
904
904
|
required: s,
|
|
905
905
|
disabled: l,
|
|
906
|
-
value:
|
|
907
|
-
onValueChange:
|
|
906
|
+
value: h,
|
|
907
|
+
onValueChange: m,
|
|
908
908
|
children: /* @__PURE__ */ a.jsx(
|
|
909
|
-
|
|
909
|
+
io,
|
|
910
910
|
{
|
|
911
911
|
asChild: !0,
|
|
912
912
|
...x,
|
|
@@ -914,7 +914,7 @@ var bo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Be = "RadioGroup",
|
|
|
914
914
|
dir: S,
|
|
915
915
|
loop: p,
|
|
916
916
|
children: /* @__PURE__ */ a.jsx(
|
|
917
|
-
|
|
917
|
+
j.div,
|
|
918
918
|
{
|
|
919
919
|
role: "radiogroup",
|
|
920
920
|
"aria-required": s,
|
|
@@ -931,26 +931,26 @@ var bo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Be = "RadioGroup",
|
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
933
|
);
|
|
934
|
-
|
|
935
|
-
var
|
|
934
|
+
en.displayName = Be;
|
|
935
|
+
var tn = "RadioGroupItem", nn = c.forwardRef(
|
|
936
936
|
(e, n) => {
|
|
937
|
-
const { __scopeRadioGroup: t, disabled: o, ...r } = e, i =
|
|
937
|
+
const { __scopeRadioGroup: t, disabled: o, ...r } = e, i = Co(tn, t), s = i.disabled || o, l = Jt(t), d = Qt(t), u = c.useRef(null), p = V(n, u), f = i.value === r.value, g = c.useRef(!1);
|
|
938
938
|
return c.useEffect(() => {
|
|
939
|
-
const x = (
|
|
940
|
-
|
|
939
|
+
const x = (h) => {
|
|
940
|
+
So.includes(h.key) && (g.current = !0);
|
|
941
941
|
}, S = () => g.current = !1;
|
|
942
942
|
return document.addEventListener("keydown", x), document.addEventListener("keyup", S), () => {
|
|
943
943
|
document.removeEventListener("keydown", x), document.removeEventListener("keyup", S);
|
|
944
944
|
};
|
|
945
945
|
}, []), /* @__PURE__ */ a.jsx(
|
|
946
|
-
|
|
946
|
+
co,
|
|
947
947
|
{
|
|
948
948
|
asChild: !0,
|
|
949
949
|
...l,
|
|
950
950
|
focusable: !s,
|
|
951
951
|
active: f,
|
|
952
952
|
children: /* @__PURE__ */ a.jsx(
|
|
953
|
-
|
|
953
|
+
Wt,
|
|
954
954
|
{
|
|
955
955
|
disabled: s,
|
|
956
956
|
required: i.required,
|
|
@@ -972,21 +972,21 @@ var en = "RadioGroupItem", tn = c.forwardRef(
|
|
|
972
972
|
);
|
|
973
973
|
}
|
|
974
974
|
);
|
|
975
|
-
|
|
976
|
-
var
|
|
975
|
+
nn.displayName = tn;
|
|
976
|
+
var Io = "RadioGroupIndicator", rn = c.forwardRef(
|
|
977
977
|
(e, n) => {
|
|
978
|
-
const { __scopeRadioGroup: t, ...o } = e, r =
|
|
979
|
-
return /* @__PURE__ */ a.jsx(
|
|
978
|
+
const { __scopeRadioGroup: t, ...o } = e, r = Qt(t);
|
|
979
|
+
return /* @__PURE__ */ a.jsx(Yt, { ...r, ...o, ref: n });
|
|
980
980
|
}
|
|
981
981
|
);
|
|
982
|
-
|
|
983
|
-
var
|
|
984
|
-
function
|
|
985
|
-
return /* @__PURE__ */ a.jsx(
|
|
982
|
+
rn.displayName = Io;
|
|
983
|
+
var Ro = en, ko = nn, Eo = rn;
|
|
984
|
+
function _o({ className: e, ...n }) {
|
|
985
|
+
return /* @__PURE__ */ a.jsx(Ro, { className: B("grid gap-3", e), "data-slot": "radio-group", ...n });
|
|
986
986
|
}
|
|
987
987
|
function jo({ className: e, ...n }) {
|
|
988
988
|
return /* @__PURE__ */ a.jsx(
|
|
989
|
-
|
|
989
|
+
ko,
|
|
990
990
|
{
|
|
991
991
|
className: B(
|
|
992
992
|
"border-input text-primary 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -995,18 +995,18 @@ function jo({ className: e, ...n }) {
|
|
|
995
995
|
"data-slot": "radio-group-item",
|
|
996
996
|
...n,
|
|
997
997
|
children: /* @__PURE__ */ a.jsx(
|
|
998
|
-
|
|
998
|
+
Eo,
|
|
999
999
|
{
|
|
1000
1000
|
className: "relative flex items-center justify-center",
|
|
1001
1001
|
"data-slot": "radio-group-indicator",
|
|
1002
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1002
|
+
children: /* @__PURE__ */ a.jsx(Dr, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
1003
1003
|
}
|
|
1004
1004
|
)
|
|
1005
1005
|
}
|
|
1006
1006
|
);
|
|
1007
1007
|
}
|
|
1008
|
-
const Os = ({ label: e, name: n, options: t, value: o, onChange: r, error: i }) => /* @__PURE__ */ a.jsxs(
|
|
1009
|
-
/* @__PURE__ */ a.jsx(
|
|
1008
|
+
const Os = ({ label: e, name: n, options: t, value: o, onChange: r, error: i }) => /* @__PURE__ */ a.jsxs(ho, { className: "flex flex-col gap-4 px-2 py-1", label: e, labelFor: n, children: [
|
|
1009
|
+
/* @__PURE__ */ a.jsx(_o, { className: "w-full", name: n, onValueChange: r, value: o, children: /* @__PURE__ */ a.jsx(Rr, { cols: "2", children: t.map((s, l) => /* @__PURE__ */ a.jsxs(pe, { align: "center", gap: "2", justify: "start", children: [
|
|
1010
1010
|
/* @__PURE__ */ a.jsx(jo, { id: s.value, value: s.value }),
|
|
1011
1011
|
/* @__PURE__ */ a.jsx(ue, { htmlFor: s.value, children: s.label })
|
|
1012
1012
|
] }, l)) }) }),
|
|
@@ -1015,10 +1015,10 @@ const Os = ({ label: e, name: n, options: t, value: o, onChange: r, error: i })
|
|
|
1015
1015
|
function Ne(e, [n, t]) {
|
|
1016
1016
|
return Math.min(t, Math.max(n, e));
|
|
1017
1017
|
}
|
|
1018
|
-
var
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
]), Ve =
|
|
1018
|
+
var Po = [" ", "Enter", "ArrowUp", "ArrowDown"], No = [" ", "Enter"], fe = "Select", [Fe, $e, To] = dt(fe), [Se, Ls] = ve(fe, [
|
|
1019
|
+
To,
|
|
1020
|
+
Et
|
|
1021
|
+
]), Ve = Et(), [Mo, ae] = Se(fe), [Ao, Do] = Se(fe), on = (e) => {
|
|
1022
1022
|
const {
|
|
1023
1023
|
__scopeSelect: n,
|
|
1024
1024
|
children: t,
|
|
@@ -1034,7 +1034,7 @@ var _o = [" ", "Enter", "ArrowUp", "ArrowDown"], Po = [" ", "Enter"], fe = "Sele
|
|
|
1034
1034
|
disabled: g,
|
|
1035
1035
|
required: x,
|
|
1036
1036
|
form: S
|
|
1037
|
-
} = e,
|
|
1037
|
+
} = e, h = Ve(n), [m, b] = c.useState(null), [w, y] = c.useState(null), [R, A] = c.useState(!1), N = Me(u), [_, L] = de({
|
|
1038
1038
|
prop: o,
|
|
1039
1039
|
defaultProp: r ?? !1,
|
|
1040
1040
|
onChange: i,
|
|
@@ -1044,13 +1044,13 @@ var _o = [" ", "Enter", "ArrowUp", "ArrowDown"], Po = [" ", "Enter"], fe = "Sele
|
|
|
1044
1044
|
defaultProp: l,
|
|
1045
1045
|
onChange: d,
|
|
1046
1046
|
caller: fe
|
|
1047
|
-
}), D = c.useRef(null), K =
|
|
1048
|
-
return /* @__PURE__ */ a.jsx(
|
|
1049
|
-
|
|
1047
|
+
}), D = c.useRef(null), K = m ? S || !!m.closest("form") : !0, [X, W] = c.useState(/* @__PURE__ */ new Set()), U = Array.from(X).map((O) => O.props.value).join(";");
|
|
1048
|
+
return /* @__PURE__ */ a.jsx(ar, { ...h, children: /* @__PURE__ */ a.jsxs(
|
|
1049
|
+
Mo,
|
|
1050
1050
|
{
|
|
1051
1051
|
required: x,
|
|
1052
1052
|
scope: n,
|
|
1053
|
-
trigger:
|
|
1053
|
+
trigger: m,
|
|
1054
1054
|
onTriggerChange: b,
|
|
1055
1055
|
valueNode: w,
|
|
1056
1056
|
onValueNodeChange: y,
|
|
@@ -1059,14 +1059,14 @@ var _o = [" ", "Enter", "ArrowUp", "ArrowDown"], Po = [" ", "Enter"], fe = "Sele
|
|
|
1059
1059
|
contentId: te(),
|
|
1060
1060
|
value: Z,
|
|
1061
1061
|
onValueChange: z,
|
|
1062
|
-
open:
|
|
1062
|
+
open: _,
|
|
1063
1063
|
onOpenChange: L,
|
|
1064
1064
|
dir: N,
|
|
1065
1065
|
triggerPointerDownPosRef: D,
|
|
1066
1066
|
disabled: g,
|
|
1067
1067
|
children: [
|
|
1068
1068
|
/* @__PURE__ */ a.jsx(Fe.Provider, { scope: n, children: /* @__PURE__ */ a.jsx(
|
|
1069
|
-
|
|
1069
|
+
Ao,
|
|
1070
1070
|
{
|
|
1071
1071
|
scope: e.__scopeSelect,
|
|
1072
1072
|
onNativeOptionAdd: c.useCallback((O) => {
|
|
@@ -1082,7 +1082,7 @@ var _o = [" ", "Enter", "ArrowUp", "ArrowDown"], Po = [" ", "Enter"], fe = "Sele
|
|
|
1082
1082
|
}
|
|
1083
1083
|
) }),
|
|
1084
1084
|
K ? /* @__PURE__ */ a.jsxs(
|
|
1085
|
-
|
|
1085
|
+
En,
|
|
1086
1086
|
{
|
|
1087
1087
|
"aria-hidden": !0,
|
|
1088
1088
|
required: x,
|
|
@@ -1104,20 +1104,20 @@ var _o = [" ", "Enter", "ArrowUp", "ArrowDown"], Po = [" ", "Enter"], fe = "Sele
|
|
|
1104
1104
|
}
|
|
1105
1105
|
) });
|
|
1106
1106
|
};
|
|
1107
|
-
|
|
1108
|
-
var
|
|
1107
|
+
on.displayName = fe;
|
|
1108
|
+
var an = "SelectTrigger", sn = c.forwardRef(
|
|
1109
1109
|
(e, n) => {
|
|
1110
|
-
const { __scopeSelect: t, disabled: o = !1, ...r } = e, i = Ve(t), s = ae(
|
|
1111
|
-
const
|
|
1110
|
+
const { __scopeSelect: t, disabled: o = !1, ...r } = e, i = Ve(t), s = ae(an, t), l = s.disabled || o, d = V(n, s.onTriggerChange), u = $e(t), p = c.useRef("touch"), [f, g, x] = jn((h) => {
|
|
1111
|
+
const m = u().filter((y) => !y.disabled), b = m.find((y) => y.value === s.value), w = Pn(m, h, b);
|
|
1112
1112
|
w !== void 0 && s.onValueChange(w.value);
|
|
1113
|
-
}), S = (
|
|
1114
|
-
l || (s.onOpenChange(!0), x()),
|
|
1115
|
-
x: Math.round(
|
|
1116
|
-
y: Math.round(
|
|
1113
|
+
}), S = (h) => {
|
|
1114
|
+
l || (s.onOpenChange(!0), x()), h && (s.triggerPointerDownPosRef.current = {
|
|
1115
|
+
x: Math.round(h.pageX),
|
|
1116
|
+
y: Math.round(h.pageY)
|
|
1117
1117
|
});
|
|
1118
1118
|
};
|
|
1119
|
-
return /* @__PURE__ */ a.jsx(
|
|
1120
|
-
|
|
1119
|
+
return /* @__PURE__ */ a.jsx(sr, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
|
|
1120
|
+
j.button,
|
|
1121
1121
|
{
|
|
1122
1122
|
type: "button",
|
|
1123
1123
|
role: "combobox",
|
|
@@ -1129,69 +1129,69 @@ var on = "SelectTrigger", an = c.forwardRef(
|
|
|
1129
1129
|
"data-state": s.open ? "open" : "closed",
|
|
1130
1130
|
disabled: l,
|
|
1131
1131
|
"data-disabled": l ? "" : void 0,
|
|
1132
|
-
"data-placeholder":
|
|
1132
|
+
"data-placeholder": _n(s.value) ? "" : void 0,
|
|
1133
1133
|
...r,
|
|
1134
1134
|
ref: d,
|
|
1135
|
-
onClick: P(r.onClick, (
|
|
1136
|
-
|
|
1135
|
+
onClick: P(r.onClick, (h) => {
|
|
1136
|
+
h.currentTarget.focus(), p.current !== "mouse" && S(h);
|
|
1137
1137
|
}),
|
|
1138
|
-
onPointerDown: P(r.onPointerDown, (
|
|
1139
|
-
p.current =
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1138
|
+
onPointerDown: P(r.onPointerDown, (h) => {
|
|
1139
|
+
p.current = h.pointerType;
|
|
1140
|
+
const m = h.target;
|
|
1141
|
+
m.hasPointerCapture(h.pointerId) && m.releasePointerCapture(h.pointerId), h.button === 0 && h.ctrlKey === !1 && h.pointerType === "mouse" && (S(h), h.preventDefault());
|
|
1142
1142
|
}),
|
|
1143
|
-
onKeyDown: P(r.onKeyDown, (
|
|
1144
|
-
const
|
|
1145
|
-
!(
|
|
1143
|
+
onKeyDown: P(r.onKeyDown, (h) => {
|
|
1144
|
+
const m = f.current !== "";
|
|
1145
|
+
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(m && h.key === " ") && Po.includes(h.key) && (S(), h.preventDefault());
|
|
1146
1146
|
})
|
|
1147
1147
|
}
|
|
1148
1148
|
) });
|
|
1149
1149
|
}
|
|
1150
1150
|
);
|
|
1151
|
-
|
|
1152
|
-
var
|
|
1151
|
+
sn.displayName = an;
|
|
1152
|
+
var cn = "SelectValue", ln = c.forwardRef(
|
|
1153
1153
|
(e, n) => {
|
|
1154
|
-
const { __scopeSelect: t, className: o, style: r, children: i, placeholder: s = "", ...l } = e, d = ae(
|
|
1154
|
+
const { __scopeSelect: t, className: o, style: r, children: i, placeholder: s = "", ...l } = e, d = ae(cn, t), { onValueNodeHasChildrenChange: u } = d, p = i !== void 0, f = V(n, d.onValueNodeChange);
|
|
1155
1155
|
return re(() => {
|
|
1156
1156
|
u(p);
|
|
1157
1157
|
}, [u, p]), /* @__PURE__ */ a.jsx(
|
|
1158
|
-
|
|
1158
|
+
j.span,
|
|
1159
1159
|
{
|
|
1160
1160
|
...l,
|
|
1161
1161
|
ref: f,
|
|
1162
1162
|
style: { pointerEvents: "none" },
|
|
1163
|
-
children:
|
|
1163
|
+
children: _n(d.value) ? /* @__PURE__ */ a.jsx(a.Fragment, { children: s }) : i
|
|
1164
1164
|
}
|
|
1165
1165
|
);
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
|
-
|
|
1169
|
-
var
|
|
1168
|
+
ln.displayName = cn;
|
|
1169
|
+
var Oo = "SelectIcon", dn = c.forwardRef(
|
|
1170
1170
|
(e, n) => {
|
|
1171
1171
|
const { __scopeSelect: t, children: o, ...r } = e;
|
|
1172
|
-
return /* @__PURE__ */ a.jsx(
|
|
1172
|
+
return /* @__PURE__ */ a.jsx(j.span, { "aria-hidden": !0, ...r, ref: n, children: o || "▼" });
|
|
1173
1173
|
}
|
|
1174
1174
|
);
|
|
1175
|
-
ln.displayName = Do;
|
|
1176
|
-
var Oo = "SelectPortal", dn = (e) => /* @__PURE__ */ a.jsx(sr, { asChild: !0, ...e });
|
|
1177
1175
|
dn.displayName = Oo;
|
|
1178
|
-
var
|
|
1176
|
+
var Lo = "SelectPortal", un = (e) => /* @__PURE__ */ a.jsx(ir, { asChild: !0, ...e });
|
|
1177
|
+
un.displayName = Lo;
|
|
1178
|
+
var me = "SelectContent", pn = c.forwardRef(
|
|
1179
1179
|
(e, n) => {
|
|
1180
1180
|
const t = ae(me, e.__scopeSelect), [o, r] = c.useState();
|
|
1181
1181
|
if (re(() => {
|
|
1182
1182
|
r(new DocumentFragment());
|
|
1183
1183
|
}, []), !t.open) {
|
|
1184
1184
|
const i = o;
|
|
1185
|
-
return i ?
|
|
1186
|
-
/* @__PURE__ */ a.jsx(
|
|
1185
|
+
return i ? Nt.createPortal(
|
|
1186
|
+
/* @__PURE__ */ a.jsx(fn, { scope: e.__scopeSelect, children: /* @__PURE__ */ a.jsx(Fe.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ a.jsx("div", { children: e.children }) }) }),
|
|
1187
1187
|
i
|
|
1188
1188
|
) : null;
|
|
1189
1189
|
}
|
|
1190
|
-
return /* @__PURE__ */ a.jsx(
|
|
1190
|
+
return /* @__PURE__ */ a.jsx(mn, { ...e, ref: n });
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
|
-
|
|
1194
|
-
var ee = 10, [
|
|
1193
|
+
pn.displayName = me;
|
|
1194
|
+
var ee = 10, [fn, se] = Se(me), Bo = "SelectContentImpl", Fo = pr("SelectContent.RemoveScroll"), mn = c.forwardRef(
|
|
1195
1195
|
(e, n) => {
|
|
1196
1196
|
const {
|
|
1197
1197
|
__scopeSelect: t,
|
|
@@ -1209,16 +1209,16 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1209
1209
|
collisionBoundary: g,
|
|
1210
1210
|
collisionPadding: x,
|
|
1211
1211
|
sticky: S,
|
|
1212
|
-
hideWhenDetached:
|
|
1213
|
-
avoidCollisions:
|
|
1212
|
+
hideWhenDetached: h,
|
|
1213
|
+
avoidCollisions: m,
|
|
1214
1214
|
//
|
|
1215
1215
|
...b
|
|
1216
|
-
} = e, w = ae(me, t), [y, R] = c.useState(null), [A, N] = c.useState(null),
|
|
1216
|
+
} = e, w = ae(me, t), [y, R] = c.useState(null), [A, N] = c.useState(null), _ = V(n, (C) => R(C)), [L, Z] = c.useState(null), [z, D] = c.useState(
|
|
1217
1217
|
null
|
|
1218
1218
|
), K = $e(t), [X, W] = c.useState(!1), U = c.useRef(!1);
|
|
1219
1219
|
c.useEffect(() => {
|
|
1220
|
-
if (y) return
|
|
1221
|
-
}, [y]),
|
|
1220
|
+
if (y) return lr(y);
|
|
1221
|
+
}, [y]), dr();
|
|
1222
1222
|
const O = c.useCallback(
|
|
1223
1223
|
(C) => {
|
|
1224
1224
|
const [M, ...F] = K().map((Y) => Y.ref.current), [$] = F.slice(-1), H = document.activeElement;
|
|
@@ -1256,9 +1256,9 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1256
1256
|
};
|
|
1257
1257
|
}, [q]);
|
|
1258
1258
|
const [ge, ie] = jn((C) => {
|
|
1259
|
-
const M = K().filter((H) => !H.disabled), F = M.find((H) => H.ref.current === document.activeElement), $ =
|
|
1259
|
+
const M = K().filter((H) => !H.disabled), F = M.find((H) => H.ref.current === document.activeElement), $ = Pn(M, C, F);
|
|
1260
1260
|
$ && setTimeout(() => $.ref.current.focus());
|
|
1261
|
-
}),
|
|
1261
|
+
}), v = c.useCallback(
|
|
1262
1262
|
(C, M, F) => {
|
|
1263
1263
|
const $ = !U.current && !F;
|
|
1264
1264
|
(w.value !== void 0 && w.value === M || $) && (Z(C), $ && (U.current = !0));
|
|
@@ -1270,7 +1270,7 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1270
1270
|
(w.value !== void 0 && w.value === M || $) && D(C);
|
|
1271
1271
|
},
|
|
1272
1272
|
[w.value]
|
|
1273
|
-
), I = o === "popper" ? et :
|
|
1273
|
+
), I = o === "popper" ? et : hn, T = I === et ? {
|
|
1274
1274
|
side: l,
|
|
1275
1275
|
sideOffset: d,
|
|
1276
1276
|
align: u,
|
|
@@ -1279,17 +1279,17 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1279
1279
|
collisionBoundary: g,
|
|
1280
1280
|
collisionPadding: x,
|
|
1281
1281
|
sticky: S,
|
|
1282
|
-
hideWhenDetached:
|
|
1283
|
-
avoidCollisions:
|
|
1282
|
+
hideWhenDetached: h,
|
|
1283
|
+
avoidCollisions: m
|
|
1284
1284
|
} : {};
|
|
1285
1285
|
return /* @__PURE__ */ a.jsx(
|
|
1286
|
-
|
|
1286
|
+
fn,
|
|
1287
1287
|
{
|
|
1288
1288
|
scope: t,
|
|
1289
1289
|
content: y,
|
|
1290
1290
|
viewport: A,
|
|
1291
1291
|
onViewportChange: N,
|
|
1292
|
-
itemRefCallback:
|
|
1292
|
+
itemRefCallback: v,
|
|
1293
1293
|
selectedItem: L,
|
|
1294
1294
|
onItemLeave: k,
|
|
1295
1295
|
itemTextRefCallback: E,
|
|
@@ -1298,8 +1298,8 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1298
1298
|
position: o,
|
|
1299
1299
|
isPositioned: X,
|
|
1300
1300
|
searchRef: ge,
|
|
1301
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1302
|
-
|
|
1301
|
+
children: /* @__PURE__ */ a.jsx(ur, { as: Fo, allowPinchZoom: !0, children: /* @__PURE__ */ a.jsx(
|
|
1302
|
+
fr,
|
|
1303
1303
|
{
|
|
1304
1304
|
asChild: !0,
|
|
1305
1305
|
trapped: w.open,
|
|
@@ -1310,7 +1310,7 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1310
1310
|
w.trigger?.focus({ preventScroll: !0 }), C.preventDefault();
|
|
1311
1311
|
}),
|
|
1312
1312
|
children: /* @__PURE__ */ a.jsx(
|
|
1313
|
-
|
|
1313
|
+
mr,
|
|
1314
1314
|
{
|
|
1315
1315
|
asChild: !0,
|
|
1316
1316
|
disableOutsidePointerEvents: !0,
|
|
@@ -1329,7 +1329,7 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1329
1329
|
...b,
|
|
1330
1330
|
...T,
|
|
1331
1331
|
onPlaced: () => W(!0),
|
|
1332
|
-
ref:
|
|
1332
|
+
ref: _,
|
|
1333
1333
|
style: {
|
|
1334
1334
|
// flex layout so we can place the scroll buttons properly
|
|
1335
1335
|
display: "flex",
|
|
@@ -1359,13 +1359,13 @@ var ee = 10, [pn, se] = Se(me), Lo = "SelectContentImpl", Bo = ur("SelectContent
|
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
1361
|
);
|
|
1362
|
-
|
|
1363
|
-
var
|
|
1364
|
-
const { __scopeSelect: t, onPlaced: o, ...r } = e, i = ae(me, t), s = se(me, t), [l, d] = c.useState(null), [u, p] = c.useState(null), f = V(n, (
|
|
1365
|
-
if (i.trigger && i.valueNode && l && u &&
|
|
1366
|
-
const
|
|
1362
|
+
mn.displayName = Bo;
|
|
1363
|
+
var $o = "SelectItemAlignedPosition", hn = c.forwardRef((e, n) => {
|
|
1364
|
+
const { __scopeSelect: t, onPlaced: o, ...r } = e, i = ae(me, t), s = se(me, t), [l, d] = c.useState(null), [u, p] = c.useState(null), f = V(n, (_) => p(_)), g = $e(t), x = c.useRef(!1), S = c.useRef(!0), { viewport: h, selectedItem: m, selectedItemText: b, focusSelectedItem: w } = s, y = c.useCallback(() => {
|
|
1365
|
+
if (i.trigger && i.valueNode && l && u && h && m && b) {
|
|
1366
|
+
const _ = i.trigger.getBoundingClientRect(), L = u.getBoundingClientRect(), Z = i.valueNode.getBoundingClientRect(), z = b.getBoundingClientRect();
|
|
1367
1367
|
if (i.dir !== "rtl") {
|
|
1368
|
-
const H = z.left - L.left, Y = Z.left - H, ce =
|
|
1368
|
+
const H = z.left - L.left, Y = Z.left - H, ce = _.left - Y, le = _.width + ce, Ge = Math.max(le, L.width), ze = window.innerWidth - ee, We = Ne(Y, [
|
|
1369
1369
|
ee,
|
|
1370
1370
|
// Prevents the content from going off the starting edge of the
|
|
1371
1371
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -1376,31 +1376,31 @@ var Fo = "SelectItemAlignedPosition", mn = c.forwardRef((e, n) => {
|
|
|
1376
1376
|
]);
|
|
1377
1377
|
l.style.minWidth = le + "px", l.style.left = We + "px";
|
|
1378
1378
|
} else {
|
|
1379
|
-
const H = L.right - z.right, Y = window.innerWidth - Z.right - H, ce = window.innerWidth -
|
|
1379
|
+
const H = L.right - z.right, Y = window.innerWidth - Z.right - H, ce = window.innerWidth - _.right - Y, le = _.width + ce, Ge = Math.max(le, L.width), ze = window.innerWidth - ee, We = Ne(Y, [
|
|
1380
1380
|
ee,
|
|
1381
1381
|
Math.max(ee, ze - Ge)
|
|
1382
1382
|
]);
|
|
1383
1383
|
l.style.minWidth = le + "px", l.style.right = We + "px";
|
|
1384
1384
|
}
|
|
1385
|
-
const D = g(), K = window.innerHeight - ee * 2, X =
|
|
1385
|
+
const D = g(), K = window.innerHeight - ee * 2, X = h.scrollHeight, W = window.getComputedStyle(u), U = parseInt(W.borderTopWidth, 10), O = parseInt(W.paddingTop, 10), G = parseInt(W.borderBottomWidth, 10), q = parseInt(W.paddingBottom, 10), J = U + O + X + q + G, ge = Math.min(m.offsetHeight * 5, J), ie = window.getComputedStyle(h), v = parseInt(ie.paddingTop, 10), k = parseInt(ie.paddingBottom, 10), E = _.top + _.height / 2 - ee, I = K - E, T = m.offsetHeight / 2, C = m.offsetTop + T, M = U + O + C, F = J - M;
|
|
1386
1386
|
if (M <= E) {
|
|
1387
|
-
const H = D.length > 0 &&
|
|
1387
|
+
const H = D.length > 0 && m === D[D.length - 1].ref.current;
|
|
1388
1388
|
l.style.bottom = "0px";
|
|
1389
|
-
const Y = u.clientHeight -
|
|
1389
|
+
const Y = u.clientHeight - h.offsetTop - h.offsetHeight, ce = Math.max(
|
|
1390
1390
|
I,
|
|
1391
1391
|
T + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
1392
1392
|
(H ? k : 0) + Y + G
|
|
1393
1393
|
), le = M + ce;
|
|
1394
1394
|
l.style.height = le + "px";
|
|
1395
1395
|
} else {
|
|
1396
|
-
const H = D.length > 0 &&
|
|
1396
|
+
const H = D.length > 0 && m === D[0].ref.current;
|
|
1397
1397
|
l.style.top = "0px";
|
|
1398
1398
|
const ce = Math.max(
|
|
1399
1399
|
E,
|
|
1400
|
-
U +
|
|
1401
|
-
(H ?
|
|
1400
|
+
U + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
1401
|
+
(H ? v : 0) + T
|
|
1402
1402
|
) + F;
|
|
1403
|
-
l.style.height = ce + "px",
|
|
1403
|
+
l.style.height = ce + "px", h.scrollTop = M - E + h.offsetTop;
|
|
1404
1404
|
}
|
|
1405
1405
|
l.style.margin = `${ee}px 0`, l.style.minHeight = ge + "px", l.style.maxHeight = K + "px", o?.(), requestAnimationFrame(() => x.current = !0);
|
|
1406
1406
|
}
|
|
@@ -1410,8 +1410,8 @@ var Fo = "SelectItemAlignedPosition", mn = c.forwardRef((e, n) => {
|
|
|
1410
1410
|
i.valueNode,
|
|
1411
1411
|
l,
|
|
1412
1412
|
u,
|
|
1413
|
+
h,
|
|
1413
1414
|
m,
|
|
1414
|
-
v,
|
|
1415
1415
|
b,
|
|
1416
1416
|
i.dir,
|
|
1417
1417
|
o
|
|
@@ -1422,13 +1422,13 @@ var Fo = "SelectItemAlignedPosition", mn = c.forwardRef((e, n) => {
|
|
|
1422
1422
|
u && A(window.getComputedStyle(u).zIndex);
|
|
1423
1423
|
}, [u]);
|
|
1424
1424
|
const N = c.useCallback(
|
|
1425
|
-
(
|
|
1426
|
-
|
|
1425
|
+
(_) => {
|
|
1426
|
+
_ && S.current === !0 && (y(), w?.(), S.current = !1);
|
|
1427
1427
|
},
|
|
1428
1428
|
[y, w]
|
|
1429
1429
|
);
|
|
1430
1430
|
return /* @__PURE__ */ a.jsx(
|
|
1431
|
-
|
|
1431
|
+
Ko,
|
|
1432
1432
|
{
|
|
1433
1433
|
scope: t,
|
|
1434
1434
|
contentWrapper: l,
|
|
@@ -1445,7 +1445,7 @@ var Fo = "SelectItemAlignedPosition", mn = c.forwardRef((e, n) => {
|
|
|
1445
1445
|
zIndex: R
|
|
1446
1446
|
},
|
|
1447
1447
|
children: /* @__PURE__ */ a.jsx(
|
|
1448
|
-
|
|
1448
|
+
j.div,
|
|
1449
1449
|
{
|
|
1450
1450
|
...r,
|
|
1451
1451
|
ref: f,
|
|
@@ -1464,8 +1464,8 @@ var Fo = "SelectItemAlignedPosition", mn = c.forwardRef((e, n) => {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
1466
|
});
|
|
1467
|
-
|
|
1468
|
-
var
|
|
1467
|
+
hn.displayName = $o;
|
|
1468
|
+
var Vo = "SelectPopperPosition", et = c.forwardRef((e, n) => {
|
|
1469
1469
|
const {
|
|
1470
1470
|
__scopeSelect: t,
|
|
1471
1471
|
align: o = "start",
|
|
@@ -1473,7 +1473,7 @@ var $o = "SelectPopperPosition", et = c.forwardRef((e, n) => {
|
|
|
1473
1473
|
...i
|
|
1474
1474
|
} = e, s = Ve(t);
|
|
1475
1475
|
return /* @__PURE__ */ a.jsx(
|
|
1476
|
-
|
|
1476
|
+
hr,
|
|
1477
1477
|
{
|
|
1478
1478
|
...s,
|
|
1479
1479
|
...i,
|
|
@@ -1493,8 +1493,8 @@ var $o = "SelectPopperPosition", et = c.forwardRef((e, n) => {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
);
|
|
1495
1495
|
});
|
|
1496
|
-
et.displayName =
|
|
1497
|
-
var [
|
|
1496
|
+
et.displayName = Vo;
|
|
1497
|
+
var [Ko, mt] = Se(me, {}), tt = "SelectViewport", vn = c.forwardRef(
|
|
1498
1498
|
(e, n) => {
|
|
1499
1499
|
const { __scopeSelect: t, nonce: o, ...r } = e, i = se(tt, t), s = mt(tt, t), l = V(n, i.onViewportChange), d = c.useRef(0);
|
|
1500
1500
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -1508,7 +1508,7 @@ var [Vo, mt] = Se(me, {}), tt = "SelectViewport", hn = c.forwardRef(
|
|
|
1508
1508
|
}
|
|
1509
1509
|
),
|
|
1510
1510
|
/* @__PURE__ */ a.jsx(Fe.Slot, { scope: t, children: /* @__PURE__ */ a.jsx(
|
|
1511
|
-
|
|
1511
|
+
j.div,
|
|
1512
1512
|
{
|
|
1513
1513
|
"data-radix-select-viewport": "",
|
|
1514
1514
|
role: "presentation",
|
|
@@ -1532,7 +1532,7 @@ var [Vo, mt] = Se(me, {}), tt = "SelectViewport", hn = c.forwardRef(
|
|
|
1532
1532
|
if (g?.current && f) {
|
|
1533
1533
|
const x = Math.abs(d.current - p.scrollTop);
|
|
1534
1534
|
if (x > 0) {
|
|
1535
|
-
const S = window.innerHeight - ee * 2,
|
|
1535
|
+
const S = window.innerHeight - ee * 2, h = parseFloat(f.style.minHeight), m = parseFloat(f.style.height), b = Math.max(h, m);
|
|
1536
1536
|
if (b < S) {
|
|
1537
1537
|
const w = b + x, y = Math.min(S, w), R = w - y;
|
|
1538
1538
|
f.style.height = y + "px", f.style.bottom === "0px" && (p.scrollTop = R > 0 ? R : 0, f.style.justifyContent = "flex-end");
|
|
@@ -1546,22 +1546,22 @@ var [Vo, mt] = Se(me, {}), tt = "SelectViewport", hn = c.forwardRef(
|
|
|
1546
1546
|
] });
|
|
1547
1547
|
}
|
|
1548
1548
|
);
|
|
1549
|
-
|
|
1550
|
-
var
|
|
1549
|
+
vn.displayName = tt;
|
|
1550
|
+
var gn = "SelectGroup", [Ho, Uo] = Se(gn), Go = c.forwardRef(
|
|
1551
1551
|
(e, n) => {
|
|
1552
1552
|
const { __scopeSelect: t, ...o } = e, r = te();
|
|
1553
|
-
return /* @__PURE__ */ a.jsx(
|
|
1553
|
+
return /* @__PURE__ */ a.jsx(Ho, { scope: t, id: r, children: /* @__PURE__ */ a.jsx(j.div, { role: "group", "aria-labelledby": r, ...o, ref: n }) });
|
|
1554
1554
|
}
|
|
1555
1555
|
);
|
|
1556
|
-
|
|
1557
|
-
var
|
|
1556
|
+
Go.displayName = gn;
|
|
1557
|
+
var xn = "SelectLabel", zo = c.forwardRef(
|
|
1558
1558
|
(e, n) => {
|
|
1559
|
-
const { __scopeSelect: t, ...o } = e, r =
|
|
1560
|
-
return /* @__PURE__ */ a.jsx(
|
|
1559
|
+
const { __scopeSelect: t, ...o } = e, r = Uo(xn, t);
|
|
1560
|
+
return /* @__PURE__ */ a.jsx(j.div, { id: r.id, ...o, ref: n });
|
|
1561
1561
|
}
|
|
1562
1562
|
);
|
|
1563
|
-
|
|
1564
|
-
var Te = "SelectItem", [
|
|
1563
|
+
zo.displayName = xn;
|
|
1564
|
+
var Te = "SelectItem", [Wo, bn] = Se(Te), Sn = c.forwardRef(
|
|
1565
1565
|
(e, n) => {
|
|
1566
1566
|
const {
|
|
1567
1567
|
__scopeSelect: t,
|
|
@@ -1572,7 +1572,7 @@ var Te = "SelectItem", [zo, xn] = Se(Te), bn = c.forwardRef(
|
|
|
1572
1572
|
} = e, l = ae(Te, t), d = se(Te, t), u = l.value === o, [p, f] = c.useState(i ?? ""), [g, x] = c.useState(!1), S = V(
|
|
1573
1573
|
n,
|
|
1574
1574
|
(w) => d.itemRefCallback?.(w, o, r)
|
|
1575
|
-
),
|
|
1575
|
+
), h = te(), m = c.useRef("touch"), b = () => {
|
|
1576
1576
|
r || (l.onValueChange(o), l.onOpenChange(!1));
|
|
1577
1577
|
};
|
|
1578
1578
|
if (o === "")
|
|
@@ -1580,12 +1580,12 @@ var Te = "SelectItem", [zo, xn] = Se(Te), bn = c.forwardRef(
|
|
|
1580
1580
|
"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."
|
|
1581
1581
|
);
|
|
1582
1582
|
return /* @__PURE__ */ a.jsx(
|
|
1583
|
-
|
|
1583
|
+
Wo,
|
|
1584
1584
|
{
|
|
1585
1585
|
scope: t,
|
|
1586
1586
|
value: o,
|
|
1587
1587
|
disabled: r,
|
|
1588
|
-
textId:
|
|
1588
|
+
textId: h,
|
|
1589
1589
|
isSelected: u,
|
|
1590
1590
|
onItemTextChange: c.useCallback((w) => {
|
|
1591
1591
|
f((y) => y || (w?.textContent ?? "").trim());
|
|
@@ -1598,10 +1598,10 @@ var Te = "SelectItem", [zo, xn] = Se(Te), bn = c.forwardRef(
|
|
|
1598
1598
|
disabled: r,
|
|
1599
1599
|
textValue: p,
|
|
1600
1600
|
children: /* @__PURE__ */ a.jsx(
|
|
1601
|
-
|
|
1601
|
+
j.div,
|
|
1602
1602
|
{
|
|
1603
1603
|
role: "option",
|
|
1604
|
-
"aria-labelledby":
|
|
1604
|
+
"aria-labelledby": h,
|
|
1605
1605
|
"data-highlighted": g ? "" : void 0,
|
|
1606
1606
|
"aria-selected": u && g,
|
|
1607
1607
|
"data-state": u ? "checked" : "unchecked",
|
|
@@ -1613,22 +1613,22 @@ var Te = "SelectItem", [zo, xn] = Se(Te), bn = c.forwardRef(
|
|
|
1613
1613
|
onFocus: P(s.onFocus, () => x(!0)),
|
|
1614
1614
|
onBlur: P(s.onBlur, () => x(!1)),
|
|
1615
1615
|
onClick: P(s.onClick, () => {
|
|
1616
|
-
|
|
1616
|
+
m.current !== "mouse" && b();
|
|
1617
1617
|
}),
|
|
1618
1618
|
onPointerUp: P(s.onPointerUp, () => {
|
|
1619
|
-
|
|
1619
|
+
m.current === "mouse" && b();
|
|
1620
1620
|
}),
|
|
1621
1621
|
onPointerDown: P(s.onPointerDown, (w) => {
|
|
1622
|
-
|
|
1622
|
+
m.current = w.pointerType;
|
|
1623
1623
|
}),
|
|
1624
1624
|
onPointerMove: P(s.onPointerMove, (w) => {
|
|
1625
|
-
|
|
1625
|
+
m.current = w.pointerType, r ? d.onItemLeave?.() : m.current === "mouse" && w.currentTarget.focus({ preventScroll: !0 });
|
|
1626
1626
|
}),
|
|
1627
1627
|
onPointerLeave: P(s.onPointerLeave, (w) => {
|
|
1628
1628
|
w.currentTarget === document.activeElement && d.onItemLeave?.();
|
|
1629
1629
|
}),
|
|
1630
1630
|
onKeyDown: P(s.onKeyDown, (w) => {
|
|
1631
|
-
d.searchRef?.current !== "" && w.key === " " || (
|
|
1631
|
+
d.searchRef?.current !== "" && w.key === " " || (No.includes(w.key) && b(), w.key === " " && w.preventDefault());
|
|
1632
1632
|
})
|
|
1633
1633
|
}
|
|
1634
1634
|
)
|
|
@@ -1638,10 +1638,10 @@ var Te = "SelectItem", [zo, xn] = Se(Te), bn = c.forwardRef(
|
|
|
1638
1638
|
);
|
|
1639
1639
|
}
|
|
1640
1640
|
);
|
|
1641
|
-
|
|
1642
|
-
var Ie = "SelectItemText",
|
|
1641
|
+
Sn.displayName = Te;
|
|
1642
|
+
var Ie = "SelectItemText", wn = c.forwardRef(
|
|
1643
1643
|
(e, n) => {
|
|
1644
|
-
const { __scopeSelect: t, className: o, style: r, ...i } = e, s = ae(Ie, t), l = se(Ie, t), d =
|
|
1644
|
+
const { __scopeSelect: t, className: o, style: r, ...i } = e, s = ae(Ie, t), l = se(Ie, t), d = bn(Ie, t), u = Do(Ie, t), [p, f] = c.useState(null), g = V(
|
|
1645
1645
|
n,
|
|
1646
1646
|
(b) => f(b),
|
|
1647
1647
|
d.onItemTextChange,
|
|
@@ -1649,22 +1649,22 @@ var Ie = "SelectItemText", Sn = c.forwardRef(
|
|
|
1649
1649
|
), x = p?.textContent, S = c.useMemo(
|
|
1650
1650
|
() => /* @__PURE__ */ a.jsx("option", { value: d.value, disabled: d.disabled, children: x }, d.value),
|
|
1651
1651
|
[d.disabled, d.value, x]
|
|
1652
|
-
), { onNativeOptionAdd:
|
|
1653
|
-
return re(() => (
|
|
1654
|
-
/* @__PURE__ */ a.jsx(
|
|
1655
|
-
d.isSelected && s.valueNode && !s.valueNodeHasChildren ?
|
|
1652
|
+
), { onNativeOptionAdd: h, onNativeOptionRemove: m } = u;
|
|
1653
|
+
return re(() => (h(S), () => m(S)), [h, m, S]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1654
|
+
/* @__PURE__ */ a.jsx(j.span, { id: d.textId, ...i, ref: g }),
|
|
1655
|
+
d.isSelected && s.valueNode && !s.valueNodeHasChildren ? Nt.createPortal(i.children, s.valueNode) : null
|
|
1656
1656
|
] });
|
|
1657
1657
|
}
|
|
1658
1658
|
);
|
|
1659
|
-
|
|
1660
|
-
var
|
|
1659
|
+
wn.displayName = Ie;
|
|
1660
|
+
var yn = "SelectItemIndicator", Cn = c.forwardRef(
|
|
1661
1661
|
(e, n) => {
|
|
1662
1662
|
const { __scopeSelect: t, ...o } = e;
|
|
1663
|
-
return
|
|
1663
|
+
return bn(yn, t).isSelected ? /* @__PURE__ */ a.jsx(j.span, { "aria-hidden": !0, ...o, ref: n }) : null;
|
|
1664
1664
|
}
|
|
1665
1665
|
);
|
|
1666
|
-
|
|
1667
|
-
var nt = "SelectScrollUpButton",
|
|
1666
|
+
Cn.displayName = yn;
|
|
1667
|
+
var nt = "SelectScrollUpButton", In = c.forwardRef((e, n) => {
|
|
1668
1668
|
const t = se(nt, e.__scopeSelect), o = mt(nt, e.__scopeSelect), [r, i] = c.useState(!1), s = V(n, o.onScrollButtonChange);
|
|
1669
1669
|
return re(() => {
|
|
1670
1670
|
if (t.viewport && t.isPositioned) {
|
|
@@ -1676,7 +1676,7 @@ var nt = "SelectScrollUpButton", Cn = c.forwardRef((e, n) => {
|
|
|
1676
1676
|
return l(), d.addEventListener("scroll", l), () => d.removeEventListener("scroll", l);
|
|
1677
1677
|
}
|
|
1678
1678
|
}, [t.viewport, t.isPositioned]), r ? /* @__PURE__ */ a.jsx(
|
|
1679
|
-
|
|
1679
|
+
kn,
|
|
1680
1680
|
{
|
|
1681
1681
|
...e,
|
|
1682
1682
|
ref: s,
|
|
@@ -1687,8 +1687,8 @@ var nt = "SelectScrollUpButton", Cn = c.forwardRef((e, n) => {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
) : null;
|
|
1689
1689
|
});
|
|
1690
|
-
|
|
1691
|
-
var rt = "SelectScrollDownButton",
|
|
1690
|
+
In.displayName = nt;
|
|
1691
|
+
var rt = "SelectScrollDownButton", Rn = c.forwardRef((e, n) => {
|
|
1692
1692
|
const t = se(rt, e.__scopeSelect), o = mt(rt, e.__scopeSelect), [r, i] = c.useState(!1), s = V(n, o.onScrollButtonChange);
|
|
1693
1693
|
return re(() => {
|
|
1694
1694
|
if (t.viewport && t.isPositioned) {
|
|
@@ -1700,7 +1700,7 @@ var rt = "SelectScrollDownButton", In = c.forwardRef((e, n) => {
|
|
|
1700
1700
|
return l(), d.addEventListener("scroll", l), () => d.removeEventListener("scroll", l);
|
|
1701
1701
|
}
|
|
1702
1702
|
}, [t.viewport, t.isPositioned]), r ? /* @__PURE__ */ a.jsx(
|
|
1703
|
-
|
|
1703
|
+
kn,
|
|
1704
1704
|
{
|
|
1705
1705
|
...e,
|
|
1706
1706
|
ref: s,
|
|
@@ -1711,15 +1711,15 @@ var rt = "SelectScrollDownButton", In = c.forwardRef((e, n) => {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
) : null;
|
|
1713
1713
|
});
|
|
1714
|
-
|
|
1715
|
-
var
|
|
1714
|
+
Rn.displayName = rt;
|
|
1715
|
+
var kn = c.forwardRef((e, n) => {
|
|
1716
1716
|
const { __scopeSelect: t, onAutoScroll: o, ...r } = e, i = se("SelectScrollButton", t), s = c.useRef(null), l = $e(t), d = c.useCallback(() => {
|
|
1717
1717
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
1718
1718
|
}, []);
|
|
1719
1719
|
return c.useEffect(() => () => d(), [d]), re(() => {
|
|
1720
1720
|
l().find((p) => p.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1721
1721
|
}, [l]), /* @__PURE__ */ a.jsx(
|
|
1722
|
-
|
|
1722
|
+
j.div,
|
|
1723
1723
|
{
|
|
1724
1724
|
"aria-hidden": !0,
|
|
1725
1725
|
...r,
|
|
@@ -1736,23 +1736,23 @@ var Rn = c.forwardRef((e, n) => {
|
|
|
1736
1736
|
})
|
|
1737
1737
|
}
|
|
1738
1738
|
);
|
|
1739
|
-
}),
|
|
1739
|
+
}), qo = "SelectSeparator", Yo = c.forwardRef(
|
|
1740
1740
|
(e, n) => {
|
|
1741
1741
|
const { __scopeSelect: t, ...o } = e;
|
|
1742
|
-
return /* @__PURE__ */ a.jsx(
|
|
1742
|
+
return /* @__PURE__ */ a.jsx(j.div, { "aria-hidden": !0, ...o, ref: n });
|
|
1743
1743
|
}
|
|
1744
1744
|
);
|
|
1745
|
-
|
|
1746
|
-
var ot = "SelectArrow",
|
|
1745
|
+
Yo.displayName = qo;
|
|
1746
|
+
var ot = "SelectArrow", Xo = c.forwardRef(
|
|
1747
1747
|
(e, n) => {
|
|
1748
1748
|
const { __scopeSelect: t, ...o } = e, r = Ve(t), i = ae(ot, t), s = se(ot, t);
|
|
1749
|
-
return i.open && s.position === "popper" ? /* @__PURE__ */ a.jsx(
|
|
1749
|
+
return i.open && s.position === "popper" ? /* @__PURE__ */ a.jsx(vr, { ...r, ...o, ref: n }) : null;
|
|
1750
1750
|
}
|
|
1751
1751
|
);
|
|
1752
|
-
|
|
1753
|
-
var
|
|
1752
|
+
Xo.displayName = ot;
|
|
1753
|
+
var Zo = "SelectBubbleInput", En = c.forwardRef(
|
|
1754
1754
|
({ __scopeSelect: e, value: n, ...t }, o) => {
|
|
1755
|
-
const r = c.useRef(null), i = V(o, r), s =
|
|
1755
|
+
const r = c.useRef(null), i = V(o, r), s = _e(n);
|
|
1756
1756
|
return c.useEffect(() => {
|
|
1757
1757
|
const l = r.current;
|
|
1758
1758
|
if (!l) return;
|
|
@@ -1765,22 +1765,22 @@ var Xo = "SelectBubbleInput", kn = c.forwardRef(
|
|
|
1765
1765
|
p.call(l, n), l.dispatchEvent(f);
|
|
1766
1766
|
}
|
|
1767
1767
|
}, [s, n]), /* @__PURE__ */ a.jsx(
|
|
1768
|
-
|
|
1768
|
+
j.select,
|
|
1769
1769
|
{
|
|
1770
1770
|
...t,
|
|
1771
|
-
style: { ...
|
|
1771
|
+
style: { ...cr, ...t.style },
|
|
1772
1772
|
ref: i,
|
|
1773
1773
|
defaultValue: n
|
|
1774
1774
|
}
|
|
1775
1775
|
);
|
|
1776
1776
|
}
|
|
1777
1777
|
);
|
|
1778
|
-
|
|
1779
|
-
function
|
|
1778
|
+
En.displayName = Zo;
|
|
1779
|
+
function _n(e) {
|
|
1780
1780
|
return e === "" || e === void 0;
|
|
1781
1781
|
}
|
|
1782
1782
|
function jn(e) {
|
|
1783
|
-
const n =
|
|
1783
|
+
const n = yt(e), t = c.useRef(""), o = c.useRef(0), r = c.useCallback(
|
|
1784
1784
|
(s) => {
|
|
1785
1785
|
const l = t.current + s;
|
|
1786
1786
|
n(l), function d(u) {
|
|
@@ -1793,33 +1793,33 @@ function jn(e) {
|
|
|
1793
1793
|
}, []);
|
|
1794
1794
|
return c.useEffect(() => () => window.clearTimeout(o.current), []), [t, r, i];
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function Pn(e, n, t) {
|
|
1797
1797
|
const r = n.length > 1 && Array.from(n).every((u) => u === n[0]) ? n[0] : n, i = t ? e.indexOf(t) : -1;
|
|
1798
|
-
let s =
|
|
1798
|
+
let s = Jo(e, Math.max(i, 0));
|
|
1799
1799
|
r.length === 1 && (s = s.filter((u) => u !== t));
|
|
1800
1800
|
const d = s.find(
|
|
1801
1801
|
(u) => u.textValue.toLowerCase().startsWith(r.toLowerCase())
|
|
1802
1802
|
);
|
|
1803
1803
|
return d !== t ? d : void 0;
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function Jo(e, n) {
|
|
1806
1806
|
return e.map((t, o) => e[(n + o) % e.length]);
|
|
1807
1807
|
}
|
|
1808
|
-
var
|
|
1809
|
-
function da({ ...e }) {
|
|
1810
|
-
return /* @__PURE__ */ a.jsx(Jo, { "data-slot": "select", ...e });
|
|
1811
|
-
}
|
|
1808
|
+
var Qo = on, ea = sn, ta = ln, na = dn, ra = un, oa = pn, aa = vn, sa = Sn, ia = wn, ca = Cn, la = In, da = Rn;
|
|
1812
1809
|
function ua({ ...e }) {
|
|
1813
|
-
return /* @__PURE__ */ a.jsx(
|
|
1810
|
+
return /* @__PURE__ */ a.jsx(Qo, { "data-slot": "select", ...e });
|
|
1814
1811
|
}
|
|
1815
|
-
function pa({
|
|
1812
|
+
function pa({ ...e }) {
|
|
1813
|
+
return /* @__PURE__ */ a.jsx(ta, { "data-slot": "select-value", ...e });
|
|
1814
|
+
}
|
|
1815
|
+
function fa({
|
|
1816
1816
|
className: e,
|
|
1817
1817
|
size: n = "default",
|
|
1818
1818
|
children: t,
|
|
1819
1819
|
...o
|
|
1820
1820
|
}) {
|
|
1821
1821
|
return /* @__PURE__ */ a.jsxs(
|
|
1822
|
-
|
|
1822
|
+
ea,
|
|
1823
1823
|
{
|
|
1824
1824
|
className: B(
|
|
1825
1825
|
"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 shadow-xs 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",
|
|
@@ -1830,20 +1830,20 @@ function pa({
|
|
|
1830
1830
|
...o,
|
|
1831
1831
|
children: [
|
|
1832
1832
|
t,
|
|
1833
|
-
/* @__PURE__ */ a.jsx(
|
|
1833
|
+
/* @__PURE__ */ a.jsx(na, { asChild: !0, children: /* @__PURE__ */ a.jsx(_t, { className: "size-4 opacity-50" }) })
|
|
1834
1834
|
]
|
|
1835
1835
|
}
|
|
1836
1836
|
);
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function ma({
|
|
1839
1839
|
className: e,
|
|
1840
1840
|
children: n,
|
|
1841
1841
|
position: t = "popper",
|
|
1842
1842
|
align: o = "center",
|
|
1843
1843
|
...r
|
|
1844
1844
|
}) {
|
|
1845
|
-
return /* @__PURE__ */ a.jsx(
|
|
1846
|
-
|
|
1845
|
+
return /* @__PURE__ */ a.jsx(ra, { children: /* @__PURE__ */ a.jsxs(
|
|
1846
|
+
oa,
|
|
1847
1847
|
{
|
|
1848
1848
|
align: o,
|
|
1849
1849
|
className: B(
|
|
@@ -1857,7 +1857,7 @@ function fa({
|
|
|
1857
1857
|
children: [
|
|
1858
1858
|
/* @__PURE__ */ a.jsx(ha, {}),
|
|
1859
1859
|
/* @__PURE__ */ a.jsx(
|
|
1860
|
-
|
|
1860
|
+
aa,
|
|
1861
1861
|
{
|
|
1862
1862
|
className: B(
|
|
1863
1863
|
"p-1",
|
|
@@ -1871,9 +1871,9 @@ function fa({
|
|
|
1871
1871
|
}
|
|
1872
1872
|
) });
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function xt({ className: e, children: n, ...t }) {
|
|
1875
1875
|
return /* @__PURE__ */ a.jsxs(
|
|
1876
|
-
|
|
1876
|
+
sa,
|
|
1877
1877
|
{
|
|
1878
1878
|
className: B(
|
|
1879
1879
|
"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",
|
|
@@ -1882,20 +1882,20 @@ function ma({ className: e, children: n, ...t }) {
|
|
|
1882
1882
|
"data-slot": "select-item",
|
|
1883
1883
|
...t,
|
|
1884
1884
|
children: [
|
|
1885
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1886
|
-
/* @__PURE__ */ a.jsx(
|
|
1885
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(ca, { children: /* @__PURE__ */ a.jsx(ut, { className: "size-4" }) }) }),
|
|
1886
|
+
/* @__PURE__ */ a.jsx(ia, { children: n })
|
|
1887
1887
|
]
|
|
1888
1888
|
}
|
|
1889
1889
|
);
|
|
1890
1890
|
}
|
|
1891
1891
|
function ha({ className: e, ...n }) {
|
|
1892
1892
|
return /* @__PURE__ */ a.jsx(
|
|
1893
|
-
|
|
1893
|
+
la,
|
|
1894
1894
|
{
|
|
1895
1895
|
className: B("flex cursor-default items-center justify-center py-1", e),
|
|
1896
1896
|
"data-slot": "select-scroll-up-button",
|
|
1897
1897
|
...n,
|
|
1898
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1898
|
+
children: /* @__PURE__ */ a.jsx(Nr, { className: "size-4" })
|
|
1899
1899
|
}
|
|
1900
1900
|
);
|
|
1901
1901
|
}
|
|
@@ -1904,12 +1904,12 @@ function va({
|
|
|
1904
1904
|
...n
|
|
1905
1905
|
}) {
|
|
1906
1906
|
return /* @__PURE__ */ a.jsx(
|
|
1907
|
-
|
|
1907
|
+
da,
|
|
1908
1908
|
{
|
|
1909
1909
|
className: B("flex cursor-default items-center justify-center py-1", e),
|
|
1910
1910
|
"data-slot": "select-scroll-down-button",
|
|
1911
1911
|
...n,
|
|
1912
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1912
|
+
children: /* @__PURE__ */ a.jsx(_t, { className: "size-4" })
|
|
1913
1913
|
}
|
|
1914
1914
|
);
|
|
1915
1915
|
}
|
|
@@ -1935,104 +1935,109 @@ const Bs = ({
|
|
|
1935
1935
|
p === "lg" && "h-10 text-lg md:text-base",
|
|
1936
1936
|
p === "xl" && "h-11 text-xl md:text-lg",
|
|
1937
1937
|
s
|
|
1938
|
-
), x = p === "xs" || p === "sm" ? "sm" : "default"
|
|
1938
|
+
), x = p === "xs" || p === "sm" ? "sm" : "default", S = "__none__", h = (m) => {
|
|
1939
|
+
d(m === S ? "" : m);
|
|
1940
|
+
};
|
|
1939
1941
|
return /* @__PURE__ */ a.jsxs(pe, { className: "w-full", direction: "col", gap: "2", children: [
|
|
1940
1942
|
o && /* @__PURE__ */ a.jsx(ue, { htmlFor: e, children: o }),
|
|
1941
1943
|
/* @__PURE__ */ a.jsxs(
|
|
1942
|
-
|
|
1944
|
+
ua,
|
|
1943
1945
|
{
|
|
1944
1946
|
defaultValue: n,
|
|
1945
1947
|
name: e,
|
|
1946
|
-
onValueChange:
|
|
1948
|
+
onValueChange: h,
|
|
1947
1949
|
value: l,
|
|
1948
1950
|
...f,
|
|
1949
1951
|
children: [
|
|
1950
|
-
/* @__PURE__ */ a.jsx(
|
|
1951
|
-
/* @__PURE__ */ a.
|
|
1952
|
+
/* @__PURE__ */ a.jsx(fa, { className: g, "data-testid": `select-input-${e}`, size: x, children: /* @__PURE__ */ a.jsx(pa, { placeholder: r }) }),
|
|
1953
|
+
/* @__PURE__ */ a.jsxs(ma, { children: [
|
|
1954
|
+
/* @__PURE__ */ a.jsx(xt, { className: "border-b border-b-border", value: S, children: " " }, "empty-option"),
|
|
1955
|
+
t.map(({ value: m, label: b }) => /* @__PURE__ */ a.jsx(xt, { value: m, children: b }, `option-${m}`))
|
|
1956
|
+
] })
|
|
1952
1957
|
]
|
|
1953
1958
|
}
|
|
1954
1959
|
),
|
|
1955
|
-
i && /* @__PURE__ */ a.jsx(
|
|
1960
|
+
i && /* @__PURE__ */ a.jsx(Pt, { size: "sm", variant: "muted", children: i }),
|
|
1956
1961
|
u && /* @__PURE__ */ a.jsx(Oe, { message: u })
|
|
1957
1962
|
] });
|
|
1958
1963
|
};
|
|
1959
|
-
var
|
|
1964
|
+
var bt = 1, ga = 0.9, xa = 0.8, ba = 0.17, Xe = 0.1, Ze = 0.999, Sa = 0.9999, wa = 0.99, ya = /[\\\/_+.#"@\[\(\{&]/, Ca = /[\\\/_+.#"@\[\(\{&]/g, Ia = /[\s-]/, Nn = /[\s-]/g;
|
|
1960
1965
|
function at(e, n, t, o, r, i, s) {
|
|
1961
|
-
if (i === n.length) return r === e.length ?
|
|
1966
|
+
if (i === n.length) return r === e.length ? bt : wa;
|
|
1962
1967
|
var l = `${r},${i}`;
|
|
1963
1968
|
if (s[l] !== void 0) return s[l];
|
|
1964
|
-
for (var d = o.charAt(i), u = t.indexOf(d, r), p = 0, f, g, x, S; u >= 0; ) f = at(e, n, t, o, u + 1, i + 1, s), f > p && (u === r ? f *=
|
|
1969
|
+
for (var d = o.charAt(i), u = t.indexOf(d, r), p = 0, f, g, x, S; u >= 0; ) f = at(e, n, t, o, u + 1, i + 1, s), f > p && (u === r ? f *= bt : ya.test(e.charAt(u - 1)) ? (f *= xa, x = e.slice(r, u - 1).match(Ca), x && r > 0 && (f *= Math.pow(Ze, x.length))) : Ia.test(e.charAt(u - 1)) ? (f *= ga, S = e.slice(r, u - 1).match(Nn), S && r > 0 && (f *= Math.pow(Ze, S.length))) : (f *= ba, r > 0 && (f *= Math.pow(Ze, u - r))), e.charAt(u) !== n.charAt(i) && (f *= Sa)), (f < Xe && t.charAt(u - 1) === o.charAt(i + 1) || o.charAt(i + 1) === o.charAt(i) && t.charAt(u - 1) !== o.charAt(i)) && (g = at(e, n, t, o, u + 1, i + 2, s), g * Xe > f && (f = g * Xe)), f > p && (p = f), u = t.indexOf(d, u + 1);
|
|
1965
1970
|
return s[l] = p, p;
|
|
1966
1971
|
}
|
|
1967
|
-
function
|
|
1968
|
-
return e.toLowerCase().replace(
|
|
1972
|
+
function St(e) {
|
|
1973
|
+
return e.toLowerCase().replace(Nn, " ");
|
|
1969
1974
|
}
|
|
1970
1975
|
function Ra(e, n, t) {
|
|
1971
|
-
return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, at(e, n,
|
|
1976
|
+
return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, at(e, n, St(e), St(n), 0, 0, {});
|
|
1972
1977
|
}
|
|
1973
|
-
var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-heading=""]',
|
|
1978
|
+
var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-heading=""]', Tn = '[cmdk-item=""]', wt = `${Tn}:not([aria-disabled="true"])`, st = "cmdk-item-select", xe = "data-value", Ea = (e, n, t) => Ra(e, n, t), Mn = c.createContext(void 0), je = () => c.useContext(Mn), An = c.createContext(void 0), ht = () => c.useContext(An), Dn = c.createContext(void 0), On = c.forwardRef((e, n) => {
|
|
1974
1979
|
let t = be(() => {
|
|
1975
|
-
var
|
|
1976
|
-
return { search: "", value: (k = (
|
|
1977
|
-
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), i = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Set()), l =
|
|
1980
|
+
var v, k;
|
|
1981
|
+
return { search: "", value: (k = (v = e.value) != null ? v : e.defaultValue) != null ? k : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
1982
|
+
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), i = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Set()), l = Ln(e), { label: d, children: u, value: p, onValueChange: f, filter: g, shouldFilter: x, loop: S, disablePointerSelection: h = !1, vimBindings: m = !0, ...b } = e, w = te(), y = te(), R = te(), A = c.useRef(null), N = Ba();
|
|
1978
1983
|
he(() => {
|
|
1979
1984
|
if (p !== void 0) {
|
|
1980
|
-
let
|
|
1981
|
-
t.current.value =
|
|
1985
|
+
let v = p.trim();
|
|
1986
|
+
t.current.value = v, _.emit();
|
|
1982
1987
|
}
|
|
1983
1988
|
}, [p]), he(() => {
|
|
1984
1989
|
N(6, X);
|
|
1985
1990
|
}, []);
|
|
1986
|
-
let
|
|
1991
|
+
let _ = c.useMemo(() => ({ subscribe: (v) => (s.current.add(v), () => s.current.delete(v)), snapshot: () => t.current, setState: (v, k, E) => {
|
|
1987
1992
|
var I, T, C, M;
|
|
1988
|
-
if (!Object.is(t.current[
|
|
1989
|
-
if (t.current[
|
|
1990
|
-
else if (
|
|
1993
|
+
if (!Object.is(t.current[v], k)) {
|
|
1994
|
+
if (t.current[v] = k, v === "search") K(), z(), N(1, D);
|
|
1995
|
+
else if (v === "value") {
|
|
1991
1996
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
1992
1997
|
let F = document.getElementById(R);
|
|
1993
1998
|
F ? F.focus() : (I = document.getElementById(w)) == null || I.focus();
|
|
1994
1999
|
}
|
|
1995
2000
|
if (N(7, () => {
|
|
1996
2001
|
var F;
|
|
1997
|
-
t.current.selectedItemId = (F = W()) == null ? void 0 : F.id,
|
|
2002
|
+
t.current.selectedItemId = (F = W()) == null ? void 0 : F.id, _.emit();
|
|
1998
2003
|
}), E || N(5, X), ((T = l.current) == null ? void 0 : T.value) !== void 0) {
|
|
1999
2004
|
let F = k ?? "";
|
|
2000
2005
|
(M = (C = l.current).onValueChange) == null || M.call(C, F);
|
|
2001
2006
|
return;
|
|
2002
2007
|
}
|
|
2003
2008
|
}
|
|
2004
|
-
|
|
2009
|
+
_.emit();
|
|
2005
2010
|
}
|
|
2006
2011
|
}, emit: () => {
|
|
2007
|
-
s.current.forEach((
|
|
2008
|
-
} }), []), L = c.useMemo(() => ({ value: (
|
|
2012
|
+
s.current.forEach((v) => v());
|
|
2013
|
+
} }), []), L = c.useMemo(() => ({ value: (v, k, E) => {
|
|
2009
2014
|
var I;
|
|
2010
|
-
k !== ((I = i.current.get(
|
|
2011
|
-
z(),
|
|
2015
|
+
k !== ((I = i.current.get(v)) == null ? void 0 : I.value) && (i.current.set(v, { value: k, keywords: E }), t.current.filtered.items.set(v, Z(k, E)), N(2, () => {
|
|
2016
|
+
z(), _.emit();
|
|
2012
2017
|
}));
|
|
2013
|
-
}, item: (
|
|
2014
|
-
K(), z(), t.current.value || D(),
|
|
2018
|
+
}, item: (v, k) => (o.current.add(v), k && (r.current.has(k) ? r.current.get(k).add(v) : r.current.set(k, /* @__PURE__ */ new Set([v]))), N(3, () => {
|
|
2019
|
+
K(), z(), t.current.value || D(), _.emit();
|
|
2015
2020
|
}), () => {
|
|
2016
|
-
i.current.delete(
|
|
2021
|
+
i.current.delete(v), o.current.delete(v), t.current.filtered.items.delete(v);
|
|
2017
2022
|
let E = W();
|
|
2018
2023
|
N(4, () => {
|
|
2019
|
-
K(), E?.getAttribute("id") ===
|
|
2024
|
+
K(), E?.getAttribute("id") === v && D(), _.emit();
|
|
2020
2025
|
});
|
|
2021
|
-
}), group: (
|
|
2022
|
-
i.current.delete(
|
|
2026
|
+
}), group: (v) => (r.current.has(v) || r.current.set(v, /* @__PURE__ */ new Set()), () => {
|
|
2027
|
+
i.current.delete(v), r.current.delete(v);
|
|
2023
2028
|
}), filter: () => l.current.shouldFilter, label: d || e["aria-label"], getDisablePointerSelection: () => l.current.disablePointerSelection, listId: w, inputId: R, labelId: y, listInnerRef: A }), []);
|
|
2024
|
-
function Z(
|
|
2029
|
+
function Z(v, k) {
|
|
2025
2030
|
var E, I;
|
|
2026
2031
|
let T = (I = (E = l.current) == null ? void 0 : E.filter) != null ? I : Ea;
|
|
2027
|
-
return
|
|
2032
|
+
return v ? T(v, t.current.search, k) : 0;
|
|
2028
2033
|
}
|
|
2029
2034
|
function z() {
|
|
2030
2035
|
if (!t.current.search || l.current.shouldFilter === !1) return;
|
|
2031
|
-
let
|
|
2036
|
+
let v = t.current.filtered.items, k = [];
|
|
2032
2037
|
t.current.filtered.groups.forEach((I) => {
|
|
2033
2038
|
let T = r.current.get(I), C = 0;
|
|
2034
2039
|
T.forEach((M) => {
|
|
2035
|
-
let F =
|
|
2040
|
+
let F = v.get(M);
|
|
2036
2041
|
C = Math.max(F, C);
|
|
2037
2042
|
}), k.push([I, C]);
|
|
2038
2043
|
});
|
|
@@ -2040,7 +2045,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2040
2045
|
U().sort((I, T) => {
|
|
2041
2046
|
var C, M;
|
|
2042
2047
|
let F = I.getAttribute("id"), $ = T.getAttribute("id");
|
|
2043
|
-
return ((C =
|
|
2048
|
+
return ((C = v.get($)) != null ? C : 0) - ((M = v.get(F)) != null ? M : 0);
|
|
2044
2049
|
}).forEach((I) => {
|
|
2045
2050
|
let T = I.closest(Je);
|
|
2046
2051
|
T ? T.appendChild(I.parentElement === T ? I : I.closest(`${Je} > *`)) : E.appendChild(I.parentElement === E ? I : I.closest(`${Je} > *`));
|
|
@@ -2051,11 +2056,11 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2051
2056
|
});
|
|
2052
2057
|
}
|
|
2053
2058
|
function D() {
|
|
2054
|
-
let
|
|
2055
|
-
|
|
2059
|
+
let v = U().find((E) => E.getAttribute("aria-disabled") !== "true"), k = v?.getAttribute(xe);
|
|
2060
|
+
_.setState("value", k || void 0);
|
|
2056
2061
|
}
|
|
2057
2062
|
function K() {
|
|
2058
|
-
var
|
|
2063
|
+
var v, k, E, I;
|
|
2059
2064
|
if (!t.current.search || l.current.shouldFilter === !1) {
|
|
2060
2065
|
t.current.filtered.count = o.current.size;
|
|
2061
2066
|
return;
|
|
@@ -2063,7 +2068,7 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2063
2068
|
t.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
2064
2069
|
let T = 0;
|
|
2065
2070
|
for (let C of o.current) {
|
|
2066
|
-
let M = (k = (
|
|
2071
|
+
let M = (k = (v = i.current.get(C)) == null ? void 0 : v.value) != null ? k : "", F = (I = (E = i.current.get(C)) == null ? void 0 : E.keywords) != null ? I : [], $ = Z(M, F);
|
|
2067
2072
|
t.current.filtered.items.set(C, $), $ > 0 && T++;
|
|
2068
2073
|
}
|
|
2069
2074
|
for (let [C, M] of r.current) for (let F of M) if (t.current.filtered.items.get(F) > 0) {
|
|
@@ -2073,70 +2078,70 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2073
2078
|
t.current.filtered.count = T;
|
|
2074
2079
|
}
|
|
2075
2080
|
function X() {
|
|
2076
|
-
var
|
|
2081
|
+
var v, k, E;
|
|
2077
2082
|
let I = W();
|
|
2078
|
-
I && (((
|
|
2083
|
+
I && (((v = I.parentElement) == null ? void 0 : v.firstChild) === I && ((E = (k = I.closest(Ce)) == null ? void 0 : k.querySelector(ka)) == null || E.scrollIntoView({ block: "nearest" })), I.scrollIntoView({ block: "nearest" }));
|
|
2079
2084
|
}
|
|
2080
2085
|
function W() {
|
|
2081
|
-
var
|
|
2082
|
-
return (
|
|
2086
|
+
var v;
|
|
2087
|
+
return (v = A.current) == null ? void 0 : v.querySelector(`${Tn}[aria-selected="true"]`);
|
|
2083
2088
|
}
|
|
2084
2089
|
function U() {
|
|
2085
|
-
var
|
|
2086
|
-
return Array.from(((
|
|
2090
|
+
var v;
|
|
2091
|
+
return Array.from(((v = A.current) == null ? void 0 : v.querySelectorAll(wt)) || []);
|
|
2087
2092
|
}
|
|
2088
|
-
function O(
|
|
2089
|
-
let k = U()[
|
|
2090
|
-
k &&
|
|
2093
|
+
function O(v) {
|
|
2094
|
+
let k = U()[v];
|
|
2095
|
+
k && _.setState("value", k.getAttribute(xe));
|
|
2091
2096
|
}
|
|
2092
|
-
function G(
|
|
2097
|
+
function G(v) {
|
|
2093
2098
|
var k;
|
|
2094
|
-
let E = W(), I = U(), T = I.findIndex((M) => M === E), C = I[T +
|
|
2095
|
-
(k = l.current) != null && k.loop && (C = T +
|
|
2099
|
+
let E = W(), I = U(), T = I.findIndex((M) => M === E), C = I[T + v];
|
|
2100
|
+
(k = l.current) != null && k.loop && (C = T + v < 0 ? I[I.length - 1] : T + v === I.length ? I[0] : I[T + v]), C && _.setState("value", C.getAttribute(xe));
|
|
2096
2101
|
}
|
|
2097
|
-
function q(
|
|
2102
|
+
function q(v) {
|
|
2098
2103
|
let k = W(), E = k?.closest(Ce), I;
|
|
2099
|
-
for (; E && !I; ) E =
|
|
2100
|
-
I ?
|
|
2104
|
+
for (; E && !I; ) E = v > 0 ? Oa(E, Ce) : La(E, Ce), I = E?.querySelector(wt);
|
|
2105
|
+
I ? _.setState("value", I.getAttribute(xe)) : G(v);
|
|
2101
2106
|
}
|
|
2102
|
-
let J = () => O(U().length - 1), ge = (
|
|
2103
|
-
|
|
2104
|
-
}, ie = (
|
|
2105
|
-
|
|
2107
|
+
let J = () => O(U().length - 1), ge = (v) => {
|
|
2108
|
+
v.preventDefault(), v.metaKey ? J() : v.altKey ? q(1) : G(1);
|
|
2109
|
+
}, ie = (v) => {
|
|
2110
|
+
v.preventDefault(), v.metaKey ? O(0) : v.altKey ? q(-1) : G(-1);
|
|
2106
2111
|
};
|
|
2107
|
-
return c.createElement(
|
|
2112
|
+
return c.createElement(j.div, { ref: n, tabIndex: -1, ...b, "cmdk-root": "", onKeyDown: (v) => {
|
|
2108
2113
|
var k;
|
|
2109
|
-
(k = b.onKeyDown) == null || k.call(b,
|
|
2110
|
-
let E =
|
|
2111
|
-
if (!(
|
|
2114
|
+
(k = b.onKeyDown) == null || k.call(b, v);
|
|
2115
|
+
let E = v.nativeEvent.isComposing || v.keyCode === 229;
|
|
2116
|
+
if (!(v.defaultPrevented || E)) switch (v.key) {
|
|
2112
2117
|
case "n":
|
|
2113
2118
|
case "j": {
|
|
2114
|
-
|
|
2119
|
+
m && v.ctrlKey && ge(v);
|
|
2115
2120
|
break;
|
|
2116
2121
|
}
|
|
2117
2122
|
case "ArrowDown": {
|
|
2118
|
-
ge(
|
|
2123
|
+
ge(v);
|
|
2119
2124
|
break;
|
|
2120
2125
|
}
|
|
2121
2126
|
case "p":
|
|
2122
2127
|
case "k": {
|
|
2123
|
-
|
|
2128
|
+
m && v.ctrlKey && ie(v);
|
|
2124
2129
|
break;
|
|
2125
2130
|
}
|
|
2126
2131
|
case "ArrowUp": {
|
|
2127
|
-
ie(
|
|
2132
|
+
ie(v);
|
|
2128
2133
|
break;
|
|
2129
2134
|
}
|
|
2130
2135
|
case "Home": {
|
|
2131
|
-
|
|
2136
|
+
v.preventDefault(), O(0);
|
|
2132
2137
|
break;
|
|
2133
2138
|
}
|
|
2134
2139
|
case "End": {
|
|
2135
|
-
|
|
2140
|
+
v.preventDefault(), J();
|
|
2136
2141
|
break;
|
|
2137
2142
|
}
|
|
2138
2143
|
case "Enter": {
|
|
2139
|
-
|
|
2144
|
+
v.preventDefault();
|
|
2140
2145
|
let I = W();
|
|
2141
2146
|
if (I) {
|
|
2142
2147
|
let T = new Event(st);
|
|
@@ -2144,45 +2149,45 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2144
2149
|
}
|
|
2145
2150
|
}
|
|
2146
2151
|
}
|
|
2147
|
-
} }, c.createElement("label", { "cmdk-label": "", htmlFor: L.inputId, id: L.labelId, style: $a }, d), Ke(e, (
|
|
2148
|
-
}),
|
|
2152
|
+
} }, c.createElement("label", { "cmdk-label": "", htmlFor: L.inputId, id: L.labelId, style: $a }, d), Ke(e, (v) => c.createElement(An.Provider, { value: _ }, c.createElement(Mn.Provider, { value: L }, v))));
|
|
2153
|
+
}), _a = c.forwardRef((e, n) => {
|
|
2149
2154
|
var t, o;
|
|
2150
|
-
let r = te(), i = c.useRef(null), s = c.useContext(
|
|
2155
|
+
let r = te(), i = c.useRef(null), s = c.useContext(Dn), l = je(), d = Ln(e), u = (o = (t = d.current) == null ? void 0 : t.forceMount) != null ? o : s?.forceMount;
|
|
2151
2156
|
he(() => {
|
|
2152
2157
|
if (!u) return l.item(r, s?.id);
|
|
2153
2158
|
}, [u]);
|
|
2154
|
-
let p =
|
|
2159
|
+
let p = Bn(r, i, [e.value, e.children, i], e.keywords), f = ht(), g = oe((N) => N.value && N.value === p.current), x = oe((N) => u || l.filter() === !1 ? !0 : N.search ? N.filtered.items.get(r) > 0 : !0);
|
|
2155
2160
|
c.useEffect(() => {
|
|
2156
2161
|
let N = i.current;
|
|
2157
2162
|
if (!(!N || e.disabled)) return N.addEventListener(st, S), () => N.removeEventListener(st, S);
|
|
2158
2163
|
}, [x, e.onSelect, e.disabled]);
|
|
2159
2164
|
function S() {
|
|
2160
|
-
var N,
|
|
2161
|
-
|
|
2165
|
+
var N, _;
|
|
2166
|
+
h(), (_ = (N = d.current).onSelect) == null || _.call(N, p.current);
|
|
2162
2167
|
}
|
|
2163
|
-
function
|
|
2168
|
+
function h() {
|
|
2164
2169
|
f.setState("value", p.current, !0);
|
|
2165
2170
|
}
|
|
2166
2171
|
if (!x) return null;
|
|
2167
|
-
let { disabled:
|
|
2168
|
-
return c.createElement(
|
|
2169
|
-
}),
|
|
2170
|
-
let { heading: t, children: o, forceMount: r, ...i } = e, s = te(), l = c.useRef(null), d = c.useRef(null), u = te(), p =
|
|
2171
|
-
he(() => p.group(s), []),
|
|
2172
|
+
let { disabled: m, value: b, onSelect: w, forceMount: y, keywords: R, ...A } = e;
|
|
2173
|
+
return c.createElement(j.div, { ref: Re(i, n), ...A, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!m, "aria-selected": !!g, "data-disabled": !!m, "data-selected": !!g, onPointerMove: m || l.getDisablePointerSelection() ? void 0 : h, onClick: m ? void 0 : S }, e.children);
|
|
2174
|
+
}), ja = c.forwardRef((e, n) => {
|
|
2175
|
+
let { heading: t, children: o, forceMount: r, ...i } = e, s = te(), l = c.useRef(null), d = c.useRef(null), u = te(), p = je(), f = oe((x) => r || p.filter() === !1 ? !0 : x.search ? x.filtered.groups.has(s) : !0);
|
|
2176
|
+
he(() => p.group(s), []), Bn(s, l, [e.value, e.heading, d]);
|
|
2172
2177
|
let g = c.useMemo(() => ({ id: s, forceMount: r }), [r]);
|
|
2173
|
-
return c.createElement(
|
|
2178
|
+
return c.createElement(j.div, { ref: Re(l, n), ...i, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, t && c.createElement("div", { ref: d, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, t), Ke(e, (x) => c.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? u : void 0 }, c.createElement(Dn.Provider, { value: g }, x))));
|
|
2174
2179
|
}), Pa = c.forwardRef((e, n) => {
|
|
2175
2180
|
let { alwaysRender: t, ...o } = e, r = c.useRef(null), i = oe((s) => !s.search);
|
|
2176
|
-
return !t && !i ? null : c.createElement(
|
|
2181
|
+
return !t && !i ? null : c.createElement(j.div, { ref: Re(r, n), ...o, "cmdk-separator": "", role: "separator" });
|
|
2177
2182
|
}), Na = c.forwardRef((e, n) => {
|
|
2178
|
-
let { onValueChange: t, ...o } = e, r = e.value != null, i = ht(), s = oe((u) => u.search), l = oe((u) => u.selectedItemId), d =
|
|
2183
|
+
let { onValueChange: t, ...o } = e, r = e.value != null, i = ht(), s = oe((u) => u.search), l = oe((u) => u.selectedItemId), d = je();
|
|
2179
2184
|
return c.useEffect(() => {
|
|
2180
2185
|
e.value != null && i.setState("search", e.value);
|
|
2181
|
-
}, [e.value]), c.createElement(
|
|
2186
|
+
}, [e.value]), c.createElement(j.input, { ref: n, ...o, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": d.listId, "aria-labelledby": d.labelId, "aria-activedescendant": l, id: d.inputId, type: "text", value: r ? e.value : s, onChange: (u) => {
|
|
2182
2187
|
r || i.setState("search", u.target.value), t?.(u.target.value);
|
|
2183
2188
|
} });
|
|
2184
2189
|
}), Ta = c.forwardRef((e, n) => {
|
|
2185
|
-
let { children: t, label: o = "Suggestions", ...r } = e, i = c.useRef(null), s = c.useRef(null), l = oe((u) => u.selectedItemId), d =
|
|
2190
|
+
let { children: t, label: o = "Suggestions", ...r } = e, i = c.useRef(null), s = c.useRef(null), l = oe((u) => u.selectedItemId), d = je();
|
|
2186
2191
|
return c.useEffect(() => {
|
|
2187
2192
|
if (s.current && i.current) {
|
|
2188
2193
|
let u = s.current, p = i.current, f, g = new ResizeObserver(() => {
|
|
@@ -2195,14 +2200,14 @@ var Ce = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', ka = '[cmdk-group-head
|
|
|
2195
2200
|
cancelAnimationFrame(f), g.unobserve(u);
|
|
2196
2201
|
};
|
|
2197
2202
|
}
|
|
2198
|
-
}, []), c.createElement(
|
|
2203
|
+
}, []), c.createElement(j.div, { ref: Re(i, n), ...r, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": l, "aria-label": o, id: d.listId }, Ke(e, (u) => c.createElement("div", { ref: Re(s, d.listInnerRef), "cmdk-list-sizer": "" }, u)));
|
|
2199
2204
|
}), Ma = c.forwardRef((e, n) => {
|
|
2200
2205
|
let { open: t, onOpenChange: o, overlayClassName: r, contentClassName: i, container: s, ...l } = e;
|
|
2201
|
-
return c.createElement(
|
|
2202
|
-
}), Aa = c.forwardRef((e, n) => oe((t) => t.filtered.count === 0) ? c.createElement(
|
|
2206
|
+
return c.createElement(gr, { open: t, onOpenChange: o }, c.createElement(xr, { container: s }, c.createElement(br, { "cmdk-overlay": "", className: r }), c.createElement(Sr, { "aria-label": e.label, "cmdk-dialog": "", className: i }, c.createElement(On, { ref: n, ...l }))));
|
|
2207
|
+
}), Aa = c.forwardRef((e, n) => oe((t) => t.filtered.count === 0) ? c.createElement(j.div, { ref: n, ...e, "cmdk-empty": "", role: "presentation" }) : null), Da = c.forwardRef((e, n) => {
|
|
2203
2208
|
let { progress: t, children: o, label: r = "Loading...", ...i } = e;
|
|
2204
|
-
return c.createElement(
|
|
2205
|
-
}), we = Object.assign(
|
|
2209
|
+
return c.createElement(j.div, { ref: n, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": r }, Ke(e, (s) => c.createElement("div", { "aria-hidden": !0 }, s)));
|
|
2210
|
+
}), we = Object.assign(On, { List: Ta, Item: _a, Input: Na, Group: ja, Separator: Pa, Dialog: Ma, Empty: Aa, Loading: Da });
|
|
2206
2211
|
function Oa(e, n) {
|
|
2207
2212
|
let t = e.nextElementSibling;
|
|
2208
2213
|
for (; t; ) {
|
|
@@ -2217,7 +2222,7 @@ function La(e, n) {
|
|
|
2217
2222
|
t = t.previousElementSibling;
|
|
2218
2223
|
}
|
|
2219
2224
|
}
|
|
2220
|
-
function
|
|
2225
|
+
function Ln(e) {
|
|
2221
2226
|
let n = c.useRef(e);
|
|
2222
2227
|
return he(() => {
|
|
2223
2228
|
n.current = e;
|
|
@@ -2232,8 +2237,8 @@ function oe(e) {
|
|
|
2232
2237
|
let n = ht(), t = () => e(n.snapshot());
|
|
2233
2238
|
return c.useSyncExternalStore(n.subscribe, t, t);
|
|
2234
2239
|
}
|
|
2235
|
-
function
|
|
2236
|
-
let r = c.useRef(), i =
|
|
2240
|
+
function Bn(e, n, t, o = []) {
|
|
2241
|
+
let r = c.useRef(), i = je();
|
|
2237
2242
|
return he(() => {
|
|
2238
2243
|
var s;
|
|
2239
2244
|
let l = (() => {
|
|
@@ -2277,7 +2282,7 @@ function Va({ className: e, ...n }) {
|
|
|
2277
2282
|
}
|
|
2278
2283
|
function Ka({ className: e, ...n }) {
|
|
2279
2284
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-9 items-center gap-2 border-b px-3", "data-slot": "command-input-wrapper", children: [
|
|
2280
|
-
/* @__PURE__ */ a.jsx(
|
|
2285
|
+
/* @__PURE__ */ a.jsx(Wr, { className: "size-4 shrink-0 opacity-50" }),
|
|
2281
2286
|
/* @__PURE__ */ a.jsx(
|
|
2282
2287
|
we.Input,
|
|
2283
2288
|
{
|
|
@@ -2336,9 +2341,9 @@ const Wa = ({
|
|
|
2336
2341
|
className: t,
|
|
2337
2342
|
open: o,
|
|
2338
2343
|
renderSelected: r = (i) => i.label
|
|
2339
|
-
}) => /* @__PURE__ */ a.jsx(
|
|
2344
|
+
}) => /* @__PURE__ */ a.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ a.jsxs(wr, { "aria-expanded": o, className: `justify-between ${t}`, role: "combobox", variant: "outline", children: [
|
|
2340
2345
|
r(n || { label: e, value: "" }),
|
|
2341
|
-
/* @__PURE__ */ a.jsx(
|
|
2346
|
+
/* @__PURE__ */ a.jsx(Mr, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
2342
2347
|
] }) }), Fs = ({
|
|
2343
2348
|
options: e,
|
|
2344
2349
|
value: n = "",
|
|
@@ -2348,8 +2353,8 @@ const Wa = ({
|
|
|
2348
2353
|
},
|
|
2349
2354
|
renderSelected: i = (s) => s.label
|
|
2350
2355
|
}) => {
|
|
2351
|
-
const [s, l] = ke(!1), d =
|
|
2352
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2356
|
+
const [s, l] = ke(!1), d = Cr(() => e.find((u) => u.value === n), [e, n]);
|
|
2357
|
+
return /* @__PURE__ */ a.jsxs(It, { onOpenChange: l, open: s, children: [
|
|
2353
2358
|
/* @__PURE__ */ a.jsx(
|
|
2354
2359
|
Wa,
|
|
2355
2360
|
{
|
|
@@ -2360,7 +2365,7 @@ const Wa = ({
|
|
|
2360
2365
|
selected: d
|
|
2361
2366
|
}
|
|
2362
2367
|
),
|
|
2363
|
-
/* @__PURE__ */ a.jsx(
|
|
2368
|
+
/* @__PURE__ */ a.jsx(kt, { className: "w-full p-0", children: /* @__PURE__ */ a.jsxs(Va, { value: n, children: [
|
|
2364
2369
|
/* @__PURE__ */ a.jsx(Ka, { "aria-label": "Search options", className: "h-9", placeholder: "Search" }),
|
|
2365
2370
|
/* @__PURE__ */ a.jsxs(Ha, { children: [
|
|
2366
2371
|
/* @__PURE__ */ a.jsx(Ua, { children: "No results found" }),
|
|
@@ -2383,14 +2388,14 @@ const Wa = ({
|
|
|
2383
2388
|
] }) })
|
|
2384
2389
|
] });
|
|
2385
2390
|
};
|
|
2386
|
-
var
|
|
2391
|
+
var Fn = ["PageUp", "PageDown"], $n = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Vn = {
|
|
2387
2392
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
2388
2393
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
2389
2394
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
2390
2395
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
2391
|
-
}, ye = "Slider", [it, qa, Ya] = dt(ye), [
|
|
2396
|
+
}, ye = "Slider", [it, qa, Ya] = dt(ye), [Kn, $s] = ve(ye, [
|
|
2392
2397
|
Ya
|
|
2393
|
-
]), [Xa, He] =
|
|
2398
|
+
]), [Xa, He] = Kn(ye), Hn = c.forwardRef(
|
|
2394
2399
|
(e, n) => {
|
|
2395
2400
|
const {
|
|
2396
2401
|
name: t,
|
|
@@ -2408,15 +2413,15 @@ var Bn = ["PageUp", "PageDown"], Fn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2408
2413
|
},
|
|
2409
2414
|
inverted: x = !1,
|
|
2410
2415
|
form: S,
|
|
2411
|
-
...
|
|
2412
|
-
} = e,
|
|
2416
|
+
...h
|
|
2417
|
+
} = e, m = c.useRef(/* @__PURE__ */ new Set()), b = c.useRef(0), y = s === "horizontal" ? Za : Ja, [R = [], A] = de({
|
|
2413
2418
|
prop: p,
|
|
2414
2419
|
defaultProp: u,
|
|
2415
2420
|
onChange: (D) => {
|
|
2416
|
-
[...
|
|
2421
|
+
[...m.current][b.current]?.focus(), f(D);
|
|
2417
2422
|
}
|
|
2418
2423
|
}), N = c.useRef(R);
|
|
2419
|
-
function
|
|
2424
|
+
function _(D) {
|
|
2420
2425
|
const K = rs(R, D);
|
|
2421
2426
|
z(D, K);
|
|
2422
2427
|
}
|
|
@@ -2448,7 +2453,7 @@ var Bn = ["PageUp", "PageDown"], Fn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2448
2453
|
min: o,
|
|
2449
2454
|
max: r,
|
|
2450
2455
|
valueIndexToChangeRef: b,
|
|
2451
|
-
thumbs:
|
|
2456
|
+
thumbs: m.current,
|
|
2452
2457
|
values: R,
|
|
2453
2458
|
orientation: s,
|
|
2454
2459
|
form: S,
|
|
@@ -2457,22 +2462,22 @@ var Bn = ["PageUp", "PageDown"], Fn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2457
2462
|
{
|
|
2458
2463
|
"aria-disabled": l,
|
|
2459
2464
|
"data-disabled": l ? "" : void 0,
|
|
2460
|
-
...
|
|
2465
|
+
...h,
|
|
2461
2466
|
ref: n,
|
|
2462
|
-
onPointerDown: P(
|
|
2467
|
+
onPointerDown: P(h.onPointerDown, () => {
|
|
2463
2468
|
l || (N.current = R);
|
|
2464
2469
|
}),
|
|
2465
2470
|
min: o,
|
|
2466
2471
|
max: r,
|
|
2467
2472
|
inverted: x,
|
|
2468
|
-
onSlideStart: l ? void 0 :
|
|
2473
|
+
onSlideStart: l ? void 0 : _,
|
|
2469
2474
|
onSlideMove: l ? void 0 : L,
|
|
2470
2475
|
onSlideEnd: l ? void 0 : Z,
|
|
2471
2476
|
onHomeKeyDown: () => !l && z(o, 0, { commit: !0 }),
|
|
2472
2477
|
onEndKeyDown: () => !l && z(r, R.length - 1, { commit: !0 }),
|
|
2473
2478
|
onStepKeyDown: ({ event: D, direction: K }) => {
|
|
2474
2479
|
if (!l) {
|
|
2475
|
-
const U =
|
|
2480
|
+
const U = Fn.includes(D.key) || D.shiftKey && $n.includes(D.key) ? 10 : 1, O = b.current, G = R[O], q = i * U * K;
|
|
2476
2481
|
z(G + q, O, { commit: !0 });
|
|
2477
2482
|
}
|
|
2478
2483
|
}
|
|
@@ -2482,8 +2487,8 @@ var Bn = ["PageUp", "PageDown"], Fn = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2482
2487
|
);
|
|
2483
2488
|
}
|
|
2484
2489
|
);
|
|
2485
|
-
|
|
2486
|
-
var [
|
|
2490
|
+
Hn.displayName = ye;
|
|
2491
|
+
var [Un, Gn] = Kn(ye, {
|
|
2487
2492
|
startEdge: "left",
|
|
2488
2493
|
endEdge: "right",
|
|
2489
2494
|
size: "width",
|
|
@@ -2500,13 +2505,13 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2500
2505
|
onSlideEnd: d,
|
|
2501
2506
|
onStepKeyDown: u,
|
|
2502
2507
|
...p
|
|
2503
|
-
} = e, [f, g] = c.useState(null), x = V(n, (y) => g(y)), S = c.useRef(void 0),
|
|
2508
|
+
} = e, [f, g] = c.useState(null), x = V(n, (y) => g(y)), S = c.useRef(void 0), h = Me(r), m = h === "ltr", b = m && !i || !m && i;
|
|
2504
2509
|
function w(y) {
|
|
2505
|
-
const R = S.current || f.getBoundingClientRect(), A = [0, R.width],
|
|
2506
|
-
return S.current = R,
|
|
2510
|
+
const R = S.current || f.getBoundingClientRect(), A = [0, R.width], _ = vt(A, b ? [t, o] : [o, t]);
|
|
2511
|
+
return S.current = R, _(y - R.left);
|
|
2507
2512
|
}
|
|
2508
2513
|
return /* @__PURE__ */ a.jsx(
|
|
2509
|
-
|
|
2514
|
+
Un,
|
|
2510
2515
|
{
|
|
2511
2516
|
scope: e.__scopeSlider,
|
|
2512
2517
|
startEdge: b ? "left" : "right",
|
|
@@ -2514,9 +2519,9 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2514
2519
|
direction: b ? 1 : -1,
|
|
2515
2520
|
size: "width",
|
|
2516
2521
|
children: /* @__PURE__ */ a.jsx(
|
|
2517
|
-
|
|
2522
|
+
zn,
|
|
2518
2523
|
{
|
|
2519
|
-
dir:
|
|
2524
|
+
dir: h,
|
|
2520
2525
|
"data-orientation": "horizontal",
|
|
2521
2526
|
...p,
|
|
2522
2527
|
ref: x,
|
|
@@ -2536,7 +2541,7 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2536
2541
|
S.current = void 0, d?.();
|
|
2537
2542
|
},
|
|
2538
2543
|
onStepKeyDown: (y) => {
|
|
2539
|
-
const A =
|
|
2544
|
+
const A = Vn[b ? "from-left" : "from-right"].includes(y.key);
|
|
2540
2545
|
u?.({ event: y, direction: A ? -1 : 1 });
|
|
2541
2546
|
}
|
|
2542
2547
|
}
|
|
@@ -2556,12 +2561,12 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2556
2561
|
onStepKeyDown: d,
|
|
2557
2562
|
...u
|
|
2558
2563
|
} = e, p = c.useRef(null), f = V(n, p), g = c.useRef(void 0), x = !r;
|
|
2559
|
-
function S(
|
|
2560
|
-
const
|
|
2561
|
-
return g.current =
|
|
2564
|
+
function S(h) {
|
|
2565
|
+
const m = g.current || p.current.getBoundingClientRect(), b = [0, m.height], y = vt(b, x ? [o, t] : [t, o]);
|
|
2566
|
+
return g.current = m, y(h - m.top);
|
|
2562
2567
|
}
|
|
2563
2568
|
return /* @__PURE__ */ a.jsx(
|
|
2564
|
-
|
|
2569
|
+
Un,
|
|
2565
2570
|
{
|
|
2566
2571
|
scope: e.__scopeSlider,
|
|
2567
2572
|
startEdge: x ? "bottom" : "top",
|
|
@@ -2569,7 +2574,7 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2569
2574
|
size: "height",
|
|
2570
2575
|
direction: x ? 1 : -1,
|
|
2571
2576
|
children: /* @__PURE__ */ a.jsx(
|
|
2572
|
-
|
|
2577
|
+
zn,
|
|
2573
2578
|
{
|
|
2574
2579
|
"data-orientation": "vertical",
|
|
2575
2580
|
...u,
|
|
@@ -2578,27 +2583,27 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2578
2583
|
...u.style,
|
|
2579
2584
|
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
2580
2585
|
},
|
|
2581
|
-
onSlideStart: (
|
|
2582
|
-
const
|
|
2583
|
-
i?.(
|
|
2586
|
+
onSlideStart: (h) => {
|
|
2587
|
+
const m = S(h.clientY);
|
|
2588
|
+
i?.(m);
|
|
2584
2589
|
},
|
|
2585
|
-
onSlideMove: (
|
|
2586
|
-
const
|
|
2587
|
-
s?.(
|
|
2590
|
+
onSlideMove: (h) => {
|
|
2591
|
+
const m = S(h.clientY);
|
|
2592
|
+
s?.(m);
|
|
2588
2593
|
},
|
|
2589
2594
|
onSlideEnd: () => {
|
|
2590
2595
|
g.current = void 0, l?.();
|
|
2591
2596
|
},
|
|
2592
|
-
onStepKeyDown: (
|
|
2593
|
-
const b =
|
|
2594
|
-
d?.({ event:
|
|
2597
|
+
onStepKeyDown: (h) => {
|
|
2598
|
+
const b = Vn[x ? "from-bottom" : "from-top"].includes(h.key);
|
|
2599
|
+
d?.({ event: h, direction: b ? -1 : 1 });
|
|
2595
2600
|
}
|
|
2596
2601
|
}
|
|
2597
2602
|
)
|
|
2598
2603
|
}
|
|
2599
2604
|
);
|
|
2600
2605
|
}
|
|
2601
|
-
),
|
|
2606
|
+
), zn = c.forwardRef(
|
|
2602
2607
|
(e, n) => {
|
|
2603
2608
|
const {
|
|
2604
2609
|
__scopeSlider: t,
|
|
@@ -2611,12 +2616,12 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2611
2616
|
...u
|
|
2612
2617
|
} = e, p = He(ye, t);
|
|
2613
2618
|
return /* @__PURE__ */ a.jsx(
|
|
2614
|
-
|
|
2619
|
+
j.span,
|
|
2615
2620
|
{
|
|
2616
2621
|
...u,
|
|
2617
2622
|
ref: n,
|
|
2618
2623
|
onKeyDown: P(e.onKeyDown, (f) => {
|
|
2619
|
-
f.key === "Home" ? (s(f), f.preventDefault()) : f.key === "End" ? (l(f), f.preventDefault()) :
|
|
2624
|
+
f.key === "Home" ? (s(f), f.preventDefault()) : f.key === "End" ? (l(f), f.preventDefault()) : Fn.concat($n).includes(f.key) && (d(f), f.preventDefault());
|
|
2620
2625
|
}),
|
|
2621
2626
|
onPointerDown: P(e.onPointerDown, (f) => {
|
|
2622
2627
|
const g = f.target;
|
|
@@ -2632,11 +2637,11 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2632
2637
|
}
|
|
2633
2638
|
);
|
|
2634
2639
|
}
|
|
2635
|
-
),
|
|
2640
|
+
), Wn = "SliderTrack", qn = c.forwardRef(
|
|
2636
2641
|
(e, n) => {
|
|
2637
|
-
const { __scopeSlider: t, ...o } = e, r = He(
|
|
2642
|
+
const { __scopeSlider: t, ...o } = e, r = He(Wn, t);
|
|
2638
2643
|
return /* @__PURE__ */ a.jsx(
|
|
2639
|
-
|
|
2644
|
+
j.span,
|
|
2640
2645
|
{
|
|
2641
2646
|
"data-disabled": r.disabled ? "" : void 0,
|
|
2642
2647
|
"data-orientation": r.orientation,
|
|
@@ -2646,14 +2651,14 @@ var [Hn, Un] = Vn(ye, {
|
|
|
2646
2651
|
);
|
|
2647
2652
|
}
|
|
2648
2653
|
);
|
|
2649
|
-
|
|
2650
|
-
var ct = "SliderRange",
|
|
2654
|
+
qn.displayName = Wn;
|
|
2655
|
+
var ct = "SliderRange", Yn = c.forwardRef(
|
|
2651
2656
|
(e, n) => {
|
|
2652
|
-
const { __scopeSlider: t, ...o } = e, r = He(ct, t), i =
|
|
2653
|
-
(g) =>
|
|
2657
|
+
const { __scopeSlider: t, ...o } = e, r = He(ct, t), i = Gn(ct, t), s = c.useRef(null), l = V(n, s), d = r.values.length, u = r.values.map(
|
|
2658
|
+
(g) => Jn(g, r.min, r.max)
|
|
2654
2659
|
), p = d > 1 ? Math.min(...u) : 0, f = 100 - Math.max(...u);
|
|
2655
2660
|
return /* @__PURE__ */ a.jsx(
|
|
2656
|
-
|
|
2661
|
+
j.span,
|
|
2657
2662
|
{
|
|
2658
2663
|
"data-orientation": r.orientation,
|
|
2659
2664
|
"data-disabled": r.disabled ? "" : void 0,
|
|
@@ -2668,8 +2673,8 @@ var ct = "SliderRange", qn = c.forwardRef(
|
|
|
2668
2673
|
);
|
|
2669
2674
|
}
|
|
2670
2675
|
);
|
|
2671
|
-
|
|
2672
|
-
var lt = "SliderThumb",
|
|
2676
|
+
Yn.displayName = ct;
|
|
2677
|
+
var lt = "SliderThumb", Xn = c.forwardRef(
|
|
2673
2678
|
(e, n) => {
|
|
2674
2679
|
const t = qa(e.__scopeSlider), [o, r] = c.useState(null), i = V(n, (l) => r(l)), s = c.useMemo(
|
|
2675
2680
|
() => o ? t().findIndex((l) => l.ref.current === o) : -1,
|
|
@@ -2679,7 +2684,7 @@ var lt = "SliderThumb", Yn = c.forwardRef(
|
|
|
2679
2684
|
}
|
|
2680
2685
|
), Qa = c.forwardRef(
|
|
2681
2686
|
(e, n) => {
|
|
2682
|
-
const { __scopeSlider: t, index: o, name: r, ...i } = e, s = He(lt, t), l =
|
|
2687
|
+
const { __scopeSlider: t, index: o, name: r, ...i } = e, s = He(lt, t), l = Gn(lt, t), [d, u] = c.useState(null), p = V(n, (w) => u(w)), f = d ? s.form || !!d.closest("form") : !0, g = De(d), x = s.values[o], S = x === void 0 ? 0 : Jn(x, s.min, s.max), h = ns(o, s.values.length), m = g?.[l.size], b = m ? os(m, S, l.direction) : 0;
|
|
2683
2688
|
return c.useEffect(() => {
|
|
2684
2689
|
if (d)
|
|
2685
2690
|
return s.thumbs.add(d), () => {
|
|
@@ -2695,10 +2700,10 @@ var lt = "SliderThumb", Yn = c.forwardRef(
|
|
|
2695
2700
|
},
|
|
2696
2701
|
children: [
|
|
2697
2702
|
/* @__PURE__ */ a.jsx(it.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ a.jsx(
|
|
2698
|
-
|
|
2703
|
+
j.span,
|
|
2699
2704
|
{
|
|
2700
2705
|
role: "slider",
|
|
2701
|
-
"aria-label": e["aria-label"] ||
|
|
2706
|
+
"aria-label": e["aria-label"] || h,
|
|
2702
2707
|
"aria-valuemin": s.min,
|
|
2703
2708
|
"aria-valuenow": x,
|
|
2704
2709
|
"aria-valuemax": s.max,
|
|
@@ -2715,7 +2720,7 @@ var lt = "SliderThumb", Yn = c.forwardRef(
|
|
|
2715
2720
|
}
|
|
2716
2721
|
) }),
|
|
2717
2722
|
f && /* @__PURE__ */ a.jsx(
|
|
2718
|
-
|
|
2723
|
+
Zn,
|
|
2719
2724
|
{
|
|
2720
2725
|
name: r ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
2721
2726
|
form: s.form,
|
|
@@ -2728,10 +2733,10 @@ var lt = "SliderThumb", Yn = c.forwardRef(
|
|
|
2728
2733
|
);
|
|
2729
2734
|
}
|
|
2730
2735
|
);
|
|
2731
|
-
|
|
2732
|
-
var es = "RadioBubbleInput",
|
|
2736
|
+
Xn.displayName = lt;
|
|
2737
|
+
var es = "RadioBubbleInput", Zn = c.forwardRef(
|
|
2733
2738
|
({ __scopeSlider: e, value: n, ...t }, o) => {
|
|
2734
|
-
const r = c.useRef(null), i = V(r, o), s =
|
|
2739
|
+
const r = c.useRef(null), i = V(r, o), s = _e(n);
|
|
2735
2740
|
return c.useEffect(() => {
|
|
2736
2741
|
const l = r.current;
|
|
2737
2742
|
if (!l) return;
|
|
@@ -2741,7 +2746,7 @@ var es = "RadioBubbleInput", Xn = c.forwardRef(
|
|
|
2741
2746
|
p.call(l, n), l.dispatchEvent(f);
|
|
2742
2747
|
}
|
|
2743
2748
|
}, [s, n]), /* @__PURE__ */ a.jsx(
|
|
2744
|
-
|
|
2749
|
+
j.input,
|
|
2745
2750
|
{
|
|
2746
2751
|
style: { display: "none" },
|
|
2747
2752
|
...t,
|
|
@@ -2751,12 +2756,12 @@ var es = "RadioBubbleInput", Xn = c.forwardRef(
|
|
|
2751
2756
|
);
|
|
2752
2757
|
}
|
|
2753
2758
|
);
|
|
2754
|
-
|
|
2759
|
+
Zn.displayName = es;
|
|
2755
2760
|
function ts(e = [], n, t) {
|
|
2756
2761
|
const o = [...e];
|
|
2757
2762
|
return o[t] = n, o.sort((r, i) => r - i);
|
|
2758
2763
|
}
|
|
2759
|
-
function
|
|
2764
|
+
function Jn(e, n, t) {
|
|
2760
2765
|
const i = 100 / (t - n) * (e - n);
|
|
2761
2766
|
return Ne(i, [0, 100]);
|
|
2762
2767
|
}
|
|
@@ -2796,7 +2801,7 @@ function cs(e, n) {
|
|
|
2796
2801
|
const t = Math.pow(10, n);
|
|
2797
2802
|
return Math.round(e * t) / t;
|
|
2798
2803
|
}
|
|
2799
|
-
var ls =
|
|
2804
|
+
var ls = Hn, ds = qn, us = Yn, ps = Xn;
|
|
2800
2805
|
function fs({
|
|
2801
2806
|
className: e,
|
|
2802
2807
|
trackClassName: n,
|
|
@@ -2889,7 +2894,7 @@ const Vs = ({ size: e = "md", thumbClassName: n, trackClassName: t, value: o, de
|
|
|
2889
2894
|
}
|
|
2890
2895
|
);
|
|
2891
2896
|
};
|
|
2892
|
-
var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue),
|
|
2897
|
+
var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue), Qn = c.forwardRef(
|
|
2893
2898
|
(e, n) => {
|
|
2894
2899
|
const {
|
|
2895
2900
|
__scopeSwitch: t,
|
|
@@ -2902,7 +2907,7 @@ var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue), Jn = c.forwardRef(
|
|
|
2902
2907
|
onCheckedChange: u,
|
|
2903
2908
|
form: p,
|
|
2904
2909
|
...f
|
|
2905
|
-
} = e, [g, x] = c.useState(null), S = V(n, (y) => x(y)),
|
|
2910
|
+
} = e, [g, x] = c.useState(null), S = V(n, (y) => x(y)), h = c.useRef(!1), m = g ? p || !!g.closest("form") : !0, [b, w] = de({
|
|
2906
2911
|
prop: r,
|
|
2907
2912
|
defaultProp: i ?? !1,
|
|
2908
2913
|
onChange: u,
|
|
@@ -2910,28 +2915,28 @@ var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue), Jn = c.forwardRef(
|
|
|
2910
2915
|
});
|
|
2911
2916
|
return /* @__PURE__ */ a.jsxs(hs, { scope: t, checked: b, disabled: l, children: [
|
|
2912
2917
|
/* @__PURE__ */ a.jsx(
|
|
2913
|
-
|
|
2918
|
+
j.button,
|
|
2914
2919
|
{
|
|
2915
2920
|
type: "button",
|
|
2916
2921
|
role: "switch",
|
|
2917
2922
|
"aria-checked": b,
|
|
2918
2923
|
"aria-required": s,
|
|
2919
|
-
"data-state":
|
|
2924
|
+
"data-state": rr(b),
|
|
2920
2925
|
"data-disabled": l ? "" : void 0,
|
|
2921
2926
|
disabled: l,
|
|
2922
2927
|
value: d,
|
|
2923
2928
|
...f,
|
|
2924
2929
|
ref: S,
|
|
2925
2930
|
onClick: P(e.onClick, (y) => {
|
|
2926
|
-
w((R) => !R),
|
|
2931
|
+
w((R) => !R), m && (h.current = y.isPropagationStopped(), h.current || y.stopPropagation());
|
|
2927
2932
|
})
|
|
2928
2933
|
}
|
|
2929
2934
|
),
|
|
2930
|
-
|
|
2931
|
-
|
|
2935
|
+
m && /* @__PURE__ */ a.jsx(
|
|
2936
|
+
nr,
|
|
2932
2937
|
{
|
|
2933
2938
|
control: g,
|
|
2934
|
-
bubbles: !
|
|
2939
|
+
bubbles: !h.current,
|
|
2935
2940
|
name: o,
|
|
2936
2941
|
value: d,
|
|
2937
2942
|
checked: b,
|
|
@@ -2944,14 +2949,14 @@ var Ue = "Switch", [ms, Ks] = ve(Ue), [hs, vs] = ms(Ue), Jn = c.forwardRef(
|
|
|
2944
2949
|
] });
|
|
2945
2950
|
}
|
|
2946
2951
|
);
|
|
2947
|
-
|
|
2948
|
-
var
|
|
2952
|
+
Qn.displayName = Ue;
|
|
2953
|
+
var er = "SwitchThumb", tr = c.forwardRef(
|
|
2949
2954
|
(e, n) => {
|
|
2950
|
-
const { __scopeSwitch: t, ...o } = e, r = vs(
|
|
2955
|
+
const { __scopeSwitch: t, ...o } = e, r = vs(er, t);
|
|
2951
2956
|
return /* @__PURE__ */ a.jsx(
|
|
2952
|
-
|
|
2957
|
+
j.span,
|
|
2953
2958
|
{
|
|
2954
|
-
"data-state":
|
|
2959
|
+
"data-state": rr(r.checked),
|
|
2955
2960
|
"data-disabled": r.disabled ? "" : void 0,
|
|
2956
2961
|
...o,
|
|
2957
2962
|
ref: n
|
|
@@ -2959,8 +2964,8 @@ var Qn = "SwitchThumb", er = c.forwardRef(
|
|
|
2959
2964
|
);
|
|
2960
2965
|
}
|
|
2961
2966
|
);
|
|
2962
|
-
|
|
2963
|
-
var gs = "SwitchBubbleInput",
|
|
2967
|
+
tr.displayName = er;
|
|
2968
|
+
var gs = "SwitchBubbleInput", nr = c.forwardRef(
|
|
2964
2969
|
({
|
|
2965
2970
|
__scopeSwitch: e,
|
|
2966
2971
|
control: n,
|
|
@@ -2968,7 +2973,7 @@ var gs = "SwitchBubbleInput", tr = c.forwardRef(
|
|
|
2968
2973
|
bubbles: o = !0,
|
|
2969
2974
|
...r
|
|
2970
2975
|
}, i) => {
|
|
2971
|
-
const s = c.useRef(null), l = V(s, i), d =
|
|
2976
|
+
const s = c.useRef(null), l = V(s, i), d = _e(t), u = De(n);
|
|
2972
2977
|
return c.useEffect(() => {
|
|
2973
2978
|
const p = s.current;
|
|
2974
2979
|
if (!p) return;
|
|
@@ -3001,11 +3006,11 @@ var gs = "SwitchBubbleInput", tr = c.forwardRef(
|
|
|
3001
3006
|
);
|
|
3002
3007
|
}
|
|
3003
3008
|
);
|
|
3004
|
-
|
|
3005
|
-
function
|
|
3009
|
+
nr.displayName = gs;
|
|
3010
|
+
function rr(e) {
|
|
3006
3011
|
return e ? "checked" : "unchecked";
|
|
3007
3012
|
}
|
|
3008
|
-
var xs =
|
|
3013
|
+
var xs = Qn, bs = tr;
|
|
3009
3014
|
function Ss({
|
|
3010
3015
|
className: e,
|
|
3011
3016
|
thumbClassName: n,
|
|
@@ -3042,7 +3047,7 @@ const Hs = ({
|
|
|
3042
3047
|
size: i = "md",
|
|
3043
3048
|
...s
|
|
3044
3049
|
}) => {
|
|
3045
|
-
const l =
|
|
3050
|
+
const l = Ir(), d = e || l, [u, p] = Array.isArray(n) ? n : [null, n], f = "cursor-pointer", g = r && Array.isArray(r) ? r[0] : r, x = r && Array.isArray(r) ? r[1] : r;
|
|
3046
3051
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3047
3052
|
u && /* @__PURE__ */ a.jsx(ue, { className: B(f, g), htmlFor: d, size: i, children: u }),
|
|
3048
3053
|
/* @__PURE__ */ a.jsx(
|
|
@@ -3077,18 +3082,18 @@ const Hs = ({
|
|
|
3077
3082
|
};
|
|
3078
3083
|
export {
|
|
3079
3084
|
Ns as C,
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3085
|
+
_s as D,
|
|
3086
|
+
co as I,
|
|
3087
|
+
ho as L,
|
|
3083
3088
|
As as P,
|
|
3084
3089
|
Os as R,
|
|
3085
|
-
|
|
3090
|
+
js as S,
|
|
3086
3091
|
Ts as a,
|
|
3087
3092
|
Ms as b,
|
|
3088
3093
|
Bs as c,
|
|
3089
3094
|
Fs as d,
|
|
3090
3095
|
Vs as e,
|
|
3091
3096
|
Hs as f,
|
|
3092
|
-
|
|
3093
|
-
|
|
3097
|
+
Mt as g,
|
|
3098
|
+
io as h
|
|
3094
3099
|
};
|