@middag-io/react 0.31.2 → 0.31.3
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-lib/{FormPanelBlock-BW2oi2_O.js → FormPanelBlock-BYyMr-xN.js} +401 -401
- package/dist-lib/{PhoneField-D_djeYhK.js → PhoneField-BF70G_PS.js} +7 -7
- package/dist-lib/{combobox-yfHHEi6f.js → combobox-BRe2Y-kB.js} +1438 -1196
- package/dist-lib/components/reui/index.d.ts +28 -0
- package/dist-lib/components/reui/index.d.ts.map +1 -0
- package/dist-lib/index.d.ts +2 -0
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/middag-react.js +4344 -3836
- package/dist-lib/{resolve-field-error-dbUy6DeX.js → resolve-field-error-DLX1h_6J.js} +1018 -986
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as e, c as t, g as n, h as r, i, l as a, m as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./button-Bm0X9WO5.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import { $ as
|
|
5
|
-
import { t as
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import { a as
|
|
10
|
-
import { p as
|
|
11
|
-
import { t as
|
|
12
|
-
import * as
|
|
13
|
-
import { Fragment as
|
|
2
|
+
import { $ as p, A as m, B as h, C as g, D as _, E as v, F as y, G as b, H as x, I as S, J as C, K as w, L as T, M as E, N as D, O, P as k, Q as A, R as j, S as M, T as N, U as P, V as ee, W as F, X as I, Y as te, Z as ne, _ as re, at as ie, b as ae, et as oe, f as se, it as ce, j as le, k as ue, l as de, nt as fe, o as pe, q as me, rt as he, s as ge, t as _e, tt as ve, u as ye, v as be, w as xe, x as Se, y as Ce, z as we } from "./combobox-BRe2Y-kB.js";
|
|
3
|
+
import { r as Te, t as Ee } from "./useTranslation-BuyMWJ9T.js";
|
|
4
|
+
import { $ as De, C as Oe, G as L, J as ke, K as Ae, ft as je, l as Me, p as Ne, pt as Pe, st as Fe, t as R, u as Ie, v as Le } from "./HugeiconsIcon-CKqc2W1S.js";
|
|
5
|
+
import { t as z } from "./utils-CpaZ5_iF.js";
|
|
6
|
+
import { i as Re, n as ze, r as Be, t as Ve } from "./dist-DdgpZG8v.js";
|
|
7
|
+
import { n as He, t as Ue } from "./dist-B7gC4peV.js";
|
|
8
|
+
import { n as We, t as Ge } from "./dist-3F0-lo64.js";
|
|
9
|
+
import { a as Ke, c as qe, d as Je, f as Ye, i as Xe, l as Ze, n as Qe, o as $e, r as et, s as tt, t as nt, u as rt } from "./dist-Bbnbom8g.js";
|
|
10
|
+
import { p as it } from "./floating-ui.react-dom-CNntavPo.js";
|
|
11
|
+
import { t as at } from "./input-BC9whKEm.js";
|
|
12
|
+
import * as B from "react";
|
|
13
|
+
import { Fragment as ot, Suspense as st, createContext as ct, lazy as lt, useCallback as V, useContext as ut, useEffect as dt, useId as ft, useMemo as pt, useRef as mt, useState as ht } from "react";
|
|
14
14
|
import { Fragment as gt, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
15
15
|
import { Link as _t } from "@inertiajs/react";
|
|
16
16
|
import * as vt from "react-dom";
|
|
@@ -3234,7 +3234,7 @@ var lc = [
|
|
|
3234
3234
|
"svg",
|
|
3235
3235
|
"ul"
|
|
3236
3236
|
].reduce((e, t) => {
|
|
3237
|
-
let n = f(`Primitive.${t}`), r =
|
|
3237
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
3238
3238
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
3239
3239
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
3240
3240
|
...a,
|
|
@@ -3256,7 +3256,7 @@ var lc = [
|
|
|
3256
3256
|
clip: "rect(0, 0, 0, 0)",
|
|
3257
3257
|
whiteSpace: "nowrap",
|
|
3258
3258
|
wordWrap: "normal"
|
|
3259
|
-
}), dc = "VisuallyHidden", fc =
|
|
3259
|
+
}), dc = "VisuallyHidden", fc = B.forwardRef((e, t) => /* @__PURE__ */ H(lc.span, {
|
|
3260
3260
|
...e,
|
|
3261
3261
|
ref: t,
|
|
3262
3262
|
style: {
|
|
@@ -3284,7 +3284,7 @@ var pc = fc, mc = [
|
|
|
3284
3284
|
"svg",
|
|
3285
3285
|
"ul"
|
|
3286
3286
|
].reduce((e, t) => {
|
|
3287
|
-
let n = f(`Primitive.${t}`), r =
|
|
3287
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
3288
3288
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
3289
3289
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
3290
3290
|
...a,
|
|
@@ -3296,7 +3296,7 @@ var pc = fc, mc = [
|
|
|
3296
3296
|
[t]: r
|
|
3297
3297
|
};
|
|
3298
3298
|
}, {}), hc = "Dialog", [gc, _c] = t(hc), [vc, yc] = gc(hc), bc = (e) => {
|
|
3299
|
-
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s =
|
|
3299
|
+
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = B.useRef(null), c = B.useRef(null), [l, u] = He({
|
|
3300
3300
|
prop: r,
|
|
3301
3301
|
defaultProp: i ?? !1,
|
|
3302
3302
|
onChange: a,
|
|
@@ -3306,18 +3306,18 @@ var pc = fc, mc = [
|
|
|
3306
3306
|
scope: t,
|
|
3307
3307
|
triggerRef: s,
|
|
3308
3308
|
contentRef: c,
|
|
3309
|
-
contentId:
|
|
3310
|
-
titleId:
|
|
3311
|
-
descriptionId:
|
|
3309
|
+
contentId: Ue(),
|
|
3310
|
+
titleId: Ue(),
|
|
3311
|
+
descriptionId: Ue(),
|
|
3312
3312
|
open: l,
|
|
3313
3313
|
onOpenChange: u,
|
|
3314
|
-
onOpenToggle:
|
|
3314
|
+
onOpenToggle: B.useCallback(() => u((e) => !e), [u]),
|
|
3315
3315
|
modal: o,
|
|
3316
3316
|
children: n
|
|
3317
3317
|
});
|
|
3318
3318
|
};
|
|
3319
3319
|
bc.displayName = hc;
|
|
3320
|
-
var xc = "DialogTrigger", Sc =
|
|
3320
|
+
var xc = "DialogTrigger", Sc = B.forwardRef((e, t) => {
|
|
3321
3321
|
let { __scopeDialog: n, ...r } = e, i = yc(xc, n), a = c(t, i.triggerRef);
|
|
3322
3322
|
return /* @__PURE__ */ H(mc.button, {
|
|
3323
3323
|
type: "button",
|
|
@@ -3336,9 +3336,9 @@ var Cc = "DialogPortal", [wc, Tc] = gc(Cc, { forceMount: void 0 }), Ec = (e) =>
|
|
|
3336
3336
|
return /* @__PURE__ */ H(wc, {
|
|
3337
3337
|
scope: t,
|
|
3338
3338
|
forceMount: n,
|
|
3339
|
-
children:
|
|
3339
|
+
children: B.Children.map(r, (e) => /* @__PURE__ */ H(i, {
|
|
3340
3340
|
present: n || o.open,
|
|
3341
|
-
children: /* @__PURE__ */ H(
|
|
3341
|
+
children: /* @__PURE__ */ H(rt, {
|
|
3342
3342
|
asChild: !0,
|
|
3343
3343
|
container: a,
|
|
3344
3344
|
children: e
|
|
@@ -3347,7 +3347,7 @@ var Cc = "DialogPortal", [wc, Tc] = gc(Cc, { forceMount: void 0 }), Ec = (e) =>
|
|
|
3347
3347
|
});
|
|
3348
3348
|
};
|
|
3349
3349
|
Ec.displayName = Cc;
|
|
3350
|
-
var Dc = "DialogOverlay", Oc =
|
|
3350
|
+
var Dc = "DialogOverlay", Oc = B.forwardRef((e, t) => {
|
|
3351
3351
|
let n = Tc(Dc, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = yc(Dc, e.__scopeDialog);
|
|
3352
3352
|
return o.modal ? /* @__PURE__ */ H(i, {
|
|
3353
3353
|
present: r || o.open,
|
|
@@ -3358,9 +3358,9 @@ var Dc = "DialogOverlay", Oc = z.forwardRef((e, t) => {
|
|
|
3358
3358
|
}) : null;
|
|
3359
3359
|
});
|
|
3360
3360
|
Oc.displayName = Dc;
|
|
3361
|
-
var kc = f("DialogOverlay.RemoveScroll"), Ac =
|
|
3361
|
+
var kc = f("DialogOverlay.RemoveScroll"), Ac = B.forwardRef((e, t) => {
|
|
3362
3362
|
let { __scopeDialog: n, ...r } = e, i = yc(Dc, n);
|
|
3363
|
-
return /* @__PURE__ */ H(
|
|
3363
|
+
return /* @__PURE__ */ H(qe, {
|
|
3364
3364
|
as: kc,
|
|
3365
3365
|
allowPinchZoom: !0,
|
|
3366
3366
|
shards: [i.contentRef],
|
|
@@ -3374,7 +3374,7 @@ var kc = f("DialogOverlay.RemoveScroll"), Ac = z.forwardRef((e, t) => {
|
|
|
3374
3374
|
}
|
|
3375
3375
|
})
|
|
3376
3376
|
});
|
|
3377
|
-
}), jc = "DialogContent", Mc =
|
|
3377
|
+
}), jc = "DialogContent", Mc = B.forwardRef((e, t) => {
|
|
3378
3378
|
let n = Tc(jc, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = yc(jc, e.__scopeDialog);
|
|
3379
3379
|
return /* @__PURE__ */ H(i, {
|
|
3380
3380
|
present: r || o.open,
|
|
@@ -3388,11 +3388,11 @@ var kc = f("DialogOverlay.RemoveScroll"), Ac = z.forwardRef((e, t) => {
|
|
|
3388
3388
|
});
|
|
3389
3389
|
});
|
|
3390
3390
|
Mc.displayName = jc;
|
|
3391
|
-
var Nc =
|
|
3392
|
-
let n = yc(jc, e.__scopeDialog), r =
|
|
3393
|
-
return
|
|
3391
|
+
var Nc = B.forwardRef((e, t) => {
|
|
3392
|
+
let n = yc(jc, e.__scopeDialog), r = B.useRef(null), i = c(t, n.contentRef, r);
|
|
3393
|
+
return B.useEffect(() => {
|
|
3394
3394
|
let e = r.current;
|
|
3395
|
-
if (e) return
|
|
3395
|
+
if (e) return tt(e);
|
|
3396
3396
|
}, []), /* @__PURE__ */ H(Fc, {
|
|
3397
3397
|
...e,
|
|
3398
3398
|
ref: i,
|
|
@@ -3407,8 +3407,8 @@ var Nc = z.forwardRef((e, t) => {
|
|
|
3407
3407
|
}),
|
|
3408
3408
|
onFocusOutside: s(e.onFocusOutside, (e) => e.preventDefault())
|
|
3409
3409
|
});
|
|
3410
|
-
}), Pc =
|
|
3411
|
-
let n = yc(jc, e.__scopeDialog), r =
|
|
3410
|
+
}), Pc = B.forwardRef((e, t) => {
|
|
3411
|
+
let n = yc(jc, e.__scopeDialog), r = B.useRef(!1), i = B.useRef(!1);
|
|
3412
3412
|
return /* @__PURE__ */ H(Fc, {
|
|
3413
3413
|
...e,
|
|
3414
3414
|
ref: t,
|
|
@@ -3423,15 +3423,15 @@ var Nc = z.forwardRef((e, t) => {
|
|
|
3423
3423
|
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
3424
3424
|
}
|
|
3425
3425
|
});
|
|
3426
|
-
}), Fc =
|
|
3427
|
-
let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...o } = e, s = yc(jc, n), l =
|
|
3428
|
-
return
|
|
3426
|
+
}), Fc = B.forwardRef((e, t) => {
|
|
3427
|
+
let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...o } = e, s = yc(jc, n), l = B.useRef(null), u = c(t, l);
|
|
3428
|
+
return Ze(), /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H(Je, {
|
|
3429
3429
|
asChild: !0,
|
|
3430
3430
|
loop: !0,
|
|
3431
3431
|
trapped: r,
|
|
3432
3432
|
onMountAutoFocus: i,
|
|
3433
3433
|
onUnmountAutoFocus: a,
|
|
3434
|
-
children: /* @__PURE__ */ H(
|
|
3434
|
+
children: /* @__PURE__ */ H(Ye, {
|
|
3435
3435
|
role: "dialog",
|
|
3436
3436
|
id: s.contentId,
|
|
3437
3437
|
"aria-describedby": s.descriptionId,
|
|
@@ -3445,7 +3445,7 @@ var Nc = z.forwardRef((e, t) => {
|
|
|
3445
3445
|
contentRef: l,
|
|
3446
3446
|
descriptionId: s.descriptionId
|
|
3447
3447
|
})] })] });
|
|
3448
|
-
}), Ic = "DialogTitle", Lc =
|
|
3448
|
+
}), Ic = "DialogTitle", Lc = B.forwardRef((e, t) => {
|
|
3449
3449
|
let { __scopeDialog: n, ...r } = e, i = yc(Ic, n);
|
|
3450
3450
|
return /* @__PURE__ */ H(mc.h2, {
|
|
3451
3451
|
id: i.titleId,
|
|
@@ -3454,7 +3454,7 @@ var Nc = z.forwardRef((e, t) => {
|
|
|
3454
3454
|
});
|
|
3455
3455
|
});
|
|
3456
3456
|
Lc.displayName = Ic;
|
|
3457
|
-
var Rc = "DialogDescription", zc =
|
|
3457
|
+
var Rc = "DialogDescription", zc = B.forwardRef((e, t) => {
|
|
3458
3458
|
let { __scopeDialog: n, ...r } = e, i = yc(Rc, n);
|
|
3459
3459
|
return /* @__PURE__ */ H(mc.p, {
|
|
3460
3460
|
id: i.descriptionId,
|
|
@@ -3463,7 +3463,7 @@ var Rc = "DialogDescription", zc = z.forwardRef((e, t) => {
|
|
|
3463
3463
|
});
|
|
3464
3464
|
});
|
|
3465
3465
|
zc.displayName = Rc;
|
|
3466
|
-
var Bc = "DialogClose", Vc =
|
|
3466
|
+
var Bc = "DialogClose", Vc = B.forwardRef((e, t) => {
|
|
3467
3467
|
let { __scopeDialog: n, ...r } = e, i = yc(Bc, n);
|
|
3468
3468
|
return /* @__PURE__ */ H(mc.button, {
|
|
3469
3469
|
type: "button",
|
|
@@ -3486,12 +3486,12 @@ var Uc = "DialogTitleWarning", [Wc, Gc] = u(Uc, {
|
|
|
3486
3486
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
3487
3487
|
|
|
3488
3488
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
3489
|
-
return
|
|
3489
|
+
return B.useEffect(() => {
|
|
3490
3490
|
e && (document.getElementById(e) || console.error(n));
|
|
3491
3491
|
}, [n, e]), null;
|
|
3492
3492
|
}, qc = "DialogDescriptionWarning", Jc = ({ contentRef: e, descriptionId: t }) => {
|
|
3493
3493
|
let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gc(qc).contentName}}.`;
|
|
3494
|
-
return
|
|
3494
|
+
return B.useEffect(() => {
|
|
3495
3495
|
let r = e.current?.getAttribute("aria-describedby");
|
|
3496
3496
|
t && r && (document.getElementById(t) || console.warn(n));
|
|
3497
3497
|
}, [
|
|
@@ -3518,7 +3518,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
3518
3518
|
"svg",
|
|
3519
3519
|
"ul"
|
|
3520
3520
|
].reduce((e, t) => {
|
|
3521
|
-
let n = f(`Primitive.${t}`), r =
|
|
3521
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
3522
3522
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
3523
3523
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
3524
3524
|
...a,
|
|
@@ -3529,7 +3529,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
3529
3529
|
...e,
|
|
3530
3530
|
[t]: r
|
|
3531
3531
|
};
|
|
3532
|
-
}, {}), il =
|
|
3532
|
+
}, {}), il = Te();
|
|
3533
3533
|
function al() {
|
|
3534
3534
|
return (0, il.useSyncExternalStore)(ol, () => !0, () => !1);
|
|
3535
3535
|
}
|
|
@@ -3538,8 +3538,8 @@ function ol() {
|
|
|
3538
3538
|
}
|
|
3539
3539
|
//#endregion
|
|
3540
3540
|
//#region node_modules/@radix-ui/react-avatar/dist/index.mjs
|
|
3541
|
-
var sl = "Avatar", [cl, ll] = t(sl), [ul, dl] = cl(sl), fl =
|
|
3542
|
-
let { __scopeAvatar: n, ...r } = e, [i, a] =
|
|
3541
|
+
var sl = "Avatar", [cl, ll] = t(sl), [ul, dl] = cl(sl), fl = B.forwardRef((e, t) => {
|
|
3542
|
+
let { __scopeAvatar: n, ...r } = e, [i, a] = B.useState("idle");
|
|
3543
3543
|
return /* @__PURE__ */ H(ul, {
|
|
3544
3544
|
scope: n,
|
|
3545
3545
|
imageLoadingStatus: i,
|
|
@@ -3551,7 +3551,7 @@ var sl = "Avatar", [cl, ll] = t(sl), [ul, dl] = cl(sl), fl = z.forwardRef((e, t)
|
|
|
3551
3551
|
});
|
|
3552
3552
|
});
|
|
3553
3553
|
fl.displayName = sl;
|
|
3554
|
-
var pl = "AvatarImage", ml =
|
|
3554
|
+
var pl = "AvatarImage", ml = B.forwardRef((t, n) => {
|
|
3555
3555
|
let { __scopeAvatar: r, src: i, onLoadingStatusChange: a = () => {}, ...o } = t, s = dl(pl, r), c = vl(i, o), u = l((e) => {
|
|
3556
3556
|
a(e), s.onImageLoadingStatusChange(e);
|
|
3557
3557
|
});
|
|
@@ -3564,9 +3564,9 @@ var pl = "AvatarImage", ml = z.forwardRef((t, n) => {
|
|
|
3564
3564
|
}) : null;
|
|
3565
3565
|
});
|
|
3566
3566
|
ml.displayName = pl;
|
|
3567
|
-
var hl = "AvatarFallback", gl =
|
|
3568
|
-
let { __scopeAvatar: n, delayMs: r, ...i } = e, a = dl(hl, n), [o, s] =
|
|
3569
|
-
return
|
|
3567
|
+
var hl = "AvatarFallback", gl = B.forwardRef((e, t) => {
|
|
3568
|
+
let { __scopeAvatar: n, delayMs: r, ...i } = e, a = dl(hl, n), [o, s] = B.useState(r === void 0);
|
|
3569
|
+
return B.useEffect(() => {
|
|
3570
3570
|
if (r !== void 0) {
|
|
3571
3571
|
let e = window.setTimeout(() => s(!0), r);
|
|
3572
3572
|
return () => window.clearTimeout(e);
|
|
@@ -3581,7 +3581,7 @@ function _l(e, t) {
|
|
|
3581
3581
|
return e ? t ? (e.src !== t && (e.src = t), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
3582
3582
|
}
|
|
3583
3583
|
function vl(t, { referrerPolicy: n, crossOrigin: r }) {
|
|
3584
|
-
let i = al(), a =
|
|
3584
|
+
let i = al(), a = B.useRef(null), o = i ? (a.current ||= new window.Image(), a.current) : null, [s, c] = B.useState(() => _l(o, t));
|
|
3585
3585
|
return e(() => {
|
|
3586
3586
|
c(_l(o, t));
|
|
3587
3587
|
}, [o, t]), e(() => {
|
|
@@ -3603,11 +3603,11 @@ var yl = fl, bl = ml, xl = gl;
|
|
|
3603
3603
|
//#endregion
|
|
3604
3604
|
//#region node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
3605
3605
|
function Sl(e) {
|
|
3606
|
-
let t =
|
|
3606
|
+
let t = B.useRef({
|
|
3607
3607
|
value: e,
|
|
3608
3608
|
previous: e
|
|
3609
3609
|
});
|
|
3610
|
-
return
|
|
3610
|
+
return B.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
3611
3611
|
}
|
|
3612
3612
|
//#endregion
|
|
3613
3613
|
//#region node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
@@ -3630,7 +3630,7 @@ var Cl = [
|
|
|
3630
3630
|
"svg",
|
|
3631
3631
|
"ul"
|
|
3632
3632
|
].reduce((e, t) => {
|
|
3633
|
-
let n = f(`Primitive.${t}`), r =
|
|
3633
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
3634
3634
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
3635
3635
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
3636
3636
|
...a,
|
|
@@ -3643,12 +3643,12 @@ var Cl = [
|
|
|
3643
3643
|
};
|
|
3644
3644
|
}, {}), wl = "Checkbox", [Tl, El] = t(wl), [Dl, Ol] = Tl(wl);
|
|
3645
3645
|
function kl(e) {
|
|
3646
|
-
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, p] =
|
|
3646
|
+
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, p] = He({
|
|
3647
3647
|
prop: n,
|
|
3648
3648
|
defaultProp: i ?? !1,
|
|
3649
3649
|
onChange: c,
|
|
3650
3650
|
caller: wl
|
|
3651
|
-
}), [m, h] =
|
|
3651
|
+
}), [m, h] = B.useState(null), [g, _] = B.useState(null), v = B.useRef(!1), y = m ? !!o || !!m.closest("form") : !0, b = {
|
|
3652
3652
|
checked: f,
|
|
3653
3653
|
disabled: a,
|
|
3654
3654
|
setChecked: p,
|
|
@@ -3670,9 +3670,9 @@ function kl(e) {
|
|
|
3670
3670
|
children: Ll(d) ? d(b) : r
|
|
3671
3671
|
});
|
|
3672
3672
|
}
|
|
3673
|
-
var Al = "CheckboxTrigger", jl =
|
|
3674
|
-
let { control: a, value: o, disabled: l, checked: u, required: d, setControl: f, setChecked: p, hasConsumerStoppedPropagationRef: m, isFormControl: h, bubbleInput: g } = Ol(Al, e), _ = c(i, f), v =
|
|
3675
|
-
return
|
|
3673
|
+
var Al = "CheckboxTrigger", jl = B.forwardRef(({ __scopeCheckbox: e, onKeyDown: t, onClick: n, ...r }, i) => {
|
|
3674
|
+
let { control: a, value: o, disabled: l, checked: u, required: d, setControl: f, setChecked: p, hasConsumerStoppedPropagationRef: m, isFormControl: h, bubbleInput: g } = Ol(Al, e), _ = c(i, f), v = B.useRef(u);
|
|
3675
|
+
return B.useEffect(() => {
|
|
3676
3676
|
let e = a?.form;
|
|
3677
3677
|
if (e) {
|
|
3678
3678
|
let t = () => p(v.current);
|
|
@@ -3698,7 +3698,7 @@ var Al = "CheckboxTrigger", jl = z.forwardRef(({ __scopeCheckbox: e, onKeyDown:
|
|
|
3698
3698
|
});
|
|
3699
3699
|
});
|
|
3700
3700
|
jl.displayName = Al;
|
|
3701
|
-
var Ml =
|
|
3701
|
+
var Ml = B.forwardRef((e, t) => {
|
|
3702
3702
|
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: l, form: u, ...d } = e;
|
|
3703
3703
|
return /* @__PURE__ */ H(kl, {
|
|
3704
3704
|
__scopeCheckbox: n,
|
|
@@ -3718,7 +3718,7 @@ var Ml = z.forwardRef((e, t) => {
|
|
|
3718
3718
|
});
|
|
3719
3719
|
});
|
|
3720
3720
|
Ml.displayName = wl;
|
|
3721
|
-
var Nl = "CheckboxIndicator", Pl =
|
|
3721
|
+
var Nl = "CheckboxIndicator", Pl = B.forwardRef((e, t) => {
|
|
3722
3722
|
let { __scopeCheckbox: n, forceMount: r, ...a } = e, o = Ol(Nl, n);
|
|
3723
3723
|
return /* @__PURE__ */ H(i, {
|
|
3724
3724
|
present: r || Rl(o.checked) || o.checked === !0,
|
|
@@ -3735,9 +3735,9 @@ var Nl = "CheckboxIndicator", Pl = z.forwardRef((e, t) => {
|
|
|
3735
3735
|
});
|
|
3736
3736
|
});
|
|
3737
3737
|
Pl.displayName = Nl;
|
|
3738
|
-
var Fl = "CheckboxBubbleInput", Il =
|
|
3739
|
-
let { control: r, hasConsumerStoppedPropagationRef: i, checked: a, defaultChecked: o, required: s, disabled: l, name: u, value: d, form: f, bubbleInput: p, setBubbleInput: m } = Ol(Fl, e), h = c(n, m), g = Sl(a), _ =
|
|
3740
|
-
|
|
3738
|
+
var Fl = "CheckboxBubbleInput", Il = B.forwardRef(({ __scopeCheckbox: e, ...t }, n) => {
|
|
3739
|
+
let { control: r, hasConsumerStoppedPropagationRef: i, checked: a, defaultChecked: o, required: s, disabled: l, name: u, value: d, form: f, bubbleInput: p, setBubbleInput: m } = Ol(Fl, e), h = c(n, m), g = Sl(a), _ = $e(r);
|
|
3740
|
+
B.useEffect(() => {
|
|
3741
3741
|
let e = p;
|
|
3742
3742
|
if (!e) return;
|
|
3743
3743
|
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set, r = !i.current;
|
|
@@ -3751,7 +3751,7 @@ var Fl = "CheckboxBubbleInput", Il = z.forwardRef(({ __scopeCheckbox: e, ...t },
|
|
|
3751
3751
|
a,
|
|
3752
3752
|
i
|
|
3753
3753
|
]);
|
|
3754
|
-
let v =
|
|
3754
|
+
let v = B.useRef(Rl(a) ? !1 : a);
|
|
3755
3755
|
return /* @__PURE__ */ H(Cl.input, {
|
|
3756
3756
|
type: "checkbox",
|
|
3757
3757
|
"aria-hidden": !0,
|
|
@@ -3806,7 +3806,7 @@ var Bl = [
|
|
|
3806
3806
|
"svg",
|
|
3807
3807
|
"ul"
|
|
3808
3808
|
].reduce((e, t) => {
|
|
3809
|
-
let n = f(`Primitive.${t}`), r =
|
|
3809
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
3810
3810
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
3811
3811
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
3812
3812
|
...a,
|
|
@@ -3817,7 +3817,7 @@ var Bl = [
|
|
|
3817
3817
|
...e,
|
|
3818
3818
|
[t]: r
|
|
3819
3819
|
};
|
|
3820
|
-
}, {}), Vl = "Label", Hl =
|
|
3820
|
+
}, {}), Vl = "Label", Hl = B.forwardRef((e, t) => /* @__PURE__ */ H(Bl.label, {
|
|
3821
3821
|
...e,
|
|
3822
3822
|
ref: t,
|
|
3823
3823
|
onMouseDown: (t) => {
|
|
@@ -3844,7 +3844,7 @@ var Ul = Hl, Wl = [
|
|
|
3844
3844
|
"svg",
|
|
3845
3845
|
"ul"
|
|
3846
3846
|
].reduce((e, t) => {
|
|
3847
|
-
let n = f(`Primitive.${t}`), r =
|
|
3847
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
3848
3848
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
3849
3849
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
3850
3850
|
...a,
|
|
@@ -3855,8 +3855,8 @@ var Ul = Hl, Wl = [
|
|
|
3855
3855
|
...e,
|
|
3856
3856
|
[t]: r
|
|
3857
3857
|
};
|
|
3858
|
-
}, {}), Gl = "Radio", [Kl, ql] = t(Gl), [Jl, Yl] = Kl(Gl), Xl =
|
|
3859
|
-
let { __scopeRadio: n, name: r, checked: i = !1, required: a, disabled: o, value: l = "on", onCheck: u, form: d, ...f } = e, [p, m] =
|
|
3858
|
+
}, {}), Gl = "Radio", [Kl, ql] = t(Gl), [Jl, Yl] = Kl(Gl), Xl = B.forwardRef((e, t) => {
|
|
3859
|
+
let { __scopeRadio: n, name: r, checked: i = !1, required: a, disabled: o, value: l = "on", onCheck: u, form: d, ...f } = e, [p, m] = B.useState(null), h = c(t, (e) => m(e)), g = B.useRef(!1), _ = p ? d || !!p.closest("form") : !0;
|
|
3860
3860
|
return /* @__PURE__ */ U(Jl, {
|
|
3861
3861
|
scope: n,
|
|
3862
3862
|
checked: i,
|
|
@@ -3888,7 +3888,7 @@ var Ul = Hl, Wl = [
|
|
|
3888
3888
|
});
|
|
3889
3889
|
});
|
|
3890
3890
|
Xl.displayName = Gl;
|
|
3891
|
-
var Zl = "RadioIndicator", Ql =
|
|
3891
|
+
var Zl = "RadioIndicator", Ql = B.forwardRef((e, t) => {
|
|
3892
3892
|
let { __scopeRadio: n, forceMount: r, ...a } = e, o = Yl(Zl, n);
|
|
3893
3893
|
return /* @__PURE__ */ H(i, {
|
|
3894
3894
|
present: r || o.checked,
|
|
@@ -3901,9 +3901,9 @@ var Zl = "RadioIndicator", Ql = z.forwardRef((e, t) => {
|
|
|
3901
3901
|
});
|
|
3902
3902
|
});
|
|
3903
3903
|
Ql.displayName = Zl;
|
|
3904
|
-
var $l = "RadioBubbleInput", eu =
|
|
3905
|
-
let o =
|
|
3906
|
-
return
|
|
3904
|
+
var $l = "RadioBubbleInput", eu = B.forwardRef(({ __scopeRadio: e, control: t, checked: n, bubbles: r = !0, ...i }, a) => {
|
|
3905
|
+
let o = B.useRef(null), s = c(o, a), l = Sl(n), u = $e(t);
|
|
3906
|
+
return B.useEffect(() => {
|
|
3907
3907
|
let e = o.current;
|
|
3908
3908
|
if (!e) return;
|
|
3909
3909
|
let t = window.HTMLInputElement.prototype, i = Object.getOwnPropertyDescriptor(t, "checked").set;
|
|
@@ -3941,8 +3941,8 @@ var nu = [
|
|
|
3941
3941
|
"ArrowDown",
|
|
3942
3942
|
"ArrowLeft",
|
|
3943
3943
|
"ArrowRight"
|
|
3944
|
-
], ru = "RadioGroup", [iu, au] = t(ru, [
|
|
3945
|
-
let { __scopeRadioGroup: n, name: r, defaultValue: i, value: a, required: o = !1, disabled: s = !1, orientation: c, dir: l, loop: u = !0, onValueChange: d, ...f } = e, p = ou(n), m =
|
|
3944
|
+
], ru = "RadioGroup", [iu, au] = t(ru, [Be, ql]), ou = Be(), su = ql(), [cu, lu] = iu(ru), uu = B.forwardRef((e, t) => {
|
|
3945
|
+
let { __scopeRadioGroup: n, name: r, defaultValue: i, value: a, required: o = !1, disabled: s = !1, orientation: c, dir: l, loop: u = !0, onValueChange: d, ...f } = e, p = ou(n), m = We(l), [h, g] = He({
|
|
3946
3946
|
prop: a,
|
|
3947
3947
|
defaultProp: i ?? null,
|
|
3948
3948
|
onChange: d,
|
|
@@ -3955,7 +3955,7 @@ var nu = [
|
|
|
3955
3955
|
disabled: s,
|
|
3956
3956
|
value: h,
|
|
3957
3957
|
onValueChange: g,
|
|
3958
|
-
children: /* @__PURE__ */ H(
|
|
3958
|
+
children: /* @__PURE__ */ H(ze, {
|
|
3959
3959
|
asChild: !0,
|
|
3960
3960
|
...p,
|
|
3961
3961
|
orientation: c,
|
|
@@ -3974,16 +3974,16 @@ var nu = [
|
|
|
3974
3974
|
});
|
|
3975
3975
|
});
|
|
3976
3976
|
uu.displayName = ru;
|
|
3977
|
-
var du = "RadioGroupItem", fu =
|
|
3978
|
-
let { __scopeRadioGroup: n, disabled: r, ...i } = e, a = lu(du, n), o = a.disabled || r, l = ou(n), u = su(n), d =
|
|
3979
|
-
return
|
|
3977
|
+
var du = "RadioGroupItem", fu = B.forwardRef((e, t) => {
|
|
3978
|
+
let { __scopeRadioGroup: n, disabled: r, ...i } = e, a = lu(du, n), o = a.disabled || r, l = ou(n), u = su(n), d = B.useRef(null), f = c(t, d), p = a.value === i.value, m = B.useRef(!1);
|
|
3979
|
+
return B.useEffect(() => {
|
|
3980
3980
|
let e = (e) => {
|
|
3981
3981
|
nu.includes(e.key) && (m.current = !0);
|
|
3982
3982
|
}, t = () => m.current = !1;
|
|
3983
3983
|
return document.addEventListener("keydown", e), document.addEventListener("keyup", t), () => {
|
|
3984
3984
|
document.removeEventListener("keydown", e), document.removeEventListener("keyup", t);
|
|
3985
3985
|
};
|
|
3986
|
-
}, []), /* @__PURE__ */ H(
|
|
3986
|
+
}, []), /* @__PURE__ */ H(Ve, {
|
|
3987
3987
|
asChild: !0,
|
|
3988
3988
|
...l,
|
|
3989
3989
|
focusable: !o,
|
|
@@ -4007,7 +4007,7 @@ var du = "RadioGroupItem", fu = z.forwardRef((e, t) => {
|
|
|
4007
4007
|
});
|
|
4008
4008
|
});
|
|
4009
4009
|
fu.displayName = du;
|
|
4010
|
-
var pu = "RadioGroupIndicator", mu =
|
|
4010
|
+
var pu = "RadioGroupIndicator", mu = B.forwardRef((e, t) => {
|
|
4011
4011
|
let { __scopeRadioGroup: n, ...r } = e;
|
|
4012
4012
|
return /* @__PURE__ */ H(Ql, {
|
|
4013
4013
|
...su(n),
|
|
@@ -4035,7 +4035,7 @@ var hu = uu, gu = fu, _u = mu, vu = [
|
|
|
4035
4035
|
"svg",
|
|
4036
4036
|
"ul"
|
|
4037
4037
|
].reduce((e, t) => {
|
|
4038
|
-
let n = f(`Primitive.${t}`), r =
|
|
4038
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
4039
4039
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
4040
4040
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
4041
4041
|
...a,
|
|
@@ -4051,19 +4051,19 @@ var hu = uu, gu = fu, _u = mu, vu = [
|
|
|
4051
4051
|
"Enter",
|
|
4052
4052
|
"ArrowUp",
|
|
4053
4053
|
"ArrowDown"
|
|
4054
|
-
], bu = [" ", "Enter"], xu = "Select", [Su, Cu, wu] =
|
|
4055
|
-
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: d, disabled: f, required: p, form: m } = e, h = Du(t), [g, _] =
|
|
4054
|
+
], bu = [" ", "Enter"], xu = "Select", [Su, Cu, wu] = Re(xu), [Tu, Eu] = t(xu, [wu, Ke]), Du = Ke(), [Ou, ku] = Tu(xu), [Au, ju] = Tu(xu), Mu = (e) => {
|
|
4055
|
+
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: d, disabled: f, required: p, form: m } = e, h = Du(t), [g, _] = B.useState(null), [v, y] = B.useState(null), [b, x] = B.useState(!1), S = We(l), [C, w] = He({
|
|
4056
4056
|
prop: r,
|
|
4057
4057
|
defaultProp: i ?? !1,
|
|
4058
4058
|
onChange: a,
|
|
4059
4059
|
caller: xu
|
|
4060
|
-
}), [T, E] =
|
|
4060
|
+
}), [T, E] = He({
|
|
4061
4061
|
prop: o,
|
|
4062
4062
|
defaultProp: s,
|
|
4063
4063
|
onChange: c,
|
|
4064
4064
|
caller: xu
|
|
4065
|
-
}), D =
|
|
4066
|
-
return /* @__PURE__ */ H(
|
|
4065
|
+
}), D = B.useRef(null), O = g ? m || !!g.closest("form") : !0, [k, A] = B.useState(/* @__PURE__ */ new Set()), j = Array.from(k).map((e) => e.props.value).join(";");
|
|
4066
|
+
return /* @__PURE__ */ H(Xe, {
|
|
4067
4067
|
...h,
|
|
4068
4068
|
children: /* @__PURE__ */ U(Ou, {
|
|
4069
4069
|
required: p,
|
|
@@ -4074,7 +4074,7 @@ var hu = uu, gu = fu, _u = mu, vu = [
|
|
|
4074
4074
|
onValueNodeChange: y,
|
|
4075
4075
|
valueNodeHasChildren: b,
|
|
4076
4076
|
onValueNodeHasChildrenChange: x,
|
|
4077
|
-
contentId:
|
|
4077
|
+
contentId: Ue(),
|
|
4078
4078
|
value: T,
|
|
4079
4079
|
onValueChange: E,
|
|
4080
4080
|
open: C,
|
|
@@ -4086,10 +4086,10 @@ var hu = uu, gu = fu, _u = mu, vu = [
|
|
|
4086
4086
|
scope: t,
|
|
4087
4087
|
children: /* @__PURE__ */ H(Au, {
|
|
4088
4088
|
scope: e.__scopeSelect,
|
|
4089
|
-
onNativeOptionAdd:
|
|
4089
|
+
onNativeOptionAdd: B.useCallback((e) => {
|
|
4090
4090
|
A((t) => new Set(t).add(e));
|
|
4091
4091
|
}, []),
|
|
4092
|
-
onNativeOptionRemove:
|
|
4092
|
+
onNativeOptionRemove: B.useCallback((e) => {
|
|
4093
4093
|
A((t) => {
|
|
4094
4094
|
let n = new Set(t);
|
|
4095
4095
|
return n.delete(e), n;
|
|
@@ -4113,8 +4113,8 @@ var hu = uu, gu = fu, _u = mu, vu = [
|
|
|
4113
4113
|
});
|
|
4114
4114
|
};
|
|
4115
4115
|
Mu.displayName = xu;
|
|
4116
|
-
var Nu = "SelectTrigger", Pu =
|
|
4117
|
-
let { __scopeSelect: n, disabled: r = !1, ...i } = e, a = Du(n), o = ku(Nu, n), l = o.disabled || r, u = c(t, o.onTriggerChange), d = Cu(n), f =
|
|
4116
|
+
var Nu = "SelectTrigger", Pu = B.forwardRef((e, t) => {
|
|
4117
|
+
let { __scopeSelect: n, disabled: r = !1, ...i } = e, a = Du(n), o = ku(Nu, n), l = o.disabled || r, u = c(t, o.onTriggerChange), d = Cu(n), f = B.useRef("touch"), [p, m, h] = kd((e) => {
|
|
4118
4118
|
let t = d().filter((e) => !e.disabled), n = Ad(t, e, t.find((e) => e.value === o.value));
|
|
4119
4119
|
n !== void 0 && o.onValueChange(n.value);
|
|
4120
4120
|
}), g = (e) => {
|
|
@@ -4123,7 +4123,7 @@ var Nu = "SelectTrigger", Pu = z.forwardRef((e, t) => {
|
|
|
4123
4123
|
y: Math.round(e.pageY)
|
|
4124
4124
|
});
|
|
4125
4125
|
};
|
|
4126
|
-
return /* @__PURE__ */ H(
|
|
4126
|
+
return /* @__PURE__ */ H(nt, {
|
|
4127
4127
|
asChild: !0,
|
|
4128
4128
|
...a,
|
|
4129
4129
|
children: /* @__PURE__ */ H(vu.button, {
|
|
@@ -4156,7 +4156,7 @@ var Nu = "SelectTrigger", Pu = z.forwardRef((e, t) => {
|
|
|
4156
4156
|
});
|
|
4157
4157
|
});
|
|
4158
4158
|
Pu.displayName = Nu;
|
|
4159
|
-
var Fu = "SelectValue", Iu =
|
|
4159
|
+
var Fu = "SelectValue", Iu = B.forwardRef((t, n) => {
|
|
4160
4160
|
let { __scopeSelect: r, className: i, style: a, children: o, placeholder: s = "", ...l } = t, u = ku(Fu, r), { onValueNodeHasChildrenChange: d } = u, f = o !== void 0, p = c(n, u.onValueNodeChange);
|
|
4161
4161
|
return e(() => {
|
|
4162
4162
|
d(f);
|
|
@@ -4168,7 +4168,7 @@ var Fu = "SelectValue", Iu = z.forwardRef((t, n) => {
|
|
|
4168
4168
|
});
|
|
4169
4169
|
});
|
|
4170
4170
|
Iu.displayName = Fu;
|
|
4171
|
-
var Lu = "SelectIcon", Ru =
|
|
4171
|
+
var Lu = "SelectIcon", Ru = B.forwardRef((e, t) => {
|
|
4172
4172
|
let { __scopeSelect: n, children: r, ...i } = e;
|
|
4173
4173
|
return /* @__PURE__ */ H(vu.span, {
|
|
4174
4174
|
"aria-hidden": !0,
|
|
@@ -4178,13 +4178,13 @@ var Lu = "SelectIcon", Ru = z.forwardRef((e, t) => {
|
|
|
4178
4178
|
});
|
|
4179
4179
|
});
|
|
4180
4180
|
Ru.displayName = Lu;
|
|
4181
|
-
var zu = "SelectPortal", Bu = (e) => /* @__PURE__ */ H(
|
|
4181
|
+
var zu = "SelectPortal", Bu = (e) => /* @__PURE__ */ H(rt, {
|
|
4182
4182
|
asChild: !0,
|
|
4183
4183
|
...e
|
|
4184
4184
|
});
|
|
4185
4185
|
Bu.displayName = zu;
|
|
4186
|
-
var Vu = "SelectContent", Hu =
|
|
4187
|
-
let r = ku(Vu, t.__scopeSelect), [i, a] =
|
|
4186
|
+
var Vu = "SelectContent", Hu = B.forwardRef((t, n) => {
|
|
4187
|
+
let r = ku(Vu, t.__scopeSelect), [i, a] = B.useState();
|
|
4188
4188
|
if (e(() => {
|
|
4189
4189
|
a(new DocumentFragment());
|
|
4190
4190
|
}, []), !r.open) {
|
|
@@ -4203,37 +4203,37 @@ var Vu = "SelectContent", Hu = z.forwardRef((t, n) => {
|
|
|
4203
4203
|
});
|
|
4204
4204
|
});
|
|
4205
4205
|
Hu.displayName = Vu;
|
|
4206
|
-
var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.RemoveScroll"), Ju =
|
|
4207
|
-
let { __scopeSelect: n, position: r = "item-aligned", onCloseAutoFocus: i, onEscapeKeyDown: a, onPointerDownOutside: o, side: l, sideOffset: u, align: d, alignOffset: f, arrowPadding: p, collisionBoundary: m, collisionPadding: h, sticky: g, hideWhenDetached: _, avoidCollisions: v, ...y } = e, b = ku(Vu, n), [x, S] =
|
|
4208
|
-
|
|
4209
|
-
if (x) return
|
|
4210
|
-
}, [x]),
|
|
4211
|
-
let
|
|
4206
|
+
var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.RemoveScroll"), Ju = B.forwardRef((e, t) => {
|
|
4207
|
+
let { __scopeSelect: n, position: r = "item-aligned", onCloseAutoFocus: i, onEscapeKeyDown: a, onPointerDownOutside: o, side: l, sideOffset: u, align: d, alignOffset: f, arrowPadding: p, collisionBoundary: m, collisionPadding: h, sticky: g, hideWhenDetached: _, avoidCollisions: v, ...y } = e, b = ku(Vu, n), [x, S] = B.useState(null), [C, w] = B.useState(null), T = c(t, (e) => S(e)), [E, D] = B.useState(null), [O, k] = B.useState(null), A = Cu(n), [j, M] = B.useState(!1), N = B.useRef(!1);
|
|
4208
|
+
B.useEffect(() => {
|
|
4209
|
+
if (x) return tt(x);
|
|
4210
|
+
}, [x]), Ze();
|
|
4211
|
+
let P = B.useCallback((e) => {
|
|
4212
4212
|
let [t, ...n] = A().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
|
|
4213
4213
|
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && C && (C.scrollTop = 0), n === r && C && (C.scrollTop = C.scrollHeight), n?.focus(), document.activeElement !== i)) return;
|
|
4214
|
-
}, [A, C]),
|
|
4215
|
-
|
|
4214
|
+
}, [A, C]), ee = B.useCallback(() => P([E, x]), [
|
|
4215
|
+
P,
|
|
4216
4216
|
E,
|
|
4217
4217
|
x
|
|
4218
4218
|
]);
|
|
4219
|
-
|
|
4220
|
-
j &&
|
|
4221
|
-
}, [j,
|
|
4222
|
-
let { onOpenChange:
|
|
4223
|
-
|
|
4219
|
+
B.useEffect(() => {
|
|
4220
|
+
j && ee();
|
|
4221
|
+
}, [j, ee]);
|
|
4222
|
+
let { onOpenChange: F, triggerPointerDownPosRef: I } = b;
|
|
4223
|
+
B.useEffect(() => {
|
|
4224
4224
|
if (x) {
|
|
4225
4225
|
let e = {
|
|
4226
4226
|
x: 0,
|
|
4227
4227
|
y: 0
|
|
4228
4228
|
}, t = (t) => {
|
|
4229
4229
|
e = {
|
|
4230
|
-
x: Math.abs(Math.round(t.pageX) - (
|
|
4231
|
-
y: Math.abs(Math.round(t.pageY) - (
|
|
4230
|
+
x: Math.abs(Math.round(t.pageX) - (I.current?.x ?? 0)),
|
|
4231
|
+
y: Math.abs(Math.round(t.pageY) - (I.current?.y ?? 0))
|
|
4232
4232
|
};
|
|
4233
4233
|
}, n = (n) => {
|
|
4234
|
-
e.x <= 10 && e.y <= 10 ? n.preventDefault() : x.contains(n.target) ||
|
|
4234
|
+
e.x <= 10 && e.y <= 10 ? n.preventDefault() : x.contains(n.target) || F(!1), document.removeEventListener("pointermove", t), I.current = null;
|
|
4235
4235
|
};
|
|
4236
|
-
return
|
|
4236
|
+
return I.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
|
|
4237
4237
|
capture: !0,
|
|
4238
4238
|
once: !0
|
|
4239
4239
|
})), () => {
|
|
@@ -4242,24 +4242,24 @@ var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.
|
|
|
4242
4242
|
}
|
|
4243
4243
|
}, [
|
|
4244
4244
|
x,
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
]),
|
|
4248
|
-
let e = () =>
|
|
4245
|
+
F,
|
|
4246
|
+
I
|
|
4247
|
+
]), B.useEffect(() => {
|
|
4248
|
+
let e = () => F(!1);
|
|
4249
4249
|
return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
|
|
4250
4250
|
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
4251
4251
|
};
|
|
4252
|
-
}, [
|
|
4253
|
-
let [
|
|
4252
|
+
}, [F]);
|
|
4253
|
+
let [te, ne] = kd((e) => {
|
|
4254
4254
|
let t = A().filter((e) => !e.disabled), n = Ad(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
4255
4255
|
n && setTimeout(() => n.ref.current.focus());
|
|
4256
|
-
}),
|
|
4257
|
-
let r = !
|
|
4258
|
-
(b.value !== void 0 && b.value === t || r) && (D(e), r && (
|
|
4259
|
-
}, [b.value]),
|
|
4260
|
-
let r = !
|
|
4256
|
+
}), re = B.useCallback((e, t, n) => {
|
|
4257
|
+
let r = !N.current && !n;
|
|
4258
|
+
(b.value !== void 0 && b.value === t || r) && (D(e), r && (N.current = !0));
|
|
4259
|
+
}, [b.value]), ie = B.useCallback(() => x?.focus(), [x]), ae = B.useCallback((e, t, n) => {
|
|
4260
|
+
let r = !N.current && !n;
|
|
4261
4261
|
(b.value !== void 0 && b.value === t || r) && k(e);
|
|
4262
|
-
}, [b.value]),
|
|
4262
|
+
}, [b.value]), oe = r === "popper" ? Qu : Xu, se = oe === Qu ? {
|
|
4263
4263
|
side: l,
|
|
4264
4264
|
sideOffset: u,
|
|
4265
4265
|
align: d,
|
|
@@ -4276,19 +4276,19 @@ var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.
|
|
|
4276
4276
|
content: x,
|
|
4277
4277
|
viewport: C,
|
|
4278
4278
|
onViewportChange: w,
|
|
4279
|
-
itemRefCallback:
|
|
4279
|
+
itemRefCallback: re,
|
|
4280
4280
|
selectedItem: E,
|
|
4281
|
-
onItemLeave:
|
|
4282
|
-
itemTextRefCallback:
|
|
4283
|
-
focusSelectedItem:
|
|
4281
|
+
onItemLeave: ie,
|
|
4282
|
+
itemTextRefCallback: ae,
|
|
4283
|
+
focusSelectedItem: ee,
|
|
4284
4284
|
selectedItemText: O,
|
|
4285
4285
|
position: r,
|
|
4286
4286
|
isPositioned: j,
|
|
4287
|
-
searchRef:
|
|
4288
|
-
children: /* @__PURE__ */ H(
|
|
4287
|
+
searchRef: te,
|
|
4288
|
+
children: /* @__PURE__ */ H(qe, {
|
|
4289
4289
|
as: qu,
|
|
4290
4290
|
allowPinchZoom: !0,
|
|
4291
|
-
children: /* @__PURE__ */ H(
|
|
4291
|
+
children: /* @__PURE__ */ H(Je, {
|
|
4292
4292
|
asChild: !0,
|
|
4293
4293
|
trapped: b.open,
|
|
4294
4294
|
onMountAutoFocus: (e) => {
|
|
@@ -4297,22 +4297,22 @@ var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.
|
|
|
4297
4297
|
onUnmountAutoFocus: s(i, (e) => {
|
|
4298
4298
|
b.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
|
|
4299
4299
|
}),
|
|
4300
|
-
children: /* @__PURE__ */ H(
|
|
4300
|
+
children: /* @__PURE__ */ H(Ye, {
|
|
4301
4301
|
asChild: !0,
|
|
4302
4302
|
disableOutsidePointerEvents: !0,
|
|
4303
4303
|
onEscapeKeyDown: a,
|
|
4304
4304
|
onPointerDownOutside: o,
|
|
4305
4305
|
onFocusOutside: (e) => e.preventDefault(),
|
|
4306
4306
|
onDismiss: () => b.onOpenChange(!1),
|
|
4307
|
-
children: /* @__PURE__ */ H(
|
|
4307
|
+
children: /* @__PURE__ */ H(oe, {
|
|
4308
4308
|
role: "listbox",
|
|
4309
4309
|
id: b.contentId,
|
|
4310
4310
|
"data-state": b.open ? "open" : "closed",
|
|
4311
4311
|
dir: b.dir,
|
|
4312
4312
|
onContextMenu: (e) => e.preventDefault(),
|
|
4313
4313
|
...y,
|
|
4314
|
-
...
|
|
4315
|
-
onPlaced: () =>
|
|
4314
|
+
...se,
|
|
4315
|
+
onPlaced: () => M(!0),
|
|
4316
4316
|
ref: T,
|
|
4317
4317
|
style: {
|
|
4318
4318
|
display: "flex",
|
|
@@ -4322,7 +4322,7 @@ var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.
|
|
|
4322
4322
|
},
|
|
4323
4323
|
onKeyDown: s(y.onKeyDown, (e) => {
|
|
4324
4324
|
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
4325
|
-
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 &&
|
|
4325
|
+
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && ne(e.key), [
|
|
4326
4326
|
"ArrowUp",
|
|
4327
4327
|
"ArrowDown",
|
|
4328
4328
|
"Home",
|
|
@@ -4333,7 +4333,7 @@ var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.
|
|
|
4333
4333
|
let n = e.target, r = t.indexOf(n);
|
|
4334
4334
|
t = t.slice(r + 1);
|
|
4335
4335
|
}
|
|
4336
|
-
setTimeout(() =>
|
|
4336
|
+
setTimeout(() => P(t)), e.preventDefault();
|
|
4337
4337
|
}
|
|
4338
4338
|
})
|
|
4339
4339
|
})
|
|
@@ -4343,15 +4343,15 @@ var Uu = 10, [Wu, Gu] = Tu(Vu), Ku = "SelectContentImpl", qu = f("SelectContent.
|
|
|
4343
4343
|
});
|
|
4344
4344
|
});
|
|
4345
4345
|
Ju.displayName = Ku;
|
|
4346
|
-
var Yu = "SelectItemAlignedPosition", Xu =
|
|
4347
|
-
let { __scopeSelect: r, onPlaced: i, ...a } = t, o = ku(Vu, r), s = Gu(Vu, r), [l, u] =
|
|
4346
|
+
var Yu = "SelectItemAlignedPosition", Xu = B.forwardRef((t, n) => {
|
|
4347
|
+
let { __scopeSelect: r, onPlaced: i, ...a } = t, o = ku(Vu, r), s = Gu(Vu, r), [l, u] = B.useState(null), [d, f] = B.useState(null), p = c(n, (e) => f(e)), m = Cu(r), h = B.useRef(!1), g = B.useRef(!0), { viewport: _, selectedItem: v, selectedItemText: y, focusSelectedItem: b } = s, x = B.useCallback(() => {
|
|
4348
4348
|
if (o.trigger && o.valueNode && l && d && _ && v && y) {
|
|
4349
4349
|
let e = o.trigger.getBoundingClientRect(), t = d.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), r = y.getBoundingClientRect();
|
|
4350
4350
|
if (o.dir !== "rtl") {
|
|
4351
|
-
let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, c = Math.max(s, t.width), u = window.innerWidth - Uu, d =
|
|
4351
|
+
let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, c = Math.max(s, t.width), u = window.innerWidth - Uu, d = Ge(a, [Uu, Math.max(Uu, u - c)]);
|
|
4352
4352
|
l.style.minWidth = s + "px", l.style.left = d + "px";
|
|
4353
4353
|
} else {
|
|
4354
|
-
let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, c = Math.max(s, t.width), u = window.innerWidth - Uu, d =
|
|
4354
|
+
let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, c = Math.max(s, t.width), u = window.innerWidth - Uu, d = Ge(a, [Uu, Math.max(Uu, u - c)]);
|
|
4355
4355
|
l.style.minWidth = s + "px", l.style.right = d + "px";
|
|
4356
4356
|
}
|
|
4357
4357
|
let a = m(), s = window.innerHeight - Uu * 2, c = _.scrollHeight, u = window.getComputedStyle(d), f = parseInt(u.borderTopWidth, 10), p = parseInt(u.paddingTop, 10), g = parseInt(u.borderBottomWidth, 10), b = parseInt(u.paddingBottom, 10), x = f + p + c + b + g, S = Math.min(v.offsetHeight * 5, x), C = window.getComputedStyle(_), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - Uu, D = s - E, O = v.offsetHeight / 2, k = v.offsetTop + O, A = f + p + k, j = x - A;
|
|
@@ -4381,14 +4381,14 @@ var Yu = "SelectItemAlignedPosition", Xu = z.forwardRef((t, n) => {
|
|
|
4381
4381
|
i
|
|
4382
4382
|
]);
|
|
4383
4383
|
e(() => x(), [x]);
|
|
4384
|
-
let [S, C] =
|
|
4384
|
+
let [S, C] = B.useState();
|
|
4385
4385
|
return e(() => {
|
|
4386
4386
|
d && C(window.getComputedStyle(d).zIndex);
|
|
4387
4387
|
}, [d]), /* @__PURE__ */ H($u, {
|
|
4388
4388
|
scope: r,
|
|
4389
4389
|
contentWrapper: l,
|
|
4390
4390
|
shouldExpandOnScrollRef: h,
|
|
4391
|
-
onScrollButtonChange:
|
|
4391
|
+
onScrollButtonChange: B.useCallback((e) => {
|
|
4392
4392
|
e && g.current === !0 && (x(), b?.(), g.current = !1);
|
|
4393
4393
|
}, [x, b]),
|
|
4394
4394
|
children: /* @__PURE__ */ H("div", {
|
|
@@ -4412,9 +4412,9 @@ var Yu = "SelectItemAlignedPosition", Xu = z.forwardRef((t, n) => {
|
|
|
4412
4412
|
});
|
|
4413
4413
|
});
|
|
4414
4414
|
Xu.displayName = Yu;
|
|
4415
|
-
var Zu = "SelectPopperPosition", Qu =
|
|
4415
|
+
var Zu = "SelectPopperPosition", Qu = B.forwardRef((e, t) => {
|
|
4416
4416
|
let { __scopeSelect: n, align: r = "start", collisionPadding: i = Uu, ...a } = e;
|
|
4417
|
-
return /* @__PURE__ */ H(
|
|
4417
|
+
return /* @__PURE__ */ H(et, {
|
|
4418
4418
|
...Du(n),
|
|
4419
4419
|
...a,
|
|
4420
4420
|
ref: t,
|
|
@@ -4432,8 +4432,8 @@ var Zu = "SelectPopperPosition", Qu = z.forwardRef((e, t) => {
|
|
|
4432
4432
|
});
|
|
4433
4433
|
});
|
|
4434
4434
|
Qu.displayName = Zu;
|
|
4435
|
-
var [$u, ed] = Tu(Vu, {}), td = "SelectViewport", nd =
|
|
4436
|
-
let { __scopeSelect: n, nonce: r, ...i } = e, a = Gu(td, n), o = ed(td, n), l = c(t, a.onViewportChange), u =
|
|
4435
|
+
var [$u, ed] = Tu(Vu, {}), td = "SelectViewport", nd = B.forwardRef((e, t) => {
|
|
4436
|
+
let { __scopeSelect: n, nonce: r, ...i } = e, a = Gu(td, n), o = ed(td, n), l = c(t, a.onViewportChange), u = B.useRef(0);
|
|
4437
4437
|
return /* @__PURE__ */ U(gt, { children: [/* @__PURE__ */ H("style", {
|
|
4438
4438
|
dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
|
|
4439
4439
|
nonce: r
|
|
@@ -4468,8 +4468,8 @@ var [$u, ed] = Tu(Vu, {}), td = "SelectViewport", nd = z.forwardRef((e, t) => {
|
|
|
4468
4468
|
})] });
|
|
4469
4469
|
});
|
|
4470
4470
|
nd.displayName = td;
|
|
4471
|
-
var rd = "SelectGroup", [id, ad] = Tu(rd), od =
|
|
4472
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
4471
|
+
var rd = "SelectGroup", [id, ad] = Tu(rd), od = B.forwardRef((e, t) => {
|
|
4472
|
+
let { __scopeSelect: n, ...r } = e, i = Ue();
|
|
4473
4473
|
return /* @__PURE__ */ H(id, {
|
|
4474
4474
|
scope: n,
|
|
4475
4475
|
id: i,
|
|
@@ -4482,7 +4482,7 @@ var rd = "SelectGroup", [id, ad] = Tu(rd), od = z.forwardRef((e, t) => {
|
|
|
4482
4482
|
});
|
|
4483
4483
|
});
|
|
4484
4484
|
od.displayName = rd;
|
|
4485
|
-
var sd = "SelectLabel", cd =
|
|
4485
|
+
var sd = "SelectLabel", cd = B.forwardRef((e, t) => {
|
|
4486
4486
|
let { __scopeSelect: n, ...r } = e, i = ad(sd, n);
|
|
4487
4487
|
return /* @__PURE__ */ H(vu.div, {
|
|
4488
4488
|
id: i.id,
|
|
@@ -4491,8 +4491,8 @@ var sd = "SelectLabel", cd = z.forwardRef((e, t) => {
|
|
|
4491
4491
|
});
|
|
4492
4492
|
});
|
|
4493
4493
|
cd.displayName = sd;
|
|
4494
|
-
var ld = "SelectItem", [ud, dd] = Tu(ld), fd =
|
|
4495
|
-
let { __scopeSelect: n, value: r, disabled: i = !1, textValue: a, ...o } = e, l = ku(ld, n), u = Gu(ld, n), d = l.value === r, [f, p] =
|
|
4494
|
+
var ld = "SelectItem", [ud, dd] = Tu(ld), fd = B.forwardRef((e, t) => {
|
|
4495
|
+
let { __scopeSelect: n, value: r, disabled: i = !1, textValue: a, ...o } = e, l = ku(ld, n), u = Gu(ld, n), d = l.value === r, [f, p] = B.useState(a ?? ""), [m, h] = B.useState(!1), g = c(t, (e) => u.itemRefCallback?.(e, r, i)), _ = Ue(), v = B.useRef("touch"), y = () => {
|
|
4496
4496
|
i || (l.onValueChange(r), l.onOpenChange(!1));
|
|
4497
4497
|
};
|
|
4498
4498
|
if (r === "") throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
@@ -4502,7 +4502,7 @@ var ld = "SelectItem", [ud, dd] = Tu(ld), fd = z.forwardRef((e, t) => {
|
|
|
4502
4502
|
disabled: i,
|
|
4503
4503
|
textId: _,
|
|
4504
4504
|
isSelected: d,
|
|
4505
|
-
onItemTextChange:
|
|
4505
|
+
onItemTextChange: B.useCallback((e) => {
|
|
4506
4506
|
p((t) => t || (e?.textContent ?? "").trim());
|
|
4507
4507
|
}, []),
|
|
4508
4508
|
children: /* @__PURE__ */ H(Su.ItemSlot, {
|
|
@@ -4546,8 +4546,8 @@ var ld = "SelectItem", [ud, dd] = Tu(ld), fd = z.forwardRef((e, t) => {
|
|
|
4546
4546
|
});
|
|
4547
4547
|
});
|
|
4548
4548
|
fd.displayName = ld;
|
|
4549
|
-
var pd = "SelectItemText", md =
|
|
4550
|
-
let { __scopeSelect: r, className: i, style: a, ...o } = t, s = ku(pd, r), l = Gu(pd, r), u = dd(pd, r), d = ju(pd, r), [f, p] =
|
|
4549
|
+
var pd = "SelectItemText", md = B.forwardRef((t, n) => {
|
|
4550
|
+
let { __scopeSelect: r, className: i, style: a, ...o } = t, s = ku(pd, r), l = Gu(pd, r), u = dd(pd, r), d = ju(pd, r), [f, p] = B.useState(null), m = c(n, (e) => p(e), u.onItemTextChange, (e) => l.itemTextRefCallback?.(e, u.value, u.disabled)), h = f?.textContent, g = B.useMemo(() => /* @__PURE__ */ H("option", {
|
|
4551
4551
|
value: u.value,
|
|
4552
4552
|
disabled: u.disabled,
|
|
4553
4553
|
children: h
|
|
@@ -4567,7 +4567,7 @@ var pd = "SelectItemText", md = z.forwardRef((t, n) => {
|
|
|
4567
4567
|
}), u.isSelected && s.valueNode && !s.valueNodeHasChildren ? vt.createPortal(o.children, s.valueNode) : null] });
|
|
4568
4568
|
});
|
|
4569
4569
|
md.displayName = pd;
|
|
4570
|
-
var hd = "SelectItemIndicator", gd =
|
|
4570
|
+
var hd = "SelectItemIndicator", gd = B.forwardRef((e, t) => {
|
|
4571
4571
|
let { __scopeSelect: n, ...r } = e;
|
|
4572
4572
|
return dd(hd, n).isSelected ? /* @__PURE__ */ H(vu.span, {
|
|
4573
4573
|
"aria-hidden": !0,
|
|
@@ -4576,8 +4576,8 @@ var hd = "SelectItemIndicator", gd = z.forwardRef((e, t) => {
|
|
|
4576
4576
|
}) : null;
|
|
4577
4577
|
});
|
|
4578
4578
|
gd.displayName = hd;
|
|
4579
|
-
var _d = "SelectScrollUpButton", vd =
|
|
4580
|
-
let r = Gu(_d, t.__scopeSelect), i = ed(_d, t.__scopeSelect), [a, o] =
|
|
4579
|
+
var _d = "SelectScrollUpButton", vd = B.forwardRef((t, n) => {
|
|
4580
|
+
let r = Gu(_d, t.__scopeSelect), i = ed(_d, t.__scopeSelect), [a, o] = B.useState(!1), s = c(n, i.onScrollButtonChange);
|
|
4581
4581
|
return e(() => {
|
|
4582
4582
|
if (r.viewport && r.isPositioned) {
|
|
4583
4583
|
let e = function() {
|
|
@@ -4595,8 +4595,8 @@ var _d = "SelectScrollUpButton", vd = z.forwardRef((t, n) => {
|
|
|
4595
4595
|
}) : null;
|
|
4596
4596
|
});
|
|
4597
4597
|
vd.displayName = _d;
|
|
4598
|
-
var yd = "SelectScrollDownButton", bd =
|
|
4599
|
-
let r = Gu(yd, t.__scopeSelect), i = ed(yd, t.__scopeSelect), [a, o] =
|
|
4598
|
+
var yd = "SelectScrollDownButton", bd = B.forwardRef((t, n) => {
|
|
4599
|
+
let r = Gu(yd, t.__scopeSelect), i = ed(yd, t.__scopeSelect), [a, o] = B.useState(!1), s = c(n, i.onScrollButtonChange);
|
|
4600
4600
|
return e(() => {
|
|
4601
4601
|
if (r.viewport && r.isPositioned) {
|
|
4602
4602
|
let e = function() {
|
|
@@ -4615,11 +4615,11 @@ var yd = "SelectScrollDownButton", bd = z.forwardRef((t, n) => {
|
|
|
4615
4615
|
}) : null;
|
|
4616
4616
|
});
|
|
4617
4617
|
bd.displayName = yd;
|
|
4618
|
-
var xd =
|
|
4619
|
-
let { __scopeSelect: r, onAutoScroll: i, ...a } = t, o = Gu("SelectScrollButton", r), c =
|
|
4618
|
+
var xd = B.forwardRef((t, n) => {
|
|
4619
|
+
let { __scopeSelect: r, onAutoScroll: i, ...a } = t, o = Gu("SelectScrollButton", r), c = B.useRef(null), l = Cu(r), u = B.useCallback(() => {
|
|
4620
4620
|
c.current !== null && (window.clearInterval(c.current), c.current = null);
|
|
4621
4621
|
}, []);
|
|
4622
|
-
return
|
|
4622
|
+
return B.useEffect(() => () => u(), [u]), e(() => {
|
|
4623
4623
|
l().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
4624
4624
|
}, [l]), /* @__PURE__ */ H(vu.div, {
|
|
4625
4625
|
"aria-hidden": !0,
|
|
@@ -4639,7 +4639,7 @@ var xd = z.forwardRef((t, n) => {
|
|
|
4639
4639
|
u();
|
|
4640
4640
|
})
|
|
4641
4641
|
});
|
|
4642
|
-
}), Sd = "SelectSeparator", Cd =
|
|
4642
|
+
}), Sd = "SelectSeparator", Cd = B.forwardRef((e, t) => {
|
|
4643
4643
|
let { __scopeSelect: n, ...r } = e;
|
|
4644
4644
|
return /* @__PURE__ */ H(vu.div, {
|
|
4645
4645
|
"aria-hidden": !0,
|
|
@@ -4648,18 +4648,18 @@ var xd = z.forwardRef((t, n) => {
|
|
|
4648
4648
|
});
|
|
4649
4649
|
});
|
|
4650
4650
|
Cd.displayName = Sd;
|
|
4651
|
-
var wd = "SelectArrow", Td =
|
|
4651
|
+
var wd = "SelectArrow", Td = B.forwardRef((e, t) => {
|
|
4652
4652
|
let { __scopeSelect: n, ...r } = e, i = Du(n), a = ku(wd, n), o = Gu(wd, n);
|
|
4653
|
-
return a.open && o.position === "popper" ? /* @__PURE__ */ H(
|
|
4653
|
+
return a.open && o.position === "popper" ? /* @__PURE__ */ H(Qe, {
|
|
4654
4654
|
...i,
|
|
4655
4655
|
...r,
|
|
4656
4656
|
ref: t
|
|
4657
4657
|
}) : null;
|
|
4658
4658
|
});
|
|
4659
4659
|
Td.displayName = wd;
|
|
4660
|
-
var Ed = "SelectBubbleInput", Dd =
|
|
4661
|
-
let i =
|
|
4662
|
-
return
|
|
4660
|
+
var Ed = "SelectBubbleInput", Dd = B.forwardRef(({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
4661
|
+
let i = B.useRef(null), a = c(r, i), o = Sl(t);
|
|
4662
|
+
return B.useEffect(() => {
|
|
4663
4663
|
let e = i.current;
|
|
4664
4664
|
if (!e) return;
|
|
4665
4665
|
let n = window.HTMLSelectElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value").set;
|
|
@@ -4682,15 +4682,15 @@ function Od(e) {
|
|
|
4682
4682
|
return e === "" || e === void 0;
|
|
4683
4683
|
}
|
|
4684
4684
|
function kd(e) {
|
|
4685
|
-
let t = l(e), n =
|
|
4685
|
+
let t = l(e), n = B.useRef(""), r = B.useRef(0), i = B.useCallback((e) => {
|
|
4686
4686
|
let i = n.current + e;
|
|
4687
4687
|
t(i), (function e(t) {
|
|
4688
4688
|
n.current = t, window.clearTimeout(r.current), t !== "" && (r.current = window.setTimeout(() => e(""), 1e3));
|
|
4689
4689
|
})(i);
|
|
4690
|
-
}, [t]), a =
|
|
4690
|
+
}, [t]), a = B.useCallback(() => {
|
|
4691
4691
|
n.current = "", window.clearTimeout(r.current);
|
|
4692
4692
|
}, []);
|
|
4693
|
-
return
|
|
4693
|
+
return B.useEffect(() => () => window.clearTimeout(r.current), []), [
|
|
4694
4694
|
n,
|
|
4695
4695
|
i,
|
|
4696
4696
|
a
|
|
@@ -4705,7 +4705,7 @@ function Ad(e, t, n) {
|
|
|
4705
4705
|
function jd(e, t) {
|
|
4706
4706
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
4707
4707
|
}
|
|
4708
|
-
var Md = Mu, Nd = Pu, Pd = Iu, Fd = Ru, Id = Bu, Ld = Hu, Rd = nd, zd =
|
|
4708
|
+
var Md = Mu, Nd = Pu, Pd = Iu, Fd = Ru, Id = Bu, Ld = Hu, Rd = nd, zd = od, Bd = cd, Vd = fd, Hd = md, Ud = gd, Wd = vd, Gd = bd, Kd = Cd, qd = [
|
|
4709
4709
|
"a",
|
|
4710
4710
|
"button",
|
|
4711
4711
|
"div",
|
|
@@ -4724,7 +4724,7 @@ var Md = Mu, Nd = Pu, Pd = Iu, Fd = Ru, Id = Bu, Ld = Hu, Rd = nd, zd = fd, Bd =
|
|
|
4724
4724
|
"svg",
|
|
4725
4725
|
"ul"
|
|
4726
4726
|
].reduce((e, t) => {
|
|
4727
|
-
let n = f(`Primitive.${t}`), r =
|
|
4727
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
4728
4728
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
4729
4729
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
4730
4730
|
...a,
|
|
@@ -4735,23 +4735,23 @@ var Md = Mu, Nd = Pu, Pd = Iu, Fd = Ru, Id = Bu, Ld = Hu, Rd = nd, zd = fd, Bd =
|
|
|
4735
4735
|
...e,
|
|
4736
4736
|
[t]: r
|
|
4737
4737
|
};
|
|
4738
|
-
}, {}),
|
|
4739
|
-
let { decorative: n, orientation: r =
|
|
4738
|
+
}, {}), Jd = "Separator", Yd = "horizontal", Xd = ["horizontal", "vertical"], Zd = B.forwardRef((e, t) => {
|
|
4739
|
+
let { decorative: n, orientation: r = Yd, ...i } = e, a = Qd(r) ? r : Yd, o = a === "vertical" ? a : void 0, s = n ? { role: "none" } : {
|
|
4740
4740
|
"aria-orientation": o,
|
|
4741
4741
|
role: "separator"
|
|
4742
4742
|
};
|
|
4743
|
-
return /* @__PURE__ */ H(
|
|
4743
|
+
return /* @__PURE__ */ H(qd.div, {
|
|
4744
4744
|
"data-orientation": a,
|
|
4745
4745
|
...s,
|
|
4746
4746
|
...i,
|
|
4747
4747
|
ref: t
|
|
4748
4748
|
});
|
|
4749
4749
|
});
|
|
4750
|
-
|
|
4751
|
-
function
|
|
4752
|
-
return
|
|
4750
|
+
Zd.displayName = Jd;
|
|
4751
|
+
function Qd(e) {
|
|
4752
|
+
return Xd.includes(e);
|
|
4753
4753
|
}
|
|
4754
|
-
var
|
|
4754
|
+
var $d = Zd, ef = [
|
|
4755
4755
|
"a",
|
|
4756
4756
|
"button",
|
|
4757
4757
|
"div",
|
|
@@ -4770,7 +4770,7 @@ var Xd = Jd, Zd = [
|
|
|
4770
4770
|
"svg",
|
|
4771
4771
|
"ul"
|
|
4772
4772
|
].reduce((e, t) => {
|
|
4773
|
-
let n = f(`Primitive.${t}`), r =
|
|
4773
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
4774
4774
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
4775
4775
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
4776
4776
|
...a,
|
|
@@ -4781,12 +4781,12 @@ var Xd = Jd, Zd = [
|
|
|
4781
4781
|
...e,
|
|
4782
4782
|
[t]: r
|
|
4783
4783
|
};
|
|
4784
|
-
}, {}),
|
|
4784
|
+
}, {}), tf = ["PageUp", "PageDown"], nf = [
|
|
4785
4785
|
"ArrowUp",
|
|
4786
4786
|
"ArrowDown",
|
|
4787
4787
|
"ArrowLeft",
|
|
4788
4788
|
"ArrowRight"
|
|
4789
|
-
],
|
|
4789
|
+
], rf = {
|
|
4790
4790
|
"from-left": [
|
|
4791
4791
|
"Home",
|
|
4792
4792
|
"PageDown",
|
|
@@ -4811,16 +4811,16 @@ var Xd = Jd, Zd = [
|
|
|
4811
4811
|
"ArrowUp",
|
|
4812
4812
|
"ArrowLeft"
|
|
4813
4813
|
]
|
|
4814
|
-
},
|
|
4815
|
-
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: c = !1, minStepsBetweenThumbs: l = 0, defaultValue: u = [r], value: d, onValueChange: f = () => {}, onValueCommit: p = () => {}, inverted: m = !1, form: h, ...g } = e, _ =
|
|
4814
|
+
}, af = "Slider", [of, sf, cf] = Re(af), [lf, uf] = t(af, [cf]), [df, ff] = lf(af), pf = B.forwardRef((e, t) => {
|
|
4815
|
+
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: c = !1, minStepsBetweenThumbs: l = 0, defaultValue: u = [r], value: d, onValueChange: f = () => {}, onValueCommit: p = () => {}, inverted: m = !1, form: h, ...g } = e, _ = B.useRef(/* @__PURE__ */ new Set()), v = B.useRef(0), y = o === "horizontal" ? gf : _f, [b = [], x] = He({
|
|
4816
4816
|
prop: d,
|
|
4817
4817
|
defaultProp: u,
|
|
4818
4818
|
onChange: (e) => {
|
|
4819
4819
|
[..._.current][v.current]?.focus(), f(e);
|
|
4820
4820
|
}
|
|
4821
|
-
}), S =
|
|
4821
|
+
}), S = B.useRef(b);
|
|
4822
4822
|
function C(e) {
|
|
4823
|
-
E(e,
|
|
4823
|
+
E(e, jf(b, e));
|
|
4824
4824
|
}
|
|
4825
4825
|
function w(e) {
|
|
4826
4826
|
E(e, v.current);
|
|
@@ -4830,17 +4830,17 @@ var Xd = Jd, Zd = [
|
|
|
4830
4830
|
b[v.current] !== e && p(b);
|
|
4831
4831
|
}
|
|
4832
4832
|
function E(e, t, { commit: n } = { commit: !1 }) {
|
|
4833
|
-
let o =
|
|
4833
|
+
let o = If(a), s = Ge(Lf(Math.round((e - r) / a) * a + r, o), [r, i]);
|
|
4834
4834
|
x((e = []) => {
|
|
4835
|
-
let r =
|
|
4836
|
-
if (
|
|
4835
|
+
let r = Of(e, s, t);
|
|
4836
|
+
if (Pf(r, l * a)) {
|
|
4837
4837
|
v.current = r.indexOf(s);
|
|
4838
4838
|
let t = String(r) !== String(e);
|
|
4839
4839
|
return t && n && p(r), t ? r : e;
|
|
4840
4840
|
} else return e;
|
|
4841
4841
|
});
|
|
4842
4842
|
}
|
|
4843
|
-
return /* @__PURE__ */ H(
|
|
4843
|
+
return /* @__PURE__ */ H(df, {
|
|
4844
4844
|
scope: e.__scopeSlider,
|
|
4845
4845
|
name: n,
|
|
4846
4846
|
disabled: c,
|
|
@@ -4851,9 +4851,9 @@ var Xd = Jd, Zd = [
|
|
|
4851
4851
|
values: b,
|
|
4852
4852
|
orientation: o,
|
|
4853
4853
|
form: h,
|
|
4854
|
-
children: /* @__PURE__ */ H(
|
|
4854
|
+
children: /* @__PURE__ */ H(of.Provider, {
|
|
4855
4855
|
scope: e.__scopeSlider,
|
|
4856
|
-
children: /* @__PURE__ */ H(
|
|
4856
|
+
children: /* @__PURE__ */ H(of.Slot, {
|
|
4857
4857
|
scope: e.__scopeSlider,
|
|
4858
4858
|
children: /* @__PURE__ */ H(y, {
|
|
4859
4859
|
"aria-disabled": c,
|
|
@@ -4873,7 +4873,7 @@ var Xd = Jd, Zd = [
|
|
|
4873
4873
|
onEndKeyDown: () => !c && E(i, b.length - 1, { commit: !0 }),
|
|
4874
4874
|
onStepKeyDown: ({ event: e, direction: t }) => {
|
|
4875
4875
|
if (!c) {
|
|
4876
|
-
let n =
|
|
4876
|
+
let n = tf.includes(e.key) || e.shiftKey && nf.includes(e.key) ? 10 : 1, r = v.current, i = b[r];
|
|
4877
4877
|
E(i + a * n * t, r, { commit: !0 });
|
|
4878
4878
|
}
|
|
4879
4879
|
}
|
|
@@ -4882,25 +4882,25 @@ var Xd = Jd, Zd = [
|
|
|
4882
4882
|
})
|
|
4883
4883
|
});
|
|
4884
4884
|
});
|
|
4885
|
-
|
|
4886
|
-
var [
|
|
4885
|
+
pf.displayName = af;
|
|
4886
|
+
var [mf, hf] = lf(af, {
|
|
4887
4887
|
startEdge: "left",
|
|
4888
4888
|
endEdge: "right",
|
|
4889
4889
|
size: "width",
|
|
4890
4890
|
direction: 1
|
|
4891
|
-
}),
|
|
4892
|
-
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: l, onStepKeyDown: u, ...d } = e, [f, p] =
|
|
4891
|
+
}), gf = B.forwardRef((e, t) => {
|
|
4892
|
+
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: l, onStepKeyDown: u, ...d } = e, [f, p] = B.useState(null), m = c(t, (e) => p(e)), h = B.useRef(void 0), g = We(i), _ = g === "ltr", v = _ && !a || !_ && a;
|
|
4893
4893
|
function y(e) {
|
|
4894
|
-
let t = h.current || f.getBoundingClientRect(), i =
|
|
4894
|
+
let t = h.current || f.getBoundingClientRect(), i = Ff([0, t.width], v ? [n, r] : [r, n]);
|
|
4895
4895
|
return h.current = t, i(e - t.left);
|
|
4896
4896
|
}
|
|
4897
|
-
return /* @__PURE__ */ H(
|
|
4897
|
+
return /* @__PURE__ */ H(mf, {
|
|
4898
4898
|
scope: e.__scopeSlider,
|
|
4899
4899
|
startEdge: v ? "left" : "right",
|
|
4900
4900
|
endEdge: v ? "right" : "left",
|
|
4901
4901
|
direction: v ? 1 : -1,
|
|
4902
4902
|
size: "width",
|
|
4903
|
-
children: /* @__PURE__ */ H(
|
|
4903
|
+
children: /* @__PURE__ */ H(vf, {
|
|
4904
4904
|
dir: g,
|
|
4905
4905
|
"data-orientation": "horizontal",
|
|
4906
4906
|
...d,
|
|
@@ -4921,7 +4921,7 @@ var [df, ff] = of(tf, {
|
|
|
4921
4921
|
h.current = void 0, l?.();
|
|
4922
4922
|
},
|
|
4923
4923
|
onStepKeyDown: (e) => {
|
|
4924
|
-
let t =
|
|
4924
|
+
let t = rf[v ? "from-left" : "from-right"].includes(e.key);
|
|
4925
4925
|
u?.({
|
|
4926
4926
|
event: e,
|
|
4927
4927
|
direction: t ? -1 : 1
|
|
@@ -4929,19 +4929,19 @@ var [df, ff] = of(tf, {
|
|
|
4929
4929
|
}
|
|
4930
4930
|
})
|
|
4931
4931
|
});
|
|
4932
|
-
}),
|
|
4933
|
-
let { min: n, max: r, inverted: i, onSlideStart: a, onSlideMove: o, onSlideEnd: s, onStepKeyDown: l, ...u } = e, d =
|
|
4932
|
+
}), _f = B.forwardRef((e, t) => {
|
|
4933
|
+
let { min: n, max: r, inverted: i, onSlideStart: a, onSlideMove: o, onSlideEnd: s, onStepKeyDown: l, ...u } = e, d = B.useRef(null), f = c(t, d), p = B.useRef(void 0), m = !i;
|
|
4934
4934
|
function h(e) {
|
|
4935
|
-
let t = p.current || d.current.getBoundingClientRect(), i =
|
|
4935
|
+
let t = p.current || d.current.getBoundingClientRect(), i = Ff([0, t.height], m ? [r, n] : [n, r]);
|
|
4936
4936
|
return p.current = t, i(e - t.top);
|
|
4937
4937
|
}
|
|
4938
|
-
return /* @__PURE__ */ H(
|
|
4938
|
+
return /* @__PURE__ */ H(mf, {
|
|
4939
4939
|
scope: e.__scopeSlider,
|
|
4940
4940
|
startEdge: m ? "bottom" : "top",
|
|
4941
4941
|
endEdge: m ? "top" : "bottom",
|
|
4942
4942
|
size: "height",
|
|
4943
4943
|
direction: m ? 1 : -1,
|
|
4944
|
-
children: /* @__PURE__ */ H(
|
|
4944
|
+
children: /* @__PURE__ */ H(vf, {
|
|
4945
4945
|
"data-orientation": "vertical",
|
|
4946
4946
|
...u,
|
|
4947
4947
|
ref: f,
|
|
@@ -4961,7 +4961,7 @@ var [df, ff] = of(tf, {
|
|
|
4961
4961
|
p.current = void 0, s?.();
|
|
4962
4962
|
},
|
|
4963
4963
|
onStepKeyDown: (e) => {
|
|
4964
|
-
let t =
|
|
4964
|
+
let t = rf[m ? "from-bottom" : "from-top"].includes(e.key);
|
|
4965
4965
|
l?.({
|
|
4966
4966
|
event: e,
|
|
4967
4967
|
direction: t ? -1 : 1
|
|
@@ -4969,13 +4969,13 @@ var [df, ff] = of(tf, {
|
|
|
4969
4969
|
}
|
|
4970
4970
|
})
|
|
4971
4971
|
});
|
|
4972
|
-
}),
|
|
4973
|
-
let { __scopeSlider: n, onSlideStart: r, onSlideMove: i, onSlideEnd: a, onHomeKeyDown: o, onEndKeyDown: c, onStepKeyDown: l, ...u } = e, d =
|
|
4974
|
-
return /* @__PURE__ */ H(
|
|
4972
|
+
}), vf = B.forwardRef((e, t) => {
|
|
4973
|
+
let { __scopeSlider: n, onSlideStart: r, onSlideMove: i, onSlideEnd: a, onHomeKeyDown: o, onEndKeyDown: c, onStepKeyDown: l, ...u } = e, d = ff(af, n);
|
|
4974
|
+
return /* @__PURE__ */ H(ef.span, {
|
|
4975
4975
|
...u,
|
|
4976
4976
|
ref: t,
|
|
4977
4977
|
onKeyDown: s(e.onKeyDown, (e) => {
|
|
4978
|
-
e.key === "Home" ? (o(e), e.preventDefault()) : e.key === "End" ? (c(e), e.preventDefault()) :
|
|
4978
|
+
e.key === "Home" ? (o(e), e.preventDefault()) : e.key === "End" ? (c(e), e.preventDefault()) : tf.concat(nf).includes(e.key) && (l(e), e.preventDefault());
|
|
4979
4979
|
}),
|
|
4980
4980
|
onPointerDown: s(e.onPointerDown, (e) => {
|
|
4981
4981
|
let t = e.target;
|
|
@@ -4989,19 +4989,19 @@ var [df, ff] = of(tf, {
|
|
|
4989
4989
|
t.hasPointerCapture(e.pointerId) && (t.releasePointerCapture(e.pointerId), a(e));
|
|
4990
4990
|
})
|
|
4991
4991
|
});
|
|
4992
|
-
}),
|
|
4993
|
-
let { __scopeSlider: n, ...r } = e, i =
|
|
4994
|
-
return /* @__PURE__ */ H(
|
|
4992
|
+
}), yf = "SliderTrack", bf = B.forwardRef((e, t) => {
|
|
4993
|
+
let { __scopeSlider: n, ...r } = e, i = ff(yf, n);
|
|
4994
|
+
return /* @__PURE__ */ H(ef.span, {
|
|
4995
4995
|
"data-disabled": i.disabled ? "" : void 0,
|
|
4996
4996
|
"data-orientation": i.orientation,
|
|
4997
4997
|
...r,
|
|
4998
4998
|
ref: t
|
|
4999
4999
|
});
|
|
5000
5000
|
});
|
|
5001
|
-
|
|
5002
|
-
var
|
|
5003
|
-
let { __scopeSlider: n, ...r } = e, i =
|
|
5004
|
-
return /* @__PURE__ */ H(
|
|
5001
|
+
bf.displayName = yf;
|
|
5002
|
+
var xf = "SliderRange", Sf = B.forwardRef((e, t) => {
|
|
5003
|
+
let { __scopeSlider: n, ...r } = e, i = ff(xf, n), a = hf(xf, n), o = c(t, B.useRef(null)), s = i.values.length, l = i.values.map((e) => kf(e, i.min, i.max)), u = s > 1 ? Math.min(...l) : 0, d = 100 - Math.max(...l);
|
|
5004
|
+
return /* @__PURE__ */ H(ef.span, {
|
|
5005
5005
|
"data-orientation": i.orientation,
|
|
5006
5006
|
"data-disabled": i.disabled ? "" : void 0,
|
|
5007
5007
|
...r,
|
|
@@ -5013,17 +5013,17 @@ var vf = "SliderRange", yf = z.forwardRef((e, t) => {
|
|
|
5013
5013
|
}
|
|
5014
5014
|
});
|
|
5015
5015
|
});
|
|
5016
|
-
|
|
5017
|
-
var
|
|
5018
|
-
let n =
|
|
5019
|
-
return /* @__PURE__ */ H(
|
|
5016
|
+
Sf.displayName = xf;
|
|
5017
|
+
var Cf = "SliderThumb", wf = B.forwardRef((e, t) => {
|
|
5018
|
+
let n = sf(e.__scopeSlider), [r, i] = B.useState(null), a = c(t, (e) => i(e)), o = B.useMemo(() => r ? n().findIndex((e) => e.ref.current === r) : -1, [n, r]);
|
|
5019
|
+
return /* @__PURE__ */ H(Tf, {
|
|
5020
5020
|
...e,
|
|
5021
5021
|
ref: a,
|
|
5022
5022
|
index: o
|
|
5023
5023
|
});
|
|
5024
|
-
}),
|
|
5025
|
-
let { __scopeSlider: n, index: r, name: i, ...a } = e, o =
|
|
5026
|
-
return
|
|
5024
|
+
}), Tf = B.forwardRef((e, t) => {
|
|
5025
|
+
let { __scopeSlider: n, index: r, name: i, ...a } = e, o = ff(Cf, n), l = hf(Cf, n), [u, d] = B.useState(null), f = c(t, (e) => d(e)), p = u ? o.form || !!u.closest("form") : !0, m = $e(u), h = o.values[r], g = h === void 0 ? 0 : kf(h, o.min, o.max), _ = Af(r, o.values.length), v = m?.[l.size], y = v ? Mf(v, g, l.direction) : 0;
|
|
5026
|
+
return B.useEffect(() => {
|
|
5027
5027
|
if (u) return o.thumbs.add(u), () => {
|
|
5028
5028
|
o.thumbs.delete(u);
|
|
5029
5029
|
};
|
|
@@ -5033,9 +5033,9 @@ var bf = "SliderThumb", xf = z.forwardRef((e, t) => {
|
|
|
5033
5033
|
position: "absolute",
|
|
5034
5034
|
[l.startEdge]: `calc(${g}% + ${y}px)`
|
|
5035
5035
|
},
|
|
5036
|
-
children: [/* @__PURE__ */ H(
|
|
5036
|
+
children: [/* @__PURE__ */ H(of.ItemSlot, {
|
|
5037
5037
|
scope: e.__scopeSlider,
|
|
5038
|
-
children: /* @__PURE__ */ H(
|
|
5038
|
+
children: /* @__PURE__ */ H(ef.span, {
|
|
5039
5039
|
role: "slider",
|
|
5040
5040
|
"aria-label": e["aria-label"] || _,
|
|
5041
5041
|
"aria-valuemin": o.min,
|
|
@@ -5052,17 +5052,17 @@ var bf = "SliderThumb", xf = z.forwardRef((e, t) => {
|
|
|
5052
5052
|
o.valueIndexToChangeRef.current = r;
|
|
5053
5053
|
})
|
|
5054
5054
|
})
|
|
5055
|
-
}), p && /* @__PURE__ */ H(
|
|
5055
|
+
}), p && /* @__PURE__ */ H(Df, {
|
|
5056
5056
|
name: i ?? (o.name ? o.name + (o.values.length > 1 ? "[]" : "") : void 0),
|
|
5057
5057
|
form: o.form,
|
|
5058
5058
|
value: h
|
|
5059
5059
|
}, r)]
|
|
5060
5060
|
});
|
|
5061
5061
|
});
|
|
5062
|
-
|
|
5063
|
-
var
|
|
5064
|
-
let i =
|
|
5065
|
-
return
|
|
5062
|
+
wf.displayName = Cf;
|
|
5063
|
+
var Ef = "RadioBubbleInput", Df = B.forwardRef(({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
5064
|
+
let i = B.useRef(null), a = c(i, r), o = Sl(t);
|
|
5065
|
+
return B.useEffect(() => {
|
|
5066
5066
|
let e = i.current;
|
|
5067
5067
|
if (!e) return;
|
|
5068
5068
|
let n = window.HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value").set;
|
|
@@ -5070,59 +5070,59 @@ var Cf = "RadioBubbleInput", wf = z.forwardRef(({ __scopeSlider: e, value: t, ..
|
|
|
5070
5070
|
let n = new Event("input", { bubbles: !0 });
|
|
5071
5071
|
r.call(e, t), e.dispatchEvent(n);
|
|
5072
5072
|
}
|
|
5073
|
-
}, [o, t]), /* @__PURE__ */ H(
|
|
5073
|
+
}, [o, t]), /* @__PURE__ */ H(ef.input, {
|
|
5074
5074
|
style: { display: "none" },
|
|
5075
5075
|
...n,
|
|
5076
5076
|
ref: a,
|
|
5077
5077
|
defaultValue: t
|
|
5078
5078
|
});
|
|
5079
5079
|
});
|
|
5080
|
-
|
|
5081
|
-
function
|
|
5080
|
+
Df.displayName = Ef;
|
|
5081
|
+
function Of(e = [], t, n) {
|
|
5082
5082
|
let r = [...e];
|
|
5083
5083
|
return r[n] = t, r.sort((e, t) => e - t);
|
|
5084
5084
|
}
|
|
5085
|
-
function
|
|
5086
|
-
return
|
|
5085
|
+
function kf(e, t, n) {
|
|
5086
|
+
return Ge(100 / (n - t) * (e - t), [0, 100]);
|
|
5087
5087
|
}
|
|
5088
|
-
function
|
|
5088
|
+
function Af(e, t) {
|
|
5089
5089
|
if (t > 2) return `Value ${e + 1} of ${t}`;
|
|
5090
5090
|
if (t === 2) return ["Minimum", "Maximum"][e];
|
|
5091
5091
|
}
|
|
5092
|
-
function
|
|
5092
|
+
function jf(e, t) {
|
|
5093
5093
|
if (e.length === 1) return 0;
|
|
5094
5094
|
let n = e.map((e) => Math.abs(e - t)), r = Math.min(...n);
|
|
5095
5095
|
return n.indexOf(r);
|
|
5096
5096
|
}
|
|
5097
|
-
function
|
|
5097
|
+
function Mf(e, t, n) {
|
|
5098
5098
|
let r = e / 2;
|
|
5099
|
-
return (r -
|
|
5099
|
+
return (r - Ff([0, 50], [0, r])(t) * n) * n;
|
|
5100
5100
|
}
|
|
5101
|
-
function
|
|
5101
|
+
function Nf(e) {
|
|
5102
5102
|
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
5103
5103
|
}
|
|
5104
|
-
function
|
|
5104
|
+
function Pf(e, t) {
|
|
5105
5105
|
if (t > 0) {
|
|
5106
|
-
let n =
|
|
5106
|
+
let n = Nf(e);
|
|
5107
5107
|
return Math.min(...n) >= t;
|
|
5108
5108
|
}
|
|
5109
5109
|
return !0;
|
|
5110
5110
|
}
|
|
5111
|
-
function
|
|
5111
|
+
function Ff(e, t) {
|
|
5112
5112
|
return (n) => {
|
|
5113
5113
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
5114
5114
|
let r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
5115
5115
|
return t[0] + r * (n - e[0]);
|
|
5116
5116
|
};
|
|
5117
5117
|
}
|
|
5118
|
-
function
|
|
5118
|
+
function If(e) {
|
|
5119
5119
|
return (String(e).split(".")[1] || "").length;
|
|
5120
5120
|
}
|
|
5121
|
-
function
|
|
5121
|
+
function Lf(e, t) {
|
|
5122
5122
|
let n = 10 ** t;
|
|
5123
5123
|
return Math.round(e * n) / n;
|
|
5124
5124
|
}
|
|
5125
|
-
var
|
|
5125
|
+
var Rf = pf, zf = bf, Bf = Sf, Vf = wf, Hf = [
|
|
5126
5126
|
"a",
|
|
5127
5127
|
"button",
|
|
5128
5128
|
"div",
|
|
@@ -5141,7 +5141,7 @@ var Ff = uf, If = _f, Lf = yf, Rf = xf, zf = [
|
|
|
5141
5141
|
"svg",
|
|
5142
5142
|
"ul"
|
|
5143
5143
|
].reduce((e, t) => {
|
|
5144
|
-
let n = f(`Primitive.${t}`), r =
|
|
5144
|
+
let n = f(`Primitive.${t}`), r = B.forwardRef((e, r) => {
|
|
5145
5145
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
5146
5146
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ H(o, {
|
|
5147
5147
|
...a,
|
|
@@ -5152,23 +5152,23 @@ var Ff = uf, If = _f, Lf = yf, Rf = xf, zf = [
|
|
|
5152
5152
|
...e,
|
|
5153
5153
|
[t]: r
|
|
5154
5154
|
};
|
|
5155
|
-
}, {}),
|
|
5156
|
-
let { __scopeSwitch: n, name: r, checked: i, defaultChecked: a, required: o, disabled: l, value: u = "on", onCheckedChange: d, form: f, ...p } = e, [m, h] =
|
|
5155
|
+
}, {}), Uf = "Switch", [Wf, Gf] = t(Uf), [Kf, qf] = Wf(Uf), Jf = B.forwardRef((e, t) => {
|
|
5156
|
+
let { __scopeSwitch: n, name: r, checked: i, defaultChecked: a, required: o, disabled: l, value: u = "on", onCheckedChange: d, form: f, ...p } = e, [m, h] = B.useState(null), g = c(t, (e) => h(e)), _ = B.useRef(!1), v = m ? f || !!m.closest("form") : !0, [y, b] = He({
|
|
5157
5157
|
prop: i,
|
|
5158
5158
|
defaultProp: a ?? !1,
|
|
5159
5159
|
onChange: d,
|
|
5160
|
-
caller:
|
|
5160
|
+
caller: Uf
|
|
5161
5161
|
});
|
|
5162
|
-
return /* @__PURE__ */ U(
|
|
5162
|
+
return /* @__PURE__ */ U(Kf, {
|
|
5163
5163
|
scope: n,
|
|
5164
5164
|
checked: y,
|
|
5165
5165
|
disabled: l,
|
|
5166
|
-
children: [/* @__PURE__ */ H(
|
|
5166
|
+
children: [/* @__PURE__ */ H(Hf.button, {
|
|
5167
5167
|
type: "button",
|
|
5168
5168
|
role: "switch",
|
|
5169
5169
|
"aria-checked": y,
|
|
5170
5170
|
"aria-required": o,
|
|
5171
|
-
"data-state":
|
|
5171
|
+
"data-state": $f(y),
|
|
5172
5172
|
"data-disabled": l ? "" : void 0,
|
|
5173
5173
|
disabled: l,
|
|
5174
5174
|
value: u,
|
|
@@ -5177,7 +5177,7 @@ var Ff = uf, If = _f, Lf = yf, Rf = xf, zf = [
|
|
|
5177
5177
|
onClick: s(e.onClick, (e) => {
|
|
5178
5178
|
b((e) => !e), v && (_.current = e.isPropagationStopped(), _.current || e.stopPropagation());
|
|
5179
5179
|
})
|
|
5180
|
-
}), v && /* @__PURE__ */ H(
|
|
5180
|
+
}), v && /* @__PURE__ */ H(Qf, {
|
|
5181
5181
|
control: m,
|
|
5182
5182
|
bubbles: !_.current,
|
|
5183
5183
|
name: r,
|
|
@@ -5190,20 +5190,20 @@ var Ff = uf, If = _f, Lf = yf, Rf = xf, zf = [
|
|
|
5190
5190
|
})]
|
|
5191
5191
|
});
|
|
5192
5192
|
});
|
|
5193
|
-
|
|
5194
|
-
var
|
|
5195
|
-
let { __scopeSwitch: n, ...r } = e, i =
|
|
5196
|
-
return /* @__PURE__ */ H(
|
|
5197
|
-
"data-state":
|
|
5193
|
+
Jf.displayName = Uf;
|
|
5194
|
+
var Yf = "SwitchThumb", Xf = B.forwardRef((e, t) => {
|
|
5195
|
+
let { __scopeSwitch: n, ...r } = e, i = qf(Yf, n);
|
|
5196
|
+
return /* @__PURE__ */ H(Hf.span, {
|
|
5197
|
+
"data-state": $f(i.checked),
|
|
5198
5198
|
"data-disabled": i.disabled ? "" : void 0,
|
|
5199
5199
|
...r,
|
|
5200
5200
|
ref: t
|
|
5201
5201
|
});
|
|
5202
5202
|
});
|
|
5203
|
-
|
|
5204
|
-
var
|
|
5205
|
-
let o =
|
|
5206
|
-
return
|
|
5203
|
+
Xf.displayName = Yf;
|
|
5204
|
+
var Zf = "SwitchBubbleInput", Qf = B.forwardRef(({ __scopeSwitch: e, control: t, checked: n, bubbles: r = !0, ...i }, a) => {
|
|
5205
|
+
let o = B.useRef(null), s = c(o, a), l = Sl(n), u = $e(t);
|
|
5206
|
+
return B.useEffect(() => {
|
|
5207
5207
|
let e = o.current;
|
|
5208
5208
|
if (!e) return;
|
|
5209
5209
|
let t = window.HTMLInputElement.prototype, i = Object.getOwnPropertyDescriptor(t, "checked").set;
|
|
@@ -5232,43 +5232,55 @@ var Jf = "SwitchBubbleInput", Yf = z.forwardRef(({ __scopeSwitch: e, control: t,
|
|
|
5232
5232
|
}
|
|
5233
5233
|
});
|
|
5234
5234
|
});
|
|
5235
|
-
|
|
5236
|
-
function
|
|
5235
|
+
Qf.displayName = Zf;
|
|
5236
|
+
function $f(e) {
|
|
5237
5237
|
return e ? "checked" : "unchecked";
|
|
5238
5238
|
}
|
|
5239
|
-
var
|
|
5239
|
+
var ep = Jf, tp = Xf;
|
|
5240
5240
|
//#endregion
|
|
5241
5241
|
//#region src/components/reui/dialog.tsx
|
|
5242
|
-
function
|
|
5242
|
+
function np({ ...e }) {
|
|
5243
5243
|
return /* @__PURE__ */ H(Yc, {
|
|
5244
5244
|
"data-slot": "dialog",
|
|
5245
5245
|
...e
|
|
5246
5246
|
});
|
|
5247
5247
|
}
|
|
5248
|
-
function
|
|
5248
|
+
function rp({ ...e }) {
|
|
5249
|
+
return /* @__PURE__ */ H(Xc, {
|
|
5250
|
+
"data-slot": "dialog-trigger",
|
|
5251
|
+
...e
|
|
5252
|
+
});
|
|
5253
|
+
}
|
|
5254
|
+
function ip({ ...e }) {
|
|
5249
5255
|
return /* @__PURE__ */ H(Zc, {
|
|
5250
5256
|
"data-slot": "dialog-portal",
|
|
5251
5257
|
...e
|
|
5252
5258
|
});
|
|
5253
5259
|
}
|
|
5254
|
-
function
|
|
5260
|
+
function ap({ ...e }) {
|
|
5261
|
+
return /* @__PURE__ */ H(nl, {
|
|
5262
|
+
"data-slot": "dialog-close",
|
|
5263
|
+
...e
|
|
5264
|
+
});
|
|
5265
|
+
}
|
|
5266
|
+
function op({ className: e, ...t }) {
|
|
5255
5267
|
return /* @__PURE__ */ H(Qc, {
|
|
5256
5268
|
"data-slot": "dialog-overlay",
|
|
5257
|
-
className:
|
|
5269
|
+
className: z("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
|
|
5258
5270
|
...t
|
|
5259
5271
|
});
|
|
5260
5272
|
}
|
|
5261
|
-
function
|
|
5262
|
-
return /* @__PURE__ */ U(
|
|
5273
|
+
function sp({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
5274
|
+
return /* @__PURE__ */ U(ip, {
|
|
5263
5275
|
"data-slot": "dialog-portal",
|
|
5264
|
-
children: [/* @__PURE__ */ H(
|
|
5276
|
+
children: [/* @__PURE__ */ H(op, {}), /* @__PURE__ */ U($c, {
|
|
5265
5277
|
"data-slot": "dialog-content",
|
|
5266
|
-
className:
|
|
5278
|
+
className: z("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", e),
|
|
5267
5279
|
...r,
|
|
5268
5280
|
children: [t, n && /* @__PURE__ */ U(nl, {
|
|
5269
5281
|
"data-slot": "dialog-close",
|
|
5270
5282
|
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
5271
|
-
children: [/* @__PURE__ */ H(
|
|
5283
|
+
children: [/* @__PURE__ */ H(ce, {}), /* @__PURE__ */ H("span", {
|
|
5272
5284
|
className: "sr-only",
|
|
5273
5285
|
children: "Close"
|
|
5274
5286
|
})]
|
|
@@ -5276,17 +5288,17 @@ function np({ className: e, children: t, showCloseButton: n = !0, ...r }) {
|
|
|
5276
5288
|
})]
|
|
5277
5289
|
});
|
|
5278
5290
|
}
|
|
5279
|
-
function
|
|
5291
|
+
function cp({ className: e, ...t }) {
|
|
5280
5292
|
return /* @__PURE__ */ H("div", {
|
|
5281
5293
|
"data-slot": "dialog-header",
|
|
5282
|
-
className:
|
|
5294
|
+
className: z("flex flex-col gap-2 text-center sm:text-left", e),
|
|
5283
5295
|
...t
|
|
5284
5296
|
});
|
|
5285
5297
|
}
|
|
5286
|
-
function
|
|
5298
|
+
function lp({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
5287
5299
|
return /* @__PURE__ */ U("div", {
|
|
5288
5300
|
"data-slot": "dialog-footer",
|
|
5289
|
-
className:
|
|
5301
|
+
className: z("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
5290
5302
|
...r,
|
|
5291
5303
|
children: [n, t && /* @__PURE__ */ H(nl, {
|
|
5292
5304
|
asChild: !0,
|
|
@@ -5297,28 +5309,28 @@ function ip({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
|
5297
5309
|
})]
|
|
5298
5310
|
});
|
|
5299
5311
|
}
|
|
5300
|
-
function
|
|
5312
|
+
function up({ className: e, ...t }) {
|
|
5301
5313
|
return /* @__PURE__ */ H(el, {
|
|
5302
5314
|
"data-slot": "dialog-title",
|
|
5303
|
-
className:
|
|
5315
|
+
className: z("text-lg leading-none font-semibold", e),
|
|
5304
5316
|
...t
|
|
5305
5317
|
});
|
|
5306
5318
|
}
|
|
5307
|
-
function
|
|
5319
|
+
function dp({ className: e, ...t }) {
|
|
5308
5320
|
return /* @__PURE__ */ H(tl, {
|
|
5309
5321
|
"data-slot": "dialog-description",
|
|
5310
|
-
className:
|
|
5322
|
+
className: z("text-sm text-muted-foreground", e),
|
|
5311
5323
|
...t
|
|
5312
5324
|
});
|
|
5313
5325
|
}
|
|
5314
5326
|
//#endregion
|
|
5315
5327
|
//#region src/base/utils/icons.ts
|
|
5316
|
-
function
|
|
5317
|
-
return sc(e) ??
|
|
5328
|
+
function fp(e) {
|
|
5329
|
+
return sc(e) ?? Ne;
|
|
5318
5330
|
}
|
|
5319
5331
|
//#endregion
|
|
5320
5332
|
//#region src/components/reui/alert.tsx
|
|
5321
|
-
var
|
|
5333
|
+
var pp = o([
|
|
5322
5334
|
"relative w-full text-sm border has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] grid-cols-[0_1fr] grid gap-y-0.5 items-center [&>svg:not([class*=size-])]:size-4",
|
|
5323
5335
|
"has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_[data-slot=alert-action]]:sm:row-end-3",
|
|
5324
5336
|
"has-[>[data-slot=alert-title]+[data-slot=alert-description]]:items-start",
|
|
@@ -5338,38 +5350,38 @@ var cp = o([
|
|
|
5338
5350
|
} },
|
|
5339
5351
|
defaultVariants: { variant: "default" }
|
|
5340
5352
|
});
|
|
5341
|
-
function
|
|
5353
|
+
function mp({ className: e, variant: t, ...n }) {
|
|
5342
5354
|
return /* @__PURE__ */ H("div", {
|
|
5343
5355
|
"data-slot": "alert",
|
|
5344
5356
|
role: "alert",
|
|
5345
|
-
className:
|
|
5357
|
+
className: z(pp({ variant: t }), e),
|
|
5346
5358
|
...n
|
|
5347
5359
|
});
|
|
5348
5360
|
}
|
|
5349
|
-
function
|
|
5361
|
+
function hp({ className: e, ...t }) {
|
|
5350
5362
|
return /* @__PURE__ */ H("div", {
|
|
5351
5363
|
"data-slot": "alert-title",
|
|
5352
|
-
className:
|
|
5364
|
+
className: z("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", e),
|
|
5353
5365
|
...t
|
|
5354
5366
|
});
|
|
5355
5367
|
}
|
|
5356
|
-
function
|
|
5368
|
+
function gp({ className: e, ...t }) {
|
|
5357
5369
|
return /* @__PURE__ */ H("div", {
|
|
5358
5370
|
"data-slot": "alert-description",
|
|
5359
|
-
className:
|
|
5371
|
+
className: z("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", e),
|
|
5360
5372
|
...t
|
|
5361
5373
|
});
|
|
5362
5374
|
}
|
|
5363
|
-
function
|
|
5375
|
+
function _p({ className: e, ...t }) {
|
|
5364
5376
|
return /* @__PURE__ */ H("div", {
|
|
5365
5377
|
"data-slot": "alert-action",
|
|
5366
|
-
className:
|
|
5378
|
+
className: z("flex gap-1.5 max-sm:col-start-2 max-sm:mt-2 max-sm:justify-start sm:col-start-3 sm:row-start-1 sm:justify-end sm:self-center", e),
|
|
5367
5379
|
...t
|
|
5368
5380
|
});
|
|
5369
5381
|
}
|
|
5370
5382
|
//#endregion
|
|
5371
5383
|
//#region src/components/reui/badge.tsx
|
|
5372
|
-
var
|
|
5384
|
+
var vp = o("relative inline-flex shrink-0 items-center justify-center w-fit border border-transparent font-medium whitespace-nowrap outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-3", {
|
|
5373
5385
|
variants: {
|
|
5374
5386
|
variant: {
|
|
5375
5387
|
default: "bg-primary text-primary-foreground",
|
|
@@ -5414,10 +5426,10 @@ var pp = o("relative inline-flex shrink-0 items-center justify-center w-fit bord
|
|
|
5414
5426
|
radius: "default"
|
|
5415
5427
|
}
|
|
5416
5428
|
});
|
|
5417
|
-
function
|
|
5429
|
+
function yp({ className: e, variant: t, size: n, radius: r, asChild: i = !1, ...o }) {
|
|
5418
5430
|
return /* @__PURE__ */ H(i ? a : "span", {
|
|
5419
5431
|
"data-slot": "badge",
|
|
5420
|
-
className:
|
|
5432
|
+
className: z(vp({
|
|
5421
5433
|
variant: t,
|
|
5422
5434
|
size: n,
|
|
5423
5435
|
radius: r,
|
|
@@ -5428,10 +5440,10 @@ function mp({ className: e, variant: t, size: n, radius: r, asChild: i = !1, ...
|
|
|
5428
5440
|
}
|
|
5429
5441
|
//#endregion
|
|
5430
5442
|
//#region src/i18n/render-label.ts
|
|
5431
|
-
function
|
|
5443
|
+
function bp(e) {
|
|
5432
5444
|
return typeof e == "object" && !!e && "key" in e && typeof e.key == "string";
|
|
5433
5445
|
}
|
|
5434
|
-
function
|
|
5446
|
+
function xp(e, t) {
|
|
5435
5447
|
return e == null ? "" : typeof e == "string" ? e : t(e.key, {
|
|
5436
5448
|
ns: e.domain || void 0,
|
|
5437
5449
|
defaultValue: e.key,
|
|
@@ -5440,7 +5452,7 @@ function gp(e, t) {
|
|
|
5440
5452
|
}
|
|
5441
5453
|
//#endregion
|
|
5442
5454
|
//#region src/base/partials/EmptyPlaceholder/index.tsx
|
|
5443
|
-
var
|
|
5455
|
+
var Sp = lt(() => import("./dist-DdfRh_k3.js").then((e) => ({ default: e.DotLottieReact }))), Cp = {
|
|
5444
5456
|
"first-use": {
|
|
5445
5457
|
iconSize: 56,
|
|
5446
5458
|
padding: "py-20",
|
|
@@ -5472,20 +5484,20 @@ var _p = ut(() => import("./dist-DdfRh_k3.js").then((e) => ({ default: e.DotLott
|
|
|
5472
5484
|
maxDescWidth: "max-w-[320px]"
|
|
5473
5485
|
}
|
|
5474
5486
|
};
|
|
5475
|
-
function
|
|
5476
|
-
return e === "error" ?
|
|
5487
|
+
function wp(e, t) {
|
|
5488
|
+
return e === "error" ? Ae : e === "permission" ? je : t ? fp(t) : Ne;
|
|
5477
5489
|
}
|
|
5478
|
-
function
|
|
5490
|
+
function Tp(e) {
|
|
5479
5491
|
return e === "error" ? "text-destructive" : "text-muted-foreground/50";
|
|
5480
5492
|
}
|
|
5481
|
-
function
|
|
5482
|
-
let s =
|
|
5493
|
+
function Ep({ variant: e = "first-use", icon: t, lottieUrl: n, title: r, description: i, cta: a, ctaSecondary: o }) {
|
|
5494
|
+
let s = Cp[e], c = wp(e, t), l = Tp(e), u = e !== "permission" && a, f = s.iconSize * 1.8;
|
|
5483
5495
|
return /* @__PURE__ */ U("div", {
|
|
5484
5496
|
role: "status",
|
|
5485
5497
|
"aria-live": "polite",
|
|
5486
|
-
className:
|
|
5498
|
+
className: z("flex flex-col items-center text-center", s.padding),
|
|
5487
5499
|
children: [
|
|
5488
|
-
n ? /* @__PURE__ */ H(
|
|
5500
|
+
n ? /* @__PURE__ */ H(st, {
|
|
5489
5501
|
fallback: /* @__PURE__ */ H("div", {
|
|
5490
5502
|
style: {
|
|
5491
5503
|
width: f,
|
|
@@ -5493,7 +5505,7 @@ function xp({ variant: e = "first-use", icon: t, lottieUrl: n, title: r, descrip
|
|
|
5493
5505
|
},
|
|
5494
5506
|
className: "mb-4"
|
|
5495
5507
|
}),
|
|
5496
|
-
children: /* @__PURE__ */ H(
|
|
5508
|
+
children: /* @__PURE__ */ H(Sp, {
|
|
5497
5509
|
src: n,
|
|
5498
5510
|
loop: !0,
|
|
5499
5511
|
autoplay: !0,
|
|
@@ -5503,10 +5515,10 @@ function xp({ variant: e = "first-use", icon: t, lottieUrl: n, title: r, descrip
|
|
|
5503
5515
|
},
|
|
5504
5516
|
className: "mb-4"
|
|
5505
5517
|
})
|
|
5506
|
-
}) : /* @__PURE__ */ H(
|
|
5518
|
+
}) : /* @__PURE__ */ H(R, {
|
|
5507
5519
|
icon: c,
|
|
5508
5520
|
size: s.iconSize,
|
|
5509
|
-
className:
|
|
5521
|
+
className: z(l, "mb-4"),
|
|
5510
5522
|
"aria-hidden": "true"
|
|
5511
5523
|
}),
|
|
5512
5524
|
/* @__PURE__ */ H("h3", {
|
|
@@ -5514,7 +5526,7 @@ function xp({ variant: e = "first-use", icon: t, lottieUrl: n, title: r, descrip
|
|
|
5514
5526
|
children: r
|
|
5515
5527
|
}),
|
|
5516
5528
|
i && /* @__PURE__ */ H("p", {
|
|
5517
|
-
className:
|
|
5529
|
+
className: z("text-secondary-foreground mt-1.5 text-[13px]", s.maxDescWidth),
|
|
5518
5530
|
children: i
|
|
5519
5531
|
}),
|
|
5520
5532
|
u && /* @__PURE__ */ H("div", {
|
|
@@ -5544,23 +5556,29 @@ function xp({ variant: e = "first-use", icon: t, lottieUrl: n, title: r, descrip
|
|
|
5544
5556
|
}
|
|
5545
5557
|
//#endregion
|
|
5546
5558
|
//#region src/components/reui/select.tsx
|
|
5547
|
-
function
|
|
5559
|
+
function Dp({ ...e }) {
|
|
5548
5560
|
return /* @__PURE__ */ H(Md, {
|
|
5549
5561
|
"data-slot": "select",
|
|
5550
5562
|
...e
|
|
5551
5563
|
});
|
|
5552
5564
|
}
|
|
5553
|
-
function
|
|
5565
|
+
function Op({ ...e }) {
|
|
5566
|
+
return /* @__PURE__ */ H(zd, {
|
|
5567
|
+
"data-slot": "select-group",
|
|
5568
|
+
...e
|
|
5569
|
+
});
|
|
5570
|
+
}
|
|
5571
|
+
function kp({ ...e }) {
|
|
5554
5572
|
return /* @__PURE__ */ H(Pd, {
|
|
5555
5573
|
"data-slot": "select-value",
|
|
5556
5574
|
...e
|
|
5557
5575
|
});
|
|
5558
5576
|
}
|
|
5559
|
-
function
|
|
5577
|
+
function Ap({ className: e, size: t = "default", children: n, ...i }) {
|
|
5560
5578
|
return /* @__PURE__ */ U(Nd, {
|
|
5561
5579
|
"data-slot": "select-trigger",
|
|
5562
5580
|
"data-size": t,
|
|
5563
|
-
className:
|
|
5581
|
+
className: z("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", e),
|
|
5564
5582
|
...i,
|
|
5565
5583
|
children: [n, /* @__PURE__ */ H(Fd, {
|
|
5566
5584
|
asChild: !0,
|
|
@@ -5568,79 +5586,93 @@ function wp({ className: e, size: t = "default", children: n, ...i }) {
|
|
|
5568
5586
|
})]
|
|
5569
5587
|
});
|
|
5570
5588
|
}
|
|
5571
|
-
function
|
|
5589
|
+
function jp({ className: e, children: t, position: n = "item-aligned", align: r = "center", ...i }) {
|
|
5572
5590
|
return /* @__PURE__ */ H(Id, { children: /* @__PURE__ */ U(Ld, {
|
|
5573
5591
|
"data-slot": "select-content",
|
|
5574
|
-
className:
|
|
5592
|
+
className: z("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
5575
5593
|
position: n,
|
|
5576
5594
|
align: r,
|
|
5577
5595
|
...i,
|
|
5578
5596
|
children: [
|
|
5579
|
-
/* @__PURE__ */ H(
|
|
5597
|
+
/* @__PURE__ */ H(Fp, {}),
|
|
5580
5598
|
/* @__PURE__ */ H(Rd, {
|
|
5581
|
-
className:
|
|
5599
|
+
className: z("p-1", n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
5582
5600
|
children: t
|
|
5583
5601
|
}),
|
|
5584
|
-
/* @__PURE__ */ H(
|
|
5602
|
+
/* @__PURE__ */ H(Ip, {})
|
|
5585
5603
|
]
|
|
5586
5604
|
}) });
|
|
5587
5605
|
}
|
|
5588
|
-
function
|
|
5589
|
-
return /* @__PURE__ */
|
|
5606
|
+
function Mp({ className: e, ...t }) {
|
|
5607
|
+
return /* @__PURE__ */ H(Bd, {
|
|
5608
|
+
"data-slot": "select-label",
|
|
5609
|
+
className: z("px-2 py-1.5 text-xs text-muted-foreground", e),
|
|
5610
|
+
...t
|
|
5611
|
+
});
|
|
5612
|
+
}
|
|
5613
|
+
function Np({ className: e, children: t, ...n }) {
|
|
5614
|
+
return /* @__PURE__ */ U(Vd, {
|
|
5590
5615
|
"data-slot": "select-item",
|
|
5591
|
-
className:
|
|
5616
|
+
className: z("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
|
|
5592
5617
|
...n,
|
|
5593
5618
|
children: [/* @__PURE__ */ H("span", {
|
|
5594
5619
|
"data-slot": "select-item-indicator",
|
|
5595
5620
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
5596
|
-
children: /* @__PURE__ */ H(
|
|
5597
|
-
}), /* @__PURE__ */ H(
|
|
5621
|
+
children: /* @__PURE__ */ H(Ud, { children: /* @__PURE__ */ H(ie, { className: "size-4" }) })
|
|
5622
|
+
}), /* @__PURE__ */ H(Hd, { children: t })]
|
|
5598
5623
|
});
|
|
5599
5624
|
}
|
|
5600
|
-
function
|
|
5601
|
-
return /* @__PURE__ */ H(
|
|
5625
|
+
function Pp({ className: e, ...t }) {
|
|
5626
|
+
return /* @__PURE__ */ H(Kd, {
|
|
5627
|
+
"data-slot": "select-separator",
|
|
5628
|
+
className: z("pointer-events-none -mx-1 my-1 h-px bg-border", e),
|
|
5629
|
+
...t
|
|
5630
|
+
});
|
|
5631
|
+
}
|
|
5632
|
+
function Fp({ className: e, ...t }) {
|
|
5633
|
+
return /* @__PURE__ */ H(Wd, {
|
|
5602
5634
|
"data-slot": "select-scroll-up-button",
|
|
5603
|
-
className:
|
|
5635
|
+
className: z("flex cursor-default items-center justify-center py-1", e),
|
|
5604
5636
|
...t,
|
|
5605
5637
|
children: /* @__PURE__ */ H(ec, { className: "size-4" })
|
|
5606
5638
|
});
|
|
5607
5639
|
}
|
|
5608
|
-
function
|
|
5609
|
-
return /* @__PURE__ */ H(
|
|
5640
|
+
function Ip({ className: e, ...t }) {
|
|
5641
|
+
return /* @__PURE__ */ H(Gd, {
|
|
5610
5642
|
"data-slot": "select-scroll-down-button",
|
|
5611
|
-
className:
|
|
5643
|
+
className: z("flex cursor-default items-center justify-center py-1", e),
|
|
5612
5644
|
...t,
|
|
5613
5645
|
children: /* @__PURE__ */ H(r, { className: "size-4" })
|
|
5614
5646
|
});
|
|
5615
5647
|
}
|
|
5616
5648
|
//#endregion
|
|
5617
5649
|
//#region src/components/reui/separator.tsx
|
|
5618
|
-
function
|
|
5619
|
-
return /* @__PURE__ */ H(
|
|
5650
|
+
function Lp({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
5651
|
+
return /* @__PURE__ */ H($d, {
|
|
5620
5652
|
"data-slot": "separator",
|
|
5621
5653
|
decorative: n,
|
|
5622
5654
|
orientation: t,
|
|
5623
|
-
className:
|
|
5655
|
+
className: z("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", e),
|
|
5624
5656
|
...r
|
|
5625
5657
|
});
|
|
5626
5658
|
}
|
|
5627
5659
|
//#endregion
|
|
5628
5660
|
//#region src/components/reui/checkbox.tsx
|
|
5629
|
-
function
|
|
5661
|
+
function Rp({ className: e, ...t }) {
|
|
5630
5662
|
return /* @__PURE__ */ H(Ml, {
|
|
5631
5663
|
"data-slot": "checkbox",
|
|
5632
|
-
className:
|
|
5664
|
+
className: z("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary", e),
|
|
5633
5665
|
...t,
|
|
5634
5666
|
children: /* @__PURE__ */ H(Pl, {
|
|
5635
5667
|
"data-slot": "checkbox-indicator",
|
|
5636
5668
|
className: "grid place-content-center text-current transition-none",
|
|
5637
|
-
children: /* @__PURE__ */ H(
|
|
5669
|
+
children: /* @__PURE__ */ H(ie, { className: "size-3.5" })
|
|
5638
5670
|
})
|
|
5639
5671
|
});
|
|
5640
5672
|
}
|
|
5641
5673
|
//#endregion
|
|
5642
5674
|
//#region src/base/utils/conditions.ts
|
|
5643
|
-
function
|
|
5675
|
+
function zp(e, t) {
|
|
5644
5676
|
let n = t[e.field], r = e.value;
|
|
5645
5677
|
switch (e.operator) {
|
|
5646
5678
|
case "equals": return String(n) === String(r);
|
|
@@ -5652,20 +5684,20 @@ function jp(e, t) {
|
|
|
5652
5684
|
}
|
|
5653
5685
|
//#endregion
|
|
5654
5686
|
//#region src/components/reui/label.tsx
|
|
5655
|
-
function
|
|
5687
|
+
function Bp({ className: e, ...t }) {
|
|
5656
5688
|
return /* @__PURE__ */ H(Ul, {
|
|
5657
5689
|
"data-slot": "label",
|
|
5658
|
-
className:
|
|
5690
|
+
className: z("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
5659
5691
|
...t
|
|
5660
5692
|
});
|
|
5661
5693
|
}
|
|
5662
5694
|
//#endregion
|
|
5663
5695
|
//#region src/base/form/fields/CheckboxField.tsx
|
|
5664
|
-
function
|
|
5696
|
+
function Vp({ id: e, value: t, onChange: n, label: r, disabled: i, required: a, error: o, helpTextId: s, errorId: c }) {
|
|
5665
5697
|
let l = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0;
|
|
5666
5698
|
return /* @__PURE__ */ U("div", {
|
|
5667
5699
|
className: "flex items-center gap-2",
|
|
5668
|
-
children: [/* @__PURE__ */ H(
|
|
5700
|
+
children: [/* @__PURE__ */ H(Rp, {
|
|
5669
5701
|
id: e,
|
|
5670
5702
|
checked: !!t,
|
|
5671
5703
|
onCheckedChange: (e) => n(e === !0),
|
|
@@ -5673,7 +5705,7 @@ function Np({ id: e, value: t, onChange: n, label: r, disabled: i, required: a,
|
|
|
5673
5705
|
"aria-invalid": o ? !0 : void 0,
|
|
5674
5706
|
"aria-required": a || void 0,
|
|
5675
5707
|
"aria-describedby": l
|
|
5676
|
-
}), r && /* @__PURE__ */ H(
|
|
5708
|
+
}), r && /* @__PURE__ */ H(Bp, {
|
|
5677
5709
|
htmlFor: e,
|
|
5678
5710
|
className: "text-sm font-normal",
|
|
5679
5711
|
children: r
|
|
@@ -5682,10 +5714,10 @@ function Np({ id: e, value: t, onChange: n, label: r, disabled: i, required: a,
|
|
|
5682
5714
|
}
|
|
5683
5715
|
//#endregion
|
|
5684
5716
|
//#region src/base/form/fields/ColorField.tsx
|
|
5685
|
-
function
|
|
5686
|
-
let l = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0, u =
|
|
5717
|
+
function Hp({ id: e, value: t, onChange: n, placeholder: r, disabled: i, required: a, error: o, helpTextId: s, errorId: c }) {
|
|
5718
|
+
let l = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0, u = V((e) => {
|
|
5687
5719
|
n(e.target.value);
|
|
5688
|
-
}, [n]), d =
|
|
5720
|
+
}, [n]), d = V((e) => {
|
|
5689
5721
|
n(e.target.value);
|
|
5690
5722
|
}, [n]);
|
|
5691
5723
|
return /* @__PURE__ */ U("div", {
|
|
@@ -5697,7 +5729,7 @@ function Pp({ id: e, value: t, onChange: n, placeholder: r, disabled: i, require
|
|
|
5697
5729
|
disabled: i,
|
|
5698
5730
|
className: "border-input h-9 w-9 shrink-0 cursor-pointer rounded-md border p-0.5",
|
|
5699
5731
|
"aria-label": "Color picker"
|
|
5700
|
-
}), /* @__PURE__ */ H(
|
|
5732
|
+
}), /* @__PURE__ */ H(at, {
|
|
5701
5733
|
id: e,
|
|
5702
5734
|
type: "text",
|
|
5703
5735
|
value: t ?? "",
|
|
@@ -5714,7 +5746,7 @@ function Pp({ id: e, value: t, onChange: n, placeholder: r, disabled: i, require
|
|
|
5714
5746
|
}
|
|
5715
5747
|
//#endregion
|
|
5716
5748
|
//#region src/base/form/fields/CurrencyField.tsx
|
|
5717
|
-
var
|
|
5749
|
+
var Up = {
|
|
5718
5750
|
BRL: "R$",
|
|
5719
5751
|
USD: "$",
|
|
5720
5752
|
EUR: "€",
|
|
@@ -5729,115 +5761,115 @@ var Fp = {
|
|
|
5729
5761
|
COP: "$",
|
|
5730
5762
|
PEN: "S/"
|
|
5731
5763
|
};
|
|
5732
|
-
function
|
|
5733
|
-
let { t: f, formatCurrency:
|
|
5734
|
-
|
|
5735
|
-
}, [t]),
|
|
5736
|
-
|
|
5737
|
-
let e = parseFloat(
|
|
5764
|
+
function Wp({ id: e, value: t, onChange: n, currency: r = "BRL", placeholder: i, disabled: a, required: o, error: s, helpTextId: c, errorId: l, min: u, max: d }) {
|
|
5765
|
+
let { t: f, formatCurrency: m } = Ee(), [h, g] = ht(!1), [_, v] = ht(""), y = [s ? l : void 0, c].filter(Boolean).join(" ") || void 0, b = h ? _ : t == null ? "" : m(t, r), x = Up[r] ?? r, S = V(() => {
|
|
5766
|
+
g(!0), v(t == null ? "" : String(t));
|
|
5767
|
+
}, [t]), C = V(() => {
|
|
5768
|
+
g(!1);
|
|
5769
|
+
let e = parseFloat(_.replace(/,/g, "."));
|
|
5738
5770
|
n(Number.isNaN(e) ? null : Math.round((u !== void 0 && e < u ? u : d !== void 0 && e > d ? d : e) * 100) / 100);
|
|
5739
5771
|
}, [
|
|
5740
|
-
|
|
5772
|
+
_,
|
|
5741
5773
|
n,
|
|
5742
5774
|
u,
|
|
5743
5775
|
d
|
|
5744
|
-
]),
|
|
5745
|
-
|
|
5776
|
+
]), w = V((e) => {
|
|
5777
|
+
v(e.target.value);
|
|
5746
5778
|
}, []);
|
|
5747
|
-
return /* @__PURE__ */ U(
|
|
5779
|
+
return /* @__PURE__ */ U(p, {
|
|
5748
5780
|
"data-disabled": a || void 0,
|
|
5749
|
-
children: [/* @__PURE__ */ H(
|
|
5781
|
+
children: [/* @__PURE__ */ H(oe, {
|
|
5750
5782
|
align: "inline-start",
|
|
5751
|
-
children: /* @__PURE__ */ H(
|
|
5752
|
-
}), /* @__PURE__ */ H(
|
|
5783
|
+
children: /* @__PURE__ */ H(fe, { children: x })
|
|
5784
|
+
}), /* @__PURE__ */ H(ve, {
|
|
5753
5785
|
id: e,
|
|
5754
5786
|
inputMode: "decimal",
|
|
5755
|
-
value:
|
|
5756
|
-
onChange:
|
|
5757
|
-
onFocus:
|
|
5758
|
-
onBlur:
|
|
5787
|
+
value: h ? _ : t == null ? "" : b.replace(x, "").trim(),
|
|
5788
|
+
onChange: w,
|
|
5789
|
+
onFocus: S,
|
|
5790
|
+
onBlur: C,
|
|
5759
5791
|
placeholder: i ?? f("middag.ui.form.currency_placeholder"),
|
|
5760
5792
|
disabled: a,
|
|
5761
5793
|
"aria-invalid": s ? !0 : void 0,
|
|
5762
5794
|
"aria-required": o || void 0,
|
|
5763
|
-
"aria-describedby":
|
|
5795
|
+
"aria-describedby": y
|
|
5764
5796
|
})]
|
|
5765
5797
|
});
|
|
5766
5798
|
}
|
|
5767
5799
|
//#endregion
|
|
5768
5800
|
//#region src/components/reui/avatar.tsx
|
|
5769
|
-
function
|
|
5801
|
+
function Gp({ className: e, size: t = "default", ...n }) {
|
|
5770
5802
|
return /* @__PURE__ */ H(yl, {
|
|
5771
5803
|
"data-slot": "avatar",
|
|
5772
5804
|
"data-size": t,
|
|
5773
|
-
className:
|
|
5805
|
+
className: z("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6", e),
|
|
5774
5806
|
...n
|
|
5775
5807
|
});
|
|
5776
5808
|
}
|
|
5777
|
-
function
|
|
5809
|
+
function Kp({ className: e, ...t }) {
|
|
5778
5810
|
return /* @__PURE__ */ H(bl, {
|
|
5779
5811
|
"data-slot": "avatar-image",
|
|
5780
|
-
className:
|
|
5812
|
+
className: z("aspect-square size-full", e),
|
|
5781
5813
|
...t
|
|
5782
5814
|
});
|
|
5783
5815
|
}
|
|
5784
|
-
function
|
|
5816
|
+
function qp({ className: e, ...t }) {
|
|
5785
5817
|
return /* @__PURE__ */ H(xl, {
|
|
5786
5818
|
"data-slot": "avatar-fallback",
|
|
5787
|
-
className:
|
|
5819
|
+
className: z("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", e),
|
|
5788
5820
|
...t
|
|
5789
5821
|
});
|
|
5790
5822
|
}
|
|
5791
5823
|
//#endregion
|
|
5792
5824
|
//#region node_modules/@base-ui/utils/esm/useForcedRerendering.js
|
|
5793
|
-
function
|
|
5794
|
-
let [, e] =
|
|
5795
|
-
return
|
|
5825
|
+
function Jp() {
|
|
5826
|
+
let [, e] = B.useState({});
|
|
5827
|
+
return B.useCallback(() => {
|
|
5796
5828
|
e({});
|
|
5797
5829
|
}, []);
|
|
5798
5830
|
}
|
|
5799
5831
|
//#endregion
|
|
5800
5832
|
//#region node_modules/@base-ui/react/esm/internals/clamp.js
|
|
5801
|
-
function
|
|
5833
|
+
function Yp(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
|
|
5802
5834
|
return Math.max(t, Math.min(e, n));
|
|
5803
5835
|
}
|
|
5804
5836
|
//#endregion
|
|
5805
5837
|
//#region node_modules/@base-ui/react/esm/utils/formatNumber.js
|
|
5806
|
-
var
|
|
5807
|
-
function
|
|
5838
|
+
var Xp = /* @__PURE__ */ new Map();
|
|
5839
|
+
function Zp(e, t) {
|
|
5808
5840
|
let n = JSON.stringify({
|
|
5809
5841
|
locale: e,
|
|
5810
5842
|
options: t
|
|
5811
|
-
}), r =
|
|
5843
|
+
}), r = Xp.get(n);
|
|
5812
5844
|
if (r) return r;
|
|
5813
5845
|
let i = new Intl.NumberFormat(e, t);
|
|
5814
|
-
return
|
|
5846
|
+
return Xp.set(n, i), i;
|
|
5815
5847
|
}
|
|
5816
|
-
function
|
|
5817
|
-
return e == null ? "" :
|
|
5848
|
+
function Qp(e, t, n) {
|
|
5849
|
+
return e == null ? "" : Zp(t, n).format(e);
|
|
5818
5850
|
}
|
|
5819
|
-
function
|
|
5820
|
-
return
|
|
5851
|
+
function $p(e, t, n) {
|
|
5852
|
+
return Qp(e, t, {
|
|
5821
5853
|
...n,
|
|
5822
5854
|
maximumFractionDigits: 20
|
|
5823
5855
|
});
|
|
5824
5856
|
}
|
|
5825
5857
|
//#endregion
|
|
5826
5858
|
//#region node_modules/@base-ui/react/esm/number-field/root/NumberFieldRootContext.js
|
|
5827
|
-
var
|
|
5828
|
-
process.env.NODE_ENV !== "production" && (
|
|
5829
|
-
function
|
|
5830
|
-
let e =
|
|
5831
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
5859
|
+
var em = /* @__PURE__ */ B.createContext(void 0);
|
|
5860
|
+
process.env.NODE_ENV !== "production" && (em.displayName = "NumberFieldRootContext");
|
|
5861
|
+
function tm() {
|
|
5862
|
+
let e = B.useContext(em);
|
|
5863
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? C(43) : "Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.");
|
|
5832
5864
|
return e;
|
|
5833
5865
|
}
|
|
5834
5866
|
//#endregion
|
|
5835
5867
|
//#region node_modules/@base-ui/react/esm/number-field/utils/stateAttributesMapping.js
|
|
5836
|
-
var
|
|
5868
|
+
var nm = {
|
|
5837
5869
|
inputValue: () => null,
|
|
5838
5870
|
value: () => null,
|
|
5839
|
-
...
|
|
5840
|
-
},
|
|
5871
|
+
...M
|
|
5872
|
+
}, rm = [
|
|
5841
5873
|
"零",
|
|
5842
5874
|
"〇",
|
|
5843
5875
|
"一",
|
|
@@ -5849,7 +5881,7 @@ var Jp = {
|
|
|
5849
5881
|
"七",
|
|
5850
5882
|
"八",
|
|
5851
5883
|
"九"
|
|
5852
|
-
],
|
|
5884
|
+
], im = {
|
|
5853
5885
|
零: "0",
|
|
5854
5886
|
〇: "0",
|
|
5855
5887
|
一: "1",
|
|
@@ -5861,7 +5893,7 @@ var Jp = {
|
|
|
5861
5893
|
七: "7",
|
|
5862
5894
|
八: "8",
|
|
5863
5895
|
九: "9"
|
|
5864
|
-
},
|
|
5896
|
+
}, am = [
|
|
5865
5897
|
"٠",
|
|
5866
5898
|
"١",
|
|
5867
5899
|
"٢",
|
|
@@ -5872,7 +5904,7 @@ var Jp = {
|
|
|
5872
5904
|
"٧",
|
|
5873
5905
|
"٨",
|
|
5874
5906
|
"٩"
|
|
5875
|
-
],
|
|
5907
|
+
], om = [
|
|
5876
5908
|
"۰",
|
|
5877
5909
|
"۱",
|
|
5878
5910
|
"۲",
|
|
@@ -5883,7 +5915,7 @@ var Jp = {
|
|
|
5883
5915
|
"۷",
|
|
5884
5916
|
"۸",
|
|
5885
5917
|
"۹"
|
|
5886
|
-
],
|
|
5918
|
+
], sm = [
|
|
5887
5919
|
"0",
|
|
5888
5920
|
"1",
|
|
5889
5921
|
"2",
|
|
@@ -5894,53 +5926,53 @@ var Jp = {
|
|
|
5894
5926
|
"7",
|
|
5895
5927
|
"8",
|
|
5896
5928
|
"9"
|
|
5897
|
-
],
|
|
5929
|
+
], cm = [
|
|
5898
5930
|
"%",
|
|
5899
5931
|
"٪",
|
|
5900
5932
|
"%",
|
|
5901
5933
|
"﹪"
|
|
5902
|
-
],
|
|
5934
|
+
], lm = ["‰", "؉"], um = [
|
|
5903
5935
|
"−",
|
|
5904
5936
|
"-",
|
|
5905
5937
|
"‒",
|
|
5906
5938
|
"–",
|
|
5907
5939
|
"—",
|
|
5908
5940
|
"﹣"
|
|
5909
|
-
],
|
|
5941
|
+
], dm = ["+", "﹢"], fm = RegExp(`[${am.join("")}]`, "g"), pm = RegExp(`[${om.join("")}]`, "g"), mm = RegExp(`[${sm.join("")}]`, "g"), hm = RegExp(`[${rm.join("")}]`, "g"), gm = RegExp(`[${cm.join("")}]`), _m = RegExp(`[${lm.join("")}]`), vm = /[٠١٢٣٤٥٦٧٨٩]/, ym = /[۰۱۲۳۴۵۶۷۸۹]/, bm = /[零〇一二三四五六七八九]/, xm = RegExp(`[${sm.join("")}]`), Sm = [
|
|
5910
5942
|
".",
|
|
5911
5943
|
",",
|
|
5912
5944
|
".",
|
|
5913
5945
|
",",
|
|
5914
5946
|
"٫",
|
|
5915
5947
|
"٬"
|
|
5916
|
-
],
|
|
5917
|
-
function
|
|
5918
|
-
let n =
|
|
5948
|
+
], Cm = /\p{Zs}/u, wm = ["+", ...dm], Tm = ["-", ...um], Em = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Dm = (e) => e.replace(/[-\\\]^]/g, (e) => `\\${e}`), Om = (e) => `[${e.map(Dm).join("")}]`, km = Om(["-"].concat(um)), Am = Om(["+"].concat(dm)), jm = new RegExp(km, "gu"), Mm = new RegExp(Am, "gu"), Nm = new RegExp(km), Pm = new RegExp(Am);
|
|
5949
|
+
function Fm(e, t) {
|
|
5950
|
+
let n = Zp(e, t).formatToParts(11111.1), r = {};
|
|
5919
5951
|
return n.forEach((e) => {
|
|
5920
5952
|
r[e.type] = e.value;
|
|
5921
|
-
}),
|
|
5953
|
+
}), Zp(e).formatToParts(.1).forEach((e) => {
|
|
5922
5954
|
e.type === "decimal" && (r[e.type] = e.value);
|
|
5923
5955
|
}), r;
|
|
5924
5956
|
}
|
|
5925
|
-
function
|
|
5957
|
+
function Im(e, t, n) {
|
|
5926
5958
|
if (e == null) return null;
|
|
5927
5959
|
let r = String(e).replace(/\p{Cf}/gu, "").trim();
|
|
5928
|
-
r = r.replace(
|
|
5960
|
+
r = r.replace(jm, "-").replace(Mm, "+");
|
|
5929
5961
|
let i = !1, a = r.match(/([+-])\s*$/);
|
|
5930
5962
|
a && (a[1] === "-" && (i = !0), r = r.replace(/([+-])\s*$/, ""));
|
|
5931
5963
|
let o = r.match(/^\s*([+-])/);
|
|
5932
5964
|
o && (o[1] === "-" && (i = !0), r = r.replace(/^\s*[+-]/, ""));
|
|
5933
5965
|
let s = t;
|
|
5934
|
-
s === void 0 && (
|
|
5935
|
-
let { group: c, decimal: l, currency: u } =
|
|
5936
|
-
c && (p = /\p{Zs}/u.test(c) ? /\p{Zs}/gu : c === "'" || c === "’" ? /['’]/g : new RegExp(
|
|
5966
|
+
s === void 0 && (vm.test(r) || ym.test(r) ? s = "ar" : bm.test(r) && (s = "zh"));
|
|
5967
|
+
let { group: c, decimal: l, currency: u } = Fm(s, n), d = Zp(s, n).formatToParts(1).filter((e) => e.type === "unit").map((e) => Em(e.value)), f = d.length ? new RegExp(d.join("|"), "g") : null, p = null;
|
|
5968
|
+
c && (p = /\p{Zs}/u.test(c) ? /\p{Zs}/gu : c === "'" || c === "’" ? /['’]/g : new RegExp(Em(c), "g"));
|
|
5937
5969
|
let m = [
|
|
5938
5970
|
{
|
|
5939
5971
|
regex: c ? p : null,
|
|
5940
5972
|
replacement: ""
|
|
5941
5973
|
},
|
|
5942
5974
|
{
|
|
5943
|
-
regex: l ? new RegExp(
|
|
5975
|
+
regex: l ? new RegExp(Em(l), "g") : null,
|
|
5944
5976
|
replacement: "."
|
|
5945
5977
|
},
|
|
5946
5978
|
{
|
|
@@ -5960,7 +5992,7 @@ function Om(e, t, n) {
|
|
|
5960
5992
|
replacement: ""
|
|
5961
5993
|
},
|
|
5962
5994
|
{
|
|
5963
|
-
regex: u ? new RegExp(
|
|
5995
|
+
regex: u ? new RegExp(Em(u), "g") : null,
|
|
5964
5996
|
replacement: ""
|
|
5965
5997
|
},
|
|
5966
5998
|
{
|
|
@@ -5968,254 +6000,254 @@ function Om(e, t, n) {
|
|
|
5968
6000
|
replacement: ""
|
|
5969
6001
|
},
|
|
5970
6002
|
{
|
|
5971
|
-
regex:
|
|
5972
|
-
replacement: (e) => String(
|
|
6003
|
+
regex: fm,
|
|
6004
|
+
replacement: (e) => String(am.indexOf(e))
|
|
5973
6005
|
},
|
|
5974
6006
|
{
|
|
5975
|
-
regex:
|
|
5976
|
-
replacement: (e) => String(
|
|
6007
|
+
regex: pm,
|
|
6008
|
+
replacement: (e) => String(om.indexOf(e))
|
|
5977
6009
|
},
|
|
5978
6010
|
{
|
|
5979
|
-
regex:
|
|
5980
|
-
replacement: (e) => String(
|
|
6011
|
+
regex: mm,
|
|
6012
|
+
replacement: (e) => String(sm.indexOf(e))
|
|
5981
6013
|
},
|
|
5982
6014
|
{
|
|
5983
|
-
regex:
|
|
5984
|
-
replacement: (e) =>
|
|
6015
|
+
regex: hm,
|
|
6016
|
+
replacement: (e) => im[e]
|
|
5985
6017
|
}
|
|
5986
6018
|
].reduce((e, { regex: t, replacement: n }) => t ? e.replace(t, n) : e, r), h = m.lastIndexOf(".");
|
|
5987
6019
|
if (h !== -1 && (m = `${m.slice(0, h).replace(/\./g, "")}.${m.slice(h + 1).replace(/\./g, "")}`), /^[-+]?Infinity$/i.test(r) || /[∞]/.test(r)) return null;
|
|
5988
|
-
let g = (i ? "-" : "") + m, _ = parseFloat(g), v = n?.style, y = v === "unit" && n?.unit === "percent", b =
|
|
5989
|
-
return
|
|
6020
|
+
let g = (i ? "-" : "") + m, _ = parseFloat(g), v = n?.style, y = v === "unit" && n?.unit === "percent", b = gm.test(e) || v === "percent";
|
|
6021
|
+
return _m.test(e) ? _ /= 1e3 : !y && b && (_ /= 100), Number.isNaN(_) ? null : _;
|
|
5990
6022
|
}
|
|
5991
6023
|
//#endregion
|
|
5992
6024
|
//#region node_modules/@base-ui/react/esm/number-field/utils/validate.js
|
|
5993
|
-
var
|
|
5994
|
-
function
|
|
5995
|
-
let t =
|
|
6025
|
+
var Lm = 1e-10;
|
|
6026
|
+
function Rm(e) {
|
|
6027
|
+
let t = Zp("en-US").resolvedOptions(), n = e?.minimumFractionDigits ?? t.minimumFractionDigits ?? 0;
|
|
5996
6028
|
return {
|
|
5997
6029
|
maximumFractionDigits: Math.max(e?.maximumFractionDigits ?? t.maximumFractionDigits ?? 20, n),
|
|
5998
6030
|
minimumFractionDigits: n
|
|
5999
6031
|
};
|
|
6000
6032
|
}
|
|
6001
|
-
function
|
|
6033
|
+
function zm(e, t) {
|
|
6002
6034
|
if (!Number.isFinite(e)) return e;
|
|
6003
6035
|
let n = Math.min(Math.max(t, 0), 20);
|
|
6004
6036
|
return Number(e.toFixed(n));
|
|
6005
6037
|
}
|
|
6006
|
-
function
|
|
6007
|
-
let { maximumFractionDigits: n } =
|
|
6008
|
-
return
|
|
6038
|
+
function Bm(e, t) {
|
|
6039
|
+
let { maximumFractionDigits: n } = Rm(t);
|
|
6040
|
+
return zm(e, n);
|
|
6009
6041
|
}
|
|
6010
|
-
function
|
|
6042
|
+
function Vm(e, t, n, r = "directional") {
|
|
6011
6043
|
if (n === 0) return e;
|
|
6012
|
-
let i = Math.abs(n), a = Math.sign(n), o = i *
|
|
6044
|
+
let i = Math.abs(n), a = Math.sign(n), o = i * Lm * a, s = r === "nearest" ? n : i, c = (e - t + o) / s, l;
|
|
6013
6045
|
return l = r === "nearest" ? Math.round(c) : a > 0 ? Math.floor(c) : Math.ceil(c), t + l * (r === "nearest" ? n : i);
|
|
6014
6046
|
}
|
|
6015
|
-
function
|
|
6047
|
+
function Hm(e, { step: t, minWithDefault: n, maxWithDefault: r, minWithZeroDefault: i, format: a, snapOnStep: o, small: s, clamp: c }) {
|
|
6016
6048
|
if (e === null) return e;
|
|
6017
|
-
let l = c ?
|
|
6049
|
+
let l = c ? Yp(e, n, r) : e;
|
|
6018
6050
|
if (t != null && o) {
|
|
6019
|
-
if (t === 0) return
|
|
6051
|
+
if (t === 0) return Bm(l, a);
|
|
6020
6052
|
let e = i;
|
|
6021
|
-
return !s && n !== -(2 ** 53 - 1) && (e = n),
|
|
6053
|
+
return !s && n !== -(2 ** 53 - 1) && (e = n), Bm(Vm(l, e, t, s ? "nearest" : "directional"), a);
|
|
6022
6054
|
}
|
|
6023
|
-
return
|
|
6055
|
+
return Bm(l, a);
|
|
6024
6056
|
}
|
|
6025
6057
|
//#endregion
|
|
6026
6058
|
//#region node_modules/@base-ui/react/esm/number-field/root/NumberFieldRoot.js
|
|
6027
|
-
var
|
|
6028
|
-
let { id: n, min: r, max: i, smallStep: a = .1, step: o = 1, largeStep: s = 10, required: c = !1, disabled: l = !1, readOnly: u = !1, form: d, name: f, defaultValue: p, value:
|
|
6029
|
-
controlled:
|
|
6059
|
+
var Um = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
6060
|
+
let { id: n, min: r, max: i, smallStep: a = .1, step: o = 1, largeStep: s = 10, required: c = !1, disabled: l = !1, readOnly: u = !1, form: d, name: f, defaultValue: p, value: h, onValueChange: g, onValueCommitted: _, allowWheelScrub: y = !1, snapOnStep: x = !1, allowOutOfRange: C = !1, format: T, locale: O, render: k, className: j, inputRef: M, style: P, ...ee } = e, { setDirty: F, validityData: ne, disabled: ie, setFilled: ae, invalid: oe, name: se, state: ce, validation: le, shouldValidateOnChange: de } = Se(), fe = ie || l, pe = se ?? f, he = o === "any" ? 1 : o, [ge, _e] = B.useState(!1), ve = r ?? -(2 ** 53 - 1), ye = i ?? 2 ** 53 - 1, be = r ?? 0, Ce = T?.style, we = B.useRef(null), Te = me(M, le.inputRef), Ee = re({ id: n }), [De, Oe] = A({
|
|
6061
|
+
controlled: h,
|
|
6030
6062
|
default: p,
|
|
6031
6063
|
name: "NumberField",
|
|
6032
6064
|
state: "value"
|
|
6033
|
-
}),
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
}, [
|
|
6037
|
-
let
|
|
6038
|
-
|
|
6039
|
-
}),
|
|
6040
|
-
let { decimal: e, group: t, currency: n, literal: r } =
|
|
6041
|
-
|
|
6042
|
-
let a =
|
|
6043
|
-
return a &&
|
|
6044
|
-
}),
|
|
6045
|
-
let n = t.event, r = t.direction, i = t.reason, a = !
|
|
6046
|
-
step: r ?
|
|
6047
|
-
format:
|
|
6048
|
-
minWithDefault:
|
|
6049
|
-
maxWithDefault:
|
|
6050
|
-
minWithZeroDefault:
|
|
6051
|
-
snapOnStep:
|
|
6065
|
+
}), L = De ?? null, ke = v(L);
|
|
6066
|
+
te(() => {
|
|
6067
|
+
ae(L !== null);
|
|
6068
|
+
}, [ae, L]);
|
|
6069
|
+
let Ae = Jp(), je = v(T), Me = B.useRef(!1), Ne = I((e, t) => {
|
|
6070
|
+
Me.current = !1, _?.(e, t);
|
|
6071
|
+
}), Pe = B.useRef(!0), Fe = B.useRef(null), [R, Ie] = B.useState(() => h === void 0 ? Qp(L, O, T) : Wm(L, O, T)), [Le, z] = B.useState("numeric"), Re = I(() => {
|
|
6072
|
+
let { decimal: e, group: t, currency: n, literal: r } = Fm(O, T), i = /* @__PURE__ */ new Set();
|
|
6073
|
+
Sm.forEach((e) => i.add(e)), e && i.add(e), t && (i.add(t), Cm.test(t) && i.add(" "));
|
|
6074
|
+
let a = Ce === "percent" || Ce === "unit" && T?.unit === "percent", o = Ce === "percent" || Ce === "unit" && T?.unit === "permille";
|
|
6075
|
+
return a && cm.forEach((e) => i.add(e)), o && lm.forEach((e) => i.add(e)), Ce === "currency" && n && i.add(n), r && (Array.from(r).forEach((e) => i.add(e)), Cm.test(r) && i.add(" ")), wm.forEach((e) => i.add(e)), ve < 0 && Tm.forEach((e) => i.add(e)), i;
|
|
6076
|
+
}), ze = I((e) => e?.altKey ? a : e?.shiftKey ? s : he), Be = I((e, t) => {
|
|
6077
|
+
let n = t.event, r = t.direction, i = t.reason, a = !C || !(i === "input-change" || i === "input-blur" || i === "input-paste" || i === "input-clear" || i === "none"), o = Hm(e, {
|
|
6078
|
+
step: r ? ze(n) * r : void 0,
|
|
6079
|
+
format: je.current,
|
|
6080
|
+
minWithDefault: ve,
|
|
6081
|
+
maxWithDefault: ye,
|
|
6082
|
+
minWithZeroDefault: be,
|
|
6083
|
+
snapOnStep: x,
|
|
6052
6084
|
small: n?.altKey ?? !1,
|
|
6053
6085
|
clamp: a
|
|
6054
|
-
}), s = t.reason === "input-change" || t.reason === "input-clear" || t.reason === "input-blur" || t.reason === "input-paste" || t.reason === "none", c = o !==
|
|
6086
|
+
}), s = t.reason === "input-change" || t.reason === "input-clear" || t.reason === "input-blur" || t.reason === "input-paste" || t.reason === "none", c = o !== L || s && (e !== L || Pe.current === !1);
|
|
6055
6087
|
if (c) {
|
|
6056
|
-
if (
|
|
6057
|
-
|
|
6088
|
+
if (Fe.current = o, g?.(o, t), t.isCanceled) return c;
|
|
6089
|
+
Oe(o), F(o !== ne.initialValue), Me.current = !0;
|
|
6058
6090
|
}
|
|
6059
|
-
return
|
|
6060
|
-
}),
|
|
6061
|
-
let o = n ??
|
|
6062
|
-
return
|
|
6063
|
-
});
|
|
6064
|
-
|
|
6065
|
-
if (!
|
|
6066
|
-
let e =
|
|
6067
|
-
e !==
|
|
6068
|
-
}),
|
|
6069
|
-
if (!
|
|
6091
|
+
return Pe.current && Ie(Qp(o, O, T)), Ae(), c;
|
|
6092
|
+
}), Ve = I((e, { direction: t, currentValue: n, event: i, reason: a }) => {
|
|
6093
|
+
let o = n ?? ke.current;
|
|
6094
|
+
return Be(typeof o == "number" ? o + e * t : Math.max(0, r ?? 0), S(a, i, void 0, { direction: t }));
|
|
6095
|
+
});
|
|
6096
|
+
te(function() {
|
|
6097
|
+
if (!Pe.current) return;
|
|
6098
|
+
let e = h === void 0 ? Qp(L, O, T) : Wm(L, O, T);
|
|
6099
|
+
e !== R && Ie(e);
|
|
6100
|
+
}), te(function() {
|
|
6101
|
+
if (!D) return;
|
|
6070
6102
|
let e = "text";
|
|
6071
|
-
|
|
6072
|
-
}, [
|
|
6073
|
-
let e =
|
|
6074
|
-
if (
|
|
6103
|
+
ve >= 0 && (e = "decimal"), z(e);
|
|
6104
|
+
}, [ve, Ce]), B.useEffect(function() {
|
|
6105
|
+
let e = we.current;
|
|
6106
|
+
if (fe || u || !y || !e) return;
|
|
6075
6107
|
function t(e) {
|
|
6076
|
-
e.ctrlKey ||
|
|
6108
|
+
e.ctrlKey || E(m(we.current)) !== we.current || (e.preventDefault(), Ve(ze(e) ?? 1, {
|
|
6077
6109
|
direction: e.deltaY > 0 ? -1 : 1,
|
|
6078
6110
|
event: e,
|
|
6079
6111
|
reason: "wheel"
|
|
6080
6112
|
}));
|
|
6081
6113
|
}
|
|
6082
|
-
return
|
|
6114
|
+
return ue(e, "wheel", t);
|
|
6083
6115
|
}, [
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6116
|
+
y,
|
|
6117
|
+
Ve,
|
|
6118
|
+
fe,
|
|
6087
6119
|
u,
|
|
6088
6120
|
s,
|
|
6089
|
-
|
|
6090
|
-
|
|
6121
|
+
he,
|
|
6122
|
+
ze
|
|
6091
6123
|
]);
|
|
6092
|
-
let
|
|
6093
|
-
...
|
|
6094
|
-
disabled:
|
|
6124
|
+
let He = B.useMemo(() => ({
|
|
6125
|
+
...ce,
|
|
6126
|
+
disabled: fe,
|
|
6095
6127
|
readOnly: u,
|
|
6096
6128
|
required: c,
|
|
6097
|
-
value:
|
|
6098
|
-
inputValue:
|
|
6099
|
-
scrubbing:
|
|
6129
|
+
value: L,
|
|
6130
|
+
inputValue: R,
|
|
6131
|
+
scrubbing: ge
|
|
6100
6132
|
}), [
|
|
6101
|
-
|
|
6102
|
-
|
|
6133
|
+
ce,
|
|
6134
|
+
fe,
|
|
6103
6135
|
u,
|
|
6104
6136
|
c,
|
|
6105
|
-
I,
|
|
6106
6137
|
L,
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6138
|
+
R,
|
|
6139
|
+
ge
|
|
6140
|
+
]), Ue = B.useMemo(() => ({
|
|
6141
|
+
inputRef: we,
|
|
6142
|
+
inputValue: R,
|
|
6143
|
+
value: L,
|
|
6144
|
+
minWithDefault: ve,
|
|
6145
|
+
maxWithDefault: ye,
|
|
6146
|
+
disabled: fe,
|
|
6115
6147
|
readOnly: u,
|
|
6116
|
-
id:
|
|
6117
|
-
setValue:
|
|
6118
|
-
incrementValue:
|
|
6119
|
-
getStepAmount:
|
|
6120
|
-
allowInputSyncRef:
|
|
6121
|
-
formatOptionsRef:
|
|
6122
|
-
valueRef:
|
|
6123
|
-
lastChangedValueRef:
|
|
6124
|
-
hasPendingCommitRef:
|
|
6125
|
-
name:
|
|
6148
|
+
id: Ee,
|
|
6149
|
+
setValue: Be,
|
|
6150
|
+
incrementValue: Ve,
|
|
6151
|
+
getStepAmount: ze,
|
|
6152
|
+
allowInputSyncRef: Pe,
|
|
6153
|
+
formatOptionsRef: je,
|
|
6154
|
+
valueRef: ke,
|
|
6155
|
+
lastChangedValueRef: Fe,
|
|
6156
|
+
hasPendingCommitRef: Me,
|
|
6157
|
+
name: pe,
|
|
6126
6158
|
required: c,
|
|
6127
|
-
invalid:
|
|
6128
|
-
inputMode:
|
|
6129
|
-
getAllowedNonNumericKeys:
|
|
6159
|
+
invalid: oe,
|
|
6160
|
+
inputMode: Le,
|
|
6161
|
+
getAllowedNonNumericKeys: Re,
|
|
6130
6162
|
min: r,
|
|
6131
6163
|
max: i,
|
|
6132
|
-
setInputValue:
|
|
6133
|
-
locale:
|
|
6134
|
-
isScrubbing:
|
|
6135
|
-
setIsScrubbing:
|
|
6136
|
-
state:
|
|
6137
|
-
onValueCommitted:
|
|
6164
|
+
setInputValue: Ie,
|
|
6165
|
+
locale: O,
|
|
6166
|
+
isScrubbing: ge,
|
|
6167
|
+
setIsScrubbing: _e,
|
|
6168
|
+
state: He,
|
|
6169
|
+
onValueCommitted: Ne
|
|
6138
6170
|
}), [
|
|
6139
|
-
|
|
6171
|
+
we,
|
|
6172
|
+
R,
|
|
6140
6173
|
L,
|
|
6141
|
-
I,
|
|
6142
|
-
_e,
|
|
6143
6174
|
ve,
|
|
6144
|
-
|
|
6175
|
+
ye,
|
|
6176
|
+
fe,
|
|
6145
6177
|
u,
|
|
6146
|
-
|
|
6147
|
-
Ve,
|
|
6148
|
-
He,
|
|
6178
|
+
Ee,
|
|
6149
6179
|
Be,
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6180
|
+
Ve,
|
|
6181
|
+
ze,
|
|
6182
|
+
je,
|
|
6183
|
+
ke,
|
|
6184
|
+
pe,
|
|
6153
6185
|
c,
|
|
6154
|
-
|
|
6186
|
+
oe,
|
|
6187
|
+
Le,
|
|
6155
6188
|
Re,
|
|
6156
|
-
ze,
|
|
6157
6189
|
r,
|
|
6158
6190
|
i,
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
]),
|
|
6191
|
+
Ie,
|
|
6192
|
+
O,
|
|
6193
|
+
ge,
|
|
6194
|
+
He,
|
|
6195
|
+
Ne
|
|
6196
|
+
]), We = w("div", e, {
|
|
6165
6197
|
ref: t,
|
|
6166
|
-
state:
|
|
6167
|
-
props:
|
|
6168
|
-
stateAttributesMapping:
|
|
6169
|
-
});
|
|
6170
|
-
return /* @__PURE__ */ U(
|
|
6171
|
-
value:
|
|
6172
|
-
children: [
|
|
6173
|
-
...
|
|
6198
|
+
state: He,
|
|
6199
|
+
props: ee,
|
|
6200
|
+
stateAttributesMapping: nm
|
|
6201
|
+
});
|
|
6202
|
+
return /* @__PURE__ */ U(em.Provider, {
|
|
6203
|
+
value: Ue,
|
|
6204
|
+
children: [We, /* @__PURE__ */ H("input", {
|
|
6205
|
+
...le.getInputValidationProps({
|
|
6174
6206
|
onFocus() {
|
|
6175
|
-
|
|
6207
|
+
we.current?.focus();
|
|
6176
6208
|
},
|
|
6177
6209
|
onChange(e) {
|
|
6178
6210
|
if (e.nativeEvent.defaultPrevented) return;
|
|
6179
|
-
let t = e.currentTarget.valueAsNumber, n = Number.isNaN(t) ? null : t, r =
|
|
6180
|
-
|
|
6211
|
+
let t = e.currentTarget.valueAsNumber, n = Number.isNaN(t) ? null : t, r = S(b, e.nativeEvent);
|
|
6212
|
+
F(n !== ne.initialValue), Be(n, r), de() && le.commit(n);
|
|
6181
6213
|
}
|
|
6182
6214
|
}),
|
|
6183
|
-
ref:
|
|
6215
|
+
ref: Te,
|
|
6184
6216
|
type: "number",
|
|
6185
6217
|
form: d,
|
|
6186
|
-
name:
|
|
6187
|
-
value:
|
|
6218
|
+
name: pe,
|
|
6219
|
+
value: L ?? "",
|
|
6188
6220
|
min: r,
|
|
6189
6221
|
max: i,
|
|
6190
6222
|
step: o,
|
|
6191
|
-
disabled:
|
|
6223
|
+
disabled: fe,
|
|
6192
6224
|
required: c,
|
|
6193
6225
|
"aria-hidden": !0,
|
|
6194
6226
|
tabIndex: -1,
|
|
6195
|
-
style:
|
|
6227
|
+
style: pe ? N : xe,
|
|
6196
6228
|
suppressHydrationWarning: !0
|
|
6197
6229
|
})]
|
|
6198
6230
|
});
|
|
6199
6231
|
});
|
|
6200
|
-
process.env.NODE_ENV !== "production" && (
|
|
6201
|
-
function
|
|
6202
|
-
return n?.maximumFractionDigits != null || n?.minimumFractionDigits != null ?
|
|
6232
|
+
process.env.NODE_ENV !== "production" && (Um.displayName = "NumberFieldRoot");
|
|
6233
|
+
function Wm(e, t, n) {
|
|
6234
|
+
return n?.maximumFractionDigits != null || n?.minimumFractionDigits != null ? Qp(e, t, n) : $p(e, t, n);
|
|
6203
6235
|
}
|
|
6204
6236
|
//#endregion
|
|
6205
6237
|
//#region node_modules/@base-ui/react/esm/number-field/group/NumberFieldGroup.js
|
|
6206
|
-
var
|
|
6207
|
-
let { render: n, className: r, style: i, ...a } = e, { state: o } =
|
|
6208
|
-
return
|
|
6238
|
+
var Gm = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
6239
|
+
let { render: n, className: r, style: i, ...a } = e, { state: o } = tm();
|
|
6240
|
+
return w("div", e, {
|
|
6209
6241
|
ref: t,
|
|
6210
6242
|
state: o,
|
|
6211
6243
|
props: [{ role: "group" }, a],
|
|
6212
|
-
stateAttributesMapping:
|
|
6244
|
+
stateAttributesMapping: nm
|
|
6213
6245
|
});
|
|
6214
6246
|
});
|
|
6215
|
-
process.env.NODE_ENV !== "production" && (
|
|
6247
|
+
process.env.NODE_ENV !== "production" && (Gm.displayName = "NumberFieldGroup");
|
|
6216
6248
|
//#endregion
|
|
6217
6249
|
//#region node_modules/@base-ui/utils/esm/useInterval.js
|
|
6218
|
-
var
|
|
6250
|
+
var Km = 0, qm = class e extends _ {
|
|
6219
6251
|
static create() {
|
|
6220
6252
|
return new e();
|
|
6221
6253
|
}
|
|
@@ -6225,34 +6257,34 @@ var Rm = 0, zm = class e extends ae {
|
|
|
6225
6257
|
}, e);
|
|
6226
6258
|
}
|
|
6227
6259
|
clear = () => {
|
|
6228
|
-
this.currentId !==
|
|
6260
|
+
this.currentId !== Km && (clearInterval(this.currentId), this.currentId = Km);
|
|
6229
6261
|
};
|
|
6230
6262
|
};
|
|
6231
|
-
function
|
|
6232
|
-
let e =
|
|
6233
|
-
return
|
|
6263
|
+
function Jm() {
|
|
6264
|
+
let e = ne(qm.create).current;
|
|
6265
|
+
return y(e.disposeEffect), e;
|
|
6234
6266
|
}
|
|
6235
6267
|
//#endregion
|
|
6236
6268
|
//#region node_modules/@base-ui/react/esm/internals/usePressAndHold.js
|
|
6237
|
-
var
|
|
6238
|
-
function
|
|
6269
|
+
var Ym = 60, Xm = 400, Zm = 8, Qm = 50, $m = 3;
|
|
6270
|
+
function eh(e) {
|
|
6239
6271
|
return e === "touch" || e === "pen";
|
|
6240
6272
|
}
|
|
6241
|
-
function
|
|
6242
|
-
let { disabled: t, readOnly: n = !1, tick: r, onStop: i, tickDelay: a =
|
|
6273
|
+
function th(e) {
|
|
6274
|
+
let { disabled: t, readOnly: n = !1, tick: r, onStop: i, tickDelay: a = Ym, startDelay: o = Xm, scrollDistance: s = Zm, elementRef: c } = e, l = O(), u = Jm(), d = O(), f = B.useRef(!1), p = B.useRef(0), m = B.useRef({
|
|
6243
6275
|
x: 0,
|
|
6244
6276
|
y: 0
|
|
6245
|
-
}), h =
|
|
6277
|
+
}), h = B.useRef(!1), g = B.useRef(!1), _ = B.useRef(""), v = B.useRef(() => {}), y = I(() => {
|
|
6246
6278
|
d.clear(), l.clear(), u.clear(), v.current(), p.current = 0;
|
|
6247
|
-
}), b =
|
|
6279
|
+
}), b = I((e) => {
|
|
6248
6280
|
y();
|
|
6249
6281
|
let t = c.current;
|
|
6250
6282
|
if (!t) return;
|
|
6251
|
-
let n =
|
|
6283
|
+
let n = it(t);
|
|
6252
6284
|
function s(e) {
|
|
6253
6285
|
e.preventDefault();
|
|
6254
6286
|
}
|
|
6255
|
-
if (v.current =
|
|
6287
|
+
if (v.current = ue(n, "contextmenu", s), ue(n, "pointerup", (e) => {
|
|
6256
6288
|
f.current = !1, y(), i?.(e);
|
|
6257
6289
|
}, { once: !0 }), !r(e)) {
|
|
6258
6290
|
y();
|
|
@@ -6264,7 +6296,7 @@ function qm(e) {
|
|
|
6264
6296
|
});
|
|
6265
6297
|
});
|
|
6266
6298
|
});
|
|
6267
|
-
return
|
|
6299
|
+
return B.useEffect(() => () => y(), [y]), {
|
|
6268
6300
|
pointerHandlers: {
|
|
6269
6301
|
onTouchStart() {
|
|
6270
6302
|
h.current = !0;
|
|
@@ -6277,22 +6309,22 @@ function qm(e) {
|
|
|
6277
6309
|
e.defaultPrevented || !r || t || n || (_.current = e.pointerType, g.current = !1, f.current = !0, m.current = {
|
|
6278
6310
|
x: e.clientX,
|
|
6279
6311
|
y: e.clientY
|
|
6280
|
-
},
|
|
6312
|
+
}, eh(e.pointerType) ? d.start(Qm, () => {
|
|
6281
6313
|
let t = p.current;
|
|
6282
|
-
p.current = 0, f.current && t <
|
|
6314
|
+
p.current = 0, f.current && t < $m ? (b(e.nativeEvent), g.current = !0) : (g.current = !1, y());
|
|
6283
6315
|
}) : (e.preventDefault(), b(e.nativeEvent)));
|
|
6284
6316
|
},
|
|
6285
6317
|
onPointerUp(e) {
|
|
6286
|
-
|
|
6318
|
+
eh(e.pointerType) && (f.current = !1);
|
|
6287
6319
|
},
|
|
6288
6320
|
onPointerMove(e) {
|
|
6289
|
-
if (t || n || !
|
|
6321
|
+
if (t || n || !eh(e.pointerType) || !f.current) return;
|
|
6290
6322
|
p.current != null && (p.current += 1);
|
|
6291
6323
|
let { x: r, y: i } = m.current, a = r - e.clientX, o = i - e.clientY;
|
|
6292
6324
|
a ** 2 + o ** 2 > s ** 2 && y();
|
|
6293
6325
|
},
|
|
6294
6326
|
onMouseEnter(e) {
|
|
6295
|
-
e.defaultPrevented || t || n || !f.current || h.current ||
|
|
6327
|
+
e.defaultPrevented || t || n || !f.current || h.current || eh(_.current) || b(e.nativeEvent);
|
|
6296
6328
|
},
|
|
6297
6329
|
onMouseLeave() {
|
|
6298
6330
|
h.current || y();
|
|
@@ -6301,22 +6333,22 @@ function qm(e) {
|
|
|
6301
6333
|
h.current || y();
|
|
6302
6334
|
}
|
|
6303
6335
|
},
|
|
6304
|
-
shouldSkipClick:
|
|
6336
|
+
shouldSkipClick: I((e) => e.defaultPrevented ? !0 : eh(_.current) ? g.current : e.detail !== 0)
|
|
6305
6337
|
};
|
|
6306
6338
|
}
|
|
6307
6339
|
//#endregion
|
|
6308
6340
|
//#region node_modules/@base-ui/react/esm/number-field/root/useNumberFieldButton.js
|
|
6309
|
-
function
|
|
6341
|
+
function nh(e) {
|
|
6310
6342
|
return e === "touch" || e === "pen";
|
|
6311
6343
|
}
|
|
6312
|
-
function
|
|
6313
|
-
let { allowInputSyncRef: t, disabled: n, formatOptionsRef: r, getStepAmount: i, id: a, incrementValue: o, inputRef: s, inputValue: c, isIncrement: l, locale: u, readOnly: d, setValue: f, valueRef:
|
|
6314
|
-
function
|
|
6344
|
+
function rh(e) {
|
|
6345
|
+
let { allowInputSyncRef: t, disabled: n, formatOptionsRef: r, getStepAmount: i, id: a, incrementValue: o, inputRef: s, inputValue: c, isIncrement: l, locale: u, readOnly: d, setValue: f, valueRef: p, lastChangedValueRef: m, onValueCommitted: h } = e, g = l ? we : j;
|
|
6346
|
+
function _(e) {
|
|
6315
6347
|
t.current = !0;
|
|
6316
|
-
let n =
|
|
6317
|
-
n !== null && (
|
|
6348
|
+
let n = Im(c, u, r.current);
|
|
6349
|
+
n !== null && (p.current = n, f(n, S(g, e, void 0, { direction: l ? 1 : -1 })));
|
|
6318
6350
|
}
|
|
6319
|
-
let { pointerHandlers:
|
|
6351
|
+
let { pointerHandlers: v, shouldSkipClick: y } = th({
|
|
6320
6352
|
disabled: n || d,
|
|
6321
6353
|
elementRef: s,
|
|
6322
6354
|
tickDelay: 60,
|
|
@@ -6326,11 +6358,11 @@ function Ym(e) {
|
|
|
6326
6358
|
return o(i(e) ?? 1, {
|
|
6327
6359
|
direction: l ? 1 : -1,
|
|
6328
6360
|
event: e,
|
|
6329
|
-
reason:
|
|
6361
|
+
reason: g
|
|
6330
6362
|
});
|
|
6331
6363
|
},
|
|
6332
6364
|
onStop(e) {
|
|
6333
|
-
|
|
6365
|
+
h(m.current ?? p.current, T(g, e));
|
|
6334
6366
|
}
|
|
6335
6367
|
});
|
|
6336
6368
|
return {
|
|
@@ -6343,110 +6375,110 @@ function Ym(e) {
|
|
|
6343
6375
|
WebkitUserSelect: "none",
|
|
6344
6376
|
userSelect: "none"
|
|
6345
6377
|
},
|
|
6346
|
-
...
|
|
6378
|
+
...v,
|
|
6347
6379
|
onClick(e) {
|
|
6348
6380
|
let t = n || d;
|
|
6349
|
-
if (e.defaultPrevented || t ||
|
|
6350
|
-
|
|
6351
|
-
let r = i(e) ?? 1, a =
|
|
6381
|
+
if (e.defaultPrevented || t || y(e)) return;
|
|
6382
|
+
_(e.nativeEvent);
|
|
6383
|
+
let r = i(e) ?? 1, a = p.current;
|
|
6352
6384
|
o(r, {
|
|
6353
6385
|
direction: l ? 1 : -1,
|
|
6354
6386
|
event: e.nativeEvent,
|
|
6355
|
-
reason:
|
|
6387
|
+
reason: g
|
|
6356
6388
|
});
|
|
6357
|
-
let s =
|
|
6358
|
-
s !== a &&
|
|
6389
|
+
let s = m.current ?? p.current;
|
|
6390
|
+
s !== a && h(s, T(g, e.nativeEvent));
|
|
6359
6391
|
},
|
|
6360
6392
|
onPointerDown(e) {
|
|
6361
6393
|
let t = !e.button || e.button === 0;
|
|
6362
|
-
e.defaultPrevented || d || !t || n || (
|
|
6394
|
+
e.defaultPrevented || d || !t || n || (_(e.nativeEvent), nh(e.pointerType) || s.current?.focus(), v.onPointerDown(e));
|
|
6363
6395
|
}
|
|
6364
6396
|
};
|
|
6365
6397
|
}
|
|
6366
6398
|
//#endregion
|
|
6367
6399
|
//#region node_modules/@base-ui/react/esm/number-field/increment/NumberFieldIncrement.js
|
|
6368
|
-
var
|
|
6369
|
-
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { allowInputSyncRef: c, disabled: l, formatOptionsRef: u, getStepAmount: d, id: f, incrementValue: p, inputRef: m, inputValue: h, locale:
|
|
6400
|
+
var ih = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
6401
|
+
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { allowInputSyncRef: c, disabled: l, formatOptionsRef: u, getStepAmount: d, id: f, incrementValue: p, inputRef: m, inputValue: h, locale: g, maxWithDefault: _, readOnly: v, setValue: y, state: b, value: x, valueRef: S, lastChangedValueRef: C, onValueCommitted: T } = tm(), E = i || l || x != null && x >= _, D = rh({
|
|
6370
6402
|
isIncrement: !0,
|
|
6371
6403
|
inputRef: m,
|
|
6372
6404
|
inputValue: h,
|
|
6373
6405
|
disabled: E,
|
|
6374
|
-
readOnly:
|
|
6406
|
+
readOnly: v,
|
|
6375
6407
|
id: f,
|
|
6376
|
-
setValue:
|
|
6408
|
+
setValue: y,
|
|
6377
6409
|
getStepAmount: d,
|
|
6378
6410
|
incrementValue: p,
|
|
6379
6411
|
allowInputSyncRef: c,
|
|
6380
6412
|
formatOptionsRef: u,
|
|
6381
|
-
valueRef:
|
|
6382
|
-
locale:
|
|
6383
|
-
lastChangedValueRef:
|
|
6413
|
+
valueRef: S,
|
|
6414
|
+
locale: g,
|
|
6415
|
+
lastChangedValueRef: C,
|
|
6384
6416
|
onValueCommitted: T
|
|
6385
|
-
}), { getButtonProps: O, buttonRef:
|
|
6417
|
+
}), { getButtonProps: O, buttonRef: A } = k({
|
|
6386
6418
|
disabled: E,
|
|
6387
6419
|
native: a,
|
|
6388
6420
|
focusableWhenDisabled: !0
|
|
6389
|
-
}),
|
|
6390
|
-
...
|
|
6421
|
+
}), j = B.useMemo(() => ({
|
|
6422
|
+
...b,
|
|
6391
6423
|
disabled: E
|
|
6392
|
-
}), [
|
|
6393
|
-
return
|
|
6394
|
-
ref: [t,
|
|
6395
|
-
state:
|
|
6424
|
+
}), [b, E]);
|
|
6425
|
+
return w("button", e, {
|
|
6426
|
+
ref: [t, A],
|
|
6427
|
+
state: j,
|
|
6396
6428
|
props: [
|
|
6397
6429
|
D,
|
|
6398
6430
|
s,
|
|
6399
6431
|
O
|
|
6400
6432
|
],
|
|
6401
|
-
stateAttributesMapping:
|
|
6433
|
+
stateAttributesMapping: nm
|
|
6402
6434
|
});
|
|
6403
6435
|
});
|
|
6404
|
-
process.env.NODE_ENV !== "production" && (
|
|
6436
|
+
process.env.NODE_ENV !== "production" && (ih.displayName = "NumberFieldIncrement");
|
|
6405
6437
|
//#endregion
|
|
6406
6438
|
//#region node_modules/@base-ui/react/esm/number-field/decrement/NumberFieldDecrement.js
|
|
6407
|
-
var
|
|
6408
|
-
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { allowInputSyncRef: c, disabled: l, formatOptionsRef: u, getStepAmount: d, id: f, incrementValue: p, inputRef: m, inputValue: h, minWithDefault:
|
|
6439
|
+
var ah = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
6440
|
+
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { allowInputSyncRef: c, disabled: l, formatOptionsRef: u, getStepAmount: d, id: f, incrementValue: p, inputRef: m, inputValue: h, minWithDefault: g, readOnly: _, setValue: v, state: y, value: b, valueRef: x, locale: S, lastChangedValueRef: C, onValueCommitted: T } = tm(), E = i || l || b != null && b <= g, D = rh({
|
|
6409
6441
|
isIncrement: !1,
|
|
6410
6442
|
inputRef: m,
|
|
6411
6443
|
inputValue: h,
|
|
6412
6444
|
disabled: E,
|
|
6413
|
-
readOnly:
|
|
6445
|
+
readOnly: _,
|
|
6414
6446
|
id: f,
|
|
6415
|
-
setValue:
|
|
6447
|
+
setValue: v,
|
|
6416
6448
|
getStepAmount: d,
|
|
6417
6449
|
incrementValue: p,
|
|
6418
6450
|
allowInputSyncRef: c,
|
|
6419
6451
|
formatOptionsRef: u,
|
|
6420
|
-
valueRef:
|
|
6421
|
-
locale:
|
|
6422
|
-
lastChangedValueRef:
|
|
6452
|
+
valueRef: x,
|
|
6453
|
+
locale: S,
|
|
6454
|
+
lastChangedValueRef: C,
|
|
6423
6455
|
onValueCommitted: T
|
|
6424
|
-
}), { getButtonProps: O, buttonRef:
|
|
6456
|
+
}), { getButtonProps: O, buttonRef: A } = k({
|
|
6425
6457
|
disabled: E,
|
|
6426
6458
|
native: a,
|
|
6427
6459
|
focusableWhenDisabled: !0
|
|
6428
|
-
}),
|
|
6429
|
-
...
|
|
6460
|
+
}), j = B.useMemo(() => ({
|
|
6461
|
+
...y,
|
|
6430
6462
|
disabled: E
|
|
6431
|
-
}), [
|
|
6432
|
-
return
|
|
6433
|
-
ref: [t,
|
|
6434
|
-
state:
|
|
6463
|
+
}), [y, E]);
|
|
6464
|
+
return w("button", e, {
|
|
6465
|
+
ref: [t, A],
|
|
6466
|
+
state: j,
|
|
6435
6467
|
props: [
|
|
6436
6468
|
D,
|
|
6437
6469
|
s,
|
|
6438
6470
|
O
|
|
6439
6471
|
],
|
|
6440
|
-
stateAttributesMapping:
|
|
6472
|
+
stateAttributesMapping: nm
|
|
6441
6473
|
});
|
|
6442
6474
|
});
|
|
6443
|
-
process.env.NODE_ENV !== "production" && (
|
|
6475
|
+
process.env.NODE_ENV !== "production" && (ah.displayName = "NumberFieldDecrement");
|
|
6444
6476
|
//#endregion
|
|
6445
6477
|
//#region node_modules/@base-ui/react/esm/number-field/input/NumberFieldInput.js
|
|
6446
|
-
var
|
|
6447
|
-
...
|
|
6448
|
-
...
|
|
6449
|
-
},
|
|
6478
|
+
var oh = {
|
|
6479
|
+
...M,
|
|
6480
|
+
...nm
|
|
6481
|
+
}, sh = new Set([
|
|
6450
6482
|
"Backspace",
|
|
6451
6483
|
"Delete",
|
|
6452
6484
|
"ArrowLeft",
|
|
@@ -6454,88 +6486,88 @@ var Qm = {
|
|
|
6454
6486
|
"Tab",
|
|
6455
6487
|
"Enter",
|
|
6456
6488
|
"Escape"
|
|
6457
|
-
]),
|
|
6458
|
-
let { render: n, className: r, style: i, ...a } = e, { allowInputSyncRef: o, disabled: s, formatOptionsRef: c, getAllowedNonNumericKeys: l, getStepAmount: u, id: d, incrementValue: f, inputMode:
|
|
6459
|
-
return
|
|
6489
|
+
]), ch = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
6490
|
+
let { render: n, className: r, style: i, ...a } = e, { allowInputSyncRef: o, disabled: s, formatOptionsRef: c, getAllowedNonNumericKeys: l, getStepAmount: u, id: d, incrementValue: f, inputMode: p, inputValue: m, max: _, min: v, name: y, readOnly: b, required: C, setValue: E, state: D, setInputValue: O, locale: k, inputRef: A, value: j, onValueCommitted: M, lastChangedValueRef: N, hasPendingCommitRef: I, valueRef: te } = tm(), { clearErrors: ne } = Ce(), { validationMode: re, setTouched: ie, setFocused: oe, invalid: se, shouldValidateOnChange: ce, validation: ue } = Se(), { labelId: de } = be(), fe = B.useRef(!1), pe = B.useRef(!1);
|
|
6491
|
+
return ae(A, {
|
|
6460
6492
|
id: d,
|
|
6461
6493
|
value: j
|
|
6462
|
-
}),
|
|
6463
|
-
let t =
|
|
6464
|
-
if (
|
|
6465
|
-
if (
|
|
6466
|
-
|
|
6494
|
+
}), g(j, (e) => {
|
|
6495
|
+
let t = ce();
|
|
6496
|
+
if (ne(y), t && ue.commit(j), !(e === j || t)) {
|
|
6497
|
+
if (pe.current) {
|
|
6498
|
+
pe.current = !1;
|
|
6467
6499
|
return;
|
|
6468
6500
|
}
|
|
6469
|
-
|
|
6501
|
+
ue.commit(j, !0);
|
|
6470
6502
|
}
|
|
6471
|
-
}),
|
|
6503
|
+
}), w("input", e, {
|
|
6472
6504
|
ref: [t, A],
|
|
6473
|
-
state:
|
|
6505
|
+
state: D,
|
|
6474
6506
|
props: [
|
|
6475
6507
|
{
|
|
6476
6508
|
id: d,
|
|
6477
|
-
required:
|
|
6509
|
+
required: C,
|
|
6478
6510
|
disabled: s,
|
|
6479
6511
|
readOnly: b,
|
|
6480
|
-
inputMode:
|
|
6481
|
-
value:
|
|
6512
|
+
inputMode: p,
|
|
6513
|
+
value: m,
|
|
6482
6514
|
type: "text",
|
|
6483
6515
|
autoComplete: "off",
|
|
6484
6516
|
autoCorrect: "off",
|
|
6485
6517
|
spellCheck: "false",
|
|
6486
6518
|
"aria-roledescription": "Number field",
|
|
6487
|
-
"aria-invalid":
|
|
6488
|
-
"aria-labelledby":
|
|
6519
|
+
"aria-invalid": se || void 0,
|
|
6520
|
+
"aria-labelledby": de,
|
|
6489
6521
|
suppressHydrationWarning: !0,
|
|
6490
6522
|
onFocus(e) {
|
|
6491
|
-
if (e.defaultPrevented || b || s || (
|
|
6492
|
-
|
|
6523
|
+
if (e.defaultPrevented || b || s || (oe(!0), fe.current)) return;
|
|
6524
|
+
fe.current = !0;
|
|
6493
6525
|
let t = e.currentTarget, n = t.value.length;
|
|
6494
6526
|
t.setSelectionRange(n, n);
|
|
6495
6527
|
},
|
|
6496
6528
|
onBlur(e) {
|
|
6497
6529
|
if (e.defaultPrevented || b || s) return;
|
|
6498
|
-
|
|
6499
|
-
let t = !o.current, n =
|
|
6500
|
-
if (o.current = !0,
|
|
6501
|
-
|
|
6530
|
+
ie(!0), oe(!1);
|
|
6531
|
+
let t = !o.current, n = I.current;
|
|
6532
|
+
if (o.current = !0, m.trim() === "") {
|
|
6533
|
+
E(null, S(x, e.nativeEvent)), re === "onBlur" && ue.commit(null), M(null, T(x, e.nativeEvent));
|
|
6502
6534
|
return;
|
|
6503
6535
|
}
|
|
6504
|
-
let r = c.current, i =
|
|
6536
|
+
let r = c.current, i = Im(m, k, r);
|
|
6505
6537
|
if (i === null) return;
|
|
6506
|
-
let a = r?.maximumFractionDigits != null || r?.minimumFractionDigits != null, l = r?.maximumFractionDigits, u = a && typeof l == "number" ? Number(i.toFixed(l)) : i, d =
|
|
6507
|
-
|
|
6508
|
-
let g =
|
|
6509
|
-
!(!a && i === j &&
|
|
6538
|
+
let a = r?.maximumFractionDigits != null || r?.minimumFractionDigits != null, l = r?.maximumFractionDigits, u = a && typeof l == "number" ? Number(i.toFixed(l)) : i, d = T(h, e.nativeEvent), f = j !== u, p = t || f || n;
|
|
6539
|
+
re === "onBlur" && ue.commit(u), f && (pe.current = !0, E(u, S(h, e.nativeEvent))), p && M(u, d);
|
|
6540
|
+
let g = Qp(u, k, r);
|
|
6541
|
+
!(!a && i === j && m === $p(i, k, r)) && m !== g && O(g);
|
|
6510
6542
|
},
|
|
6511
6543
|
onChange(e) {
|
|
6512
6544
|
if (e.nativeEvent.defaultPrevented) return;
|
|
6513
6545
|
o.current = !1;
|
|
6514
6546
|
let t = e.currentTarget.value;
|
|
6515
6547
|
if (t.trim() === "") {
|
|
6516
|
-
|
|
6548
|
+
O(t), E(null, S(x, e.nativeEvent));
|
|
6517
6549
|
return;
|
|
6518
6550
|
}
|
|
6519
6551
|
let n = l();
|
|
6520
6552
|
if (!Array.from(t).every((e) => {
|
|
6521
|
-
let t = e >= "0" && e <= "9", r =
|
|
6553
|
+
let t = e >= "0" && e <= "9", r = vm.test(e), i = bm.test(e), a = ym.test(e), o = xm.test(e), s = Nm.test(e);
|
|
6522
6554
|
return t || r || i || a || o || s || n.has(e);
|
|
6523
6555
|
})) return;
|
|
6524
|
-
let r =
|
|
6525
|
-
|
|
6556
|
+
let r = Im(t, k, c.current);
|
|
6557
|
+
O(t), r !== null && E(r, S(ee, e.nativeEvent));
|
|
6526
6558
|
},
|
|
6527
6559
|
onKeyDown(e) {
|
|
6528
6560
|
if (e.defaultPrevented || b || s) return;
|
|
6529
6561
|
let t = e.nativeEvent;
|
|
6530
6562
|
o.current = !0;
|
|
6531
|
-
let n = l(), r = n.has(e.key), { decimal: i, currency: a, percentSign: d } =
|
|
6532
|
-
if (
|
|
6533
|
-
let e =
|
|
6534
|
-
r = !(
|
|
6563
|
+
let n = l(), r = n.has(e.key), { decimal: i, currency: a, percentSign: d } = Fm(k, c.current), p = e.currentTarget.selectionStart, h = e.currentTarget.selectionEnd, g = p === 0 && h === m.length, y = (e) => p != null && h != null && e >= p && e < h;
|
|
6564
|
+
if (Nm.test(e.key) && Array.from(n).some((e) => Nm.test(e || ""))) {
|
|
6565
|
+
let e = m.search(jm), t = e != null && e !== -1 && y(e);
|
|
6566
|
+
r = !(Nm.test(m) || Pm.test(m)) || g || t;
|
|
6535
6567
|
}
|
|
6536
|
-
if (
|
|
6537
|
-
let e =
|
|
6538
|
-
r = !(
|
|
6568
|
+
if (Pm.test(e.key) && Array.from(n).some((e) => Pm.test(e || ""))) {
|
|
6569
|
+
let e = m.search(Mm), t = e != null && e !== -1 && y(e);
|
|
6570
|
+
r = !(Nm.test(m) || Pm.test(m)) || g || t;
|
|
6539
6571
|
}
|
|
6540
6572
|
[
|
|
6541
6573
|
i,
|
|
@@ -6543,49 +6575,49 @@ var Qm = {
|
|
|
6543
6575
|
d
|
|
6544
6576
|
].forEach((t) => {
|
|
6545
6577
|
if (e.key === t) {
|
|
6546
|
-
let e =
|
|
6547
|
-
r = !
|
|
6578
|
+
let e = y(m.indexOf(t));
|
|
6579
|
+
r = !m.includes(t) || g || e;
|
|
6548
6580
|
}
|
|
6549
6581
|
});
|
|
6550
|
-
let
|
|
6551
|
-
if (e.which === 229 || e.altKey || e.ctrlKey || e.metaKey || r ||
|
|
6552
|
-
let A =
|
|
6553
|
-
|
|
6554
|
-
let
|
|
6582
|
+
let x = e.key >= "0" && e.key <= "9", C = vm.test(e.key), w = bm.test(e.key), D = xm.test(e.key), O = sh.has(e.key);
|
|
6583
|
+
if (e.which === 229 || e.altKey || e.ctrlKey || e.metaKey || r || x || C || D || w || O) return;
|
|
6584
|
+
let A = Im(m, k, c.current), j = u(e) ?? 1;
|
|
6585
|
+
le(e);
|
|
6586
|
+
let P = T(F, t);
|
|
6555
6587
|
e.key === "ArrowUp" ? (f(j, {
|
|
6556
6588
|
direction: 1,
|
|
6557
6589
|
currentValue: A,
|
|
6558
6590
|
event: t,
|
|
6559
|
-
reason:
|
|
6560
|
-
}),
|
|
6591
|
+
reason: F
|
|
6592
|
+
}), M(N.current ?? te.current, P)) : e.key === "ArrowDown" ? (f(j, {
|
|
6561
6593
|
direction: -1,
|
|
6562
6594
|
currentValue: A,
|
|
6563
6595
|
event: t,
|
|
6564
|
-
reason:
|
|
6565
|
-
}),
|
|
6596
|
+
reason: F
|
|
6597
|
+
}), M(N.current ?? te.current, P)) : e.key === "Home" && v != null ? (E(v, S(F, t)), M(N.current ?? te.current, P)) : e.key === "End" && _ != null && (E(_, S(F, t)), M(N.current ?? te.current, P));
|
|
6566
6598
|
},
|
|
6567
6599
|
onPaste(e) {
|
|
6568
6600
|
if (e.defaultPrevented || b || s) return;
|
|
6569
6601
|
e.preventDefault();
|
|
6570
|
-
let t = (e.clipboardData || window.Clipboard).getData("text/plain"), n =
|
|
6571
|
-
n !== null && (o.current = !1,
|
|
6602
|
+
let t = (e.clipboardData || window.Clipboard).getData("text/plain"), n = Im(t, k, c.current);
|
|
6603
|
+
n !== null && (o.current = !1, E(n, S(P, e.nativeEvent)), O(t));
|
|
6572
6604
|
}
|
|
6573
6605
|
},
|
|
6574
|
-
|
|
6606
|
+
ue.getValidationProps(),
|
|
6575
6607
|
a
|
|
6576
6608
|
],
|
|
6577
|
-
stateAttributesMapping:
|
|
6609
|
+
stateAttributesMapping: oh
|
|
6578
6610
|
});
|
|
6579
6611
|
});
|
|
6580
|
-
process.env.NODE_ENV !== "production" && (
|
|
6612
|
+
process.env.NODE_ENV !== "production" && (ch.displayName = "NumberFieldInput");
|
|
6581
6613
|
//#endregion
|
|
6582
6614
|
//#region src/base/form/fields/EntityPickerField.tsx
|
|
6583
|
-
function
|
|
6615
|
+
function lh(e) {
|
|
6584
6616
|
return e.split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("");
|
|
6585
6617
|
}
|
|
6586
|
-
function
|
|
6587
|
-
let { t: h } =
|
|
6588
|
-
|
|
6618
|
+
function uh({ id: e, value: t, onChange: n, options: r, initialOption: i, autocompleteHref: a, autocompleteMinChars: o = 2, entityAvatarField: s, entitySubtitleField: c, placeholder: l, disabled: u, required: d, error: f, helpTextId: p, errorId: m }) {
|
|
6619
|
+
let { t: h } = Ee(), [g, _] = ht(i && t && i.value === t ? i.label : ""), [v, y] = ht([]), [b, x] = ht(!1), S = mt(void 0), C = !!a, w = [f ? m : void 0, p].filter(Boolean).join(" ") || void 0, T = pt(() => [], []), E = pt(() => r ?? T, [r, T]);
|
|
6620
|
+
dt(() => {
|
|
6589
6621
|
if (C) return S.current && clearTimeout(S.current), g.length < o ? (S.current = setTimeout(() => y([]), 0), () => {
|
|
6590
6622
|
S.current && clearTimeout(S.current);
|
|
6591
6623
|
}) : (S.current = setTimeout(async () => {
|
|
@@ -6617,11 +6649,11 @@ function nh({ id: e, value: t, onChange: n, options: r, initialOption: i, autoco
|
|
|
6617
6649
|
c,
|
|
6618
6650
|
s
|
|
6619
6651
|
]);
|
|
6620
|
-
let D = C ? v : E, O =
|
|
6652
|
+
let D = C ? v : E, O = pt(() => i && t && i.value === t && !D.some((e) => e.value === t) ? [i, ...D] : D, [
|
|
6621
6653
|
D,
|
|
6622
6654
|
i,
|
|
6623
6655
|
t
|
|
6624
|
-
]), k =
|
|
6656
|
+
]), k = pt(() => {
|
|
6625
6657
|
if (C || !g) return O;
|
|
6626
6658
|
let e = g.toLowerCase();
|
|
6627
6659
|
return O.filter((t) => t.label.toLowerCase().includes(e) || t.subtitle?.toLowerCase().includes(e));
|
|
@@ -6629,14 +6661,14 @@ function nh({ id: e, value: t, onChange: n, options: r, initialOption: i, autoco
|
|
|
6629
6661
|
O,
|
|
6630
6662
|
g,
|
|
6631
6663
|
C
|
|
6632
|
-
]), A =
|
|
6664
|
+
]), A = V((e) => {
|
|
6633
6665
|
n(e ?? "");
|
|
6634
|
-
}, [n]), j = b ? h("middag.ui.form.entity_loading") : g.length < o && C ? h("middag.ui.form.entity_min_chars").replace("{min}", String(o)) : h("middag.ui.form.entity_no_results"),
|
|
6635
|
-
return /* @__PURE__ */ U(
|
|
6666
|
+
}, [n]), j = b ? h("middag.ui.form.entity_loading") : g.length < o && C ? h("middag.ui.form.entity_min_chars").replace("{min}", String(o)) : h("middag.ui.form.entity_no_results"), M = !!s || O.some((e) => e.avatarUrl);
|
|
6667
|
+
return /* @__PURE__ */ U(_e, {
|
|
6636
6668
|
items: k,
|
|
6637
6669
|
value: t || null,
|
|
6638
6670
|
onValueChange: A,
|
|
6639
|
-
children: [/* @__PURE__ */ H(
|
|
6671
|
+
children: [/* @__PURE__ */ H(de, {
|
|
6640
6672
|
id: e,
|
|
6641
6673
|
placeholder: l ?? h("middag.ui.form.entity_search"),
|
|
6642
6674
|
disabled: u,
|
|
@@ -6647,20 +6679,20 @@ function nh({ id: e, value: t, onChange: n, options: r, initialOption: i, autoco
|
|
|
6647
6679
|
showTrigger: !0,
|
|
6648
6680
|
value: g,
|
|
6649
6681
|
onChange: (e) => _(e.target.value)
|
|
6650
|
-
}), /* @__PURE__ */ U(
|
|
6682
|
+
}), /* @__PURE__ */ U(pe, { children: [/* @__PURE__ */ H(ge, {
|
|
6651
6683
|
className: "px-4 py-3 text-sm",
|
|
6652
6684
|
children: j
|
|
6653
|
-
}), /* @__PURE__ */ H(
|
|
6685
|
+
}), /* @__PURE__ */ H(se, { children: k.map((e) => /* @__PURE__ */ U(ye, {
|
|
6654
6686
|
value: e.value,
|
|
6655
6687
|
className: "flex items-center gap-2.5 px-3 py-2",
|
|
6656
|
-
children: [
|
|
6688
|
+
children: [M && /* @__PURE__ */ U(Gp, {
|
|
6657
6689
|
className: "h-7 w-7 shrink-0",
|
|
6658
|
-
children: [e.avatarUrl && /* @__PURE__ */ H(
|
|
6690
|
+
children: [e.avatarUrl && /* @__PURE__ */ H(Kp, {
|
|
6659
6691
|
src: e.avatarUrl,
|
|
6660
6692
|
alt: e.label
|
|
6661
|
-
}), /* @__PURE__ */ H(
|
|
6693
|
+
}), /* @__PURE__ */ H(qp, {
|
|
6662
6694
|
className: "text-[10px]",
|
|
6663
|
-
children:
|
|
6695
|
+
children: lh(e.label)
|
|
6664
6696
|
})]
|
|
6665
6697
|
}), /* @__PURE__ */ U("div", {
|
|
6666
6698
|
className: "min-w-0 flex-1",
|
|
@@ -6677,8 +6709,8 @@ function nh({ id: e, value: t, onChange: n, options: r, initialOption: i, autoco
|
|
|
6677
6709
|
}
|
|
6678
6710
|
//#endregion
|
|
6679
6711
|
//#region src/lib/hooks/use-file-upload.ts
|
|
6680
|
-
var
|
|
6681
|
-
let { maxFiles: t = Infinity, maxSize: n = Infinity, accept: r = "*", multiple: i = !1, initialFiles: a = [], onFilesChange: o, onFilesAdded: s, onError: c } = e, [l, u] =
|
|
6712
|
+
var dh = (e = {}) => {
|
|
6713
|
+
let { maxFiles: t = Infinity, maxSize: n = Infinity, accept: r = "*", multiple: i = !1, initialFiles: a = [], onFilesChange: o, onFilesAdded: s, onError: c } = e, [l, u] = ht({
|
|
6682
6714
|
files: a.map((e) => ({
|
|
6683
6715
|
file: e,
|
|
6684
6716
|
id: e.id,
|
|
@@ -6686,10 +6718,10 @@ var rh = (e = {}) => {
|
|
|
6686
6718
|
})),
|
|
6687
6719
|
isDragging: !1,
|
|
6688
6720
|
errors: []
|
|
6689
|
-
}), d =
|
|
6721
|
+
}), d = mt(null), f = V((e) => {
|
|
6690
6722
|
if (e instanceof File) {
|
|
6691
|
-
if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${
|
|
6692
|
-
} else if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${
|
|
6723
|
+
if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${fh(n)}.`;
|
|
6724
|
+
} else if (e.size > n) return `File "${e.name}" exceeds the maximum size of ${fh(n)}.`;
|
|
6693
6725
|
if (r !== "*") {
|
|
6694
6726
|
let t = r.split(",").map((e) => e.trim()), n = e instanceof File ? e.type || "" : e.type, i = `.${e instanceof File, e.name.split(".").pop()}`;
|
|
6695
6727
|
if (!t.some((e) => {
|
|
@@ -6702,7 +6734,7 @@ var rh = (e = {}) => {
|
|
|
6702
6734
|
})) return `File "${e instanceof File, e.name}" is not an accepted file type.`;
|
|
6703
6735
|
}
|
|
6704
6736
|
return null;
|
|
6705
|
-
}, [r, n]), p =
|
|
6737
|
+
}, [r, n]), p = V((e) => e instanceof File ? URL.createObjectURL(e) : e.url, []), m = V((e) => e instanceof File ? `${e.name}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}` : e.id, []), h = V(() => {
|
|
6706
6738
|
u((e) => {
|
|
6707
6739
|
for (let t of e.files) t.preview && t.file instanceof File && t.file.type.startsWith("image/") && URL.revokeObjectURL(t.preview);
|
|
6708
6740
|
d.current && (d.current.value = "");
|
|
@@ -6713,7 +6745,7 @@ var rh = (e = {}) => {
|
|
|
6713
6745
|
};
|
|
6714
6746
|
return o?.(t.files), t;
|
|
6715
6747
|
});
|
|
6716
|
-
}, [o]), g =
|
|
6748
|
+
}, [o]), g = V((e) => {
|
|
6717
6749
|
if (!e || e.length === 0) return;
|
|
6718
6750
|
let r = Array.from(e), a = [];
|
|
6719
6751
|
if (u((e) => ({
|
|
@@ -6730,7 +6762,7 @@ var rh = (e = {}) => {
|
|
|
6730
6762
|
for (let e of r) {
|
|
6731
6763
|
if (i && l.files.some((t) => t.file.name === e.name && t.file.size === e.size)) return;
|
|
6732
6764
|
if (e.size > n) {
|
|
6733
|
-
a.push(i ? `Some files exceed the maximum size of ${
|
|
6765
|
+
a.push(i ? `Some files exceed the maximum size of ${fh(n)}.` : `File exceeds the maximum size of ${fh(n)}.`);
|
|
6734
6766
|
continue;
|
|
6735
6767
|
}
|
|
6736
6768
|
let t = f(e);
|
|
@@ -6763,7 +6795,7 @@ var rh = (e = {}) => {
|
|
|
6763
6795
|
o,
|
|
6764
6796
|
s,
|
|
6765
6797
|
c
|
|
6766
|
-
]), _ =
|
|
6798
|
+
]), _ = V((e) => {
|
|
6767
6799
|
u((t) => {
|
|
6768
6800
|
let n = t.files.find((t) => t.id === e);
|
|
6769
6801
|
n && n.preview && n.file instanceof File && n.file.type.startsWith("image/") && URL.revokeObjectURL(n.preview);
|
|
@@ -6774,24 +6806,24 @@ var rh = (e = {}) => {
|
|
|
6774
6806
|
errors: []
|
|
6775
6807
|
};
|
|
6776
6808
|
});
|
|
6777
|
-
}, [o]), v =
|
|
6809
|
+
}, [o]), v = V(() => {
|
|
6778
6810
|
u((e) => ({
|
|
6779
6811
|
...e,
|
|
6780
6812
|
errors: []
|
|
6781
6813
|
}));
|
|
6782
|
-
}, []), y =
|
|
6814
|
+
}, []), y = V((e) => {
|
|
6783
6815
|
e.preventDefault(), e.stopPropagation(), u((e) => ({
|
|
6784
6816
|
...e,
|
|
6785
6817
|
isDragging: !0
|
|
6786
6818
|
}));
|
|
6787
|
-
}, []), b =
|
|
6819
|
+
}, []), b = V((e) => {
|
|
6788
6820
|
e.preventDefault(), e.stopPropagation(), !e.currentTarget.contains(e.relatedTarget) && u((e) => ({
|
|
6789
6821
|
...e,
|
|
6790
6822
|
isDragging: !1
|
|
6791
6823
|
}));
|
|
6792
|
-
}, []), x =
|
|
6824
|
+
}, []), x = V((e) => {
|
|
6793
6825
|
e.preventDefault(), e.stopPropagation();
|
|
6794
|
-
}, []), S =
|
|
6826
|
+
}, []), S = V((e) => {
|
|
6795
6827
|
if (e.preventDefault(), e.stopPropagation(), u((e) => ({
|
|
6796
6828
|
...e,
|
|
6797
6829
|
isDragging: !1
|
|
@@ -6800,7 +6832,7 @@ var rh = (e = {}) => {
|
|
|
6800
6832
|
let t = e.dataTransfer.files[0];
|
|
6801
6833
|
g([t]);
|
|
6802
6834
|
}
|
|
6803
|
-
}, [g, i]), C =
|
|
6835
|
+
}, [g, i]), C = V((e) => {
|
|
6804
6836
|
e.target.files && e.target.files.length > 0 && g(e.target.files);
|
|
6805
6837
|
}, [g]);
|
|
6806
6838
|
return [l, {
|
|
@@ -6813,10 +6845,10 @@ var rh = (e = {}) => {
|
|
|
6813
6845
|
handleDragOver: x,
|
|
6814
6846
|
handleDrop: S,
|
|
6815
6847
|
handleFileChange: C,
|
|
6816
|
-
openFileDialog:
|
|
6848
|
+
openFileDialog: V(() => {
|
|
6817
6849
|
d.current && d.current.click();
|
|
6818
6850
|
}, []),
|
|
6819
|
-
getInputProps:
|
|
6851
|
+
getInputProps: V((e = {}) => ({
|
|
6820
6852
|
...e,
|
|
6821
6853
|
type: "file",
|
|
6822
6854
|
onChange: C,
|
|
@@ -6829,7 +6861,7 @@ var rh = (e = {}) => {
|
|
|
6829
6861
|
C
|
|
6830
6862
|
])
|
|
6831
6863
|
}];
|
|
6832
|
-
},
|
|
6864
|
+
}, fh = (e, t = 2) => {
|
|
6833
6865
|
if (e === 0) return "0 Bytes";
|
|
6834
6866
|
let n = 1024, r = t < 0 ? 0 : t, i = [
|
|
6835
6867
|
"Bytes",
|
|
@@ -6846,21 +6878,21 @@ var rh = (e = {}) => {
|
|
|
6846
6878
|
};
|
|
6847
6879
|
//#endregion
|
|
6848
6880
|
//#region src/base/form/fields/FileUploadField.tsx
|
|
6849
|
-
function
|
|
6881
|
+
function ph(e) {
|
|
6850
6882
|
let t = e.split(/[?#]/)[0], n = t.split("/");
|
|
6851
6883
|
return n[n.length - 1] || t;
|
|
6852
6884
|
}
|
|
6853
|
-
function
|
|
6885
|
+
function mh(e) {
|
|
6854
6886
|
if (e == null || e === "") return null;
|
|
6855
6887
|
if (typeof e == "string") return {
|
|
6856
|
-
name:
|
|
6888
|
+
name: ph(e),
|
|
6857
6889
|
size: 0,
|
|
6858
6890
|
type: "",
|
|
6859
6891
|
url: e,
|
|
6860
6892
|
id: e
|
|
6861
6893
|
};
|
|
6862
6894
|
if (typeof e == "object" && !(e instanceof File)) {
|
|
6863
|
-
let t = e, n = typeof t.url == "string" ? t.url : "", r = typeof t.name == "string" ? t.name : n ?
|
|
6895
|
+
let t = e, n = typeof t.url == "string" ? t.url : "", r = typeof t.name == "string" ? t.name : n ? ph(n) : "";
|
|
6864
6896
|
return !n && !r ? null : {
|
|
6865
6897
|
name: r,
|
|
6866
6898
|
size: typeof t.size == "number" ? t.size : 0,
|
|
@@ -6871,11 +6903,11 @@ function oh(e) {
|
|
|
6871
6903
|
}
|
|
6872
6904
|
return null;
|
|
6873
6905
|
}
|
|
6874
|
-
function
|
|
6875
|
-
return (Array.isArray(e) ? e : [e]).map(
|
|
6906
|
+
function hh(e) {
|
|
6907
|
+
return (Array.isArray(e) ? e : [e]).map(mh).filter((e) => e !== null);
|
|
6876
6908
|
}
|
|
6877
|
-
function
|
|
6878
|
-
let { t: p } =
|
|
6909
|
+
function gh({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, maxFiles: a = 10, maxSize: o = 10 * 1024 * 1024, disabled: s, required: c, error: l, helpTextId: u, errorId: f }) {
|
|
6910
|
+
let { t: p } = Ee(), [m] = ht(() => hh(t)), [{ files: h, isDragging: g, errors: _ }, { removeFile: v, handleDragEnter: y, handleDragLeave: b, handleDragOver: x, handleDrop: S, openFileDialog: C, getInputProps: w }] = dh({
|
|
6879
6911
|
maxFiles: i ? a : 1,
|
|
6880
6912
|
maxSize: o,
|
|
6881
6913
|
accept: r,
|
|
@@ -6887,7 +6919,7 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6887
6919
|
}
|
|
6888
6920
|
}), T = [l ? f : void 0, u].filter(Boolean).join(" ") || void 0, E = (e) => e.type.startsWith("image/");
|
|
6889
6921
|
return /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("div", {
|
|
6890
|
-
className:
|
|
6922
|
+
className: z("rounded-lg border border-dashed p-4 transition-colors", g ? "border-primary bg-primary/5" : "border-muted-foreground/25 hover:border-muted-foreground/50", s && "pointer-events-none opacity-50"),
|
|
6891
6923
|
onDragEnter: y,
|
|
6892
6924
|
onDragLeave: b,
|
|
6893
6925
|
onDragOver: x,
|
|
@@ -6903,9 +6935,9 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6903
6935
|
}), h.length === 0 ? /* @__PURE__ */ U("div", {
|
|
6904
6936
|
className: "flex flex-col items-center gap-2 py-4",
|
|
6905
6937
|
children: [
|
|
6906
|
-
/* @__PURE__ */ H(
|
|
6907
|
-
icon:
|
|
6908
|
-
className:
|
|
6938
|
+
/* @__PURE__ */ H(R, {
|
|
6939
|
+
icon: De,
|
|
6940
|
+
className: z("size-8", g ? "text-primary" : "text-muted-foreground")
|
|
6909
6941
|
}),
|
|
6910
6942
|
/* @__PURE__ */ H("p", {
|
|
6911
6943
|
className: "text-muted-foreground text-sm",
|
|
@@ -6924,7 +6956,7 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6924
6956
|
children: [
|
|
6925
6957
|
p("middag.ui.form.file_max_size"),
|
|
6926
6958
|
" ",
|
|
6927
|
-
|
|
6959
|
+
fh(o)
|
|
6928
6960
|
]
|
|
6929
6961
|
})
|
|
6930
6962
|
]
|
|
@@ -6939,8 +6971,8 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6939
6971
|
className: "size-10 shrink-0 rounded border object-cover"
|
|
6940
6972
|
}) : /* @__PURE__ */ H("div", {
|
|
6941
6973
|
className: "bg-muted flex size-10 shrink-0 items-center justify-center rounded border",
|
|
6942
|
-
children: /* @__PURE__ */ H(
|
|
6943
|
-
icon:
|
|
6974
|
+
children: /* @__PURE__ */ H(R, {
|
|
6975
|
+
icon: Me,
|
|
6944
6976
|
className: "text-muted-foreground size-5"
|
|
6945
6977
|
})
|
|
6946
6978
|
}),
|
|
@@ -6951,7 +6983,7 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6951
6983
|
children: e.file.name
|
|
6952
6984
|
}), /* @__PURE__ */ H("p", {
|
|
6953
6985
|
className: "text-muted-foreground text-xs",
|
|
6954
|
-
children:
|
|
6986
|
+
children: fh(e.file.size)
|
|
6955
6987
|
})]
|
|
6956
6988
|
}),
|
|
6957
6989
|
/* @__PURE__ */ H(d, {
|
|
@@ -6960,8 +6992,8 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6960
6992
|
size: "icon-xs",
|
|
6961
6993
|
onClick: () => v(e.id),
|
|
6962
6994
|
disabled: s,
|
|
6963
|
-
children: /* @__PURE__ */ H(
|
|
6964
|
-
icon:
|
|
6995
|
+
children: /* @__PURE__ */ H(R, {
|
|
6996
|
+
icon: Ae,
|
|
6965
6997
|
className: "size-3.5"
|
|
6966
6998
|
})
|
|
6967
6999
|
})
|
|
@@ -6985,10 +7017,10 @@ function ch({ id: e, value: t, onChange: n, accept: r = "*", multiple: i = !1, m
|
|
|
6985
7017
|
}
|
|
6986
7018
|
//#endregion
|
|
6987
7019
|
//#region src/base/form/fields/MultiSelectField.tsx
|
|
6988
|
-
var
|
|
6989
|
-
function
|
|
6990
|
-
let { t: u } =
|
|
6991
|
-
return r.length <=
|
|
7020
|
+
var _h = 8;
|
|
7021
|
+
function vh({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled: a, required: o, error: s, helpTextId: c, errorId: l }) {
|
|
7022
|
+
let { t: u } = Ee(), d = t ?? [], f = [s ? l : void 0, c].filter(Boolean).join(" ") || void 0;
|
|
7023
|
+
return r.length <= _h ? /* @__PURE__ */ H(yh, {
|
|
6992
7024
|
id: e,
|
|
6993
7025
|
options: r,
|
|
6994
7026
|
selected: d,
|
|
@@ -6998,7 +7030,7 @@ function uh({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled
|
|
|
6998
7030
|
error: s,
|
|
6999
7031
|
describedBy: f,
|
|
7000
7032
|
t: u
|
|
7001
|
-
}) : /* @__PURE__ */ H(
|
|
7033
|
+
}) : /* @__PURE__ */ H(bh, {
|
|
7002
7034
|
id: e,
|
|
7003
7035
|
options: r,
|
|
7004
7036
|
selected: d,
|
|
@@ -7011,7 +7043,7 @@ function uh({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled
|
|
|
7011
7043
|
t: u
|
|
7012
7044
|
});
|
|
7013
7045
|
}
|
|
7014
|
-
function
|
|
7046
|
+
function yh({ id: e, options: t, selected: n, onChange: r, disabled: i, required: a, error: o, describedBy: s, t: c }) {
|
|
7015
7047
|
let l = (e) => {
|
|
7016
7048
|
n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]);
|
|
7017
7049
|
};
|
|
@@ -7024,12 +7056,12 @@ function dh({ id: e, options: t, selected: n, onChange: r, disabled: i, required
|
|
|
7024
7056
|
className: "border-input max-h-48 space-y-2 overflow-y-auto rounded-md border p-3",
|
|
7025
7057
|
children: [t.map((t) => /* @__PURE__ */ U("div", {
|
|
7026
7058
|
className: "flex items-center gap-2",
|
|
7027
|
-
children: [/* @__PURE__ */ H(
|
|
7059
|
+
children: [/* @__PURE__ */ H(Rp, {
|
|
7028
7060
|
id: `${e}-${t.value}`,
|
|
7029
7061
|
checked: n.includes(t.value),
|
|
7030
7062
|
onCheckedChange: () => l(t.value),
|
|
7031
7063
|
disabled: i
|
|
7032
|
-
}), /* @__PURE__ */ H(
|
|
7064
|
+
}), /* @__PURE__ */ H(Bp, {
|
|
7033
7065
|
htmlFor: `${e}-${t.value}`,
|
|
7034
7066
|
className: "text-sm font-normal",
|
|
7035
7067
|
children: t.label
|
|
@@ -7040,20 +7072,20 @@ function dh({ id: e, options: t, selected: n, onChange: r, disabled: i, required
|
|
|
7040
7072
|
})]
|
|
7041
7073
|
});
|
|
7042
7074
|
}
|
|
7043
|
-
function
|
|
7044
|
-
let [u, d] =
|
|
7075
|
+
function bh({ id: e, options: t, selected: n, onChange: r, placeholder: i, disabled: a, required: o, error: s, describedBy: c, t: l }) {
|
|
7076
|
+
let [u, d] = ht(""), f = pt(() => {
|
|
7045
7077
|
if (!u) return t;
|
|
7046
7078
|
let e = u.toLowerCase();
|
|
7047
7079
|
return t.filter((t) => t.label.toLowerCase().includes(e));
|
|
7048
|
-
}, [t, u]), p =
|
|
7080
|
+
}, [t, u]), p = pt(() => {
|
|
7049
7081
|
let e = new Map(t.map((e) => [e.value, e.label]));
|
|
7050
7082
|
return n.map((t) => ({
|
|
7051
7083
|
value: t,
|
|
7052
7084
|
label: e.get(t) ?? t
|
|
7053
7085
|
}));
|
|
7054
|
-
}, [n, t]), m =
|
|
7086
|
+
}, [n, t]), m = V((e) => {
|
|
7055
7087
|
r(n.filter((t) => t !== e));
|
|
7056
|
-
}, [n, r]), h =
|
|
7088
|
+
}, [n, r]), h = V((e) => {
|
|
7057
7089
|
e && (n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]));
|
|
7058
7090
|
}, [n, r]);
|
|
7059
7091
|
return /* @__PURE__ */ U("div", {
|
|
@@ -7064,7 +7096,7 @@ function fh({ id: e, options: t, selected: n, onChange: r, placeholder: i, disab
|
|
|
7064
7096
|
className: "space-y-2",
|
|
7065
7097
|
children: [p.length > 0 && /* @__PURE__ */ H("div", {
|
|
7066
7098
|
className: "flex flex-wrap gap-1.5",
|
|
7067
|
-
children: p.map((e) => /* @__PURE__ */ U(
|
|
7099
|
+
children: p.map((e) => /* @__PURE__ */ U(yp, {
|
|
7068
7100
|
variant: "secondary",
|
|
7069
7101
|
className: "gap-1 pr-1",
|
|
7070
7102
|
children: [e.label, /* @__PURE__ */ H("button", {
|
|
@@ -7092,23 +7124,23 @@ function fh({ id: e, options: t, selected: n, onChange: r, placeholder: i, disab
|
|
|
7092
7124
|
})
|
|
7093
7125
|
})]
|
|
7094
7126
|
}, e.value))
|
|
7095
|
-
}), /* @__PURE__ */ U(
|
|
7127
|
+
}), /* @__PURE__ */ U(_e, {
|
|
7096
7128
|
items: f,
|
|
7097
7129
|
value: null,
|
|
7098
7130
|
onValueChange: h,
|
|
7099
|
-
children: [/* @__PURE__ */ H(
|
|
7131
|
+
children: [/* @__PURE__ */ H(de, {
|
|
7100
7132
|
placeholder: i ?? l("middag.ui.form.multiselect_search"),
|
|
7101
7133
|
disabled: a,
|
|
7102
7134
|
showTrigger: !0,
|
|
7103
7135
|
value: u,
|
|
7104
7136
|
onChange: (e) => d(e.target.value)
|
|
7105
|
-
}), /* @__PURE__ */ U(
|
|
7137
|
+
}), /* @__PURE__ */ U(pe, { children: [/* @__PURE__ */ H(ge, {
|
|
7106
7138
|
className: "px-4 py-3 text-sm",
|
|
7107
7139
|
children: l("middag.ui.form.entity_no_results")
|
|
7108
|
-
}), /* @__PURE__ */ H(
|
|
7140
|
+
}), /* @__PURE__ */ H(se, { children: f.map((e) => /* @__PURE__ */ U(ye, {
|
|
7109
7141
|
value: e.value,
|
|
7110
7142
|
className: "flex items-center gap-2",
|
|
7111
|
-
children: [/* @__PURE__ */ H(
|
|
7143
|
+
children: [/* @__PURE__ */ H(Rp, {
|
|
7112
7144
|
checked: n.includes(e.value),
|
|
7113
7145
|
tabIndex: -1,
|
|
7114
7146
|
className: "pointer-events-none"
|
|
@@ -7122,14 +7154,14 @@ function fh({ id: e, options: t, selected: n, onChange: r, placeholder: i, disab
|
|
|
7122
7154
|
}
|
|
7123
7155
|
//#endregion
|
|
7124
7156
|
//#region src/components/reui/native-select.tsx
|
|
7125
|
-
function
|
|
7157
|
+
function xh({ className: e, size: t = "default", ...n }) {
|
|
7126
7158
|
return /* @__PURE__ */ U("div", {
|
|
7127
7159
|
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
7128
7160
|
"data-slot": "native-select-wrapper",
|
|
7129
7161
|
children: [/* @__PURE__ */ H("select", {
|
|
7130
7162
|
"data-slot": "native-select",
|
|
7131
7163
|
"data-size": t,
|
|
7132
|
-
className:
|
|
7164
|
+
className: z("h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
|
|
7133
7165
|
...n
|
|
7134
7166
|
}), /* @__PURE__ */ H(r, {
|
|
7135
7167
|
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none",
|
|
@@ -7138,20 +7170,20 @@ function ph({ className: e, size: t = "default", ...n }) {
|
|
|
7138
7170
|
})]
|
|
7139
7171
|
});
|
|
7140
7172
|
}
|
|
7141
|
-
function
|
|
7173
|
+
function Sh({ className: e, ...t }) {
|
|
7142
7174
|
return /* @__PURE__ */ H("option", {
|
|
7143
7175
|
"data-slot": "native-select-option",
|
|
7144
|
-
className:
|
|
7176
|
+
className: z("bg-[Canvas] text-[CanvasText]", e),
|
|
7145
7177
|
...t
|
|
7146
7178
|
});
|
|
7147
7179
|
}
|
|
7148
7180
|
//#endregion
|
|
7149
7181
|
//#region src/base/form/fields/NativeSelectField.tsx
|
|
7150
|
-
function
|
|
7151
|
-
let { t: u } =
|
|
7182
|
+
function Ch({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled: a, required: o, error: s, helpTextId: c, errorId: l }) {
|
|
7183
|
+
let { t: u } = Ee(), d = [s ? l : void 0, c].filter(Boolean).join(" ") || void 0;
|
|
7152
7184
|
return /* @__PURE__ */ H("div", {
|
|
7153
7185
|
className: "w-full [&>div]:w-full",
|
|
7154
|
-
children: /* @__PURE__ */ U(
|
|
7186
|
+
children: /* @__PURE__ */ U(xh, {
|
|
7155
7187
|
id: e,
|
|
7156
7188
|
value: t ?? "",
|
|
7157
7189
|
onChange: (e) => n(e.target.value),
|
|
@@ -7160,11 +7192,11 @@ function hh({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled
|
|
|
7160
7192
|
"aria-required": o || void 0,
|
|
7161
7193
|
"aria-invalid": s ? !0 : void 0,
|
|
7162
7194
|
"aria-describedby": d,
|
|
7163
|
-
children: [/* @__PURE__ */ H(
|
|
7195
|
+
children: [/* @__PURE__ */ H(Sh, {
|
|
7164
7196
|
value: "",
|
|
7165
7197
|
disabled: o,
|
|
7166
7198
|
children: i ?? u("middag.ui.form.select_placeholder")
|
|
7167
|
-
}), r.map((e) => /* @__PURE__ */ H(
|
|
7199
|
+
}), r.map((e) => /* @__PURE__ */ H(Sh, {
|
|
7168
7200
|
value: e.value,
|
|
7169
7201
|
children: e.label
|
|
7170
7202
|
}, e.value))]
|
|
@@ -7173,21 +7205,21 @@ function hh({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled
|
|
|
7173
7205
|
}
|
|
7174
7206
|
//#endregion
|
|
7175
7207
|
//#region src/components/reui/number-field.tsx
|
|
7176
|
-
var
|
|
7208
|
+
var wh = ct(null), Th = o("relative flex w-full justify-between border border-input data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive focus-within:has-aria-invalid:border-destructive focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 rounded-4xl bg-input/30 transition-colors focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]", {
|
|
7177
7209
|
variants: { size: {
|
|
7178
7210
|
sm: "h-8 text-sm",
|
|
7179
7211
|
default: "h-9 text-sm",
|
|
7180
7212
|
lg: "h-10 text-sm"
|
|
7181
7213
|
} },
|
|
7182
7214
|
defaultVariants: { size: "default" }
|
|
7183
|
-
}),
|
|
7215
|
+
}), Eh = o("relative flex shrink-0 cursor-pointer items-center justify-center transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent", {
|
|
7184
7216
|
variants: { size: {
|
|
7185
7217
|
sm: "px-2 [&_svg:not([class*='size-'])]:size-3.5",
|
|
7186
7218
|
default: "px-2.5 [&_svg:not([class*='size-'])]:size-4",
|
|
7187
7219
|
lg: "px-3 [&_svg:not([class*='size-'])]:size-4"
|
|
7188
7220
|
} },
|
|
7189
7221
|
defaultVariants: { size: "default" }
|
|
7190
|
-
}),
|
|
7222
|
+
}), Dh = o("w-full min-w-0 flex-1 bg-transparent text-center tabular-nums outline-none", {
|
|
7191
7223
|
variants: { size: {
|
|
7192
7224
|
sm: "px-2.5 py-1",
|
|
7193
7225
|
default: "px-3 py-1.5",
|
|
@@ -7195,15 +7227,15 @@ var gh = lt(null), _h = o("relative flex w-full justify-between border border-in
|
|
|
7195
7227
|
} },
|
|
7196
7228
|
defaultVariants: { size: "default" }
|
|
7197
7229
|
});
|
|
7198
|
-
function
|
|
7199
|
-
let i =
|
|
7200
|
-
return /* @__PURE__ */ H(
|
|
7230
|
+
function Oh({ id: e, className: t, size: n = "default", ...r }) {
|
|
7231
|
+
let i = ft(), a = e ?? i, o = n ?? "default";
|
|
7232
|
+
return /* @__PURE__ */ H(wh.Provider, {
|
|
7201
7233
|
value: {
|
|
7202
7234
|
fieldId: a,
|
|
7203
7235
|
size: o
|
|
7204
7236
|
},
|
|
7205
|
-
children: /* @__PURE__ */ H(
|
|
7206
|
-
className:
|
|
7237
|
+
children: /* @__PURE__ */ H(Um, {
|
|
7238
|
+
className: z("flex w-full flex-col items-start gap-2", t),
|
|
7207
7239
|
"data-size": o,
|
|
7208
7240
|
"data-slot": "number-field",
|
|
7209
7241
|
id: a,
|
|
@@ -7211,55 +7243,55 @@ function bh({ id: e, className: t, size: n = "default", ...r }) {
|
|
|
7211
7243
|
})
|
|
7212
7244
|
});
|
|
7213
7245
|
}
|
|
7214
|
-
function
|
|
7215
|
-
let r =
|
|
7246
|
+
function kh({ className: e, size: t, ...n }) {
|
|
7247
|
+
let r = ut(wh);
|
|
7216
7248
|
if (!r) throw Error("NumberFieldGroup must be used within a NumberField component.");
|
|
7217
|
-
return /* @__PURE__ */ H(
|
|
7218
|
-
className:
|
|
7249
|
+
return /* @__PURE__ */ H(Gm, {
|
|
7250
|
+
className: z(Th({ size: t ?? r.size }), e),
|
|
7219
7251
|
"data-slot": "number-field-group",
|
|
7220
7252
|
...n
|
|
7221
7253
|
});
|
|
7222
7254
|
}
|
|
7223
|
-
function
|
|
7224
|
-
let i =
|
|
7255
|
+
function Ah({ className: e, size: t, children: n, ...r }) {
|
|
7256
|
+
let i = ut(wh);
|
|
7225
7257
|
if (!i) throw Error("NumberFieldDecrement must be used within a NumberField component.");
|
|
7226
|
-
return /* @__PURE__ */ H(
|
|
7227
|
-
className:
|
|
7258
|
+
return /* @__PURE__ */ H(ah, {
|
|
7259
|
+
className: z(Eh({ size: t ?? i.size }), "rounded-s-4xl border-e-0", e),
|
|
7228
7260
|
"data-slot": "number-field-decrement",
|
|
7229
7261
|
...r,
|
|
7230
|
-
children: n ?? /* @__PURE__ */ H(
|
|
7231
|
-
icon:
|
|
7262
|
+
children: n ?? /* @__PURE__ */ H(R, {
|
|
7263
|
+
icon: Fe,
|
|
7232
7264
|
strokeWidth: 2
|
|
7233
7265
|
})
|
|
7234
7266
|
});
|
|
7235
7267
|
}
|
|
7236
|
-
function
|
|
7237
|
-
let i =
|
|
7268
|
+
function jh({ className: e, size: t, children: n, ...r }) {
|
|
7269
|
+
let i = ut(wh);
|
|
7238
7270
|
if (!i) throw Error("NumberFieldIncrement must be used within a NumberField component.");
|
|
7239
|
-
return /* @__PURE__ */ H(
|
|
7240
|
-
className:
|
|
7271
|
+
return /* @__PURE__ */ H(ih, {
|
|
7272
|
+
className: z(Eh({ size: t ?? i.size }), "rounded-e-4xl border-s-0", e),
|
|
7241
7273
|
"data-slot": "number-field-increment",
|
|
7242
7274
|
...r,
|
|
7243
|
-
children: n ?? /* @__PURE__ */ H(
|
|
7244
|
-
icon:
|
|
7275
|
+
children: n ?? /* @__PURE__ */ H(R, {
|
|
7276
|
+
icon: Oe,
|
|
7245
7277
|
strokeWidth: 2
|
|
7246
7278
|
})
|
|
7247
7279
|
});
|
|
7248
7280
|
}
|
|
7249
|
-
function
|
|
7250
|
-
let r =
|
|
7281
|
+
function Mh({ className: e, size: t, ...n }) {
|
|
7282
|
+
let r = ut(wh);
|
|
7251
7283
|
if (!r) throw Error("NumberFieldInput must be used within a NumberField component.");
|
|
7252
|
-
return /* @__PURE__ */ H(
|
|
7253
|
-
className:
|
|
7284
|
+
return /* @__PURE__ */ H(ch, {
|
|
7285
|
+
className: z(Dh({ size: t ?? r.size }), e),
|
|
7254
7286
|
"data-slot": "number-field-input",
|
|
7255
7287
|
...n
|
|
7256
7288
|
});
|
|
7257
7289
|
}
|
|
7258
7290
|
//#endregion
|
|
7259
7291
|
//#region src/base/form/fields/NumberField.tsx
|
|
7260
|
-
function
|
|
7292
|
+
function Nh({ id: e, value: t, onChange: n, min: r, max: i, step: a = 1, disabled: o, required: s, error: c, helpTextId: l, errorId: u }) {
|
|
7261
7293
|
let d = [c ? u : void 0, l].filter(Boolean).join(" ") || void 0;
|
|
7262
|
-
return /* @__PURE__ */ H(
|
|
7294
|
+
return /* @__PURE__ */ H(Oh, {
|
|
7263
7295
|
id: e,
|
|
7264
7296
|
value: t ?? void 0,
|
|
7265
7297
|
onValueChange: (e) => n(e ?? null),
|
|
@@ -7270,77 +7302,77 @@ function Th({ id: e, value: t, onChange: n, min: r, max: i, step: a = 1, disable
|
|
|
7270
7302
|
"aria-invalid": c ? !0 : void 0,
|
|
7271
7303
|
"aria-required": s || void 0,
|
|
7272
7304
|
"aria-describedby": d,
|
|
7273
|
-
children: /* @__PURE__ */ U(
|
|
7274
|
-
/* @__PURE__ */ H(
|
|
7275
|
-
/* @__PURE__ */ H(
|
|
7276
|
-
/* @__PURE__ */ H(
|
|
7305
|
+
children: /* @__PURE__ */ U(kh, { children: [
|
|
7306
|
+
/* @__PURE__ */ H(Ah, {}),
|
|
7307
|
+
/* @__PURE__ */ H(Mh, {}),
|
|
7308
|
+
/* @__PURE__ */ H(jh, {})
|
|
7277
7309
|
] })
|
|
7278
7310
|
});
|
|
7279
7311
|
}
|
|
7280
7312
|
//#endregion
|
|
7281
7313
|
//#region node_modules/input-otp/dist/index.mjs
|
|
7282
|
-
var
|
|
7314
|
+
var Ph = Object.defineProperty, Fh = Object.defineProperties, Ih = Object.getOwnPropertyDescriptors, Lh = Object.getOwnPropertySymbols, Rh = Object.prototype.hasOwnProperty, zh = Object.prototype.propertyIsEnumerable, Bh = (e, t, n) => t in e ? Ph(e, t, {
|
|
7283
7315
|
enumerable: !0,
|
|
7284
7316
|
configurable: !0,
|
|
7285
7317
|
writable: !0,
|
|
7286
7318
|
value: n
|
|
7287
|
-
}) : e[t] = n,
|
|
7288
|
-
for (var n in t ||= {})
|
|
7289
|
-
if (
|
|
7319
|
+
}) : e[t] = n, Vh = (e, t) => {
|
|
7320
|
+
for (var n in t ||= {}) Rh.call(t, n) && Bh(e, n, t[n]);
|
|
7321
|
+
if (Lh) for (var n of Lh(t)) zh.call(t, n) && Bh(e, n, t[n]);
|
|
7290
7322
|
return e;
|
|
7291
|
-
},
|
|
7323
|
+
}, Hh = (e, t) => Fh(e, Ih(t)), Uh = (e, t) => {
|
|
7292
7324
|
var n = {};
|
|
7293
|
-
for (var r in e)
|
|
7294
|
-
if (e != null &&
|
|
7325
|
+
for (var r in e) Rh.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
7326
|
+
if (e != null && Lh) for (var r of Lh(e)) t.indexOf(r) < 0 && zh.call(e, r) && (n[r] = e[r]);
|
|
7295
7327
|
return n;
|
|
7296
7328
|
};
|
|
7297
|
-
function
|
|
7329
|
+
function Wh(e) {
|
|
7298
7330
|
return [
|
|
7299
7331
|
setTimeout(e, 0),
|
|
7300
7332
|
setTimeout(e, 10),
|
|
7301
7333
|
setTimeout(e, 50)
|
|
7302
7334
|
];
|
|
7303
7335
|
}
|
|
7304
|
-
function
|
|
7305
|
-
let t =
|
|
7306
|
-
return
|
|
7336
|
+
function Gh(e) {
|
|
7337
|
+
let t = B.useRef();
|
|
7338
|
+
return B.useEffect(() => {
|
|
7307
7339
|
t.current = e;
|
|
7308
7340
|
}), t.current;
|
|
7309
7341
|
}
|
|
7310
|
-
var
|
|
7342
|
+
var Kh = 18, qh = 40, Jh = `${qh}px`, Yh = [
|
|
7311
7343
|
"[data-lastpass-icon-root]",
|
|
7312
7344
|
"com-1password-button",
|
|
7313
7345
|
"[data-dashlanecreated]",
|
|
7314
7346
|
"[style$=\"2147483647 !important;\"]"
|
|
7315
7347
|
].join(",");
|
|
7316
|
-
function
|
|
7317
|
-
let [i, a] =
|
|
7348
|
+
function Xh({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFocused: r }) {
|
|
7349
|
+
let [i, a] = B.useState(!1), [o, s] = B.useState(!1), [c, l] = B.useState(!1), u = B.useMemo(() => n === "none" ? !1 : (n === "increase-width" || n === "experimental-no-flickering") && i && o, [
|
|
7318
7350
|
i,
|
|
7319
7351
|
o,
|
|
7320
7352
|
n
|
|
7321
|
-
]), d =
|
|
7353
|
+
]), d = B.useCallback(() => {
|
|
7322
7354
|
let r = e.current, i = t.current;
|
|
7323
7355
|
if (!r || !i || c || n === "none") return;
|
|
7324
|
-
let o = r, s = o.getBoundingClientRect().left + o.offsetWidth, u = o.getBoundingClientRect().top + o.offsetHeight / 2, d = s -
|
|
7325
|
-
document.querySelectorAll(
|
|
7356
|
+
let o = r, s = o.getBoundingClientRect().left + o.offsetWidth, u = o.getBoundingClientRect().top + o.offsetHeight / 2, d = s - Kh, f = u;
|
|
7357
|
+
document.querySelectorAll(Yh).length === 0 && document.elementFromPoint(d, f) === r || (a(!0), l(!0));
|
|
7326
7358
|
}, [
|
|
7327
7359
|
e,
|
|
7328
7360
|
t,
|
|
7329
7361
|
c,
|
|
7330
7362
|
n
|
|
7331
7363
|
]);
|
|
7332
|
-
return
|
|
7364
|
+
return B.useEffect(() => {
|
|
7333
7365
|
let t = e.current;
|
|
7334
7366
|
if (!t || n === "none") return;
|
|
7335
7367
|
function r() {
|
|
7336
|
-
s(window.innerWidth - t.getBoundingClientRect().right >=
|
|
7368
|
+
s(window.innerWidth - t.getBoundingClientRect().right >= qh);
|
|
7337
7369
|
}
|
|
7338
7370
|
r();
|
|
7339
7371
|
let i = setInterval(r, 1e3);
|
|
7340
7372
|
return () => {
|
|
7341
7373
|
clearInterval(i);
|
|
7342
7374
|
};
|
|
7343
|
-
}, [e, n]),
|
|
7375
|
+
}, [e, n]), B.useEffect(() => {
|
|
7344
7376
|
let e = r || document.activeElement === t.current;
|
|
7345
7377
|
if (n === "none" || !e) return;
|
|
7346
7378
|
let i = setTimeout(d, 0), a = setTimeout(d, 2e3), o = setTimeout(d, 5e3), s = setTimeout(() => {
|
|
@@ -7357,11 +7389,11 @@ function Hh({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
|
|
|
7357
7389
|
]), {
|
|
7358
7390
|
hasPWMBadge: i,
|
|
7359
7391
|
willPushPWMBadge: u,
|
|
7360
|
-
PWM_BADGE_SPACE_WIDTH:
|
|
7392
|
+
PWM_BADGE_SPACE_WIDTH: Jh
|
|
7361
7393
|
};
|
|
7362
7394
|
}
|
|
7363
|
-
var
|
|
7364
|
-
var n = e, { value: r, onChange: i, maxLength: a, textAlign: o = "left", pattern: s, placeholder: c, inputMode: l = "numeric", onComplete: u, pushPasswordManagerStrategy: d = "increase-width", pasteTransformer: f, containerClassName: p, noScriptCSSFallback: m =
|
|
7395
|
+
var Zh = B.createContext({}), Qh = B.forwardRef((e, t) => {
|
|
7396
|
+
var n = e, { value: r, onChange: i, maxLength: a, textAlign: o = "left", pattern: s, placeholder: c, inputMode: l = "numeric", onComplete: u, pushPasswordManagerStrategy: d = "increase-width", pasteTransformer: f, containerClassName: p, noScriptCSSFallback: m = eg, render: h, children: g } = n, _ = Uh(n, [
|
|
7365
7397
|
"value",
|
|
7366
7398
|
"onChange",
|
|
7367
7399
|
"maxLength",
|
|
@@ -7377,18 +7409,18 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7377
7409
|
"render",
|
|
7378
7410
|
"children"
|
|
7379
7411
|
]), v;
|
|
7380
|
-
let [y, b] =
|
|
7412
|
+
let [y, b] = B.useState(typeof _.defaultValue == "string" ? _.defaultValue : ""), x = r ?? y, S = Gh(x), C = B.useCallback((e) => {
|
|
7381
7413
|
i?.(e), b(e);
|
|
7382
|
-
}, [i]), w =
|
|
7414
|
+
}, [i]), w = B.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), T = B.useRef(null), E = B.useRef(null), D = B.useRef({
|
|
7383
7415
|
value: x,
|
|
7384
7416
|
onChange: C,
|
|
7385
7417
|
isIOS: typeof window < "u" && ((v = window == null ? void 0 : window.CSS)?.supports)?.call(v, "-webkit-touch-callout", "none")
|
|
7386
|
-
}), O =
|
|
7418
|
+
}), O = B.useRef({ prev: [
|
|
7387
7419
|
T.current?.selectionStart,
|
|
7388
7420
|
T.current?.selectionEnd,
|
|
7389
7421
|
T.current?.selectionDirection
|
|
7390
7422
|
] });
|
|
7391
|
-
|
|
7423
|
+
B.useImperativeHandle(t, () => T.current, []), B.useEffect(() => {
|
|
7392
7424
|
let e = T.current, t = E.current;
|
|
7393
7425
|
if (!e || !t) return;
|
|
7394
7426
|
D.current.value !== e.value && D.current.onChange(e.value), O.current.prev = [
|
|
@@ -7398,7 +7430,7 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7398
7430
|
];
|
|
7399
7431
|
function n() {
|
|
7400
7432
|
if (document.activeElement !== e) {
|
|
7401
|
-
|
|
7433
|
+
P(null), F(null);
|
|
7402
7434
|
return;
|
|
7403
7435
|
}
|
|
7404
7436
|
let t = e.selectionStart, n = e.selectionEnd, r = e.selectionDirection, i = e.maxLength, a = e.value, o = O.current.prev, s = -1, c = -1, l;
|
|
@@ -7421,17 +7453,17 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7421
7453
|
s !== -1 && c !== -1 && s !== c && T.current.setSelectionRange(s, c, l);
|
|
7422
7454
|
}
|
|
7423
7455
|
let u = s === -1 ? t : s, d = c === -1 ? n : c, f = l ?? r;
|
|
7424
|
-
|
|
7456
|
+
P(u), F(d), O.current.prev = [
|
|
7425
7457
|
u,
|
|
7426
7458
|
d,
|
|
7427
7459
|
f
|
|
7428
7460
|
];
|
|
7429
7461
|
}
|
|
7430
|
-
if (document.addEventListener("selectionchange", n, { capture: !0 }), n(), document.activeElement === e &&
|
|
7462
|
+
if (document.addEventListener("selectionchange", n, { capture: !0 }), n(), document.activeElement === e && M(!0), !document.getElementById("input-otp-style")) {
|
|
7431
7463
|
let e = document.createElement("style");
|
|
7432
7464
|
if (e.id = "input-otp-style", document.head.appendChild(e), e.sheet) {
|
|
7433
7465
|
let t = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
7434
|
-
|
|
7466
|
+
$h(e.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), $h(e.sheet, `[data-input-otp]:autofill { ${t} }`), $h(e.sheet, `[data-input-otp]:-webkit-autofill { ${t} }`), $h(e.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), $h(e.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
|
|
7435
7467
|
}
|
|
7436
7468
|
}
|
|
7437
7469
|
let r = () => {
|
|
@@ -7443,19 +7475,19 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7443
7475
|
document.removeEventListener("selectionchange", n, { capture: !0 }), i.disconnect();
|
|
7444
7476
|
};
|
|
7445
7477
|
}, []);
|
|
7446
|
-
let [k, A] =
|
|
7447
|
-
|
|
7448
|
-
|
|
7478
|
+
let [k, A] = B.useState(!1), [j, M] = B.useState(!1), [N, P] = B.useState(null), [ee, F] = B.useState(null);
|
|
7479
|
+
B.useEffect(() => {
|
|
7480
|
+
Wh(() => {
|
|
7449
7481
|
var e;
|
|
7450
7482
|
(e = T.current) == null || e.dispatchEvent(new Event("input"));
|
|
7451
7483
|
let t = T.current?.selectionStart, n = T.current?.selectionEnd, r = T.current?.selectionDirection;
|
|
7452
|
-
t !== null && n !== null && (
|
|
7484
|
+
t !== null && n !== null && (P(t), F(n), O.current.prev = [
|
|
7453
7485
|
t,
|
|
7454
7486
|
n,
|
|
7455
7487
|
r
|
|
7456
7488
|
]);
|
|
7457
7489
|
});
|
|
7458
|
-
}, [x, j]),
|
|
7490
|
+
}, [x, j]), B.useEffect(() => {
|
|
7459
7491
|
S !== void 0 && x !== S && S.length < a && x.length === a && u?.(x);
|
|
7460
7492
|
}, [
|
|
7461
7493
|
a,
|
|
@@ -7463,12 +7495,12 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7463
7495
|
S,
|
|
7464
7496
|
x
|
|
7465
7497
|
]);
|
|
7466
|
-
let
|
|
7498
|
+
let I = Xh({
|
|
7467
7499
|
containerRef: E,
|
|
7468
7500
|
inputRef: T,
|
|
7469
7501
|
pushPasswordManagerStrategy: d,
|
|
7470
7502
|
isFocused: j
|
|
7471
|
-
}),
|
|
7503
|
+
}), te = B.useCallback((e) => {
|
|
7472
7504
|
let t = e.currentTarget.value.slice(0, a);
|
|
7473
7505
|
if (t.length > 0 && w && !w.test(t)) {
|
|
7474
7506
|
e.preventDefault();
|
|
@@ -7480,14 +7512,14 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7480
7512
|
C,
|
|
7481
7513
|
S,
|
|
7482
7514
|
w
|
|
7483
|
-
]),
|
|
7515
|
+
]), ne = B.useCallback(() => {
|
|
7484
7516
|
var e;
|
|
7485
7517
|
if (T.current) {
|
|
7486
7518
|
let t = Math.min(T.current.value.length, a - 1), n = T.current.value.length;
|
|
7487
|
-
(e = T.current) == null || e.setSelectionRange(t, n),
|
|
7519
|
+
(e = T.current) == null || e.setSelectionRange(t, n), P(t), F(n);
|
|
7488
7520
|
}
|
|
7489
|
-
|
|
7490
|
-
}, [a]),
|
|
7521
|
+
M(!0);
|
|
7522
|
+
}, [a]), re = B.useCallback((e) => {
|
|
7491
7523
|
let t = T.current;
|
|
7492
7524
|
if (!f && (!D.current.isIOS || !e.clipboardData || !t)) return;
|
|
7493
7525
|
let n = e.clipboardData.getData("text/plain"), r = f ? f(n) : n;
|
|
@@ -7496,23 +7528,23 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7496
7528
|
if (s.length > 0 && w && !w.test(s)) return;
|
|
7497
7529
|
t.value = s, C(s);
|
|
7498
7530
|
let c = Math.min(s.length, a - 1), l = s.length;
|
|
7499
|
-
t.setSelectionRange(c, l),
|
|
7531
|
+
t.setSelectionRange(c, l), P(c), F(l);
|
|
7500
7532
|
}, [
|
|
7501
7533
|
a,
|
|
7502
7534
|
C,
|
|
7503
7535
|
w,
|
|
7504
7536
|
x
|
|
7505
|
-
]),
|
|
7537
|
+
]), ie = B.useMemo(() => ({
|
|
7506
7538
|
position: "relative",
|
|
7507
7539
|
cursor: _.disabled ? "default" : "text",
|
|
7508
7540
|
userSelect: "none",
|
|
7509
7541
|
WebkitUserSelect: "none",
|
|
7510
7542
|
pointerEvents: "none"
|
|
7511
|
-
}), [_.disabled]),
|
|
7543
|
+
}), [_.disabled]), ae = B.useMemo(() => ({
|
|
7512
7544
|
position: "absolute",
|
|
7513
7545
|
inset: 0,
|
|
7514
|
-
width:
|
|
7515
|
-
clipPath:
|
|
7546
|
+
width: I.willPushPWMBadge ? `calc(100% + ${I.PWM_BADGE_SPACE_WIDTH})` : "100%",
|
|
7547
|
+
clipPath: I.willPushPWMBadge ? `inset(0 ${I.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0,
|
|
7516
7548
|
height: "100%",
|
|
7517
7549
|
display: "flex",
|
|
7518
7550
|
textAlign: o,
|
|
@@ -7530,26 +7562,26 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7530
7562
|
fontFamily: "monospace",
|
|
7531
7563
|
fontVariantNumeric: "tabular-nums"
|
|
7532
7564
|
}), [
|
|
7533
|
-
|
|
7534
|
-
|
|
7565
|
+
I.PWM_BADGE_SPACE_WIDTH,
|
|
7566
|
+
I.willPushPWMBadge,
|
|
7535
7567
|
o
|
|
7536
|
-
]),
|
|
7568
|
+
]), oe = B.useMemo(() => B.createElement("input", Hh(Vh({ autoComplete: _.autoComplete || "one-time-code" }, _), {
|
|
7537
7569
|
"data-input-otp": !0,
|
|
7538
7570
|
"data-input-otp-placeholder-shown": x.length === 0 || void 0,
|
|
7539
|
-
"data-input-otp-mss":
|
|
7540
|
-
"data-input-otp-mse":
|
|
7571
|
+
"data-input-otp-mss": N,
|
|
7572
|
+
"data-input-otp-mse": ee,
|
|
7541
7573
|
inputMode: l,
|
|
7542
7574
|
pattern: w?.source,
|
|
7543
7575
|
"aria-placeholder": c,
|
|
7544
|
-
style:
|
|
7576
|
+
style: ae,
|
|
7545
7577
|
maxLength: a,
|
|
7546
7578
|
value: x,
|
|
7547
7579
|
ref: T,
|
|
7548
7580
|
onPaste: (e) => {
|
|
7549
7581
|
var t;
|
|
7550
|
-
|
|
7582
|
+
re(e), (t = _.onPaste) == null || t.call(_, e);
|
|
7551
7583
|
},
|
|
7552
|
-
onChange:
|
|
7584
|
+
onChange: te,
|
|
7553
7585
|
onMouseOver: (e) => {
|
|
7554
7586
|
var t;
|
|
7555
7587
|
A(!0), (t = _.onMouseOver) == null || t.call(_, e);
|
|
@@ -7560,27 +7592,27 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7560
7592
|
},
|
|
7561
7593
|
onFocus: (e) => {
|
|
7562
7594
|
var t;
|
|
7563
|
-
|
|
7595
|
+
ne(), (t = _.onFocus) == null || t.call(_, e);
|
|
7564
7596
|
},
|
|
7565
7597
|
onBlur: (e) => {
|
|
7566
7598
|
var t;
|
|
7567
|
-
|
|
7599
|
+
M(!1), (t = _.onBlur) == null || t.call(_, e);
|
|
7568
7600
|
}
|
|
7569
7601
|
})), [
|
|
7602
|
+
te,
|
|
7570
7603
|
ne,
|
|
7571
7604
|
re,
|
|
7572
|
-
ie,
|
|
7573
7605
|
l,
|
|
7574
|
-
|
|
7606
|
+
ae,
|
|
7575
7607
|
a,
|
|
7576
|
-
|
|
7577
|
-
|
|
7608
|
+
ee,
|
|
7609
|
+
N,
|
|
7578
7610
|
_,
|
|
7579
7611
|
w?.source,
|
|
7580
7612
|
x
|
|
7581
|
-
]),
|
|
7613
|
+
]), se = B.useMemo(() => ({
|
|
7582
7614
|
slots: Array.from({ length: a }).map((e, t) => {
|
|
7583
|
-
let n = j &&
|
|
7615
|
+
let n = j && N !== null && ee !== null && (N === ee && t === N || t >= N && t < ee), r = x[t] === void 0 ? null : x[t];
|
|
7584
7616
|
return {
|
|
7585
7617
|
char: r,
|
|
7586
7618
|
placeholderChar: x[0] === void 0 ? c?.[t] ?? null : null,
|
|
@@ -7594,58 +7626,58 @@ var Uh = z.createContext({}), Wh = z.forwardRef((e, t) => {
|
|
|
7594
7626
|
j,
|
|
7595
7627
|
k,
|
|
7596
7628
|
a,
|
|
7597
|
-
|
|
7598
|
-
|
|
7629
|
+
ee,
|
|
7630
|
+
N,
|
|
7599
7631
|
_.disabled,
|
|
7600
7632
|
x
|
|
7601
|
-
]),
|
|
7633
|
+
]), ce = B.useMemo(() => h ? h(se) : B.createElement(Zh.Provider, { value: se }, g), [
|
|
7602
7634
|
g,
|
|
7603
|
-
|
|
7635
|
+
se,
|
|
7604
7636
|
h
|
|
7605
7637
|
]);
|
|
7606
|
-
return
|
|
7638
|
+
return B.createElement(B.Fragment, null, m !== null && B.createElement("noscript", null, B.createElement("style", null, m)), B.createElement("div", {
|
|
7607
7639
|
ref: E,
|
|
7608
7640
|
"data-input-otp-container": !0,
|
|
7609
|
-
style:
|
|
7641
|
+
style: ie,
|
|
7610
7642
|
className: p
|
|
7611
|
-
},
|
|
7643
|
+
}, ce, B.createElement("div", { style: {
|
|
7612
7644
|
position: "absolute",
|
|
7613
7645
|
inset: 0,
|
|
7614
7646
|
pointerEvents: "none"
|
|
7615
|
-
} },
|
|
7647
|
+
} }, oe)));
|
|
7616
7648
|
});
|
|
7617
|
-
|
|
7618
|
-
function
|
|
7649
|
+
Qh.displayName = "Input";
|
|
7650
|
+
function $h(e, t) {
|
|
7619
7651
|
try {
|
|
7620
7652
|
e.insertRule(t);
|
|
7621
7653
|
} catch {
|
|
7622
7654
|
console.error("input-otp could not insert CSS rule:", t);
|
|
7623
7655
|
}
|
|
7624
7656
|
}
|
|
7625
|
-
var
|
|
7657
|
+
var eg = "\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}", tg = "^\\d+$", ng = "^[a-zA-Z0-9]+$";
|
|
7626
7658
|
//#endregion
|
|
7627
7659
|
//#region src/components/reui/input-otp.tsx
|
|
7628
|
-
function
|
|
7629
|
-
return /* @__PURE__ */ H(
|
|
7660
|
+
function rg({ className: e, containerClassName: t, ...n }) {
|
|
7661
|
+
return /* @__PURE__ */ H(Qh, {
|
|
7630
7662
|
"data-slot": "input-otp",
|
|
7631
|
-
containerClassName:
|
|
7632
|
-
className:
|
|
7663
|
+
containerClassName: z("flex items-center gap-2 has-disabled:opacity-50", t),
|
|
7664
|
+
className: z("disabled:cursor-not-allowed", e),
|
|
7633
7665
|
...n
|
|
7634
7666
|
});
|
|
7635
7667
|
}
|
|
7636
|
-
function
|
|
7668
|
+
function ig({ className: e, ...t }) {
|
|
7637
7669
|
return /* @__PURE__ */ H("div", {
|
|
7638
7670
|
"data-slot": "input-otp-group",
|
|
7639
|
-
className:
|
|
7671
|
+
className: z("flex items-center", e),
|
|
7640
7672
|
...t
|
|
7641
7673
|
});
|
|
7642
7674
|
}
|
|
7643
|
-
function
|
|
7644
|
-
let { char: r, hasFakeCaret: i, isActive: a } =
|
|
7675
|
+
function ag({ index: e, className: t, ...n }) {
|
|
7676
|
+
let { char: r, hasFakeCaret: i, isActive: a } = B.useContext(Zh)?.slots[e] ?? {};
|
|
7645
7677
|
return /* @__PURE__ */ U("div", {
|
|
7646
7678
|
"data-slot": "input-otp-slot",
|
|
7647
7679
|
"data-active": a,
|
|
7648
|
-
className:
|
|
7680
|
+
className: z("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", t),
|
|
7649
7681
|
...n,
|
|
7650
7682
|
children: [r, i && /* @__PURE__ */ H("div", {
|
|
7651
7683
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
@@ -7653,7 +7685,7 @@ function Zh({ index: e, className: t, ...n }) {
|
|
|
7653
7685
|
})]
|
|
7654
7686
|
});
|
|
7655
7687
|
}
|
|
7656
|
-
function
|
|
7688
|
+
function og({ ...e }) {
|
|
7657
7689
|
return /* @__PURE__ */ H("div", {
|
|
7658
7690
|
"data-slot": "input-otp-separator",
|
|
7659
7691
|
role: "separator",
|
|
@@ -7663,15 +7695,15 @@ function Qh({ ...e }) {
|
|
|
7663
7695
|
}
|
|
7664
7696
|
//#endregion
|
|
7665
7697
|
//#region src/base/form/fields/OtpField.tsx
|
|
7666
|
-
function
|
|
7698
|
+
function sg(e, t) {
|
|
7667
7699
|
if (!t || t >= e) return [Array.from({ length: e }, (e, t) => t)];
|
|
7668
7700
|
let n = [];
|
|
7669
7701
|
for (let r = 0; r < e; r += t) n.push(Array.from({ length: Math.min(t, e - r) }, (e, t) => r + t));
|
|
7670
7702
|
return n;
|
|
7671
7703
|
}
|
|
7672
|
-
function
|
|
7673
|
-
let d = [c ? u : void 0, l].filter(Boolean).join(" ") || void 0, f = i === "alphanumeric" ?
|
|
7674
|
-
return /* @__PURE__ */ H(
|
|
7704
|
+
function cg({ id: e, value: t, onChange: n, maxLength: r = 6, pattern: i = "digits", groupSize: a, disabled: o, required: s, error: c, helpTextId: l, errorId: u }) {
|
|
7705
|
+
let d = [c ? u : void 0, l].filter(Boolean).join(" ") || void 0, f = i === "alphanumeric" ? ng : tg, p = sg(r, a);
|
|
7706
|
+
return /* @__PURE__ */ H(rg, {
|
|
7675
7707
|
id: e,
|
|
7676
7708
|
maxLength: r,
|
|
7677
7709
|
value: t ?? "",
|
|
@@ -7681,19 +7713,19 @@ function eg({ id: e, value: t, onChange: n, maxLength: r = 6, pattern: i = "digi
|
|
|
7681
7713
|
"aria-invalid": c ? !0 : void 0,
|
|
7682
7714
|
"aria-required": s || void 0,
|
|
7683
7715
|
"aria-describedby": d,
|
|
7684
|
-
children: p.map((e, t) => /* @__PURE__ */ U(
|
|
7716
|
+
children: p.map((e, t) => /* @__PURE__ */ U(ot, { children: [/* @__PURE__ */ H(ig, { children: e.map((e) => /* @__PURE__ */ H(ag, {
|
|
7685
7717
|
index: e,
|
|
7686
7718
|
"aria-invalid": c ? !0 : void 0
|
|
7687
|
-
}, e)) }), t < p.length - 1 && /* @__PURE__ */ H(
|
|
7719
|
+
}, e)) }), t < p.length - 1 && /* @__PURE__ */ H(og, {})] }, e[0]))
|
|
7688
7720
|
});
|
|
7689
7721
|
}
|
|
7690
7722
|
//#endregion
|
|
7691
7723
|
//#region src/base/form/fields/PasswordField.tsx
|
|
7692
|
-
function
|
|
7693
|
-
let [l, u] =
|
|
7724
|
+
function lg({ id: e, value: t, onChange: n, placeholder: r, disabled: i, required: a, error: o, helpTextId: s, errorId: c }) {
|
|
7725
|
+
let [l, u] = ht(!1), f = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0;
|
|
7694
7726
|
return /* @__PURE__ */ U("div", {
|
|
7695
7727
|
className: "relative",
|
|
7696
|
-
children: [/* @__PURE__ */ H(
|
|
7728
|
+
children: [/* @__PURE__ */ H(at, {
|
|
7697
7729
|
id: e,
|
|
7698
7730
|
type: l ? "text" : "password",
|
|
7699
7731
|
value: t ?? "",
|
|
@@ -7712,8 +7744,8 @@ function tg({ id: e, value: t, onChange: n, placeholder: r, disabled: i, require
|
|
|
7712
7744
|
onClick: () => u(!l),
|
|
7713
7745
|
tabIndex: -1,
|
|
7714
7746
|
"aria-label": l ? "Hide password" : "Show password",
|
|
7715
|
-
children: /* @__PURE__ */ H(
|
|
7716
|
-
icon: l ?
|
|
7747
|
+
children: /* @__PURE__ */ H(R, {
|
|
7748
|
+
icon: l ? Ie : ke,
|
|
7717
7749
|
size: 16,
|
|
7718
7750
|
strokeWidth: 2
|
|
7719
7751
|
})
|
|
@@ -7722,17 +7754,17 @@ function tg({ id: e, value: t, onChange: n, placeholder: r, disabled: i, require
|
|
|
7722
7754
|
}
|
|
7723
7755
|
//#endregion
|
|
7724
7756
|
//#region src/components/reui/radio-group.tsx
|
|
7725
|
-
function
|
|
7757
|
+
function ug({ className: e, ...t }) {
|
|
7726
7758
|
return /* @__PURE__ */ H(hu, {
|
|
7727
7759
|
"data-slot": "radio-group",
|
|
7728
|
-
className:
|
|
7760
|
+
className: z("grid gap-3", e),
|
|
7729
7761
|
...t
|
|
7730
7762
|
});
|
|
7731
7763
|
}
|
|
7732
|
-
function
|
|
7764
|
+
function dg({ className: e, ...t }) {
|
|
7733
7765
|
return /* @__PURE__ */ H(gu, {
|
|
7734
7766
|
"data-slot": "radio-group-item",
|
|
7735
|
-
className:
|
|
7767
|
+
className: z("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
|
|
7736
7768
|
...t,
|
|
7737
7769
|
children: /* @__PURE__ */ H(_u, {
|
|
7738
7770
|
"data-slot": "radio-group-indicator",
|
|
@@ -7743,9 +7775,9 @@ function rg({ className: e, ...t }) {
|
|
|
7743
7775
|
}
|
|
7744
7776
|
//#endregion
|
|
7745
7777
|
//#region src/base/form/fields/RadioField.tsx
|
|
7746
|
-
function
|
|
7778
|
+
function fg({ id: e, value: t, onChange: n, options: r, disabled: i, required: a, error: o, helpTextId: s, errorId: c }) {
|
|
7747
7779
|
let l = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0;
|
|
7748
|
-
return /* @__PURE__ */ H(
|
|
7780
|
+
return /* @__PURE__ */ H(ug, {
|
|
7749
7781
|
id: e,
|
|
7750
7782
|
value: t ?? "",
|
|
7751
7783
|
onValueChange: n,
|
|
@@ -7757,10 +7789,10 @@ function ig({ id: e, value: t, onChange: n, options: r, disabled: i, required: a
|
|
|
7757
7789
|
let n = `${e}-${t.value}`;
|
|
7758
7790
|
return /* @__PURE__ */ U("div", {
|
|
7759
7791
|
className: "flex items-center gap-2",
|
|
7760
|
-
children: [/* @__PURE__ */ H(
|
|
7792
|
+
children: [/* @__PURE__ */ H(dg, {
|
|
7761
7793
|
value: t.value,
|
|
7762
7794
|
id: n
|
|
7763
|
-
}), /* @__PURE__ */ H(
|
|
7795
|
+
}), /* @__PURE__ */ H(Bp, {
|
|
7764
7796
|
htmlFor: n,
|
|
7765
7797
|
className: "text-sm font-normal",
|
|
7766
7798
|
children: t.label
|
|
@@ -7771,21 +7803,21 @@ function ig({ id: e, value: t, onChange: n, options: r, disabled: i, required: a
|
|
|
7771
7803
|
}
|
|
7772
7804
|
//#endregion
|
|
7773
7805
|
//#region src/components/reui/rating.tsx
|
|
7774
|
-
var
|
|
7806
|
+
var pg = o("flex items-center", {
|
|
7775
7807
|
variants: { size: {
|
|
7776
7808
|
sm: "gap-2",
|
|
7777
7809
|
default: "gap-2.5",
|
|
7778
7810
|
lg: "gap-3"
|
|
7779
7811
|
} },
|
|
7780
7812
|
defaultVariants: { size: "default" }
|
|
7781
|
-
}),
|
|
7813
|
+
}), mg = o("", {
|
|
7782
7814
|
variants: { size: {
|
|
7783
7815
|
sm: "w-4 h-4",
|
|
7784
7816
|
default: "w-5 h-5",
|
|
7785
7817
|
lg: "w-6 h-6"
|
|
7786
7818
|
} },
|
|
7787
7819
|
defaultVariants: { size: "default" }
|
|
7788
|
-
}),
|
|
7820
|
+
}), hg = o("text-muted-foreground w-5", {
|
|
7789
7821
|
variants: { size: {
|
|
7790
7822
|
sm: "text-xs",
|
|
7791
7823
|
default: "text-sm",
|
|
@@ -7793,8 +7825,8 @@ var ag = o("flex items-center", {
|
|
|
7793
7825
|
} },
|
|
7794
7826
|
defaultVariants: { size: "default" }
|
|
7795
7827
|
});
|
|
7796
|
-
function
|
|
7797
|
-
let [l, u] =
|
|
7828
|
+
function gg({ rating: e, maxRating: t = 5, size: n, className: r, starClassName: i, showValue: a = !1, editable: o = !1, onRatingChange: s, ...c }) {
|
|
7829
|
+
let [l, u] = ht(null), d = o && l !== null ? l : e, f = (e) => {
|
|
7798
7830
|
o && s && s(e);
|
|
7799
7831
|
}, p = (e) => {
|
|
7800
7832
|
o && u(e);
|
|
@@ -7805,23 +7837,23 @@ function cg({ rating: e, maxRating: t = 5, size: n, className: r, starClassName:
|
|
|
7805
7837
|
for (let r = 1; r <= t; r++) {
|
|
7806
7838
|
let t = d >= r, i = d > r - 1 && d < r ? (d - (r - 1)) * 100 : 0;
|
|
7807
7839
|
e.push(/* @__PURE__ */ U("div", {
|
|
7808
|
-
className:
|
|
7840
|
+
className: z("relative", o && "cursor-pointer"),
|
|
7809
7841
|
onClick: () => f(r),
|
|
7810
7842
|
onMouseEnter: () => p(r),
|
|
7811
7843
|
onMouseLeave: m,
|
|
7812
|
-
children: [/* @__PURE__ */ H(
|
|
7813
|
-
icon:
|
|
7844
|
+
children: [/* @__PURE__ */ H(R, {
|
|
7845
|
+
icon: Pe,
|
|
7814
7846
|
strokeWidth: 2,
|
|
7815
7847
|
"data-slot": "rating-star-empty",
|
|
7816
|
-
className:
|
|
7848
|
+
className: z(mg({ size: n }), "text-muted-foreground/30")
|
|
7817
7849
|
}), /* @__PURE__ */ H("div", {
|
|
7818
7850
|
className: "absolute inset-0 overflow-hidden",
|
|
7819
7851
|
style: { width: t ? "100%" : `${i}%` },
|
|
7820
|
-
children: /* @__PURE__ */ H(
|
|
7821
|
-
icon:
|
|
7852
|
+
children: /* @__PURE__ */ H(R, {
|
|
7853
|
+
icon: Pe,
|
|
7822
7854
|
strokeWidth: 2,
|
|
7823
7855
|
"data-slot": "rating-star-filled",
|
|
7824
|
-
className:
|
|
7856
|
+
className: z(mg({ size: n }), "fill-yellow-400 text-yellow-400")
|
|
7825
7857
|
})
|
|
7826
7858
|
})]
|
|
7827
7859
|
}, r));
|
|
@@ -7830,21 +7862,21 @@ function cg({ rating: e, maxRating: t = 5, size: n, className: r, starClassName:
|
|
|
7830
7862
|
};
|
|
7831
7863
|
return /* @__PURE__ */ U("div", {
|
|
7832
7864
|
"data-slot": "rating",
|
|
7833
|
-
className:
|
|
7865
|
+
className: z(pg({ size: n }), r),
|
|
7834
7866
|
...c,
|
|
7835
7867
|
children: [/* @__PURE__ */ H("div", {
|
|
7836
7868
|
className: "flex items-center",
|
|
7837
7869
|
children: h()
|
|
7838
7870
|
}), a && /* @__PURE__ */ H("span", {
|
|
7839
7871
|
"data-slot": "rating-value",
|
|
7840
|
-
className:
|
|
7872
|
+
className: z(hg({ size: n }), i),
|
|
7841
7873
|
children: d.toFixed(1)
|
|
7842
7874
|
})]
|
|
7843
7875
|
});
|
|
7844
7876
|
}
|
|
7845
7877
|
//#endregion
|
|
7846
7878
|
//#region src/base/form/fields/RatingField.tsx
|
|
7847
|
-
function
|
|
7879
|
+
function _g({ id: e, value: t, onChange: n, maxRating: r = 5, disabled: i, required: a, error: o, helpTextId: s, errorId: c }) {
|
|
7848
7880
|
let l = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0;
|
|
7849
7881
|
return /* @__PURE__ */ H("div", {
|
|
7850
7882
|
id: e,
|
|
@@ -7852,7 +7884,7 @@ function lg({ id: e, value: t, onChange: n, maxRating: r = 5, disabled: i, requi
|
|
|
7852
7884
|
"aria-required": a || void 0,
|
|
7853
7885
|
"aria-invalid": o ? !0 : void 0,
|
|
7854
7886
|
"aria-describedby": l,
|
|
7855
|
-
children: /* @__PURE__ */ H(
|
|
7887
|
+
children: /* @__PURE__ */ H(gg, {
|
|
7856
7888
|
rating: t ?? 0,
|
|
7857
7889
|
maxRating: r,
|
|
7858
7890
|
editable: !i,
|
|
@@ -7863,21 +7895,21 @@ function lg({ id: e, value: t, onChange: n, maxRating: r = 5, disabled: i, requi
|
|
|
7863
7895
|
}
|
|
7864
7896
|
//#endregion
|
|
7865
7897
|
//#region src/base/form/fields/SelectField.tsx
|
|
7866
|
-
function
|
|
7867
|
-
let { t: u } =
|
|
7868
|
-
return /* @__PURE__ */ U(
|
|
7898
|
+
function vg({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled: a, required: o, error: s, helpTextId: c, errorId: l }) {
|
|
7899
|
+
let { t: u } = Ee(), d = [s ? l : void 0, c].filter(Boolean).join(" ") || void 0;
|
|
7900
|
+
return /* @__PURE__ */ U(Dp, {
|
|
7869
7901
|
value: t ?? "",
|
|
7870
7902
|
onValueChange: n,
|
|
7871
7903
|
disabled: a,
|
|
7872
7904
|
required: o,
|
|
7873
|
-
children: [/* @__PURE__ */ H(
|
|
7905
|
+
children: [/* @__PURE__ */ H(Ap, {
|
|
7874
7906
|
id: e,
|
|
7875
7907
|
className: "w-full",
|
|
7876
7908
|
"aria-invalid": s ? !0 : void 0,
|
|
7877
7909
|
"aria-required": o || void 0,
|
|
7878
7910
|
"aria-describedby": d,
|
|
7879
|
-
children: /* @__PURE__ */ H(
|
|
7880
|
-
}), /* @__PURE__ */ H(
|
|
7911
|
+
children: /* @__PURE__ */ H(kp, { placeholder: i ?? u("middag.ui.form.select_placeholder") })
|
|
7912
|
+
}), /* @__PURE__ */ H(jp, { children: r.map((e) => /* @__PURE__ */ H(Np, {
|
|
7881
7913
|
value: e.value,
|
|
7882
7914
|
children: e.label
|
|
7883
7915
|
}, e.value)) })]
|
|
@@ -7885,29 +7917,29 @@ function ug({ id: e, value: t, onChange: n, options: r, placeholder: i, disabled
|
|
|
7885
7917
|
}
|
|
7886
7918
|
//#endregion
|
|
7887
7919
|
//#region src/components/reui/slider.tsx
|
|
7888
|
-
function
|
|
7889
|
-
let o =
|
|
7920
|
+
function yg({ className: e, defaultValue: t, value: n, min: r = 0, max: i = 100, ...a }) {
|
|
7921
|
+
let o = B.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [r, i], [
|
|
7890
7922
|
n,
|
|
7891
7923
|
t,
|
|
7892
7924
|
r,
|
|
7893
7925
|
i
|
|
7894
7926
|
]);
|
|
7895
|
-
return /* @__PURE__ */ U(
|
|
7927
|
+
return /* @__PURE__ */ U(Rf, {
|
|
7896
7928
|
"data-slot": "slider",
|
|
7897
7929
|
defaultValue: t,
|
|
7898
7930
|
value: n,
|
|
7899
7931
|
min: r,
|
|
7900
7932
|
max: i,
|
|
7901
|
-
className:
|
|
7933
|
+
className: z("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", e),
|
|
7902
7934
|
...a,
|
|
7903
|
-
children: [/* @__PURE__ */ H(
|
|
7935
|
+
children: [/* @__PURE__ */ H(zf, {
|
|
7904
7936
|
"data-slot": "slider-track",
|
|
7905
|
-
className:
|
|
7906
|
-
children: /* @__PURE__ */ H(
|
|
7937
|
+
className: z("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
7938
|
+
children: /* @__PURE__ */ H(Bf, {
|
|
7907
7939
|
"data-slot": "slider-range",
|
|
7908
|
-
className:
|
|
7940
|
+
className: z("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
7909
7941
|
})
|
|
7910
|
-
}), Array.from({ length: o.length }, (e, t) => /* @__PURE__ */ H(
|
|
7942
|
+
}), Array.from({ length: o.length }, (e, t) => /* @__PURE__ */ H(Vf, {
|
|
7911
7943
|
"data-slot": "slider-thumb",
|
|
7912
7944
|
className: "block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
7913
7945
|
}, t))]
|
|
@@ -7915,11 +7947,11 @@ function dg({ className: e, defaultValue: t, value: n, min: r = 0, max: i = 100,
|
|
|
7915
7947
|
}
|
|
7916
7948
|
//#endregion
|
|
7917
7949
|
//#region src/base/form/fields/SliderField.tsx
|
|
7918
|
-
function
|
|
7950
|
+
function bg({ id: e, value: t, onChange: n, min: r = 0, max: i = 100, step: a = 1, multiple: o = !1, disabled: s, required: c, error: l, helpTextId: u, errorId: d }) {
|
|
7919
7951
|
let f = [l ? d : void 0, u].filter(Boolean).join(" ") || void 0, p = Array.isArray(t) ? t : t == null ? o ? [r, i] : [r] : [t], m = o ? p.join(" – ") : String(p[0] ?? r);
|
|
7920
7952
|
return /* @__PURE__ */ U("div", {
|
|
7921
7953
|
className: "flex items-center gap-4",
|
|
7922
|
-
children: [/* @__PURE__ */ H(
|
|
7954
|
+
children: [/* @__PURE__ */ H(yg, {
|
|
7923
7955
|
id: e,
|
|
7924
7956
|
value: p,
|
|
7925
7957
|
min: r,
|
|
@@ -7939,14 +7971,14 @@ function fg({ id: e, value: t, onChange: n, min: r = 0, max: i = 100, step: a =
|
|
|
7939
7971
|
}
|
|
7940
7972
|
//#endregion
|
|
7941
7973
|
//#region src/base/form/fields/SlugField.tsx
|
|
7942
|
-
function
|
|
7974
|
+
function xg(e) {
|
|
7943
7975
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, "-");
|
|
7944
7976
|
}
|
|
7945
|
-
function
|
|
7946
|
-
let [d, f] =
|
|
7947
|
-
|
|
7977
|
+
function Sg({ id: e, value: t, onChange: n, sourceValue: r, placeholder: i, disabled: a, required: o, error: s, helpTextId: c, errorId: l, prefix: u }) {
|
|
7978
|
+
let [d, f] = ht(!1), m = [s ? l : void 0, c].filter(Boolean).join(" ") || void 0;
|
|
7979
|
+
dt(() => {
|
|
7948
7980
|
if (!d && r !== void 0) {
|
|
7949
|
-
let e =
|
|
7981
|
+
let e = xg(r);
|
|
7950
7982
|
e !== t && n(e);
|
|
7951
7983
|
}
|
|
7952
7984
|
}, [
|
|
@@ -7955,43 +7987,43 @@ function mg({ id: e, value: t, onChange: n, sourceValue: r, placeholder: i, disa
|
|
|
7955
7987
|
n,
|
|
7956
7988
|
t
|
|
7957
7989
|
]);
|
|
7958
|
-
let
|
|
7959
|
-
f(!0), n(
|
|
7990
|
+
let h = V((e) => {
|
|
7991
|
+
f(!0), n(xg(e.target.value));
|
|
7960
7992
|
}, [n]);
|
|
7961
|
-
return u ? /* @__PURE__ */ U(
|
|
7993
|
+
return u ? /* @__PURE__ */ U(p, {
|
|
7962
7994
|
"data-disabled": a || void 0,
|
|
7963
|
-
children: [/* @__PURE__ */ H(
|
|
7995
|
+
children: [/* @__PURE__ */ H(oe, {
|
|
7964
7996
|
align: "inline-start",
|
|
7965
|
-
children: /* @__PURE__ */ H(
|
|
7966
|
-
}), /* @__PURE__ */ H(
|
|
7997
|
+
children: /* @__PURE__ */ H(fe, { children: u })
|
|
7998
|
+
}), /* @__PURE__ */ H(ve, {
|
|
7967
7999
|
id: e,
|
|
7968
8000
|
type: "text",
|
|
7969
8001
|
value: t ?? "",
|
|
7970
|
-
onChange:
|
|
8002
|
+
onChange: h,
|
|
7971
8003
|
placeholder: i ?? "url-friendly-slug",
|
|
7972
8004
|
disabled: a,
|
|
7973
8005
|
"aria-invalid": s ? !0 : void 0,
|
|
7974
8006
|
"aria-required": o || void 0,
|
|
7975
|
-
"aria-describedby":
|
|
8007
|
+
"aria-describedby": m
|
|
7976
8008
|
})]
|
|
7977
|
-
}) : /* @__PURE__ */ H(
|
|
8009
|
+
}) : /* @__PURE__ */ H(p, {
|
|
7978
8010
|
"data-disabled": a || void 0,
|
|
7979
|
-
children: /* @__PURE__ */ H(
|
|
8011
|
+
children: /* @__PURE__ */ H(ve, {
|
|
7980
8012
|
id: e,
|
|
7981
8013
|
type: "text",
|
|
7982
8014
|
value: t ?? "",
|
|
7983
|
-
onChange:
|
|
8015
|
+
onChange: h,
|
|
7984
8016
|
placeholder: i ?? "url-friendly-slug",
|
|
7985
8017
|
disabled: a,
|
|
7986
8018
|
"aria-invalid": s ? !0 : void 0,
|
|
7987
8019
|
"aria-required": o || void 0,
|
|
7988
|
-
"aria-describedby":
|
|
8020
|
+
"aria-describedby": m
|
|
7989
8021
|
})
|
|
7990
8022
|
});
|
|
7991
8023
|
}
|
|
7992
8024
|
//#endregion
|
|
7993
8025
|
//#region src/base/form/fields/StaticField.tsx
|
|
7994
|
-
function
|
|
8026
|
+
function Cg({ id: e, value: t }) {
|
|
7995
8027
|
return /* @__PURE__ */ H("p", {
|
|
7996
8028
|
id: e,
|
|
7997
8029
|
className: "border-input bg-muted/50 text-foreground rounded-md border px-3 py-2 text-sm",
|
|
@@ -8000,25 +8032,25 @@ function hg({ id: e, value: t }) {
|
|
|
8000
8032
|
}
|
|
8001
8033
|
//#endregion
|
|
8002
8034
|
//#region src/components/reui/switch.tsx
|
|
8003
|
-
function
|
|
8004
|
-
return /* @__PURE__ */ H(
|
|
8035
|
+
function wg({ className: e, size: t = "default", ...n }) {
|
|
8036
|
+
return /* @__PURE__ */ H(ep, {
|
|
8005
8037
|
"data-slot": "switch",
|
|
8006
8038
|
"data-size": t,
|
|
8007
|
-
className:
|
|
8039
|
+
className: z("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80", e),
|
|
8008
8040
|
...n,
|
|
8009
|
-
children: /* @__PURE__ */ H(
|
|
8041
|
+
children: /* @__PURE__ */ H(tp, {
|
|
8010
8042
|
"data-slot": "switch-thumb",
|
|
8011
|
-
className:
|
|
8043
|
+
className: z("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")
|
|
8012
8044
|
})
|
|
8013
8045
|
});
|
|
8014
8046
|
}
|
|
8015
8047
|
//#endregion
|
|
8016
8048
|
//#region src/base/form/fields/SwitchField.tsx
|
|
8017
|
-
function
|
|
8049
|
+
function Tg({ id: e, value: t, onChange: n, label: r, disabled: i, required: a, error: o, helpTextId: s, errorId: c }) {
|
|
8018
8050
|
let l = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0;
|
|
8019
8051
|
return /* @__PURE__ */ U("div", {
|
|
8020
8052
|
className: "flex items-center gap-2",
|
|
8021
|
-
children: [/* @__PURE__ */ H(
|
|
8053
|
+
children: [/* @__PURE__ */ H(wg, {
|
|
8022
8054
|
id: e,
|
|
8023
8055
|
checked: !!t,
|
|
8024
8056
|
onCheckedChange: n,
|
|
@@ -8026,7 +8058,7 @@ function _g({ id: e, value: t, onChange: n, label: r, disabled: i, required: a,
|
|
|
8026
8058
|
"aria-invalid": o ? !0 : void 0,
|
|
8027
8059
|
"aria-required": a || void 0,
|
|
8028
8060
|
"aria-describedby": l
|
|
8029
|
-
}), r && /* @__PURE__ */ H(
|
|
8061
|
+
}), r && /* @__PURE__ */ H(Bp, {
|
|
8030
8062
|
htmlFor: e,
|
|
8031
8063
|
className: "text-sm font-normal",
|
|
8032
8064
|
children: r
|
|
@@ -8035,17 +8067,17 @@ function _g({ id: e, value: t, onChange: n, label: r, disabled: i, required: a,
|
|
|
8035
8067
|
}
|
|
8036
8068
|
//#endregion
|
|
8037
8069
|
//#region src/base/form/fields/TagsField.tsx
|
|
8038
|
-
function
|
|
8039
|
-
let { t: u } =
|
|
8070
|
+
function Eg({ id: e, value: t, onChange: n, placeholder: r, disabled: i, required: a, error: o, helpTextId: s, errorId: c, maxTags: l }) {
|
|
8071
|
+
let { t: u } = Ee(), [d, f] = ht(""), p = mt(null), m = pt(() => t ?? [], [t]), h = [o ? c : void 0, s].filter(Boolean).join(" ") || void 0, g = V((e) => {
|
|
8040
8072
|
let t = e.trim();
|
|
8041
8073
|
t && (m.includes(t) || l && m.length >= l || (n([...m, t]), f("")));
|
|
8042
8074
|
}, [
|
|
8043
8075
|
m,
|
|
8044
8076
|
n,
|
|
8045
8077
|
l
|
|
8046
|
-
]), _ =
|
|
8078
|
+
]), _ = V((e) => {
|
|
8047
8079
|
n(m.filter((t, n) => n !== e));
|
|
8048
|
-
}, [m, n]), v =
|
|
8080
|
+
}, [m, n]), v = V((e) => {
|
|
8049
8081
|
e.key === "Enter" || e.key === "," ? (e.preventDefault(), g(d)) : e.key === "Backspace" && !d && m.length > 0 && _(m.length - 1);
|
|
8050
8082
|
}, [
|
|
8051
8083
|
d,
|
|
@@ -8086,9 +8118,9 @@ function vg({ id: e, value: t, onChange: n, placeholder: r, disabled: i, require
|
|
|
8086
8118
|
}
|
|
8087
8119
|
//#endregion
|
|
8088
8120
|
//#region src/base/form/fields/TextareaField.tsx
|
|
8089
|
-
function
|
|
8121
|
+
function Dg({ id: e, value: t, onChange: n, placeholder: r, rows: i = 4, disabled: a, readOnly: o, required: s, error: c, helpTextId: l, errorId: u }) {
|
|
8090
8122
|
let d = [c ? u : void 0, l].filter(Boolean).join(" ") || void 0;
|
|
8091
|
-
return /* @__PURE__ */ H(
|
|
8123
|
+
return /* @__PURE__ */ H(he, {
|
|
8092
8124
|
id: e,
|
|
8093
8125
|
value: t ?? "",
|
|
8094
8126
|
onChange: (e) => n(e.target.value),
|
|
@@ -8103,9 +8135,9 @@ function yg({ id: e, value: t, onChange: n, placeholder: r, rows: i = 4, disable
|
|
|
8103
8135
|
}
|
|
8104
8136
|
//#endregion
|
|
8105
8137
|
//#region src/base/form/fields/TextField.tsx
|
|
8106
|
-
function
|
|
8138
|
+
function Og({ id: e, value: t, onChange: n, type: r = "text", placeholder: i, disabled: a, readOnly: o, required: s, error: c, helpTextId: l, errorId: u }) {
|
|
8107
8139
|
let d = [c ? u : void 0, l].filter(Boolean).join(" ") || void 0;
|
|
8108
|
-
return /* @__PURE__ */ H(
|
|
8140
|
+
return /* @__PURE__ */ H(at, {
|
|
8109
8141
|
id: e,
|
|
8110
8142
|
type: r,
|
|
8111
8143
|
value: t ?? "",
|
|
@@ -8120,8 +8152,8 @@ function bg({ id: e, value: t, onChange: n, type: r = "text", placeholder: i, di
|
|
|
8120
8152
|
}
|
|
8121
8153
|
//#endregion
|
|
8122
8154
|
//#region src/base/partials/FormSection/index.tsx
|
|
8123
|
-
function
|
|
8124
|
-
let { t: s } =
|
|
8155
|
+
function kg({ id: e, title: t, description: n, children: r, defaultCollapsed: i = !1, hasErrors: a = !1, errorCount: o }) {
|
|
8156
|
+
let { t: s } = Ee(), [c, l] = ht(i && !a), u = `${e}-content`, f = !!t, p = !c || a;
|
|
8125
8157
|
return /* @__PURE__ */ U("fieldset", {
|
|
8126
8158
|
className: "border-border space-y-5 rounded-lg border p-6",
|
|
8127
8159
|
children: [
|
|
@@ -8139,8 +8171,8 @@ function xg({ id: e, title: t, description: n, children: r, defaultCollapsed: i
|
|
|
8139
8171
|
"aria-controls": u,
|
|
8140
8172
|
className: "-ml-2 flex items-center gap-2 px-2",
|
|
8141
8173
|
disabled: a,
|
|
8142
|
-
children: [/* @__PURE__ */ H(
|
|
8143
|
-
icon: p ?
|
|
8174
|
+
children: [/* @__PURE__ */ H(R, {
|
|
8175
|
+
icon: p ? L : Le,
|
|
8144
8176
|
size: 14
|
|
8145
8177
|
}), /* @__PURE__ */ H("span", {
|
|
8146
8178
|
className: "text-foreground text-lg font-semibold",
|
|
@@ -8164,7 +8196,7 @@ function xg({ id: e, title: t, description: n, children: r, defaultCollapsed: i
|
|
|
8164
8196
|
}),
|
|
8165
8197
|
/* @__PURE__ */ H("div", {
|
|
8166
8198
|
id: u,
|
|
8167
|
-
className:
|
|
8199
|
+
className: z("transition-[opacity,height] duration-200 ease-[var(--ease-default)]", p ? "opacity-100" : "hidden opacity-0"),
|
|
8168
8200
|
children: r
|
|
8169
8201
|
})
|
|
8170
8202
|
]
|
|
@@ -8172,12 +8204,12 @@ function xg({ id: e, title: t, description: n, children: r, defaultCollapsed: i
|
|
|
8172
8204
|
}
|
|
8173
8205
|
//#endregion
|
|
8174
8206
|
//#region src/i18n/resolve-field-error.ts
|
|
8175
|
-
function
|
|
8176
|
-
return typeof e == "string" ? e : Array.isArray(e) ? e.map((e) =>
|
|
8207
|
+
function Ag(e, t) {
|
|
8208
|
+
return typeof e == "string" ? e : Array.isArray(e) ? e.map((e) => Ag(e, t)).filter(Boolean).join(" ") : t(e.key, {
|
|
8177
8209
|
ns: e.domain || "validators",
|
|
8178
8210
|
defaultValue: e.message,
|
|
8179
8211
|
...e.params ?? {}
|
|
8180
8212
|
});
|
|
8181
8213
|
}
|
|
8182
8214
|
//#endregion
|
|
8183
|
-
export {
|
|
8215
|
+
export { sp as $, Lp as A, Es as At, kp as B, Kp as C, Os as Ct, Bp as D, As as Dt, Vp as E, us as Et, Mp as F, sn as Ft, vp as G, bp as H, Ip as I, gp as J, mp as K, Fp as L, jp as M, ms as Mt, Op as N, fn as Nt, zp as O, os as Ot, Np as P, mn as Pt, ap as Q, Pp as R, qp as S, tc as St, Hp as T, vs as Tt, xp as U, Ep as V, yp as W, fp as X, hp as Y, np as Z, Ch as _, pc as _t, Eg as a, up as at, uh as b, cc as bt, Cg as c, $c as ct, vg as d, Zc as dt, dp as et, _g as f, Yc as ft, Nh as g, _c as gt, cg as h, Wc as ht, Dg as i, ip as it, Dp as j, zo as jt, Rp as k, bs as kt, Sg as l, tl as lt, lg as m, Xc as mt, kg as n, cp as nt, Tg as o, rp as ot, fg as p, el as pt, _p as q, Og as r, op as rt, wg as s, nl as st, Ag as t, lp as tt, bg as u, Qc as ut, vh as v, oc as vt, Wp as w, fs as wt, Gp as x, sc as xt, gh as y, ac as yt, Ap as z };
|