vxui-react 1.0.0 → 1.1.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/index.cjs +23 -23
- package/dist/index.js +849 -817
- package/dist/vxui-react.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as a, Fragment as q, jsxs as S } from "react/jsx-runtime";
|
|
2
2
|
import * as b from "react";
|
|
3
|
-
import ae, { useState as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
function
|
|
3
|
+
import ae, { useState as F, useEffect as O, useContext as ye, createContext as _e, forwardRef as re, createElement as it, useRef as L, useMemo as be, useCallback as U, useId as Mr } from "react";
|
|
4
|
+
import * as on from "react-dom";
|
|
5
|
+
import Or from "react-dom";
|
|
6
|
+
const $r = 767, Br = 1023;
|
|
7
|
+
function Lt() {
|
|
8
8
|
if (typeof window > "u") return "desktop";
|
|
9
9
|
const e = window.innerWidth;
|
|
10
|
-
return e <=
|
|
10
|
+
return e <= $r ? "phone" : e <= Br ? "tablet" : "desktop";
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const ln = _e({
|
|
13
13
|
viewport: "desktop",
|
|
14
14
|
isPhone: !1,
|
|
15
15
|
isTablet: !1,
|
|
16
16
|
isDesktop: !0
|
|
17
17
|
});
|
|
18
|
-
function
|
|
19
|
-
const [t, n] =
|
|
18
|
+
function yi({ children: e }) {
|
|
19
|
+
const [t, n] = F(Lt);
|
|
20
20
|
O(() => {
|
|
21
21
|
const s = () => {
|
|
22
|
-
const o =
|
|
22
|
+
const o = Lt();
|
|
23
23
|
n((l) => l === o ? l : o);
|
|
24
24
|
};
|
|
25
25
|
return window.addEventListener("resize", s, { passive: !0 }), () => window.removeEventListener("resize", s);
|
|
@@ -30,13 +30,13 @@ function bi({ children: e }) {
|
|
|
30
30
|
isTablet: t === "tablet",
|
|
31
31
|
isDesktop: t === "desktop"
|
|
32
32
|
};
|
|
33
|
-
return /* @__PURE__ */ a(
|
|
33
|
+
return /* @__PURE__ */ a(ln.Provider, { value: r, children: e });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return ye(
|
|
35
|
+
function vt() {
|
|
36
|
+
return ye(ln);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const { viewport: r } =
|
|
38
|
+
function _i({ desktop: e, mobile: t, tablet: n }) {
|
|
39
|
+
const { viewport: r } = vt();
|
|
40
40
|
return r === "phone" ? /* @__PURE__ */ a(q, { children: t }) : r === "tablet" ? /* @__PURE__ */ a(q, { children: n ?? e }) : /* @__PURE__ */ a(q, { children: e });
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -45,13 +45,13 @@ function xi({ desktop: e, mobile: t, tablet: n }) {
|
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
|
-
const
|
|
48
|
+
const zr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ur = (e) => e.replace(
|
|
49
49
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
50
50
|
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
51
|
-
),
|
|
52
|
-
const t =
|
|
51
|
+
), Mt = (e) => {
|
|
52
|
+
const t = Ur(e);
|
|
53
53
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
54
|
-
}, cn = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(),
|
|
54
|
+
}, cn = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), Wr = (e) => {
|
|
55
55
|
for (const t in e)
|
|
56
56
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
57
57
|
return !0;
|
|
@@ -62,7 +62,7 @@ const $r = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Br = (
|
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
65
|
+
var Hr = {
|
|
66
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
67
67
|
width: 24,
|
|
68
68
|
height: 24,
|
|
@@ -79,7 +79,7 @@ var Ur = {
|
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const Gr = re(
|
|
83
83
|
({
|
|
84
84
|
color: e = "currentColor",
|
|
85
85
|
size: t = 24,
|
|
@@ -93,13 +93,13 @@ const Wr = re(
|
|
|
93
93
|
"svg",
|
|
94
94
|
{
|
|
95
95
|
ref: u,
|
|
96
|
-
...
|
|
96
|
+
...Hr,
|
|
97
97
|
width: t,
|
|
98
98
|
height: t,
|
|
99
99
|
stroke: e,
|
|
100
100
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
101
101
|
className: cn("lucide", s),
|
|
102
|
-
...!o && !
|
|
102
|
+
...!o && !Wr(i) && { "aria-hidden": "true" },
|
|
103
103
|
...i
|
|
104
104
|
},
|
|
105
105
|
[
|
|
@@ -116,18 +116,18 @@ const Wr = re(
|
|
|
116
116
|
*/
|
|
117
117
|
const X = (e, t) => {
|
|
118
118
|
const n = re(
|
|
119
|
-
({ className: r, ...s }, o) => it(
|
|
119
|
+
({ className: r, ...s }, o) => it(Gr, {
|
|
120
120
|
ref: o,
|
|
121
121
|
iconNode: t,
|
|
122
122
|
className: cn(
|
|
123
|
-
`lucide-${
|
|
123
|
+
`lucide-${zr(Mt(e))}`,
|
|
124
124
|
`lucide-${e}`,
|
|
125
125
|
r
|
|
126
126
|
),
|
|
127
127
|
...s
|
|
128
128
|
})
|
|
129
129
|
);
|
|
130
|
-
return n.displayName =
|
|
130
|
+
return n.displayName = Mt(e), n;
|
|
131
131
|
};
|
|
132
132
|
/**
|
|
133
133
|
* @license lucide-react v0.511.0 - ISC
|
|
@@ -135,102 +135,102 @@ const X = (e, t) => {
|
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const jr = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], ht = X("check", jr);
|
|
139
139
|
/**
|
|
140
140
|
* @license lucide-react v0.511.0 - ISC
|
|
141
141
|
*
|
|
142
142
|
* This source code is licensed under the ISC license.
|
|
143
143
|
* See the LICENSE file in the root directory of this source tree.
|
|
144
144
|
*/
|
|
145
|
-
const
|
|
145
|
+
const Kr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], mt = X("chevron-down", Kr);
|
|
146
146
|
/**
|
|
147
147
|
* @license lucide-react v0.511.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/
|
|
152
|
-
const
|
|
152
|
+
const Vr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], un = X("chevron-left", Vr);
|
|
153
153
|
/**
|
|
154
154
|
* @license lucide-react v0.511.0 - ISC
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the ISC license.
|
|
157
157
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
158
|
*/
|
|
159
|
-
const
|
|
159
|
+
const Yr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ue = X("chevron-right", Yr);
|
|
160
160
|
/**
|
|
161
161
|
* @license lucide-react v0.511.0 - ISC
|
|
162
162
|
*
|
|
163
163
|
* This source code is licensed under the ISC license.
|
|
164
164
|
* See the LICENSE file in the root directory of this source tree.
|
|
165
165
|
*/
|
|
166
|
-
const
|
|
166
|
+
const qr = [
|
|
167
167
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
168
168
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
169
|
-
],
|
|
169
|
+
], Xr = X("copy", qr);
|
|
170
170
|
/**
|
|
171
171
|
* @license lucide-react v0.511.0 - ISC
|
|
172
172
|
*
|
|
173
173
|
* This source code is licensed under the ISC license.
|
|
174
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
175
|
*/
|
|
176
|
-
const
|
|
176
|
+
const Zr = [
|
|
177
177
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
178
178
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
179
|
-
],
|
|
179
|
+
], Qr = X("file", Zr);
|
|
180
180
|
/**
|
|
181
181
|
* @license lucide-react v0.511.0 - ISC
|
|
182
182
|
*
|
|
183
183
|
* This source code is licensed under the ISC license.
|
|
184
184
|
* See the LICENSE file in the root directory of this source tree.
|
|
185
185
|
*/
|
|
186
|
-
const
|
|
186
|
+
const Jr = [
|
|
187
187
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
188
188
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
189
189
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
190
|
-
],
|
|
190
|
+
], ea = X("globe", Jr);
|
|
191
191
|
/**
|
|
192
192
|
* @license lucide-react v0.511.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
196
|
*/
|
|
197
|
-
const
|
|
197
|
+
const ta = [
|
|
198
198
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
199
199
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
200
200
|
["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
|
|
201
|
-
], dn = X("panel-left-close",
|
|
201
|
+
], dn = X("panel-left-close", ta);
|
|
202
202
|
/**
|
|
203
203
|
* @license lucide-react v0.511.0 - ISC
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
207
|
*/
|
|
208
|
-
const
|
|
208
|
+
const na = [
|
|
209
209
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
210
210
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
211
211
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
212
|
-
], pn = X("panel-left-open",
|
|
212
|
+
], pn = X("panel-left-open", na);
|
|
213
213
|
/**
|
|
214
214
|
* @license lucide-react v0.511.0 - ISC
|
|
215
215
|
*
|
|
216
216
|
* This source code is licensed under the ISC license.
|
|
217
217
|
* See the LICENSE file in the root directory of this source tree.
|
|
218
218
|
*/
|
|
219
|
-
const
|
|
219
|
+
const ra = [
|
|
220
220
|
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
221
221
|
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
222
222
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
223
|
-
],
|
|
223
|
+
], aa = X("upload", ra);
|
|
224
224
|
/**
|
|
225
225
|
* @license lucide-react v0.511.0 - ISC
|
|
226
226
|
*
|
|
227
227
|
* This source code is licensed under the ISC license.
|
|
228
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
229
229
|
*/
|
|
230
|
-
const
|
|
230
|
+
const sa = [
|
|
231
231
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
232
232
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
233
|
-
], ve = X("x",
|
|
233
|
+
], ve = X("x", sa);
|
|
234
234
|
function T(...e) {
|
|
235
235
|
return e.filter(Boolean).join(" ");
|
|
236
236
|
}
|
|
@@ -280,8 +280,8 @@ function fn(e, t) {
|
|
|
280
280
|
};
|
|
281
281
|
}, []);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const { isTablet: o } =
|
|
283
|
+
function oa({ collapsed: e = !1, mobileNavOpen: t = !1, density: n, className: r, children: s }) {
|
|
284
|
+
const { isTablet: o } = vt();
|
|
285
285
|
return /* @__PURE__ */ a(
|
|
286
286
|
"div",
|
|
287
287
|
{
|
|
@@ -294,7 +294,7 @@ function aa({ collapsed: e = !1, mobileNavOpen: t = !1, density: n, className: r
|
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function ia({
|
|
298
298
|
brand: e = "VXUI",
|
|
299
299
|
brandCaption: t,
|
|
300
300
|
brandIcon: n,
|
|
@@ -355,16 +355,16 @@ function sa({
|
|
|
355
355
|
}
|
|
356
356
|
);
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function la({ label: e = "Primary navigation", children: t }) {
|
|
359
359
|
return /* @__PURE__ */ a("nav", { className: "vx-sidebar__nav", "aria-label": e, children: t });
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function ca({ title: e, children: t }) {
|
|
362
362
|
return /* @__PURE__ */ S("div", { className: "vx-nav-section-block", children: [
|
|
363
363
|
e ? /* @__PURE__ */ a("div", { className: "vx-nav-section-block__title", children: e }) : null,
|
|
364
364
|
/* @__PURE__ */ a("div", { className: "vx-nav-section-block__items", children: t })
|
|
365
365
|
] });
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function ua({ label: e, icon: t, badge: n, trailing: r, active: s, onSelect: o }) {
|
|
368
368
|
return /* @__PURE__ */ S(
|
|
369
369
|
"button",
|
|
370
370
|
{
|
|
@@ -380,7 +380,7 @@ function la({ label: e, icon: t, badge: n, trailing: r, active: s, onSelect: o }
|
|
|
380
380
|
}
|
|
381
381
|
);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function da({ onClose: e, closeLabel: t = "Close sidebar" }) {
|
|
384
384
|
return /* @__PURE__ */ a(
|
|
385
385
|
"button",
|
|
386
386
|
{
|
|
@@ -391,10 +391,10 @@ function ca({ onClose: e, closeLabel: t = "Close sidebar" }) {
|
|
|
391
391
|
}
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function pa({ children: e }) {
|
|
395
395
|
return /* @__PURE__ */ a("div", { className: "vx-shell__main", children: e });
|
|
396
396
|
}
|
|
397
|
-
const
|
|
397
|
+
const fa = re(function({
|
|
398
398
|
title: t,
|
|
399
399
|
description: n,
|
|
400
400
|
breadcrumb: r,
|
|
@@ -422,7 +422,7 @@ const da = re(function({
|
|
|
422
422
|
s ? /* @__PURE__ */ a("div", { className: "vx-topbar__actions", children: s }) : null
|
|
423
423
|
] });
|
|
424
424
|
});
|
|
425
|
-
function
|
|
425
|
+
function va({ children: e }) {
|
|
426
426
|
const t = L(null), n = L(null);
|
|
427
427
|
return fn(t, n), /* @__PURE__ */ S(
|
|
428
428
|
"div",
|
|
@@ -442,7 +442,7 @@ function pa({ children: e }) {
|
|
|
442
442
|
}
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function wi({
|
|
446
446
|
brand: e = "VXUI",
|
|
447
447
|
brandCaption: t,
|
|
448
448
|
brandIcon: n,
|
|
@@ -465,9 +465,9 @@ function yi({
|
|
|
465
465
|
sidebarFooter: v,
|
|
466
466
|
children: f
|
|
467
467
|
}) {
|
|
468
|
-
return /* @__PURE__ */ S(
|
|
468
|
+
return /* @__PURE__ */ S(oa, { collapsed: c, mobileNavOpen: d, density: w, children: [
|
|
469
469
|
/* @__PURE__ */ a(
|
|
470
|
-
|
|
470
|
+
ia,
|
|
471
471
|
{
|
|
472
472
|
brand: e,
|
|
473
473
|
brandCaption: t,
|
|
@@ -477,13 +477,13 @@ function yi({
|
|
|
477
477
|
onToggle: p,
|
|
478
478
|
collapseLabel: E,
|
|
479
479
|
expandLabel: g,
|
|
480
|
-
children: /* @__PURE__ */ a(
|
|
480
|
+
children: /* @__PURE__ */ a(la, { children: (u ?? (i ? [{ items: i }] : [])).map((_, N) => /* @__PURE__ */ a(ca, { title: _.title, children: _.items.map(({ key: C, onSelect: A, ...P }) => /* @__PURE__ */ a(ua, { onSelect: A, ...P }, C)) }, _.key ?? _.title ?? N)) })
|
|
481
481
|
}
|
|
482
482
|
),
|
|
483
|
-
x ? /* @__PURE__ */ a(
|
|
484
|
-
/* @__PURE__ */ S(
|
|
483
|
+
x ? /* @__PURE__ */ a(da, { onClose: x, closeLabel: m }) : null,
|
|
484
|
+
/* @__PURE__ */ S(pa, { children: [
|
|
485
485
|
/* @__PURE__ */ a(
|
|
486
|
-
|
|
486
|
+
fa,
|
|
487
487
|
{
|
|
488
488
|
ref: r,
|
|
489
489
|
breadcrumb: s,
|
|
@@ -495,26 +495,26 @@ function yi({
|
|
|
495
495
|
menuButtonLabel: k
|
|
496
496
|
}
|
|
497
497
|
),
|
|
498
|
-
/* @__PURE__ */ a(
|
|
498
|
+
/* @__PURE__ */ a(va, { children: f })
|
|
499
499
|
] })
|
|
500
500
|
] });
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function ki({ className: e, variant: t = "neutral", ...n }) {
|
|
503
503
|
return /* @__PURE__ */ a("span", { className: T("vx-badge", `vx-badge--${t}`, e), ...n });
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Ni({ className: e, ...t }) {
|
|
506
506
|
return /* @__PURE__ */ a("section", { className: T("vx-card", e), ...t });
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Si({ className: e, ...t }) {
|
|
509
509
|
return /* @__PURE__ */ a("header", { className: T("vx-card__header", e), ...t });
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Ei({ className: e, ...t }) {
|
|
512
512
|
return /* @__PURE__ */ a("h2", { className: T("vx-card__title", e), ...t });
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function Ti({ className: e, ...t }) {
|
|
515
515
|
return /* @__PURE__ */ a("p", { className: T("vx-card__description", e), ...t });
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Ci({ className: e, ...t }) {
|
|
518
518
|
return /* @__PURE__ */ a("div", { className: T("vx-card__content", e), ...t });
|
|
519
519
|
}
|
|
520
520
|
function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
@@ -523,7 +523,7 @@ function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
523
523
|
return t == null ? void 0 : t(s);
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Ot(e, t) {
|
|
527
527
|
if (typeof e == "function")
|
|
528
528
|
return e(t);
|
|
529
529
|
e != null && (e.current = t);
|
|
@@ -532,14 +532,14 @@ function vn(...e) {
|
|
|
532
532
|
return (t) => {
|
|
533
533
|
let n = !1;
|
|
534
534
|
const r = e.map((s) => {
|
|
535
|
-
const o =
|
|
535
|
+
const o = Ot(s, t);
|
|
536
536
|
return !n && typeof o == "function" && (n = !0), o;
|
|
537
537
|
});
|
|
538
538
|
if (n)
|
|
539
539
|
return () => {
|
|
540
540
|
for (let s = 0; s < r.length; s++) {
|
|
541
541
|
const o = r[s];
|
|
542
|
-
typeof o == "function" ? o() :
|
|
542
|
+
typeof o == "function" ? o() : Ot(e[s], null);
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
};
|
|
@@ -547,7 +547,7 @@ function vn(...e) {
|
|
|
547
547
|
function K(...e) {
|
|
548
548
|
return b.useCallback(vn(...e), e);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function ha(e, t) {
|
|
551
551
|
const n = b.createContext(t), r = (o) => {
|
|
552
552
|
const { children: l, ...i } = o, u = b.useMemo(() => i, Object.values(i));
|
|
553
553
|
return /* @__PURE__ */ a(n.Provider, { value: u, children: l });
|
|
@@ -591,9 +591,9 @@ function he(e, t = []) {
|
|
|
591
591
|
);
|
|
592
592
|
};
|
|
593
593
|
};
|
|
594
|
-
return s.scopeName = e, [r,
|
|
594
|
+
return s.scopeName = e, [r, ma(s, ...t)];
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function ma(...e) {
|
|
597
597
|
const t = e[0];
|
|
598
598
|
if (e.length === 1) return t;
|
|
599
599
|
const n = () => {
|
|
@@ -612,15 +612,15 @@ function va(...e) {
|
|
|
612
612
|
return n.scopeName = t.scopeName, n;
|
|
613
613
|
}
|
|
614
614
|
var se = globalThis != null && globalThis.document ? b.useLayoutEffect : () => {
|
|
615
|
-
},
|
|
616
|
-
}),
|
|
615
|
+
}, ga = b[" useId ".trim().toString()] || (() => {
|
|
616
|
+
}), ba = 0;
|
|
617
617
|
function xe(e) {
|
|
618
|
-
const [t, n] = b.useState(
|
|
618
|
+
const [t, n] = b.useState(ga());
|
|
619
619
|
return se(() => {
|
|
620
|
-
n((r) => r ?? String(
|
|
620
|
+
n((r) => r ?? String(ba++));
|
|
621
621
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
622
622
|
}
|
|
623
|
-
var
|
|
623
|
+
var xa = b[" useInsertionEffect ".trim().toString()] || se;
|
|
624
624
|
function we({
|
|
625
625
|
prop: e,
|
|
626
626
|
defaultProp: t,
|
|
@@ -628,7 +628,7 @@ function we({
|
|
|
628
628
|
},
|
|
629
629
|
caller: r
|
|
630
630
|
}) {
|
|
631
|
-
const [s, o, l] =
|
|
631
|
+
const [s, o, l] = ya({
|
|
632
632
|
defaultProp: t,
|
|
633
633
|
onChange: n
|
|
634
634
|
}), i = e !== void 0, u = i ? e : s;
|
|
@@ -645,7 +645,7 @@ function we({
|
|
|
645
645
|
(d) => {
|
|
646
646
|
var p;
|
|
647
647
|
if (i) {
|
|
648
|
-
const x =
|
|
648
|
+
const x = _a(d) ? d(e) : d;
|
|
649
649
|
x !== e && ((p = l.current) == null || p.call(l, x));
|
|
650
650
|
} else
|
|
651
651
|
o(d);
|
|
@@ -654,25 +654,25 @@ function we({
|
|
|
654
654
|
);
|
|
655
655
|
return [u, c];
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function ya({
|
|
658
658
|
defaultProp: e,
|
|
659
659
|
onChange: t
|
|
660
660
|
}) {
|
|
661
661
|
const [n, r] = b.useState(e), s = b.useRef(n), o = b.useRef(t);
|
|
662
|
-
return
|
|
662
|
+
return xa(() => {
|
|
663
663
|
o.current = t;
|
|
664
664
|
}, [t]), b.useEffect(() => {
|
|
665
665
|
var l;
|
|
666
666
|
s.current !== n && ((l = o.current) == null || l.call(o, n), s.current = n);
|
|
667
667
|
}, [n, s]), [n, r, o];
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function _a(e) {
|
|
670
670
|
return typeof e == "function";
|
|
671
671
|
}
|
|
672
672
|
// @__NO_SIDE_EFFECTS__
|
|
673
673
|
function $e(e) {
|
|
674
|
-
const t = /* @__PURE__ */
|
|
675
|
-
const { children: o, ...l } = r, i = b.Children.toArray(o), u = i.find(
|
|
674
|
+
const t = /* @__PURE__ */ wa(e), n = b.forwardRef((r, s) => {
|
|
675
|
+
const { children: o, ...l } = r, i = b.Children.toArray(o), u = i.find(Na);
|
|
676
676
|
if (u) {
|
|
677
677
|
const c = u.props.children, d = i.map((p) => p === u ? b.Children.count(c) > 1 ? b.Children.only(null) : b.isValidElement(c) ? c.props.children : null : p);
|
|
678
678
|
return /* @__PURE__ */ a(t, { ...l, ref: s, children: b.isValidElement(c) ? b.cloneElement(c, void 0, d) : null });
|
|
@@ -682,22 +682,22 @@ function $e(e) {
|
|
|
682
682
|
return n.displayName = `${e}.Slot`, n;
|
|
683
683
|
}
|
|
684
684
|
// @__NO_SIDE_EFFECTS__
|
|
685
|
-
function
|
|
685
|
+
function wa(e) {
|
|
686
686
|
const t = b.forwardRef((n, r) => {
|
|
687
687
|
const { children: s, ...o } = n;
|
|
688
688
|
if (b.isValidElement(s)) {
|
|
689
|
-
const l =
|
|
689
|
+
const l = Ea(s), i = Sa(o, s.props);
|
|
690
690
|
return s.type !== b.Fragment && (i.ref = r ? vn(r, l) : l), b.cloneElement(s, i);
|
|
691
691
|
}
|
|
692
692
|
return b.Children.count(s) > 1 ? b.Children.only(null) : null;
|
|
693
693
|
});
|
|
694
694
|
return t.displayName = `${e}.SlotClone`, t;
|
|
695
695
|
}
|
|
696
|
-
var
|
|
697
|
-
function
|
|
698
|
-
return b.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
696
|
+
var ka = Symbol("radix.slottable");
|
|
697
|
+
function Na(e) {
|
|
698
|
+
return b.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ka;
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Sa(e, t) {
|
|
701
701
|
const n = { ...t };
|
|
702
702
|
for (const r in t) {
|
|
703
703
|
const s = e[r], o = t[r];
|
|
@@ -708,12 +708,12 @@ function ka(e, t) {
|
|
|
708
708
|
}
|
|
709
709
|
return { ...e, ...n };
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Ea(e) {
|
|
712
712
|
var r, s;
|
|
713
713
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
714
714
|
return n ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
715
715
|
}
|
|
716
|
-
var
|
|
716
|
+
var Ta = [
|
|
717
717
|
"a",
|
|
718
718
|
"button",
|
|
719
719
|
"div",
|
|
@@ -731,7 +731,7 @@ var Sa = [
|
|
|
731
731
|
"span",
|
|
732
732
|
"svg",
|
|
733
733
|
"ul"
|
|
734
|
-
], B =
|
|
734
|
+
], B = Ta.reduce((e, t) => {
|
|
735
735
|
const n = /* @__PURE__ */ $e(`Primitive.${t}`), r = b.forwardRef((s, o) => {
|
|
736
736
|
const { asChild: l, ...i } = s, u = l ? n : t;
|
|
737
737
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a(u, { ...i, ref: o });
|
|
@@ -739,7 +739,7 @@ var Sa = [
|
|
|
739
739
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
740
740
|
}, {});
|
|
741
741
|
function hn(e, t) {
|
|
742
|
-
e &&
|
|
742
|
+
e && on.flushSync(() => e.dispatchEvent(t));
|
|
743
743
|
}
|
|
744
744
|
function J(e) {
|
|
745
745
|
const t = b.useRef(e);
|
|
@@ -750,7 +750,7 @@ function J(e) {
|
|
|
750
750
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
751
751
|
}, []);
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function Ca(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
754
754
|
const n = J(e);
|
|
755
755
|
b.useEffect(() => {
|
|
756
756
|
const r = (s) => {
|
|
@@ -759,11 +759,11 @@ function Ea(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
759
759
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
760
760
|
}, [n, t]);
|
|
761
761
|
}
|
|
762
|
-
var
|
|
762
|
+
var Aa = "DismissableLayer", lt = "dismissableLayer.update", Pa = "dismissableLayer.pointerDownOutside", Da = "dismissableLayer.focusOutside", $t, mn = b.createContext({
|
|
763
763
|
layers: /* @__PURE__ */ new Set(),
|
|
764
764
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
765
765
|
branches: /* @__PURE__ */ new Set()
|
|
766
|
-
}),
|
|
766
|
+
}), gt = b.forwardRef(
|
|
767
767
|
(e, t) => {
|
|
768
768
|
const {
|
|
769
769
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -773,22 +773,22 @@ var Ta = "DismissableLayer", lt = "dismissableLayer.update", Ca = "dismissableLa
|
|
|
773
773
|
onInteractOutside: l,
|
|
774
774
|
onDismiss: i,
|
|
775
775
|
...u
|
|
776
|
-
} = e, c = b.useContext(mn), [d, p] = b.useState(null), x = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, k] = b.useState({}), E = K(t, (N) => p(N)), g = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = g.indexOf(m), h = d ? g.indexOf(d) : -1, v = c.layersWithOutsidePointerEventsDisabled.size > 0, f = h >= w, y =
|
|
776
|
+
} = e, c = b.useContext(mn), [d, p] = b.useState(null), x = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, k] = b.useState({}), E = K(t, (N) => p(N)), g = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = g.indexOf(m), h = d ? g.indexOf(d) : -1, v = c.layersWithOutsidePointerEventsDisabled.size > 0, f = h >= w, y = Fa((N) => {
|
|
777
777
|
const C = N.target, A = [...c.branches].some((P) => P.contains(C));
|
|
778
778
|
!f || A || (s == null || s(N), l == null || l(N), N.defaultPrevented || i == null || i());
|
|
779
|
-
}, x), _ =
|
|
779
|
+
}, x), _ = Ia((N) => {
|
|
780
780
|
const C = N.target;
|
|
781
781
|
[...c.branches].some((P) => P.contains(C)) || (o == null || o(N), l == null || l(N), N.defaultPrevented || i == null || i());
|
|
782
782
|
}, x);
|
|
783
|
-
return
|
|
783
|
+
return Ca((N) => {
|
|
784
784
|
h === c.layers.size - 1 && (r == null || r(N), !N.defaultPrevented && i && (N.preventDefault(), i()));
|
|
785
785
|
}, x), b.useEffect(() => {
|
|
786
786
|
if (d)
|
|
787
|
-
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
788
|
-
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (x.body.style.pointerEvents =
|
|
787
|
+
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && ($t = x.body.style.pointerEvents, x.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), Bt(), () => {
|
|
788
|
+
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (x.body.style.pointerEvents = $t);
|
|
789
789
|
};
|
|
790
790
|
}, [d, x, n, c]), b.useEffect(() => () => {
|
|
791
|
-
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
791
|
+
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Bt());
|
|
792
792
|
}, [d, c]), b.useEffect(() => {
|
|
793
793
|
const N = () => k({});
|
|
794
794
|
return document.addEventListener(lt, N), () => document.removeEventListener(lt, N);
|
|
@@ -811,8 +811,8 @@ var Ta = "DismissableLayer", lt = "dismissableLayer.update", Ca = "dismissableLa
|
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
813
|
);
|
|
814
|
-
|
|
815
|
-
var
|
|
814
|
+
gt.displayName = Aa;
|
|
815
|
+
var Ra = "DismissableLayerBranch", gn = b.forwardRef((e, t) => {
|
|
816
816
|
const n = b.useContext(mn), r = b.useRef(null), s = K(t, r);
|
|
817
817
|
return b.useEffect(() => {
|
|
818
818
|
const o = r.current;
|
|
@@ -822,8 +822,8 @@ var Pa = "DismissableLayerBranch", gn = b.forwardRef((e, t) => {
|
|
|
822
822
|
};
|
|
823
823
|
}, [n.branches]), /* @__PURE__ */ a(B.div, { ...e, ref: s });
|
|
824
824
|
});
|
|
825
|
-
gn.displayName =
|
|
826
|
-
function
|
|
825
|
+
gn.displayName = Ra;
|
|
826
|
+
function Fa(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
827
827
|
const n = J(e), r = b.useRef(!1), s = b.useRef(() => {
|
|
828
828
|
});
|
|
829
829
|
return b.useEffect(() => {
|
|
@@ -831,7 +831,7 @@ function Ra(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
831
831
|
if (i.target && !r.current) {
|
|
832
832
|
let u = function() {
|
|
833
833
|
bn(
|
|
834
|
-
|
|
834
|
+
Pa,
|
|
835
835
|
n,
|
|
836
836
|
c,
|
|
837
837
|
{ discrete: !0 }
|
|
@@ -853,11 +853,11 @@ function Ra(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
853
853
|
onPointerDownCapture: () => r.current = !0
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function Ia(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
857
857
|
const n = J(e), r = b.useRef(!1);
|
|
858
858
|
return b.useEffect(() => {
|
|
859
859
|
const s = (o) => {
|
|
860
|
-
o.target && !r.current && bn(
|
|
860
|
+
o.target && !r.current && bn(Da, n, { originalEvent: o }, {
|
|
861
861
|
discrete: !1
|
|
862
862
|
});
|
|
863
863
|
};
|
|
@@ -867,7 +867,7 @@ function Fa(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
867
867
|
onBlurCapture: () => r.current = !1
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Bt() {
|
|
871
871
|
const e = new CustomEvent(lt);
|
|
872
872
|
document.dispatchEvent(e);
|
|
873
873
|
}
|
|
@@ -875,7 +875,7 @@ function bn(e, t, n, { discrete: r }) {
|
|
|
875
875
|
const s = n.originalEvent.target, o = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
876
876
|
t && s.addEventListener(e, t, { once: !0 }), r ? hn(s, o) : s.dispatchEvent(o);
|
|
877
877
|
}
|
|
878
|
-
var
|
|
878
|
+
var La = gt, Ma = gn, Xe = "focusScope.autoFocusOnMount", Ze = "focusScope.autoFocusOnUnmount", zt = { bubbles: !1, cancelable: !0 }, Oa = "FocusScope", xn = b.forwardRef((e, t) => {
|
|
879
879
|
const {
|
|
880
880
|
loop: n = !1,
|
|
881
881
|
trapped: r = !1,
|
|
@@ -914,16 +914,16 @@ var Da = mt, Ia = gn, Xe = "focusScope.autoFocusOnMount", Ze = "focusScope.autoF
|
|
|
914
914
|
}
|
|
915
915
|
}, [r, i, k.paused]), b.useEffect(() => {
|
|
916
916
|
if (i) {
|
|
917
|
-
|
|
917
|
+
Wt.add(k);
|
|
918
918
|
const g = document.activeElement;
|
|
919
919
|
if (!i.contains(g)) {
|
|
920
|
-
const w = new CustomEvent(Xe,
|
|
921
|
-
i.addEventListener(Xe, c), i.dispatchEvent(w), w.defaultPrevented || (
|
|
920
|
+
const w = new CustomEvent(Xe, zt);
|
|
921
|
+
i.addEventListener(Xe, c), i.dispatchEvent(w), w.defaultPrevented || ($a(Ha(yn(i)), { select: !0 }), document.activeElement === g && ne(i));
|
|
922
922
|
}
|
|
923
923
|
return () => {
|
|
924
924
|
i.removeEventListener(Xe, c), setTimeout(() => {
|
|
925
|
-
const w = new CustomEvent(Ze,
|
|
926
|
-
i.addEventListener(Ze, d), i.dispatchEvent(w), w.defaultPrevented || ne(g ?? document.body, { select: !0 }), i.removeEventListener(Ze, d),
|
|
925
|
+
const w = new CustomEvent(Ze, zt);
|
|
926
|
+
i.addEventListener(Ze, d), i.dispatchEvent(w), w.defaultPrevented || ne(g ?? document.body, { select: !0 }), i.removeEventListener(Ze, d), Wt.remove(k);
|
|
927
927
|
}, 0);
|
|
928
928
|
};
|
|
929
929
|
}
|
|
@@ -933,7 +933,7 @@ var Da = mt, Ia = gn, Xe = "focusScope.autoFocusOnMount", Ze = "focusScope.autoF
|
|
|
933
933
|
if (!n && !r || k.paused) return;
|
|
934
934
|
const m = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, w = document.activeElement;
|
|
935
935
|
if (m && w) {
|
|
936
|
-
const h = g.currentTarget, [v, f] =
|
|
936
|
+
const h = g.currentTarget, [v, f] = Ba(h);
|
|
937
937
|
v && f ? !g.shiftKey && w === f ? (g.preventDefault(), n && ne(v, { select: !0 })) : g.shiftKey && w === v && (g.preventDefault(), n && ne(f, { select: !0 })) : w === h && g.preventDefault();
|
|
938
938
|
}
|
|
939
939
|
},
|
|
@@ -941,14 +941,14 @@ var Da = mt, Ia = gn, Xe = "focusScope.autoFocusOnMount", Ze = "focusScope.autoF
|
|
|
941
941
|
);
|
|
942
942
|
return /* @__PURE__ */ a(B.div, { tabIndex: -1, ...l, ref: x, onKeyDown: E });
|
|
943
943
|
});
|
|
944
|
-
xn.displayName =
|
|
945
|
-
function
|
|
944
|
+
xn.displayName = Oa;
|
|
945
|
+
function $a(e, { select: t = !1 } = {}) {
|
|
946
946
|
const n = document.activeElement;
|
|
947
947
|
for (const r of e)
|
|
948
948
|
if (ne(r, { select: t }), document.activeElement !== n) return;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
const t = yn(e), n =
|
|
950
|
+
function Ba(e) {
|
|
951
|
+
const t = yn(e), n = Ut(t, e), r = Ut(t.reverse(), e);
|
|
952
952
|
return [n, r];
|
|
953
953
|
}
|
|
954
954
|
function yn(e) {
|
|
@@ -961,11 +961,11 @@ function yn(e) {
|
|
|
961
961
|
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
962
962
|
return t;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function Ut(e, t) {
|
|
965
965
|
for (const n of e)
|
|
966
|
-
if (
|
|
966
|
+
if (!za(n, { upTo: t })) return n;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function za(e, { upTo: t }) {
|
|
969
969
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
970
970
|
for (; e; ) {
|
|
971
971
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -974,54 +974,54 @@ function $a(e, { upTo: t }) {
|
|
|
974
974
|
}
|
|
975
975
|
return !1;
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function Ua(e) {
|
|
978
978
|
return e instanceof HTMLInputElement && "select" in e;
|
|
979
979
|
}
|
|
980
980
|
function ne(e, { select: t = !1 } = {}) {
|
|
981
981
|
if (e && e.focus) {
|
|
982
982
|
const n = document.activeElement;
|
|
983
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
983
|
+
e.focus({ preventScroll: !0 }), e !== n && Ua(e) && t && e.select();
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
var
|
|
987
|
-
function
|
|
986
|
+
var Wt = Wa();
|
|
987
|
+
function Wa() {
|
|
988
988
|
let e = [];
|
|
989
989
|
return {
|
|
990
990
|
add(t) {
|
|
991
991
|
const n = e[0];
|
|
992
|
-
t !== n && (n == null || n.pause()), e =
|
|
992
|
+
t !== n && (n == null || n.pause()), e = Ht(e, t), e.unshift(t);
|
|
993
993
|
},
|
|
994
994
|
remove(t) {
|
|
995
995
|
var n;
|
|
996
|
-
e =
|
|
996
|
+
e = Ht(e, t), (n = e[0]) == null || n.resume();
|
|
997
997
|
}
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function Ht(e, t) {
|
|
1001
1001
|
const n = [...e], r = n.indexOf(t);
|
|
1002
1002
|
return r !== -1 && n.splice(r, 1), n;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Ha(e) {
|
|
1005
1005
|
return e.filter((t) => t.tagName !== "A");
|
|
1006
1006
|
}
|
|
1007
|
-
var
|
|
1007
|
+
var Ga = "Portal", bt = b.forwardRef((e, t) => {
|
|
1008
1008
|
var i;
|
|
1009
1009
|
const { container: n, ...r } = e, [s, o] = b.useState(!1);
|
|
1010
1010
|
se(() => o(!0), []);
|
|
1011
1011
|
const l = n || s && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
1012
|
-
return l ?
|
|
1012
|
+
return l ? Or.createPortal(/* @__PURE__ */ a(B.div, { ...r, ref: t }), l) : null;
|
|
1013
1013
|
});
|
|
1014
|
-
|
|
1015
|
-
function
|
|
1014
|
+
bt.displayName = Ga;
|
|
1015
|
+
function ja(e, t) {
|
|
1016
1016
|
return b.useReducer((n, r) => t[n][r] ?? n, e);
|
|
1017
1017
|
}
|
|
1018
1018
|
var me = (e) => {
|
|
1019
|
-
const { present: t, children: n } = e, r =
|
|
1019
|
+
const { present: t, children: n } = e, r = Ka(t), s = typeof n == "function" ? n({ present: r.isPresent }) : b.Children.only(n), o = K(r.ref, Va(s));
|
|
1020
1020
|
return typeof n == "function" || r.isPresent ? b.cloneElement(s, { ref: o }) : null;
|
|
1021
1021
|
};
|
|
1022
1022
|
me.displayName = "Presence";
|
|
1023
|
-
function
|
|
1024
|
-
const [t, n] = b.useState(), r = b.useRef(null), s = b.useRef(e), o = b.useRef("none"), l = e ? "mounted" : "unmounted", [i, u] =
|
|
1023
|
+
function Ka(e) {
|
|
1024
|
+
const [t, n] = b.useState(), r = b.useRef(null), s = b.useRef(e), o = b.useRef("none"), l = e ? "mounted" : "unmounted", [i, u] = ja(l, {
|
|
1025
1025
|
mounted: {
|
|
1026
1026
|
UNMOUNT: "unmounted",
|
|
1027
1027
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -1072,21 +1072,21 @@ function Ga(e) {
|
|
|
1072
1072
|
function Ce(e) {
|
|
1073
1073
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Va(e) {
|
|
1076
1076
|
var r, s;
|
|
1077
1077
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1078
1078
|
return n ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1079
1079
|
}
|
|
1080
1080
|
var Qe = 0;
|
|
1081
|
-
function
|
|
1081
|
+
function Ya() {
|
|
1082
1082
|
b.useEffect(() => {
|
|
1083
1083
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1084
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
1084
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Gt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Gt()), Qe++, () => {
|
|
1085
1085
|
Qe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Qe--;
|
|
1086
1086
|
};
|
|
1087
1087
|
}, []);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Gt() {
|
|
1090
1090
|
const e = document.createElement("span");
|
|
1091
1091
|
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;
|
|
1092
1092
|
}
|
|
@@ -1107,17 +1107,17 @@ function _n(e, t) {
|
|
|
1107
1107
|
t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
|
|
1108
1108
|
return n;
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1110
|
+
function qa(e, t, n) {
|
|
1111
1111
|
if (n || arguments.length === 2) for (var r = 0, s = t.length, o; r < s; r++)
|
|
1112
1112
|
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
1113
1113
|
return e.concat(o || Array.prototype.slice.call(t));
|
|
1114
1114
|
}
|
|
1115
|
-
var Me = "right-scroll-bar-position", Oe = "width-before-scroll-bar",
|
|
1115
|
+
var Me = "right-scroll-bar-position", Oe = "width-before-scroll-bar", Xa = "with-scroll-bars-hidden", Za = "--removed-body-scroll-bar-size";
|
|
1116
1116
|
function Je(e, t) {
|
|
1117
1117
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
var n =
|
|
1119
|
+
function Qa(e, t) {
|
|
1120
|
+
var n = F(function() {
|
|
1121
1121
|
return {
|
|
1122
1122
|
// value
|
|
1123
1123
|
value: e,
|
|
@@ -1137,15 +1137,15 @@ function Xa(e, t) {
|
|
|
1137
1137
|
})[0];
|
|
1138
1138
|
return n.callback = t, n.facade;
|
|
1139
1139
|
}
|
|
1140
|
-
var
|
|
1141
|
-
function
|
|
1142
|
-
var n =
|
|
1140
|
+
var Ja = typeof window < "u" ? b.useLayoutEffect : b.useEffect, jt = /* @__PURE__ */ new WeakMap();
|
|
1141
|
+
function es(e, t) {
|
|
1142
|
+
var n = Qa(null, function(r) {
|
|
1143
1143
|
return e.forEach(function(s) {
|
|
1144
1144
|
return Je(s, r);
|
|
1145
1145
|
});
|
|
1146
1146
|
});
|
|
1147
|
-
return
|
|
1148
|
-
var r =
|
|
1147
|
+
return Ja(function() {
|
|
1148
|
+
var r = jt.get(n);
|
|
1149
1149
|
if (r) {
|
|
1150
1150
|
var s = new Set(r), o = new Set(e), l = n.current;
|
|
1151
1151
|
s.forEach(function(i) {
|
|
@@ -1154,14 +1154,14 @@ function Qa(e, t) {
|
|
|
1154
1154
|
s.has(i) || Je(i, l);
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
|
|
1157
|
+
jt.set(n, e);
|
|
1158
1158
|
}, [e]), n;
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function ts(e) {
|
|
1161
1161
|
return e;
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1164
|
-
t === void 0 && (t =
|
|
1163
|
+
function ns(e, t) {
|
|
1164
|
+
t === void 0 && (t = ts);
|
|
1165
1165
|
var n = [], r = !1, s = {
|
|
1166
1166
|
read: function() {
|
|
1167
1167
|
if (r)
|
|
@@ -1215,9 +1215,9 @@ function es(e, t) {
|
|
|
1215
1215
|
};
|
|
1216
1216
|
return s;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function rs(e) {
|
|
1219
1219
|
e === void 0 && (e = {});
|
|
1220
|
-
var t =
|
|
1220
|
+
var t = ns(null);
|
|
1221
1221
|
return t.options = Q({ async: !0, ssr: !1 }, e), t;
|
|
1222
1222
|
}
|
|
1223
1223
|
var wn = function(e) {
|
|
@@ -1230,16 +1230,16 @@ var wn = function(e) {
|
|
|
1230
1230
|
return b.createElement(r, Q({}, n));
|
|
1231
1231
|
};
|
|
1232
1232
|
wn.isSideCarExport = !0;
|
|
1233
|
-
function
|
|
1233
|
+
function as(e, t) {
|
|
1234
1234
|
return e.useMedium(t), wn;
|
|
1235
1235
|
}
|
|
1236
|
-
var kn =
|
|
1236
|
+
var kn = rs(), et = function() {
|
|
1237
1237
|
}, We = b.forwardRef(function(e, t) {
|
|
1238
1238
|
var n = b.useRef(null), r = b.useState({
|
|
1239
1239
|
onScrollCapture: et,
|
|
1240
1240
|
onWheelCapture: et,
|
|
1241
1241
|
onTouchMoveCapture: et
|
|
1242
|
-
}), s = r[0], o = r[1], l = e.forwardProps, i = e.children, u = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, x = e.sideCar, k = e.noRelative, E = e.noIsolation, g = e.inert, m = e.allowPinchZoom, w = e.as, h = w === void 0 ? "div" : w, v = e.gapMode, f = _n(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = x, _ =
|
|
1242
|
+
}), s = r[0], o = r[1], l = e.forwardProps, i = e.children, u = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, x = e.sideCar, k = e.noRelative, E = e.noIsolation, g = e.inert, m = e.allowPinchZoom, w = e.as, h = w === void 0 ? "div" : w, v = e.gapMode, f = _n(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), y = x, _ = es([n, t]), N = Q(Q({}, f), s);
|
|
1243
1243
|
return b.createElement(
|
|
1244
1244
|
b.Fragment,
|
|
1245
1245
|
null,
|
|
@@ -1256,37 +1256,37 @@ We.classNames = {
|
|
|
1256
1256
|
fullWidth: Oe,
|
|
1257
1257
|
zeroRight: Me
|
|
1258
1258
|
};
|
|
1259
|
-
var
|
|
1259
|
+
var ss = function() {
|
|
1260
1260
|
if (typeof __webpack_nonce__ < "u")
|
|
1261
1261
|
return __webpack_nonce__;
|
|
1262
1262
|
};
|
|
1263
|
-
function
|
|
1263
|
+
function os() {
|
|
1264
1264
|
if (!document)
|
|
1265
1265
|
return null;
|
|
1266
1266
|
var e = document.createElement("style");
|
|
1267
1267
|
e.type = "text/css";
|
|
1268
|
-
var t =
|
|
1268
|
+
var t = ss();
|
|
1269
1269
|
return t && e.setAttribute("nonce", t), e;
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function is(e, t) {
|
|
1272
1272
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function ls(e) {
|
|
1275
1275
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1276
1276
|
t.appendChild(e);
|
|
1277
1277
|
}
|
|
1278
|
-
var
|
|
1278
|
+
var cs = function() {
|
|
1279
1279
|
var e = 0, t = null;
|
|
1280
1280
|
return {
|
|
1281
1281
|
add: function(n) {
|
|
1282
|
-
e == 0 && (t =
|
|
1282
|
+
e == 0 && (t = os()) && (is(t, n), ls(t)), e++;
|
|
1283
1283
|
},
|
|
1284
1284
|
remove: function() {
|
|
1285
1285
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1286
1286
|
}
|
|
1287
1287
|
};
|
|
1288
|
-
},
|
|
1289
|
-
var e =
|
|
1288
|
+
}, us = function() {
|
|
1289
|
+
var e = cs();
|
|
1290
1290
|
return function(t, n) {
|
|
1291
1291
|
b.useEffect(function() {
|
|
1292
1292
|
return e.add(t), function() {
|
|
@@ -1295,35 +1295,35 @@ var is = function() {
|
|
|
1295
1295
|
}, [t && n]);
|
|
1296
1296
|
};
|
|
1297
1297
|
}, Nn = function() {
|
|
1298
|
-
var e =
|
|
1298
|
+
var e = us(), t = function(n) {
|
|
1299
1299
|
var r = n.styles, s = n.dynamic;
|
|
1300
1300
|
return e(r, s), null;
|
|
1301
1301
|
};
|
|
1302
1302
|
return t;
|
|
1303
|
-
},
|
|
1303
|
+
}, ds = {
|
|
1304
1304
|
left: 0,
|
|
1305
1305
|
top: 0,
|
|
1306
1306
|
right: 0,
|
|
1307
1307
|
gap: 0
|
|
1308
1308
|
}, tt = function(e) {
|
|
1309
1309
|
return parseInt(e || "", 10) || 0;
|
|
1310
|
-
},
|
|
1310
|
+
}, ps = function(e) {
|
|
1311
1311
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], s = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1312
1312
|
return [tt(n), tt(r), tt(s)];
|
|
1313
|
-
},
|
|
1313
|
+
}, fs = function(e) {
|
|
1314
1314
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1315
|
-
return
|
|
1316
|
-
var t =
|
|
1315
|
+
return ds;
|
|
1316
|
+
var t = ps(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1317
1317
|
return {
|
|
1318
1318
|
left: t[0],
|
|
1319
1319
|
top: t[1],
|
|
1320
1320
|
right: t[2],
|
|
1321
1321
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1322
1322
|
};
|
|
1323
|
-
},
|
|
1323
|
+
}, vs = Nn(), pe = "data-scroll-locked", hs = function(e, t, n, r) {
|
|
1324
1324
|
var s = e.left, o = e.top, l = e.right, i = e.gap;
|
|
1325
1325
|
return n === void 0 && (n = "margin"), `
|
|
1326
|
-
.`.concat(
|
|
1326
|
+
.`.concat(Xa, ` {
|
|
1327
1327
|
overflow: hidden `).concat(r, `;
|
|
1328
1328
|
padding-right: `).concat(i, "px ").concat(r, `;
|
|
1329
1329
|
}
|
|
@@ -1361,26 +1361,26 @@ var is = function() {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
|
|
1363
1363
|
body[`).concat(pe, `] {
|
|
1364
|
-
`).concat(
|
|
1364
|
+
`).concat(Za, ": ").concat(i, `px;
|
|
1365
1365
|
}
|
|
1366
1366
|
`);
|
|
1367
|
-
},
|
|
1367
|
+
}, Kt = function() {
|
|
1368
1368
|
var e = parseInt(document.body.getAttribute(pe) || "0", 10);
|
|
1369
1369
|
return isFinite(e) ? e : 0;
|
|
1370
|
-
},
|
|
1370
|
+
}, ms = function() {
|
|
1371
1371
|
b.useEffect(function() {
|
|
1372
|
-
return document.body.setAttribute(pe, (
|
|
1373
|
-
var e =
|
|
1372
|
+
return document.body.setAttribute(pe, (Kt() + 1).toString()), function() {
|
|
1373
|
+
var e = Kt() - 1;
|
|
1374
1374
|
e <= 0 ? document.body.removeAttribute(pe) : document.body.setAttribute(pe, e.toString());
|
|
1375
1375
|
};
|
|
1376
1376
|
}, []);
|
|
1377
|
-
},
|
|
1377
|
+
}, gs = function(e) {
|
|
1378
1378
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, s = r === void 0 ? "margin" : r;
|
|
1379
|
-
|
|
1379
|
+
ms();
|
|
1380
1380
|
var o = b.useMemo(function() {
|
|
1381
|
-
return
|
|
1381
|
+
return fs(s);
|
|
1382
1382
|
}, [s]);
|
|
1383
|
-
return b.createElement(
|
|
1383
|
+
return b.createElement(vs, { styles: hs(o, !t, s, n ? "" : "!important") });
|
|
1384
1384
|
}, ct = !1;
|
|
1385
1385
|
if (typeof window < "u")
|
|
1386
1386
|
try {
|
|
@@ -1393,7 +1393,7 @@ if (typeof window < "u")
|
|
|
1393
1393
|
} catch {
|
|
1394
1394
|
ct = !1;
|
|
1395
1395
|
}
|
|
1396
|
-
var ce = ct ? { passive: !1 } : !1,
|
|
1396
|
+
var ce = ct ? { passive: !1 } : !1, bs = function(e) {
|
|
1397
1397
|
return e.tagName === "TEXTAREA";
|
|
1398
1398
|
}, Sn = function(e, t) {
|
|
1399
1399
|
if (!(e instanceof Element))
|
|
@@ -1402,13 +1402,13 @@ var ce = ct ? { passive: !1 } : !1, ms = function(e) {
|
|
|
1402
1402
|
return (
|
|
1403
1403
|
// not-not-scrollable
|
|
1404
1404
|
n[t] !== "hidden" && // contains scroll inside self
|
|
1405
|
-
!(n.overflowY === n.overflowX && !
|
|
1405
|
+
!(n.overflowY === n.overflowX && !bs(e) && n[t] === "visible")
|
|
1406
1406
|
);
|
|
1407
|
-
},
|
|
1407
|
+
}, xs = function(e) {
|
|
1408
1408
|
return Sn(e, "overflowY");
|
|
1409
|
-
},
|
|
1409
|
+
}, ys = function(e) {
|
|
1410
1410
|
return Sn(e, "overflowX");
|
|
1411
|
-
},
|
|
1411
|
+
}, Vt = function(e, t) {
|
|
1412
1412
|
var n = t.ownerDocument, r = t;
|
|
1413
1413
|
do {
|
|
1414
1414
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
@@ -1421,14 +1421,14 @@ var ce = ct ? { passive: !1 } : !1, ms = function(e) {
|
|
|
1421
1421
|
r = r.parentNode;
|
|
1422
1422
|
} while (r && r !== n.body);
|
|
1423
1423
|
return !1;
|
|
1424
|
-
},
|
|
1424
|
+
}, _s = function(e) {
|
|
1425
1425
|
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
1426
1426
|
return [
|
|
1427
1427
|
t,
|
|
1428
1428
|
n,
|
|
1429
1429
|
r
|
|
1430
1430
|
];
|
|
1431
|
-
},
|
|
1431
|
+
}, ws = function(e) {
|
|
1432
1432
|
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
1433
1433
|
return [
|
|
1434
1434
|
t,
|
|
@@ -1436,13 +1436,13 @@ var ce = ct ? { passive: !1 } : !1, ms = function(e) {
|
|
|
1436
1436
|
r
|
|
1437
1437
|
];
|
|
1438
1438
|
}, En = function(e, t) {
|
|
1439
|
-
return e === "v" ? gs(t) : bs(t);
|
|
1440
|
-
}, Tn = function(e, t) {
|
|
1441
1439
|
return e === "v" ? xs(t) : ys(t);
|
|
1442
|
-
},
|
|
1440
|
+
}, Tn = function(e, t) {
|
|
1441
|
+
return e === "v" ? _s(t) : ws(t);
|
|
1442
|
+
}, ks = function(e, t) {
|
|
1443
1443
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1444
|
-
},
|
|
1445
|
-
var o =
|
|
1444
|
+
}, Ns = function(e, t, n, r, s) {
|
|
1445
|
+
var o = ks(e, window.getComputedStyle(t).direction), l = o * r, i = n.target, u = t.contains(i), c = !1, d = l > 0, p = 0, x = 0;
|
|
1446
1446
|
do {
|
|
1447
1447
|
if (!i)
|
|
1448
1448
|
break;
|
|
@@ -1458,26 +1458,26 @@ var ce = ct ? { passive: !1 } : !1, ms = function(e) {
|
|
|
1458
1458
|
return (d && Math.abs(p) < 1 || !d && Math.abs(x) < 1) && (c = !0), c;
|
|
1459
1459
|
}, Pe = function(e) {
|
|
1460
1460
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1461
|
-
}, Vt = function(e) {
|
|
1462
|
-
return [e.deltaX, e.deltaY];
|
|
1463
1461
|
}, Yt = function(e) {
|
|
1462
|
+
return [e.deltaX, e.deltaY];
|
|
1463
|
+
}, qt = function(e) {
|
|
1464
1464
|
return e && "current" in e ? e.current : e;
|
|
1465
|
-
},
|
|
1465
|
+
}, Ss = function(e, t) {
|
|
1466
1466
|
return e[0] === t[0] && e[1] === t[1];
|
|
1467
|
-
},
|
|
1467
|
+
}, Es = function(e) {
|
|
1468
1468
|
return `
|
|
1469
1469
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1470
1470
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1471
1471
|
`);
|
|
1472
|
-
},
|
|
1473
|
-
function
|
|
1474
|
-
var t = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), s = b.useState(
|
|
1472
|
+
}, Ts = 0, ue = [];
|
|
1473
|
+
function Cs(e) {
|
|
1474
|
+
var t = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), s = b.useState(Ts++)[0], o = b.useState(Nn)[0], l = b.useRef(e);
|
|
1475
1475
|
b.useEffect(function() {
|
|
1476
1476
|
l.current = e;
|
|
1477
1477
|
}, [e]), b.useEffect(function() {
|
|
1478
1478
|
if (e.inert) {
|
|
1479
1479
|
document.body.classList.add("block-interactivity-".concat(s));
|
|
1480
|
-
var g =
|
|
1480
|
+
var g = qa([e.lockRef.current], (e.shards || []).map(qt), !0).filter(Boolean);
|
|
1481
1481
|
return g.forEach(function(m) {
|
|
1482
1482
|
return m.classList.add("allow-interactivity-".concat(s));
|
|
1483
1483
|
}), function() {
|
|
@@ -1496,34 +1496,34 @@ function Es(e) {
|
|
|
1496
1496
|
var C = window.getSelection(), A = C && C.anchorNode, P = A ? A === _ || A.contains(_) : !1;
|
|
1497
1497
|
if (P)
|
|
1498
1498
|
return !1;
|
|
1499
|
-
var
|
|
1500
|
-
if (!
|
|
1499
|
+
var R = Vt(N, _);
|
|
1500
|
+
if (!R)
|
|
1501
1501
|
return !0;
|
|
1502
|
-
if (
|
|
1502
|
+
if (R ? y = N : (y = N === "v" ? "h" : "v", R = Vt(N, _)), !R)
|
|
1503
1503
|
return !1;
|
|
1504
1504
|
if (!r.current && "changedTouches" in g && (v || f) && (r.current = y), !y)
|
|
1505
1505
|
return !0;
|
|
1506
|
-
var
|
|
1507
|
-
return
|
|
1506
|
+
var D = r.current || y;
|
|
1507
|
+
return Ns(D, m, g, D === "h" ? v : f);
|
|
1508
1508
|
}, []), u = b.useCallback(function(g) {
|
|
1509
1509
|
var m = g;
|
|
1510
1510
|
if (!(!ue.length || ue[ue.length - 1] !== o)) {
|
|
1511
|
-
var w = "deltaY" in m ?
|
|
1512
|
-
return y.name === m.type && (y.target === m.target || m.target === y.shadowParent) &&
|
|
1511
|
+
var w = "deltaY" in m ? Yt(m) : Pe(m), h = t.current.filter(function(y) {
|
|
1512
|
+
return y.name === m.type && (y.target === m.target || m.target === y.shadowParent) && Ss(y.delta, w);
|
|
1513
1513
|
})[0];
|
|
1514
1514
|
if (h && h.should) {
|
|
1515
1515
|
m.cancelable && m.preventDefault();
|
|
1516
1516
|
return;
|
|
1517
1517
|
}
|
|
1518
1518
|
if (!h) {
|
|
1519
|
-
var v = (l.current.shards || []).map(
|
|
1519
|
+
var v = (l.current.shards || []).map(qt).filter(Boolean).filter(function(y) {
|
|
1520
1520
|
return y.contains(m.target);
|
|
1521
1521
|
}), f = v.length > 0 ? i(m, v[0]) : !l.current.noIsolation;
|
|
1522
1522
|
f && m.cancelable && m.preventDefault();
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
}, []), c = b.useCallback(function(g, m, w, h) {
|
|
1526
|
-
var v = { name: g, delta: m, target: w, should: h, shadowParent:
|
|
1526
|
+
var v = { name: g, delta: m, target: w, should: h, shadowParent: As(w) };
|
|
1527
1527
|
t.current.push(v), setTimeout(function() {
|
|
1528
1528
|
t.current = t.current.filter(function(f) {
|
|
1529
1529
|
return f !== v;
|
|
@@ -1532,7 +1532,7 @@ function Es(e) {
|
|
|
1532
1532
|
}, []), d = b.useCallback(function(g) {
|
|
1533
1533
|
n.current = Pe(g), r.current = void 0;
|
|
1534
1534
|
}, []), p = b.useCallback(function(g) {
|
|
1535
|
-
c(g.type,
|
|
1535
|
+
c(g.type, Yt(g), g.target, i(g, e.lockRef.current));
|
|
1536
1536
|
}, []), x = b.useCallback(function(g) {
|
|
1537
1537
|
c(g.type, Pe(g), g.target, i(g, e.lockRef.current));
|
|
1538
1538
|
}, []);
|
|
@@ -1551,28 +1551,28 @@ function Es(e) {
|
|
|
1551
1551
|
return b.createElement(
|
|
1552
1552
|
b.Fragment,
|
|
1553
1553
|
null,
|
|
1554
|
-
E ? b.createElement(o, { styles:
|
|
1555
|
-
k ? b.createElement(
|
|
1554
|
+
E ? b.createElement(o, { styles: Es(s) }) : null,
|
|
1555
|
+
k ? b.createElement(gs, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1556
1556
|
);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function As(e) {
|
|
1559
1559
|
for (var t = null; e !== null; )
|
|
1560
1560
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1561
1561
|
return t;
|
|
1562
1562
|
}
|
|
1563
|
-
const
|
|
1563
|
+
const Ps = as(kn, Cs);
|
|
1564
1564
|
var Cn = b.forwardRef(function(e, t) {
|
|
1565
|
-
return b.createElement(We, Q({}, e, { ref: t, sideCar:
|
|
1565
|
+
return b.createElement(We, Q({}, e, { ref: t, sideCar: Ps }));
|
|
1566
1566
|
});
|
|
1567
1567
|
Cn.classNames = We.classNames;
|
|
1568
|
-
var
|
|
1568
|
+
var Ds = function(e) {
|
|
1569
1569
|
if (typeof document > "u")
|
|
1570
1570
|
return null;
|
|
1571
1571
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1572
1572
|
return t.ownerDocument.body;
|
|
1573
|
-
}, de = /* @__PURE__ */ new WeakMap(),
|
|
1573
|
+
}, de = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Re = {}, nt = 0, An = function(e) {
|
|
1574
1574
|
return e && (e.host || An(e.parentNode));
|
|
1575
|
-
},
|
|
1575
|
+
}, Rs = function(e, t) {
|
|
1576
1576
|
return t.map(function(n) {
|
|
1577
1577
|
if (e.contains(n))
|
|
1578
1578
|
return n;
|
|
@@ -1581,10 +1581,10 @@ var As = function(e) {
|
|
|
1581
1581
|
}).filter(function(n) {
|
|
1582
1582
|
return !!n;
|
|
1583
1583
|
});
|
|
1584
|
-
},
|
|
1585
|
-
var s =
|
|
1586
|
-
|
|
1587
|
-
var o =
|
|
1584
|
+
}, Fs = function(e, t, n, r) {
|
|
1585
|
+
var s = Rs(t, Array.isArray(e) ? e : [e]);
|
|
1586
|
+
Re[n] || (Re[n] = /* @__PURE__ */ new WeakMap());
|
|
1587
|
+
var o = Re[n], l = [], i = /* @__PURE__ */ new Set(), u = new Set(s), c = function(p) {
|
|
1588
1588
|
!p || i.has(p) || (i.add(p), c(p.parentNode));
|
|
1589
1589
|
};
|
|
1590
1590
|
s.forEach(c);
|
|
@@ -1595,7 +1595,7 @@ var As = function(e) {
|
|
|
1595
1595
|
else
|
|
1596
1596
|
try {
|
|
1597
1597
|
var k = x.getAttribute(r), E = k !== null && k !== "false", g = (de.get(x) || 0) + 1, m = (o.get(x) || 0) + 1;
|
|
1598
|
-
de.set(x, g), o.set(x, m), l.push(x), g === 1 && E &&
|
|
1598
|
+
de.set(x, g), o.set(x, m), l.push(x), g === 1 && E && De.set(x, !0), m === 1 && x.setAttribute(n, "true"), E || x.setAttribute(r, "true");
|
|
1599
1599
|
} catch (w) {
|
|
1600
1600
|
console.error("aria-hidden: cannot operate on ", x, w);
|
|
1601
1601
|
}
|
|
@@ -1604,16 +1604,16 @@ var As = function(e) {
|
|
|
1604
1604
|
return d(t), i.clear(), nt++, function() {
|
|
1605
1605
|
l.forEach(function(p) {
|
|
1606
1606
|
var x = de.get(p) - 1, k = o.get(p) - 1;
|
|
1607
|
-
de.set(p, x), o.set(p, k), x || (
|
|
1608
|
-
}), nt--, nt || (de = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(),
|
|
1607
|
+
de.set(p, x), o.set(p, k), x || (De.has(p) || p.removeAttribute(r), De.delete(p)), k || p.removeAttribute(n);
|
|
1608
|
+
}), nt--, nt || (de = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Re = {});
|
|
1609
1609
|
};
|
|
1610
|
-
},
|
|
1610
|
+
}, Is = function(e, t, n) {
|
|
1611
1611
|
n === void 0 && (n = "data-aria-hidden");
|
|
1612
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), s =
|
|
1613
|
-
return s ? (r.push.apply(r, Array.from(s.querySelectorAll("[aria-live], script"))),
|
|
1612
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), s = Ds(e);
|
|
1613
|
+
return s ? (r.push.apply(r, Array.from(s.querySelectorAll("[aria-live], script"))), Fs(r, s, n, "aria-hidden")) : function() {
|
|
1614
1614
|
return null;
|
|
1615
1615
|
};
|
|
1616
|
-
}, He = "Dialog", [Pn] = he(He), [
|
|
1616
|
+
}, He = "Dialog", [Pn] = he(He), [Ls, Z] = Pn(He), Dn = (e) => {
|
|
1617
1617
|
const {
|
|
1618
1618
|
__scopeDialog: t,
|
|
1619
1619
|
children: n,
|
|
@@ -1628,7 +1628,7 @@ var As = function(e) {
|
|
|
1628
1628
|
caller: He
|
|
1629
1629
|
});
|
|
1630
1630
|
return /* @__PURE__ */ a(
|
|
1631
|
-
|
|
1631
|
+
Ls,
|
|
1632
1632
|
{
|
|
1633
1633
|
scope: t,
|
|
1634
1634
|
triggerRef: i,
|
|
@@ -1644,10 +1644,10 @@ var As = function(e) {
|
|
|
1644
1644
|
}
|
|
1645
1645
|
);
|
|
1646
1646
|
};
|
|
1647
|
-
|
|
1648
|
-
var
|
|
1647
|
+
Dn.displayName = He;
|
|
1648
|
+
var Rn = "DialogTrigger", Fn = b.forwardRef(
|
|
1649
1649
|
(e, t) => {
|
|
1650
|
-
const { __scopeDialog: n, ...r } = e, s = Z(
|
|
1650
|
+
const { __scopeDialog: n, ...r } = e, s = Z(Rn, n), o = K(t, s.triggerRef);
|
|
1651
1651
|
return /* @__PURE__ */ a(
|
|
1652
1652
|
B.button,
|
|
1653
1653
|
{
|
|
@@ -1655,7 +1655,7 @@ var Fn = "DialogTrigger", Dn = b.forwardRef(
|
|
|
1655
1655
|
"aria-haspopup": "dialog",
|
|
1656
1656
|
"aria-expanded": s.open,
|
|
1657
1657
|
"aria-controls": s.contentId,
|
|
1658
|
-
"data-state":
|
|
1658
|
+
"data-state": _t(s.open),
|
|
1659
1659
|
...r,
|
|
1660
1660
|
ref: o,
|
|
1661
1661
|
onClick: M(e.onClick, s.onOpenToggle)
|
|
@@ -1663,31 +1663,31 @@ var Fn = "DialogTrigger", Dn = b.forwardRef(
|
|
|
1663
1663
|
);
|
|
1664
1664
|
}
|
|
1665
1665
|
);
|
|
1666
|
-
|
|
1667
|
-
var
|
|
1666
|
+
Fn.displayName = Rn;
|
|
1667
|
+
var xt = "DialogPortal", [Ms, In] = Pn(xt, {
|
|
1668
1668
|
forceMount: void 0
|
|
1669
1669
|
}), Ln = (e) => {
|
|
1670
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: s } = e, o = Z(
|
|
1671
|
-
return /* @__PURE__ */ a(
|
|
1670
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: s } = e, o = Z(xt, t);
|
|
1671
|
+
return /* @__PURE__ */ a(Ms, { scope: t, forceMount: n, children: b.Children.map(r, (l) => /* @__PURE__ */ a(me, { present: n || o.open, children: /* @__PURE__ */ a(bt, { asChild: !0, container: s, children: l }) })) });
|
|
1672
1672
|
};
|
|
1673
|
-
Ln.displayName =
|
|
1673
|
+
Ln.displayName = xt;
|
|
1674
1674
|
var Be = "DialogOverlay", Mn = b.forwardRef(
|
|
1675
1675
|
(e, t) => {
|
|
1676
1676
|
const n = In(Be, e.__scopeDialog), { forceMount: r = n.forceMount, ...s } = e, o = Z(Be, e.__scopeDialog);
|
|
1677
|
-
return o.modal ? /* @__PURE__ */ a(me, { present: r || o.open, children: /* @__PURE__ */ a(
|
|
1677
|
+
return o.modal ? /* @__PURE__ */ a(me, { present: r || o.open, children: /* @__PURE__ */ a($s, { ...s, ref: t }) }) : null;
|
|
1678
1678
|
}
|
|
1679
1679
|
);
|
|
1680
1680
|
Mn.displayName = Be;
|
|
1681
|
-
var
|
|
1681
|
+
var Os = /* @__PURE__ */ $e("DialogOverlay.RemoveScroll"), $s = b.forwardRef(
|
|
1682
1682
|
(e, t) => {
|
|
1683
1683
|
const { __scopeDialog: n, ...r } = e, s = Z(Be, n);
|
|
1684
1684
|
return (
|
|
1685
1685
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1686
1686
|
// ie. when `Overlay` and `Content` are siblings
|
|
1687
|
-
/* @__PURE__ */ a(Cn, { as:
|
|
1687
|
+
/* @__PURE__ */ a(Cn, { as: Os, allowPinchZoom: !0, shards: [s.contentRef], children: /* @__PURE__ */ a(
|
|
1688
1688
|
B.div,
|
|
1689
1689
|
{
|
|
1690
|
-
"data-state":
|
|
1690
|
+
"data-state": _t(s.open),
|
|
1691
1691
|
...r,
|
|
1692
1692
|
ref: t,
|
|
1693
1693
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -1698,16 +1698,16 @@ var Ls = /* @__PURE__ */ $e("DialogOverlay.RemoveScroll"), Ms = b.forwardRef(
|
|
|
1698
1698
|
), oe = "DialogContent", On = b.forwardRef(
|
|
1699
1699
|
(e, t) => {
|
|
1700
1700
|
const n = In(oe, e.__scopeDialog), { forceMount: r = n.forceMount, ...s } = e, o = Z(oe, e.__scopeDialog);
|
|
1701
|
-
return /* @__PURE__ */ a(me, { present: r || o.open, children: o.modal ? /* @__PURE__ */ a(
|
|
1701
|
+
return /* @__PURE__ */ a(me, { present: r || o.open, children: o.modal ? /* @__PURE__ */ a(Bs, { ...s, ref: t }) : /* @__PURE__ */ a(zs, { ...s, ref: t }) });
|
|
1702
1702
|
}
|
|
1703
1703
|
);
|
|
1704
1704
|
On.displayName = oe;
|
|
1705
|
-
var
|
|
1705
|
+
var Bs = b.forwardRef(
|
|
1706
1706
|
(e, t) => {
|
|
1707
1707
|
const n = Z(oe, e.__scopeDialog), r = b.useRef(null), s = K(t, n.contentRef, r);
|
|
1708
1708
|
return b.useEffect(() => {
|
|
1709
1709
|
const o = r.current;
|
|
1710
|
-
if (o) return
|
|
1710
|
+
if (o) return Is(o);
|
|
1711
1711
|
}, []), /* @__PURE__ */ a(
|
|
1712
1712
|
$n,
|
|
1713
1713
|
{
|
|
@@ -1730,7 +1730,7 @@ var Os = b.forwardRef(
|
|
|
1730
1730
|
}
|
|
1731
1731
|
);
|
|
1732
1732
|
}
|
|
1733
|
-
),
|
|
1733
|
+
), zs = b.forwardRef(
|
|
1734
1734
|
(e, t) => {
|
|
1735
1735
|
const n = Z(oe, e.__scopeDialog), r = b.useRef(!1), s = b.useRef(!1);
|
|
1736
1736
|
return /* @__PURE__ */ a(
|
|
@@ -1756,7 +1756,7 @@ var Os = b.forwardRef(
|
|
|
1756
1756
|
), $n = b.forwardRef(
|
|
1757
1757
|
(e, t) => {
|
|
1758
1758
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: s, onCloseAutoFocus: o, ...l } = e, i = Z(oe, n), u = b.useRef(null), c = K(t, u);
|
|
1759
|
-
return
|
|
1759
|
+
return Ya(), /* @__PURE__ */ S(q, { children: [
|
|
1760
1760
|
/* @__PURE__ */ a(
|
|
1761
1761
|
xn,
|
|
1762
1762
|
{
|
|
@@ -1766,13 +1766,13 @@ var Os = b.forwardRef(
|
|
|
1766
1766
|
onMountAutoFocus: s,
|
|
1767
1767
|
onUnmountAutoFocus: o,
|
|
1768
1768
|
children: /* @__PURE__ */ a(
|
|
1769
|
-
|
|
1769
|
+
gt,
|
|
1770
1770
|
{
|
|
1771
1771
|
role: "dialog",
|
|
1772
1772
|
id: i.contentId,
|
|
1773
1773
|
"aria-describedby": i.descriptionId,
|
|
1774
1774
|
"aria-labelledby": i.titleId,
|
|
1775
|
-
"data-state":
|
|
1775
|
+
"data-state": _t(i.open),
|
|
1776
1776
|
...l,
|
|
1777
1777
|
ref: c,
|
|
1778
1778
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -1781,18 +1781,18 @@ var Os = b.forwardRef(
|
|
|
1781
1781
|
}
|
|
1782
1782
|
),
|
|
1783
1783
|
/* @__PURE__ */ S(q, { children: [
|
|
1784
|
-
/* @__PURE__ */ a(
|
|
1785
|
-
/* @__PURE__ */ a(
|
|
1784
|
+
/* @__PURE__ */ a(Us, { titleId: i.titleId }),
|
|
1785
|
+
/* @__PURE__ */ a(Hs, { contentRef: u, descriptionId: i.descriptionId })
|
|
1786
1786
|
] })
|
|
1787
1787
|
] });
|
|
1788
1788
|
}
|
|
1789
|
-
),
|
|
1789
|
+
), yt = "DialogTitle", Bn = b.forwardRef(
|
|
1790
1790
|
(e, t) => {
|
|
1791
|
-
const { __scopeDialog: n, ...r } = e, s = Z(
|
|
1791
|
+
const { __scopeDialog: n, ...r } = e, s = Z(yt, n);
|
|
1792
1792
|
return /* @__PURE__ */ a(B.h2, { id: s.titleId, ...r, ref: t });
|
|
1793
1793
|
}
|
|
1794
1794
|
);
|
|
1795
|
-
Bn.displayName =
|
|
1795
|
+
Bn.displayName = yt;
|
|
1796
1796
|
var zn = "DialogDescription", Un = b.forwardRef(
|
|
1797
1797
|
(e, t) => {
|
|
1798
1798
|
const { __scopeDialog: n, ...r } = e, s = Z(zn, n);
|
|
@@ -1815,14 +1815,14 @@ var Wn = "DialogClose", Hn = b.forwardRef(
|
|
|
1815
1815
|
}
|
|
1816
1816
|
);
|
|
1817
1817
|
Hn.displayName = Wn;
|
|
1818
|
-
function
|
|
1818
|
+
function _t(e) {
|
|
1819
1819
|
return e ? "open" : "closed";
|
|
1820
1820
|
}
|
|
1821
|
-
var Gn = "DialogTitleWarning", [
|
|
1821
|
+
var Gn = "DialogTitleWarning", [Ai, jn] = ha(Gn, {
|
|
1822
1822
|
contentName: oe,
|
|
1823
|
-
titleName:
|
|
1823
|
+
titleName: yt,
|
|
1824
1824
|
docsSlug: "dialog"
|
|
1825
|
-
}),
|
|
1825
|
+
}), Us = ({ titleId: e }) => {
|
|
1826
1826
|
const t = jn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1827
1827
|
|
|
1828
1828
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -1831,15 +1831,46 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1831
1831
|
return b.useEffect(() => {
|
|
1832
1832
|
e && (document.getElementById(e) || console.error(n));
|
|
1833
1833
|
}, [n, e]), null;
|
|
1834
|
-
},
|
|
1835
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jn(
|
|
1834
|
+
}, Ws = "DialogDescriptionWarning", Hs = ({ contentRef: e, descriptionId: t }) => {
|
|
1835
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jn(Ws).contentName}}.`;
|
|
1836
1836
|
return b.useEffect(() => {
|
|
1837
1837
|
var o;
|
|
1838
1838
|
const s = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
1839
1839
|
t && s && (document.getElementById(t) || console.warn(r));
|
|
1840
1840
|
}, [r, e, t]), null;
|
|
1841
|
-
},
|
|
1842
|
-
function
|
|
1841
|
+
}, wt = Dn, kt = Fn, Nt = Ln, St = Mn, Et = On, Tt = Bn, Ct = Un, ze = Hn;
|
|
1842
|
+
function Kn() {
|
|
1843
|
+
return vt().isPhone;
|
|
1844
|
+
}
|
|
1845
|
+
function Vn({
|
|
1846
|
+
trigger: e,
|
|
1847
|
+
title: t,
|
|
1848
|
+
description: n,
|
|
1849
|
+
side: r = "right",
|
|
1850
|
+
children: s,
|
|
1851
|
+
footer: o,
|
|
1852
|
+
className: l,
|
|
1853
|
+
...i
|
|
1854
|
+
}) {
|
|
1855
|
+
return /* @__PURE__ */ S(wt, { ...i, children: [
|
|
1856
|
+
e ? /* @__PURE__ */ a(kt, { asChild: !0, children: e }) : null,
|
|
1857
|
+
/* @__PURE__ */ S(Nt, { children: [
|
|
1858
|
+
/* @__PURE__ */ a(St, { className: "vx-sheet__overlay" }),
|
|
1859
|
+
/* @__PURE__ */ S(Et, { className: T("vx-sheet", `vx-sheet--${r}`, l), children: [
|
|
1860
|
+
/* @__PURE__ */ S("div", { className: "vx-sheet__header", children: [
|
|
1861
|
+
/* @__PURE__ */ S("div", { children: [
|
|
1862
|
+
t ? /* @__PURE__ */ a(Tt, { className: "vx-sheet__title", children: t }) : null,
|
|
1863
|
+
n ? /* @__PURE__ */ a(Ct, { className: "vx-sheet__description", children: n }) : null
|
|
1864
|
+
] }),
|
|
1865
|
+
/* @__PURE__ */ a(ze, { className: "vx-dialog__close", "aria-label": "Close", children: /* @__PURE__ */ a(ve, { size: 16 }) })
|
|
1866
|
+
] }),
|
|
1867
|
+
/* @__PURE__ */ a("div", { className: "vx-sheet__body", children: s }),
|
|
1868
|
+
o ? /* @__PURE__ */ a("div", { className: "vx-sheet__footer", children: o }) : null
|
|
1869
|
+
] })
|
|
1870
|
+
] })
|
|
1871
|
+
] });
|
|
1872
|
+
}
|
|
1873
|
+
function Pi({
|
|
1843
1874
|
trigger: e,
|
|
1844
1875
|
title: t,
|
|
1845
1876
|
description: n,
|
|
@@ -1848,15 +1879,27 @@ function Ci({
|
|
|
1848
1879
|
className: o,
|
|
1849
1880
|
...l
|
|
1850
1881
|
}) {
|
|
1851
|
-
return /* @__PURE__ */
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1882
|
+
return Kn() ? /* @__PURE__ */ a(
|
|
1883
|
+
Vn,
|
|
1884
|
+
{
|
|
1885
|
+
trigger: e,
|
|
1886
|
+
title: t,
|
|
1887
|
+
description: n,
|
|
1888
|
+
side: "bottom",
|
|
1889
|
+
footer: s,
|
|
1890
|
+
className: T("vx-dialog--mobile-sheet", o),
|
|
1891
|
+
...l,
|
|
1892
|
+
children: r
|
|
1893
|
+
}
|
|
1894
|
+
) : /* @__PURE__ */ S(wt, { ...l, children: [
|
|
1895
|
+
/* @__PURE__ */ a(kt, { asChild: !0, children: e }),
|
|
1896
|
+
/* @__PURE__ */ S(Nt, { children: [
|
|
1897
|
+
/* @__PURE__ */ a(St, { className: "vx-dialog__overlay" }),
|
|
1898
|
+
/* @__PURE__ */ S(Et, { className: T("vx-dialog__content", o), children: [
|
|
1856
1899
|
/* @__PURE__ */ S("div", { className: "vx-dialog__header", children: [
|
|
1857
1900
|
/* @__PURE__ */ S("div", { children: [
|
|
1858
|
-
/* @__PURE__ */ a(
|
|
1859
|
-
n ? /* @__PURE__ */ a(
|
|
1901
|
+
/* @__PURE__ */ a(Tt, { className: "vx-dialog__title", children: t }),
|
|
1902
|
+
n ? /* @__PURE__ */ a(Ct, { className: "vx-dialog__description", children: n }) : null
|
|
1860
1903
|
] }),
|
|
1861
1904
|
/* @__PURE__ */ a(ze, { className: "vx-dialog__close", "aria-label": "Close dialog", children: /* @__PURE__ */ a(ve, { size: 16 }) })
|
|
1862
1905
|
] }),
|
|
@@ -1866,7 +1909,7 @@ function Ci({
|
|
|
1866
1909
|
] })
|
|
1867
1910
|
] });
|
|
1868
1911
|
}
|
|
1869
|
-
function
|
|
1912
|
+
function Di({ className: e, label: t, hint: n, prefix: r, suffix: s, error: o, ...l }) {
|
|
1870
1913
|
return /* @__PURE__ */ S("label", { className: "vx-field-group", children: [
|
|
1871
1914
|
t ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: t }) : null,
|
|
1872
1915
|
/* @__PURE__ */ S("span", { className: T("vx-input", o && "vx-input--invalid", e), children: [
|
|
@@ -1878,11 +1921,11 @@ function Ai({ className: e, label: t, hint: n, prefix: r, suffix: s, error: o, .
|
|
|
1878
1921
|
!o && n ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: n }) : null
|
|
1879
1922
|
] });
|
|
1880
1923
|
}
|
|
1881
|
-
function
|
|
1924
|
+
function Gs(e) {
|
|
1882
1925
|
const t = b.useRef({ value: e, previous: e });
|
|
1883
1926
|
return b.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
1884
1927
|
}
|
|
1885
|
-
function
|
|
1928
|
+
function js(e) {
|
|
1886
1929
|
const [t, n] = b.useState(void 0);
|
|
1887
1930
|
return se(() => {
|
|
1888
1931
|
if (e) {
|
|
@@ -1904,7 +1947,7 @@ function Hs(e) {
|
|
|
1904
1947
|
n(void 0);
|
|
1905
1948
|
}, [e]), t;
|
|
1906
1949
|
}
|
|
1907
|
-
var Ge = "Switch", [
|
|
1950
|
+
var Ge = "Switch", [Ks] = he(Ge), [Vs, Ys] = Ks(Ge), Yn = b.forwardRef(
|
|
1908
1951
|
(e, t) => {
|
|
1909
1952
|
const {
|
|
1910
1953
|
__scopeSwitch: n,
|
|
@@ -1923,7 +1966,7 @@ var Ge = "Switch", [Gs] = he(Ge), [js, Ks] = Gs(Ge), Kn = b.forwardRef(
|
|
|
1923
1966
|
onChange: c,
|
|
1924
1967
|
caller: Ge
|
|
1925
1968
|
});
|
|
1926
|
-
return /* @__PURE__ */ S(
|
|
1969
|
+
return /* @__PURE__ */ S(Vs, { scope: n, checked: w, disabled: i, children: [
|
|
1927
1970
|
/* @__PURE__ */ a(
|
|
1928
1971
|
B.button,
|
|
1929
1972
|
{
|
|
@@ -1931,7 +1974,7 @@ var Ge = "Switch", [Gs] = he(Ge), [js, Ks] = Gs(Ge), Kn = b.forwardRef(
|
|
|
1931
1974
|
role: "switch",
|
|
1932
1975
|
"aria-checked": w,
|
|
1933
1976
|
"aria-required": l,
|
|
1934
|
-
"data-state":
|
|
1977
|
+
"data-state": Qn(w),
|
|
1935
1978
|
"data-disabled": i ? "" : void 0,
|
|
1936
1979
|
disabled: i,
|
|
1937
1980
|
value: u,
|
|
@@ -1943,7 +1986,7 @@ var Ge = "Switch", [Gs] = he(Ge), [js, Ks] = Gs(Ge), Kn = b.forwardRef(
|
|
|
1943
1986
|
}
|
|
1944
1987
|
),
|
|
1945
1988
|
m && /* @__PURE__ */ a(
|
|
1946
|
-
|
|
1989
|
+
Zn,
|
|
1947
1990
|
{
|
|
1948
1991
|
control: x,
|
|
1949
1992
|
bubbles: !g.current,
|
|
@@ -1959,14 +2002,14 @@ var Ge = "Switch", [Gs] = he(Ge), [js, Ks] = Gs(Ge), Kn = b.forwardRef(
|
|
|
1959
2002
|
] });
|
|
1960
2003
|
}
|
|
1961
2004
|
);
|
|
1962
|
-
|
|
1963
|
-
var
|
|
2005
|
+
Yn.displayName = Ge;
|
|
2006
|
+
var qn = "SwitchThumb", Xn = b.forwardRef(
|
|
1964
2007
|
(e, t) => {
|
|
1965
|
-
const { __scopeSwitch: n, ...r } = e, s =
|
|
2008
|
+
const { __scopeSwitch: n, ...r } = e, s = Ys(qn, n);
|
|
1966
2009
|
return /* @__PURE__ */ a(
|
|
1967
2010
|
B.span,
|
|
1968
2011
|
{
|
|
1969
|
-
"data-state":
|
|
2012
|
+
"data-state": Qn(s.checked),
|
|
1970
2013
|
"data-disabled": s.disabled ? "" : void 0,
|
|
1971
2014
|
...r,
|
|
1972
2015
|
ref: t
|
|
@@ -1974,8 +2017,8 @@ var Vn = "SwitchThumb", Yn = b.forwardRef(
|
|
|
1974
2017
|
);
|
|
1975
2018
|
}
|
|
1976
2019
|
);
|
|
1977
|
-
|
|
1978
|
-
var
|
|
2020
|
+
Xn.displayName = qn;
|
|
2021
|
+
var qs = "SwitchBubbleInput", Zn = b.forwardRef(
|
|
1979
2022
|
({
|
|
1980
2023
|
__scopeSwitch: e,
|
|
1981
2024
|
control: t,
|
|
@@ -1983,7 +2026,7 @@ var Vs = "SwitchBubbleInput", qn = b.forwardRef(
|
|
|
1983
2026
|
bubbles: r = !0,
|
|
1984
2027
|
...s
|
|
1985
2028
|
}, o) => {
|
|
1986
|
-
const l = b.useRef(null), i = K(l, o), u =
|
|
2029
|
+
const l = b.useRef(null), i = K(l, o), u = Gs(n), c = js(t);
|
|
1987
2030
|
return b.useEffect(() => {
|
|
1988
2031
|
const d = l.current;
|
|
1989
2032
|
if (!d) return;
|
|
@@ -2016,21 +2059,21 @@ var Vs = "SwitchBubbleInput", qn = b.forwardRef(
|
|
|
2016
2059
|
);
|
|
2017
2060
|
}
|
|
2018
2061
|
);
|
|
2019
|
-
|
|
2020
|
-
function
|
|
2062
|
+
Zn.displayName = qs;
|
|
2063
|
+
function Qn(e) {
|
|
2021
2064
|
return e ? "checked" : "unchecked";
|
|
2022
2065
|
}
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2066
|
+
var Xs = Yn, Zs = Xn;
|
|
2067
|
+
function Ri({ className: e, label: t, description: n, ...r }) {
|
|
2025
2068
|
return /* @__PURE__ */ S("label", { className: "vx-switch", children: [
|
|
2026
2069
|
/* @__PURE__ */ S("span", { className: "vx-switch__copy", children: [
|
|
2027
2070
|
/* @__PURE__ */ a("span", { className: "vx-switch__label", children: t }),
|
|
2028
2071
|
n ? /* @__PURE__ */ a("span", { className: "vx-switch__description", children: n }) : null
|
|
2029
2072
|
] }),
|
|
2030
|
-
/* @__PURE__ */ a(
|
|
2073
|
+
/* @__PURE__ */ a(Xs, { className: T("vx-switch__control", e), ...r, children: /* @__PURE__ */ a(Zs, { className: "vx-switch__thumb" }) })
|
|
2031
2074
|
] });
|
|
2032
2075
|
}
|
|
2033
|
-
function
|
|
2076
|
+
function Jn(e) {
|
|
2034
2077
|
const t = e + "CollectionProvider", [n, r] = he(t), [s, o] = n(
|
|
2035
2078
|
t,
|
|
2036
2079
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -2070,19 +2113,19 @@ function Zn(e) {
|
|
|
2070
2113
|
r
|
|
2071
2114
|
];
|
|
2072
2115
|
}
|
|
2073
|
-
var
|
|
2074
|
-
function
|
|
2075
|
-
const t = b.useContext(
|
|
2116
|
+
var Qs = b.createContext(void 0);
|
|
2117
|
+
function er(e) {
|
|
2118
|
+
const t = b.useContext(Qs);
|
|
2076
2119
|
return e || t || "ltr";
|
|
2077
2120
|
}
|
|
2078
|
-
var rt = "rovingFocusGroup.onEntryFocus",
|
|
2121
|
+
var rt = "rovingFocusGroup.onEntryFocus", Js = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [ut, tr, eo] = Jn(ke), [to, nr] = he(
|
|
2079
2122
|
ke,
|
|
2080
|
-
[
|
|
2081
|
-
), [
|
|
2082
|
-
(e, t) => /* @__PURE__ */ a(ut.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a(ut.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a(
|
|
2123
|
+
[eo]
|
|
2124
|
+
), [no, ro] = to(ke), rr = b.forwardRef(
|
|
2125
|
+
(e, t) => /* @__PURE__ */ a(ut.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a(ut.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ a(ao, { ...e, ref: t }) }) })
|
|
2083
2126
|
);
|
|
2084
|
-
|
|
2085
|
-
var
|
|
2127
|
+
rr.displayName = ke;
|
|
2128
|
+
var ao = b.forwardRef((e, t) => {
|
|
2086
2129
|
const {
|
|
2087
2130
|
__scopeRovingFocusGroup: n,
|
|
2088
2131
|
orientation: r,
|
|
@@ -2094,18 +2137,18 @@ var no = b.forwardRef((e, t) => {
|
|
|
2094
2137
|
onEntryFocus: c,
|
|
2095
2138
|
preventScrollOnEntryFocus: d = !1,
|
|
2096
2139
|
...p
|
|
2097
|
-
} = e, x = b.useRef(null), k = K(t, x), E =
|
|
2140
|
+
} = e, x = b.useRef(null), k = K(t, x), E = er(o), [g, m] = we({
|
|
2098
2141
|
prop: l,
|
|
2099
2142
|
defaultProp: i ?? null,
|
|
2100
2143
|
onChange: u,
|
|
2101
2144
|
caller: ke
|
|
2102
|
-
}), [w, h] = b.useState(!1), v = J(c), f =
|
|
2145
|
+
}), [w, h] = b.useState(!1), v = J(c), f = tr(n), y = b.useRef(!1), [_, N] = b.useState(0);
|
|
2103
2146
|
return b.useEffect(() => {
|
|
2104
2147
|
const C = x.current;
|
|
2105
2148
|
if (C)
|
|
2106
2149
|
return C.addEventListener(rt, v), () => C.removeEventListener(rt, v);
|
|
2107
2150
|
}, [v]), /* @__PURE__ */ a(
|
|
2108
|
-
|
|
2151
|
+
no,
|
|
2109
2152
|
{
|
|
2110
2153
|
scope: n,
|
|
2111
2154
|
orientation: r,
|
|
@@ -2139,12 +2182,12 @@ var no = b.forwardRef((e, t) => {
|
|
|
2139
2182
|
onFocus: M(e.onFocus, (C) => {
|
|
2140
2183
|
const A = !y.current;
|
|
2141
2184
|
if (C.target === C.currentTarget && A && !w) {
|
|
2142
|
-
const P = new CustomEvent(rt,
|
|
2185
|
+
const P = new CustomEvent(rt, Js);
|
|
2143
2186
|
if (C.currentTarget.dispatchEvent(P), !P.defaultPrevented) {
|
|
2144
|
-
const
|
|
2187
|
+
const R = f().filter((H) => H.focusable), D = R.find((H) => H.active), $ = R.find((H) => H.id === g), W = [D, $, ...R].filter(
|
|
2145
2188
|
Boolean
|
|
2146
2189
|
).map((H) => H.ref.current);
|
|
2147
|
-
|
|
2190
|
+
or(W, d);
|
|
2148
2191
|
}
|
|
2149
2192
|
}
|
|
2150
2193
|
y.current = !1;
|
|
@@ -2154,7 +2197,7 @@ var no = b.forwardRef((e, t) => {
|
|
|
2154
2197
|
)
|
|
2155
2198
|
}
|
|
2156
2199
|
);
|
|
2157
|
-
}),
|
|
2200
|
+
}), ar = "RovingFocusGroupItem", sr = b.forwardRef(
|
|
2158
2201
|
(e, t) => {
|
|
2159
2202
|
const {
|
|
2160
2203
|
__scopeRovingFocusGroup: n,
|
|
@@ -2163,7 +2206,7 @@ var no = b.forwardRef((e, t) => {
|
|
|
2163
2206
|
tabStopId: o,
|
|
2164
2207
|
children: l,
|
|
2165
2208
|
...i
|
|
2166
|
-
} = e, u = xe(), c = o || u, d =
|
|
2209
|
+
} = e, u = xe(), c = o || u, d = ro(ar, n), p = d.currentTabStopId === c, x = tr(n), { onFocusableItemAdd: k, onFocusableItemRemove: E, currentTabStopId: g } = d;
|
|
2167
2210
|
return b.useEffect(() => {
|
|
2168
2211
|
if (r)
|
|
2169
2212
|
return k(), () => E();
|
|
@@ -2191,7 +2234,7 @@ var no = b.forwardRef((e, t) => {
|
|
|
2191
2234
|
return;
|
|
2192
2235
|
}
|
|
2193
2236
|
if (m.target !== m.currentTarget) return;
|
|
2194
|
-
const w =
|
|
2237
|
+
const w = io(m, d.orientation, d.dir);
|
|
2195
2238
|
if (w !== void 0) {
|
|
2196
2239
|
if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
|
|
2197
2240
|
m.preventDefault();
|
|
@@ -2200,9 +2243,9 @@ var no = b.forwardRef((e, t) => {
|
|
|
2200
2243
|
else if (w === "prev" || w === "next") {
|
|
2201
2244
|
w === "prev" && v.reverse();
|
|
2202
2245
|
const f = v.indexOf(m.currentTarget);
|
|
2203
|
-
v = d.loop ?
|
|
2246
|
+
v = d.loop ? lo(v, f + 1) : v.slice(f + 1);
|
|
2204
2247
|
}
|
|
2205
|
-
setTimeout(() =>
|
|
2248
|
+
setTimeout(() => or(v));
|
|
2206
2249
|
}
|
|
2207
2250
|
}),
|
|
2208
2251
|
children: typeof l == "function" ? l({ isCurrentTabStop: p, hasTabStop: g != null }) : l
|
|
@@ -2212,8 +2255,8 @@ var no = b.forwardRef((e, t) => {
|
|
|
2212
2255
|
);
|
|
2213
2256
|
}
|
|
2214
2257
|
);
|
|
2215
|
-
|
|
2216
|
-
var
|
|
2258
|
+
sr.displayName = ar;
|
|
2259
|
+
var so = {
|
|
2217
2260
|
ArrowLeft: "prev",
|
|
2218
2261
|
ArrowUp: "prev",
|
|
2219
2262
|
ArrowRight: "next",
|
|
@@ -2223,25 +2266,25 @@ var ro = {
|
|
|
2223
2266
|
PageDown: "last",
|
|
2224
2267
|
End: "last"
|
|
2225
2268
|
};
|
|
2226
|
-
function
|
|
2269
|
+
function oo(e, t) {
|
|
2227
2270
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
2228
2271
|
}
|
|
2229
|
-
function
|
|
2230
|
-
const r =
|
|
2272
|
+
function io(e, t, n) {
|
|
2273
|
+
const r = oo(e.key, n);
|
|
2231
2274
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
2232
|
-
return
|
|
2275
|
+
return so[r];
|
|
2233
2276
|
}
|
|
2234
|
-
function
|
|
2277
|
+
function or(e, t = !1) {
|
|
2235
2278
|
const n = document.activeElement;
|
|
2236
2279
|
for (const r of e)
|
|
2237
2280
|
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
2238
2281
|
}
|
|
2239
|
-
function
|
|
2282
|
+
function lo(e, t) {
|
|
2240
2283
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2241
2284
|
}
|
|
2242
|
-
var
|
|
2243
|
-
|
|
2244
|
-
]),
|
|
2285
|
+
var co = rr, uo = sr, je = "Tabs", [po] = he(je, [
|
|
2286
|
+
nr
|
|
2287
|
+
]), ir = nr(), [fo, At] = po(je), lr = b.forwardRef(
|
|
2245
2288
|
(e, t) => {
|
|
2246
2289
|
const {
|
|
2247
2290
|
__scopeTabs: n,
|
|
@@ -2252,14 +2295,14 @@ var io = tr, lo = rr, je = "Tabs", [co] = he(je, [
|
|
|
2252
2295
|
dir: i,
|
|
2253
2296
|
activationMode: u = "automatic",
|
|
2254
2297
|
...c
|
|
2255
|
-
} = e, d =
|
|
2298
|
+
} = e, d = er(i), [p, x] = we({
|
|
2256
2299
|
prop: r,
|
|
2257
2300
|
onChange: s,
|
|
2258
2301
|
defaultProp: o ?? "",
|
|
2259
2302
|
caller: je
|
|
2260
2303
|
});
|
|
2261
2304
|
return /* @__PURE__ */ a(
|
|
2262
|
-
|
|
2305
|
+
fo,
|
|
2263
2306
|
{
|
|
2264
2307
|
scope: n,
|
|
2265
2308
|
baseId: xe(),
|
|
@@ -2281,12 +2324,12 @@ var io = tr, lo = rr, je = "Tabs", [co] = he(je, [
|
|
|
2281
2324
|
);
|
|
2282
2325
|
}
|
|
2283
2326
|
);
|
|
2284
|
-
|
|
2285
|
-
var
|
|
2327
|
+
lr.displayName = je;
|
|
2328
|
+
var cr = "TabsList", ur = b.forwardRef(
|
|
2286
2329
|
(e, t) => {
|
|
2287
|
-
const { __scopeTabs: n, loop: r = !0, ...s } = e, o =
|
|
2330
|
+
const { __scopeTabs: n, loop: r = !0, ...s } = e, o = At(cr, n), l = ir(n);
|
|
2288
2331
|
return /* @__PURE__ */ a(
|
|
2289
|
-
|
|
2332
|
+
co,
|
|
2290
2333
|
{
|
|
2291
2334
|
asChild: !0,
|
|
2292
2335
|
...l,
|
|
@@ -2306,12 +2349,12 @@ var ir = "TabsList", lr = b.forwardRef(
|
|
|
2306
2349
|
);
|
|
2307
2350
|
}
|
|
2308
2351
|
);
|
|
2309
|
-
|
|
2310
|
-
var
|
|
2352
|
+
ur.displayName = cr;
|
|
2353
|
+
var dr = "TabsTrigger", pr = b.forwardRef(
|
|
2311
2354
|
(e, t) => {
|
|
2312
|
-
const { __scopeTabs: n, value: r, disabled: s = !1, ...o } = e, l =
|
|
2355
|
+
const { __scopeTabs: n, value: r, disabled: s = !1, ...o } = e, l = At(dr, n), i = ir(n), u = hr(l.baseId, r), c = mr(l.baseId, r), d = r === l.value;
|
|
2313
2356
|
return /* @__PURE__ */ a(
|
|
2314
|
-
|
|
2357
|
+
uo,
|
|
2315
2358
|
{
|
|
2316
2359
|
asChild: !0,
|
|
2317
2360
|
...i,
|
|
@@ -2346,10 +2389,10 @@ var cr = "TabsTrigger", ur = b.forwardRef(
|
|
|
2346
2389
|
);
|
|
2347
2390
|
}
|
|
2348
2391
|
);
|
|
2349
|
-
|
|
2350
|
-
var
|
|
2392
|
+
pr.displayName = dr;
|
|
2393
|
+
var fr = "TabsContent", vr = b.forwardRef(
|
|
2351
2394
|
(e, t) => {
|
|
2352
|
-
const { __scopeTabs: n, value: r, forceMount: s, children: o, ...l } = e, i =
|
|
2395
|
+
const { __scopeTabs: n, value: r, forceMount: s, children: o, ...l } = e, i = At(fr, n), u = hr(i.baseId, r), c = mr(i.baseId, r), d = r === i.value, p = b.useRef(d);
|
|
2353
2396
|
return b.useEffect(() => {
|
|
2354
2397
|
const x = requestAnimationFrame(() => p.current = !1);
|
|
2355
2398
|
return () => cancelAnimationFrame(x);
|
|
@@ -2374,21 +2417,21 @@ var dr = "TabsContent", pr = b.forwardRef(
|
|
|
2374
2417
|
) });
|
|
2375
2418
|
}
|
|
2376
2419
|
);
|
|
2377
|
-
|
|
2378
|
-
function
|
|
2420
|
+
vr.displayName = fr;
|
|
2421
|
+
function hr(e, t) {
|
|
2379
2422
|
return `${e}-trigger-${t}`;
|
|
2380
2423
|
}
|
|
2381
|
-
function
|
|
2424
|
+
function mr(e, t) {
|
|
2382
2425
|
return `${e}-content-${t}`;
|
|
2383
2426
|
}
|
|
2384
|
-
var
|
|
2385
|
-
const
|
|
2386
|
-
return /* @__PURE__ */ a(
|
|
2387
|
-
}),
|
|
2388
|
-
return /* @__PURE__ */ a(
|
|
2389
|
-
}),
|
|
2390
|
-
return /* @__PURE__ */ a(
|
|
2391
|
-
}),
|
|
2427
|
+
var vo = lr, ho = ur, mo = pr, go = vr;
|
|
2428
|
+
const Fi = vo, Ii = re(function({ className: t, ...n }, r) {
|
|
2429
|
+
return /* @__PURE__ */ a(ho, { ref: r, className: T("vx-tabs__list", t), ...n });
|
|
2430
|
+
}), Li = re(function({ className: t, ...n }, r) {
|
|
2431
|
+
return /* @__PURE__ */ a(mo, { ref: r, className: T("vx-tabs__trigger", t), ...n });
|
|
2432
|
+
}), Mi = re(function({ className: t, ...n }, r) {
|
|
2433
|
+
return /* @__PURE__ */ a(go, { ref: r, className: T("vx-tabs__content", t), ...n });
|
|
2434
|
+
}), gr = {
|
|
2392
2435
|
light: {
|
|
2393
2436
|
label: "Light",
|
|
2394
2437
|
mode: "light"
|
|
@@ -2405,8 +2448,8 @@ function Y(e, t = {}) {
|
|
|
2405
2448
|
tokens: t.tokens
|
|
2406
2449
|
};
|
|
2407
2450
|
}
|
|
2408
|
-
const
|
|
2409
|
-
...
|
|
2451
|
+
const Oi = {
|
|
2452
|
+
...gr,
|
|
2410
2453
|
sunset: Y("light", {
|
|
2411
2454
|
label: "Sunset",
|
|
2412
2455
|
tokens: {
|
|
@@ -2714,13 +2757,13 @@ const Li = {
|
|
|
2714
2757
|
}
|
|
2715
2758
|
})
|
|
2716
2759
|
};
|
|
2717
|
-
function
|
|
2760
|
+
function bo(e) {
|
|
2718
2761
|
return {
|
|
2719
|
-
...
|
|
2762
|
+
...gr,
|
|
2720
2763
|
...e
|
|
2721
2764
|
};
|
|
2722
2765
|
}
|
|
2723
|
-
function
|
|
2766
|
+
function xo(e, t) {
|
|
2724
2767
|
if (e && t[e])
|
|
2725
2768
|
return e;
|
|
2726
2769
|
if (t.light)
|
|
@@ -2728,25 +2771,25 @@ function go(e, t) {
|
|
|
2728
2771
|
const [n] = Object.keys(t);
|
|
2729
2772
|
return n ?? "light";
|
|
2730
2773
|
}
|
|
2731
|
-
function
|
|
2774
|
+
function yo(e, t) {
|
|
2732
2775
|
const n = window.localStorage.getItem(e);
|
|
2733
2776
|
return n && t[n] ? n : null;
|
|
2734
2777
|
}
|
|
2735
|
-
function
|
|
2778
|
+
function _o(e, t, n) {
|
|
2736
2779
|
var s;
|
|
2737
2780
|
if (((s = e[n]) == null ? void 0 : s.mode) === t)
|
|
2738
2781
|
return n;
|
|
2739
2782
|
const r = Object.entries(e).find(([, o]) => o.mode === t);
|
|
2740
2783
|
return r == null ? void 0 : r[0];
|
|
2741
2784
|
}
|
|
2742
|
-
const
|
|
2743
|
-
function
|
|
2785
|
+
const br = _e(null);
|
|
2786
|
+
function $i({
|
|
2744
2787
|
children: e,
|
|
2745
2788
|
defaultTheme: t = "light",
|
|
2746
2789
|
storageKey: n = "vxui-react-theme",
|
|
2747
2790
|
themes: r
|
|
2748
2791
|
}) {
|
|
2749
|
-
const s = be(() =>
|
|
2792
|
+
const s = be(() => bo(r), [r]), o = be(() => xo(t, s), [t, s]), l = L([]), [i, u] = F(() => typeof window > "u" ? o : yo(n, s) ?? o), c = s[i] ? i : o, d = s[c];
|
|
2750
2793
|
O(() => {
|
|
2751
2794
|
i !== c && u(c);
|
|
2752
2795
|
}, [c, i]), O(() => {
|
|
@@ -2772,21 +2815,21 @@ function Mi({
|
|
|
2772
2815
|
toggleTheme: () => {
|
|
2773
2816
|
u((x) => {
|
|
2774
2817
|
const E = (s[x] ?? d).mode === "light" ? "dark" : "light";
|
|
2775
|
-
return
|
|
2818
|
+
return _o(s, E, E) ?? x;
|
|
2776
2819
|
});
|
|
2777
2820
|
}
|
|
2778
2821
|
}),
|
|
2779
2822
|
[d, o, s, c]
|
|
2780
2823
|
);
|
|
2781
|
-
return /* @__PURE__ */ a(
|
|
2824
|
+
return /* @__PURE__ */ a(br.Provider, { value: p, children: e });
|
|
2782
2825
|
}
|
|
2783
|
-
function
|
|
2784
|
-
const e = ye(
|
|
2826
|
+
function Bi() {
|
|
2827
|
+
const e = ye(br);
|
|
2785
2828
|
if (!e)
|
|
2786
2829
|
throw new Error("useTheme must be used within ThemeProvider.");
|
|
2787
2830
|
return e;
|
|
2788
2831
|
}
|
|
2789
|
-
var
|
|
2832
|
+
var wo = Object.freeze({
|
|
2790
2833
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
2791
2834
|
position: "absolute",
|
|
2792
2835
|
border: 0,
|
|
@@ -2798,18 +2841,18 @@ var yo = Object.freeze({
|
|
|
2798
2841
|
clip: "rect(0, 0, 0, 0)",
|
|
2799
2842
|
whiteSpace: "nowrap",
|
|
2800
2843
|
wordWrap: "normal"
|
|
2801
|
-
}),
|
|
2844
|
+
}), ko = "VisuallyHidden", Pt = b.forwardRef(
|
|
2802
2845
|
(e, t) => /* @__PURE__ */ a(
|
|
2803
2846
|
B.span,
|
|
2804
2847
|
{
|
|
2805
2848
|
...e,
|
|
2806
2849
|
ref: t,
|
|
2807
|
-
style: { ...
|
|
2850
|
+
style: { ...wo, ...e.style }
|
|
2808
2851
|
}
|
|
2809
2852
|
)
|
|
2810
2853
|
);
|
|
2811
|
-
|
|
2812
|
-
var
|
|
2854
|
+
Pt.displayName = ko;
|
|
2855
|
+
var Dt = "ToastProvider", [Rt, No, So] = Jn("Toast"), [xr] = he("Toast", [So]), [Eo, Ke] = xr(Dt), yr = (e) => {
|
|
2813
2856
|
const {
|
|
2814
2857
|
__scopeToast: t,
|
|
2815
2858
|
label: n = "Notification",
|
|
@@ -2819,9 +2862,9 @@ var Pt = "ToastProvider", [Rt, wo, ko] = Zn("Toast"), [gr] = he("Toast", [ko]),
|
|
|
2819
2862
|
children: l
|
|
2820
2863
|
} = e, [i, u] = b.useState(null), [c, d] = b.useState(0), p = b.useRef(!1), x = b.useRef(!1);
|
|
2821
2864
|
return n.trim() || console.error(
|
|
2822
|
-
`Invalid prop \`label\` supplied to \`${
|
|
2865
|
+
`Invalid prop \`label\` supplied to \`${Dt}\`. Expected non-empty \`string\`.`
|
|
2823
2866
|
), /* @__PURE__ */ a(Rt.Provider, { scope: t, children: /* @__PURE__ */ a(
|
|
2824
|
-
|
|
2867
|
+
Eo,
|
|
2825
2868
|
{
|
|
2826
2869
|
scope: t,
|
|
2827
2870
|
label: n,
|
|
@@ -2839,15 +2882,15 @@ var Pt = "ToastProvider", [Rt, wo, ko] = Zn("Toast"), [gr] = he("Toast", [ko]),
|
|
|
2839
2882
|
}
|
|
2840
2883
|
) });
|
|
2841
2884
|
};
|
|
2842
|
-
|
|
2843
|
-
var
|
|
2885
|
+
yr.displayName = Dt;
|
|
2886
|
+
var _r = "ToastViewport", To = ["F8"], dt = "toast.viewportPause", pt = "toast.viewportResume", wr = b.forwardRef(
|
|
2844
2887
|
(e, t) => {
|
|
2845
2888
|
const {
|
|
2846
2889
|
__scopeToast: n,
|
|
2847
|
-
hotkey: r =
|
|
2890
|
+
hotkey: r = To,
|
|
2848
2891
|
label: s = "Notifications ({hotkey})",
|
|
2849
2892
|
...o
|
|
2850
|
-
} = e, l = Ke(
|
|
2893
|
+
} = e, l = Ke(_r, n), i = No(n), u = b.useRef(null), c = b.useRef(null), d = b.useRef(null), p = b.useRef(null), x = K(t, p, l.onViewportChange), k = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = l.toastCount > 0;
|
|
2851
2894
|
b.useEffect(() => {
|
|
2852
2895
|
const m = (w) => {
|
|
2853
2896
|
var v;
|
|
@@ -2880,7 +2923,7 @@ var xr = "ToastViewport", So = ["F8"], dt = "toast.viewportPause", pt = "toast.v
|
|
|
2880
2923
|
const g = b.useCallback(
|
|
2881
2924
|
({ tabbingDirection: m }) => {
|
|
2882
2925
|
const h = i().map((v) => {
|
|
2883
|
-
const f = v.ref.current, y = [f, ...
|
|
2926
|
+
const f = v.ref.current, y = [f, ...Uo(f)];
|
|
2884
2927
|
return m === "forwards" ? y : y.reverse();
|
|
2885
2928
|
});
|
|
2886
2929
|
return (m === "forwards" ? h.reverse() : h).flat();
|
|
@@ -2899,14 +2942,14 @@ var xr = "ToastViewport", So = ["F8"], dt = "toast.viewportPause", pt = "toast.v
|
|
|
2899
2942
|
(y = c.current) == null || y.focus();
|
|
2900
2943
|
return;
|
|
2901
2944
|
}
|
|
2902
|
-
const
|
|
2903
|
-
at(
|
|
2945
|
+
const D = g({ tabbingDirection: A ? "backwards" : "forwards" }), $ = D.findIndex((I) => I === C);
|
|
2946
|
+
at(D.slice($ + 1)) ? h.preventDefault() : A ? (_ = c.current) == null || _.focus() : (N = d.current) == null || N.focus();
|
|
2904
2947
|
}
|
|
2905
2948
|
};
|
|
2906
2949
|
return m.addEventListener("keydown", w), () => m.removeEventListener("keydown", w);
|
|
2907
2950
|
}
|
|
2908
2951
|
}, [i, g]), /* @__PURE__ */ S(
|
|
2909
|
-
|
|
2952
|
+
Ma,
|
|
2910
2953
|
{
|
|
2911
2954
|
ref: u,
|
|
2912
2955
|
role: "region",
|
|
@@ -2944,12 +2987,12 @@ var xr = "ToastViewport", So = ["F8"], dt = "toast.viewportPause", pt = "toast.v
|
|
|
2944
2987
|
);
|
|
2945
2988
|
}
|
|
2946
2989
|
);
|
|
2947
|
-
|
|
2948
|
-
var
|
|
2990
|
+
wr.displayName = _r;
|
|
2991
|
+
var kr = "ToastFocusProxy", ft = b.forwardRef(
|
|
2949
2992
|
(e, t) => {
|
|
2950
|
-
const { __scopeToast: n, onFocusFromOutsideViewport: r, ...s } = e, o = Ke(
|
|
2993
|
+
const { __scopeToast: n, onFocusFromOutsideViewport: r, ...s } = e, o = Ke(kr, n);
|
|
2951
2994
|
return /* @__PURE__ */ a(
|
|
2952
|
-
|
|
2995
|
+
Pt,
|
|
2953
2996
|
{
|
|
2954
2997
|
tabIndex: 0,
|
|
2955
2998
|
...s,
|
|
@@ -2964,8 +3007,8 @@ var _r = "ToastFocusProxy", ft = b.forwardRef(
|
|
|
2964
3007
|
);
|
|
2965
3008
|
}
|
|
2966
3009
|
);
|
|
2967
|
-
ft.displayName =
|
|
2968
|
-
var Ne = "Toast",
|
|
3010
|
+
ft.displayName = kr;
|
|
3011
|
+
var Ne = "Toast", Co = "toast.swipeStart", Ao = "toast.swipeMove", Po = "toast.swipeCancel", Do = "toast.swipeEnd", Nr = b.forwardRef(
|
|
2969
3012
|
(e, t) => {
|
|
2970
3013
|
const { forceMount: n, open: r, defaultOpen: s, onOpenChange: o, ...l } = e, [i, u] = we({
|
|
2971
3014
|
prop: r,
|
|
@@ -2974,7 +3017,7 @@ var Ne = "Toast", Eo = "toast.swipeStart", To = "toast.swipeMove", Co = "toast.s
|
|
|
2974
3017
|
caller: Ne
|
|
2975
3018
|
});
|
|
2976
3019
|
return /* @__PURE__ */ a(me, { present: n || i, children: /* @__PURE__ */ a(
|
|
2977
|
-
|
|
3020
|
+
Io,
|
|
2978
3021
|
{
|
|
2979
3022
|
open: i,
|
|
2980
3023
|
...l,
|
|
@@ -3000,11 +3043,11 @@ var Ne = "Toast", Eo = "toast.swipeStart", To = "toast.swipeMove", Co = "toast.s
|
|
|
3000
3043
|
) });
|
|
3001
3044
|
}
|
|
3002
3045
|
);
|
|
3003
|
-
|
|
3004
|
-
var [
|
|
3046
|
+
Nr.displayName = Ne;
|
|
3047
|
+
var [Ro, Fo] = xr(Ne, {
|
|
3005
3048
|
onClose() {
|
|
3006
3049
|
}
|
|
3007
|
-
}),
|
|
3050
|
+
}), Io = b.forwardRef(
|
|
3008
3051
|
(e, t) => {
|
|
3009
3052
|
const {
|
|
3010
3053
|
__scopeToast: n,
|
|
@@ -3020,20 +3063,20 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3020
3063
|
onSwipeCancel: x,
|
|
3021
3064
|
onSwipeEnd: k,
|
|
3022
3065
|
...E
|
|
3023
|
-
} = e, g = Ke(Ne, n), [m, w] = b.useState(null), h = K(t, (I) => w(I)), v = b.useRef(null), f = b.useRef(null), y = s || g.duration, _ = b.useRef(0), N = b.useRef(y), C = b.useRef(0), { onToastAdd: A, onToastRemove: P } = g,
|
|
3066
|
+
} = e, g = Ke(Ne, n), [m, w] = b.useState(null), h = K(t, (I) => w(I)), v = b.useRef(null), f = b.useRef(null), y = s || g.duration, _ = b.useRef(0), N = b.useRef(y), C = b.useRef(0), { onToastAdd: A, onToastRemove: P } = g, R = J(() => {
|
|
3024
3067
|
var W;
|
|
3025
3068
|
(m == null ? void 0 : m.contains(document.activeElement)) && ((W = g.viewport) == null || W.focus()), l();
|
|
3026
|
-
}),
|
|
3069
|
+
}), D = b.useCallback(
|
|
3027
3070
|
(I) => {
|
|
3028
|
-
!I || I === 1 / 0 || (window.clearTimeout(C.current), _.current = (/* @__PURE__ */ new Date()).getTime(), C.current = window.setTimeout(
|
|
3071
|
+
!I || I === 1 / 0 || (window.clearTimeout(C.current), _.current = (/* @__PURE__ */ new Date()).getTime(), C.current = window.setTimeout(R, I));
|
|
3029
3072
|
},
|
|
3030
|
-
[
|
|
3073
|
+
[R]
|
|
3031
3074
|
);
|
|
3032
3075
|
b.useEffect(() => {
|
|
3033
3076
|
const I = g.viewport;
|
|
3034
3077
|
if (I) {
|
|
3035
3078
|
const W = () => {
|
|
3036
|
-
|
|
3079
|
+
D(N.current), c == null || c();
|
|
3037
3080
|
}, H = () => {
|
|
3038
3081
|
const ee = (/* @__PURE__ */ new Date()).getTime() - _.current;
|
|
3039
3082
|
N.current = N.current - ee, window.clearTimeout(C.current), u == null || u();
|
|
@@ -3042,13 +3085,13 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3042
3085
|
I.removeEventListener(dt, H), I.removeEventListener(pt, W);
|
|
3043
3086
|
};
|
|
3044
3087
|
}
|
|
3045
|
-
}, [g.viewport, y, u, c,
|
|
3046
|
-
o && !g.isClosePausedRef.current &&
|
|
3047
|
-
}, [o, y, g.isClosePausedRef,
|
|
3048
|
-
const $ = b.useMemo(() => m ?
|
|
3088
|
+
}, [g.viewport, y, u, c, D]), b.useEffect(() => {
|
|
3089
|
+
o && !g.isClosePausedRef.current && D(y);
|
|
3090
|
+
}, [o, y, g.isClosePausedRef, D]), b.useEffect(() => (A(), () => P()), [A, P]);
|
|
3091
|
+
const $ = b.useMemo(() => m ? Pr(m) : null, [m]);
|
|
3049
3092
|
return g.viewport ? /* @__PURE__ */ S(q, { children: [
|
|
3050
3093
|
$ && /* @__PURE__ */ a(
|
|
3051
|
-
|
|
3094
|
+
Lo,
|
|
3052
3095
|
{
|
|
3053
3096
|
__scopeToast: n,
|
|
3054
3097
|
role: "status",
|
|
@@ -3056,13 +3099,13 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3056
3099
|
children: $
|
|
3057
3100
|
}
|
|
3058
3101
|
),
|
|
3059
|
-
/* @__PURE__ */ a(
|
|
3102
|
+
/* @__PURE__ */ a(Ro, { scope: n, onClose: R, children: on.createPortal(
|
|
3060
3103
|
/* @__PURE__ */ a(Rt.ItemSlot, { scope: n, children: /* @__PURE__ */ a(
|
|
3061
|
-
|
|
3104
|
+
La,
|
|
3062
3105
|
{
|
|
3063
3106
|
asChild: !0,
|
|
3064
3107
|
onEscapeKeyDown: M(i, () => {
|
|
3065
|
-
g.isFocusedToastEscapeKeyDownRef.current ||
|
|
3108
|
+
g.isFocusedToastEscapeKeyDownRef.current || R(), g.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
3066
3109
|
}),
|
|
3067
3110
|
children: /* @__PURE__ */ a(
|
|
3068
3111
|
B.li,
|
|
@@ -3074,7 +3117,7 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3074
3117
|
ref: h,
|
|
3075
3118
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
3076
3119
|
onKeyDown: M(e.onKeyDown, (I) => {
|
|
3077
|
-
I.key === "Escape" && (i == null || i(I.nativeEvent), I.nativeEvent.defaultPrevented || (g.isFocusedToastEscapeKeyDownRef.current = !0,
|
|
3120
|
+
I.key === "Escape" && (i == null || i(I.nativeEvent), I.nativeEvent.defaultPrevented || (g.isFocusedToastEscapeKeyDownRef.current = !0, R()));
|
|
3078
3121
|
}),
|
|
3079
3122
|
onPointerDown: M(e.onPointerDown, (I) => {
|
|
3080
3123
|
I.button === 0 && (v.current = { x: I.clientX, y: I.clientY });
|
|
@@ -3082,9 +3125,9 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3082
3125
|
onPointerMove: M(e.onPointerMove, (I) => {
|
|
3083
3126
|
if (!v.current) return;
|
|
3084
3127
|
const W = I.clientX - v.current.x, H = I.clientY - v.current.y, ee = !!f.current, z = ["left", "right"].includes(g.swipeDirection), G = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, te = z ? G(0, W) : 0, ie = z ? 0 : G(0, H), j = I.pointerType === "touch" ? 10 : 2, le = { x: te, y: ie }, V = { originalEvent: I, delta: le };
|
|
3085
|
-
ee ? (f.current = le,
|
|
3128
|
+
ee ? (f.current = le, Fe(Ao, p, V, {
|
|
3086
3129
|
discrete: !1
|
|
3087
|
-
})) :
|
|
3130
|
+
})) : Xt(le, g.swipeDirection, j) ? (f.current = le, Fe(Co, d, V, {
|
|
3088
3131
|
discrete: !1
|
|
3089
3132
|
}), I.target.setPointerCapture(I.pointerId)) : (Math.abs(W) > j || Math.abs(H) > j) && (v.current = null);
|
|
3090
3133
|
}),
|
|
@@ -3092,10 +3135,10 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3092
3135
|
const W = f.current, H = I.target;
|
|
3093
3136
|
if (H.hasPointerCapture(I.pointerId) && H.releasePointerCapture(I.pointerId), f.current = null, v.current = null, W) {
|
|
3094
3137
|
const ee = I.currentTarget, z = { originalEvent: I, delta: W };
|
|
3095
|
-
|
|
3138
|
+
Xt(W, g.swipeDirection, g.swipeThreshold) ? Fe(Do, k, z, {
|
|
3096
3139
|
discrete: !0
|
|
3097
|
-
}) :
|
|
3098
|
-
|
|
3140
|
+
}) : Fe(
|
|
3141
|
+
Po,
|
|
3099
3142
|
x,
|
|
3100
3143
|
z,
|
|
3101
3144
|
{
|
|
@@ -3114,43 +3157,43 @@ var [Po, Ro] = gr(Ne, {
|
|
|
3114
3157
|
) })
|
|
3115
3158
|
] }) : null;
|
|
3116
3159
|
}
|
|
3117
|
-
),
|
|
3160
|
+
), Lo = (e) => {
|
|
3118
3161
|
const { __scopeToast: t, children: n, ...r } = e, s = Ke(Ne, t), [o, l] = b.useState(!1), [i, u] = b.useState(!1);
|
|
3119
|
-
return
|
|
3162
|
+
return Bo(() => l(!0)), b.useEffect(() => {
|
|
3120
3163
|
const c = window.setTimeout(() => u(!0), 1e3);
|
|
3121
3164
|
return () => window.clearTimeout(c);
|
|
3122
|
-
}, []), i ? null : /* @__PURE__ */ a(
|
|
3165
|
+
}, []), i ? null : /* @__PURE__ */ a(bt, { asChild: !0, children: /* @__PURE__ */ a(Pt, { ...r, children: o && /* @__PURE__ */ S(q, { children: [
|
|
3123
3166
|
s.label,
|
|
3124
3167
|
" ",
|
|
3125
3168
|
n
|
|
3126
3169
|
] }) }) });
|
|
3127
|
-
},
|
|
3170
|
+
}, Mo = "ToastTitle", Sr = b.forwardRef(
|
|
3128
3171
|
(e, t) => {
|
|
3129
3172
|
const { __scopeToast: n, ...r } = e;
|
|
3130
3173
|
return /* @__PURE__ */ a(B.div, { ...r, ref: t });
|
|
3131
3174
|
}
|
|
3132
3175
|
);
|
|
3133
|
-
|
|
3134
|
-
var
|
|
3176
|
+
Sr.displayName = Mo;
|
|
3177
|
+
var Oo = "ToastDescription", Er = b.forwardRef(
|
|
3135
3178
|
(e, t) => {
|
|
3136
3179
|
const { __scopeToast: n, ...r } = e;
|
|
3137
3180
|
return /* @__PURE__ */ a(B.div, { ...r, ref: t });
|
|
3138
3181
|
}
|
|
3139
3182
|
);
|
|
3140
|
-
|
|
3141
|
-
var
|
|
3183
|
+
Er.displayName = Oo;
|
|
3184
|
+
var Tr = "ToastAction", $o = b.forwardRef(
|
|
3142
3185
|
(e, t) => {
|
|
3143
3186
|
const { altText: n, ...r } = e;
|
|
3144
|
-
return n.trim() ? /* @__PURE__ */ a(
|
|
3145
|
-
`Invalid prop \`altText\` supplied to \`${
|
|
3187
|
+
return n.trim() ? /* @__PURE__ */ a(Ar, { altText: n, asChild: !0, children: /* @__PURE__ */ a(Ft, { ...r, ref: t }) }) : (console.error(
|
|
3188
|
+
`Invalid prop \`altText\` supplied to \`${Tr}\`. Expected non-empty \`string\`.`
|
|
3146
3189
|
), null);
|
|
3147
3190
|
}
|
|
3148
3191
|
);
|
|
3149
|
-
|
|
3150
|
-
var
|
|
3192
|
+
$o.displayName = Tr;
|
|
3193
|
+
var Cr = "ToastClose", Ft = b.forwardRef(
|
|
3151
3194
|
(e, t) => {
|
|
3152
|
-
const { __scopeToast: n, ...r } = e, s =
|
|
3153
|
-
return /* @__PURE__ */ a(
|
|
3195
|
+
const { __scopeToast: n, ...r } = e, s = Fo(Cr, n);
|
|
3196
|
+
return /* @__PURE__ */ a(Ar, { asChild: !0, children: /* @__PURE__ */ a(
|
|
3154
3197
|
B.button,
|
|
3155
3198
|
{
|
|
3156
3199
|
type: "button",
|
|
@@ -3161,8 +3204,8 @@ var Er = "ToastClose", Ft = b.forwardRef(
|
|
|
3161
3204
|
) });
|
|
3162
3205
|
}
|
|
3163
3206
|
);
|
|
3164
|
-
Ft.displayName =
|
|
3165
|
-
var
|
|
3207
|
+
Ft.displayName = Cr;
|
|
3208
|
+
var Ar = b.forwardRef((e, t) => {
|
|
3166
3209
|
const { __scopeToast: n, altText: r, ...s } = e;
|
|
3167
3210
|
return /* @__PURE__ */ a(
|
|
3168
3211
|
B.div,
|
|
@@ -3174,29 +3217,29 @@ var Tr = b.forwardRef((e, t) => {
|
|
|
3174
3217
|
}
|
|
3175
3218
|
);
|
|
3176
3219
|
});
|
|
3177
|
-
function
|
|
3220
|
+
function Pr(e) {
|
|
3178
3221
|
const t = [];
|
|
3179
3222
|
return Array.from(e.childNodes).forEach((r) => {
|
|
3180
|
-
if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent),
|
|
3223
|
+
if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent), zo(r)) {
|
|
3181
3224
|
const s = r.ariaHidden || r.hidden || r.style.display === "none", o = r.dataset.radixToastAnnounceExclude === "";
|
|
3182
3225
|
if (!s)
|
|
3183
3226
|
if (o) {
|
|
3184
3227
|
const l = r.dataset.radixToastAnnounceAlt;
|
|
3185
3228
|
l && t.push(l);
|
|
3186
3229
|
} else
|
|
3187
|
-
t.push(...
|
|
3230
|
+
t.push(...Pr(r));
|
|
3188
3231
|
}
|
|
3189
3232
|
}), t;
|
|
3190
3233
|
}
|
|
3191
|
-
function
|
|
3234
|
+
function Fe(e, t, n, { discrete: r }) {
|
|
3192
3235
|
const s = n.originalEvent.currentTarget, o = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: n });
|
|
3193
3236
|
t && s.addEventListener(e, t, { once: !0 }), r ? hn(s, o) : s.dispatchEvent(o);
|
|
3194
3237
|
}
|
|
3195
|
-
var
|
|
3238
|
+
var Xt = (e, t, n = 0) => {
|
|
3196
3239
|
const r = Math.abs(e.x), s = Math.abs(e.y), o = r > s;
|
|
3197
3240
|
return t === "left" || t === "right" ? o && r > n : !o && s > n;
|
|
3198
3241
|
};
|
|
3199
|
-
function
|
|
3242
|
+
function Bo(e = () => {
|
|
3200
3243
|
}) {
|
|
3201
3244
|
const t = J(e);
|
|
3202
3245
|
se(() => {
|
|
@@ -3206,10 +3249,10 @@ function Oo(e = () => {
|
|
|
3206
3249
|
};
|
|
3207
3250
|
}, [t]);
|
|
3208
3251
|
}
|
|
3209
|
-
function
|
|
3252
|
+
function zo(e) {
|
|
3210
3253
|
return e.nodeType === e.ELEMENT_NODE;
|
|
3211
3254
|
}
|
|
3212
|
-
function
|
|
3255
|
+
function Uo(e) {
|
|
3213
3256
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
3214
3257
|
acceptNode: (r) => {
|
|
3215
3258
|
const s = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -3223,22 +3266,22 @@ function at(e) {
|
|
|
3223
3266
|
const t = document.activeElement;
|
|
3224
3267
|
return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
|
|
3225
3268
|
}
|
|
3226
|
-
var
|
|
3227
|
-
const
|
|
3228
|
-
let
|
|
3229
|
-
function
|
|
3230
|
-
const [t, n] =
|
|
3269
|
+
var Wo = yr, Ho = wr, Go = Nr, jo = Sr, Ko = Er, Vo = Ft;
|
|
3270
|
+
const Dr = _e(null);
|
|
3271
|
+
let Yo = 1;
|
|
3272
|
+
function zi({ children: e }) {
|
|
3273
|
+
const [t, n] = F([]), r = be(
|
|
3231
3274
|
() => ({
|
|
3232
3275
|
push: (s) => {
|
|
3233
|
-
n((o) => [...o, { id:
|
|
3276
|
+
n((o) => [...o, { id: Yo += 1, tone: "info", ...s }]);
|
|
3234
3277
|
}
|
|
3235
3278
|
}),
|
|
3236
3279
|
[]
|
|
3237
3280
|
);
|
|
3238
|
-
return /* @__PURE__ */ a(
|
|
3281
|
+
return /* @__PURE__ */ a(Dr.Provider, { value: r, children: /* @__PURE__ */ S(Wo, { swipeDirection: "right", children: [
|
|
3239
3282
|
e,
|
|
3240
3283
|
t.map((s) => /* @__PURE__ */ S(
|
|
3241
|
-
|
|
3284
|
+
Go,
|
|
3242
3285
|
{
|
|
3243
3286
|
className: T("vx-toast", `vx-toast--${s.tone ?? "info"}`),
|
|
3244
3287
|
duration: 4500,
|
|
@@ -3248,24 +3291,24 @@ function $i({ children: e }) {
|
|
|
3248
3291
|
},
|
|
3249
3292
|
children: [
|
|
3250
3293
|
/* @__PURE__ */ S("div", { className: "vx-toast__content", children: [
|
|
3251
|
-
/* @__PURE__ */ a(
|
|
3252
|
-
s.description ? /* @__PURE__ */ a(
|
|
3294
|
+
/* @__PURE__ */ a(jo, { className: "vx-toast__title", children: s.title }),
|
|
3295
|
+
s.description ? /* @__PURE__ */ a(Ko, { className: "vx-toast__description", children: s.description }) : null
|
|
3253
3296
|
] }),
|
|
3254
|
-
/* @__PURE__ */ a(
|
|
3297
|
+
/* @__PURE__ */ a(Vo, { className: "vx-toast__close", "aria-label": "Dismiss notification", children: /* @__PURE__ */ a(ve, { size: 16 }) })
|
|
3255
3298
|
]
|
|
3256
3299
|
},
|
|
3257
3300
|
s.id
|
|
3258
3301
|
)),
|
|
3259
|
-
/* @__PURE__ */ a(
|
|
3302
|
+
/* @__PURE__ */ a(Ho, { className: "vx-toast__viewport" })
|
|
3260
3303
|
] }) });
|
|
3261
3304
|
}
|
|
3262
|
-
function
|
|
3263
|
-
const e = ye(
|
|
3305
|
+
function Ui() {
|
|
3306
|
+
const e = ye(Dr);
|
|
3264
3307
|
if (!e)
|
|
3265
3308
|
throw new Error("useToast must be used within ToastProvider.");
|
|
3266
3309
|
return e;
|
|
3267
3310
|
}
|
|
3268
|
-
function
|
|
3311
|
+
function Wi({
|
|
3269
3312
|
as: e = "p",
|
|
3270
3313
|
variant: t = "default",
|
|
3271
3314
|
size: n = "base",
|
|
@@ -3289,7 +3332,7 @@ function zi({
|
|
|
3289
3332
|
}
|
|
3290
3333
|
);
|
|
3291
3334
|
}
|
|
3292
|
-
function
|
|
3335
|
+
function Hi({
|
|
3293
3336
|
as: e,
|
|
3294
3337
|
level: t = 2,
|
|
3295
3338
|
variant: n = "default",
|
|
@@ -3314,7 +3357,7 @@ function Ui({
|
|
|
3314
3357
|
}
|
|
3315
3358
|
);
|
|
3316
3359
|
}
|
|
3317
|
-
function
|
|
3360
|
+
function Gi({ className: e, label: t, hint: n, placeholder: r, children: s, ...o }) {
|
|
3318
3361
|
return /* @__PURE__ */ S("label", { className: "vx-field-group", children: [
|
|
3319
3362
|
t ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: t }) : null,
|
|
3320
3363
|
/* @__PURE__ */ S("span", { className: T("vx-select", e), children: [
|
|
@@ -3327,7 +3370,7 @@ function Wi({ className: e, label: t, hint: n, placeholder: r, children: s, ...o
|
|
|
3327
3370
|
n ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: n }) : null
|
|
3328
3371
|
] });
|
|
3329
3372
|
}
|
|
3330
|
-
function
|
|
3373
|
+
function ji({ className: e, label: t, description: n, indeterminate: r, ...s }) {
|
|
3331
3374
|
return /* @__PURE__ */ S("label", { className: T("vx-checkbox", s.disabled && "vx-checkbox--disabled"), children: [
|
|
3332
3375
|
/* @__PURE__ */ S("span", { className: "vx-checkbox__control-wrap", children: [
|
|
3333
3376
|
/* @__PURE__ */ a(
|
|
@@ -3349,7 +3392,7 @@ function Hi({ className: e, label: t, description: n, indeterminate: r, ...s })
|
|
|
3349
3392
|
] }) : null
|
|
3350
3393
|
] });
|
|
3351
3394
|
}
|
|
3352
|
-
function
|
|
3395
|
+
function Ki({ className: e, label: t, description: n, ...r }) {
|
|
3353
3396
|
return /* @__PURE__ */ S("label", { className: T("vx-radio", r.disabled && "vx-radio--disabled"), children: [
|
|
3354
3397
|
/* @__PURE__ */ S("span", { className: "vx-radio__control-wrap", children: [
|
|
3355
3398
|
/* @__PURE__ */ a("input", { type: "radio", className: T("vx-radio__input", e), ...r }),
|
|
@@ -3361,13 +3404,13 @@ function Gi({ className: e, label: t, description: n, ...r }) {
|
|
|
3361
3404
|
] }) : null
|
|
3362
3405
|
] });
|
|
3363
3406
|
}
|
|
3364
|
-
function
|
|
3407
|
+
function Vi({ label: e, children: t, className: n }) {
|
|
3365
3408
|
return /* @__PURE__ */ S("fieldset", { className: T("vx-radio-group", n), children: [
|
|
3366
3409
|
e ? /* @__PURE__ */ a("legend", { className: "vx-field-group__label", children: e }) : null,
|
|
3367
3410
|
/* @__PURE__ */ a("div", { className: "vx-radio-group__items", children: t })
|
|
3368
3411
|
] });
|
|
3369
3412
|
}
|
|
3370
|
-
function
|
|
3413
|
+
function Yi({ className: e, label: t, hint: n, resize: r = "vertical", style: s, ...o }) {
|
|
3371
3414
|
return /* @__PURE__ */ S("label", { className: "vx-field-group", children: [
|
|
3372
3415
|
t ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: t }) : null,
|
|
3373
3416
|
/* @__PURE__ */ a(
|
|
@@ -3381,7 +3424,7 @@ function Ki({ className: e, label: t, hint: n, resize: r = "vertical", style: s,
|
|
|
3381
3424
|
n ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: n }) : null
|
|
3382
3425
|
] });
|
|
3383
3426
|
}
|
|
3384
|
-
function
|
|
3427
|
+
function qi({ className: e, label: t, showValue: n = !1, hint: r, value: s, defaultValue: o, ...l }) {
|
|
3385
3428
|
return /* @__PURE__ */ S("label", { className: "vx-field-group", children: [
|
|
3386
3429
|
t || n ? /* @__PURE__ */ S("span", { className: "vx-slider__header", children: [
|
|
3387
3430
|
t ? /* @__PURE__ */ a("span", { className: "vx-field-group__label vx-slider__label", children: t }) : null,
|
|
@@ -3400,9 +3443,9 @@ function Vi({ className: e, label: t, showValue: n = !1, hint: r, value: s, defa
|
|
|
3400
3443
|
r ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: r }) : null
|
|
3401
3444
|
] });
|
|
3402
3445
|
}
|
|
3403
|
-
const
|
|
3404
|
-
function
|
|
3405
|
-
const s =
|
|
3446
|
+
const qo = { sm: 16, md: 24, lg: 36 };
|
|
3447
|
+
function Xi({ className: e, size: t = "md", label: n = "Loading…", ...r }) {
|
|
3448
|
+
const s = qo[t];
|
|
3406
3449
|
return /* @__PURE__ */ a(
|
|
3407
3450
|
"span",
|
|
3408
3451
|
{
|
|
@@ -3435,7 +3478,7 @@ function Yi({ className: e, size: t = "md", label: n = "Loading…", ...r }) {
|
|
|
3435
3478
|
}
|
|
3436
3479
|
);
|
|
3437
3480
|
}
|
|
3438
|
-
function
|
|
3481
|
+
function Zi({
|
|
3439
3482
|
className: e,
|
|
3440
3483
|
value: t = 0,
|
|
3441
3484
|
max: n = 100,
|
|
@@ -3480,7 +3523,7 @@ function qi({
|
|
|
3480
3523
|
)
|
|
3481
3524
|
] });
|
|
3482
3525
|
}
|
|
3483
|
-
const
|
|
3526
|
+
const Xo = {
|
|
3484
3527
|
info: /* @__PURE__ */ S("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
3485
3528
|
/* @__PURE__ */ a("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
3486
3529
|
/* @__PURE__ */ a("path", { d: "M8 7v4M8 5.5v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
@@ -3498,7 +3541,7 @@ const Yo = {
|
|
|
3498
3541
|
/* @__PURE__ */ a("path", { d: "M10 6L6 10M6 6l4 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
3499
3542
|
] })
|
|
3500
3543
|
};
|
|
3501
|
-
function
|
|
3544
|
+
function Qi({
|
|
3502
3545
|
className: e,
|
|
3503
3546
|
variant: t = "info",
|
|
3504
3547
|
title: n,
|
|
@@ -3514,7 +3557,7 @@ function Xi({
|
|
|
3514
3557
|
className: T("vx-alert", `vx-alert--${t}`, e),
|
|
3515
3558
|
...l,
|
|
3516
3559
|
children: [
|
|
3517
|
-
/* @__PURE__ */ a("span", { className: "vx-alert__icon", children: r ??
|
|
3560
|
+
/* @__PURE__ */ a("span", { className: "vx-alert__icon", children: r ?? Xo[t] }),
|
|
3518
3561
|
/* @__PURE__ */ S("div", { className: "vx-alert__body", children: [
|
|
3519
3562
|
n ? /* @__PURE__ */ a("p", { className: "vx-alert__title", children: n }) : null,
|
|
3520
3563
|
o ? /* @__PURE__ */ a("div", { className: "vx-alert__content", children: o }) : null
|
|
@@ -3524,7 +3567,7 @@ function Xi({
|
|
|
3524
3567
|
}
|
|
3525
3568
|
);
|
|
3526
3569
|
}
|
|
3527
|
-
function
|
|
3570
|
+
function Ji({
|
|
3528
3571
|
className: e,
|
|
3529
3572
|
width: t,
|
|
3530
3573
|
height: n,
|
|
@@ -3557,8 +3600,8 @@ function Zi({
|
|
|
3557
3600
|
}
|
|
3558
3601
|
);
|
|
3559
3602
|
}
|
|
3560
|
-
function
|
|
3561
|
-
const [o, l] =
|
|
3603
|
+
function el({ content: e, placement: t = "top", delay: n = 600, children: r, className: s }) {
|
|
3604
|
+
const [o, l] = F(!1), i = L(null), u = U(() => {
|
|
3562
3605
|
i.current = setTimeout(() => l(!0), n);
|
|
3563
3606
|
}, [n]), c = U(() => {
|
|
3564
3607
|
i.current && clearTimeout(i.current), l(!1);
|
|
@@ -3570,7 +3613,7 @@ function Qi({ content: e, placement: t = "top", delay: n = 600, children: r, cla
|
|
|
3570
3613
|
o ? /* @__PURE__ */ a("span", { role: "tooltip", className: T("vx-tooltip", `vx-tooltip--${t}`), children: e }) : null
|
|
3571
3614
|
] });
|
|
3572
3615
|
}
|
|
3573
|
-
function
|
|
3616
|
+
function tl({
|
|
3574
3617
|
content: e,
|
|
3575
3618
|
placement: t = "bottom",
|
|
3576
3619
|
trigger: n = "click",
|
|
@@ -3579,7 +3622,7 @@ function Ji({
|
|
|
3579
3622
|
open: o,
|
|
3580
3623
|
onOpenChange: l
|
|
3581
3624
|
}) {
|
|
3582
|
-
const [i, u] =
|
|
3625
|
+
const [i, u] = F(!1), c = o !== void 0, d = c ? o : i, p = L(null), x = U((g) => {
|
|
3583
3626
|
c || u(g), l == null || l(g);
|
|
3584
3627
|
}, [c, l]), k = U(() => x(!d), [d, x]);
|
|
3585
3628
|
O(() => {
|
|
@@ -3599,7 +3642,7 @@ function Ji({
|
|
|
3599
3642
|
d ? /* @__PURE__ */ a("div", { className: T("vx-popover", `vx-popover--${t}`), role: "dialog", children: e }) : null
|
|
3600
3643
|
] });
|
|
3601
3644
|
}
|
|
3602
|
-
function
|
|
3645
|
+
function nl({
|
|
3603
3646
|
trigger: e,
|
|
3604
3647
|
groups: t,
|
|
3605
3648
|
items: n,
|
|
@@ -3608,7 +3651,7 @@ function el({
|
|
|
3608
3651
|
open: o,
|
|
3609
3652
|
onOpenChange: l
|
|
3610
3653
|
}) {
|
|
3611
|
-
const [i, u] =
|
|
3654
|
+
const [i, u] = F(!1), c = o !== void 0, d = c ? o : i, p = L(null), x = U((g) => {
|
|
3612
3655
|
c || u(g), l == null || l(g);
|
|
3613
3656
|
}, [c, l]), k = U(() => x(!d), [d, x]);
|
|
3614
3657
|
O(() => {
|
|
@@ -3665,20 +3708,20 @@ function el({
|
|
|
3665
3708
|
] }, m)) }) : null
|
|
3666
3709
|
] });
|
|
3667
3710
|
}
|
|
3668
|
-
const
|
|
3669
|
-
function
|
|
3711
|
+
const Zo = () => /* @__PURE__ */ a("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M4.5 2.5L7.5 6l-3 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
3712
|
+
function rl({ items: e, separator: t, className: n }) {
|
|
3670
3713
|
return /* @__PURE__ */ a("nav", { "aria-label": "Breadcrumb", className: T("vx-breadcrumb", n), children: /* @__PURE__ */ a("ol", { className: "vx-breadcrumb__list", children: e.map((r, s) => {
|
|
3671
3714
|
const o = s === e.length - 1;
|
|
3672
3715
|
return /* @__PURE__ */ S("li", { className: "vx-breadcrumb__item", children: [
|
|
3673
3716
|
o ? /* @__PURE__ */ a("span", { className: "vx-breadcrumb__current", "aria-current": "page", children: r.label }) : r.href ? /* @__PURE__ */ a("a", { href: r.href, className: "vx-breadcrumb__link", children: r.label }) : /* @__PURE__ */ a("button", { type: "button", className: "vx-breadcrumb__link", onClick: r.onClick, children: r.label }),
|
|
3674
|
-
o ? null : /* @__PURE__ */ a("span", { className: "vx-breadcrumb__sep", "aria-hidden": "true", children: t ?? /* @__PURE__ */ a(
|
|
3717
|
+
o ? null : /* @__PURE__ */ a("span", { className: "vx-breadcrumb__sep", "aria-hidden": "true", children: t ?? /* @__PURE__ */ a(Zo, {}) })
|
|
3675
3718
|
] }, s);
|
|
3676
3719
|
}) }) });
|
|
3677
3720
|
}
|
|
3678
3721
|
function Ie(e, t) {
|
|
3679
3722
|
return Array.from({ length: t - e + 1 }, (n, r) => e + r);
|
|
3680
3723
|
}
|
|
3681
|
-
function
|
|
3724
|
+
function al({ page: e, total: t, pageSize: n = 10, siblingCount: r = 1, onChange: s, className: o }) {
|
|
3682
3725
|
const l = Math.max(1, Math.ceil(t / n)), i = (() => {
|
|
3683
3726
|
const u = r * 2 + 5;
|
|
3684
3727
|
if (l <= u) return Ie(1, l);
|
|
@@ -3723,8 +3766,8 @@ function nl({ page: e, total: t, pageSize: n = 10, siblingCount: r = 1, onChange
|
|
|
3723
3766
|
)
|
|
3724
3767
|
] });
|
|
3725
3768
|
}
|
|
3726
|
-
function
|
|
3727
|
-
const [s, o] =
|
|
3769
|
+
function sl({ items: e, multiple: t = !1, defaultOpen: n = [], className: r }) {
|
|
3770
|
+
const [s, o] = F(new Set(n));
|
|
3728
3771
|
function l(i) {
|
|
3729
3772
|
o((u) => {
|
|
3730
3773
|
const c = new Set(t ? u : []);
|
|
@@ -3752,7 +3795,7 @@ function rl({ items: e, multiple: t = !1, defaultOpen: n = [], className: r }) {
|
|
|
3752
3795
|
] }, i.key);
|
|
3753
3796
|
}) });
|
|
3754
3797
|
}
|
|
3755
|
-
function
|
|
3798
|
+
function ol({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
3756
3799
|
return /* @__PURE__ */ a(
|
|
3757
3800
|
"hr",
|
|
3758
3801
|
{
|
|
@@ -3763,18 +3806,18 @@ function al({ className: e, orientation: t = "horizontal", decorative: n = !0, .
|
|
|
3763
3806
|
}
|
|
3764
3807
|
);
|
|
3765
3808
|
}
|
|
3766
|
-
function
|
|
3809
|
+
function Qo(e) {
|
|
3767
3810
|
const t = e.trim().split(/\s+/);
|
|
3768
3811
|
return t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
3769
3812
|
}
|
|
3770
|
-
const
|
|
3771
|
-
function
|
|
3813
|
+
const Zt = [0, 30, 60, 120, 160, 200, 240, 270, 300, 340];
|
|
3814
|
+
function Jo(e) {
|
|
3772
3815
|
let t = 0;
|
|
3773
3816
|
for (let n = 0; n < e.length; n++) t += e.charCodeAt(n);
|
|
3774
|
-
return
|
|
3817
|
+
return Zt[t % Zt.length];
|
|
3775
3818
|
}
|
|
3776
|
-
function
|
|
3777
|
-
const [u, c] =
|
|
3819
|
+
function il({ src: e, name: t, size: n = "md", shape: r = "circle", fallback: s, className: o, alt: l, ...i }) {
|
|
3820
|
+
const [u, c] = F(!1), d = e && !u, p = t ?? l ?? "", x = p ? Jo(p) : 200;
|
|
3778
3821
|
return /* @__PURE__ */ a(
|
|
3779
3822
|
"span",
|
|
3780
3823
|
{
|
|
@@ -3790,14 +3833,14 @@ function sl({ src: e, name: t, size: n = "md", shape: r = "circle", fallback: s,
|
|
|
3790
3833
|
onError: () => c(!0),
|
|
3791
3834
|
...i
|
|
3792
3835
|
}
|
|
3793
|
-
) : s ? /* @__PURE__ */ a("span", { className: "vx-avatar__fallback", children: s }) : p ? /* @__PURE__ */ a("span", { className: "vx-avatar__initials", children:
|
|
3836
|
+
) : s ? /* @__PURE__ */ a("span", { className: "vx-avatar__fallback", children: s }) : p ? /* @__PURE__ */ a("span", { className: "vx-avatar__initials", children: Qo(p) }) : /* @__PURE__ */ S("svg", { className: "vx-avatar__placeholder", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
3794
3837
|
/* @__PURE__ */ a("circle", { cx: "12", cy: "8", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
3795
3838
|
/* @__PURE__ */ a("path", { d: "M4 20c0-4 3.58-7 8-7s8 3 8 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
3796
3839
|
] })
|
|
3797
3840
|
}
|
|
3798
3841
|
);
|
|
3799
3842
|
}
|
|
3800
|
-
function
|
|
3843
|
+
function ll({
|
|
3801
3844
|
columns: e,
|
|
3802
3845
|
data: t,
|
|
3803
3846
|
striped: n = !1,
|
|
@@ -3813,7 +3856,7 @@ function ol({
|
|
|
3813
3856
|
className: x,
|
|
3814
3857
|
...k
|
|
3815
3858
|
}) {
|
|
3816
|
-
const [E, g] =
|
|
3859
|
+
const [E, g] = F(null), [m, w] = F(null), h = c !== void 0, v = h ? c : E, f = h ? d ?? null : m, y = U((_) => {
|
|
3817
3860
|
let N;
|
|
3818
3861
|
v !== _ ? N = "asc" : f === "asc" ? N = "desc" : f === "desc" ? N = null : N = "asc", h || (g(N === null ? null : _), w(N)), p == null || p(_, N);
|
|
3819
3862
|
}, [v, f, h, p]);
|
|
@@ -3861,24 +3904,24 @@ function ol({
|
|
|
3861
3904
|
}
|
|
3862
3905
|
) });
|
|
3863
3906
|
}
|
|
3864
|
-
function
|
|
3907
|
+
function cl({ topBar: e, bottomNav: t, children: n, className: r }) {
|
|
3865
3908
|
return /* @__PURE__ */ S("div", { className: T("vxm-shell", r), children: [
|
|
3866
3909
|
e && /* @__PURE__ */ a("div", { className: "vxm-shell__topbar", children: e }),
|
|
3867
3910
|
/* @__PURE__ */ a("main", { className: "vxm-shell__main", children: n }),
|
|
3868
3911
|
t && /* @__PURE__ */ a("div", { className: "vxm-shell__bottomnav", children: t })
|
|
3869
3912
|
] });
|
|
3870
3913
|
}
|
|
3871
|
-
function
|
|
3914
|
+
function ul({ title: e, leading: t, trailing: n, className: r }) {
|
|
3872
3915
|
return /* @__PURE__ */ S("div", { className: T("vxm-topbar", r), children: [
|
|
3873
3916
|
/* @__PURE__ */ a("div", { className: "vxm-topbar__leading", children: t }),
|
|
3874
3917
|
/* @__PURE__ */ a("div", { className: "vxm-topbar__title", children: e }),
|
|
3875
3918
|
/* @__PURE__ */ a("div", { className: "vxm-topbar__trailing", children: n })
|
|
3876
3919
|
] });
|
|
3877
3920
|
}
|
|
3878
|
-
function
|
|
3921
|
+
function dl({ label: e, className: t, children: n, ...r }) {
|
|
3879
3922
|
return /* @__PURE__ */ a("button", { type: "button", className: T("vxm-icon-btn", t), "aria-label": e, ...r, children: n });
|
|
3880
3923
|
}
|
|
3881
|
-
function
|
|
3924
|
+
function pl({ items: e, className: t }) {
|
|
3882
3925
|
return /* @__PURE__ */ a("nav", { className: T("vxm-bottomnav", t), "aria-label": "底部导航", children: e.map((n) => /* @__PURE__ */ S(
|
|
3883
3926
|
"button",
|
|
3884
3927
|
{
|
|
@@ -3897,7 +3940,7 @@ function ul({ items: e, className: t }) {
|
|
|
3897
3940
|
n.key
|
|
3898
3941
|
)) });
|
|
3899
3942
|
}
|
|
3900
|
-
function
|
|
3943
|
+
function fl({
|
|
3901
3944
|
open: e,
|
|
3902
3945
|
onClose: t,
|
|
3903
3946
|
title: n,
|
|
@@ -3905,7 +3948,7 @@ function dl({
|
|
|
3905
3948
|
children: s,
|
|
3906
3949
|
className: o
|
|
3907
3950
|
}) {
|
|
3908
|
-
const l = L(null), i = L(0), [u, c] =
|
|
3951
|
+
const l = L(null), i = L(0), [u, c] = F(!1), [d, p] = F(0), x = L(0);
|
|
3909
3952
|
O(() => {
|
|
3910
3953
|
e || (p(0), x.current = 0);
|
|
3911
3954
|
}, [e]), O(() => {
|
|
@@ -3965,7 +4008,7 @@ function dl({
|
|
|
3965
4008
|
}
|
|
3966
4009
|
) : null;
|
|
3967
4010
|
}
|
|
3968
|
-
function
|
|
4011
|
+
function vl({ icon: e, destructive: t, className: n, children: r, ...s }) {
|
|
3969
4012
|
return /* @__PURE__ */ S(
|
|
3970
4013
|
"button",
|
|
3971
4014
|
{
|
|
@@ -3979,16 +4022,16 @@ function pl({ icon: e, destructive: t, className: n, children: r, ...s }) {
|
|
|
3979
4022
|
}
|
|
3980
4023
|
);
|
|
3981
4024
|
}
|
|
3982
|
-
function
|
|
4025
|
+
function hl({ className: e, ...t }) {
|
|
3983
4026
|
return /* @__PURE__ */ a("ul", { className: T("vxm-list", e), role: "list", ...t });
|
|
3984
4027
|
}
|
|
3985
|
-
function
|
|
4028
|
+
function ml({ title: e, className: t, children: n, ...r }) {
|
|
3986
4029
|
return /* @__PURE__ */ S("div", { className: T("vxm-list-section", t), ...r, children: [
|
|
3987
4030
|
e && /* @__PURE__ */ a("div", { className: "vxm-list-section__title", children: e }),
|
|
3988
4031
|
n
|
|
3989
4032
|
] });
|
|
3990
4033
|
}
|
|
3991
|
-
function
|
|
4034
|
+
function gl({
|
|
3992
4035
|
leading: e,
|
|
3993
4036
|
trailing: t,
|
|
3994
4037
|
label: n,
|
|
@@ -4032,7 +4075,7 @@ function hl({
|
|
|
4032
4075
|
}
|
|
4033
4076
|
);
|
|
4034
4077
|
}
|
|
4035
|
-
function
|
|
4078
|
+
function bl({
|
|
4036
4079
|
open: e,
|
|
4037
4080
|
onClose: t,
|
|
4038
4081
|
width: n = 280,
|
|
@@ -4041,7 +4084,7 @@ function ml({
|
|
|
4041
4084
|
children: o,
|
|
4042
4085
|
className: l
|
|
4043
4086
|
}) {
|
|
4044
|
-
const i = L(null), u = L(0), c = L(0), [d, p] =
|
|
4087
|
+
const i = L(null), u = L(0), c = L(0), [d, p] = F(!1), [x, k] = F(0);
|
|
4045
4088
|
O(() => {
|
|
4046
4089
|
e || (k(0), c.current = 0);
|
|
4047
4090
|
}, [e]), O(() => {
|
|
@@ -4097,7 +4140,7 @@ function ml({
|
|
|
4097
4140
|
)
|
|
4098
4141
|
] });
|
|
4099
4142
|
}
|
|
4100
|
-
function
|
|
4143
|
+
function xl({ icon: e, label: t, badge: n, active: r, onClick: s }) {
|
|
4101
4144
|
return /* @__PURE__ */ S(
|
|
4102
4145
|
"button",
|
|
4103
4146
|
{
|
|
@@ -4113,41 +4156,41 @@ function gl({ icon: e, label: t, badge: n, active: r, onClick: s }) {
|
|
|
4113
4156
|
}
|
|
4114
4157
|
);
|
|
4115
4158
|
}
|
|
4116
|
-
function
|
|
4159
|
+
function yl({ title: e, children: t }) {
|
|
4117
4160
|
return /* @__PURE__ */ S("div", { className: "vxm-drawer-section", children: [
|
|
4118
4161
|
e && /* @__PURE__ */ a("div", { className: "vxm-drawer-section__title", children: e }),
|
|
4119
4162
|
/* @__PURE__ */ a("div", { className: "vxm-drawer-section__items", children: t })
|
|
4120
4163
|
] });
|
|
4121
4164
|
}
|
|
4122
|
-
const
|
|
4165
|
+
const _l = re(function({ className: t, required: n, children: r, ...s }, o) {
|
|
4123
4166
|
return /* @__PURE__ */ S("label", { ref: o, className: T("vx-label", t), ...s, children: [
|
|
4124
4167
|
r,
|
|
4125
4168
|
n ? /* @__PURE__ */ a("span", { className: "vx-label__required", "aria-hidden": "true", children: " *" }) : null
|
|
4126
4169
|
] });
|
|
4127
|
-
}),
|
|
4128
|
-
function
|
|
4129
|
-
return ye(
|
|
4170
|
+
}), Rr = _e({});
|
|
4171
|
+
function ei() {
|
|
4172
|
+
return ye(Rr);
|
|
4130
4173
|
}
|
|
4131
|
-
function
|
|
4174
|
+
function wl({ className: e, ...t }) {
|
|
4132
4175
|
return /* @__PURE__ */ a("form", { noValidate: !0, className: T("vx-form", e), ...t });
|
|
4133
4176
|
}
|
|
4134
|
-
function
|
|
4135
|
-
return /* @__PURE__ */ a(
|
|
4177
|
+
function kl({ error: e, children: t, className: n }) {
|
|
4178
|
+
return /* @__PURE__ */ a(Rr.Provider, { value: { error: e }, children: /* @__PURE__ */ a("div", { className: T("vx-form-field", e && "vx-form-field--invalid", n), children: t }) });
|
|
4136
4179
|
}
|
|
4137
|
-
function
|
|
4180
|
+
function Nl({ className: e, required: t, children: n, ...r }) {
|
|
4138
4181
|
return /* @__PURE__ */ S("label", { className: T("vx-form-label", e), ...r, children: [
|
|
4139
4182
|
n,
|
|
4140
4183
|
t ? /* @__PURE__ */ a("span", { className: "vx-form-label__required", "aria-hidden": "true", children: " *" }) : null
|
|
4141
4184
|
] });
|
|
4142
4185
|
}
|
|
4143
|
-
function
|
|
4186
|
+
function Sl({ className: e, children: t, ...n }) {
|
|
4144
4187
|
return /* @__PURE__ */ a("p", { className: T("vx-form-description", e), ...n, children: t });
|
|
4145
4188
|
}
|
|
4146
|
-
function
|
|
4147
|
-
const { error: r } =
|
|
4189
|
+
function El({ className: e, children: t, ...n }) {
|
|
4190
|
+
const { error: r } = ei(), s = r ?? t;
|
|
4148
4191
|
return s ? /* @__PURE__ */ a("p", { className: T("vx-form-message", r && "vx-form-message--error", e), ...n, children: s }) : null;
|
|
4149
4192
|
}
|
|
4150
|
-
function
|
|
4193
|
+
function Tl({
|
|
4151
4194
|
trigger: e,
|
|
4152
4195
|
title: t,
|
|
4153
4196
|
description: n,
|
|
@@ -4159,30 +4202,43 @@ function Sl({
|
|
|
4159
4202
|
className: u,
|
|
4160
4203
|
...c
|
|
4161
4204
|
}) {
|
|
4162
|
-
|
|
4163
|
-
/* @__PURE__ */ a(
|
|
4164
|
-
/* @__PURE__ */
|
|
4165
|
-
|
|
4205
|
+
const d = Kn(), p = /* @__PURE__ */ S("div", { className: "vx-alert-dialog__footer", children: [
|
|
4206
|
+
/* @__PURE__ */ a(ze, { asChild: !0, children: /* @__PURE__ */ a(fe, { variant: "secondary", onClick: l, children: s }) }),
|
|
4207
|
+
/* @__PURE__ */ a(ze, { asChild: !0, children: /* @__PURE__ */ a(fe, { variant: i === "danger" ? "danger" : "solid", onClick: o, children: r }) })
|
|
4208
|
+
] });
|
|
4209
|
+
return d ? /* @__PURE__ */ a(
|
|
4210
|
+
Vn,
|
|
4211
|
+
{
|
|
4212
|
+
trigger: e,
|
|
4213
|
+
title: t,
|
|
4214
|
+
description: n,
|
|
4215
|
+
side: "bottom",
|
|
4216
|
+
footer: p,
|
|
4217
|
+
className: T("vx-dialog--mobile-sheet", u),
|
|
4218
|
+
...c,
|
|
4219
|
+
children: null
|
|
4220
|
+
}
|
|
4221
|
+
) : /* @__PURE__ */ S(wt, { ...c, children: [
|
|
4222
|
+
/* @__PURE__ */ a(kt, { asChild: !0, children: e }),
|
|
4223
|
+
/* @__PURE__ */ S(Nt, { children: [
|
|
4224
|
+
/* @__PURE__ */ a(St, { className: "vx-dialog__overlay" }),
|
|
4166
4225
|
/* @__PURE__ */ S(
|
|
4167
|
-
|
|
4226
|
+
Et,
|
|
4168
4227
|
{
|
|
4169
4228
|
className: T("vx-alert-dialog__content", u),
|
|
4170
4229
|
role: "alertdialog",
|
|
4171
4230
|
"aria-modal": "true",
|
|
4172
4231
|
children: [
|
|
4173
|
-
/* @__PURE__ */ a(
|
|
4174
|
-
n ? /* @__PURE__ */ a(
|
|
4175
|
-
|
|
4176
|
-
/* @__PURE__ */ a(ze, { asChild: !0, children: /* @__PURE__ */ a(fe, { variant: "secondary", onClick: l, children: s }) }),
|
|
4177
|
-
/* @__PURE__ */ a(ze, { asChild: !0, children: /* @__PURE__ */ a(fe, { variant: i === "danger" ? "danger" : "solid", onClick: o, children: r }) })
|
|
4178
|
-
] })
|
|
4232
|
+
/* @__PURE__ */ a(Tt, { className: "vx-alert-dialog__title", children: t }),
|
|
4233
|
+
n ? /* @__PURE__ */ a(Ct, { className: "vx-alert-dialog__description", children: n }) : null,
|
|
4234
|
+
p
|
|
4179
4235
|
]
|
|
4180
4236
|
}
|
|
4181
4237
|
)
|
|
4182
4238
|
] })
|
|
4183
4239
|
] });
|
|
4184
4240
|
}
|
|
4185
|
-
function
|
|
4241
|
+
function Cl({
|
|
4186
4242
|
className: e,
|
|
4187
4243
|
label: t,
|
|
4188
4244
|
hint: n,
|
|
@@ -4275,16 +4331,16 @@ function El({
|
|
|
4275
4331
|
!r && n ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: n }) : null
|
|
4276
4332
|
] });
|
|
4277
4333
|
}
|
|
4278
|
-
function
|
|
4334
|
+
function ti(e, t) {
|
|
4279
4335
|
return new Date(e, t + 1, 0).getDate();
|
|
4280
4336
|
}
|
|
4281
|
-
function
|
|
4337
|
+
function ni(e, t) {
|
|
4282
4338
|
return new Date(e, t, 1).getDay();
|
|
4283
4339
|
}
|
|
4284
|
-
function
|
|
4340
|
+
function Qt(e, t) {
|
|
4285
4341
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
4286
4342
|
}
|
|
4287
|
-
function
|
|
4343
|
+
function ri({
|
|
4288
4344
|
value: e,
|
|
4289
4345
|
defaultValue: t,
|
|
4290
4346
|
onChange: n,
|
|
@@ -4293,31 +4349,31 @@ function ti({
|
|
|
4293
4349
|
className: o,
|
|
4294
4350
|
weekStartsOnMonday: l = !1
|
|
4295
4351
|
}) {
|
|
4296
|
-
const i = /* @__PURE__ */ new Date(), u = e !== void 0, [c, d] =
|
|
4352
|
+
const i = /* @__PURE__ */ new Date(), u = e !== void 0, [c, d] = F(t), p = u ? e : c, [x, k] = F((p ?? i).getFullYear()), [E, g] = F((p ?? i).getMonth()), m = ti(x, E), w = ni(x, E), h = l ? w === 0 ? 6 : w - 1 : w, v = l ? ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], f = () => {
|
|
4297
4353
|
E === 0 ? (k((P) => P - 1), g(11)) : g((P) => P - 1);
|
|
4298
4354
|
}, y = () => {
|
|
4299
4355
|
E === 11 ? (k((P) => P + 1), g(0)) : g((P) => P + 1);
|
|
4300
4356
|
}, _ = U(
|
|
4301
4357
|
(P) => {
|
|
4302
|
-
const
|
|
4358
|
+
const R = new Date(x, E, P);
|
|
4303
4359
|
if (r) {
|
|
4304
|
-
const
|
|
4305
|
-
if (
|
|
4360
|
+
const D = new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
4361
|
+
if (R < D) return !0;
|
|
4306
4362
|
}
|
|
4307
4363
|
if (s) {
|
|
4308
|
-
const
|
|
4309
|
-
if (
|
|
4364
|
+
const D = new Date(s.getFullYear(), s.getMonth(), s.getDate());
|
|
4365
|
+
if (R > D) return !0;
|
|
4310
4366
|
}
|
|
4311
4367
|
return !1;
|
|
4312
4368
|
},
|
|
4313
4369
|
[x, E, r, s]
|
|
4314
4370
|
), N = (P) => {
|
|
4315
4371
|
if (_(P)) return;
|
|
4316
|
-
const
|
|
4317
|
-
u || d(
|
|
4372
|
+
const R = new Date(x, E, P);
|
|
4373
|
+
u || d(R), n == null || n(R);
|
|
4318
4374
|
}, C = new Date(x, E).toLocaleString("default", { month: "long" }), A = [
|
|
4319
4375
|
...Array(h).fill(null),
|
|
4320
|
-
...Array.from({ length: m }, (P,
|
|
4376
|
+
...Array.from({ length: m }, (P, R) => R + 1)
|
|
4321
4377
|
];
|
|
4322
4378
|
for (; A.length % 7 !== 0; ) A.push(null);
|
|
4323
4379
|
return /* @__PURE__ */ S("div", { className: T("vx-calendar", o), children: [
|
|
@@ -4350,10 +4406,10 @@ function ti({
|
|
|
4350
4406
|
] }),
|
|
4351
4407
|
/* @__PURE__ */ S("div", { className: "vx-calendar__grid", role: "grid", "aria-label": `${C} ${x}`, children: [
|
|
4352
4408
|
v.map((P) => /* @__PURE__ */ a("div", { className: "vx-calendar__weekday", role: "columnheader", children: P }, P)),
|
|
4353
|
-
A.map((P,
|
|
4409
|
+
A.map((P, R) => {
|
|
4354
4410
|
if (P === null)
|
|
4355
|
-
return /* @__PURE__ */ a("div", { className: "vx-calendar__cell vx-calendar__cell--empty" }, `e-${
|
|
4356
|
-
const
|
|
4411
|
+
return /* @__PURE__ */ a("div", { className: "vx-calendar__cell vx-calendar__cell--empty" }, `e-${R}`);
|
|
4412
|
+
const D = new Date(x, E, P), $ = Qt(D, i), I = p ? Qt(D, p) : !1, W = _(P);
|
|
4357
4413
|
return /* @__PURE__ */ a(
|
|
4358
4414
|
"button",
|
|
4359
4415
|
{
|
|
@@ -4367,7 +4423,7 @@ function ti({
|
|
|
4367
4423
|
),
|
|
4368
4424
|
onClick: () => N(P),
|
|
4369
4425
|
disabled: W,
|
|
4370
|
-
"aria-label":
|
|
4426
|
+
"aria-label": D.toLocaleDateString(),
|
|
4371
4427
|
"aria-selected": I,
|
|
4372
4428
|
children: P
|
|
4373
4429
|
},
|
|
@@ -4377,17 +4433,17 @@ function ti({
|
|
|
4377
4433
|
] })
|
|
4378
4434
|
] });
|
|
4379
4435
|
}
|
|
4380
|
-
function
|
|
4436
|
+
function ai(e) {
|
|
4381
4437
|
return e.toLocaleDateString();
|
|
4382
4438
|
}
|
|
4383
|
-
function
|
|
4439
|
+
function si() {
|
|
4384
4440
|
return /* @__PURE__ */ S("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", "aria-hidden": "true", children: [
|
|
4385
4441
|
/* @__PURE__ */ a("rect", { x: "1", y: "3", width: "13", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
4386
4442
|
/* @__PURE__ */ a("path", { d: "M1 6.5h13", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
4387
4443
|
/* @__PURE__ */ a("path", { d: "M5 1v3M10 1v3", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" })
|
|
4388
4444
|
] });
|
|
4389
4445
|
}
|
|
4390
|
-
function
|
|
4446
|
+
function Al({
|
|
4391
4447
|
value: e,
|
|
4392
4448
|
defaultValue: t,
|
|
4393
4449
|
onChange: n,
|
|
@@ -4401,7 +4457,7 @@ function Tl({
|
|
|
4401
4457
|
weekStartsOnMonday: d,
|
|
4402
4458
|
className: p
|
|
4403
4459
|
}) {
|
|
4404
|
-
const x = e !== void 0, [k, E] =
|
|
4460
|
+
const x = e !== void 0, [k, E] = F(t), g = x ? e : k, [m, w] = F(!1), h = L(null);
|
|
4405
4461
|
O(() => {
|
|
4406
4462
|
if (!m) return;
|
|
4407
4463
|
const f = (_) => {
|
|
@@ -4432,15 +4488,15 @@ function Tl({
|
|
|
4432
4488
|
"aria-haspopup": "dialog",
|
|
4433
4489
|
"aria-expanded": m,
|
|
4434
4490
|
children: [
|
|
4435
|
-
/* @__PURE__ */ a(
|
|
4436
|
-
/* @__PURE__ */ a("span", { className: T("vx-datepicker__value", !g && "vx-datepicker__value--placeholder"), children: g ?
|
|
4491
|
+
/* @__PURE__ */ a(si, {}),
|
|
4492
|
+
/* @__PURE__ */ a("span", { className: T("vx-datepicker__value", !g && "vx-datepicker__value--placeholder"), children: g ? ai(g) : r })
|
|
4437
4493
|
]
|
|
4438
4494
|
}
|
|
4439
4495
|
),
|
|
4440
4496
|
l ? /* @__PURE__ */ a("span", { className: "vx-field-group__error", children: l }) : null,
|
|
4441
4497
|
!l && o ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: o }) : null,
|
|
4442
4498
|
m ? /* @__PURE__ */ a("div", { className: "vx-datepicker__popover", role: "dialog", "aria-label": "Date picker", children: /* @__PURE__ */ a(
|
|
4443
|
-
|
|
4499
|
+
ri,
|
|
4444
4500
|
{
|
|
4445
4501
|
value: g,
|
|
4446
4502
|
onChange: v,
|
|
@@ -4451,7 +4507,7 @@ function Tl({
|
|
|
4451
4507
|
) }) : null
|
|
4452
4508
|
] });
|
|
4453
4509
|
}
|
|
4454
|
-
function
|
|
4510
|
+
function Pl({
|
|
4455
4511
|
options: e,
|
|
4456
4512
|
value: t,
|
|
4457
4513
|
defaultValue: n,
|
|
@@ -4466,34 +4522,34 @@ function Cl({
|
|
|
4466
4522
|
emptyText: p = "No results",
|
|
4467
4523
|
className: x
|
|
4468
4524
|
}) {
|
|
4469
|
-
const k = t !== void 0, [E, g] =
|
|
4470
|
-
(
|
|
4525
|
+
const k = t !== void 0, [E, g] = F(n), m = k ? t : E, [w, h] = F(!1), [v, f] = F(""), y = L(null), _ = L(null), N = Mr(), C = e.find((D) => D.value === m), A = e.filter(
|
|
4526
|
+
(D) => D.label.toLowerCase().includes(v.toLowerCase())
|
|
4471
4527
|
);
|
|
4472
4528
|
O(() => {
|
|
4473
4529
|
if (!w) {
|
|
4474
4530
|
f("");
|
|
4475
4531
|
return;
|
|
4476
4532
|
}
|
|
4477
|
-
const
|
|
4533
|
+
const D = setTimeout(() => {
|
|
4478
4534
|
var $;
|
|
4479
4535
|
return ($ = _.current) == null ? void 0 : $.focus();
|
|
4480
4536
|
}, 0);
|
|
4481
|
-
return () => clearTimeout(
|
|
4537
|
+
return () => clearTimeout(D);
|
|
4482
4538
|
}, [w]), O(() => {
|
|
4483
4539
|
if (!w) return;
|
|
4484
|
-
const
|
|
4540
|
+
const D = (I) => {
|
|
4485
4541
|
y.current && !y.current.contains(I.target) && h(!1);
|
|
4486
4542
|
}, $ = (I) => {
|
|
4487
4543
|
I.key === "Escape" && h(!1);
|
|
4488
4544
|
};
|
|
4489
|
-
return document.addEventListener("mousedown",
|
|
4490
|
-
document.removeEventListener("mousedown",
|
|
4545
|
+
return document.addEventListener("mousedown", D), document.addEventListener("keydown", $), () => {
|
|
4546
|
+
document.removeEventListener("mousedown", D), document.removeEventListener("keydown", $);
|
|
4491
4547
|
};
|
|
4492
4548
|
}, [w]);
|
|
4493
|
-
const P = (
|
|
4494
|
-
|
|
4495
|
-
},
|
|
4496
|
-
|
|
4549
|
+
const P = (D) => {
|
|
4550
|
+
D.disabled || (k || g(D.value), r == null || r(D.value), h(!1));
|
|
4551
|
+
}, R = (D) => {
|
|
4552
|
+
D.stopPropagation(), k || g(void 0), r == null || r(void 0);
|
|
4497
4553
|
};
|
|
4498
4554
|
return /* @__PURE__ */ S("div", { ref: y, className: T("vx-combobox", x), children: [
|
|
4499
4555
|
l ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: l }) : null,
|
|
@@ -4506,7 +4562,7 @@ function Cl({
|
|
|
4506
4562
|
u && "vx-combobox__trigger--invalid",
|
|
4507
4563
|
c && "vx-combobox__trigger--disabled"
|
|
4508
4564
|
),
|
|
4509
|
-
onClick: () => !c && h((
|
|
4565
|
+
onClick: () => !c && h((D) => !D),
|
|
4510
4566
|
disabled: c,
|
|
4511
4567
|
"aria-haspopup": "listbox",
|
|
4512
4568
|
"aria-expanded": w,
|
|
@@ -4518,14 +4574,14 @@ function Cl({
|
|
|
4518
4574
|
"span",
|
|
4519
4575
|
{
|
|
4520
4576
|
className: "vx-combobox__clear",
|
|
4521
|
-
onClick:
|
|
4577
|
+
onClick: R,
|
|
4522
4578
|
role: "button",
|
|
4523
4579
|
"aria-label": "Clear selection",
|
|
4524
4580
|
children: /* @__PURE__ */ a(ve, { size: 14 })
|
|
4525
4581
|
}
|
|
4526
4582
|
),
|
|
4527
4583
|
/* @__PURE__ */ a(
|
|
4528
|
-
|
|
4584
|
+
mt,
|
|
4529
4585
|
{
|
|
4530
4586
|
size: 14,
|
|
4531
4587
|
className: T("vx-combobox__chevron", w && "vx-combobox__chevron--open")
|
|
@@ -4546,33 +4602,33 @@ function Cl({
|
|
|
4546
4602
|
className: "vx-combobox__search",
|
|
4547
4603
|
placeholder: o,
|
|
4548
4604
|
value: v,
|
|
4549
|
-
onChange: (
|
|
4605
|
+
onChange: (D) => f(D.target.value),
|
|
4550
4606
|
"aria-label": o
|
|
4551
4607
|
}
|
|
4552
4608
|
) }),
|
|
4553
|
-
/* @__PURE__ */ a("ul", { id: N, className: "vx-combobox__list", role: "listbox", "aria-label": l ?? "Options", children: A.length === 0 ? /* @__PURE__ */ a("li", { className: "vx-combobox__empty", children: p }) : A.map((
|
|
4609
|
+
/* @__PURE__ */ a("ul", { id: N, className: "vx-combobox__list", role: "listbox", "aria-label": l ?? "Options", children: A.length === 0 ? /* @__PURE__ */ a("li", { className: "vx-combobox__empty", children: p }) : A.map((D) => /* @__PURE__ */ S(
|
|
4554
4610
|
"li",
|
|
4555
4611
|
{
|
|
4556
4612
|
className: T(
|
|
4557
4613
|
"vx-combobox__option",
|
|
4558
|
-
|
|
4559
|
-
|
|
4614
|
+
D.value === m && "vx-combobox__option--selected",
|
|
4615
|
+
D.disabled && "vx-combobox__option--disabled"
|
|
4560
4616
|
),
|
|
4561
4617
|
role: "option",
|
|
4562
|
-
"aria-selected":
|
|
4563
|
-
"aria-disabled":
|
|
4564
|
-
onClick: () => P(
|
|
4618
|
+
"aria-selected": D.value === m,
|
|
4619
|
+
"aria-disabled": D.disabled,
|
|
4620
|
+
onClick: () => P(D),
|
|
4565
4621
|
children: [
|
|
4566
|
-
/* @__PURE__ */ a("span", { children:
|
|
4567
|
-
|
|
4622
|
+
/* @__PURE__ */ a("span", { children: D.label }),
|
|
4623
|
+
D.value === m ? /* @__PURE__ */ a(ht, { size: 14 }) : null
|
|
4568
4624
|
]
|
|
4569
4625
|
},
|
|
4570
|
-
|
|
4626
|
+
D.value
|
|
4571
4627
|
)) })
|
|
4572
4628
|
] })
|
|
4573
4629
|
] });
|
|
4574
4630
|
}
|
|
4575
|
-
function
|
|
4631
|
+
function Dl({
|
|
4576
4632
|
label: e,
|
|
4577
4633
|
hint: t,
|
|
4578
4634
|
error: n,
|
|
@@ -4583,7 +4639,7 @@ function Al({
|
|
|
4583
4639
|
onFiles: i,
|
|
4584
4640
|
className: u
|
|
4585
4641
|
}) {
|
|
4586
|
-
const [c, d] =
|
|
4642
|
+
const [c, d] = F(!1), [p, x] = F([]), [k, E] = F(), g = L(null), m = U(
|
|
4587
4643
|
(y) => {
|
|
4588
4644
|
if (!y) return;
|
|
4589
4645
|
const _ = Array.from(y);
|
|
@@ -4633,7 +4689,7 @@ function Al({
|
|
|
4633
4689
|
},
|
|
4634
4690
|
"aria-label": "Upload files, click or drag and drop",
|
|
4635
4691
|
children: [
|
|
4636
|
-
/* @__PURE__ */ a(
|
|
4692
|
+
/* @__PURE__ */ a(aa, { size: 24, className: "vx-file-upload__icon" }),
|
|
4637
4693
|
/* @__PURE__ */ S("p", { className: "vx-file-upload__text", children: [
|
|
4638
4694
|
/* @__PURE__ */ a("span", { className: "vx-file-upload__link", children: "Click to upload" }),
|
|
4639
4695
|
" or drag and drop"
|
|
@@ -4658,7 +4714,7 @@ function Al({
|
|
|
4658
4714
|
),
|
|
4659
4715
|
f ? /* @__PURE__ */ a("span", { className: "vx-field-group__error", children: f }) : null,
|
|
4660
4716
|
p.length > 0 && /* @__PURE__ */ a("ul", { className: "vx-file-upload__list", children: p.map(({ id: y, file: _ }) => /* @__PURE__ */ S("li", { className: "vx-file-upload__file", children: [
|
|
4661
|
-
/* @__PURE__ */ a(
|
|
4717
|
+
/* @__PURE__ */ a(Qr, { size: 14, className: "vx-file-upload__file-icon" }),
|
|
4662
4718
|
/* @__PURE__ */ a("span", { className: "vx-file-upload__file-name", children: _.name }),
|
|
4663
4719
|
/* @__PURE__ */ S("span", { className: "vx-file-upload__file-size", children: [
|
|
4664
4720
|
(_.size / 1024).toFixed(0),
|
|
@@ -4677,34 +4733,6 @@ function Al({
|
|
|
4677
4733
|
] }, y)) })
|
|
4678
4734
|
] });
|
|
4679
4735
|
}
|
|
4680
|
-
function Pl({
|
|
4681
|
-
trigger: e,
|
|
4682
|
-
title: t,
|
|
4683
|
-
description: n,
|
|
4684
|
-
side: r = "right",
|
|
4685
|
-
children: s,
|
|
4686
|
-
footer: o,
|
|
4687
|
-
className: l,
|
|
4688
|
-
...i
|
|
4689
|
-
}) {
|
|
4690
|
-
return /* @__PURE__ */ S(_t, { ...i, children: [
|
|
4691
|
-
e ? /* @__PURE__ */ a(wt, { asChild: !0, children: e }) : null,
|
|
4692
|
-
/* @__PURE__ */ S(kt, { children: [
|
|
4693
|
-
/* @__PURE__ */ a(Nt, { className: "vx-sheet__overlay" }),
|
|
4694
|
-
/* @__PURE__ */ S(St, { className: T("vx-sheet", `vx-sheet--${r}`, l), children: [
|
|
4695
|
-
/* @__PURE__ */ S("div", { className: "vx-sheet__header", children: [
|
|
4696
|
-
/* @__PURE__ */ S("div", { children: [
|
|
4697
|
-
t ? /* @__PURE__ */ a(Et, { className: "vx-sheet__title", children: t }) : null,
|
|
4698
|
-
n ? /* @__PURE__ */ a(Tt, { className: "vx-sheet__description", children: n }) : null
|
|
4699
|
-
] }),
|
|
4700
|
-
/* @__PURE__ */ a(ze, { className: "vx-dialog__close", "aria-label": "Close", children: /* @__PURE__ */ a(ve, { size: 16 }) })
|
|
4701
|
-
] }),
|
|
4702
|
-
/* @__PURE__ */ a("div", { className: "vx-sheet__body", children: s }),
|
|
4703
|
-
o ? /* @__PURE__ */ a("div", { className: "vx-sheet__footer", children: o }) : null
|
|
4704
|
-
] })
|
|
4705
|
-
] })
|
|
4706
|
-
] });
|
|
4707
|
-
}
|
|
4708
4736
|
function Rl({
|
|
4709
4737
|
maxHeight: e,
|
|
4710
4738
|
maxWidth: t,
|
|
@@ -4737,7 +4765,7 @@ function Fl({
|
|
|
4737
4765
|
onClick: l,
|
|
4738
4766
|
...i
|
|
4739
4767
|
}) {
|
|
4740
|
-
const [u, c] =
|
|
4768
|
+
const [u, c] = F(t), d = e !== void 0, p = d ? e : u, x = (k) => {
|
|
4741
4769
|
d || c((E) => !E), n == null || n(!p), l == null || l(k);
|
|
4742
4770
|
};
|
|
4743
4771
|
return /* @__PURE__ */ a(
|
|
@@ -4752,7 +4780,7 @@ function Fl({
|
|
|
4752
4780
|
}
|
|
4753
4781
|
);
|
|
4754
4782
|
}
|
|
4755
|
-
function
|
|
4783
|
+
function Il({
|
|
4756
4784
|
items: e,
|
|
4757
4785
|
value: t,
|
|
4758
4786
|
defaultValue: n,
|
|
@@ -4761,7 +4789,7 @@ function Dl({
|
|
|
4761
4789
|
size: o = "md",
|
|
4762
4790
|
className: l
|
|
4763
4791
|
}) {
|
|
4764
|
-
const [i, u] =
|
|
4792
|
+
const [i, u] = F(
|
|
4765
4793
|
n ?? (s === "multiple" ? [] : "")
|
|
4766
4794
|
), c = t !== void 0, d = c ? t : i, p = (k) => Array.isArray(d) ? d.includes(k) : d === k, x = (k) => {
|
|
4767
4795
|
let E;
|
|
@@ -4790,8 +4818,8 @@ function Dl({
|
|
|
4790
4818
|
k.value
|
|
4791
4819
|
)) });
|
|
4792
4820
|
}
|
|
4793
|
-
function
|
|
4794
|
-
const [s, o] =
|
|
4821
|
+
function Ll({ groups: e, items: t, children: n, className: r }) {
|
|
4822
|
+
const [s, o] = F(null), l = L(null), i = e ?? (t ? [{ items: t }] : []);
|
|
4795
4823
|
O(() => {
|
|
4796
4824
|
if (!s) return;
|
|
4797
4825
|
const c = (p) => {
|
|
@@ -4846,14 +4874,14 @@ function Il({ groups: e, items: t, children: n, className: r }) {
|
|
|
4846
4874
|
)
|
|
4847
4875
|
] });
|
|
4848
4876
|
}
|
|
4849
|
-
function
|
|
4877
|
+
function Ml({
|
|
4850
4878
|
content: e,
|
|
4851
4879
|
placement: t = "bottom",
|
|
4852
4880
|
delay: n = 400,
|
|
4853
4881
|
children: r,
|
|
4854
4882
|
className: s
|
|
4855
4883
|
}) {
|
|
4856
|
-
const [o, l] =
|
|
4884
|
+
const [o, l] = F(!1), i = L(null), u = U(() => {
|
|
4857
4885
|
i.current = setTimeout(() => l(!0), n);
|
|
4858
4886
|
}, [n]), c = U(() => {
|
|
4859
4887
|
i.current && clearTimeout(i.current), l(!1);
|
|
@@ -4873,8 +4901,8 @@ function Ll({
|
|
|
4873
4901
|
}
|
|
4874
4902
|
);
|
|
4875
4903
|
}
|
|
4876
|
-
function
|
|
4877
|
-
const [n, r] =
|
|
4904
|
+
function Ol({ menus: e, className: t }) {
|
|
4905
|
+
const [n, r] = F(null), s = L(null);
|
|
4878
4906
|
return O(() => {
|
|
4879
4907
|
if (n === null) return;
|
|
4880
4908
|
const o = (i) => {
|
|
@@ -4934,8 +4962,8 @@ function Ml({ menus: e, className: t }) {
|
|
|
4934
4962
|
] }, l);
|
|
4935
4963
|
}) });
|
|
4936
4964
|
}
|
|
4937
|
-
function
|
|
4938
|
-
const [n, r] =
|
|
4965
|
+
function $l({ items: e, className: t }) {
|
|
4966
|
+
const [n, r] = F(null), s = L(null);
|
|
4939
4967
|
return O(() => {
|
|
4940
4968
|
if (n === null) return;
|
|
4941
4969
|
const o = (i) => {
|
|
@@ -4964,7 +4992,7 @@ function Ol({ items: e, className: t }) {
|
|
|
4964
4992
|
children: [
|
|
4965
4993
|
o.label,
|
|
4966
4994
|
/* @__PURE__ */ a(
|
|
4967
|
-
|
|
4995
|
+
mt,
|
|
4968
4996
|
{
|
|
4969
4997
|
size: 14,
|
|
4970
4998
|
className: T(
|
|
@@ -5009,7 +5037,7 @@ function Ol({ items: e, className: t }) {
|
|
|
5009
5037
|
] }, l);
|
|
5010
5038
|
}) }) });
|
|
5011
5039
|
}
|
|
5012
|
-
function
|
|
5040
|
+
function Bl({
|
|
5013
5041
|
steps: e,
|
|
5014
5042
|
currentStep: t = 0,
|
|
5015
5043
|
orientation: n = "horizontal",
|
|
@@ -5023,7 +5051,7 @@ function $l({
|
|
|
5023
5051
|
children: e.map((s, o) => {
|
|
5024
5052
|
const l = s.status ?? (o < t ? "completed" : o === t ? "active" : "pending");
|
|
5025
5053
|
return /* @__PURE__ */ S("li", { className: T("vx-stepper__step", `vx-stepper__step--${l}`), children: [
|
|
5026
|
-
/* @__PURE__ */ a("div", { className: "vx-stepper__indicator", "aria-hidden": "true", children: l === "completed" ? /* @__PURE__ */ a(
|
|
5054
|
+
/* @__PURE__ */ a("div", { className: "vx-stepper__indicator", "aria-hidden": "true", children: l === "completed" ? /* @__PURE__ */ a(ht, { size: 14 }) : /* @__PURE__ */ a("span", { children: o + 1 }) }),
|
|
5027
5055
|
/* @__PURE__ */ S("div", { className: "vx-stepper__content", children: [
|
|
5028
5056
|
/* @__PURE__ */ a("span", { className: "vx-stepper__label", children: s.label }),
|
|
5029
5057
|
s.description && /* @__PURE__ */ a("span", { className: "vx-stepper__description", children: s.description })
|
|
@@ -5034,7 +5062,7 @@ function $l({
|
|
|
5034
5062
|
}
|
|
5035
5063
|
);
|
|
5036
5064
|
}
|
|
5037
|
-
function
|
|
5065
|
+
function zl({ items: e, className: t }) {
|
|
5038
5066
|
return /* @__PURE__ */ a("ol", { className: T("vx-timeline", t), "aria-label": "Timeline", children: e.map((n, r) => /* @__PURE__ */ S(
|
|
5039
5067
|
"li",
|
|
5040
5068
|
{
|
|
@@ -5056,7 +5084,7 @@ function Bl({ items: e, className: t }) {
|
|
|
5056
5084
|
r
|
|
5057
5085
|
)) });
|
|
5058
5086
|
}
|
|
5059
|
-
function
|
|
5087
|
+
function Ul({ icon: e, title: t, description: n, action: r, className: s }) {
|
|
5060
5088
|
return /* @__PURE__ */ S("div", { className: T("vx-empty-state", s), role: "status", "aria-live": "polite", children: [
|
|
5061
5089
|
e && /* @__PURE__ */ a("div", { className: "vx-empty-state__icon", "aria-hidden": "true", children: e }),
|
|
5062
5090
|
/* @__PURE__ */ a("p", { className: "vx-empty-state__title", children: t }),
|
|
@@ -5064,7 +5092,7 @@ function zl({ icon: e, title: t, description: n, action: r, className: s }) {
|
|
|
5064
5092
|
r && /* @__PURE__ */ a("div", { className: "vx-empty-state__action", children: r })
|
|
5065
5093
|
] });
|
|
5066
5094
|
}
|
|
5067
|
-
function
|
|
5095
|
+
function Wl({
|
|
5068
5096
|
items: e,
|
|
5069
5097
|
defaultIndex: t = 0,
|
|
5070
5098
|
index: n,
|
|
@@ -5076,7 +5104,7 @@ function Ul({
|
|
|
5076
5104
|
showArrows: u = !0,
|
|
5077
5105
|
className: c
|
|
5078
5106
|
}) {
|
|
5079
|
-
const d = n !== void 0, [p, x] =
|
|
5107
|
+
const d = n !== void 0, [p, x] = F(t), k = d ? n : p, E = e.length, g = L(null), m = U(
|
|
5080
5108
|
(v) => {
|
|
5081
5109
|
let f = v;
|
|
5082
5110
|
l ? f = (v % E + E) % E : f = Math.max(0, Math.min(v, E - 1)), d || x(f), r == null || r(f);
|
|
@@ -5157,7 +5185,7 @@ function Ul({
|
|
|
5157
5185
|
}
|
|
5158
5186
|
);
|
|
5159
5187
|
}
|
|
5160
|
-
function
|
|
5188
|
+
function oi({ filled: e, half: t }) {
|
|
5161
5189
|
return /* @__PURE__ */ a("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: t ? /* @__PURE__ */ S(q, { children: [
|
|
5162
5190
|
/* @__PURE__ */ a("defs", { children: /* @__PURE__ */ S("linearGradient", { id: "vx-star-half", children: [
|
|
5163
5191
|
/* @__PURE__ */ a("stop", { offset: "50%", stopColor: "currentColor" }),
|
|
@@ -5184,7 +5212,7 @@ function ai({ filled: e, half: t }) {
|
|
|
5184
5212
|
}
|
|
5185
5213
|
) });
|
|
5186
5214
|
}
|
|
5187
|
-
function
|
|
5215
|
+
function Hl({
|
|
5188
5216
|
value: e,
|
|
5189
5217
|
defaultValue: t = 0,
|
|
5190
5218
|
onChange: n,
|
|
@@ -5196,7 +5224,7 @@ function Wl({
|
|
|
5196
5224
|
className: u,
|
|
5197
5225
|
size: c = "md"
|
|
5198
5226
|
}) {
|
|
5199
|
-
const d = e !== void 0, [p, x] =
|
|
5227
|
+
const d = e !== void 0, [p, x] = F(t), k = d ? e : p, [E, g] = F(null), m = E ?? k, w = (f, y) => {
|
|
5200
5228
|
if (!s) return f;
|
|
5201
5229
|
const _ = y.currentTarget.getBoundingClientRect();
|
|
5202
5230
|
return y.clientX - _.left < _.width / 2 ? f - 0.5 : f;
|
|
@@ -5230,7 +5258,7 @@ function Wl({
|
|
|
5230
5258
|
"aria-label": `${_} star${_ !== 1 ? "s" : ""}`,
|
|
5231
5259
|
"aria-pressed": k >= _,
|
|
5232
5260
|
tabIndex: l || o ? -1 : 0,
|
|
5233
|
-
children: /* @__PURE__ */ a(
|
|
5261
|
+
children: /* @__PURE__ */ a(oi, { filled: N, half: C })
|
|
5234
5262
|
},
|
|
5235
5263
|
y
|
|
5236
5264
|
);
|
|
@@ -5238,7 +5266,7 @@ function Wl({
|
|
|
5238
5266
|
}
|
|
5239
5267
|
);
|
|
5240
5268
|
}
|
|
5241
|
-
function
|
|
5269
|
+
function Fr({ node: e, depth: t, selected: n, expanded: r, onSelect: s, onToggle: o }) {
|
|
5242
5270
|
const l = e.children && e.children.length > 0, i = r.has(e.id), u = n === e.id, c = (d) => {
|
|
5243
5271
|
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), e.disabled || s(e.id, e)), d.key === "ArrowRight" && l && !i && (d.preventDefault(), o(e.id)), d.key === "ArrowLeft" && i && (d.preventDefault(), o(e.id));
|
|
5244
5272
|
};
|
|
@@ -5273,7 +5301,7 @@ function Rr({ node: e, depth: t, selected: n, expanded: r, onSelect: s, onToggle
|
|
|
5273
5301
|
}
|
|
5274
5302
|
),
|
|
5275
5303
|
l && i && /* @__PURE__ */ a("ul", { role: "group", className: "vx-tree__children", children: e.children.map((d) => /* @__PURE__ */ a(
|
|
5276
|
-
|
|
5304
|
+
Fr,
|
|
5277
5305
|
{
|
|
5278
5306
|
node: d,
|
|
5279
5307
|
depth: t + 1,
|
|
@@ -5286,7 +5314,7 @@ function Rr({ node: e, depth: t, selected: n, expanded: r, onSelect: s, onToggle
|
|
|
5286
5314
|
)) })
|
|
5287
5315
|
] });
|
|
5288
5316
|
}
|
|
5289
|
-
function
|
|
5317
|
+
function Gl({
|
|
5290
5318
|
nodes: e,
|
|
5291
5319
|
selected: t,
|
|
5292
5320
|
defaultSelected: n,
|
|
@@ -5296,7 +5324,7 @@ function Hl({
|
|
|
5296
5324
|
onExpandedChange: l,
|
|
5297
5325
|
className: i
|
|
5298
5326
|
}) {
|
|
5299
|
-
const u = t !== void 0, [c, d] =
|
|
5327
|
+
const u = t !== void 0, [c, d] = F(n), p = u ? t : c, x = o !== void 0, [k, E] = F(
|
|
5300
5328
|
new Set(s)
|
|
5301
5329
|
), g = x ? new Set(o) : k, m = U(
|
|
5302
5330
|
(h, v) => {
|
|
@@ -5317,7 +5345,7 @@ function Hl({
|
|
|
5317
5345
|
role: "tree",
|
|
5318
5346
|
"aria-multiselectable": "false",
|
|
5319
5347
|
children: e.map((h) => /* @__PURE__ */ a(
|
|
5320
|
-
|
|
5348
|
+
Fr,
|
|
5321
5349
|
{
|
|
5322
5350
|
node: h,
|
|
5323
5351
|
depth: 0,
|
|
@@ -5331,7 +5359,7 @@ function Hl({
|
|
|
5331
5359
|
}
|
|
5332
5360
|
);
|
|
5333
5361
|
}
|
|
5334
|
-
function
|
|
5362
|
+
function jl({
|
|
5335
5363
|
value: e,
|
|
5336
5364
|
defaultValue: t = [],
|
|
5337
5365
|
onChange: n,
|
|
@@ -5346,12 +5374,12 @@ function Gl({
|
|
|
5346
5374
|
className: p,
|
|
5347
5375
|
...x
|
|
5348
5376
|
}) {
|
|
5349
|
-
const k = e !== void 0, [E, g] =
|
|
5350
|
-
k || g(
|
|
5351
|
-
}, N = (
|
|
5352
|
-
const
|
|
5353
|
-
if (
|
|
5354
|
-
if (m.includes(
|
|
5377
|
+
const k = e !== void 0, [E, g] = F(t), m = k ? e : E, [w, h] = F(""), [v, f] = F(), y = L(null), _ = (R) => {
|
|
5378
|
+
k || g(R), n == null || n(R);
|
|
5379
|
+
}, N = (R) => {
|
|
5380
|
+
const D = R.trim();
|
|
5381
|
+
if (D) {
|
|
5382
|
+
if (m.includes(D)) {
|
|
5355
5383
|
f("Tag already exists");
|
|
5356
5384
|
return;
|
|
5357
5385
|
}
|
|
@@ -5360,7 +5388,7 @@ function Gl({
|
|
|
5360
5388
|
return;
|
|
5361
5389
|
}
|
|
5362
5390
|
if (c) {
|
|
5363
|
-
const $ = c(
|
|
5391
|
+
const $ = c(D);
|
|
5364
5392
|
if ($ === !1) {
|
|
5365
5393
|
f("Invalid tag");
|
|
5366
5394
|
return;
|
|
@@ -5370,12 +5398,12 @@ function Gl({
|
|
|
5370
5398
|
return;
|
|
5371
5399
|
}
|
|
5372
5400
|
}
|
|
5373
|
-
f(void 0), _([...m,
|
|
5401
|
+
f(void 0), _([...m, D]), h("");
|
|
5374
5402
|
}
|
|
5375
|
-
}, C = (
|
|
5376
|
-
_(m.filter((
|
|
5377
|
-
}, A = (
|
|
5378
|
-
i.includes(
|
|
5403
|
+
}, C = (R) => {
|
|
5404
|
+
_(m.filter((D, $) => $ !== R));
|
|
5405
|
+
}, A = (R) => {
|
|
5406
|
+
i.includes(R.key) ? (R.preventDefault(), N(w)) : R.key === "Backspace" && !w && m.length > 0 && C(m.length - 1);
|
|
5379
5407
|
}, P = o ?? v;
|
|
5380
5408
|
return /* @__PURE__ */ S("div", { className: T("vx-tag-input", p), children: [
|
|
5381
5409
|
r ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: r }) : null,
|
|
@@ -5388,25 +5416,25 @@ function Gl({
|
|
|
5388
5416
|
d && "vx-tag-input__wrap--disabled"
|
|
5389
5417
|
),
|
|
5390
5418
|
onClick: () => {
|
|
5391
|
-
var
|
|
5392
|
-
return (
|
|
5419
|
+
var R;
|
|
5420
|
+
return (R = y.current) == null ? void 0 : R.focus();
|
|
5393
5421
|
},
|
|
5394
5422
|
children: [
|
|
5395
|
-
m.map((
|
|
5396
|
-
|
|
5423
|
+
m.map((R, D) => /* @__PURE__ */ S("span", { className: "vx-tag-input__tag", children: [
|
|
5424
|
+
R,
|
|
5397
5425
|
!d && /* @__PURE__ */ a(
|
|
5398
5426
|
"button",
|
|
5399
5427
|
{
|
|
5400
5428
|
type: "button",
|
|
5401
5429
|
className: "vx-tag-input__remove",
|
|
5402
5430
|
onClick: ($) => {
|
|
5403
|
-
$.stopPropagation(), C(
|
|
5431
|
+
$.stopPropagation(), C(D);
|
|
5404
5432
|
},
|
|
5405
|
-
"aria-label": `Remove tag ${
|
|
5433
|
+
"aria-label": `Remove tag ${R}`,
|
|
5406
5434
|
children: /* @__PURE__ */ a(ve, { size: 11 })
|
|
5407
5435
|
}
|
|
5408
5436
|
)
|
|
5409
|
-
] },
|
|
5437
|
+
] }, D)),
|
|
5410
5438
|
/* @__PURE__ */ a(
|
|
5411
5439
|
"input",
|
|
5412
5440
|
{
|
|
@@ -5416,8 +5444,8 @@ function Gl({
|
|
|
5416
5444
|
placeholder: m.length === 0 ? l : "",
|
|
5417
5445
|
disabled: d,
|
|
5418
5446
|
onKeyDown: A,
|
|
5419
|
-
onChange: (
|
|
5420
|
-
h(
|
|
5447
|
+
onChange: (R) => {
|
|
5448
|
+
h(R.target.value), f(void 0);
|
|
5421
5449
|
},
|
|
5422
5450
|
onBlur: () => {
|
|
5423
5451
|
w.trim() && N(w);
|
|
@@ -5433,7 +5461,7 @@ function Gl({
|
|
|
5433
5461
|
!P && s ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: s }) : null
|
|
5434
5462
|
] });
|
|
5435
5463
|
}
|
|
5436
|
-
function
|
|
5464
|
+
function ii(e) {
|
|
5437
5465
|
const t = parseInt(e.slice(1, 3), 16) / 255, n = parseInt(e.slice(3, 5), 16) / 255, r = parseInt(e.slice(5, 7), 16) / 255, s = Math.max(t, n, r), o = Math.min(t, n, r), l = (s + o) / 2;
|
|
5438
5466
|
let i = 0, u = 0;
|
|
5439
5467
|
if (s !== o) {
|
|
@@ -5467,10 +5495,10 @@ function st(e, t, n) {
|
|
|
5467
5495
|
const d = (p) => Math.round(p * 255).toString(16).padStart(2, "0");
|
|
5468
5496
|
return `#${d(i)}${d(u)}${d(c)}`;
|
|
5469
5497
|
}
|
|
5470
|
-
function
|
|
5498
|
+
function Jt(e) {
|
|
5471
5499
|
return /^#[0-9a-f]{6}$/i.test(e);
|
|
5472
5500
|
}
|
|
5473
|
-
const
|
|
5501
|
+
const li = [
|
|
5474
5502
|
"#ef4444",
|
|
5475
5503
|
"#f97316",
|
|
5476
5504
|
"#eab308",
|
|
@@ -5484,7 +5512,7 @@ const oi = [
|
|
|
5484
5512
|
"#ffffff",
|
|
5485
5513
|
"#f8fafc"
|
|
5486
5514
|
];
|
|
5487
|
-
function
|
|
5515
|
+
function Kl({
|
|
5488
5516
|
value: e,
|
|
5489
5517
|
defaultValue: t = "#3b82f6",
|
|
5490
5518
|
onChange: n,
|
|
@@ -5492,18 +5520,18 @@ function jl({
|
|
|
5492
5520
|
hint: s,
|
|
5493
5521
|
error: o,
|
|
5494
5522
|
disabled: l,
|
|
5495
|
-
presets: i =
|
|
5523
|
+
presets: i = li,
|
|
5496
5524
|
showPresets: u = !0,
|
|
5497
5525
|
className: c
|
|
5498
5526
|
}) {
|
|
5499
|
-
const d = e !== void 0, [p, x] =
|
|
5527
|
+
const d = e !== void 0, [p, x] = F(t), k = d ? e : p, [E, g] = F(k), [m, w] = F(!1), [h, v, f] = Jt(k) ? ii(k) : [0, 0, 50], y = U(
|
|
5500
5528
|
(N) => {
|
|
5501
5529
|
d || x(N), g(N), n == null || n(N);
|
|
5502
5530
|
},
|
|
5503
5531
|
[d, n]
|
|
5504
5532
|
), _ = (N) => {
|
|
5505
5533
|
const C = N.startsWith("#") ? N : `#${N}`;
|
|
5506
|
-
g(C),
|
|
5534
|
+
g(C), Jt(C) && y(C);
|
|
5507
5535
|
};
|
|
5508
5536
|
return /* @__PURE__ */ S("div", { className: T("vx-colorpicker", c), children: [
|
|
5509
5537
|
r ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: r }) : null,
|
|
@@ -5607,7 +5635,7 @@ function jl({
|
|
|
5607
5635
|
] })
|
|
5608
5636
|
] });
|
|
5609
5637
|
}
|
|
5610
|
-
function
|
|
5638
|
+
function Vl({
|
|
5611
5639
|
direction: e = "horizontal",
|
|
5612
5640
|
children: t,
|
|
5613
5641
|
className: n
|
|
@@ -5624,7 +5652,7 @@ function Kl({
|
|
|
5624
5652
|
}
|
|
5625
5653
|
);
|
|
5626
5654
|
}
|
|
5627
|
-
function
|
|
5655
|
+
function Yl({
|
|
5628
5656
|
children: e,
|
|
5629
5657
|
defaultSize: t = 50,
|
|
5630
5658
|
minSize: n = 10,
|
|
@@ -5643,11 +5671,11 @@ function Vl({
|
|
|
5643
5671
|
}
|
|
5644
5672
|
);
|
|
5645
5673
|
}
|
|
5646
|
-
function
|
|
5674
|
+
function ql({
|
|
5647
5675
|
className: e,
|
|
5648
5676
|
direction: t = "horizontal"
|
|
5649
5677
|
}) {
|
|
5650
|
-
const n = L(!1), [r, s] =
|
|
5678
|
+
const n = L(!1), [r, s] = F(!1), o = U(
|
|
5651
5679
|
(l) => {
|
|
5652
5680
|
const i = l.currentTarget, u = i.previousElementSibling, c = i.nextElementSibling;
|
|
5653
5681
|
if (!u || !c) return;
|
|
@@ -5681,7 +5709,7 @@ function Yl({
|
|
|
5681
5709
|
}
|
|
5682
5710
|
);
|
|
5683
5711
|
}
|
|
5684
|
-
function
|
|
5712
|
+
function en(e, t) {
|
|
5685
5713
|
if (!t) return e;
|
|
5686
5714
|
const n = e.toLowerCase().indexOf(t.toLowerCase());
|
|
5687
5715
|
return n === -1 ? e : /* @__PURE__ */ S(q, { children: [
|
|
@@ -5690,11 +5718,11 @@ function Jt(e, t) {
|
|
|
5690
5718
|
e.slice(n + t.length)
|
|
5691
5719
|
] });
|
|
5692
5720
|
}
|
|
5693
|
-
function
|
|
5721
|
+
function ci(e, t) {
|
|
5694
5722
|
const n = t.toLowerCase(), r = e.title.toLowerCase(), s = e.section.toLowerCase(), o = e.description.toLowerCase(), l = (e.keywords ?? []).join(" ").toLowerCase();
|
|
5695
5723
|
return r === n ? 100 : r.startsWith(n) ? 80 : r.includes(n) ? 60 : s.includes(n) ? 40 : l.includes(n) ? 35 : o.includes(n) ? 20 : 0;
|
|
5696
5724
|
}
|
|
5697
|
-
function
|
|
5725
|
+
function Xl({
|
|
5698
5726
|
entries: e,
|
|
5699
5727
|
open: t,
|
|
5700
5728
|
onClose: n,
|
|
@@ -5706,7 +5734,7 @@ function ql({
|
|
|
5706
5734
|
labelGo: u = "Go",
|
|
5707
5735
|
labelClose: c = "Close"
|
|
5708
5736
|
}) {
|
|
5709
|
-
const [d, p] =
|
|
5737
|
+
const [d, p] = F(""), [x, k] = F(0), E = L(null), g = L(null), m = d.trim() ? e.map((f) => ({ entry: f, s: ci(f, d.trim()) })).filter((f) => f.s > 0).sort((f, y) => y.s - f.s).map((f) => f.entry) : e;
|
|
5710
5738
|
O(() => {
|
|
5711
5739
|
t && (p(""), k(0), setTimeout(() => {
|
|
5712
5740
|
var f;
|
|
@@ -5780,8 +5808,8 @@ function ql({
|
|
|
5780
5808
|
children: [
|
|
5781
5809
|
y.icon ? /* @__PURE__ */ a("span", { className: "vx-cmd__item-icon", children: y.icon }) : /* @__PURE__ */ a("span", { className: "vx-cmd__item-icon vx-cmd__item-icon--section", children: y.section.slice(0, 1) }),
|
|
5782
5810
|
/* @__PURE__ */ S("span", { className: "vx-cmd__item-body", children: [
|
|
5783
|
-
/* @__PURE__ */ a("span", { className: "vx-cmd__item-title", children:
|
|
5784
|
-
/* @__PURE__ */ a("span", { className: "vx-cmd__item-sub", children:
|
|
5811
|
+
/* @__PURE__ */ a("span", { className: "vx-cmd__item-title", children: en(y.title, d) }),
|
|
5812
|
+
/* @__PURE__ */ a("span", { className: "vx-cmd__item-sub", children: en(y.section, d) })
|
|
5785
5813
|
] }),
|
|
5786
5814
|
C && /* @__PURE__ */ a("kbd", { className: "vx-cmd__enter", children: "↵" })
|
|
5787
5815
|
]
|
|
@@ -5811,13 +5839,13 @@ function ql({
|
|
|
5811
5839
|
}
|
|
5812
5840
|
) });
|
|
5813
5841
|
}
|
|
5814
|
-
var
|
|
5815
|
-
function
|
|
5842
|
+
var tn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5843
|
+
function ui(e) {
|
|
5816
5844
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5817
5845
|
}
|
|
5818
|
-
var ot = { exports: {} },
|
|
5819
|
-
function
|
|
5820
|
-
return
|
|
5846
|
+
var ot = { exports: {} }, nn;
|
|
5847
|
+
function di() {
|
|
5848
|
+
return nn || (nn = 1, (function(e) {
|
|
5821
5849
|
var t = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
5822
5850
|
/**
|
|
5823
5851
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
@@ -6172,8 +6200,8 @@ function ci() {
|
|
|
6172
6200
|
f.hasOwnProperty(C) || (N[C] = _[C]);
|
|
6173
6201
|
}
|
|
6174
6202
|
var P = y[h];
|
|
6175
|
-
return y[h] = N, i.languages.DFS(i.languages, function(
|
|
6176
|
-
|
|
6203
|
+
return y[h] = N, i.languages.DFS(i.languages, function(R, D) {
|
|
6204
|
+
D === P && R != h && (this[R] = N);
|
|
6177
6205
|
}), N;
|
|
6178
6206
|
},
|
|
6179
6207
|
// Traverse a language definition with Depth First Search
|
|
@@ -6268,8 +6296,8 @@ function ci() {
|
|
|
6268
6296
|
grammar: _,
|
|
6269
6297
|
code: C
|
|
6270
6298
|
};
|
|
6271
|
-
function P(
|
|
6272
|
-
A.highlightedCode =
|
|
6299
|
+
function P(D) {
|
|
6300
|
+
A.highlightedCode = D, i.hooks.run("before-insert", A), A.element.innerHTML = A.highlightedCode, i.hooks.run("after-highlight", A), i.hooks.run("complete", A), f && f.call(A.element);
|
|
6273
6301
|
}
|
|
6274
6302
|
if (i.hooks.run("before-sanity-check", A), N = A.element.parentElement, N && N.nodeName.toLowerCase() === "pre" && !N.hasAttribute("tabindex") && N.setAttribute("tabindex", "0"), !A.code) {
|
|
6275
6303
|
i.hooks.run("complete", A), f && f.call(A.element);
|
|
@@ -6280,10 +6308,10 @@ function ci() {
|
|
|
6280
6308
|
return;
|
|
6281
6309
|
}
|
|
6282
6310
|
if (v && r.Worker) {
|
|
6283
|
-
var
|
|
6284
|
-
|
|
6285
|
-
P(
|
|
6286
|
-
},
|
|
6311
|
+
var R = new Worker(i.filename);
|
|
6312
|
+
R.onmessage = function(D) {
|
|
6313
|
+
P(D.data);
|
|
6314
|
+
}, R.postMessage(JSON.stringify({
|
|
6287
6315
|
language: A.language,
|
|
6288
6316
|
code: A.code,
|
|
6289
6317
|
immediateClose: !0
|
|
@@ -6440,12 +6468,12 @@ function ci() {
|
|
|
6440
6468
|
for (var P = 0; P < A.length; ++P) {
|
|
6441
6469
|
if (N && N.cause == C + "," + P)
|
|
6442
6470
|
return;
|
|
6443
|
-
var
|
|
6444
|
-
if (I && !
|
|
6445
|
-
var H =
|
|
6446
|
-
|
|
6471
|
+
var R = A[P], D = R.inside, $ = !!R.lookbehind, I = !!R.greedy, W = R.alias;
|
|
6472
|
+
if (I && !R.pattern.global) {
|
|
6473
|
+
var H = R.pattern.toString().match(/[imsuy]*$/)[0];
|
|
6474
|
+
R.pattern = RegExp(R.pattern.source, H + "g");
|
|
6447
6475
|
}
|
|
6448
|
-
for (var ee =
|
|
6476
|
+
for (var ee = R.pattern || R, z = y.next, G = _; z !== v.tail && !(N && G >= N.reach); G += z.value.length, z = z.next) {
|
|
6449
6477
|
var te = z.value;
|
|
6450
6478
|
if (v.length > h.length)
|
|
6451
6479
|
return;
|
|
@@ -6464,12 +6492,12 @@ function ci() {
|
|
|
6464
6492
|
ie--, te = h.slice(G, V), j.index -= G;
|
|
6465
6493
|
} else if (j = c(ee, 0, te, $), !j)
|
|
6466
6494
|
continue;
|
|
6467
|
-
var Se = j.index, Ee = j[0], Ve = te.slice(0, Se),
|
|
6495
|
+
var Se = j.index, Ee = j[0], Ve = te.slice(0, Se), It = te.slice(Se + Ee.length), Ye = G + te.length;
|
|
6468
6496
|
N && Ye > N.reach && (N.reach = Ye);
|
|
6469
6497
|
var Te = z.prev;
|
|
6470
6498
|
Ve && (Te = x(v, Te, Ve), G += Ve.length), k(v, Te, ie);
|
|
6471
|
-
var
|
|
6472
|
-
if (z = x(v, Te,
|
|
6499
|
+
var Lr = new u(C, D ? i.tokenize(Ee, D) : Ee, W, Ee);
|
|
6500
|
+
if (z = x(v, Te, Lr), It && x(v, z, It), ie > 1) {
|
|
6473
6501
|
var qe = {
|
|
6474
6502
|
cause: C + "," + P,
|
|
6475
6503
|
reach: Ye
|
|
@@ -6515,7 +6543,7 @@ function ci() {
|
|
|
6515
6543
|
}
|
|
6516
6544
|
return i;
|
|
6517
6545
|
})(t);
|
|
6518
|
-
e.exports && (e.exports = n), typeof
|
|
6546
|
+
e.exports && (e.exports = n), typeof tn < "u" && (tn.Prism = n), n.languages.markup = {
|
|
6519
6547
|
comment: {
|
|
6520
6548
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
6521
6549
|
greedy: !0
|
|
@@ -6974,8 +7002,8 @@ function ci() {
|
|
|
6974
7002
|
})();
|
|
6975
7003
|
})(ot)), ot.exports;
|
|
6976
7004
|
}
|
|
6977
|
-
var
|
|
6978
|
-
const Le = /* @__PURE__ */
|
|
7005
|
+
var pi = di();
|
|
7006
|
+
const Le = /* @__PURE__ */ ui(pi);
|
|
6979
7007
|
Prism.languages.markup = {
|
|
6980
7008
|
comment: {
|
|
6981
7009
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
@@ -7368,9 +7396,9 @@ Prism.languages.js = Prism.languages.javascript;
|
|
|
7368
7396
|
u.language !== "jsx" && u.language !== "tsx" || i(u.tokens);
|
|
7369
7397
|
});
|
|
7370
7398
|
})(Prism);
|
|
7371
|
-
var
|
|
7372
|
-
function
|
|
7373
|
-
return
|
|
7399
|
+
var rn = {}, an;
|
|
7400
|
+
function fi() {
|
|
7401
|
+
return an || (an = 1, (function(e) {
|
|
7374
7402
|
e.languages.typescript = e.languages.extend("javascript", {
|
|
7375
7403
|
"class-name": {
|
|
7376
7404
|
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
|
|
@@ -7414,9 +7442,9 @@ function di() {
|
|
|
7414
7442
|
}
|
|
7415
7443
|
}
|
|
7416
7444
|
}), e.languages.ts = e.languages.typescript;
|
|
7417
|
-
})(Prism)),
|
|
7445
|
+
})(Prism)), rn;
|
|
7418
7446
|
}
|
|
7419
|
-
|
|
7447
|
+
fi();
|
|
7420
7448
|
(function(e) {
|
|
7421
7449
|
var t = e.util.clone(e.languages.typescript);
|
|
7422
7450
|
e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"];
|
|
@@ -7667,14 +7695,14 @@ Prism.languages.json = {
|
|
|
7667
7695
|
}
|
|
7668
7696
|
};
|
|
7669
7697
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
7670
|
-
function
|
|
7698
|
+
function Zl({
|
|
7671
7699
|
code: e,
|
|
7672
7700
|
language: t = "tsx",
|
|
7673
7701
|
copyLabel: n,
|
|
7674
7702
|
copiedLabel: r,
|
|
7675
7703
|
onCopy: s
|
|
7676
7704
|
}) {
|
|
7677
|
-
const [o, l] =
|
|
7705
|
+
const [o, l] = F(!1), i = L(null), u = be(() => {
|
|
7678
7706
|
const d = Le.languages[t] ?? Le.languages.tsx ?? Le.languages.typescript;
|
|
7679
7707
|
return d ? Le.highlight(e, d, t) : e;
|
|
7680
7708
|
}, [e, t]);
|
|
@@ -7696,7 +7724,7 @@ function Xl({
|
|
|
7696
7724
|
className: o ? "vx-code-block__copy vx-code-block__copy--copied" : "vx-code-block__copy",
|
|
7697
7725
|
onClick: () => void c(),
|
|
7698
7726
|
children: [
|
|
7699
|
-
o ? /* @__PURE__ */ a(
|
|
7727
|
+
o ? /* @__PURE__ */ a(ht, { size: 14 }) : /* @__PURE__ */ a(Xr, { size: 14 }),
|
|
7700
7728
|
o ? r : n
|
|
7701
7729
|
]
|
|
7702
7730
|
}
|
|
@@ -7710,7 +7738,7 @@ function Xl({
|
|
|
7710
7738
|
) })
|
|
7711
7739
|
] });
|
|
7712
7740
|
}
|
|
7713
|
-
const
|
|
7741
|
+
const Ir = {
|
|
7714
7742
|
locale: "en",
|
|
7715
7743
|
label: "English",
|
|
7716
7744
|
searchPlaceholder: "Search components, pages, keywords…",
|
|
@@ -8030,9 +8058,11 @@ const Fr = {
|
|
|
8030
8058
|
overlays: {
|
|
8031
8059
|
section: "Components",
|
|
8032
8060
|
title: "Overlays",
|
|
8033
|
-
description: "
|
|
8061
|
+
description: "Dialog, AlertDialog, Sheet, Popover, and DropdownMenu layer transient content above the page without navigating away.",
|
|
8034
8062
|
guidance: [
|
|
8035
|
-
"
|
|
8063
|
+
"Dialog is for rich confirmations with custom body and footer actions.",
|
|
8064
|
+
"AlertDialog is for destructive or irreversible actions that require explicit confirmation.",
|
|
8065
|
+
"Sheet slides in from an edge — use it for settings panels or contextual detail views.",
|
|
8036
8066
|
"Popovers can contain forms and rich content; they require explicit close triggers.",
|
|
8037
8067
|
"DropdownMenus should group related actions and support keyboard navigation."
|
|
8038
8068
|
]
|
|
@@ -8168,7 +8198,7 @@ const Fr = {
|
|
|
8168
8198
|
]
|
|
8169
8199
|
}
|
|
8170
8200
|
}
|
|
8171
|
-
},
|
|
8201
|
+
}, vi = {
|
|
8172
8202
|
locale: "zh",
|
|
8173
8203
|
label: "中文",
|
|
8174
8204
|
searchPlaceholder: "搜索组件、页面、关键词…",
|
|
@@ -8488,9 +8518,11 @@ const Fr = {
|
|
|
8488
8518
|
overlays: {
|
|
8489
8519
|
section: "组件",
|
|
8490
8520
|
title: "浮层",
|
|
8491
|
-
description: "
|
|
8521
|
+
description: "Dialog、AlertDialog、Sheet、Popover 和 DropdownMenu 在页面上方叠加临时内容,无需跳转。",
|
|
8492
8522
|
guidance: [
|
|
8493
|
-
"
|
|
8523
|
+
"Dialog 适用于包含自定义内容与操作按钮的富确认场景。",
|
|
8524
|
+
"AlertDialog 适用于破坏性或不可撤销操作,需要用户明确确认。",
|
|
8525
|
+
"Sheet 从页面边缘滑入,适合设置面板或上下文详情视图。",
|
|
8494
8526
|
"Popover 可包含表单和富内容;需要明确的关闭触发器。",
|
|
8495
8527
|
"DropdownMenu 应对相关操作分组,并支持键盘导航。"
|
|
8496
8528
|
]
|
|
@@ -8626,17 +8658,17 @@ const Fr = {
|
|
|
8626
8658
|
]
|
|
8627
8659
|
}
|
|
8628
8660
|
}
|
|
8629
|
-
},
|
|
8630
|
-
t:
|
|
8661
|
+
}, sn = { en: Ir, zh: vi }, hi = _e({
|
|
8662
|
+
t: Ir,
|
|
8631
8663
|
locale: "en",
|
|
8632
8664
|
setLocale: () => {
|
|
8633
8665
|
}
|
|
8634
8666
|
});
|
|
8635
|
-
function
|
|
8636
|
-
return ye(
|
|
8667
|
+
function mi() {
|
|
8668
|
+
return ye(hi);
|
|
8637
8669
|
}
|
|
8638
|
-
function
|
|
8639
|
-
const { locale: n, setLocale: r } =
|
|
8670
|
+
function Ql({ variant: e = "inline", className: t }) {
|
|
8671
|
+
const { locale: n, setLocale: r } = mi(), s = Object.entries(sn), o = sn[n], [l, i] = F(!1), u = L(null);
|
|
8640
8672
|
return O(() => {
|
|
8641
8673
|
if (!l) return;
|
|
8642
8674
|
const d = (p) => {
|
|
@@ -8672,9 +8704,9 @@ function Zl({ variant: e = "inline", className: t }) {
|
|
|
8672
8704
|
className: "vx-lang-drop__trigger-btn",
|
|
8673
8705
|
style: { height: "36px" },
|
|
8674
8706
|
children: [
|
|
8675
|
-
/* @__PURE__ */ a(
|
|
8707
|
+
/* @__PURE__ */ a(ea, { size: 14, "aria-hidden": "true" }),
|
|
8676
8708
|
(o == null ? void 0 : o.label) ?? n,
|
|
8677
|
-
/* @__PURE__ */ a(
|
|
8709
|
+
/* @__PURE__ */ a(mt, { size: 14, className: "vx-lang-drop__chevron", "aria-hidden": "true" })
|
|
8678
8710
|
]
|
|
8679
8711
|
}
|
|
8680
8712
|
),
|
|
@@ -8697,105 +8729,105 @@ function Zl({ variant: e = "inline", className: t }) {
|
|
|
8697
8729
|
);
|
|
8698
8730
|
}
|
|
8699
8731
|
export {
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8732
|
+
sl as Accordion,
|
|
8733
|
+
fl as ActionSheet,
|
|
8734
|
+
vl as ActionSheetItem,
|
|
8735
|
+
Qi as Alert,
|
|
8736
|
+
Tl as AlertDialog,
|
|
8737
|
+
wi as AppShell,
|
|
8738
|
+
il as Avatar,
|
|
8739
|
+
ki as Badge,
|
|
8740
|
+
pl as BottomNav,
|
|
8741
|
+
rl as Breadcrumb,
|
|
8710
8742
|
fe as Button,
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8743
|
+
ri as Calendar,
|
|
8744
|
+
Ni as Card,
|
|
8745
|
+
Ci as CardContent,
|
|
8746
|
+
Ti as CardDescription,
|
|
8747
|
+
Si as CardHeader,
|
|
8748
|
+
Ei as CardTitle,
|
|
8749
|
+
Wl as Carousel,
|
|
8750
|
+
ji as Checkbox,
|
|
8751
|
+
Zl as CodeBlock,
|
|
8752
|
+
Kl as ColorPicker,
|
|
8753
|
+
Pl as Combobox,
|
|
8754
|
+
Xl as CommandPalette,
|
|
8755
|
+
Ll as ContextMenu,
|
|
8756
|
+
Al as DatePicker,
|
|
8757
|
+
Pi as Dialog,
|
|
8758
|
+
xl as DrawerNavItem,
|
|
8759
|
+
yl as DrawerNavSection,
|
|
8760
|
+
nl as DropdownMenu,
|
|
8761
|
+
Ul as EmptyState,
|
|
8762
|
+
Dl as FileUpload,
|
|
8763
|
+
wl as Form,
|
|
8764
|
+
Sl as FormDescription,
|
|
8765
|
+
kl as FormField,
|
|
8766
|
+
Nl as FormLabel,
|
|
8767
|
+
El as FormMessage,
|
|
8768
|
+
Hi as Heading,
|
|
8769
|
+
Ml as HoverCard,
|
|
8770
|
+
Di as Input,
|
|
8771
|
+
_l as Label,
|
|
8772
|
+
Ql as LanguageSwitcher,
|
|
8773
|
+
Ol as Menubar,
|
|
8774
|
+
bl as MobileDrawer,
|
|
8775
|
+
dl as MobileIconButton,
|
|
8776
|
+
hl as MobileList,
|
|
8777
|
+
gl as MobileListItem,
|
|
8778
|
+
ml as MobileListSection,
|
|
8779
|
+
cl as MobileShell,
|
|
8780
|
+
ul as MobileTopBar,
|
|
8781
|
+
$l as NavigationMenu,
|
|
8782
|
+
Cl as NumberInput,
|
|
8783
|
+
al as Pagination,
|
|
8784
|
+
tl as Popover,
|
|
8785
|
+
Zi as Progress,
|
|
8786
|
+
Ki as Radio,
|
|
8787
|
+
Vi as RadioGroup,
|
|
8788
|
+
Hl as Rating,
|
|
8789
|
+
ql as ResizableHandle,
|
|
8790
|
+
Yl as ResizablePanel,
|
|
8791
|
+
Vl as ResizablePanelGroup,
|
|
8792
|
+
_i as Responsive,
|
|
8761
8793
|
Rl as ScrollArea,
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8794
|
+
Gi as Select,
|
|
8795
|
+
ol as Separator,
|
|
8796
|
+
Vn as Sheet,
|
|
8797
|
+
oa as Shell,
|
|
8798
|
+
va as ShellContent,
|
|
8799
|
+
pa as ShellMain,
|
|
8800
|
+
la as ShellNav,
|
|
8801
|
+
ua as ShellNavItem,
|
|
8802
|
+
ca as ShellNavSection,
|
|
8803
|
+
da as ShellOverlay,
|
|
8804
|
+
ia as ShellSidebar,
|
|
8805
|
+
fa as ShellTopbar,
|
|
8806
|
+
Ji as Skeleton,
|
|
8807
|
+
qi as Slider,
|
|
8808
|
+
Xi as Spinner,
|
|
8809
|
+
Bl as Stepper,
|
|
8810
|
+
Ri as Switch,
|
|
8811
|
+
ll as Table,
|
|
8812
|
+
Fi as Tabs,
|
|
8813
|
+
Mi as TabsContent,
|
|
8814
|
+
Ii as TabsList,
|
|
8815
|
+
Li as TabsTrigger,
|
|
8816
|
+
jl as TagInput,
|
|
8817
|
+
Wi as Text,
|
|
8818
|
+
Yi as Textarea,
|
|
8819
|
+
$i as ThemeProvider,
|
|
8820
|
+
zl as Timeline,
|
|
8821
|
+
zi as ToastProvider,
|
|
8790
8822
|
Fl as Toggle,
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8823
|
+
Il as ToggleGroup,
|
|
8824
|
+
el as Tooltip,
|
|
8825
|
+
Gl as TreeView,
|
|
8826
|
+
yi as ViewportProvider,
|
|
8795
8827
|
Y as createTheme,
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8828
|
+
Oi as themePresets,
|
|
8829
|
+
ei as useFormField,
|
|
8830
|
+
Bi as useTheme,
|
|
8831
|
+
Ui as useToast,
|
|
8832
|
+
vt as useViewport
|
|
8801
8833
|
};
|