@still-forest/canopy 0.35.0 → 0.37.0
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/{Code-zUdzRHTD.js → Code-BLilg72p.js} +1 -1
- package/dist/chunks/{Heading-DpvcMbmF.js → Heading-DjVutKs1.js} +88 -83
- package/dist/chunks/Loader-BgoWXwkX.js +49 -0
- package/dist/chunks/PageNotFound-D4e2bv36.js +139 -0
- package/dist/chunks/{Paragraph-DjkeVXzm.js → Paragraph-ai9KZse1.js} +1 -1
- package/dist/chunks/{SidebarLayout-BrWkHR7S.js → SidebarLayout-C0jOUIuV.js} +798 -526
- package/dist/chunks/{Textarea-BpQRN4Xn.js → Textarea-nT-kvT7U.js} +432 -448
- package/dist/forms.js +1 -1
- package/dist/index.d.ts +139 -7
- package/dist/index.js +114 -106
- package/dist/interstitials.d.ts +18 -4
- package/dist/interstitials.js +1 -1
- package/dist/navigation.d.ts +1 -1
- package/dist/navigation.js +1 -1
- package/dist/typography.d.ts +2 -0
- package/dist/typography.js +3 -3
- package/package.json +3 -1
- package/dist/chunks/PageNotFound-p3jnz0na.js +0 -107
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-B0GD0xBr.js";
|
|
2
|
-
import { c as re, u as V, f as
|
|
2
|
+
import { c as re, u as V, f as Pt, B as ct, i as fr, j as Ne, h as pr } from "./calendar-DKwGFkIw.js";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import { useState as lt, useEffect as mr, useMemo as
|
|
5
|
-
import { F as ae, G as
|
|
6
|
-
import { T as Ae } from "./Heading-
|
|
4
|
+
import { useState as lt, useEffect as mr, useMemo as vr } from "react";
|
|
5
|
+
import { F as ae, G as hr } from "./Layout-CvVv48kM.js";
|
|
6
|
+
import { T as Ae } from "./Heading-DjVutKs1.js";
|
|
7
|
+
import { L as gr } from "./Loader-BgoWXwkX.js";
|
|
7
8
|
import { c as $ } from "./index-CRiPKpXj.js";
|
|
8
|
-
import { c as we, d as jt, P
|
|
9
|
+
import { c as we, d as jt, P, a as ye, e as L, t as _t, g as kt, b as Z, u as dt, v as Me, l as Tt, m as xr, A as br, f as ne, h as Dt, V as yr, i as At, j as wr, R as Mt, F as Ot, D as Cr, C as Sr, n as Er, q as Lt, r as Ft, s as Bt, p as $t, w as Ir, x as Rr, k as Nr } from "./popover-ByOImpZC.js";
|
|
9
10
|
import * as Vt from "react-dom";
|
|
10
11
|
/**
|
|
11
12
|
* @license lucide-react v0.543.0 - ISC
|
|
@@ -13,66 +14,50 @@ import * as Vt from "react-dom";
|
|
|
13
14
|
* This source code is licensed under the ISC license.
|
|
14
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
16
|
*/
|
|
16
|
-
const
|
|
17
|
+
const Pr = [
|
|
17
18
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
18
19
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
19
20
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
20
21
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
21
|
-
],
|
|
22
|
+
], jr = re("calendar", Pr);
|
|
22
23
|
/**
|
|
23
24
|
* @license lucide-react v0.543.0 - ISC
|
|
24
25
|
*
|
|
25
26
|
* This source code is licensed under the ISC license.
|
|
26
27
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
28
|
*/
|
|
28
|
-
const
|
|
29
|
+
const _r = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], ut = re("check", _r);
|
|
29
30
|
/**
|
|
30
31
|
* @license lucide-react v0.543.0 - ISC
|
|
31
32
|
*
|
|
32
33
|
* This source code is licensed under the ISC license.
|
|
33
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
35
|
*/
|
|
35
|
-
const
|
|
36
|
+
const kr = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Tr = re("chevron-up", kr);
|
|
36
37
|
/**
|
|
37
38
|
* @license lucide-react v0.543.0 - ISC
|
|
38
39
|
*
|
|
39
40
|
* This source code is licensed under the ISC license.
|
|
40
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
42
|
*/
|
|
42
|
-
const
|
|
43
|
+
const Dr = [
|
|
43
44
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
44
45
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
45
|
-
],
|
|
46
|
+
], Ar = re("chevrons-up-down", Dr);
|
|
46
47
|
/**
|
|
47
48
|
* @license lucide-react v0.543.0 - ISC
|
|
48
49
|
*
|
|
49
50
|
* This source code is licensed under the ISC license.
|
|
50
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
52
|
*/
|
|
52
|
-
const
|
|
53
|
+
const Mr = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Or = re("circle", Mr);
|
|
53
54
|
/**
|
|
54
55
|
* @license lucide-react v0.543.0 - ISC
|
|
55
56
|
*
|
|
56
57
|
* This source code is licensed under the ISC license.
|
|
57
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
59
|
*/
|
|
59
|
-
const
|
|
60
|
-
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
61
|
-
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
62
|
-
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
63
|
-
["path", { d: "m16.2 16.2 2.9 2.9", key: "1bxg5t" }],
|
|
64
|
-
["path", { d: "M12 18v4", key: "jadmvz" }],
|
|
65
|
-
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
66
|
-
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
67
|
-
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
68
|
-
], Lr = re("loader", Or);
|
|
69
|
-
/**
|
|
70
|
-
* @license lucide-react v0.543.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/
|
|
75
|
-
const Fr = [
|
|
60
|
+
const Lr = [
|
|
76
61
|
[
|
|
77
62
|
"path",
|
|
78
63
|
{
|
|
@@ -82,24 +67,24 @@ const Fr = [
|
|
|
82
67
|
],
|
|
83
68
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
84
69
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
85
|
-
],
|
|
70
|
+
], Fr = re("save", Lr);
|
|
86
71
|
/**
|
|
87
72
|
* @license lucide-react v0.543.0 - ISC
|
|
88
73
|
*
|
|
89
74
|
* This source code is licensed under the ISC license.
|
|
90
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
76
|
*/
|
|
92
|
-
const
|
|
77
|
+
const Br = [
|
|
93
78
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
94
79
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
95
|
-
],
|
|
80
|
+
], $r = re("search", Br);
|
|
96
81
|
/**
|
|
97
82
|
* @license lucide-react v0.543.0 - ISC
|
|
98
83
|
*
|
|
99
84
|
* This source code is licensed under the ISC license.
|
|
100
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
86
|
*/
|
|
102
|
-
const
|
|
87
|
+
const Vr = [
|
|
103
88
|
[
|
|
104
89
|
"path",
|
|
105
90
|
{
|
|
@@ -108,26 +93,26 @@ const Ur = [
|
|
|
108
93
|
}
|
|
109
94
|
],
|
|
110
95
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
111
|
-
], ze = re("send",
|
|
96
|
+
], ze = re("send", Vr);
|
|
112
97
|
/**
|
|
113
98
|
* @license lucide-react v0.543.0 - ISC
|
|
114
99
|
*
|
|
115
100
|
* This source code is licensed under the ISC license.
|
|
116
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
102
|
*/
|
|
118
|
-
const
|
|
103
|
+
const Ur = [
|
|
119
104
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
120
105
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
121
106
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
122
107
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
123
108
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
124
|
-
],
|
|
109
|
+
], Gr = re("trash-2", Ur);
|
|
125
110
|
function ft(e) {
|
|
126
111
|
const t = a.useRef({ value: e, previous: e });
|
|
127
112
|
return a.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
128
113
|
}
|
|
129
|
-
var Oe = "Checkbox", [
|
|
130
|
-
function
|
|
114
|
+
var Oe = "Checkbox", [Wr, Pa] = we(Oe), [Hr, pt] = Wr(Oe);
|
|
115
|
+
function Kr(e) {
|
|
131
116
|
const {
|
|
132
117
|
__scopeCheckbox: t,
|
|
133
118
|
checked: n,
|
|
@@ -146,7 +131,7 @@ function zr(e) {
|
|
|
146
131
|
defaultProp: r ?? !1,
|
|
147
132
|
onChange: u,
|
|
148
133
|
caller: Oe
|
|
149
|
-
}), [w,
|
|
134
|
+
}), [w, v] = a.useState(null), [h, S] = a.useState(null), y = a.useRef(!1), I = w ? !!c || !!w.closest("form") : (
|
|
150
135
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
151
136
|
!0
|
|
152
137
|
), A = {
|
|
@@ -154,7 +139,7 @@ function zr(e) {
|
|
|
154
139
|
disabled: s,
|
|
155
140
|
setChecked: g,
|
|
156
141
|
control: w,
|
|
157
|
-
setControl:
|
|
142
|
+
setControl: v,
|
|
158
143
|
name: d,
|
|
159
144
|
form: c,
|
|
160
145
|
value: f,
|
|
@@ -162,15 +147,15 @@ function zr(e) {
|
|
|
162
147
|
required: l,
|
|
163
148
|
defaultChecked: oe(r) ? !1 : r,
|
|
164
149
|
isFormControl: I,
|
|
165
|
-
bubbleInput:
|
|
150
|
+
bubbleInput: h,
|
|
166
151
|
setBubbleInput: S
|
|
167
152
|
};
|
|
168
153
|
return /* @__PURE__ */ i.jsx(
|
|
169
|
-
|
|
154
|
+
Hr,
|
|
170
155
|
{
|
|
171
156
|
scope: t,
|
|
172
157
|
...A,
|
|
173
|
-
children:
|
|
158
|
+
children: zr(m) ? m(A) : o
|
|
174
159
|
}
|
|
175
160
|
);
|
|
176
161
|
}
|
|
@@ -187,15 +172,15 @@ var Ut = "CheckboxTrigger", Gt = a.forwardRef(
|
|
|
187
172
|
hasConsumerStoppedPropagationRef: x,
|
|
188
173
|
isFormControl: g,
|
|
189
174
|
bubbleInput: w
|
|
190
|
-
} = pt(Ut, e),
|
|
175
|
+
} = pt(Ut, e), v = V(r, f), h = a.useRef(u);
|
|
191
176
|
return a.useEffect(() => {
|
|
192
177
|
const S = s?.form;
|
|
193
178
|
if (S) {
|
|
194
|
-
const y = () => m(
|
|
179
|
+
const y = () => m(h.current);
|
|
195
180
|
return S.addEventListener("reset", y), () => S.removeEventListener("reset", y);
|
|
196
181
|
}
|
|
197
182
|
}, [s, m]), /* @__PURE__ */ i.jsx(
|
|
198
|
-
|
|
183
|
+
P.button,
|
|
199
184
|
{
|
|
200
185
|
type: "button",
|
|
201
186
|
role: "checkbox",
|
|
@@ -206,7 +191,7 @@ var Ut = "CheckboxTrigger", Gt = a.forwardRef(
|
|
|
206
191
|
disabled: d,
|
|
207
192
|
value: c,
|
|
208
193
|
...o,
|
|
209
|
-
ref:
|
|
194
|
+
ref: v,
|
|
210
195
|
onKeyDown: L(t, (S) => {
|
|
211
196
|
S.key === "Enter" && S.preventDefault();
|
|
212
197
|
}),
|
|
@@ -233,7 +218,7 @@ var Wt = a.forwardRef(
|
|
|
233
218
|
...m
|
|
234
219
|
} = e;
|
|
235
220
|
return /* @__PURE__ */ i.jsx(
|
|
236
|
-
|
|
221
|
+
Kr,
|
|
237
222
|
{
|
|
238
223
|
__scopeCheckbox: n,
|
|
239
224
|
checked: r,
|
|
@@ -273,7 +258,7 @@ var Ht = "CheckboxIndicator", Kt = a.forwardRef(
|
|
|
273
258
|
{
|
|
274
259
|
present: o || oe(s.checked) || s.checked === !0,
|
|
275
260
|
children: /* @__PURE__ */ i.jsx(
|
|
276
|
-
|
|
261
|
+
P.span,
|
|
277
262
|
{
|
|
278
263
|
"data-state": Yt(s.checked),
|
|
279
264
|
"data-disabled": s.disabled ? "" : void 0,
|
|
@@ -301,7 +286,7 @@ var zt = "CheckboxBubbleInput", qt = a.forwardRef(
|
|
|
301
286
|
form: m,
|
|
302
287
|
bubbleInput: x,
|
|
303
288
|
setBubbleInput: g
|
|
304
|
-
} = pt(zt, e), w = V(n, g),
|
|
289
|
+
} = pt(zt, e), w = V(n, g), v = ft(s), h = _t(o);
|
|
305
290
|
a.useEffect(() => {
|
|
306
291
|
const y = x;
|
|
307
292
|
if (!y) return;
|
|
@@ -309,14 +294,14 @@ var zt = "CheckboxBubbleInput", qt = a.forwardRef(
|
|
|
309
294
|
I,
|
|
310
295
|
"checked"
|
|
311
296
|
).set, j = !r.current;
|
|
312
|
-
if (
|
|
297
|
+
if (v !== s && M) {
|
|
313
298
|
const E = new Event("click", { bubbles: j });
|
|
314
299
|
y.indeterminate = oe(s), M.call(y, oe(s) ? !1 : s), y.dispatchEvent(E);
|
|
315
300
|
}
|
|
316
|
-
}, [x,
|
|
301
|
+
}, [x, v, s, r]);
|
|
317
302
|
const S = a.useRef(oe(s) ? !1 : s);
|
|
318
303
|
return /* @__PURE__ */ i.jsx(
|
|
319
|
-
|
|
304
|
+
P.input,
|
|
320
305
|
{
|
|
321
306
|
type: "checkbox",
|
|
322
307
|
"aria-hidden": !0,
|
|
@@ -331,7 +316,7 @@ var zt = "CheckboxBubbleInput", qt = a.forwardRef(
|
|
|
331
316
|
ref: w,
|
|
332
317
|
style: {
|
|
333
318
|
...t.style,
|
|
334
|
-
...
|
|
319
|
+
...h,
|
|
335
320
|
position: "absolute",
|
|
336
321
|
pointerEvents: "none",
|
|
337
322
|
opacity: 0,
|
|
@@ -346,7 +331,7 @@ var zt = "CheckboxBubbleInput", qt = a.forwardRef(
|
|
|
346
331
|
}
|
|
347
332
|
);
|
|
348
333
|
qt.displayName = zt;
|
|
349
|
-
function
|
|
334
|
+
function zr(e) {
|
|
350
335
|
return typeof e == "function";
|
|
351
336
|
}
|
|
352
337
|
function oe(e) {
|
|
@@ -355,14 +340,14 @@ function oe(e) {
|
|
|
355
340
|
function Yt(e) {
|
|
356
341
|
return oe(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
357
342
|
}
|
|
358
|
-
var qe = "rovingFocusGroup.onEntryFocus",
|
|
359
|
-
|
|
360
|
-
[
|
|
361
|
-
), [
|
|
362
|
-
(e, t) => /* @__PURE__ */ i.jsx(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i.jsx(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i.jsx(
|
|
343
|
+
var qe = "rovingFocusGroup.onEntryFocus", qr = { bubbles: !1, cancelable: !0 }, Pe = "RovingFocusGroup", [Qe, Xt, Yr] = kt(Pe), [Xr, Zt] = we(
|
|
344
|
+
Pe,
|
|
345
|
+
[Yr]
|
|
346
|
+
), [Zr, Jr] = Xr(Pe), Jt = a.forwardRef(
|
|
347
|
+
(e, t) => /* @__PURE__ */ i.jsx(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i.jsx(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i.jsx(Qr, { ...e, ref: t }) }) })
|
|
363
348
|
);
|
|
364
|
-
Jt.displayName =
|
|
365
|
-
var
|
|
349
|
+
Jt.displayName = Pe;
|
|
350
|
+
var Qr = a.forwardRef((e, t) => {
|
|
366
351
|
const {
|
|
367
352
|
__scopeRovingFocusGroup: n,
|
|
368
353
|
orientation: o,
|
|
@@ -374,39 +359,39 @@ var eo = a.forwardRef((e, t) => {
|
|
|
374
359
|
onEntryFocus: l,
|
|
375
360
|
preventScrollOnEntryFocus: f = !1,
|
|
376
361
|
...m
|
|
377
|
-
} = e, x = a.useRef(null), g = V(t, x), w = dt(s), [
|
|
362
|
+
} = e, x = a.useRef(null), g = V(t, x), w = dt(s), [v, h] = ye({
|
|
378
363
|
prop: c,
|
|
379
364
|
defaultProp: d ?? null,
|
|
380
365
|
onChange: u,
|
|
381
|
-
caller:
|
|
366
|
+
caller: Pe
|
|
382
367
|
}), [S, y] = a.useState(!1), I = Me(l), A = Xt(n), M = a.useRef(!1), [j, E] = a.useState(0);
|
|
383
368
|
return a.useEffect(() => {
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
return
|
|
369
|
+
const _ = x.current;
|
|
370
|
+
if (_)
|
|
371
|
+
return _.addEventListener(qe, I), () => _.removeEventListener(qe, I);
|
|
387
372
|
}, [I]), /* @__PURE__ */ i.jsx(
|
|
388
|
-
|
|
373
|
+
Zr,
|
|
389
374
|
{
|
|
390
375
|
scope: n,
|
|
391
376
|
orientation: o,
|
|
392
377
|
dir: w,
|
|
393
378
|
loop: r,
|
|
394
|
-
currentTabStopId:
|
|
379
|
+
currentTabStopId: v,
|
|
395
380
|
onItemFocus: a.useCallback(
|
|
396
|
-
(
|
|
397
|
-
[
|
|
381
|
+
(_) => h(_),
|
|
382
|
+
[h]
|
|
398
383
|
),
|
|
399
384
|
onItemShiftTab: a.useCallback(() => y(!0), []),
|
|
400
385
|
onFocusableItemAdd: a.useCallback(
|
|
401
|
-
() => E((
|
|
386
|
+
() => E((_) => _ + 1),
|
|
402
387
|
[]
|
|
403
388
|
),
|
|
404
389
|
onFocusableItemRemove: a.useCallback(
|
|
405
|
-
() => E((
|
|
390
|
+
() => E((_) => _ - 1),
|
|
406
391
|
[]
|
|
407
392
|
),
|
|
408
393
|
children: /* @__PURE__ */ i.jsx(
|
|
409
|
-
|
|
394
|
+
P.div,
|
|
410
395
|
{
|
|
411
396
|
tabIndex: S || j === 0 ? -1 : 0,
|
|
412
397
|
"data-orientation": o,
|
|
@@ -416,12 +401,12 @@ var eo = a.forwardRef((e, t) => {
|
|
|
416
401
|
onMouseDown: L(e.onMouseDown, () => {
|
|
417
402
|
M.current = !0;
|
|
418
403
|
}),
|
|
419
|
-
onFocus: L(e.onFocus, (
|
|
404
|
+
onFocus: L(e.onFocus, (_) => {
|
|
420
405
|
const z = !M.current;
|
|
421
|
-
if (
|
|
422
|
-
const U = new CustomEvent(qe,
|
|
423
|
-
if (
|
|
424
|
-
const W = A().filter((F) => F.focusable), q = W.find((F) => F.active), X = W.find((F) => F.id ===
|
|
406
|
+
if (_.target === _.currentTarget && z && !S) {
|
|
407
|
+
const U = new CustomEvent(qe, qr);
|
|
408
|
+
if (_.currentTarget.dispatchEvent(U), !U.defaultPrevented) {
|
|
409
|
+
const W = A().filter((F) => F.focusable), q = W.find((F) => F.active), X = W.find((F) => F.id === v), K = [q, X, ...W].filter(
|
|
425
410
|
Boolean
|
|
426
411
|
).map((F) => F.ref.current);
|
|
427
412
|
tn(K, f);
|
|
@@ -443,7 +428,7 @@ var eo = a.forwardRef((e, t) => {
|
|
|
443
428
|
tabStopId: s,
|
|
444
429
|
children: c,
|
|
445
430
|
...d
|
|
446
|
-
} = e, u = Z(), l = s || u, f =
|
|
431
|
+
} = e, u = Z(), l = s || u, f = Jr(Qt, n), m = f.currentTabStopId === l, x = Xt(n), { onFocusableItemAdd: g, onFocusableItemRemove: w, currentTabStopId: v } = f;
|
|
447
432
|
return a.useEffect(() => {
|
|
448
433
|
if (o)
|
|
449
434
|
return g(), () => w();
|
|
@@ -455,37 +440,37 @@ var eo = a.forwardRef((e, t) => {
|
|
|
455
440
|
focusable: o,
|
|
456
441
|
active: r,
|
|
457
442
|
children: /* @__PURE__ */ i.jsx(
|
|
458
|
-
|
|
443
|
+
P.span,
|
|
459
444
|
{
|
|
460
445
|
tabIndex: m ? 0 : -1,
|
|
461
446
|
"data-orientation": f.orientation,
|
|
462
447
|
...d,
|
|
463
448
|
ref: t,
|
|
464
|
-
onMouseDown: L(e.onMouseDown, (
|
|
465
|
-
o ? f.onItemFocus(l) :
|
|
449
|
+
onMouseDown: L(e.onMouseDown, (h) => {
|
|
450
|
+
o ? f.onItemFocus(l) : h.preventDefault();
|
|
466
451
|
}),
|
|
467
452
|
onFocus: L(e.onFocus, () => f.onItemFocus(l)),
|
|
468
|
-
onKeyDown: L(e.onKeyDown, (
|
|
469
|
-
if (
|
|
453
|
+
onKeyDown: L(e.onKeyDown, (h) => {
|
|
454
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
470
455
|
f.onItemShiftTab();
|
|
471
456
|
return;
|
|
472
457
|
}
|
|
473
|
-
if (
|
|
474
|
-
const S =
|
|
458
|
+
if (h.target !== h.currentTarget) return;
|
|
459
|
+
const S = no(h, f.orientation, f.dir);
|
|
475
460
|
if (S !== void 0) {
|
|
476
|
-
if (
|
|
477
|
-
|
|
461
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
462
|
+
h.preventDefault();
|
|
478
463
|
let I = x().filter((A) => A.focusable).map((A) => A.ref.current);
|
|
479
464
|
if (S === "last") I.reverse();
|
|
480
465
|
else if (S === "prev" || S === "next") {
|
|
481
466
|
S === "prev" && I.reverse();
|
|
482
|
-
const A = I.indexOf(
|
|
483
|
-
I = f.loop ?
|
|
467
|
+
const A = I.indexOf(h.currentTarget);
|
|
468
|
+
I = f.loop ? ro(I, A + 1) : I.slice(A + 1);
|
|
484
469
|
}
|
|
485
470
|
setTimeout(() => tn(I));
|
|
486
471
|
}
|
|
487
472
|
}),
|
|
488
|
-
children: typeof c == "function" ? c({ isCurrentTabStop: m, hasTabStop:
|
|
473
|
+
children: typeof c == "function" ? c({ isCurrentTabStop: m, hasTabStop: v != null }) : c
|
|
489
474
|
}
|
|
490
475
|
)
|
|
491
476
|
}
|
|
@@ -493,7 +478,7 @@ var eo = a.forwardRef((e, t) => {
|
|
|
493
478
|
}
|
|
494
479
|
);
|
|
495
480
|
en.displayName = Qt;
|
|
496
|
-
var
|
|
481
|
+
var eo = {
|
|
497
482
|
ArrowLeft: "prev",
|
|
498
483
|
ArrowUp: "prev",
|
|
499
484
|
ArrowRight: "next",
|
|
@@ -503,24 +488,24 @@ var to = {
|
|
|
503
488
|
PageDown: "last",
|
|
504
489
|
End: "last"
|
|
505
490
|
};
|
|
506
|
-
function
|
|
491
|
+
function to(e, t) {
|
|
507
492
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
508
493
|
}
|
|
509
|
-
function
|
|
510
|
-
const o =
|
|
494
|
+
function no(e, t, n) {
|
|
495
|
+
const o = to(e.key, n);
|
|
511
496
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
512
|
-
return
|
|
497
|
+
return eo[o];
|
|
513
498
|
}
|
|
514
499
|
function tn(e, t = !1) {
|
|
515
500
|
const n = document.activeElement;
|
|
516
501
|
for (const o of e)
|
|
517
502
|
if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
518
503
|
}
|
|
519
|
-
function
|
|
504
|
+
function ro(e, t) {
|
|
520
505
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
521
506
|
}
|
|
522
|
-
var
|
|
523
|
-
|
|
507
|
+
var oo = Jt, so = en, ao = "Label", nn = a.forwardRef((e, t) => /* @__PURE__ */ i.jsx(
|
|
508
|
+
P.label,
|
|
524
509
|
{
|
|
525
510
|
...e,
|
|
526
511
|
ref: t,
|
|
@@ -529,12 +514,12 @@ var so = Jt, ao = en, io = "Label", nn = a.forwardRef((e, t) => /* @__PURE__ */
|
|
|
529
514
|
}
|
|
530
515
|
}
|
|
531
516
|
));
|
|
532
|
-
nn.displayName =
|
|
533
|
-
var
|
|
517
|
+
nn.displayName = ao;
|
|
518
|
+
var io = nn;
|
|
534
519
|
function yt(e, [t, n]) {
|
|
535
520
|
return Math.min(n, Math.max(t, e));
|
|
536
521
|
}
|
|
537
|
-
var mt = "Radio", [
|
|
522
|
+
var mt = "Radio", [co, rn] = we(mt), [lo, uo] = co(mt), on = a.forwardRef(
|
|
538
523
|
(e, t) => {
|
|
539
524
|
const {
|
|
540
525
|
__scopeRadio: n,
|
|
@@ -546,10 +531,10 @@ var mt = "Radio", [lo, rn] = we(mt), [uo, fo] = lo(mt), on = a.forwardRef(
|
|
|
546
531
|
onCheck: u,
|
|
547
532
|
form: l,
|
|
548
533
|
...f
|
|
549
|
-
} = e, [m, x] = a.useState(null), g = V(t, (
|
|
550
|
-
return /* @__PURE__ */ i.jsxs(
|
|
534
|
+
} = e, [m, x] = a.useState(null), g = V(t, (h) => x(h)), w = a.useRef(!1), v = m ? l || !!m.closest("form") : !0;
|
|
535
|
+
return /* @__PURE__ */ i.jsxs(lo, { scope: n, checked: r, disabled: c, children: [
|
|
551
536
|
/* @__PURE__ */ i.jsx(
|
|
552
|
-
|
|
537
|
+
P.button,
|
|
553
538
|
{
|
|
554
539
|
type: "button",
|
|
555
540
|
role: "radio",
|
|
@@ -560,12 +545,12 @@ var mt = "Radio", [lo, rn] = we(mt), [uo, fo] = lo(mt), on = a.forwardRef(
|
|
|
560
545
|
value: d,
|
|
561
546
|
...f,
|
|
562
547
|
ref: g,
|
|
563
|
-
onClick: L(e.onClick, (
|
|
564
|
-
r || u?.(),
|
|
548
|
+
onClick: L(e.onClick, (h) => {
|
|
549
|
+
r || u?.(), v && (w.current = h.isPropagationStopped(), w.current || h.stopPropagation());
|
|
565
550
|
})
|
|
566
551
|
}
|
|
567
552
|
),
|
|
568
|
-
|
|
553
|
+
v && /* @__PURE__ */ i.jsx(
|
|
569
554
|
cn,
|
|
570
555
|
{
|
|
571
556
|
control: m,
|
|
@@ -585,9 +570,9 @@ var mt = "Radio", [lo, rn] = we(mt), [uo, fo] = lo(mt), on = a.forwardRef(
|
|
|
585
570
|
on.displayName = mt;
|
|
586
571
|
var sn = "RadioIndicator", an = a.forwardRef(
|
|
587
572
|
(e, t) => {
|
|
588
|
-
const { __scopeRadio: n, forceMount: o, ...r } = e, s =
|
|
573
|
+
const { __scopeRadio: n, forceMount: o, ...r } = e, s = uo(sn, n);
|
|
589
574
|
return /* @__PURE__ */ i.jsx(jt, { present: o || s.checked, children: /* @__PURE__ */ i.jsx(
|
|
590
|
-
|
|
575
|
+
P.span,
|
|
591
576
|
{
|
|
592
577
|
"data-state": ln(s.checked),
|
|
593
578
|
"data-disabled": s.disabled ? "" : void 0,
|
|
@@ -598,7 +583,7 @@ var sn = "RadioIndicator", an = a.forwardRef(
|
|
|
598
583
|
}
|
|
599
584
|
);
|
|
600
585
|
an.displayName = sn;
|
|
601
|
-
var
|
|
586
|
+
var fo = "RadioBubbleInput", cn = a.forwardRef(
|
|
602
587
|
({
|
|
603
588
|
__scopeRadio: e,
|
|
604
589
|
control: t,
|
|
@@ -606,7 +591,7 @@ var po = "RadioBubbleInput", cn = a.forwardRef(
|
|
|
606
591
|
bubbles: o = !0,
|
|
607
592
|
...r
|
|
608
593
|
}, s) => {
|
|
609
|
-
const c = a.useRef(null), d = V(c, s), u = ft(n), l =
|
|
594
|
+
const c = a.useRef(null), d = V(c, s), u = ft(n), l = _t(t);
|
|
610
595
|
return a.useEffect(() => {
|
|
611
596
|
const f = c.current;
|
|
612
597
|
if (!f) return;
|
|
@@ -619,7 +604,7 @@ var po = "RadioBubbleInput", cn = a.forwardRef(
|
|
|
619
604
|
g.call(f, n), f.dispatchEvent(w);
|
|
620
605
|
}
|
|
621
606
|
}, [u, n, o]), /* @__PURE__ */ i.jsx(
|
|
622
|
-
|
|
607
|
+
P.input,
|
|
623
608
|
{
|
|
624
609
|
type: "radio",
|
|
625
610
|
"aria-hidden": !0,
|
|
@@ -639,14 +624,14 @@ var po = "RadioBubbleInput", cn = a.forwardRef(
|
|
|
639
624
|
);
|
|
640
625
|
}
|
|
641
626
|
);
|
|
642
|
-
cn.displayName =
|
|
627
|
+
cn.displayName = fo;
|
|
643
628
|
function ln(e) {
|
|
644
629
|
return e ? "checked" : "unchecked";
|
|
645
630
|
}
|
|
646
|
-
var
|
|
631
|
+
var po = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup", [mo, ja] = we(Le, [
|
|
647
632
|
Zt,
|
|
648
633
|
rn
|
|
649
|
-
]), dn = Zt(), un = rn(), [vo,
|
|
634
|
+
]), dn = Zt(), un = rn(), [vo, ho] = mo(Le), fn = a.forwardRef(
|
|
650
635
|
(e, t) => {
|
|
651
636
|
const {
|
|
652
637
|
__scopeRadioGroup: n,
|
|
@@ -660,7 +645,7 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
660
645
|
loop: f = !0,
|
|
661
646
|
onValueChange: m,
|
|
662
647
|
...x
|
|
663
|
-
} = e, g = dn(n), w = dt(l), [
|
|
648
|
+
} = e, g = dn(n), w = dt(l), [v, h] = ye({
|
|
664
649
|
prop: s,
|
|
665
650
|
defaultProp: r ?? null,
|
|
666
651
|
onChange: m,
|
|
@@ -673,10 +658,10 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
673
658
|
name: o,
|
|
674
659
|
required: c,
|
|
675
660
|
disabled: d,
|
|
676
|
-
value:
|
|
677
|
-
onValueChange:
|
|
661
|
+
value: v,
|
|
662
|
+
onValueChange: h,
|
|
678
663
|
children: /* @__PURE__ */ i.jsx(
|
|
679
|
-
|
|
664
|
+
oo,
|
|
680
665
|
{
|
|
681
666
|
asChild: !0,
|
|
682
667
|
...g,
|
|
@@ -684,7 +669,7 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
684
669
|
dir: w,
|
|
685
670
|
loop: f,
|
|
686
671
|
children: /* @__PURE__ */ i.jsx(
|
|
687
|
-
|
|
672
|
+
P.div,
|
|
688
673
|
{
|
|
689
674
|
role: "radiogroup",
|
|
690
675
|
"aria-required": c,
|
|
@@ -704,16 +689,16 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
704
689
|
fn.displayName = Le;
|
|
705
690
|
var pn = "RadioGroupItem", mn = a.forwardRef(
|
|
706
691
|
(e, t) => {
|
|
707
|
-
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s =
|
|
692
|
+
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s = ho(pn, n), c = s.disabled || o, d = dn(n), u = un(n), l = a.useRef(null), f = V(t, l), m = s.value === r.value, x = a.useRef(!1);
|
|
708
693
|
return a.useEffect(() => {
|
|
709
|
-
const g = (
|
|
710
|
-
|
|
694
|
+
const g = (v) => {
|
|
695
|
+
po.includes(v.key) && (x.current = !0);
|
|
711
696
|
}, w = () => x.current = !1;
|
|
712
697
|
return document.addEventListener("keydown", g), document.addEventListener("keyup", w), () => {
|
|
713
698
|
document.removeEventListener("keydown", g), document.removeEventListener("keyup", w);
|
|
714
699
|
};
|
|
715
700
|
}, []), /* @__PURE__ */ i.jsx(
|
|
716
|
-
|
|
701
|
+
so,
|
|
717
702
|
{
|
|
718
703
|
asChild: !0,
|
|
719
704
|
...d,
|
|
@@ -743,17 +728,17 @@ var pn = "RadioGroupItem", mn = a.forwardRef(
|
|
|
743
728
|
}
|
|
744
729
|
);
|
|
745
730
|
mn.displayName = pn;
|
|
746
|
-
var
|
|
731
|
+
var go = "RadioGroupIndicator", vn = a.forwardRef(
|
|
747
732
|
(e, t) => {
|
|
748
733
|
const { __scopeRadioGroup: n, ...o } = e, r = un(n);
|
|
749
734
|
return /* @__PURE__ */ i.jsx(an, { ...r, ...o, ref: t });
|
|
750
735
|
}
|
|
751
736
|
);
|
|
752
|
-
|
|
753
|
-
var
|
|
754
|
-
|
|
737
|
+
vn.displayName = go;
|
|
738
|
+
var xo = fn, bo = mn, yo = vn, wo = [" ", "Enter", "ArrowUp", "ArrowDown"], Co = [" ", "Enter"], pe = "Select", [Fe, Be, So] = kt(pe), [Ce, _a] = we(pe, [
|
|
739
|
+
So,
|
|
755
740
|
Tt
|
|
756
|
-
]), $e = Tt(), [
|
|
741
|
+
]), $e = Tt(), [Eo, ce] = Ce(pe), [Io, Ro] = Ce(pe), hn = (e) => {
|
|
757
742
|
const {
|
|
758
743
|
__scopeSelect: t,
|
|
759
744
|
children: n,
|
|
@@ -769,7 +754,7 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
769
754
|
disabled: x,
|
|
770
755
|
required: g,
|
|
771
756
|
form: w
|
|
772
|
-
} = e,
|
|
757
|
+
} = e, v = $e(t), [h, S] = a.useState(null), [y, I] = a.useState(null), [A, M] = a.useState(!1), j = dt(l), [E, _] = ye({
|
|
773
758
|
prop: o,
|
|
774
759
|
defaultProp: r ?? !1,
|
|
775
760
|
onChange: s,
|
|
@@ -779,13 +764,13 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
779
764
|
defaultProp: d,
|
|
780
765
|
onChange: u,
|
|
781
766
|
caller: pe
|
|
782
|
-
}), W = a.useRef(null), q =
|
|
783
|
-
return /* @__PURE__ */ i.jsx(
|
|
784
|
-
|
|
767
|
+
}), W = a.useRef(null), q = h ? w || !!h.closest("form") : !0, [X, H] = a.useState(/* @__PURE__ */ new Set()), K = Array.from(X).map((F) => F.props.value).join(";");
|
|
768
|
+
return /* @__PURE__ */ i.jsx(xr, { ...v, children: /* @__PURE__ */ i.jsxs(
|
|
769
|
+
Eo,
|
|
785
770
|
{
|
|
786
771
|
required: g,
|
|
787
772
|
scope: t,
|
|
788
|
-
trigger:
|
|
773
|
+
trigger: h,
|
|
789
774
|
onTriggerChange: S,
|
|
790
775
|
valueNode: y,
|
|
791
776
|
onValueNodeChange: I,
|
|
@@ -795,13 +780,13 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
795
780
|
value: z,
|
|
796
781
|
onValueChange: U,
|
|
797
782
|
open: E,
|
|
798
|
-
onOpenChange:
|
|
783
|
+
onOpenChange: _,
|
|
799
784
|
dir: j,
|
|
800
785
|
triggerPointerDownPosRef: W,
|
|
801
786
|
disabled: x,
|
|
802
787
|
children: [
|
|
803
788
|
/* @__PURE__ */ i.jsx(Fe.Provider, { scope: t, children: /* @__PURE__ */ i.jsx(
|
|
804
|
-
|
|
789
|
+
Io,
|
|
805
790
|
{
|
|
806
791
|
scope: e.__scopeSelect,
|
|
807
792
|
onNativeOptionAdd: a.useCallback((F) => {
|
|
@@ -839,20 +824,20 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
839
824
|
}
|
|
840
825
|
) });
|
|
841
826
|
};
|
|
842
|
-
|
|
827
|
+
hn.displayName = pe;
|
|
843
828
|
var gn = "SelectTrigger", xn = a.forwardRef(
|
|
844
829
|
(e, t) => {
|
|
845
|
-
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = $e(n), c = ce(gn, n), d = c.disabled || o, u = V(t, c.onTriggerChange), l = Be(n), f = a.useRef("touch"), [m, x, g] = $n((
|
|
846
|
-
const
|
|
830
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = $e(n), c = ce(gn, n), d = c.disabled || o, u = V(t, c.onTriggerChange), l = Be(n), f = a.useRef("touch"), [m, x, g] = $n((v) => {
|
|
831
|
+
const h = l().filter((I) => !I.disabled), S = h.find((I) => I.value === c.value), y = Vn(h, v, S);
|
|
847
832
|
y !== void 0 && c.onValueChange(y.value);
|
|
848
|
-
}), w = (
|
|
849
|
-
d || (c.onOpenChange(!0), g()),
|
|
850
|
-
x: Math.round(
|
|
851
|
-
y: Math.round(
|
|
833
|
+
}), w = (v) => {
|
|
834
|
+
d || (c.onOpenChange(!0), g()), v && (c.triggerPointerDownPosRef.current = {
|
|
835
|
+
x: Math.round(v.pageX),
|
|
836
|
+
y: Math.round(v.pageY)
|
|
852
837
|
});
|
|
853
838
|
};
|
|
854
|
-
return /* @__PURE__ */ i.jsx(
|
|
855
|
-
|
|
839
|
+
return /* @__PURE__ */ i.jsx(br, { asChild: !0, ...s, children: /* @__PURE__ */ i.jsx(
|
|
840
|
+
P.button,
|
|
856
841
|
{
|
|
857
842
|
type: "button",
|
|
858
843
|
role: "combobox",
|
|
@@ -867,17 +852,17 @@ var gn = "SelectTrigger", xn = a.forwardRef(
|
|
|
867
852
|
"data-placeholder": Bn(c.value) ? "" : void 0,
|
|
868
853
|
...r,
|
|
869
854
|
ref: u,
|
|
870
|
-
onClick: L(r.onClick, (
|
|
871
|
-
|
|
855
|
+
onClick: L(r.onClick, (v) => {
|
|
856
|
+
v.currentTarget.focus(), f.current !== "mouse" && w(v);
|
|
872
857
|
}),
|
|
873
|
-
onPointerDown: L(r.onPointerDown, (
|
|
874
|
-
f.current =
|
|
875
|
-
const
|
|
876
|
-
|
|
858
|
+
onPointerDown: L(r.onPointerDown, (v) => {
|
|
859
|
+
f.current = v.pointerType;
|
|
860
|
+
const h = v.target;
|
|
861
|
+
h.hasPointerCapture(v.pointerId) && h.releasePointerCapture(v.pointerId), v.button === 0 && v.ctrlKey === !1 && v.pointerType === "mouse" && (w(v), v.preventDefault());
|
|
877
862
|
}),
|
|
878
|
-
onKeyDown: L(r.onKeyDown, (
|
|
879
|
-
const
|
|
880
|
-
!(
|
|
863
|
+
onKeyDown: L(r.onKeyDown, (v) => {
|
|
864
|
+
const h = m.current !== "";
|
|
865
|
+
!(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && x(v.key), !(h && v.key === " ") && wo.includes(v.key) && (w(), v.preventDefault());
|
|
881
866
|
})
|
|
882
867
|
}
|
|
883
868
|
) });
|
|
@@ -890,7 +875,7 @@ var bn = "SelectValue", yn = a.forwardRef(
|
|
|
890
875
|
return ne(() => {
|
|
891
876
|
l(f);
|
|
892
877
|
}, [l, f]), /* @__PURE__ */ i.jsx(
|
|
893
|
-
|
|
878
|
+
P.span,
|
|
894
879
|
{
|
|
895
880
|
...d,
|
|
896
881
|
ref: m,
|
|
@@ -901,15 +886,15 @@ var bn = "SelectValue", yn = a.forwardRef(
|
|
|
901
886
|
}
|
|
902
887
|
);
|
|
903
888
|
yn.displayName = bn;
|
|
904
|
-
var
|
|
889
|
+
var No = "SelectIcon", wn = a.forwardRef(
|
|
905
890
|
(e, t) => {
|
|
906
891
|
const { __scopeSelect: n, children: o, ...r } = e;
|
|
907
|
-
return /* @__PURE__ */ i.jsx(
|
|
892
|
+
return /* @__PURE__ */ i.jsx(P.span, { "aria-hidden": !0, ...r, ref: t, children: o || "▼" });
|
|
908
893
|
}
|
|
909
894
|
);
|
|
910
|
-
wn.displayName =
|
|
911
|
-
var
|
|
912
|
-
Cn.displayName =
|
|
895
|
+
wn.displayName = No;
|
|
896
|
+
var Po = "SelectPortal", Cn = (e) => /* @__PURE__ */ i.jsx(Dt, { asChild: !0, ...e });
|
|
897
|
+
Cn.displayName = Po;
|
|
913
898
|
var me = "SelectContent", Sn = a.forwardRef(
|
|
914
899
|
(e, t) => {
|
|
915
900
|
const n = ce(me, e.__scopeSelect), [o, r] = a.useState();
|
|
@@ -926,7 +911,7 @@ var me = "SelectContent", Sn = a.forwardRef(
|
|
|
926
911
|
}
|
|
927
912
|
);
|
|
928
913
|
Sn.displayName = me;
|
|
929
|
-
var ee = 10, [En, le] = Ce(me),
|
|
914
|
+
var ee = 10, [En, le] = Ce(me), jo = "SelectContentImpl", _o = Pt("SelectContent.RemoveScroll"), In = a.forwardRef(
|
|
930
915
|
(e, t) => {
|
|
931
916
|
const {
|
|
932
917
|
__scopeSelect: n,
|
|
@@ -944,16 +929,16 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
944
929
|
collisionBoundary: x,
|
|
945
930
|
collisionPadding: g,
|
|
946
931
|
sticky: w,
|
|
947
|
-
hideWhenDetached:
|
|
948
|
-
avoidCollisions:
|
|
932
|
+
hideWhenDetached: v,
|
|
933
|
+
avoidCollisions: h,
|
|
949
934
|
//
|
|
950
935
|
...S
|
|
951
|
-
} = e, y = ce(me, n), [I, A] = a.useState(null), [M, j] = a.useState(null), E = V(t, (b) => A(b)), [
|
|
936
|
+
} = e, y = ce(me, n), [I, A] = a.useState(null), [M, j] = a.useState(null), E = V(t, (b) => A(b)), [_, z] = a.useState(null), [U, W] = a.useState(
|
|
952
937
|
null
|
|
953
938
|
), q = Be(n), [X, H] = a.useState(!1), K = a.useRef(!1);
|
|
954
939
|
a.useEffect(() => {
|
|
955
940
|
if (I) return At(I);
|
|
956
|
-
}, [I]),
|
|
941
|
+
}, [I]), wr();
|
|
957
942
|
const F = a.useCallback(
|
|
958
943
|
(b) => {
|
|
959
944
|
const [T, ...D] = q().map((G) => G.ref.current), [O] = D.slice(-1), B = document.activeElement;
|
|
@@ -962,8 +947,8 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
962
947
|
},
|
|
963
948
|
[q, M]
|
|
964
949
|
), Y = a.useCallback(
|
|
965
|
-
() => F([
|
|
966
|
-
[F,
|
|
950
|
+
() => F([_, I]),
|
|
951
|
+
[F, _, I]
|
|
967
952
|
);
|
|
968
953
|
a.useEffect(() => {
|
|
969
954
|
X && Y();
|
|
@@ -1005,7 +990,7 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1005
990
|
(y.value !== void 0 && y.value === T || O) && W(b);
|
|
1006
991
|
},
|
|
1007
992
|
[y.value]
|
|
1008
|
-
), C = o === "popper" ? et : Rn,
|
|
993
|
+
), C = o === "popper" ? et : Rn, k = C === et ? {
|
|
1009
994
|
side: d,
|
|
1010
995
|
sideOffset: u,
|
|
1011
996
|
align: l,
|
|
@@ -1014,8 +999,8 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1014
999
|
collisionBoundary: x,
|
|
1015
1000
|
collisionPadding: g,
|
|
1016
1001
|
sticky: w,
|
|
1017
|
-
hideWhenDetached:
|
|
1018
|
-
avoidCollisions:
|
|
1002
|
+
hideWhenDetached: v,
|
|
1003
|
+
avoidCollisions: h
|
|
1019
1004
|
} : {};
|
|
1020
1005
|
return /* @__PURE__ */ i.jsx(
|
|
1021
1006
|
En,
|
|
@@ -1025,7 +1010,7 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1025
1010
|
viewport: M,
|
|
1026
1011
|
onViewportChange: j,
|
|
1027
1012
|
itemRefCallback: p,
|
|
1028
|
-
selectedItem:
|
|
1013
|
+
selectedItem: _,
|
|
1029
1014
|
onItemLeave: R,
|
|
1030
1015
|
itemTextRefCallback: N,
|
|
1031
1016
|
focusSelectedItem: Y,
|
|
@@ -1045,7 +1030,7 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1045
1030
|
y.trigger?.focus({ preventScroll: !0 }), b.preventDefault();
|
|
1046
1031
|
}),
|
|
1047
1032
|
children: /* @__PURE__ */ i.jsx(
|
|
1048
|
-
|
|
1033
|
+
Cr,
|
|
1049
1034
|
{
|
|
1050
1035
|
asChild: !0,
|
|
1051
1036
|
disableOutsidePointerEvents: !0,
|
|
@@ -1062,7 +1047,7 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1062
1047
|
dir: y.dir,
|
|
1063
1048
|
onContextMenu: (b) => b.preventDefault(),
|
|
1064
1049
|
...S,
|
|
1065
|
-
...
|
|
1050
|
+
...k,
|
|
1066
1051
|
onPlaced: () => H(!0),
|
|
1067
1052
|
ref: E,
|
|
1068
1053
|
style: {
|
|
@@ -1094,13 +1079,13 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1094
1079
|
);
|
|
1095
1080
|
}
|
|
1096
1081
|
);
|
|
1097
|
-
In.displayName =
|
|
1098
|
-
var
|
|
1099
|
-
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = ce(me, n), c = le(me, n), [d, u] = a.useState(null), [l, f] = a.useState(null), m = V(t, (E) => f(E)), x = Be(n), g = a.useRef(!1), w = a.useRef(!0), { viewport:
|
|
1100
|
-
if (s.trigger && s.valueNode && d && l &&
|
|
1101
|
-
const E = s.trigger.getBoundingClientRect(),
|
|
1082
|
+
In.displayName = jo;
|
|
1083
|
+
var ko = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
1084
|
+
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = ce(me, n), c = le(me, n), [d, u] = a.useState(null), [l, f] = a.useState(null), m = V(t, (E) => f(E)), x = Be(n), g = a.useRef(!1), w = a.useRef(!0), { viewport: v, selectedItem: h, selectedItemText: S, focusSelectedItem: y } = c, I = a.useCallback(() => {
|
|
1085
|
+
if (s.trigger && s.valueNode && d && l && v && h && S) {
|
|
1086
|
+
const E = s.trigger.getBoundingClientRect(), _ = l.getBoundingClientRect(), z = s.valueNode.getBoundingClientRect(), U = S.getBoundingClientRect();
|
|
1102
1087
|
if (s.dir !== "rtl") {
|
|
1103
|
-
const B = U.left -
|
|
1088
|
+
const B = U.left - _.left, G = z.left - B, ue = E.left - G, fe = E.width + ue, We = Math.max(fe, _.width), He = window.innerWidth - ee, Ke = yt(G, [
|
|
1104
1089
|
ee,
|
|
1105
1090
|
// Prevents the content from going off the starting edge of the
|
|
1106
1091
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -1111,31 +1096,31 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1111
1096
|
]);
|
|
1112
1097
|
d.style.minWidth = fe + "px", d.style.left = Ke + "px";
|
|
1113
1098
|
} else {
|
|
1114
|
-
const B =
|
|
1099
|
+
const B = _.right - U.right, G = window.innerWidth - z.right - B, ue = window.innerWidth - E.right - G, fe = E.width + ue, We = Math.max(fe, _.width), He = window.innerWidth - ee, Ke = yt(G, [
|
|
1115
1100
|
ee,
|
|
1116
1101
|
Math.max(ee, He - We)
|
|
1117
1102
|
]);
|
|
1118
1103
|
d.style.minWidth = fe + "px", d.style.right = Ke + "px";
|
|
1119
1104
|
}
|
|
1120
|
-
const W = x(), q = window.innerHeight - ee * 2, X =
|
|
1105
|
+
const W = x(), q = window.innerHeight - ee * 2, X = v.scrollHeight, H = window.getComputedStyle(l), K = parseInt(H.borderTopWidth, 10), F = parseInt(H.paddingTop, 10), Y = parseInt(H.borderBottomWidth, 10), J = parseInt(H.paddingBottom, 10), Q = K + F + X + J + Y, ge = Math.min(h.offsetHeight * 5, Q), de = window.getComputedStyle(v), p = parseInt(de.paddingTop, 10), R = parseInt(de.paddingBottom, 10), N = E.top + E.height / 2 - ee, C = q - N, k = h.offsetHeight / 2, b = h.offsetTop + k, T = K + F + b, D = Q - T;
|
|
1121
1106
|
if (T <= N) {
|
|
1122
|
-
const B = W.length > 0 &&
|
|
1107
|
+
const B = W.length > 0 && h === W[W.length - 1].ref.current;
|
|
1123
1108
|
d.style.bottom = "0px";
|
|
1124
|
-
const G = l.clientHeight -
|
|
1109
|
+
const G = l.clientHeight - v.offsetTop - v.offsetHeight, ue = Math.max(
|
|
1125
1110
|
C,
|
|
1126
|
-
|
|
1111
|
+
k + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
1127
1112
|
(B ? R : 0) + G + Y
|
|
1128
1113
|
), fe = T + ue;
|
|
1129
1114
|
d.style.height = fe + "px";
|
|
1130
1115
|
} else {
|
|
1131
|
-
const B = W.length > 0 &&
|
|
1116
|
+
const B = W.length > 0 && h === W[0].ref.current;
|
|
1132
1117
|
d.style.top = "0px";
|
|
1133
1118
|
const ue = Math.max(
|
|
1134
1119
|
N,
|
|
1135
|
-
K +
|
|
1136
|
-
(B ? p : 0) +
|
|
1120
|
+
K + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
1121
|
+
(B ? p : 0) + k
|
|
1137
1122
|
) + D;
|
|
1138
|
-
d.style.height = ue + "px",
|
|
1123
|
+
d.style.height = ue + "px", v.scrollTop = T - N + v.offsetTop;
|
|
1139
1124
|
}
|
|
1140
1125
|
d.style.margin = `${ee}px 0`, d.style.minHeight = ge + "px", d.style.maxHeight = q + "px", o?.(), requestAnimationFrame(() => g.current = !0);
|
|
1141
1126
|
}
|
|
@@ -1145,8 +1130,8 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1145
1130
|
s.valueNode,
|
|
1146
1131
|
d,
|
|
1147
1132
|
l,
|
|
1148
|
-
h,
|
|
1149
1133
|
v,
|
|
1134
|
+
h,
|
|
1150
1135
|
S,
|
|
1151
1136
|
s.dir,
|
|
1152
1137
|
o
|
|
@@ -1163,7 +1148,7 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1163
1148
|
[I, y]
|
|
1164
1149
|
);
|
|
1165
1150
|
return /* @__PURE__ */ i.jsx(
|
|
1166
|
-
|
|
1151
|
+
Do,
|
|
1167
1152
|
{
|
|
1168
1153
|
scope: n,
|
|
1169
1154
|
contentWrapper: d,
|
|
@@ -1180,7 +1165,7 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1180
1165
|
zIndex: A
|
|
1181
1166
|
},
|
|
1182
1167
|
children: /* @__PURE__ */ i.jsx(
|
|
1183
|
-
|
|
1168
|
+
P.div,
|
|
1184
1169
|
{
|
|
1185
1170
|
...r,
|
|
1186
1171
|
ref: m,
|
|
@@ -1199,8 +1184,8 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1199
1184
|
}
|
|
1200
1185
|
);
|
|
1201
1186
|
});
|
|
1202
|
-
Rn.displayName =
|
|
1203
|
-
var
|
|
1187
|
+
Rn.displayName = ko;
|
|
1188
|
+
var To = "SelectPopperPosition", et = a.forwardRef((e, t) => {
|
|
1204
1189
|
const {
|
|
1205
1190
|
__scopeSelect: n,
|
|
1206
1191
|
align: o = "start",
|
|
@@ -1208,7 +1193,7 @@ var Do = "SelectPopperPosition", et = a.forwardRef((e, t) => {
|
|
|
1208
1193
|
...s
|
|
1209
1194
|
} = e, c = $e(n);
|
|
1210
1195
|
return /* @__PURE__ */ i.jsx(
|
|
1211
|
-
|
|
1196
|
+
Sr,
|
|
1212
1197
|
{
|
|
1213
1198
|
...c,
|
|
1214
1199
|
...s,
|
|
@@ -1228,10 +1213,10 @@ var Do = "SelectPopperPosition", et = a.forwardRef((e, t) => {
|
|
|
1228
1213
|
}
|
|
1229
1214
|
);
|
|
1230
1215
|
});
|
|
1231
|
-
et.displayName =
|
|
1232
|
-
var [
|
|
1216
|
+
et.displayName = To;
|
|
1217
|
+
var [Do, vt] = Ce(me, {}), tt = "SelectViewport", Nn = a.forwardRef(
|
|
1233
1218
|
(e, t) => {
|
|
1234
|
-
const { __scopeSelect: n, nonce: o, ...r } = e, s = le(tt, n), c =
|
|
1219
|
+
const { __scopeSelect: n, nonce: o, ...r } = e, s = le(tt, n), c = vt(tt, n), d = V(t, s.onViewportChange), u = a.useRef(0);
|
|
1235
1220
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1236
1221
|
/* @__PURE__ */ i.jsx(
|
|
1237
1222
|
"style",
|
|
@@ -1243,7 +1228,7 @@ var [Ao, ht] = Ce(me, {}), tt = "SelectViewport", Nn = a.forwardRef(
|
|
|
1243
1228
|
}
|
|
1244
1229
|
),
|
|
1245
1230
|
/* @__PURE__ */ i.jsx(Fe.Slot, { scope: n, children: /* @__PURE__ */ i.jsx(
|
|
1246
|
-
|
|
1231
|
+
P.div,
|
|
1247
1232
|
{
|
|
1248
1233
|
"data-radix-select-viewport": "",
|
|
1249
1234
|
role: "presentation",
|
|
@@ -1267,7 +1252,7 @@ var [Ao, ht] = Ce(me, {}), tt = "SelectViewport", Nn = a.forwardRef(
|
|
|
1267
1252
|
if (x?.current && m) {
|
|
1268
1253
|
const g = Math.abs(u.current - f.scrollTop);
|
|
1269
1254
|
if (g > 0) {
|
|
1270
|
-
const w = window.innerHeight - ee * 2,
|
|
1255
|
+
const w = window.innerHeight - ee * 2, v = parseFloat(m.style.minHeight), h = parseFloat(m.style.height), S = Math.max(v, h);
|
|
1271
1256
|
if (S < w) {
|
|
1272
1257
|
const y = S + g, I = Math.min(w, y), A = y - I;
|
|
1273
1258
|
m.style.height = I + "px", m.style.bottom === "0px" && (f.scrollTop = A > 0 ? A : 0, m.style.justifyContent = "flex-end");
|
|
@@ -1282,21 +1267,21 @@ var [Ao, ht] = Ce(me, {}), tt = "SelectViewport", Nn = a.forwardRef(
|
|
|
1282
1267
|
}
|
|
1283
1268
|
);
|
|
1284
1269
|
Nn.displayName = tt;
|
|
1285
|
-
var
|
|
1270
|
+
var Pn = "SelectGroup", [Ao, Mo] = Ce(Pn), Oo = a.forwardRef(
|
|
1286
1271
|
(e, t) => {
|
|
1287
1272
|
const { __scopeSelect: n, ...o } = e, r = Z();
|
|
1288
|
-
return /* @__PURE__ */ i.jsx(
|
|
1273
|
+
return /* @__PURE__ */ i.jsx(Ao, { scope: n, id: r, children: /* @__PURE__ */ i.jsx(P.div, { role: "group", "aria-labelledby": r, ...o, ref: t }) });
|
|
1289
1274
|
}
|
|
1290
1275
|
);
|
|
1291
|
-
|
|
1292
|
-
var jn = "SelectLabel",
|
|
1276
|
+
Oo.displayName = Pn;
|
|
1277
|
+
var jn = "SelectLabel", Lo = a.forwardRef(
|
|
1293
1278
|
(e, t) => {
|
|
1294
|
-
const { __scopeSelect: n, ...o } = e, r =
|
|
1295
|
-
return /* @__PURE__ */ i.jsx(
|
|
1279
|
+
const { __scopeSelect: n, ...o } = e, r = Mo(jn, n);
|
|
1280
|
+
return /* @__PURE__ */ i.jsx(P.div, { id: r.id, ...o, ref: t });
|
|
1296
1281
|
}
|
|
1297
1282
|
);
|
|
1298
|
-
|
|
1299
|
-
var Te = "SelectItem", [
|
|
1283
|
+
Lo.displayName = jn;
|
|
1284
|
+
var Te = "SelectItem", [Fo, _n] = Ce(Te), kn = a.forwardRef(
|
|
1300
1285
|
(e, t) => {
|
|
1301
1286
|
const {
|
|
1302
1287
|
__scopeSelect: n,
|
|
@@ -1307,7 +1292,7 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1307
1292
|
} = e, d = ce(Te, n), u = le(Te, n), l = d.value === o, [f, m] = a.useState(s ?? ""), [x, g] = a.useState(!1), w = V(
|
|
1308
1293
|
t,
|
|
1309
1294
|
(y) => u.itemRefCallback?.(y, o, r)
|
|
1310
|
-
),
|
|
1295
|
+
), v = Z(), h = a.useRef("touch"), S = () => {
|
|
1311
1296
|
r || (d.onValueChange(o), d.onOpenChange(!1));
|
|
1312
1297
|
};
|
|
1313
1298
|
if (o === "")
|
|
@@ -1315,12 +1300,12 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1315
1300
|
"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."
|
|
1316
1301
|
);
|
|
1317
1302
|
return /* @__PURE__ */ i.jsx(
|
|
1318
|
-
|
|
1303
|
+
Fo,
|
|
1319
1304
|
{
|
|
1320
1305
|
scope: n,
|
|
1321
1306
|
value: o,
|
|
1322
1307
|
disabled: r,
|
|
1323
|
-
textId:
|
|
1308
|
+
textId: v,
|
|
1324
1309
|
isSelected: l,
|
|
1325
1310
|
onItemTextChange: a.useCallback((y) => {
|
|
1326
1311
|
m((I) => I || (y?.textContent ?? "").trim());
|
|
@@ -1333,10 +1318,10 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1333
1318
|
disabled: r,
|
|
1334
1319
|
textValue: f,
|
|
1335
1320
|
children: /* @__PURE__ */ i.jsx(
|
|
1336
|
-
|
|
1321
|
+
P.div,
|
|
1337
1322
|
{
|
|
1338
1323
|
role: "option",
|
|
1339
|
-
"aria-labelledby":
|
|
1324
|
+
"aria-labelledby": v,
|
|
1340
1325
|
"data-highlighted": x ? "" : void 0,
|
|
1341
1326
|
"aria-selected": l && x,
|
|
1342
1327
|
"data-state": l ? "checked" : "unchecked",
|
|
@@ -1348,22 +1333,22 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1348
1333
|
onFocus: L(c.onFocus, () => g(!0)),
|
|
1349
1334
|
onBlur: L(c.onBlur, () => g(!1)),
|
|
1350
1335
|
onClick: L(c.onClick, () => {
|
|
1351
|
-
|
|
1336
|
+
h.current !== "mouse" && S();
|
|
1352
1337
|
}),
|
|
1353
1338
|
onPointerUp: L(c.onPointerUp, () => {
|
|
1354
|
-
|
|
1339
|
+
h.current === "mouse" && S();
|
|
1355
1340
|
}),
|
|
1356
1341
|
onPointerDown: L(c.onPointerDown, (y) => {
|
|
1357
|
-
|
|
1342
|
+
h.current = y.pointerType;
|
|
1358
1343
|
}),
|
|
1359
1344
|
onPointerMove: L(c.onPointerMove, (y) => {
|
|
1360
|
-
|
|
1345
|
+
h.current = y.pointerType, r ? u.onItemLeave?.() : h.current === "mouse" && y.currentTarget.focus({ preventScroll: !0 });
|
|
1361
1346
|
}),
|
|
1362
1347
|
onPointerLeave: L(c.onPointerLeave, (y) => {
|
|
1363
1348
|
y.currentTarget === document.activeElement && u.onItemLeave?.();
|
|
1364
1349
|
}),
|
|
1365
1350
|
onKeyDown: L(c.onKeyDown, (y) => {
|
|
1366
|
-
u.searchRef?.current !== "" && y.key === " " || (
|
|
1351
|
+
u.searchRef?.current !== "" && y.key === " " || (Co.includes(y.key) && S(), y.key === " " && y.preventDefault());
|
|
1367
1352
|
})
|
|
1368
1353
|
}
|
|
1369
1354
|
)
|
|
@@ -1373,10 +1358,10 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1373
1358
|
);
|
|
1374
1359
|
}
|
|
1375
1360
|
);
|
|
1376
|
-
|
|
1361
|
+
kn.displayName = Te;
|
|
1377
1362
|
var Re = "SelectItemText", Tn = a.forwardRef(
|
|
1378
1363
|
(e, t) => {
|
|
1379
|
-
const { __scopeSelect: n, className: o, style: r, ...s } = e, c = ce(Re, n), d = le(Re, n), u =
|
|
1364
|
+
const { __scopeSelect: n, className: o, style: r, ...s } = e, c = ce(Re, n), d = le(Re, n), u = _n(Re, n), l = Ro(Re, n), [f, m] = a.useState(null), x = V(
|
|
1380
1365
|
t,
|
|
1381
1366
|
(S) => m(S),
|
|
1382
1367
|
u.onItemTextChange,
|
|
@@ -1384,9 +1369,9 @@ var Re = "SelectItemText", Tn = a.forwardRef(
|
|
|
1384
1369
|
), g = f?.textContent, w = a.useMemo(
|
|
1385
1370
|
() => /* @__PURE__ */ i.jsx("option", { value: u.value, disabled: u.disabled, children: g }, u.value),
|
|
1386
1371
|
[u.disabled, u.value, g]
|
|
1387
|
-
), { onNativeOptionAdd:
|
|
1388
|
-
return ne(() => (
|
|
1389
|
-
/* @__PURE__ */ i.jsx(
|
|
1372
|
+
), { onNativeOptionAdd: v, onNativeOptionRemove: h } = l;
|
|
1373
|
+
return ne(() => (v(w), () => h(w)), [v, h, w]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1374
|
+
/* @__PURE__ */ i.jsx(P.span, { id: u.textId, ...s, ref: x }),
|
|
1390
1375
|
u.isSelected && c.valueNode && !c.valueNodeHasChildren ? Vt.createPortal(s.children, c.valueNode) : null
|
|
1391
1376
|
] });
|
|
1392
1377
|
}
|
|
@@ -1395,12 +1380,12 @@ Tn.displayName = Re;
|
|
|
1395
1380
|
var Dn = "SelectItemIndicator", An = a.forwardRef(
|
|
1396
1381
|
(e, t) => {
|
|
1397
1382
|
const { __scopeSelect: n, ...o } = e;
|
|
1398
|
-
return
|
|
1383
|
+
return _n(Dn, n).isSelected ? /* @__PURE__ */ i.jsx(P.span, { "aria-hidden": !0, ...o, ref: t }) : null;
|
|
1399
1384
|
}
|
|
1400
1385
|
);
|
|
1401
1386
|
An.displayName = Dn;
|
|
1402
1387
|
var nt = "SelectScrollUpButton", Mn = a.forwardRef((e, t) => {
|
|
1403
|
-
const n = le(nt, e.__scopeSelect), o =
|
|
1388
|
+
const n = le(nt, e.__scopeSelect), o = vt(nt, e.__scopeSelect), [r, s] = a.useState(!1), c = V(t, o.onScrollButtonChange);
|
|
1404
1389
|
return ne(() => {
|
|
1405
1390
|
if (n.viewport && n.isPositioned) {
|
|
1406
1391
|
let d = function() {
|
|
@@ -1424,7 +1409,7 @@ var nt = "SelectScrollUpButton", Mn = a.forwardRef((e, t) => {
|
|
|
1424
1409
|
});
|
|
1425
1410
|
Mn.displayName = nt;
|
|
1426
1411
|
var rt = "SelectScrollDownButton", On = a.forwardRef((e, t) => {
|
|
1427
|
-
const n = le(rt, e.__scopeSelect), o =
|
|
1412
|
+
const n = le(rt, e.__scopeSelect), o = vt(rt, e.__scopeSelect), [r, s] = a.useState(!1), c = V(t, o.onScrollButtonChange);
|
|
1428
1413
|
return ne(() => {
|
|
1429
1414
|
if (n.viewport && n.isPositioned) {
|
|
1430
1415
|
let d = function() {
|
|
@@ -1454,7 +1439,7 @@ var Ln = a.forwardRef((e, t) => {
|
|
|
1454
1439
|
return a.useEffect(() => () => u(), [u]), ne(() => {
|
|
1455
1440
|
d().find((f) => f.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1456
1441
|
}, [d]), /* @__PURE__ */ i.jsx(
|
|
1457
|
-
|
|
1442
|
+
P.div,
|
|
1458
1443
|
{
|
|
1459
1444
|
"aria-hidden": !0,
|
|
1460
1445
|
...r,
|
|
@@ -1471,21 +1456,21 @@ var Ln = a.forwardRef((e, t) => {
|
|
|
1471
1456
|
})
|
|
1472
1457
|
}
|
|
1473
1458
|
);
|
|
1474
|
-
}),
|
|
1459
|
+
}), Bo = "SelectSeparator", $o = a.forwardRef(
|
|
1475
1460
|
(e, t) => {
|
|
1476
1461
|
const { __scopeSelect: n, ...o } = e;
|
|
1477
|
-
return /* @__PURE__ */ i.jsx(
|
|
1462
|
+
return /* @__PURE__ */ i.jsx(P.div, { "aria-hidden": !0, ...o, ref: t });
|
|
1478
1463
|
}
|
|
1479
1464
|
);
|
|
1480
|
-
|
|
1481
|
-
var ot = "SelectArrow",
|
|
1465
|
+
$o.displayName = Bo;
|
|
1466
|
+
var ot = "SelectArrow", Vo = a.forwardRef(
|
|
1482
1467
|
(e, t) => {
|
|
1483
1468
|
const { __scopeSelect: n, ...o } = e, r = $e(n), s = ce(ot, n), c = le(ot, n);
|
|
1484
|
-
return s.open && c.position === "popper" ? /* @__PURE__ */ i.jsx(
|
|
1469
|
+
return s.open && c.position === "popper" ? /* @__PURE__ */ i.jsx(Er, { ...r, ...o, ref: t }) : null;
|
|
1485
1470
|
}
|
|
1486
1471
|
);
|
|
1487
|
-
|
|
1488
|
-
var
|
|
1472
|
+
Vo.displayName = ot;
|
|
1473
|
+
var Uo = "SelectBubbleInput", Fn = a.forwardRef(
|
|
1489
1474
|
({ __scopeSelect: e, value: t, ...n }, o) => {
|
|
1490
1475
|
const r = a.useRef(null), s = V(o, r), c = ft(t);
|
|
1491
1476
|
return a.useEffect(() => {
|
|
@@ -1500,17 +1485,17 @@ var Go = "SelectBubbleInput", Fn = a.forwardRef(
|
|
|
1500
1485
|
f.call(d, t), d.dispatchEvent(m);
|
|
1501
1486
|
}
|
|
1502
1487
|
}, [c, t]), /* @__PURE__ */ i.jsx(
|
|
1503
|
-
|
|
1488
|
+
P.select,
|
|
1504
1489
|
{
|
|
1505
1490
|
...n,
|
|
1506
|
-
style: { ...
|
|
1491
|
+
style: { ...yr, ...n.style },
|
|
1507
1492
|
ref: s,
|
|
1508
1493
|
defaultValue: t
|
|
1509
1494
|
}
|
|
1510
1495
|
);
|
|
1511
1496
|
}
|
|
1512
1497
|
);
|
|
1513
|
-
Fn.displayName =
|
|
1498
|
+
Fn.displayName = Uo;
|
|
1514
1499
|
function Bn(e) {
|
|
1515
1500
|
return e === "" || e === void 0;
|
|
1516
1501
|
}
|
|
@@ -1530,22 +1515,22 @@ function $n(e) {
|
|
|
1530
1515
|
}
|
|
1531
1516
|
function Vn(e, t, n) {
|
|
1532
1517
|
const r = t.length > 1 && Array.from(t).every((l) => l === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1533
|
-
let c =
|
|
1518
|
+
let c = Go(e, Math.max(s, 0));
|
|
1534
1519
|
r.length === 1 && (c = c.filter((l) => l !== n));
|
|
1535
1520
|
const u = c.find(
|
|
1536
1521
|
(l) => l.textValue.toLowerCase().startsWith(r.toLowerCase())
|
|
1537
1522
|
);
|
|
1538
1523
|
return u !== n ? u : void 0;
|
|
1539
1524
|
}
|
|
1540
|
-
function
|
|
1525
|
+
function Go(e, t) {
|
|
1541
1526
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
1542
1527
|
}
|
|
1543
|
-
var
|
|
1544
|
-
const
|
|
1528
|
+
var Wo = hn, Ho = xn, Ko = yn, zo = wn, qo = Cn, Yo = Sn, Xo = Nn, Zo = kn, Jo = Tn, Qo = An, es = Mn, ts = On;
|
|
1529
|
+
const ka = ({ disabled: e = !1, handleDelete: t, ...n }) => /* @__PURE__ */ i.jsx(
|
|
1545
1530
|
ct,
|
|
1546
1531
|
{
|
|
1547
1532
|
disabled: e,
|
|
1548
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
1533
|
+
icon: /* @__PURE__ */ i.jsx(Gr, {}),
|
|
1549
1534
|
onClick: t,
|
|
1550
1535
|
variant: "outline",
|
|
1551
1536
|
...n,
|
|
@@ -1555,7 +1540,7 @@ const _a = ({ disabled: e = !1, handleDelete: t, ...n }) => /* @__PURE__ */ i.js
|
|
|
1555
1540
|
), wt = {
|
|
1556
1541
|
default: { label: "Submit", submittingLabel: "Submitting", IconComponent: ze },
|
|
1557
1542
|
submit: { label: "Submit", submittingLabel: "Submitting", IconComponent: ze },
|
|
1558
|
-
save: { label: "Save", submittingLabel: "Saving", IconComponent:
|
|
1543
|
+
save: { label: "Save", submittingLabel: "Saving", IconComponent: Fr },
|
|
1559
1544
|
send: { label: "Send", submittingLabel: "Sending", IconComponent: ze }
|
|
1560
1545
|
}, Ta = ({
|
|
1561
1546
|
submitting: e = !1,
|
|
@@ -1568,23 +1553,22 @@ const _a = ({ disabled: e = !1, handleDelete: t, ...n }) => /* @__PURE__ */ i.js
|
|
|
1568
1553
|
noIcon: d = !1,
|
|
1569
1554
|
...u
|
|
1570
1555
|
}) => {
|
|
1571
|
-
const l = n || Lr;
|
|
1572
1556
|
if (!wt[o])
|
|
1573
1557
|
throw new Error(`Invalid action: ${o}`);
|
|
1574
|
-
const
|
|
1558
|
+
const l = wt[o], f = r || l.label, m = s || l.submittingLabel, x = c || l.IconComponent, g = e ? /* @__PURE__ */ i.jsx(gr, { icon: n }) : /* @__PURE__ */ i.jsx(x, {});
|
|
1575
1559
|
return /* @__PURE__ */ i.jsx(
|
|
1576
1560
|
ct,
|
|
1577
1561
|
{
|
|
1578
1562
|
disabled: t || e,
|
|
1579
|
-
icon: d ? void 0 :
|
|
1563
|
+
icon: d ? void 0 : g,
|
|
1580
1564
|
type: "submit",
|
|
1581
1565
|
variant: "primary",
|
|
1582
1566
|
...u,
|
|
1583
|
-
children: e ?
|
|
1567
|
+
children: e ? m : f
|
|
1584
1568
|
}
|
|
1585
1569
|
);
|
|
1586
1570
|
};
|
|
1587
|
-
function
|
|
1571
|
+
function ns({ className: e, ...t }) {
|
|
1588
1572
|
return /* @__PURE__ */ i.jsx(
|
|
1589
1573
|
Wt,
|
|
1590
1574
|
{
|
|
@@ -1618,7 +1602,7 @@ const Da = ({ label: e, name: t, value: n, checked: o, onCheckedChange: r }) =>
|
|
|
1618
1602
|
};
|
|
1619
1603
|
return /* @__PURE__ */ i.jsxs(ae, { align: "center", gap: "2", children: [
|
|
1620
1604
|
/* @__PURE__ */ i.jsx(
|
|
1621
|
-
|
|
1605
|
+
ns,
|
|
1622
1606
|
{
|
|
1623
1607
|
checked: s,
|
|
1624
1608
|
id: d,
|
|
@@ -1661,7 +1645,7 @@ const Da = ({ label: e, name: t, value: n, checked: o, onCheckedChange: r }) =>
|
|
|
1661
1645
|
size: o,
|
|
1662
1646
|
variant: "outline",
|
|
1663
1647
|
children: [
|
|
1664
|
-
/* @__PURE__ */ i.jsx(
|
|
1648
|
+
/* @__PURE__ */ i.jsx(jr, { className: "mr-2 h-4 w-4" }),
|
|
1665
1649
|
s ? s.toISOString().split("T")[0] : /* @__PURE__ */ i.jsx("span", { children: "Select a date" })
|
|
1666
1650
|
]
|
|
1667
1651
|
}
|
|
@@ -1670,13 +1654,13 @@ const Da = ({ label: e, name: t, value: n, checked: o, onCheckedChange: r }) =>
|
|
|
1670
1654
|
] }),
|
|
1671
1655
|
r && /* @__PURE__ */ i.jsx(je, { message: r })
|
|
1672
1656
|
] });
|
|
1673
|
-
}, je = ({ message: e }) => /* @__PURE__ */ i.jsx(Ae, { size: "xs", variant: "destructive", children: e }),
|
|
1657
|
+
}, je = ({ message: e }) => /* @__PURE__ */ i.jsx(Ae, { size: "xs", variant: "destructive", children: e }), rs = ({ label: e, labelFor: t, className: n = "", labelClassName: o = "", children: r }) => /* @__PURE__ */ i.jsxs(ae, { direction: "col", gap: "2", children: [
|
|
1674
1658
|
e && /* @__PURE__ */ i.jsx(Se, { className: o, htmlFor: t, children: e }),
|
|
1675
1659
|
/* @__PURE__ */ i.jsx(ae, { className: `rounded-md border border-input bg-card p-2 shadow-xs ${n}`, gapY: "1", children: r })
|
|
1676
1660
|
] });
|
|
1677
|
-
function
|
|
1661
|
+
function os({ className: e, ...t }) {
|
|
1678
1662
|
return /* @__PURE__ */ i.jsx(
|
|
1679
|
-
|
|
1663
|
+
io,
|
|
1680
1664
|
{
|
|
1681
1665
|
className: $(
|
|
1682
1666
|
"flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
|
|
@@ -1688,7 +1672,7 @@ function ss({ className: e, ...t }) {
|
|
|
1688
1672
|
);
|
|
1689
1673
|
}
|
|
1690
1674
|
const Se = ({ htmlFor: e, value: t, children: n, className: o = "", ...r }) => /* @__PURE__ */ i.jsx(
|
|
1691
|
-
|
|
1675
|
+
os,
|
|
1692
1676
|
{
|
|
1693
1677
|
className: $("font-display font-normal text-base text-foreground", o),
|
|
1694
1678
|
htmlFor: e,
|
|
@@ -1761,12 +1745,12 @@ const Se = ({ htmlFor: e, value: t, children: n, className: o = "", ...r }) => /
|
|
|
1761
1745
|
...c
|
|
1762
1746
|
}
|
|
1763
1747
|
);
|
|
1764
|
-
function
|
|
1765
|
-
return /* @__PURE__ */ i.jsx(
|
|
1748
|
+
function ss({ className: e, ...t }) {
|
|
1749
|
+
return /* @__PURE__ */ i.jsx(xo, { className: $("grid gap-3", e), "data-slot": "radio-group", ...t });
|
|
1766
1750
|
}
|
|
1767
|
-
function
|
|
1751
|
+
function as({ className: e, ...t }) {
|
|
1768
1752
|
return /* @__PURE__ */ i.jsx(
|
|
1769
|
-
|
|
1753
|
+
bo,
|
|
1770
1754
|
{
|
|
1771
1755
|
className: $(
|
|
1772
1756
|
"aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
@@ -1775,37 +1759,37 @@ function is({ className: e, ...t }) {
|
|
|
1775
1759
|
"data-slot": "radio-group-item",
|
|
1776
1760
|
...t,
|
|
1777
1761
|
children: /* @__PURE__ */ i.jsx(
|
|
1778
|
-
|
|
1762
|
+
yo,
|
|
1779
1763
|
{
|
|
1780
1764
|
className: "relative flex items-center justify-center",
|
|
1781
1765
|
"data-slot": "radio-group-indicator",
|
|
1782
|
-
children: /* @__PURE__ */ i.jsx(
|
|
1766
|
+
children: /* @__PURE__ */ i.jsx(Or, { className: "-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 size-2 fill-primary" })
|
|
1783
1767
|
}
|
|
1784
1768
|
)
|
|
1785
1769
|
}
|
|
1786
1770
|
);
|
|
1787
1771
|
}
|
|
1788
|
-
const La = ({ label: e, name: t, options: n, value: o, onChange: r, error: s }) => /* @__PURE__ */ i.jsxs(
|
|
1789
|
-
/* @__PURE__ */ i.jsx(
|
|
1790
|
-
/* @__PURE__ */ i.jsx(
|
|
1772
|
+
const La = ({ label: e, name: t, options: n, value: o, onChange: r, error: s }) => /* @__PURE__ */ i.jsxs(rs, { className: "flex flex-col gap-4 px-2 py-1", label: e, labelFor: t, children: [
|
|
1773
|
+
/* @__PURE__ */ i.jsx(ss, { className: "w-full", name: t, onValueChange: r, value: o, children: /* @__PURE__ */ i.jsx(hr, { cols: "2", children: n.map((c, d) => /* @__PURE__ */ i.jsxs(ae, { align: "center", gap: "2", justify: "start", children: [
|
|
1774
|
+
/* @__PURE__ */ i.jsx(as, { id: c.value, value: c.value }),
|
|
1791
1775
|
/* @__PURE__ */ i.jsx(Se, { htmlFor: c.value, children: c.label })
|
|
1792
1776
|
] }, d)) }) }),
|
|
1793
1777
|
s && /* @__PURE__ */ i.jsx(je, { message: s })
|
|
1794
1778
|
] });
|
|
1795
|
-
function
|
|
1796
|
-
return /* @__PURE__ */ i.jsx(
|
|
1779
|
+
function is({ ...e }) {
|
|
1780
|
+
return /* @__PURE__ */ i.jsx(Wo, { "data-slot": "select", ...e });
|
|
1797
1781
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return /* @__PURE__ */ i.jsx(
|
|
1782
|
+
function cs({ ...e }) {
|
|
1783
|
+
return /* @__PURE__ */ i.jsx(Ko, { "data-slot": "select-value", ...e });
|
|
1800
1784
|
}
|
|
1801
|
-
function
|
|
1785
|
+
function ls({
|
|
1802
1786
|
className: e,
|
|
1803
1787
|
size: t = "default",
|
|
1804
1788
|
children: n,
|
|
1805
1789
|
...o
|
|
1806
1790
|
}) {
|
|
1807
1791
|
return /* @__PURE__ */ i.jsxs(
|
|
1808
|
-
|
|
1792
|
+
Ho,
|
|
1809
1793
|
{
|
|
1810
1794
|
className: $(
|
|
1811
1795
|
"flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
@@ -1816,19 +1800,19 @@ function ds({
|
|
|
1816
1800
|
...o,
|
|
1817
1801
|
children: [
|
|
1818
1802
|
n,
|
|
1819
|
-
/* @__PURE__ */ i.jsx(
|
|
1803
|
+
/* @__PURE__ */ i.jsx(zo, { asChild: !0, children: /* @__PURE__ */ i.jsx($t, { className: "size-4 opacity-50" }) })
|
|
1820
1804
|
]
|
|
1821
1805
|
}
|
|
1822
1806
|
);
|
|
1823
1807
|
}
|
|
1824
|
-
function
|
|
1808
|
+
function ds({
|
|
1825
1809
|
className: e,
|
|
1826
1810
|
children: t,
|
|
1827
1811
|
position: n = "popper",
|
|
1828
1812
|
...o
|
|
1829
1813
|
}) {
|
|
1830
|
-
return /* @__PURE__ */ i.jsx(
|
|
1831
|
-
|
|
1814
|
+
return /* @__PURE__ */ i.jsx(qo, { children: /* @__PURE__ */ i.jsxs(
|
|
1815
|
+
Yo,
|
|
1832
1816
|
{
|
|
1833
1817
|
className: $(
|
|
1834
1818
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
@@ -1839,9 +1823,9 @@ function us({
|
|
|
1839
1823
|
position: n,
|
|
1840
1824
|
...o,
|
|
1841
1825
|
children: [
|
|
1842
|
-
/* @__PURE__ */ i.jsx(
|
|
1826
|
+
/* @__PURE__ */ i.jsx(fs, {}),
|
|
1843
1827
|
/* @__PURE__ */ i.jsx(
|
|
1844
|
-
|
|
1828
|
+
Xo,
|
|
1845
1829
|
{
|
|
1846
1830
|
className: $(
|
|
1847
1831
|
"p-1",
|
|
@@ -1850,14 +1834,14 @@ function us({
|
|
|
1850
1834
|
children: t
|
|
1851
1835
|
}
|
|
1852
1836
|
),
|
|
1853
|
-
/* @__PURE__ */ i.jsx(
|
|
1837
|
+
/* @__PURE__ */ i.jsx(ps, {})
|
|
1854
1838
|
]
|
|
1855
1839
|
}
|
|
1856
1840
|
) });
|
|
1857
1841
|
}
|
|
1858
|
-
function
|
|
1842
|
+
function us({ className: e, children: t, ...n }) {
|
|
1859
1843
|
return /* @__PURE__ */ i.jsxs(
|
|
1860
|
-
|
|
1844
|
+
Zo,
|
|
1861
1845
|
{
|
|
1862
1846
|
className: $(
|
|
1863
1847
|
"relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
@@ -1866,29 +1850,29 @@ function fs({ className: e, children: t, ...n }) {
|
|
|
1866
1850
|
"data-slot": "select-item",
|
|
1867
1851
|
...n,
|
|
1868
1852
|
children: [
|
|
1869
|
-
/* @__PURE__ */ i.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ i.jsx(
|
|
1870
|
-
/* @__PURE__ */ i.jsx(
|
|
1853
|
+
/* @__PURE__ */ i.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ i.jsx(Qo, { children: /* @__PURE__ */ i.jsx(ut, { className: "size-4" }) }) }),
|
|
1854
|
+
/* @__PURE__ */ i.jsx(Jo, { children: t })
|
|
1871
1855
|
]
|
|
1872
1856
|
}
|
|
1873
1857
|
);
|
|
1874
1858
|
}
|
|
1875
|
-
function
|
|
1859
|
+
function fs({ className: e, ...t }) {
|
|
1876
1860
|
return /* @__PURE__ */ i.jsx(
|
|
1877
|
-
|
|
1861
|
+
es,
|
|
1878
1862
|
{
|
|
1879
1863
|
className: $("flex cursor-default items-center justify-center py-1", e),
|
|
1880
1864
|
"data-slot": "select-scroll-up-button",
|
|
1881
1865
|
...t,
|
|
1882
|
-
children: /* @__PURE__ */ i.jsx(
|
|
1866
|
+
children: /* @__PURE__ */ i.jsx(Tr, { className: "size-4" })
|
|
1883
1867
|
}
|
|
1884
1868
|
);
|
|
1885
1869
|
}
|
|
1886
|
-
function
|
|
1870
|
+
function ps({
|
|
1887
1871
|
className: e,
|
|
1888
1872
|
...t
|
|
1889
1873
|
}) {
|
|
1890
1874
|
return /* @__PURE__ */ i.jsx(
|
|
1891
|
-
|
|
1875
|
+
ts,
|
|
1892
1876
|
{
|
|
1893
1877
|
className: $("flex cursor-default items-center justify-center py-1", e),
|
|
1894
1878
|
"data-slot": "select-scroll-down-button",
|
|
@@ -1923,7 +1907,7 @@ const Fa = ({
|
|
|
1923
1907
|
return /* @__PURE__ */ i.jsxs(ae, { className: "w-full", direction: "col", gap: "2", children: [
|
|
1924
1908
|
o && /* @__PURE__ */ i.jsx(Se, { htmlFor: e, children: o }),
|
|
1925
1909
|
/* @__PURE__ */ i.jsxs(
|
|
1926
|
-
|
|
1910
|
+
is,
|
|
1927
1911
|
{
|
|
1928
1912
|
defaultValue: t,
|
|
1929
1913
|
name: e,
|
|
@@ -1931,8 +1915,8 @@ const Fa = ({
|
|
|
1931
1915
|
value: d,
|
|
1932
1916
|
...m,
|
|
1933
1917
|
children: [
|
|
1934
|
-
/* @__PURE__ */ i.jsx(
|
|
1935
|
-
/* @__PURE__ */ i.jsx(
|
|
1918
|
+
/* @__PURE__ */ i.jsx(ls, { className: x, "data-testid": `select-input-${e}`, size: g, children: /* @__PURE__ */ i.jsx(cs, { placeholder: r }) }),
|
|
1919
|
+
/* @__PURE__ */ i.jsx(ds, { children: n.map(({ value: w, label: v }) => /* @__PURE__ */ i.jsx(us, { value: w, children: v }, `option-${w}`)) })
|
|
1936
1920
|
]
|
|
1937
1921
|
}
|
|
1938
1922
|
),
|
|
@@ -1940,18 +1924,18 @@ const Fa = ({
|
|
|
1940
1924
|
l && /* @__PURE__ */ i.jsx(je, { message: l })
|
|
1941
1925
|
] });
|
|
1942
1926
|
};
|
|
1943
|
-
var Ct = 1,
|
|
1927
|
+
var Ct = 1, ms = 0.9, vs = 0.8, hs = 0.17, Ye = 0.1, Xe = 0.999, gs = 0.9999, xs = 0.99, bs = /[\\\/_+.#"@\[\(\{&]/, ys = /[\\\/_+.#"@\[\(\{&]/g, ws = /[\s-]/, Gn = /[\s-]/g;
|
|
1944
1928
|
function st(e, t, n, o, r, s, c) {
|
|
1945
|
-
if (s === t.length) return r === e.length ? Ct :
|
|
1929
|
+
if (s === t.length) return r === e.length ? Ct : xs;
|
|
1946
1930
|
var d = `${r},${s}`;
|
|
1947
1931
|
if (c[d] !== void 0) return c[d];
|
|
1948
|
-
for (var u = o.charAt(s), l = n.indexOf(u, r), f = 0, m, x, g, w; l >= 0; ) m = st(e, t, n, o, l + 1, s + 1, c), m > f && (l === r ? m *= Ct :
|
|
1932
|
+
for (var u = o.charAt(s), l = n.indexOf(u, r), f = 0, m, x, g, w; l >= 0; ) m = st(e, t, n, o, l + 1, s + 1, c), m > f && (l === r ? m *= Ct : bs.test(e.charAt(l - 1)) ? (m *= vs, g = e.slice(r, l - 1).match(ys), g && r > 0 && (m *= Math.pow(Xe, g.length))) : ws.test(e.charAt(l - 1)) ? (m *= ms, w = e.slice(r, l - 1).match(Gn), w && r > 0 && (m *= Math.pow(Xe, w.length))) : (m *= hs, r > 0 && (m *= Math.pow(Xe, l - r))), e.charAt(l) !== t.charAt(s) && (m *= gs)), (m < Ye && n.charAt(l - 1) === o.charAt(s + 1) || o.charAt(s + 1) === o.charAt(s) && n.charAt(l - 1) !== o.charAt(s)) && (x = st(e, t, n, o, l + 1, s + 2, c), x * Ye > m && (m = x * Ye)), m > f && (f = m), l = n.indexOf(u, l + 1);
|
|
1949
1933
|
return c[d] = f, f;
|
|
1950
1934
|
}
|
|
1951
1935
|
function St(e) {
|
|
1952
1936
|
return e.toLowerCase().replace(Gn, " ");
|
|
1953
1937
|
}
|
|
1954
|
-
function
|
|
1938
|
+
function Cs(e, t, n) {
|
|
1955
1939
|
return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, st(e, t, St(e), St(t), 0, 0, {});
|
|
1956
1940
|
}
|
|
1957
1941
|
function se(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
@@ -1960,7 +1944,7 @@ function se(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
1960
1944
|
return t?.(r);
|
|
1961
1945
|
};
|
|
1962
1946
|
}
|
|
1963
|
-
var
|
|
1947
|
+
var Ss = "DismissableLayer", at = "dismissableLayer.update", Es = "dismissableLayer.pointerDownOutside", Is = "dismissableLayer.focusOutside", Et, Wn = a.createContext({
|
|
1964
1948
|
layers: /* @__PURE__ */ new Set(),
|
|
1965
1949
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1966
1950
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -1974,14 +1958,14 @@ var Es = "DismissableLayer", at = "dismissableLayer.update", Is = "dismissableLa
|
|
|
1974
1958
|
onInteractOutside: c,
|
|
1975
1959
|
onDismiss: d,
|
|
1976
1960
|
...u
|
|
1977
|
-
} = e, l = a.useContext(Wn), [f, m] = a.useState(null), x = f?.ownerDocument ?? globalThis?.document, [, g] = a.useState({}), w = V(t, (E) => m(E)),
|
|
1978
|
-
const
|
|
1961
|
+
} = e, l = a.useContext(Wn), [f, m] = a.useState(null), x = f?.ownerDocument ?? globalThis?.document, [, g] = a.useState({}), w = V(t, (E) => m(E)), v = Array.from(l.layers), [h] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), S = v.indexOf(h), y = f ? v.indexOf(f) : -1, I = l.layersWithOutsidePointerEventsDisabled.size > 0, A = y >= S, M = Ps((E) => {
|
|
1962
|
+
const _ = E.target, z = [...l.branches].some((U) => U.contains(_));
|
|
1979
1963
|
!A || z || (r?.(E), c?.(E), E.defaultPrevented || d?.());
|
|
1980
|
-
}, x), j =
|
|
1981
|
-
const
|
|
1982
|
-
[...l.branches].some((U) => U.contains(
|
|
1964
|
+
}, x), j = js((E) => {
|
|
1965
|
+
const _ = E.target;
|
|
1966
|
+
[...l.branches].some((U) => U.contains(_)) || (s?.(E), c?.(E), E.defaultPrevented || d?.());
|
|
1983
1967
|
}, x);
|
|
1984
|
-
return
|
|
1968
|
+
return Ir((E) => {
|
|
1985
1969
|
y === l.layers.size - 1 && (o?.(E), !E.defaultPrevented && d && (E.preventDefault(), d()));
|
|
1986
1970
|
}, x), a.useEffect(() => {
|
|
1987
1971
|
if (f)
|
|
@@ -1994,7 +1978,7 @@ var Es = "DismissableLayer", at = "dismissableLayer.update", Is = "dismissableLa
|
|
|
1994
1978
|
const E = () => g({});
|
|
1995
1979
|
return document.addEventListener(at, E), () => document.removeEventListener(at, E);
|
|
1996
1980
|
}, []), /* @__PURE__ */ i.jsx(
|
|
1997
|
-
|
|
1981
|
+
P.div,
|
|
1998
1982
|
{
|
|
1999
1983
|
...u,
|
|
2000
1984
|
ref: w,
|
|
@@ -2012,8 +1996,8 @@ var Es = "DismissableLayer", at = "dismissableLayer.update", Is = "dismissableLa
|
|
|
2012
1996
|
);
|
|
2013
1997
|
}
|
|
2014
1998
|
);
|
|
2015
|
-
Hn.displayName =
|
|
2016
|
-
var
|
|
1999
|
+
Hn.displayName = Ss;
|
|
2000
|
+
var Rs = "DismissableLayerBranch", Ns = a.forwardRef((e, t) => {
|
|
2017
2001
|
const n = a.useContext(Wn), o = a.useRef(null), r = V(t, o);
|
|
2018
2002
|
return a.useEffect(() => {
|
|
2019
2003
|
const s = o.current;
|
|
@@ -2021,10 +2005,10 @@ var Ns = "DismissableLayerBranch", ks = a.forwardRef((e, t) => {
|
|
|
2021
2005
|
return n.branches.add(s), () => {
|
|
2022
2006
|
n.branches.delete(s);
|
|
2023
2007
|
};
|
|
2024
|
-
}, [n.branches]), /* @__PURE__ */ i.jsx(
|
|
2008
|
+
}, [n.branches]), /* @__PURE__ */ i.jsx(P.div, { ...e, ref: r });
|
|
2025
2009
|
});
|
|
2026
|
-
|
|
2027
|
-
function
|
|
2010
|
+
Ns.displayName = Rs;
|
|
2011
|
+
function Ps(e, t = globalThis?.document) {
|
|
2028
2012
|
const n = Me(e), o = a.useRef(!1), r = a.useRef(() => {
|
|
2029
2013
|
});
|
|
2030
2014
|
return a.useEffect(() => {
|
|
@@ -2032,7 +2016,7 @@ function js(e, t = globalThis?.document) {
|
|
|
2032
2016
|
if (d.target && !o.current) {
|
|
2033
2017
|
let u = function() {
|
|
2034
2018
|
Kn(
|
|
2035
|
-
|
|
2019
|
+
Es,
|
|
2036
2020
|
n,
|
|
2037
2021
|
l,
|
|
2038
2022
|
{ discrete: !0 }
|
|
@@ -2054,11 +2038,11 @@ function js(e, t = globalThis?.document) {
|
|
|
2054
2038
|
onPointerDownCapture: () => o.current = !0
|
|
2055
2039
|
};
|
|
2056
2040
|
}
|
|
2057
|
-
function
|
|
2041
|
+
function js(e, t = globalThis?.document) {
|
|
2058
2042
|
const n = Me(e), o = a.useRef(!1);
|
|
2059
2043
|
return a.useEffect(() => {
|
|
2060
2044
|
const r = (s) => {
|
|
2061
|
-
s.target && !o.current && Kn(
|
|
2045
|
+
s.target && !o.current && Kn(Is, n, { originalEvent: s }, {
|
|
2062
2046
|
discrete: !1
|
|
2063
2047
|
});
|
|
2064
2048
|
};
|
|
@@ -2074,17 +2058,17 @@ function It() {
|
|
|
2074
2058
|
}
|
|
2075
2059
|
function Kn(e, t, n, { discrete: o }) {
|
|
2076
2060
|
const r = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
2077
|
-
t && r.addEventListener(e, t, { once: !0 }), o ?
|
|
2061
|
+
t && r.addEventListener(e, t, { once: !0 }), o ? Rr(r, s) : r.dispatchEvent(s);
|
|
2078
2062
|
}
|
|
2079
2063
|
function _s(e, t) {
|
|
2080
2064
|
return a.useReducer((n, o) => t[n][o] ?? n, e);
|
|
2081
2065
|
}
|
|
2082
2066
|
var Ve = (e) => {
|
|
2083
|
-
const { present: t, children: n } = e, o =
|
|
2067
|
+
const { present: t, children: n } = e, o = ks(t), r = typeof n == "function" ? n({ present: o.isPresent }) : a.Children.only(n), s = V(o.ref, Ts(r));
|
|
2084
2068
|
return typeof n == "function" || o.isPresent ? a.cloneElement(r, { ref: s }) : null;
|
|
2085
2069
|
};
|
|
2086
2070
|
Ve.displayName = "Presence";
|
|
2087
|
-
function
|
|
2071
|
+
function ks(e) {
|
|
2088
2072
|
const [t, n] = a.useState(), o = a.useRef(null), r = a.useRef(e), s = a.useRef("none"), c = e ? "mounted" : "unmounted", [d, u] = _s(c, {
|
|
2089
2073
|
mounted: {
|
|
2090
2074
|
UNMOUNT: "unmounted",
|
|
@@ -2099,27 +2083,27 @@ function Ts(e) {
|
|
|
2099
2083
|
}
|
|
2100
2084
|
});
|
|
2101
2085
|
return a.useEffect(() => {
|
|
2102
|
-
const l =
|
|
2086
|
+
const l = ke(o.current);
|
|
2103
2087
|
s.current = d === "mounted" ? l : "none";
|
|
2104
2088
|
}, [d]), ne(() => {
|
|
2105
2089
|
const l = o.current, f = r.current;
|
|
2106
2090
|
if (f !== e) {
|
|
2107
|
-
const x = s.current, g =
|
|
2091
|
+
const x = s.current, g = ke(l);
|
|
2108
2092
|
e ? u("MOUNT") : g === "none" || l?.display === "none" ? u("UNMOUNT") : u(f && x !== g ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
2109
2093
|
}
|
|
2110
2094
|
}, [e, u]), ne(() => {
|
|
2111
2095
|
if (t) {
|
|
2112
2096
|
let l;
|
|
2113
2097
|
const f = t.ownerDocument.defaultView ?? window, m = (g) => {
|
|
2114
|
-
const
|
|
2115
|
-
if (g.target === t &&
|
|
2116
|
-
const
|
|
2098
|
+
const v = ke(o.current).includes(g.animationName);
|
|
2099
|
+
if (g.target === t && v && (u("ANIMATION_END"), !r.current)) {
|
|
2100
|
+
const h = t.style.animationFillMode;
|
|
2117
2101
|
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
2118
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
2102
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = h);
|
|
2119
2103
|
});
|
|
2120
2104
|
}
|
|
2121
2105
|
}, x = (g) => {
|
|
2122
|
-
g.target === t && (s.current =
|
|
2106
|
+
g.target === t && (s.current = ke(o.current));
|
|
2123
2107
|
};
|
|
2124
2108
|
return t.addEventListener("animationstart", x), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
|
|
2125
2109
|
f.clearTimeout(l), t.removeEventListener("animationstart", x), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
|
|
@@ -2133,15 +2117,15 @@ function Ts(e) {
|
|
|
2133
2117
|
}, [])
|
|
2134
2118
|
};
|
|
2135
2119
|
}
|
|
2136
|
-
function
|
|
2120
|
+
function ke(e) {
|
|
2137
2121
|
return e?.animationName || "none";
|
|
2138
2122
|
}
|
|
2139
|
-
function
|
|
2123
|
+
function Ts(e) {
|
|
2140
2124
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
2141
2125
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2142
2126
|
}
|
|
2143
2127
|
var Ze = 0;
|
|
2144
|
-
function
|
|
2128
|
+
function Ds() {
|
|
2145
2129
|
a.useEffect(() => {
|
|
2146
2130
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
2147
2131
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Rt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Rt()), Ze++, () => {
|
|
@@ -2153,7 +2137,7 @@ function Rt() {
|
|
|
2153
2137
|
const e = document.createElement("span");
|
|
2154
2138
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
2155
2139
|
}
|
|
2156
|
-
var Ue = "Dialog", [zn, Ba] = we(Ue), [
|
|
2140
|
+
var Ue = "Dialog", [zn, Ba] = we(Ue), [As, te] = zn(Ue), qn = (e) => {
|
|
2157
2141
|
const {
|
|
2158
2142
|
__scopeDialog: t,
|
|
2159
2143
|
children: n,
|
|
@@ -2168,7 +2152,7 @@ var Ue = "Dialog", [zn, Ba] = we(Ue), [Ms, te] = zn(Ue), qn = (e) => {
|
|
|
2168
2152
|
caller: Ue
|
|
2169
2153
|
});
|
|
2170
2154
|
return /* @__PURE__ */ i.jsx(
|
|
2171
|
-
|
|
2155
|
+
As,
|
|
2172
2156
|
{
|
|
2173
2157
|
scope: t,
|
|
2174
2158
|
triggerRef: d,
|
|
@@ -2185,11 +2169,11 @@ var Ue = "Dialog", [zn, Ba] = we(Ue), [Ms, te] = zn(Ue), qn = (e) => {
|
|
|
2185
2169
|
);
|
|
2186
2170
|
};
|
|
2187
2171
|
qn.displayName = Ue;
|
|
2188
|
-
var Yn = "DialogTrigger",
|
|
2172
|
+
var Yn = "DialogTrigger", Ms = a.forwardRef(
|
|
2189
2173
|
(e, t) => {
|
|
2190
2174
|
const { __scopeDialog: n, ...o } = e, r = te(Yn, n), s = V(t, r.triggerRef);
|
|
2191
2175
|
return /* @__PURE__ */ i.jsx(
|
|
2192
|
-
|
|
2176
|
+
P.button,
|
|
2193
2177
|
{
|
|
2194
2178
|
type: "button",
|
|
2195
2179
|
"aria-haspopup": "dialog",
|
|
@@ -2203,29 +2187,29 @@ var Yn = "DialogTrigger", Os = a.forwardRef(
|
|
|
2203
2187
|
);
|
|
2204
2188
|
}
|
|
2205
2189
|
);
|
|
2206
|
-
|
|
2207
|
-
var
|
|
2190
|
+
Ms.displayName = Yn;
|
|
2191
|
+
var ht = "DialogPortal", [Os, Xn] = zn(ht, {
|
|
2208
2192
|
forceMount: void 0
|
|
2209
2193
|
}), Zn = (e) => {
|
|
2210
|
-
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, s = te(
|
|
2211
|
-
return /* @__PURE__ */ i.jsx(
|
|
2194
|
+
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, s = te(ht, t);
|
|
2195
|
+
return /* @__PURE__ */ i.jsx(Os, { scope: t, forceMount: n, children: a.Children.map(o, (c) => /* @__PURE__ */ i.jsx(Ve, { present: n || s.open, children: /* @__PURE__ */ i.jsx(Dt, { asChild: !0, container: r, children: c }) })) });
|
|
2212
2196
|
};
|
|
2213
|
-
Zn.displayName =
|
|
2197
|
+
Zn.displayName = ht;
|
|
2214
2198
|
var De = "DialogOverlay", Jn = a.forwardRef(
|
|
2215
2199
|
(e, t) => {
|
|
2216
2200
|
const n = Xn(De, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, s = te(De, e.__scopeDialog);
|
|
2217
|
-
return s.modal ? /* @__PURE__ */ i.jsx(Ve, { present: o || s.open, children: /* @__PURE__ */ i.jsx(
|
|
2201
|
+
return s.modal ? /* @__PURE__ */ i.jsx(Ve, { present: o || s.open, children: /* @__PURE__ */ i.jsx(Fs, { ...r, ref: t }) }) : null;
|
|
2218
2202
|
}
|
|
2219
2203
|
);
|
|
2220
2204
|
Jn.displayName = De;
|
|
2221
|
-
var
|
|
2205
|
+
var Ls = Pt("DialogOverlay.RemoveScroll"), Fs = a.forwardRef(
|
|
2222
2206
|
(e, t) => {
|
|
2223
2207
|
const { __scopeDialog: n, ...o } = e, r = te(De, n);
|
|
2224
2208
|
return (
|
|
2225
2209
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2226
2210
|
// ie. when `Overlay` and `Content` are siblings
|
|
2227
|
-
/* @__PURE__ */ i.jsx(Mt, { as:
|
|
2228
|
-
|
|
2211
|
+
/* @__PURE__ */ i.jsx(Mt, { as: Ls, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i.jsx(
|
|
2212
|
+
P.div,
|
|
2229
2213
|
{
|
|
2230
2214
|
"data-state": xt(r.open),
|
|
2231
2215
|
...o,
|
|
@@ -2235,16 +2219,16 @@ var Fs = kt("DialogOverlay.RemoveScroll"), Bs = a.forwardRef(
|
|
|
2235
2219
|
) })
|
|
2236
2220
|
);
|
|
2237
2221
|
}
|
|
2238
|
-
),
|
|
2222
|
+
), ve = "DialogContent", Qn = a.forwardRef(
|
|
2239
2223
|
(e, t) => {
|
|
2240
|
-
const n = Xn(
|
|
2241
|
-
return /* @__PURE__ */ i.jsx(Ve, { present: o || s.open, children: s.modal ? /* @__PURE__ */ i.jsx(
|
|
2224
|
+
const n = Xn(ve, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, s = te(ve, e.__scopeDialog);
|
|
2225
|
+
return /* @__PURE__ */ i.jsx(Ve, { present: o || s.open, children: s.modal ? /* @__PURE__ */ i.jsx(Bs, { ...r, ref: t }) : /* @__PURE__ */ i.jsx($s, { ...r, ref: t }) });
|
|
2242
2226
|
}
|
|
2243
2227
|
);
|
|
2244
|
-
Qn.displayName =
|
|
2245
|
-
var
|
|
2228
|
+
Qn.displayName = ve;
|
|
2229
|
+
var Bs = a.forwardRef(
|
|
2246
2230
|
(e, t) => {
|
|
2247
|
-
const n = te(
|
|
2231
|
+
const n = te(ve, e.__scopeDialog), o = a.useRef(null), r = V(t, n.contentRef, o);
|
|
2248
2232
|
return a.useEffect(() => {
|
|
2249
2233
|
const s = o.current;
|
|
2250
2234
|
if (s) return At(s);
|
|
@@ -2269,9 +2253,9 @@ var $s = a.forwardRef(
|
|
|
2269
2253
|
}
|
|
2270
2254
|
);
|
|
2271
2255
|
}
|
|
2272
|
-
),
|
|
2256
|
+
), $s = a.forwardRef(
|
|
2273
2257
|
(e, t) => {
|
|
2274
|
-
const n = te(
|
|
2258
|
+
const n = te(ve, e.__scopeDialog), o = a.useRef(!1), r = a.useRef(!1);
|
|
2275
2259
|
return /* @__PURE__ */ i.jsx(
|
|
2276
2260
|
er,
|
|
2277
2261
|
{
|
|
@@ -2292,8 +2276,8 @@ var $s = a.forwardRef(
|
|
|
2292
2276
|
}
|
|
2293
2277
|
), er = a.forwardRef(
|
|
2294
2278
|
(e, t) => {
|
|
2295
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: s, ...c } = e, d = te(
|
|
2296
|
-
return
|
|
2279
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: s, ...c } = e, d = te(ve, n), u = a.useRef(null), l = V(t, u);
|
|
2280
|
+
return Ds(), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2297
2281
|
/* @__PURE__ */ i.jsx(
|
|
2298
2282
|
Ot,
|
|
2299
2283
|
{
|
|
@@ -2318,30 +2302,30 @@ var $s = a.forwardRef(
|
|
|
2318
2302
|
}
|
|
2319
2303
|
),
|
|
2320
2304
|
/* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2321
|
-
/* @__PURE__ */ i.jsx(
|
|
2322
|
-
/* @__PURE__ */ i.jsx(
|
|
2305
|
+
/* @__PURE__ */ i.jsx(Ws, { titleId: d.titleId }),
|
|
2306
|
+
/* @__PURE__ */ i.jsx(Ks, { contentRef: u, descriptionId: d.descriptionId })
|
|
2323
2307
|
] })
|
|
2324
2308
|
] });
|
|
2325
2309
|
}
|
|
2326
|
-
), gt = "DialogTitle",
|
|
2310
|
+
), gt = "DialogTitle", Vs = a.forwardRef(
|
|
2327
2311
|
(e, t) => {
|
|
2328
2312
|
const { __scopeDialog: n, ...o } = e, r = te(gt, n);
|
|
2329
|
-
return /* @__PURE__ */ i.jsx(
|
|
2313
|
+
return /* @__PURE__ */ i.jsx(P.h2, { id: r.titleId, ...o, ref: t });
|
|
2330
2314
|
}
|
|
2331
2315
|
);
|
|
2332
|
-
|
|
2333
|
-
var tr = "DialogDescription",
|
|
2316
|
+
Vs.displayName = gt;
|
|
2317
|
+
var tr = "DialogDescription", Us = a.forwardRef(
|
|
2334
2318
|
(e, t) => {
|
|
2335
2319
|
const { __scopeDialog: n, ...o } = e, r = te(tr, n);
|
|
2336
|
-
return /* @__PURE__ */ i.jsx(
|
|
2320
|
+
return /* @__PURE__ */ i.jsx(P.p, { id: r.descriptionId, ...o, ref: t });
|
|
2337
2321
|
}
|
|
2338
2322
|
);
|
|
2339
|
-
|
|
2340
|
-
var nr = "DialogClose",
|
|
2323
|
+
Us.displayName = tr;
|
|
2324
|
+
var nr = "DialogClose", Gs = a.forwardRef(
|
|
2341
2325
|
(e, t) => {
|
|
2342
2326
|
const { __scopeDialog: n, ...o } = e, r = te(nr, n);
|
|
2343
2327
|
return /* @__PURE__ */ i.jsx(
|
|
2344
|
-
|
|
2328
|
+
P.button,
|
|
2345
2329
|
{
|
|
2346
2330
|
type: "button",
|
|
2347
2331
|
...o,
|
|
@@ -2351,15 +2335,15 @@ var nr = "DialogClose", Ws = a.forwardRef(
|
|
|
2351
2335
|
);
|
|
2352
2336
|
}
|
|
2353
2337
|
);
|
|
2354
|
-
|
|
2338
|
+
Gs.displayName = nr;
|
|
2355
2339
|
function xt(e) {
|
|
2356
2340
|
return e ? "open" : "closed";
|
|
2357
2341
|
}
|
|
2358
|
-
var rr = "DialogTitleWarning", [$a, or] =
|
|
2359
|
-
contentName:
|
|
2342
|
+
var rr = "DialogTitleWarning", [$a, or] = Nr(rr, {
|
|
2343
|
+
contentName: ve,
|
|
2360
2344
|
titleName: gt,
|
|
2361
2345
|
docsSlug: "dialog"
|
|
2362
|
-
}),
|
|
2346
|
+
}), Ws = ({ titleId: e }) => {
|
|
2363
2347
|
const t = or(rr), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2364
2348
|
|
|
2365
2349
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2368,27 +2352,27 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2368
2352
|
return a.useEffect(() => {
|
|
2369
2353
|
e && (document.getElementById(e) || console.error(n));
|
|
2370
2354
|
}, [n, e]), null;
|
|
2371
|
-
},
|
|
2372
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${or(
|
|
2355
|
+
}, Hs = "DialogDescriptionWarning", Ks = ({ contentRef: e, descriptionId: t }) => {
|
|
2356
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${or(Hs).contentName}}.`;
|
|
2373
2357
|
return a.useEffect(() => {
|
|
2374
2358
|
const r = e.current?.getAttribute("aria-describedby");
|
|
2375
2359
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2376
2360
|
}, [o, e, t]), null;
|
|
2377
|
-
},
|
|
2361
|
+
}, zs = qn, qs = Zn, Ys = Jn, Xs = Qn, Ie = '[cmdk-group=""]', Je = '[cmdk-group-items=""]', Zs = '[cmdk-group-heading=""]', sr = '[cmdk-item=""]', Nt = `${sr}:not([aria-disabled="true"])`, it = "cmdk-item-select", xe = "data-value", Js = (e, t, n) => Cs(e, t, n), ar = a.createContext(void 0), _e = () => a.useContext(ar), ir = a.createContext(void 0), bt = () => a.useContext(ir), cr = a.createContext(void 0), lr = a.forwardRef((e, t) => {
|
|
2378
2362
|
let n = be(() => {
|
|
2379
2363
|
var p, R;
|
|
2380
2364
|
return { search: "", value: (R = (p = e.value) != null ? p : e.defaultValue) != null ? R : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
2381
|
-
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Map()), c = be(() => /* @__PURE__ */ new Set()), d = dr(e), { label: u, children: l, value: f, onValueChange: m, filter: x, shouldFilter: g, loop: w, disablePointerSelection:
|
|
2382
|
-
|
|
2365
|
+
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Map()), c = be(() => /* @__PURE__ */ new Set()), d = dr(e), { label: u, children: l, value: f, onValueChange: m, filter: x, shouldFilter: g, loop: w, disablePointerSelection: v = !1, vimBindings: h = !0, ...S } = e, y = Z(), I = Z(), A = Z(), M = a.useRef(null), j = la();
|
|
2366
|
+
he(() => {
|
|
2383
2367
|
if (f !== void 0) {
|
|
2384
2368
|
let p = f.trim();
|
|
2385
2369
|
n.current.value = p, E.emit();
|
|
2386
2370
|
}
|
|
2387
|
-
}, [f]),
|
|
2371
|
+
}, [f]), he(() => {
|
|
2388
2372
|
j(6, X);
|
|
2389
2373
|
}, []);
|
|
2390
2374
|
let E = a.useMemo(() => ({ subscribe: (p) => (c.current.add(p), () => c.current.delete(p)), snapshot: () => n.current, setState: (p, R, N) => {
|
|
2391
|
-
var C,
|
|
2375
|
+
var C, k, b, T;
|
|
2392
2376
|
if (!Object.is(n.current[p], R)) {
|
|
2393
2377
|
if (n.current[p] = R, p === "search") q(), U(), j(1, W);
|
|
2394
2378
|
else if (p === "value") {
|
|
@@ -2399,7 +2383,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2399
2383
|
if (j(7, () => {
|
|
2400
2384
|
var D;
|
|
2401
2385
|
n.current.selectedItemId = (D = H()) == null ? void 0 : D.id, E.emit();
|
|
2402
|
-
}), N || j(5, X), ((
|
|
2386
|
+
}), N || j(5, X), ((k = d.current) == null ? void 0 : k.value) !== void 0) {
|
|
2403
2387
|
let D = R ?? "";
|
|
2404
2388
|
(T = (b = d.current).onValueChange) == null || T.call(b, D);
|
|
2405
2389
|
return;
|
|
@@ -2409,7 +2393,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2409
2393
|
}
|
|
2410
2394
|
}, emit: () => {
|
|
2411
2395
|
c.current.forEach((p) => p());
|
|
2412
|
-
} }), []),
|
|
2396
|
+
} }), []), _ = a.useMemo(() => ({ value: (p, R, N) => {
|
|
2413
2397
|
var C;
|
|
2414
2398
|
R !== ((C = s.current.get(p)) == null ? void 0 : C.value) && (s.current.set(p, { value: R, keywords: N }), n.current.filtered.items.set(p, z(R, N)), j(2, () => {
|
|
2415
2399
|
U(), E.emit();
|
|
@@ -2427,30 +2411,30 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2427
2411
|
}), filter: () => d.current.shouldFilter, label: u || e["aria-label"], getDisablePointerSelection: () => d.current.disablePointerSelection, listId: y, inputId: A, labelId: I, listInnerRef: M }), []);
|
|
2428
2412
|
function z(p, R) {
|
|
2429
2413
|
var N, C;
|
|
2430
|
-
let
|
|
2431
|
-
return p ?
|
|
2414
|
+
let k = (C = (N = d.current) == null ? void 0 : N.filter) != null ? C : Js;
|
|
2415
|
+
return p ? k(p, n.current.search, R) : 0;
|
|
2432
2416
|
}
|
|
2433
2417
|
function U() {
|
|
2434
2418
|
if (!n.current.search || d.current.shouldFilter === !1) return;
|
|
2435
2419
|
let p = n.current.filtered.items, R = [];
|
|
2436
2420
|
n.current.filtered.groups.forEach((C) => {
|
|
2437
|
-
let
|
|
2438
|
-
|
|
2421
|
+
let k = r.current.get(C), b = 0;
|
|
2422
|
+
k.forEach((T) => {
|
|
2439
2423
|
let D = p.get(T);
|
|
2440
2424
|
b = Math.max(D, b);
|
|
2441
2425
|
}), R.push([C, b]);
|
|
2442
2426
|
});
|
|
2443
2427
|
let N = M.current;
|
|
2444
|
-
K().sort((C,
|
|
2428
|
+
K().sort((C, k) => {
|
|
2445
2429
|
var b, T;
|
|
2446
|
-
let D = C.getAttribute("id"), O =
|
|
2430
|
+
let D = C.getAttribute("id"), O = k.getAttribute("id");
|
|
2447
2431
|
return ((b = p.get(O)) != null ? b : 0) - ((T = p.get(D)) != null ? T : 0);
|
|
2448
2432
|
}).forEach((C) => {
|
|
2449
|
-
let
|
|
2450
|
-
|
|
2451
|
-
}), R.sort((C,
|
|
2452
|
-
var
|
|
2453
|
-
let b = (
|
|
2433
|
+
let k = C.closest(Je);
|
|
2434
|
+
k ? k.appendChild(C.parentElement === k ? C : C.closest(`${Je} > *`)) : N.appendChild(C.parentElement === N ? C : C.closest(`${Je} > *`));
|
|
2435
|
+
}), R.sort((C, k) => k[1] - C[1]).forEach((C) => {
|
|
2436
|
+
var k;
|
|
2437
|
+
let b = (k = M.current) == null ? void 0 : k.querySelector(`${Ie}[${xe}="${encodeURIComponent(C[0])}"]`);
|
|
2454
2438
|
b?.parentElement.appendChild(b);
|
|
2455
2439
|
});
|
|
2456
2440
|
}
|
|
@@ -2465,21 +2449,21 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2465
2449
|
return;
|
|
2466
2450
|
}
|
|
2467
2451
|
n.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
2468
|
-
let
|
|
2452
|
+
let k = 0;
|
|
2469
2453
|
for (let b of o.current) {
|
|
2470
2454
|
let T = (R = (p = s.current.get(b)) == null ? void 0 : p.value) != null ? R : "", D = (C = (N = s.current.get(b)) == null ? void 0 : N.keywords) != null ? C : [], O = z(T, D);
|
|
2471
|
-
n.current.filtered.items.set(b, O), O > 0 &&
|
|
2455
|
+
n.current.filtered.items.set(b, O), O > 0 && k++;
|
|
2472
2456
|
}
|
|
2473
2457
|
for (let [b, T] of r.current) for (let D of T) if (n.current.filtered.items.get(D) > 0) {
|
|
2474
2458
|
n.current.filtered.groups.add(b);
|
|
2475
2459
|
break;
|
|
2476
2460
|
}
|
|
2477
|
-
n.current.filtered.count =
|
|
2461
|
+
n.current.filtered.count = k;
|
|
2478
2462
|
}
|
|
2479
2463
|
function X() {
|
|
2480
2464
|
var p, R, N;
|
|
2481
2465
|
let C = H();
|
|
2482
|
-
C && (((p = C.parentElement) == null ? void 0 : p.firstChild) === C && ((N = (R = C.closest(Ie)) == null ? void 0 : R.querySelector(
|
|
2466
|
+
C && (((p = C.parentElement) == null ? void 0 : p.firstChild) === C && ((N = (R = C.closest(Ie)) == null ? void 0 : R.querySelector(Zs)) == null || N.scrollIntoView({ block: "nearest" })), C.scrollIntoView({ block: "nearest" }));
|
|
2483
2467
|
}
|
|
2484
2468
|
function H() {
|
|
2485
2469
|
var p;
|
|
@@ -2495,12 +2479,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2495
2479
|
}
|
|
2496
2480
|
function Y(p) {
|
|
2497
2481
|
var R;
|
|
2498
|
-
let N = H(), C = K(),
|
|
2499
|
-
(R = d.current) != null && R.loop && (b =
|
|
2482
|
+
let N = H(), C = K(), k = C.findIndex((T) => T === N), b = C[k + p];
|
|
2483
|
+
(R = d.current) != null && R.loop && (b = k + p < 0 ? C[C.length - 1] : k + p === C.length ? C[0] : C[k + p]), b && E.setState("value", b.getAttribute(xe));
|
|
2500
2484
|
}
|
|
2501
2485
|
function J(p) {
|
|
2502
2486
|
let R = H(), N = R?.closest(Ie), C;
|
|
2503
|
-
for (; N && !C; ) N = p > 0 ?
|
|
2487
|
+
for (; N && !C; ) N = p > 0 ? ia(N, Ie) : ca(N, Ie), C = N?.querySelector(Nt);
|
|
2504
2488
|
C ? E.setState("value", C.getAttribute(xe)) : Y(p);
|
|
2505
2489
|
}
|
|
2506
2490
|
let Q = () => F(K().length - 1), ge = (p) => {
|
|
@@ -2508,14 +2492,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2508
2492
|
}, de = (p) => {
|
|
2509
2493
|
p.preventDefault(), p.metaKey ? F(0) : p.altKey ? J(-1) : Y(-1);
|
|
2510
2494
|
};
|
|
2511
|
-
return a.createElement(
|
|
2495
|
+
return a.createElement(P.div, { ref: t, tabIndex: -1, ...S, "cmdk-root": "", onKeyDown: (p) => {
|
|
2512
2496
|
var R;
|
|
2513
2497
|
(R = S.onKeyDown) == null || R.call(S, p);
|
|
2514
2498
|
let N = p.nativeEvent.isComposing || p.keyCode === 229;
|
|
2515
2499
|
if (!(p.defaultPrevented || N)) switch (p.key) {
|
|
2516
2500
|
case "n":
|
|
2517
2501
|
case "j": {
|
|
2518
|
-
|
|
2502
|
+
h && p.ctrlKey && ge(p);
|
|
2519
2503
|
break;
|
|
2520
2504
|
}
|
|
2521
2505
|
case "ArrowDown": {
|
|
@@ -2524,7 +2508,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2524
2508
|
}
|
|
2525
2509
|
case "p":
|
|
2526
2510
|
case "k": {
|
|
2527
|
-
|
|
2511
|
+
h && p.ctrlKey && de(p);
|
|
2528
2512
|
break;
|
|
2529
2513
|
}
|
|
2530
2514
|
case "ArrowUp": {
|
|
@@ -2543,16 +2527,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2543
2527
|
p.preventDefault();
|
|
2544
2528
|
let C = H();
|
|
2545
2529
|
if (C) {
|
|
2546
|
-
let
|
|
2547
|
-
C.dispatchEvent(
|
|
2530
|
+
let k = new Event(it);
|
|
2531
|
+
C.dispatchEvent(k);
|
|
2548
2532
|
}
|
|
2549
2533
|
}
|
|
2550
2534
|
}
|
|
2551
|
-
} }, a.createElement("label", { "cmdk-label": "", htmlFor:
|
|
2552
|
-
}),
|
|
2535
|
+
} }, a.createElement("label", { "cmdk-label": "", htmlFor: _.inputId, id: _.labelId, style: ua }, u), Ge(e, (p) => a.createElement(ir.Provider, { value: E }, a.createElement(ar.Provider, { value: _ }, p))));
|
|
2536
|
+
}), Qs = a.forwardRef((e, t) => {
|
|
2553
2537
|
var n, o;
|
|
2554
|
-
let r = Z(), s = a.useRef(null), c = a.useContext(cr), d =
|
|
2555
|
-
|
|
2538
|
+
let r = Z(), s = a.useRef(null), c = a.useContext(cr), d = _e(), u = dr(e), l = (o = (n = u.current) == null ? void 0 : n.forceMount) != null ? o : c?.forceMount;
|
|
2539
|
+
he(() => {
|
|
2556
2540
|
if (!l) return d.item(r, c?.id);
|
|
2557
2541
|
}, [l]);
|
|
2558
2542
|
let f = ur(r, s, [e.value, e.children, s], e.keywords), m = bt(), x = ie((j) => j.value && j.value === f.current), g = ie((j) => l || d.filter() === !1 ? !0 : j.search ? j.filtered.items.get(r) > 0 : !0);
|
|
@@ -2562,31 +2546,31 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2562
2546
|
}, [g, e.onSelect, e.disabled]);
|
|
2563
2547
|
function w() {
|
|
2564
2548
|
var j, E;
|
|
2565
|
-
|
|
2549
|
+
v(), (E = (j = u.current).onSelect) == null || E.call(j, f.current);
|
|
2566
2550
|
}
|
|
2567
|
-
function
|
|
2551
|
+
function v() {
|
|
2568
2552
|
m.setState("value", f.current, !0);
|
|
2569
2553
|
}
|
|
2570
2554
|
if (!g) return null;
|
|
2571
|
-
let { disabled:
|
|
2572
|
-
return a.createElement(
|
|
2573
|
-
}),
|
|
2574
|
-
let { heading: n, children: o, forceMount: r, ...s } = e, c = Z(), d = a.useRef(null), u = a.useRef(null), l = Z(), f =
|
|
2575
|
-
|
|
2555
|
+
let { disabled: h, value: S, onSelect: y, forceMount: I, keywords: A, ...M } = e;
|
|
2556
|
+
return a.createElement(P.div, { ref: Ne(s, t), ...M, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!h, "aria-selected": !!x, "data-disabled": !!h, "data-selected": !!x, onPointerMove: h || d.getDisablePointerSelection() ? void 0 : v, onClick: h ? void 0 : w }, e.children);
|
|
2557
|
+
}), ea = a.forwardRef((e, t) => {
|
|
2558
|
+
let { heading: n, children: o, forceMount: r, ...s } = e, c = Z(), d = a.useRef(null), u = a.useRef(null), l = Z(), f = _e(), m = ie((g) => r || f.filter() === !1 ? !0 : g.search ? g.filtered.groups.has(c) : !0);
|
|
2559
|
+
he(() => f.group(c), []), ur(c, d, [e.value, e.heading, u]);
|
|
2576
2560
|
let x = a.useMemo(() => ({ id: c, forceMount: r }), [r]);
|
|
2577
|
-
return a.createElement(
|
|
2578
|
-
}),
|
|
2561
|
+
return a.createElement(P.div, { ref: Ne(d, t), ...s, "cmdk-group": "", role: "presentation", hidden: m ? void 0 : !0 }, n && a.createElement("div", { ref: u, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), Ge(e, (g) => a.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, a.createElement(cr.Provider, { value: x }, g))));
|
|
2562
|
+
}), ta = a.forwardRef((e, t) => {
|
|
2579
2563
|
let { alwaysRender: n, ...o } = e, r = a.useRef(null), s = ie((c) => !c.search);
|
|
2580
|
-
return !n && !s ? null : a.createElement(
|
|
2581
|
-
}),
|
|
2582
|
-
let { onValueChange: n, ...o } = e, r = e.value != null, s = bt(), c = ie((l) => l.search), d = ie((l) => l.selectedItemId), u =
|
|
2564
|
+
return !n && !s ? null : a.createElement(P.div, { ref: Ne(r, t), ...o, "cmdk-separator": "", role: "separator" });
|
|
2565
|
+
}), na = a.forwardRef((e, t) => {
|
|
2566
|
+
let { onValueChange: n, ...o } = e, r = e.value != null, s = bt(), c = ie((l) => l.search), d = ie((l) => l.selectedItemId), u = _e();
|
|
2583
2567
|
return a.useEffect(() => {
|
|
2584
2568
|
e.value != null && s.setState("search", e.value);
|
|
2585
|
-
}, [e.value]), a.createElement(
|
|
2569
|
+
}, [e.value]), a.createElement(P.input, { ref: t, ...o, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": u.listId, "aria-labelledby": u.labelId, "aria-activedescendant": d, id: u.inputId, type: "text", value: r ? e.value : c, onChange: (l) => {
|
|
2586
2570
|
r || s.setState("search", l.target.value), n?.(l.target.value);
|
|
2587
2571
|
} });
|
|
2588
|
-
}),
|
|
2589
|
-
let { children: n, label: o = "Suggestions", ...r } = e, s = a.useRef(null), c = a.useRef(null), d = ie((l) => l.selectedItemId), u =
|
|
2572
|
+
}), ra = a.forwardRef((e, t) => {
|
|
2573
|
+
let { children: n, label: o = "Suggestions", ...r } = e, s = a.useRef(null), c = a.useRef(null), d = ie((l) => l.selectedItemId), u = _e();
|
|
2590
2574
|
return a.useEffect(() => {
|
|
2591
2575
|
if (c.current && s.current) {
|
|
2592
2576
|
let l = c.current, f = s.current, m, x = new ResizeObserver(() => {
|
|
@@ -2599,22 +2583,22 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2599
2583
|
cancelAnimationFrame(m), x.unobserve(l);
|
|
2600
2584
|
};
|
|
2601
2585
|
}
|
|
2602
|
-
}, []), a.createElement(
|
|
2603
|
-
}),
|
|
2586
|
+
}, []), a.createElement(P.div, { ref: Ne(s, t), ...r, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": d, "aria-label": o, id: u.listId }, Ge(e, (l) => a.createElement("div", { ref: Ne(c, u.listInnerRef), "cmdk-list-sizer": "" }, l)));
|
|
2587
|
+
}), oa = a.forwardRef((e, t) => {
|
|
2604
2588
|
let { open: n, onOpenChange: o, overlayClassName: r, contentClassName: s, container: c, ...d } = e;
|
|
2605
|
-
return a.createElement(
|
|
2606
|
-
}),
|
|
2589
|
+
return a.createElement(zs, { open: n, onOpenChange: o }, a.createElement(qs, { container: c }, a.createElement(Ys, { "cmdk-overlay": "", className: r }), a.createElement(Xs, { "aria-label": e.label, "cmdk-dialog": "", className: s }, a.createElement(lr, { ref: t, ...d }))));
|
|
2590
|
+
}), sa = a.forwardRef((e, t) => ie((n) => n.filtered.count === 0) ? a.createElement(P.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), aa = a.forwardRef((e, t) => {
|
|
2607
2591
|
let { progress: n, children: o, label: r = "Loading...", ...s } = e;
|
|
2608
|
-
return a.createElement(
|
|
2609
|
-
}), Ee = Object.assign(lr, { List:
|
|
2610
|
-
function
|
|
2592
|
+
return a.createElement(P.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": r }, Ge(e, (c) => a.createElement("div", { "aria-hidden": !0 }, c)));
|
|
2593
|
+
}), Ee = Object.assign(lr, { List: ra, Item: Qs, Input: na, Group: ea, Separator: ta, Dialog: oa, Empty: sa, Loading: aa });
|
|
2594
|
+
function ia(e, t) {
|
|
2611
2595
|
let n = e.nextElementSibling;
|
|
2612
2596
|
for (; n; ) {
|
|
2613
2597
|
if (n.matches(t)) return n;
|
|
2614
2598
|
n = n.nextElementSibling;
|
|
2615
2599
|
}
|
|
2616
2600
|
}
|
|
2617
|
-
function
|
|
2601
|
+
function ca(e, t) {
|
|
2618
2602
|
let n = e.previousElementSibling;
|
|
2619
2603
|
for (; n; ) {
|
|
2620
2604
|
if (n.matches(t)) return n;
|
|
@@ -2623,11 +2607,11 @@ function la(e, t) {
|
|
|
2623
2607
|
}
|
|
2624
2608
|
function dr(e) {
|
|
2625
2609
|
let t = a.useRef(e);
|
|
2626
|
-
return
|
|
2610
|
+
return he(() => {
|
|
2627
2611
|
t.current = e;
|
|
2628
2612
|
}), t;
|
|
2629
2613
|
}
|
|
2630
|
-
var
|
|
2614
|
+
var he = typeof window > "u" ? a.useEffect : a.useLayoutEffect;
|
|
2631
2615
|
function be(e) {
|
|
2632
2616
|
let t = a.useRef();
|
|
2633
2617
|
return t.current === void 0 && (t.current = e()), t;
|
|
@@ -2637,8 +2621,8 @@ function ie(e) {
|
|
|
2637
2621
|
return a.useSyncExternalStore(t.subscribe, n, n);
|
|
2638
2622
|
}
|
|
2639
2623
|
function ur(e, t, n, o = []) {
|
|
2640
|
-
let r = a.useRef(), s =
|
|
2641
|
-
return
|
|
2624
|
+
let r = a.useRef(), s = _e();
|
|
2625
|
+
return he(() => {
|
|
2642
2626
|
var c;
|
|
2643
2627
|
let d = (() => {
|
|
2644
2628
|
var l;
|
|
@@ -2650,23 +2634,23 @@ function ur(e, t, n, o = []) {
|
|
|
2650
2634
|
s.value(e, d, u), (c = t.current) == null || c.setAttribute(xe, d), r.current = d;
|
|
2651
2635
|
}), r;
|
|
2652
2636
|
}
|
|
2653
|
-
var
|
|
2637
|
+
var la = () => {
|
|
2654
2638
|
let [e, t] = a.useState(), n = be(() => /* @__PURE__ */ new Map());
|
|
2655
|
-
return
|
|
2639
|
+
return he(() => {
|
|
2656
2640
|
n.current.forEach((o) => o()), n.current = /* @__PURE__ */ new Map();
|
|
2657
2641
|
}, [e]), (o, r) => {
|
|
2658
2642
|
n.current.set(o, r), t({});
|
|
2659
2643
|
};
|
|
2660
2644
|
};
|
|
2661
|
-
function
|
|
2645
|
+
function da(e) {
|
|
2662
2646
|
let t = e.type;
|
|
2663
2647
|
return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
|
|
2664
2648
|
}
|
|
2665
2649
|
function Ge({ asChild: e, children: t }, n) {
|
|
2666
|
-
return e && a.isValidElement(t) ? a.cloneElement(
|
|
2650
|
+
return e && a.isValidElement(t) ? a.cloneElement(da(t), { ref: t.ref }, n(t.props.children)) : n(t);
|
|
2667
2651
|
}
|
|
2668
|
-
var
|
|
2669
|
-
function
|
|
2652
|
+
var ua = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
2653
|
+
function fa({ className: e, ...t }) {
|
|
2670
2654
|
return /* @__PURE__ */ i.jsx(
|
|
2671
2655
|
Ee,
|
|
2672
2656
|
{
|
|
@@ -2679,9 +2663,9 @@ function pa({ className: e, ...t }) {
|
|
|
2679
2663
|
}
|
|
2680
2664
|
);
|
|
2681
2665
|
}
|
|
2682
|
-
function
|
|
2666
|
+
function pa({ className: e, ...t }) {
|
|
2683
2667
|
return /* @__PURE__ */ i.jsxs("div", { className: "flex h-9 items-center gap-2 border-b px-3", "data-slot": "command-input-wrapper", children: [
|
|
2684
|
-
/* @__PURE__ */ i.jsx(
|
|
2668
|
+
/* @__PURE__ */ i.jsx($r, { className: "size-4 shrink-0 opacity-50" }),
|
|
2685
2669
|
/* @__PURE__ */ i.jsx(
|
|
2686
2670
|
Ee.Input,
|
|
2687
2671
|
{
|
|
@@ -2695,7 +2679,7 @@ function ma({ className: e, ...t }) {
|
|
|
2695
2679
|
)
|
|
2696
2680
|
] });
|
|
2697
2681
|
}
|
|
2698
|
-
function
|
|
2682
|
+
function ma({ className: e, ...t }) {
|
|
2699
2683
|
return /* @__PURE__ */ i.jsx(
|
|
2700
2684
|
Ee.List,
|
|
2701
2685
|
{
|
|
@@ -2708,7 +2692,7 @@ function ha({ className: e, ...t }) {
|
|
|
2708
2692
|
function va({ ...e }) {
|
|
2709
2693
|
return /* @__PURE__ */ i.jsx(Ee.Empty, { className: "py-6 text-center text-sm", "data-slot": "command-empty", ...e });
|
|
2710
2694
|
}
|
|
2711
|
-
function
|
|
2695
|
+
function ha({ className: e, ...t }) {
|
|
2712
2696
|
return /* @__PURE__ */ i.jsx(
|
|
2713
2697
|
Ee.Group,
|
|
2714
2698
|
{
|
|
@@ -2721,7 +2705,7 @@ function ga({ className: e, ...t }) {
|
|
|
2721
2705
|
}
|
|
2722
2706
|
);
|
|
2723
2707
|
}
|
|
2724
|
-
function
|
|
2708
|
+
function ga({ className: e, ...t }) {
|
|
2725
2709
|
return /* @__PURE__ */ i.jsx(
|
|
2726
2710
|
Ee.Item,
|
|
2727
2711
|
{
|
|
@@ -2734,7 +2718,7 @@ function xa({ className: e, ...t }) {
|
|
|
2734
2718
|
}
|
|
2735
2719
|
);
|
|
2736
2720
|
}
|
|
2737
|
-
const
|
|
2721
|
+
const xa = ({
|
|
2738
2722
|
placeholder: e,
|
|
2739
2723
|
selected: t,
|
|
2740
2724
|
className: n,
|
|
@@ -2742,7 +2726,7 @@ const ba = ({
|
|
|
2742
2726
|
renderSelected: r = (s) => s.label
|
|
2743
2727
|
}) => /* @__PURE__ */ i.jsx(Ft, { asChild: !0, children: /* @__PURE__ */ i.jsxs(pr, { "aria-expanded": o, className: `justify-between ${n}`, role: "combobox", variant: "outline", children: [
|
|
2744
2728
|
r(t || { label: e, value: "" }),
|
|
2745
|
-
/* @__PURE__ */ i.jsx(
|
|
2729
|
+
/* @__PURE__ */ i.jsx(Ar, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
2746
2730
|
] }) }), Va = ({
|
|
2747
2731
|
options: e,
|
|
2748
2732
|
value: t = "",
|
|
@@ -2752,10 +2736,10 @@ const ba = ({
|
|
|
2752
2736
|
},
|
|
2753
2737
|
renderSelected: s = (c) => c.label
|
|
2754
2738
|
}) => {
|
|
2755
|
-
const [c, d] = lt(!1), u =
|
|
2739
|
+
const [c, d] = lt(!1), u = vr(() => e.find((l) => l.value === t), [e, t]);
|
|
2756
2740
|
return /* @__PURE__ */ i.jsxs(Lt, { onOpenChange: d, open: c, children: [
|
|
2757
2741
|
/* @__PURE__ */ i.jsx(
|
|
2758
|
-
|
|
2742
|
+
xa,
|
|
2759
2743
|
{
|
|
2760
2744
|
className: `w-full ${o}`,
|
|
2761
2745
|
open: c,
|
|
@@ -2764,12 +2748,12 @@ const ba = ({
|
|
|
2764
2748
|
selected: u
|
|
2765
2749
|
}
|
|
2766
2750
|
),
|
|
2767
|
-
/* @__PURE__ */ i.jsx(Bt, { className: "w-full p-0", children: /* @__PURE__ */ i.jsxs(
|
|
2768
|
-
/* @__PURE__ */ i.jsx(
|
|
2769
|
-
/* @__PURE__ */ i.jsxs(
|
|
2751
|
+
/* @__PURE__ */ i.jsx(Bt, { className: "w-full p-0", children: /* @__PURE__ */ i.jsxs(fa, { value: t, children: [
|
|
2752
|
+
/* @__PURE__ */ i.jsx(pa, { "aria-label": "Search options", className: "h-9", placeholder: "Search" }),
|
|
2753
|
+
/* @__PURE__ */ i.jsxs(ma, { children: [
|
|
2770
2754
|
/* @__PURE__ */ i.jsx(va, { children: "No results found" }),
|
|
2771
|
-
/* @__PURE__ */ i.jsx(
|
|
2772
|
-
|
|
2755
|
+
/* @__PURE__ */ i.jsx(ha, { children: e.map((l) => /* @__PURE__ */ i.jsxs(
|
|
2756
|
+
ga,
|
|
2773
2757
|
{
|
|
2774
2758
|
onSelect: () => {
|
|
2775
2759
|
d(!1), r(l.value);
|
|
@@ -2787,7 +2771,7 @@ const ba = ({
|
|
|
2787
2771
|
] }) })
|
|
2788
2772
|
] });
|
|
2789
2773
|
};
|
|
2790
|
-
function
|
|
2774
|
+
function ba({ className: e, ...t }) {
|
|
2791
2775
|
return /* @__PURE__ */ i.jsx(
|
|
2792
2776
|
"textarea",
|
|
2793
2777
|
{
|
|
@@ -2804,7 +2788,7 @@ function Ua({ label: e, name: t, note: n, placeholder: o, className: r, error: s
|
|
|
2804
2788
|
return /* @__PURE__ */ i.jsxs(ae, { className: "w-full", direction: "col", gap: "2", children: [
|
|
2805
2789
|
e && /* @__PURE__ */ i.jsx(Se, { htmlFor: t, children: e }),
|
|
2806
2790
|
/* @__PURE__ */ i.jsx(
|
|
2807
|
-
|
|
2791
|
+
ba,
|
|
2808
2792
|
{
|
|
2809
2793
|
"aria-label": e || t,
|
|
2810
2794
|
className: r,
|
|
@@ -2820,7 +2804,7 @@ function Ua({ label: e, name: t, note: n, placeholder: o, className: r, error: s
|
|
|
2820
2804
|
}
|
|
2821
2805
|
export {
|
|
2822
2806
|
Da as C,
|
|
2823
|
-
|
|
2807
|
+
ka as D,
|
|
2824
2808
|
je as I,
|
|
2825
2809
|
Se as L,
|
|
2826
2810
|
Oa as N,
|
|
@@ -2829,11 +2813,11 @@ export {
|
|
|
2829
2813
|
Ua as T,
|
|
2830
2814
|
Aa as a,
|
|
2831
2815
|
Ma as b,
|
|
2832
|
-
|
|
2816
|
+
rs as c,
|
|
2833
2817
|
Fa as d,
|
|
2834
2818
|
Va as e,
|
|
2835
2819
|
Un as f,
|
|
2836
2820
|
Zt as g,
|
|
2837
|
-
|
|
2838
|
-
|
|
2821
|
+
oo as h,
|
|
2822
|
+
so as i
|
|
2839
2823
|
};
|