@mateosuarezdev/react-ui 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +204 -202
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as d, jsxs as p, Fragment as Nn } from "react/jsx-runtime";
|
|
2
|
-
import Te, { useRef as E, useEffect as
|
|
3
|
-
import { createPortal as
|
|
2
|
+
import Te, { useRef as E, useEffect as _, useState as F, useSyncExternalStore as xr, useLayoutEffect as En, useCallback as B, useId as $n, forwardRef as Ye, useContext as at, useMemo as re, memo as Nr, createContext as Ot } from "react";
|
|
3
|
+
import { createPortal as kn } from "react-dom";
|
|
4
4
|
import { clsx as Er } from "clsx";
|
|
5
5
|
import { twMerge as $r } from "tailwind-merge";
|
|
6
6
|
import { atom as kr } from "@mateosuarezdev/atoms";
|
|
7
|
-
import { ChevronLeft as
|
|
7
|
+
import { ChevronLeft as Mn, ChevronRight as Dn, CalendarDays as Sn, Clock as Tn, Check as Cn, Minus as Mr, DollarSign as Dr, CheckIcon as Ge, EyeOffIcon as Sr, Eye as Tr, XIcon as Cr, ChevronDownIcon as Pr, Search as Or, X as st, Plus as Pn } from "lucide-react";
|
|
8
8
|
import { AnimatePresence as Lt, motion as Pe, animate as Et } from "framer-motion";
|
|
9
|
-
import { appendErrors as
|
|
9
|
+
import { appendErrors as On, FormProvider as Lr, useForm as Fr, useFormContext as it, Controller as ct } from "react-hook-form";
|
|
10
10
|
import { validateFieldsNatively as Zt, toNestErrors as en } from "@hookform/resolvers";
|
|
11
11
|
import { useInitialChangeEvent as Wr, useRoute as Ar, navigate as Ve } from "@mateosuarezdev/react-router";
|
|
12
12
|
const v = (...e) => $r(Er(e));
|
|
@@ -47,7 +47,7 @@ function gi(e) {
|
|
|
47
47
|
return a.toUpperCase() + s;
|
|
48
48
|
}).join(" ");
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Ln(e) {
|
|
51
51
|
return e === null ? "" : e;
|
|
52
52
|
}
|
|
53
53
|
function $t(e) {
|
|
@@ -116,7 +116,7 @@ const Je = (e) => {
|
|
|
116
116
|
deps: o = []
|
|
117
117
|
} = {}) => {
|
|
118
118
|
const a = E(null);
|
|
119
|
-
return
|
|
119
|
+
return _(() => {
|
|
120
120
|
if (!a.current || !r) return;
|
|
121
121
|
let s = !1;
|
|
122
122
|
const l = Ft(() => {
|
|
@@ -140,7 +140,7 @@ const Je = (e) => {
|
|
|
140
140
|
deps: r = []
|
|
141
141
|
} = {}) => {
|
|
142
142
|
const o = E(null), [a, s] = F(null);
|
|
143
|
-
return
|
|
143
|
+
return _(() => {
|
|
144
144
|
if (!o.current || !n) return;
|
|
145
145
|
let i = !1;
|
|
146
146
|
const c = Ft(() => {
|
|
@@ -228,22 +228,24 @@ function Ni({
|
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
230
|
function zr(e) {
|
|
231
|
-
return
|
|
231
|
+
return xr(
|
|
232
232
|
(t) => e.subscribe(t),
|
|
233
233
|
() => e.get(),
|
|
234
234
|
() => e.get()
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
const kt = kr(
|
|
237
|
+
const kt = kr(
|
|
238
|
+
typeof window < "u" ? window.innerWidth > 1024 : !0
|
|
239
|
+
);
|
|
238
240
|
let vt = !1;
|
|
239
241
|
const tn = Ft(() => {
|
|
240
242
|
kt.set(window.innerWidth > 1024);
|
|
241
243
|
});
|
|
242
244
|
typeof window < "u" && (vt && (window.removeEventListener("resize", tn), vt = !1), window.addEventListener("resize", tn), vt = !0);
|
|
243
|
-
const Wt = () => (
|
|
245
|
+
const Wt = () => (En(() => {
|
|
244
246
|
kt.set(window.innerWidth > 1024);
|
|
245
247
|
}, []), zr(kt));
|
|
246
|
-
function
|
|
248
|
+
function Fn(...e) {
|
|
247
249
|
return (t) => {
|
|
248
250
|
e.forEach((n) => {
|
|
249
251
|
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
@@ -277,7 +279,7 @@ const Yr = (e = !0, t) => {
|
|
|
277
279
|
position: "relative"
|
|
278
280
|
}
|
|
279
281
|
};
|
|
280
|
-
},
|
|
282
|
+
}, Wn = ({
|
|
281
283
|
// routerMode = "outlet",
|
|
282
284
|
scrollerId: e,
|
|
283
285
|
// useScrollerSuffix,
|
|
@@ -303,7 +305,7 @@ const Yr = (e = !0, t) => {
|
|
|
303
305
|
y: 0,
|
|
304
306
|
width: 0,
|
|
305
307
|
height: 0
|
|
306
|
-
}), x = E(null), $ =
|
|
308
|
+
}), x = E(null), $ = $n(), k = B(
|
|
307
309
|
(g) => {
|
|
308
310
|
const w = g ?? y.current;
|
|
309
311
|
if (!w) return { x: 0, top: 0, bottom: void 0 };
|
|
@@ -321,7 +323,7 @@ const Yr = (e = !0, t) => {
|
|
|
321
323
|
},
|
|
322
324
|
[y.current, f, t, n]
|
|
323
325
|
);
|
|
324
|
-
|
|
326
|
+
_(() => {
|
|
325
327
|
if (!c || !e || (x.current = document.getElementById(e), !x.current)) return;
|
|
326
328
|
c && W();
|
|
327
329
|
const g = () => {
|
|
@@ -438,7 +440,7 @@ const Yr = (e = !0, t) => {
|
|
|
438
440
|
};
|
|
439
441
|
function Ei(e) {
|
|
440
442
|
const t = E(null);
|
|
441
|
-
return
|
|
443
|
+
return _(() => {
|
|
442
444
|
const n = (r) => {
|
|
443
445
|
t.current && !t.current.contains(r.target) && e();
|
|
444
446
|
};
|
|
@@ -453,7 +455,7 @@ function $i(e, t = {}) {
|
|
|
453
455
|
events: r = ["mousedown", "touchstart"],
|
|
454
456
|
excludeRefs: o = []
|
|
455
457
|
} = t, a = E(null);
|
|
456
|
-
return
|
|
458
|
+
return _(() => {
|
|
457
459
|
if (!n) return;
|
|
458
460
|
const s = (i) => {
|
|
459
461
|
const l = i.target;
|
|
@@ -470,8 +472,8 @@ function $i(e, t = {}) {
|
|
|
470
472
|
};
|
|
471
473
|
}, [e, n, r, o]), a;
|
|
472
474
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
475
|
+
function An(e, t, n = !0) {
|
|
476
|
+
_(() => {
|
|
475
477
|
if (!n) return;
|
|
476
478
|
const r = (o) => {
|
|
477
479
|
e.current && !e.current.contains(o.target) && t(o);
|
|
@@ -483,9 +485,9 @@ function Wn(e, t, n = !0) {
|
|
|
483
485
|
}
|
|
484
486
|
function Br(e, { target: t = window, event: n = "keydown", enabled: r } = {}) {
|
|
485
487
|
const o = E(e);
|
|
486
|
-
|
|
488
|
+
_(() => {
|
|
487
489
|
o.current = e;
|
|
488
|
-
}, [e]),
|
|
490
|
+
}, [e]), _(() => {
|
|
489
491
|
if (!r) return;
|
|
490
492
|
const a = (s) => {
|
|
491
493
|
const i = s.key, l = o.current[i];
|
|
@@ -496,7 +498,7 @@ function Br(e, { target: t = window, event: n = "keydown", enabled: r } = {}) {
|
|
|
496
498
|
};
|
|
497
499
|
}, [t, n, r]);
|
|
498
500
|
}
|
|
499
|
-
const Vr = "relative shrink-0 select-none transition outline-none duration-200 ease-out focus:ring-border-brand-light flex items-center justify-center cursor-pointer", Kr = {
|
|
501
|
+
const Vr = "relative shrink-0 select-none transition outline-none duration-200 ease-out focus-visible:ring-border-brand-light flex items-center justify-center cursor-pointer", Kr = {
|
|
500
502
|
xs: "text-xs px-1 gap-x-0.5 py-1",
|
|
501
503
|
sm: "text-sm px-2.5 gap-x-1 py-1.5",
|
|
502
504
|
mdsm: "text-sm px-3 gap-x-1.5 py-2.5",
|
|
@@ -508,9 +510,9 @@ const Vr = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
508
510
|
iconMd: "text-base p-3",
|
|
509
511
|
iconLg: "text-base p-4"
|
|
510
512
|
}, Xr = {
|
|
511
|
-
all: "focus:ring-1
|
|
512
|
-
desktop: "lg:focus:ring-1
|
|
513
|
-
mobile: "focus:ring-1
|
|
513
|
+
all: "focus-visible:ring-1",
|
|
514
|
+
desktop: "lg:focus-visible:ring-1",
|
|
515
|
+
mobile: "focus-visible:ring-1 lg:focus-ring-0",
|
|
514
516
|
none: ""
|
|
515
517
|
}, qr = {
|
|
516
518
|
light: "font-light",
|
|
@@ -534,19 +536,19 @@ const Vr = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
534
536
|
12: "rounded-12",
|
|
535
537
|
full: "rounded-full"
|
|
536
538
|
}, Qr = {
|
|
537
|
-
transparent: "text-base-12 lg:hover:bg-base-4 focus:ring-base-6",
|
|
539
|
+
transparent: "text-base-12 lg:hover:bg-base-4 focus-visible:ring-base-6",
|
|
538
540
|
transparentinactive: "text-base-11 lg:hover:bg-base-4",
|
|
539
|
-
brand: "bg-brand text-brand-text lg:hover:bg-brand-hover focus:ring-base-6 border border-transparent",
|
|
541
|
+
brand: "bg-brand text-brand-text lg:hover:bg-brand-hover focus-visible:ring-base-6 border border-transparent",
|
|
540
542
|
accent: "bg-accent text-accent-text lg:hover:bg-accent-hover",
|
|
541
|
-
contrast: "bg-base-12 text-base-1 lg:hover:bg-base-11 focus:ring-base-6",
|
|
542
|
-
solid: "bg-base-3 dark-theme:bg-base-3 lg:hover:bg-base-4 border border-base-4 focus:ring-base-5",
|
|
543
|
-
solidhybrid: "border border-base-5 dark-theme:border-base-4 dark-theme:bg-base-3 lg:hover:bg-base-4 focus:ring-base-6",
|
|
544
|
-
outline: "border border-base-6 lg:hover:bg-base-3 focus:ring-base-6",
|
|
545
|
-
info: "bg-blue-3 text-blue-9 lg:hover:bg-blue-4 lg:active:bg-blue-5 focus:ring-blue-9 border border-transparent",
|
|
546
|
-
success: "bg-green-4 text-green-9 lg:hover:bg-green-5 lg:active:bg-green-6 focus:ring-green-9 border border-transparent",
|
|
547
|
-
warning: "bg-yellow-4 text-yellow-9 lg:hover:bg-yellow-5 lg:active:bg-yellow-6 focus:ring-yellow-9 border border-transparent",
|
|
548
|
-
danger: "bg-red-4 text-red-9 lg:hover:bg-red-5 focus:ring-red-9 border border-transparent",
|
|
549
|
-
dangersolid: "bg-red-9 text-base-1 dark-theme:text-base-12 lg:hover:bg-red-8 focus:ring-base-6 border border-transparent",
|
|
543
|
+
contrast: "bg-base-12 text-base-1 lg:hover:bg-base-11 focus-visible:ring-base-6",
|
|
544
|
+
solid: "bg-base-3 dark-theme:bg-base-3 lg:hover:bg-base-4 border border-base-4 focus-visible:ring-base-5",
|
|
545
|
+
solidhybrid: "border border-base-5 dark-theme:border-base-4 dark-theme:bg-base-3 lg:hover:bg-base-4 focus-visible:ring-base-6",
|
|
546
|
+
outline: "border border-base-6 lg:hover:bg-base-3 focus-visible:ring-base-6",
|
|
547
|
+
info: "bg-blue-3 text-blue-9 lg:hover:bg-blue-4 lg:active:bg-blue-5 focus-visible:ring-blue-9 border border-transparent",
|
|
548
|
+
success: "bg-green-4 text-green-9 lg:hover:bg-green-5 lg:active:bg-green-6 focus-visible:ring-green-9 border border-transparent",
|
|
549
|
+
warning: "bg-yellow-4 text-yellow-9 lg:hover:bg-yellow-5 lg:active:bg-yellow-6 focus-visible:ring-yellow-9 border border-transparent",
|
|
550
|
+
danger: "bg-red-4 text-red-9 lg:hover:bg-red-5 focus-visible:ring-red-9 border border-transparent",
|
|
551
|
+
dangersolid: "bg-red-9 text-base-1 dark-theme:text-base-12 lg:hover:bg-red-8 focus-visible:ring-base-6 border border-transparent",
|
|
550
552
|
disabled: "bg-base-3 text-base-11 border border-transparent"
|
|
551
553
|
}, Gr = {
|
|
552
554
|
enabled: "",
|
|
@@ -574,7 +576,7 @@ const Vr = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
574
576
|
}, { ref: k, ripple: W } = Yr(
|
|
575
577
|
l,
|
|
576
578
|
e === "contrast" || c
|
|
577
|
-
), P =
|
|
579
|
+
), P = Fn(k, b);
|
|
578
580
|
return /* @__PURE__ */ d(
|
|
579
581
|
"button",
|
|
580
582
|
{
|
|
@@ -601,7 +603,7 @@ const Vr = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
601
603
|
}
|
|
602
604
|
);
|
|
603
605
|
X.displayName = "Button";
|
|
604
|
-
const
|
|
606
|
+
const _n = 6048e5, Jr = 864e5, nn = Symbol.for("constructDateFrom");
|
|
605
607
|
function Z(e, t) {
|
|
606
608
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && nn in e ? e[nn](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
607
609
|
}
|
|
@@ -633,7 +635,7 @@ function _e(e, t) {
|
|
|
633
635
|
function Ze(e, t) {
|
|
634
636
|
return _e(e, { ...t, weekStartsOn: 1 });
|
|
635
637
|
}
|
|
636
|
-
function
|
|
638
|
+
function jn(e, t) {
|
|
637
639
|
const n = q(e, t?.in), r = n.getFullYear(), o = Z(n, 0);
|
|
638
640
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
639
641
|
const a = Ze(o), s = Z(n, 0);
|
|
@@ -675,7 +677,7 @@ function eo(e, t, n) {
|
|
|
675
677
|
return Math.round((i - l) / Jr);
|
|
676
678
|
}
|
|
677
679
|
function to(e, t) {
|
|
678
|
-
const n =
|
|
680
|
+
const n = jn(e, t), r = Z(e, 0);
|
|
679
681
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Ze(r);
|
|
680
682
|
}
|
|
681
683
|
function wt(e, t, n) {
|
|
@@ -1022,7 +1024,7 @@ function Do(e, t) {
|
|
|
1022
1024
|
if (t(e[n]))
|
|
1023
1025
|
return n;
|
|
1024
1026
|
}
|
|
1025
|
-
function
|
|
1027
|
+
function In(e) {
|
|
1026
1028
|
return (t, n = {}) => {
|
|
1027
1029
|
const r = t.match(e.matchPattern);
|
|
1028
1030
|
if (!r) return null;
|
|
@@ -1102,7 +1104,7 @@ const So = /^(\d+)(th|st|nd|rd)?/i, To = /\d+/i, Co = {
|
|
|
1102
1104
|
night: /night/i
|
|
1103
1105
|
}
|
|
1104
1106
|
}, Ro = {
|
|
1105
|
-
ordinalNumber:
|
|
1107
|
+
ordinalNumber: In({
|
|
1106
1108
|
matchPattern: So,
|
|
1107
1109
|
parsePattern: To,
|
|
1108
1110
|
valueCallback: (e) => parseInt(e, 10)
|
|
@@ -1138,7 +1140,7 @@ const So = /^(\d+)(th|st|nd|rd)?/i, To = /\d+/i, Co = {
|
|
|
1138
1140
|
parsePatterns: Io,
|
|
1139
1141
|
defaultParseWidth: "any"
|
|
1140
1142
|
})
|
|
1141
|
-
},
|
|
1143
|
+
}, Rn = {
|
|
1142
1144
|
code: "en-US",
|
|
1143
1145
|
formatDistance: uo,
|
|
1144
1146
|
formatLong: bo,
|
|
@@ -1156,9 +1158,9 @@ function zo(e, t) {
|
|
|
1156
1158
|
}
|
|
1157
1159
|
function Yo(e, t) {
|
|
1158
1160
|
const n = q(e, t?.in), r = +Ze(n) - +to(n);
|
|
1159
|
-
return Math.round(r /
|
|
1161
|
+
return Math.round(r / _n) + 1;
|
|
1160
1162
|
}
|
|
1161
|
-
function
|
|
1163
|
+
function zn(e, t) {
|
|
1162
1164
|
const n = q(e, t?.in), r = n.getFullYear(), o = lt(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, s = Z(t?.in || e, 0);
|
|
1163
1165
|
s.setFullYear(r + 1, 0, a), s.setHours(0, 0, 0, 0);
|
|
1164
1166
|
const i = _e(s, t), l = Z(t?.in || e, 0);
|
|
@@ -1167,12 +1169,12 @@ function Rn(e, t) {
|
|
|
1167
1169
|
return +n >= +i ? r + 1 : +n >= +c ? r : r - 1;
|
|
1168
1170
|
}
|
|
1169
1171
|
function Ho(e, t) {
|
|
1170
|
-
const n = lt(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o =
|
|
1172
|
+
const n = lt(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = zn(e, t), a = Z(t?.in || e, 0);
|
|
1171
1173
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), _e(a, t);
|
|
1172
1174
|
}
|
|
1173
1175
|
function Bo(e, t) {
|
|
1174
1176
|
const n = q(e, t?.in), r = +_e(n, t) - +Ho(n, t);
|
|
1175
|
-
return Math.round(r /
|
|
1177
|
+
return Math.round(r / _n) + 1;
|
|
1176
1178
|
}
|
|
1177
1179
|
function S(e, t) {
|
|
1178
1180
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
@@ -1268,7 +1270,7 @@ const ue = {
|
|
|
1268
1270
|
},
|
|
1269
1271
|
// Local week-numbering year
|
|
1270
1272
|
Y: function(e, t, n, r) {
|
|
1271
|
-
const o =
|
|
1273
|
+
const o = zn(e, r), a = o > 0 ? o : 1 - o;
|
|
1272
1274
|
if (t === "YY") {
|
|
1273
1275
|
const s = a % 100;
|
|
1274
1276
|
return S(s, 2);
|
|
@@ -1277,7 +1279,7 @@ const ue = {
|
|
|
1277
1279
|
},
|
|
1278
1280
|
// ISO week-numbering year
|
|
1279
1281
|
R: function(e, t) {
|
|
1280
|
-
const n =
|
|
1282
|
+
const n = jn(e);
|
|
1281
1283
|
return S(n, t.length);
|
|
1282
1284
|
},
|
|
1283
1285
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1817,7 +1819,7 @@ const cn = (e, t) => {
|
|
|
1817
1819
|
default:
|
|
1818
1820
|
return t.date({ width: "full" });
|
|
1819
1821
|
}
|
|
1820
|
-
},
|
|
1822
|
+
}, Yn = (e, t) => {
|
|
1821
1823
|
switch (e) {
|
|
1822
1824
|
case "p":
|
|
1823
1825
|
return t.time({ width: "short" });
|
|
@@ -1849,9 +1851,9 @@ const cn = (e, t) => {
|
|
|
1849
1851
|
a = t.dateTime({ width: "full" });
|
|
1850
1852
|
break;
|
|
1851
1853
|
}
|
|
1852
|
-
return a.replace("{{date}}", cn(r, t)).replace("{{time}}",
|
|
1854
|
+
return a.replace("{{date}}", cn(r, t)).replace("{{time}}", Yn(o, t));
|
|
1853
1855
|
}, Ko = {
|
|
1854
|
-
p:
|
|
1856
|
+
p: Yn,
|
|
1855
1857
|
P: Vo
|
|
1856
1858
|
}, Xo = /^D+$/, qo = /^Y+$/, Uo = ["D", "DD", "YY", "YYYY"];
|
|
1857
1859
|
function Qo(e) {
|
|
@@ -1870,7 +1872,7 @@ function Zo(e, t, n) {
|
|
|
1870
1872
|
}
|
|
1871
1873
|
const ea = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ta = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, na = /^'([^]*?)'?$/, ra = /''/g, oa = /[a-zA-Z]/;
|
|
1872
1874
|
function ye(e, t, n) {
|
|
1873
|
-
const r = lt(), o = n?.locale ?? r.locale ??
|
|
1875
|
+
const r = lt(), o = n?.locale ?? r.locale ?? Rn, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = q(e, n?.in);
|
|
1874
1876
|
if (!ro(i))
|
|
1875
1877
|
throw new RangeError("Invalid time value");
|
|
1876
1878
|
let l = t.match(ta).map((u) => {
|
|
@@ -2241,7 +2243,7 @@ const sa = {
|
|
|
2241
2243
|
night: /noche/i
|
|
2242
2244
|
}
|
|
2243
2245
|
}, Wa = {
|
|
2244
|
-
ordinalNumber:
|
|
2246
|
+
ordinalNumber: In({
|
|
2245
2247
|
matchPattern: Ea,
|
|
2246
2248
|
parsePattern: $a,
|
|
2247
2249
|
valueCallback: function(e) {
|
|
@@ -2520,11 +2522,11 @@ ce(function() {
|
|
|
2520
2522
|
return _t() || Ka();
|
|
2521
2523
|
});
|
|
2522
2524
|
ce(function() {
|
|
2523
|
-
return ft(/AppleWebKit/i) && !
|
|
2525
|
+
return ft(/AppleWebKit/i) && !Hn();
|
|
2524
2526
|
});
|
|
2525
|
-
const
|
|
2527
|
+
const Hn = ce(function() {
|
|
2526
2528
|
return ft(/Chrome/i);
|
|
2527
|
-
}),
|
|
2529
|
+
}), Bn = ce(function() {
|
|
2528
2530
|
return ft(/Android/i);
|
|
2529
2531
|
});
|
|
2530
2532
|
ce(function() {
|
|
@@ -2563,7 +2565,7 @@ function qa(e) {
|
|
|
2563
2565
|
});
|
|
2564
2566
|
}
|
|
2565
2567
|
function Ua(e) {
|
|
2566
|
-
return e.pointerType === "" && e.isTrusted ? !0 :
|
|
2568
|
+
return e.pointerType === "" && e.isTrusted ? !0 : Bn() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
2567
2569
|
}
|
|
2568
2570
|
const Qa = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
2569
2571
|
function Ga(e) {
|
|
@@ -2605,12 +2607,12 @@ const It = [
|
|
|
2605
2607
|
It.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
2606
2608
|
const es = It.join(':not([hidden]):not([tabindex="-1"]),');
|
|
2607
2609
|
function ts(e) {
|
|
2608
|
-
return e.matches(Za) && jt(e) && !
|
|
2610
|
+
return e.matches(Za) && jt(e) && !Vn(e);
|
|
2609
2611
|
}
|
|
2610
2612
|
function ns(e) {
|
|
2611
|
-
return e.matches(es) && jt(e) && !
|
|
2613
|
+
return e.matches(es) && jt(e) && !Vn(e);
|
|
2612
2614
|
}
|
|
2613
|
-
function
|
|
2615
|
+
function Vn(e) {
|
|
2614
2616
|
let t = e;
|
|
2615
2617
|
for (; t != null; ) {
|
|
2616
2618
|
if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
|
|
@@ -2631,13 +2633,13 @@ function nt(e) {
|
|
|
2631
2633
|
function Q(e) {
|
|
2632
2634
|
He = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (xe = !0, Rt("pointer", e));
|
|
2633
2635
|
}
|
|
2634
|
-
function
|
|
2636
|
+
function Kn(e) {
|
|
2635
2637
|
Ua(e) && (xe = !0, He = "virtual");
|
|
2636
2638
|
}
|
|
2637
|
-
function
|
|
2639
|
+
function Xn(e) {
|
|
2638
2640
|
e.target === window || e.target === document || rs || !e.isTrusted || (!xe && !Dt && (He = "virtual", Rt("virtual", e)), xe = !1, Dt = !1);
|
|
2639
2641
|
}
|
|
2640
|
-
function
|
|
2642
|
+
function qn() {
|
|
2641
2643
|
xe = !1, Dt = !0;
|
|
2642
2644
|
}
|
|
2643
2645
|
function hn(e) {
|
|
@@ -2646,32 +2648,32 @@ function hn(e) {
|
|
|
2646
2648
|
let r = t.HTMLElement.prototype.focus;
|
|
2647
2649
|
t.HTMLElement.prototype.focus = function() {
|
|
2648
2650
|
xe = !0, r.apply(this, arguments);
|
|
2649
|
-
}, n.addEventListener("keydown", nt, !0), n.addEventListener("keyup", nt, !0), n.addEventListener("click",
|
|
2650
|
-
|
|
2651
|
+
}, n.addEventListener("keydown", nt, !0), n.addEventListener("keyup", nt, !0), n.addEventListener("click", Kn, !0), t.addEventListener("focus", Xn, !0), t.addEventListener("blur", qn, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", Q, !0), n.addEventListener("pointermove", Q, !0), n.addEventListener("pointerup", Q, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", Q, !0), n.addEventListener("mousemove", Q, !0), n.addEventListener("mouseup", Q, !0)), t.addEventListener("beforeunload", () => {
|
|
2652
|
+
Un(e);
|
|
2651
2653
|
}, {
|
|
2652
2654
|
once: !0
|
|
2653
2655
|
}), We.set(t, {
|
|
2654
2656
|
focus: r
|
|
2655
2657
|
});
|
|
2656
2658
|
}
|
|
2657
|
-
const
|
|
2659
|
+
const Un = (e, t) => {
|
|
2658
2660
|
const n = tt(e), r = R(e);
|
|
2659
|
-
t && r.removeEventListener("DOMContentLoaded", t), We.has(n) && (n.HTMLElement.prototype.focus = We.get(n).focus, r.removeEventListener("keydown", nt, !0), r.removeEventListener("keyup", nt, !0), r.removeEventListener("click",
|
|
2661
|
+
t && r.removeEventListener("DOMContentLoaded", t), We.has(n) && (n.HTMLElement.prototype.focus = We.get(n).focus, r.removeEventListener("keydown", nt, !0), r.removeEventListener("keyup", nt, !0), r.removeEventListener("click", Kn, !0), n.removeEventListener("focus", Xn, !0), n.removeEventListener("blur", qn, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", Q, !0), r.removeEventListener("pointermove", Q, !0), r.removeEventListener("pointerup", Q, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", Q, !0), r.removeEventListener("mousemove", Q, !0), r.removeEventListener("mouseup", Q, !0)), We.delete(n));
|
|
2660
2662
|
};
|
|
2661
2663
|
function ss(e) {
|
|
2662
2664
|
const t = R(e);
|
|
2663
2665
|
let n;
|
|
2664
2666
|
return t.readyState !== "loading" ? hn(e) : (n = () => {
|
|
2665
2667
|
hn(e);
|
|
2666
|
-
}, t.addEventListener("DOMContentLoaded", n)), () =>
|
|
2668
|
+
}, t.addEventListener("DOMContentLoaded", n)), () => Un(e, n);
|
|
2667
2669
|
}
|
|
2668
2670
|
typeof document < "u" && ss();
|
|
2669
|
-
function
|
|
2671
|
+
function Qn() {
|
|
2670
2672
|
return He;
|
|
2671
2673
|
}
|
|
2672
2674
|
function is(e) {
|
|
2673
2675
|
const t = R(e), n = J(t);
|
|
2674
|
-
if (
|
|
2676
|
+
if (Qn() === "virtual") {
|
|
2675
2677
|
let r = n;
|
|
2676
2678
|
qa(() => {
|
|
2677
2679
|
J(t) === r && e.isConnected && dn(e);
|
|
@@ -2687,17 +2689,17 @@ function cs(e) {
|
|
|
2687
2689
|
i
|
|
2688
2690
|
]);
|
|
2689
2691
|
oe(() => {
|
|
2690
|
-
let h = l ||
|
|
2691
|
-
if (
|
|
2692
|
-
let m =
|
|
2692
|
+
let h = l || A.root;
|
|
2693
|
+
if (A.getTreeNode(h.scopeRef) && L && !rt(L, h.scopeRef)) {
|
|
2694
|
+
let m = A.getTreeNode(L);
|
|
2693
2695
|
m && (h = m);
|
|
2694
2696
|
}
|
|
2695
|
-
h.addChild(c),
|
|
2697
|
+
h.addChild(c), A.addNode(c);
|
|
2696
2698
|
}, [
|
|
2697
2699
|
c,
|
|
2698
2700
|
l
|
|
2699
2701
|
]), oe(() => {
|
|
2700
|
-
let h =
|
|
2702
|
+
let h = A.getTreeNode(i);
|
|
2701
2703
|
h && (h.contain = !!n);
|
|
2702
2704
|
}, [
|
|
2703
2705
|
n
|
|
@@ -2711,19 +2713,19 @@ function cs(e) {
|
|
|
2711
2713
|
};
|
|
2712
2714
|
}, [
|
|
2713
2715
|
t
|
|
2714
|
-
]), hs(i, r, n), ds(i, n), ms(i, r, n), fs(i, o),
|
|
2716
|
+
]), hs(i, r, n), ds(i, n), ms(i, r, n), fs(i, o), _(() => {
|
|
2715
2717
|
const h = J(R(i.current ? i.current[0] : void 0));
|
|
2716
2718
|
let m = null;
|
|
2717
2719
|
if (G(h, i.current)) {
|
|
2718
|
-
for (let b of
|
|
2719
|
-
m ===
|
|
2720
|
+
for (let b of A.traverse()) b.scopeRef && G(h, b.scopeRef.current) && (m = b);
|
|
2721
|
+
m === A.getTreeNode(i) && (L = m.scopeRef);
|
|
2720
2722
|
}
|
|
2721
2723
|
}, [
|
|
2722
2724
|
i
|
|
2723
2725
|
]), oe(() => () => {
|
|
2724
2726
|
var h, m, b;
|
|
2725
|
-
let y = (b = (m =
|
|
2726
|
-
(i === L || rt(i, L)) && (!y ||
|
|
2727
|
+
let y = (b = (m = A.getTreeNode(i)) === null || m === void 0 || (h = m.parent) === null || h === void 0 ? void 0 : h.scopeRef) !== null && b !== void 0 ? b : null;
|
|
2728
|
+
(i === L || rt(i, L)) && (!y || A.getTreeNode(y)) && (L = y), A.removeTreeNode(i);
|
|
2727
2729
|
}, [
|
|
2728
2730
|
i
|
|
2729
2731
|
]);
|
|
@@ -2794,7 +2796,7 @@ function ge(e) {
|
|
|
2794
2796
|
return e[0].parentElement;
|
|
2795
2797
|
}
|
|
2796
2798
|
function Le(e) {
|
|
2797
|
-
let t =
|
|
2799
|
+
let t = A.getTreeNode(L);
|
|
2798
2800
|
for (; t && t.scopeRef !== e; ) {
|
|
2799
2801
|
if (t.contain) return !1;
|
|
2800
2802
|
t = t.parent;
|
|
@@ -2840,7 +2842,7 @@ function ds(e, t) {
|
|
|
2840
2842
|
(!L || rt(L, e)) && G(De(c), e.current) ? (L = e, n.current = De(c)) : Le(e) && !ve(De(c), e) ? n.current ? n.current.focus() : L && L.current && Tt(L.current) : Le(e) && (n.current = De(c));
|
|
2841
2843
|
}, l = (c) => {
|
|
2842
2844
|
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2843
|
-
let u =
|
|
2845
|
+
let u = Qn(), f = (u === "virtual" || u === null) && Bn() && Hn(), h = J(a);
|
|
2844
2846
|
if (!f && h && Le(e) && !ve(h, e)) {
|
|
2845
2847
|
L = e;
|
|
2846
2848
|
let b = De(c);
|
|
@@ -2863,7 +2865,7 @@ function ds(e, t) {
|
|
|
2863
2865
|
r
|
|
2864
2866
|
]);
|
|
2865
2867
|
}
|
|
2866
|
-
function
|
|
2868
|
+
function Gn(e) {
|
|
2867
2869
|
return ve(e);
|
|
2868
2870
|
}
|
|
2869
2871
|
function G(e, t) {
|
|
@@ -2871,13 +2873,13 @@ function G(e, t) {
|
|
|
2871
2873
|
}
|
|
2872
2874
|
function ve(e, t = null) {
|
|
2873
2875
|
if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
|
|
2874
|
-
for (let { scopeRef: n } of
|
|
2876
|
+
for (let { scopeRef: n } of A.traverse(A.getTreeNode(t)))
|
|
2875
2877
|
if (n && G(e, n.current)) return !0;
|
|
2876
2878
|
return !1;
|
|
2877
2879
|
}
|
|
2878
2880
|
function rt(e, t) {
|
|
2879
2881
|
var n;
|
|
2880
|
-
let r = (n =
|
|
2882
|
+
let r = (n = A.getTreeNode(t)) === null || n === void 0 ? void 0 : n.parent;
|
|
2881
2883
|
for (; r; ) {
|
|
2882
2884
|
if (r.scopeRef === e) return !0;
|
|
2883
2885
|
r = r.parent;
|
|
@@ -2894,7 +2896,7 @@ function se(e, t = !1) {
|
|
|
2894
2896
|
} catch {
|
|
2895
2897
|
}
|
|
2896
2898
|
}
|
|
2897
|
-
function
|
|
2899
|
+
function Jn(e, t = !0) {
|
|
2898
2900
|
let n = e[0].previousElementSibling, r = ge(e), o = he(r, {
|
|
2899
2901
|
tabbable: t
|
|
2900
2902
|
}, e);
|
|
@@ -2905,11 +2907,11 @@ function Gn(e, t = !0) {
|
|
|
2905
2907
|
}, e), o.currentNode = n, a = o.nextNode()), a;
|
|
2906
2908
|
}
|
|
2907
2909
|
function Tt(e, t = !0) {
|
|
2908
|
-
se(
|
|
2910
|
+
se(Jn(e, t));
|
|
2909
2911
|
}
|
|
2910
2912
|
function fs(e, t) {
|
|
2911
2913
|
const n = Te.useRef(t);
|
|
2912
|
-
|
|
2914
|
+
_(() => {
|
|
2913
2915
|
if (n.current) {
|
|
2914
2916
|
L = e;
|
|
2915
2917
|
const r = R(e.current ? e.current[0] : void 0);
|
|
@@ -2927,7 +2929,7 @@ function hs(e, t, n) {
|
|
|
2927
2929
|
const o = R(r ? r[0] : void 0);
|
|
2928
2930
|
let a = (s) => {
|
|
2929
2931
|
let i = De(s);
|
|
2930
|
-
G(i, e.current) ? L = e :
|
|
2932
|
+
G(i, e.current) ? L = e : Gn(i) || (L = null);
|
|
2931
2933
|
};
|
|
2932
2934
|
return o.addEventListener("focusin", a, !1), r?.forEach((s) => s.addEventListener("focusin", a, !1)), () => {
|
|
2933
2935
|
o.removeEventListener("focusin", a, !1), r?.forEach((s) => s.removeEventListener("focusin", a, !1));
|
|
@@ -2939,7 +2941,7 @@ function hs(e, t, n) {
|
|
|
2939
2941
|
]);
|
|
2940
2942
|
}
|
|
2941
2943
|
function bn(e) {
|
|
2942
|
-
let t =
|
|
2944
|
+
let t = A.getTreeNode(L);
|
|
2943
2945
|
for (; t && t.scopeRef !== e; ) {
|
|
2944
2946
|
if (t.nodeToRestore) return !1;
|
|
2945
2947
|
t = t.parent;
|
|
@@ -2968,7 +2970,7 @@ function ms(e, t, n) {
|
|
|
2968
2970
|
if (s.key !== "Tab" || s.altKey || s.ctrlKey || s.metaKey || !Le(e) || s.isComposing) return;
|
|
2969
2971
|
let i = o.activeElement;
|
|
2970
2972
|
if (!ve(i, e) || !bn(e)) return;
|
|
2971
|
-
let l =
|
|
2973
|
+
let l = A.getTreeNode(e);
|
|
2972
2974
|
if (!l) return;
|
|
2973
2975
|
let c = l.nodeToRestore, u = he(o.body, {
|
|
2974
2976
|
tabbable: !0
|
|
@@ -2980,7 +2982,7 @@ function ms(e, t, n) {
|
|
|
2980
2982
|
do
|
|
2981
2983
|
f = s.shiftKey ? u.previousNode() : u.nextNode();
|
|
2982
2984
|
while (ve(f, e));
|
|
2983
|
-
s.preventDefault(), s.stopPropagation(), f ? se(f, !0) :
|
|
2985
|
+
s.preventDefault(), s.stopPropagation(), f ? se(f, !0) : Gn(c) ? se(c, !0) : i.blur();
|
|
2984
2986
|
}
|
|
2985
2987
|
};
|
|
2986
2988
|
return n || o.addEventListener("keydown", a, !0), () => {
|
|
@@ -2993,15 +2995,15 @@ function ms(e, t, n) {
|
|
|
2993
2995
|
]), oe(() => {
|
|
2994
2996
|
const o = R(e.current ? e.current[0] : void 0);
|
|
2995
2997
|
if (!t) return;
|
|
2996
|
-
let a =
|
|
2998
|
+
let a = A.getTreeNode(e);
|
|
2997
2999
|
if (a) {
|
|
2998
3000
|
var s;
|
|
2999
3001
|
return a.nodeToRestore = (s = r.current) !== null && s !== void 0 ? s : void 0, () => {
|
|
3000
|
-
let i =
|
|
3002
|
+
let i = A.getTreeNode(e);
|
|
3001
3003
|
if (!i) return;
|
|
3002
3004
|
let l = i.nodeToRestore, c = J(o);
|
|
3003
3005
|
if (t && l && (c && ve(c, e) || c === o.body && bn(e))) {
|
|
3004
|
-
let u =
|
|
3006
|
+
let u = A.clone();
|
|
3005
3007
|
requestAnimationFrame(() => {
|
|
3006
3008
|
if (o.activeElement === o.body) {
|
|
3007
3009
|
let f = u.getTreeNode(e);
|
|
@@ -3013,8 +3015,8 @@ function ms(e, t, n) {
|
|
|
3013
3015
|
f = f.parent;
|
|
3014
3016
|
}
|
|
3015
3017
|
for (f = u.getTreeNode(e); f; ) {
|
|
3016
|
-
if (f.scopeRef && f.scopeRef.current &&
|
|
3017
|
-
let h =
|
|
3018
|
+
if (f.scopeRef && f.scopeRef.current && A.getTreeNode(f.scopeRef)) {
|
|
3019
|
+
let h = Jn(f.scopeRef.current, !0);
|
|
3018
3020
|
pn(h);
|
|
3019
3021
|
return;
|
|
3020
3022
|
}
|
|
@@ -3100,8 +3102,8 @@ class Ct {
|
|
|
3100
3102
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
|
|
3101
3103
|
}
|
|
3102
3104
|
}
|
|
3103
|
-
let
|
|
3104
|
-
const Yt = ({ children: e, node: t }) =>
|
|
3105
|
+
let A = new zt();
|
|
3106
|
+
const Yt = ({ children: e, node: t }) => kn(e, t ?? document.body), bs = ({
|
|
3105
3107
|
children: e,
|
|
3106
3108
|
customTrigger: t,
|
|
3107
3109
|
triggerContent: n,
|
|
@@ -3127,7 +3129,7 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3127
3129
|
open: P,
|
|
3128
3130
|
toggle: O,
|
|
3129
3131
|
close: g
|
|
3130
|
-
} =
|
|
3132
|
+
} = Wn({
|
|
3131
3133
|
align: r,
|
|
3132
3134
|
side: o,
|
|
3133
3135
|
offset: a,
|
|
@@ -3146,7 +3148,7 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3146
3148
|
}
|
|
3147
3149
|
},
|
|
3148
3150
|
{ enabled: P }
|
|
3149
|
-
),
|
|
3151
|
+
), An(k, (T) => {
|
|
3150
3152
|
!c || !x.current || !P || !T.target || x.current.contains(T.target) || g();
|
|
3151
3153
|
});
|
|
3152
3154
|
const w = W();
|
|
@@ -3165,7 +3167,7 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3165
3167
|
onClick: O,
|
|
3166
3168
|
className: v(
|
|
3167
3169
|
"outline-none p-2 rounded-md transition-colors",
|
|
3168
|
-
"hover:bg-base-3 focus:bg-base-3 focus:ring-2 focus:ring-brand",
|
|
3170
|
+
"hover:bg-base-3 focus-visible:bg-base-3 focus-visible:ring-2 focus-visible:ring-brand",
|
|
3169
3171
|
i
|
|
3170
3172
|
),
|
|
3171
3173
|
children: n
|
|
@@ -3241,12 +3243,12 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3241
3243
|
const a = new Date(n);
|
|
3242
3244
|
a.setDate(n.getDate() + o), r.push(
|
|
3243
3245
|
ye(a, "EEE", {
|
|
3244
|
-
locale: e ??
|
|
3246
|
+
locale: e ?? Rn
|
|
3245
3247
|
})
|
|
3246
3248
|
);
|
|
3247
3249
|
}
|
|
3248
3250
|
return t ? [...r.slice(1), r[0]] : r;
|
|
3249
|
-
},
|
|
3251
|
+
}, Zn = ({
|
|
3250
3252
|
selectedDate: e,
|
|
3251
3253
|
onDateSelect: t,
|
|
3252
3254
|
disabledDates: n,
|
|
@@ -3340,7 +3342,7 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3340
3342
|
onClick: () => O("prev"),
|
|
3341
3343
|
size: "iconSm",
|
|
3342
3344
|
"aria-label": "Previous month",
|
|
3343
|
-
children: /* @__PURE__ */ d(
|
|
3345
|
+
children: /* @__PURE__ */ d(Mn, { size: 16 })
|
|
3344
3346
|
}
|
|
3345
3347
|
),
|
|
3346
3348
|
/* @__PURE__ */ d("h2", { className: "text-sm font-medium", children: ye(c, "MMMM yyyy") }),
|
|
@@ -3350,7 +3352,7 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3350
3352
|
onClick: () => O("next"),
|
|
3351
3353
|
size: "iconSm",
|
|
3352
3354
|
"aria-label": "Next month",
|
|
3353
|
-
children: /* @__PURE__ */ d(
|
|
3355
|
+
children: /* @__PURE__ */ d(Dn, { size: 16 })
|
|
3354
3356
|
}
|
|
3355
3357
|
)
|
|
3356
3358
|
] }),
|
|
@@ -3401,7 +3403,7 @@ const Yt = ({ children: e, node: t }) => $n(e, t ?? document.body), bs = ({
|
|
|
3401
3403
|
return /* @__PURE__ */ d("div", { className: "p-8 bg-gray-100 min-h-screen", children: /* @__PURE__ */ p("div", { className: "max-w-md mx-auto", children: [
|
|
3402
3404
|
/* @__PURE__ */ d("h1", { className: "text-2xl font-bold mb-6 text-gray-800", children: "Calendar Date Picker Demo" }),
|
|
3403
3405
|
/* @__PURE__ */ d("div", { className: "mb-6", children: /* @__PURE__ */ d(
|
|
3404
|
-
|
|
3406
|
+
Zn,
|
|
3405
3407
|
{
|
|
3406
3408
|
selectedDate: e,
|
|
3407
3409
|
onDateSelect: t,
|
|
@@ -3487,12 +3489,12 @@ function Ti({
|
|
|
3487
3489
|
children: [
|
|
3488
3490
|
ye(/* @__PURE__ */ new Date(), "PP", { locale: je }),
|
|
3489
3491
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3490
|
-
/* @__PURE__ */ d(
|
|
3492
|
+
/* @__PURE__ */ d(Sn, { size: 18, className: "text-base-11" })
|
|
3491
3493
|
]
|
|
3492
3494
|
}
|
|
3493
3495
|
),
|
|
3494
3496
|
children: (o) => /* @__PURE__ */ d(
|
|
3495
|
-
|
|
3497
|
+
Zn,
|
|
3496
3498
|
{
|
|
3497
3499
|
selectedDate: n,
|
|
3498
3500
|
onDateSelect: (a) => {
|
|
@@ -3510,7 +3512,7 @@ const Ci = () => /* @__PURE__ */ p("div", { children: [
|
|
|
3510
3512
|
/* @__PURE__ */ p(X, { color: "solid", className: "px-3 mt-1", children: [
|
|
3511
3513
|
ye(/* @__PURE__ */ new Date(), "p", { locale: je }),
|
|
3512
3514
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3513
|
-
/* @__PURE__ */ d(
|
|
3515
|
+
/* @__PURE__ */ d(Tn, { size: 18, className: "text-base-11" })
|
|
3514
3516
|
] })
|
|
3515
3517
|
] }), Pi = () => /* @__PURE__ */ p("div", { className: "flex items-center gap-x-4", children: [
|
|
3516
3518
|
/* @__PURE__ */ p("div", { className: "grow", children: [
|
|
@@ -3518,7 +3520,7 @@ const Ci = () => /* @__PURE__ */ p("div", { children: [
|
|
|
3518
3520
|
/* @__PURE__ */ p(X, { color: "solid", className: "px-3 mt-1 w-full justify-start", children: [
|
|
3519
3521
|
ye(/* @__PURE__ */ new Date(), "PP", { locale: je }),
|
|
3520
3522
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3521
|
-
/* @__PURE__ */ d(
|
|
3523
|
+
/* @__PURE__ */ d(Sn, { size: 18, className: "text-base-11" })
|
|
3522
3524
|
] })
|
|
3523
3525
|
] }),
|
|
3524
3526
|
/* @__PURE__ */ p("div", { children: [
|
|
@@ -3526,7 +3528,7 @@ const Ci = () => /* @__PURE__ */ p("div", { children: [
|
|
|
3526
3528
|
/* @__PURE__ */ p(X, { color: "solid", className: "px-3 mt-1", children: [
|
|
3527
3529
|
ye(/* @__PURE__ */ new Date(), "p", { locale: je }),
|
|
3528
3530
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3529
|
-
/* @__PURE__ */ d(
|
|
3531
|
+
/* @__PURE__ */ d(Tn, { size: 18, className: "text-base-11" })
|
|
3530
3532
|
] })
|
|
3531
3533
|
] })
|
|
3532
3534
|
] }), Xe = {
|
|
@@ -3577,7 +3579,7 @@ const Ci = () => /* @__PURE__ */ p("div", { children: [
|
|
|
3577
3579
|
className: v(
|
|
3578
3580
|
// Base styles
|
|
3579
3581
|
"inline-flex items-center justify-center rounded-2 border border-base-4 transition-all duration-200 ease-in-out",
|
|
3580
|
-
"focus:outline-none focus:ring-2 focus:ring-base-5",
|
|
3582
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-base-5",
|
|
3581
3583
|
// Size
|
|
3582
3584
|
m[l],
|
|
3583
3585
|
// Disabled state
|
|
@@ -3591,7 +3593,7 @@ const Ci = () => /* @__PURE__ */ p("div", { children: [
|
|
|
3591
3593
|
...c,
|
|
3592
3594
|
children: [
|
|
3593
3595
|
e === !0 && /* @__PURE__ */ d(
|
|
3594
|
-
|
|
3596
|
+
Cn,
|
|
3595
3597
|
{
|
|
3596
3598
|
size: b[l],
|
|
3597
3599
|
className: "stroke-current"
|
|
@@ -3627,7 +3629,7 @@ const Ci = () => /* @__PURE__ */ p("div", { children: [
|
|
|
3627
3629
|
}
|
|
3628
3630
|
);
|
|
3629
3631
|
gs.displayName = "Checkbox";
|
|
3630
|
-
function
|
|
3632
|
+
function er(e, t, n) {
|
|
3631
3633
|
function r(i, l) {
|
|
3632
3634
|
var c;
|
|
3633
3635
|
Object.defineProperty(i, "_zod", {
|
|
@@ -3660,18 +3662,18 @@ class vs extends Error {
|
|
|
3660
3662
|
}
|
|
3661
3663
|
}
|
|
3662
3664
|
const ws = {};
|
|
3663
|
-
function
|
|
3665
|
+
function tr(e) {
|
|
3664
3666
|
return ws;
|
|
3665
3667
|
}
|
|
3666
3668
|
function ys(e, t) {
|
|
3667
3669
|
return typeof t == "bigint" ? t.toString() : t;
|
|
3668
3670
|
}
|
|
3669
|
-
const
|
|
3671
|
+
const nr = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
|
|
3670
3672
|
};
|
|
3671
3673
|
function qe(e) {
|
|
3672
3674
|
return typeof e == "string" ? e : e?.message;
|
|
3673
3675
|
}
|
|
3674
|
-
function
|
|
3676
|
+
function rr(e, t, n) {
|
|
3675
3677
|
const r = { ...e, path: e.path ?? [] };
|
|
3676
3678
|
if (!e.message) {
|
|
3677
3679
|
const o = qe(e.inst?._zod.def?.error?.(e)) ?? qe(t?.error?.(e)) ?? qe(n.customError?.(e)) ?? qe(n.localeError?.(e)) ?? "Invalid input";
|
|
@@ -3679,7 +3681,7 @@ function nr(e, t, n) {
|
|
|
3679
3681
|
}
|
|
3680
3682
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
3681
3683
|
}
|
|
3682
|
-
const
|
|
3684
|
+
const or = (e, t) => {
|
|
3683
3685
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
3684
3686
|
value: e._zod,
|
|
3685
3687
|
enumerable: !1
|
|
@@ -3696,24 +3698,24 @@ const rr = (e, t) => {
|
|
|
3696
3698
|
value: () => e.message,
|
|
3697
3699
|
enumerable: !1
|
|
3698
3700
|
});
|
|
3699
|
-
}, xs =
|
|
3701
|
+
}, xs = er("$ZodError", or), ar = er("$ZodError", or, { Parent: Error }), Ns = (e) => (t, n, r, o) => {
|
|
3700
3702
|
const a = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, a);
|
|
3701
3703
|
if (s instanceof Promise)
|
|
3702
3704
|
throw new vs();
|
|
3703
3705
|
if (s.issues.length) {
|
|
3704
|
-
const i = new (o?.Err ?? e)(s.issues.map((l) =>
|
|
3705
|
-
throw
|
|
3706
|
+
const i = new (o?.Err ?? e)(s.issues.map((l) => rr(l, a, tr())));
|
|
3707
|
+
throw nr(i, o?.callee), i;
|
|
3706
3708
|
}
|
|
3707
3709
|
return s.value;
|
|
3708
|
-
}, Es = /* @__PURE__ */ Ns(
|
|
3710
|
+
}, Es = /* @__PURE__ */ Ns(ar), $s = (e) => async (t, n, r, o) => {
|
|
3709
3711
|
const a = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
3710
3712
|
let s = t._zod.run({ value: n, issues: [] }, a);
|
|
3711
3713
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
3712
|
-
const i = new (o?.Err ?? e)(s.issues.map((l) =>
|
|
3713
|
-
throw
|
|
3714
|
+
const i = new (o?.Err ?? e)(s.issues.map((l) => rr(l, a, tr())));
|
|
3715
|
+
throw nr(i, o?.callee), i;
|
|
3714
3716
|
}
|
|
3715
3717
|
return s.value;
|
|
3716
|
-
}, ks = /* @__PURE__ */ $s(
|
|
3718
|
+
}, ks = /* @__PURE__ */ $s(ar);
|
|
3717
3719
|
function gn(e, t) {
|
|
3718
3720
|
try {
|
|
3719
3721
|
var n = e();
|
|
@@ -3735,7 +3737,7 @@ function Ms(e, t) {
|
|
|
3735
3737
|
});
|
|
3736
3738
|
}), t) {
|
|
3737
3739
|
var l = n[s].types, c = l && l[r.code];
|
|
3738
|
-
n[s] =
|
|
3740
|
+
n[s] = On(s, t, n, o, c ? [].concat(c, r.message) : r.message);
|
|
3739
3741
|
}
|
|
3740
3742
|
e.shift();
|
|
3741
3743
|
}
|
|
@@ -3754,7 +3756,7 @@ function Ds(e, t) {
|
|
|
3754
3756
|
});
|
|
3755
3757
|
}), t) {
|
|
3756
3758
|
var l = n[s].types, c = l && l[r.code];
|
|
3757
|
-
n[s] =
|
|
3759
|
+
n[s] = On(s, t, n, o, c ? [].concat(c, r.message) : r.message);
|
|
3758
3760
|
}
|
|
3759
3761
|
e.shift();
|
|
3760
3762
|
}
|
|
@@ -3854,7 +3856,7 @@ const Ts = ({
|
|
|
3854
3856
|
}, Ps = {
|
|
3855
3857
|
brand: "ring-1 ring-brand",
|
|
3856
3858
|
solid: "ring-1 ring-base-6"
|
|
3857
|
-
},
|
|
3859
|
+
}, sr = Ye(
|
|
3858
3860
|
({
|
|
3859
3861
|
label: e,
|
|
3860
3862
|
description: t,
|
|
@@ -3875,7 +3877,7 @@ const Ts = ({
|
|
|
3875
3877
|
...x
|
|
3876
3878
|
}, $) => {
|
|
3877
3879
|
const k = E(null), W = E(!1), [P, O] = F(!1), [g, w] = F(!1), T = b === "password", I = T && P ? "text" : c ? "number" : b, H = y !== "" && y !== null && y !== void 0;
|
|
3878
|
-
return
|
|
3880
|
+
return _(() => {
|
|
3879
3881
|
if (!W.current) {
|
|
3880
3882
|
W.current = !0;
|
|
3881
3883
|
return;
|
|
@@ -3937,7 +3939,7 @@ const Ts = ({
|
|
|
3937
3939
|
},
|
|
3938
3940
|
type: I,
|
|
3939
3941
|
className: v(
|
|
3940
|
-
"w-full bg-transparent focus:outline-none",
|
|
3942
|
+
"w-full bg-transparent focus-visible:outline-none",
|
|
3941
3943
|
"placeholder:text-sm text-sm placeholder:text-base-11",
|
|
3942
3944
|
c || u ? "pl-9" : "pl-3",
|
|
3943
3945
|
{
|
|
@@ -3994,7 +3996,7 @@ const Ts = ({
|
|
|
3994
3996
|
] });
|
|
3995
3997
|
}
|
|
3996
3998
|
);
|
|
3997
|
-
|
|
3999
|
+
sr.displayName = "Input";
|
|
3998
4000
|
const Fi = ({
|
|
3999
4001
|
name: e,
|
|
4000
4002
|
customRead: t,
|
|
@@ -4003,7 +4005,7 @@ const Fi = ({
|
|
|
4003
4005
|
...o
|
|
4004
4006
|
}) => {
|
|
4005
4007
|
const { control: a } = it(), s = B(
|
|
4006
|
-
(l) => t ? t(l) : l === null ?
|
|
4008
|
+
(l) => t ? t(l) : l === null ? Ln(l) : l,
|
|
4007
4009
|
[t]
|
|
4008
4010
|
), i = B(
|
|
4009
4011
|
(l) => n ? r && l === null ? $t(l) : n(l) : l === null ? $t(l) : l,
|
|
@@ -4015,7 +4017,7 @@ const Fi = ({
|
|
|
4015
4017
|
name: e,
|
|
4016
4018
|
control: a,
|
|
4017
4019
|
render: ({ field: l, fieldState: c }) => /* @__PURE__ */ d(
|
|
4018
|
-
|
|
4020
|
+
sr,
|
|
4019
4021
|
{
|
|
4020
4022
|
value: s(l.value),
|
|
4021
4023
|
onChange: (u) => l.onChange(i(u.target.value)),
|
|
@@ -4030,11 +4032,11 @@ const Fi = ({
|
|
|
4030
4032
|
"Form control missing for field: ",
|
|
4031
4033
|
e
|
|
4032
4034
|
] }));
|
|
4033
|
-
},
|
|
4035
|
+
}, ir = Ot(null), Os = ({
|
|
4034
4036
|
children: e,
|
|
4035
4037
|
value: t
|
|
4036
|
-
}) => /* @__PURE__ */ d(
|
|
4037
|
-
const e = at(
|
|
4038
|
+
}) => /* @__PURE__ */ d(ir.Provider, { value: t, children: e }), Ls = () => {
|
|
4039
|
+
const e = at(ir);
|
|
4038
4040
|
if (!e)
|
|
4039
4041
|
throw new Error("useAliveScope must be wrapped within AliveScopeProvider");
|
|
4040
4042
|
return e;
|
|
@@ -4081,16 +4083,16 @@ const Fi = ({
|
|
|
4081
4083
|
]
|
|
4082
4084
|
}
|
|
4083
4085
|
);
|
|
4084
|
-
},
|
|
4086
|
+
}, cr = Ot(
|
|
4085
4087
|
null
|
|
4086
4088
|
), Fs = ({
|
|
4087
4089
|
children: e,
|
|
4088
4090
|
value: t
|
|
4089
|
-
}) => /* @__PURE__ */ d(
|
|
4091
|
+
}) => /* @__PURE__ */ d(cr.Provider, { value: t, children: e }), Ws = Nr(({ id: e, onMountCallbacks: t, onDropCallbacks: n, children: r, element: o }) => /* @__PURE__ */ d(
|
|
4090
4092
|
Fs,
|
|
4091
4093
|
{
|
|
4092
4094
|
value: { keepAliveId: e, onKeepAliveMount: (i, l = { runOnFirstMount: !1 }) => {
|
|
4093
|
-
|
|
4095
|
+
_(() => {
|
|
4094
4096
|
const c = () => {
|
|
4095
4097
|
if (document.getElementById(e))
|
|
4096
4098
|
i(e);
|
|
@@ -4111,16 +4113,16 @@ const Fi = ({
|
|
|
4111
4113
|
};
|
|
4112
4114
|
}, []);
|
|
4113
4115
|
}, onKeepAliveDrop: (i) => {
|
|
4114
|
-
|
|
4116
|
+
_(() => (n.current[e].push(i), () => {
|
|
4115
4117
|
n.current[e] = n.current[e].filter(
|
|
4116
4118
|
(l) => l !== i
|
|
4117
4119
|
);
|
|
4118
4120
|
}), []);
|
|
4119
4121
|
} },
|
|
4120
|
-
children:
|
|
4122
|
+
children: kn(r, o, e)
|
|
4121
4123
|
}
|
|
4122
4124
|
)), Ai = () => {
|
|
4123
|
-
const e = at(
|
|
4125
|
+
const e = at(cr);
|
|
4124
4126
|
if (!e)
|
|
4125
4127
|
throw new Error("useKeepAlive must be used within KeepAliveProvider");
|
|
4126
4128
|
return e;
|
|
@@ -4131,7 +4133,7 @@ const Fi = ({
|
|
|
4131
4133
|
...r
|
|
4132
4134
|
}) => {
|
|
4133
4135
|
const o = E(null), { getPortalElement: a } = Ls();
|
|
4134
|
-
return
|
|
4136
|
+
return _(() => {
|
|
4135
4137
|
const s = a(e, t, r.className);
|
|
4136
4138
|
return n && o.current && o.current.replaceWith(s), () => {
|
|
4137
4139
|
};
|
|
@@ -4164,7 +4166,7 @@ const Fi = ({
|
|
|
4164
4166
|
className: v(
|
|
4165
4167
|
"w-full text-start first:rounded-t-7 last:rounded-b-7 border-b dark-theme:border-base-4",
|
|
4166
4168
|
"last:border-none px-3 pr-2.5 py-3 dark-theme:bg-base-3 lg:hover:bg-base-4 max-lg:active:bg-base-4",
|
|
4167
|
-
"transition-colors hover:cursor-pointer flex items-center justify-between outline-none lg:focus:ring-2 focus:ring-base-6",
|
|
4169
|
+
"transition-colors hover:cursor-pointer flex items-center justify-between outline-none lg:focus-visible:ring-2 focus-visible:ring-base-6",
|
|
4168
4170
|
t ? "bg-base-3 border-base-4" : "border-base-6",
|
|
4169
4171
|
n
|
|
4170
4172
|
),
|
|
@@ -4195,7 +4197,7 @@ const Fi = ({
|
|
|
4195
4197
|
open: j,
|
|
4196
4198
|
toggle: M,
|
|
4197
4199
|
close: C
|
|
4198
|
-
} =
|
|
4200
|
+
} = Wn({
|
|
4199
4201
|
align: "start",
|
|
4200
4202
|
side: "top",
|
|
4201
4203
|
avoidCollisions: !1,
|
|
@@ -4218,7 +4220,7 @@ const Fi = ({
|
|
|
4218
4220
|
)).filter(Boolean) : r, bt = le.length > 0, be = h ? n.filter(
|
|
4219
4221
|
(N) => s(N).toLowerCase().includes(y.toLowerCase())
|
|
4220
4222
|
) : n;
|
|
4221
|
-
|
|
4223
|
+
_(() => {
|
|
4222
4224
|
w.current = w.current.slice(0, be.length);
|
|
4223
4225
|
}, [be.length]);
|
|
4224
4226
|
const Ut = (N) => i ? r.some(
|
|
@@ -4290,14 +4292,14 @@ const Fi = ({
|
|
|
4290
4292
|
}
|
|
4291
4293
|
break;
|
|
4292
4294
|
}
|
|
4293
|
-
},
|
|
4295
|
+
}, vr = (N) => {
|
|
4294
4296
|
x(N.target.value), P(-1);
|
|
4295
|
-
},
|
|
4297
|
+
}, wr = () => {
|
|
4296
4298
|
m || (h && O.current && O.current.focus(), M());
|
|
4297
4299
|
}, Be = (N) => {
|
|
4298
4300
|
console.log(`Accessibility announcement: ${N}`);
|
|
4299
4301
|
};
|
|
4300
|
-
|
|
4302
|
+
An(H, (N) => {
|
|
4301
4303
|
!T.current || !j || !N.target || T.current.contains(N.target) || C();
|
|
4302
4304
|
});
|
|
4303
4305
|
const pt = V();
|
|
@@ -4330,7 +4332,7 @@ const Fi = ({
|
|
|
4330
4332
|
"opacity-60 cursor-not-allowed": m
|
|
4331
4333
|
}
|
|
4332
4334
|
),
|
|
4333
|
-
onClick:
|
|
4335
|
+
onClick: wr,
|
|
4334
4336
|
role: "combobox",
|
|
4335
4337
|
"aria-expanded": j,
|
|
4336
4338
|
"aria-haspopup": "listbox",
|
|
@@ -4402,7 +4404,7 @@ const Fi = ({
|
|
|
4402
4404
|
type: "text",
|
|
4403
4405
|
className: "flex-grow min-w-[60px] bg-transparent outline-none placeholder:text-sm",
|
|
4404
4406
|
value: y,
|
|
4405
|
-
onChange:
|
|
4407
|
+
onChange: vr,
|
|
4406
4408
|
onKeyDown: Jt,
|
|
4407
4409
|
placeholder: bt ? "" : u,
|
|
4408
4410
|
disabled: m,
|
|
@@ -4459,8 +4461,8 @@ const Fi = ({
|
|
|
4459
4461
|
return /* @__PURE__ */ p(
|
|
4460
4462
|
"div",
|
|
4461
4463
|
{
|
|
4462
|
-
ref: (
|
|
4463
|
-
w.current[D] =
|
|
4464
|
+
ref: (yr) => {
|
|
4465
|
+
w.current[D] = yr;
|
|
4464
4466
|
},
|
|
4465
4467
|
className: v(
|
|
4466
4468
|
"px-3 py-2 text-sm cursor-pointer flex items-center justify-between",
|
|
@@ -4547,8 +4549,8 @@ const Fi = ({
|
|
|
4547
4549
|
onMount: i,
|
|
4548
4550
|
error: l
|
|
4549
4551
|
}, c) => {
|
|
4550
|
-
const u = E(null), f = Wt(), h =
|
|
4551
|
-
return
|
|
4552
|
+
const u = E(null), f = Wt(), h = Fn(u, c), m = B(() => n && n(u), []);
|
|
4553
|
+
return _(() => {
|
|
4552
4554
|
const b = async () => {
|
|
4553
4555
|
i && await i(u, f);
|
|
4554
4556
|
};
|
|
@@ -4777,7 +4779,7 @@ const Fi = ({
|
|
|
4777
4779
|
x.current && vn({ el: x.current, direction: "left" });
|
|
4778
4780
|
},
|
|
4779
4781
|
className: "absolute shrink-0 left-0 px-1 h-full bg-gradient-to-r from-base-2 top-0",
|
|
4780
|
-
children: /* @__PURE__ */ d(
|
|
4782
|
+
children: /* @__PURE__ */ d(Mn, { className: "text-base-13" })
|
|
4781
4783
|
},
|
|
4782
4784
|
"leftarrow"
|
|
4783
4785
|
) : null,
|
|
@@ -4792,7 +4794,7 @@ const Fi = ({
|
|
|
4792
4794
|
x.current && vn({ el: x.current, direction: "right" });
|
|
4793
4795
|
},
|
|
4794
4796
|
className: "absolute shrink-0 right-0 px-1 h-full bg-gradient-to-l from-base-2 top-0",
|
|
4795
|
-
children: /* @__PURE__ */ d(
|
|
4797
|
+
children: /* @__PURE__ */ d(Dn, { className: "text-base-13" })
|
|
4796
4798
|
},
|
|
4797
4799
|
"rightarrow"
|
|
4798
4800
|
) : null
|
|
@@ -4856,13 +4858,13 @@ const Fi = ({
|
|
|
4856
4858
|
state: n ? "loading" : r ? "disabled" : "enabled",
|
|
4857
4859
|
type: "submit",
|
|
4858
4860
|
children: [
|
|
4859
|
-
n ? /* @__PURE__ */ d(Is, {}) : e ? /* @__PURE__ */ d(
|
|
4861
|
+
n ? /* @__PURE__ */ d(Is, {}) : e ? /* @__PURE__ */ d(Cn, { size: 18 }) : /* @__PURE__ */ d(Pn, { size: 18 }),
|
|
4860
4862
|
e ? i : s
|
|
4861
4863
|
]
|
|
4862
4864
|
}
|
|
4863
4865
|
)
|
|
4864
4866
|
] });
|
|
4865
|
-
},
|
|
4867
|
+
}, lr = Ot(void 0), Xi = ({
|
|
4866
4868
|
children: e,
|
|
4867
4869
|
debug: t = !1
|
|
4868
4870
|
}) => {
|
|
@@ -4914,9 +4916,9 @@ const Fi = ({
|
|
|
4914
4916
|
restoreParentModal: i,
|
|
4915
4917
|
getModals: l
|
|
4916
4918
|
};
|
|
4917
|
-
return /* @__PURE__ */ d(
|
|
4919
|
+
return /* @__PURE__ */ d(lr.Provider, { value: c, children: e });
|
|
4918
4920
|
}, Rs = () => {
|
|
4919
|
-
const e = at(
|
|
4921
|
+
const e = at(lr);
|
|
4920
4922
|
if (e === void 0)
|
|
4921
4923
|
throw new Error("useModals must be used within a ModalsProvider");
|
|
4922
4924
|
return e;
|
|
@@ -4933,7 +4935,7 @@ const Fi = ({
|
|
|
4933
4935
|
// ...others
|
|
4934
4936
|
}) => {
|
|
4935
4937
|
const l = Wr(), c = Wt(), u = E(null), f = Rs(), { id: h, prevPath: m } = Ar(), b = re(() => r === "modal" || c, [r, c]);
|
|
4936
|
-
return
|
|
4938
|
+
return _(() => {
|
|
4937
4939
|
f.add(h);
|
|
4938
4940
|
const y = f.getPrevId();
|
|
4939
4941
|
if (!y || (u.current = document.getElementById(y), !u.current)) return;
|
|
@@ -4947,7 +4949,7 @@ const Fi = ({
|
|
|
4947
4949
|
console.log("IS THIS CLEANUP RUNNING?");
|
|
4948
4950
|
};
|
|
4949
4951
|
//! NOT RUNNING...
|
|
4950
|
-
}, [c]),
|
|
4952
|
+
}, [c]), En(() => () => f.remove(h), []), /* @__PURE__ */ p(Yt, { children: [
|
|
4951
4953
|
/* @__PURE__ */ d(
|
|
4952
4954
|
Pe.div,
|
|
4953
4955
|
{
|
|
@@ -5040,7 +5042,7 @@ function zs({
|
|
|
5040
5042
|
required: o,
|
|
5041
5043
|
className: a = ""
|
|
5042
5044
|
}) {
|
|
5043
|
-
const s =
|
|
5045
|
+
const s = $n();
|
|
5044
5046
|
return /* @__PURE__ */ p(
|
|
5045
5047
|
"button",
|
|
5046
5048
|
{
|
|
@@ -5113,7 +5115,7 @@ const Ys = ({
|
|
|
5113
5115
|
).current, g = E(
|
|
5114
5116
|
`error-${Math.random().toString(36).substr(2, 9)}`
|
|
5115
5117
|
).current;
|
|
5116
|
-
|
|
5118
|
+
_(() => {
|
|
5117
5119
|
k.current = k.current.slice(0, r.length);
|
|
5118
5120
|
}, [r.length]);
|
|
5119
5121
|
const w = (M) => {
|
|
@@ -5185,7 +5187,7 @@ const Ys = ({
|
|
|
5185
5187
|
{
|
|
5186
5188
|
className: v("rounded-6 px-2 transition cursor-text pr-10", {
|
|
5187
5189
|
"bg-base-3": n === "solid",
|
|
5188
|
-
"border border-uielborder focus:border-transparent": n === "outline",
|
|
5190
|
+
"border border-uielborder focus-visible:border-transparent": n === "outline",
|
|
5189
5191
|
"py-3": t === "default",
|
|
5190
5192
|
"pt-5 pb-2": t === "floating",
|
|
5191
5193
|
"ring-2 ring-branduielborder": h,
|
|
@@ -5320,7 +5322,7 @@ const Ys = ({
|
|
|
5320
5322
|
}, Hs = {
|
|
5321
5323
|
brand: "ring-1 ring-brand",
|
|
5322
5324
|
solid: "ring-1 ring-base-6"
|
|
5323
|
-
},
|
|
5325
|
+
}, ur = Ye(
|
|
5324
5326
|
({
|
|
5325
5327
|
label: e,
|
|
5326
5328
|
labelPosition: t = "default",
|
|
@@ -5371,7 +5373,7 @@ const Ys = ({
|
|
|
5371
5373
|
ref: c,
|
|
5372
5374
|
className: v(
|
|
5373
5375
|
!r && u && Hs[o],
|
|
5374
|
-
"bg-base-3 border border-base-4 light-theme:drop-shadow-sm rounded-6 w-full focus:outline-none customscrollbarnohide",
|
|
5376
|
+
"bg-base-3 border border-base-4 light-theme:drop-shadow-sm rounded-6 w-full focus-visible:outline-none customscrollbarnohide",
|
|
5375
5377
|
"placeholder:text-base-11 text-sm",
|
|
5376
5378
|
"resize-none",
|
|
5377
5379
|
// Prevent manual resizing since we're auto-resizing
|
|
@@ -5396,7 +5398,7 @@ const Ys = ({
|
|
|
5396
5398
|
] });
|
|
5397
5399
|
}
|
|
5398
5400
|
);
|
|
5399
|
-
|
|
5401
|
+
ur.displayName = "TextArea";
|
|
5400
5402
|
const Qi = ({
|
|
5401
5403
|
name: e,
|
|
5402
5404
|
customRead: t,
|
|
@@ -5404,7 +5406,7 @@ const Qi = ({
|
|
|
5404
5406
|
...r
|
|
5405
5407
|
}) => {
|
|
5406
5408
|
const { control: o } = it(), a = B(
|
|
5407
|
-
(i) => t ? t(i) : i === null ?
|
|
5409
|
+
(i) => t ? t(i) : i === null ? Ln(i) : i,
|
|
5408
5410
|
[t]
|
|
5409
5411
|
), s = B(
|
|
5410
5412
|
(i) => n ? n(i) : i === null ? $t(i) : i,
|
|
@@ -5417,7 +5419,7 @@ const Qi = ({
|
|
|
5417
5419
|
control: o,
|
|
5418
5420
|
render: ({ field: i, fieldState: l }) => /* @__PURE__ */ p("div", { children: [
|
|
5419
5421
|
/* @__PURE__ */ d(
|
|
5420
|
-
|
|
5422
|
+
ur,
|
|
5421
5423
|
{
|
|
5422
5424
|
value: a(i.value),
|
|
5423
5425
|
onChange: (c) => i.onChange(s(c.target.value)),
|
|
@@ -5435,7 +5437,7 @@ const Qi = ({
|
|
|
5435
5437
|
] }));
|
|
5436
5438
|
}, Pt = /* @__PURE__ */ new Set(), Y = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakSet();
|
|
5437
5439
|
let ae, Ht = 0, Bt = 0;
|
|
5438
|
-
const ie = "__aa_tgt", Re = "__aa_del", ot = "__aa_new",
|
|
5440
|
+
const ie = "__aa_tgt", Re = "__aa_del", ot = "__aa_new", dr = (e) => {
|
|
5439
5441
|
const t = Xs(e);
|
|
5440
5442
|
t && t.forEach((n) => qs(n));
|
|
5441
5443
|
}, Bs = (e) => {
|
|
@@ -5443,7 +5445,7 @@ const ie = "__aa_tgt", Re = "__aa_del", ot = "__aa_new", ur = (e) => {
|
|
|
5443
5445
|
t.target === ae && Vs(), Y.has(t.target) && Ee(t.target);
|
|
5444
5446
|
});
|
|
5445
5447
|
};
|
|
5446
|
-
function
|
|
5448
|
+
function fr(e) {
|
|
5447
5449
|
const t = e.getBoundingClientRect(), n = ae?.clientWidth || 0, r = ae?.clientHeight || 0;
|
|
5448
5450
|
return t.bottom < 0 || t.top > r || t.right < 0 || t.left > n;
|
|
5449
5451
|
}
|
|
@@ -5488,7 +5490,7 @@ function Vs() {
|
|
|
5488
5490
|
ae,
|
|
5489
5491
|
setTimeout(() => {
|
|
5490
5492
|
Pt.forEach(
|
|
5491
|
-
(e) => Qe(e, (t) =>
|
|
5493
|
+
(e) => Qe(e, (t) => hr(() => Ee(t)))
|
|
5492
5494
|
);
|
|
5493
5495
|
}, 100)
|
|
5494
5496
|
);
|
|
@@ -5497,16 +5499,16 @@ function Ks(e) {
|
|
|
5497
5499
|
setTimeout(() => {
|
|
5498
5500
|
Fe.set(
|
|
5499
5501
|
e,
|
|
5500
|
-
setInterval(() =>
|
|
5502
|
+
setInterval(() => hr(Ee.bind(null, e)), 2e3)
|
|
5501
5503
|
);
|
|
5502
5504
|
}, Math.round(2e3 * Math.random()));
|
|
5503
5505
|
}
|
|
5504
|
-
function
|
|
5506
|
+
function hr(e) {
|
|
5505
5507
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
5506
5508
|
}
|
|
5507
5509
|
let Ae;
|
|
5508
|
-
const
|
|
5509
|
-
|
|
5510
|
+
const mr = typeof window < "u" && "ResizeObserver" in window;
|
|
5511
|
+
mr && (ae = document.documentElement, new MutationObserver(dr), Ae = new ResizeObserver(Bs), window.addEventListener("scroll", () => {
|
|
5510
5512
|
Bt = window.scrollY, Ht = window.scrollX;
|
|
5511
5513
|
}), Ae.observe(ae));
|
|
5512
5514
|
function Xs(e) {
|
|
@@ -5572,7 +5574,7 @@ function Oe(e) {
|
|
|
5572
5574
|
height: t.height
|
|
5573
5575
|
};
|
|
5574
5576
|
}
|
|
5575
|
-
function
|
|
5577
|
+
function br(e, t, n) {
|
|
5576
5578
|
let r = t.width, o = t.height, a = n.width, s = n.height;
|
|
5577
5579
|
const i = getComputedStyle(e);
|
|
5578
5580
|
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
@@ -5584,11 +5586,11 @@ function mr(e, t, n) {
|
|
|
5584
5586
|
function ht(e) {
|
|
5585
5587
|
return ie in e && we.has(e[ie]) ? we.get(e[ie]) : { duration: 250, easing: "ease-in-out" };
|
|
5586
5588
|
}
|
|
5587
|
-
function
|
|
5589
|
+
function pr(e) {
|
|
5588
5590
|
if (ie in e) return e[ie];
|
|
5589
5591
|
}
|
|
5590
5592
|
function Kt(e) {
|
|
5591
|
-
const t =
|
|
5593
|
+
const t = pr(e);
|
|
5592
5594
|
return t ? Se.has(t) : !1;
|
|
5593
5595
|
}
|
|
5594
5596
|
function Qe(e, ...t) {
|
|
@@ -5607,7 +5609,7 @@ function ze(e) {
|
|
|
5607
5609
|
function Qs(e) {
|
|
5608
5610
|
const t = Y.get(e), n = Oe(e);
|
|
5609
5611
|
if (!Kt(e)) return Y.set(e, n);
|
|
5610
|
-
if (
|
|
5612
|
+
if (fr(e)) {
|
|
5611
5613
|
Y.set(e, n), Vt(e);
|
|
5612
5614
|
return;
|
|
5613
5615
|
}
|
|
@@ -5618,7 +5620,7 @@ function Qs(e) {
|
|
|
5618
5620
|
let a = t.left - n.left, s = t.top - n.top;
|
|
5619
5621
|
const i = t.left + t.width - (n.left + n.width);
|
|
5620
5622
|
t.top + t.height - (n.top + n.height) == 0 && (s = 0), i == 0 && (a = 0);
|
|
5621
|
-
const [c, u, f, h] =
|
|
5623
|
+
const [c, u, f, h] = br(
|
|
5622
5624
|
e,
|
|
5623
5625
|
t,
|
|
5624
5626
|
n
|
|
@@ -5647,7 +5649,7 @@ function yn(e) {
|
|
|
5647
5649
|
Y.set(e, t);
|
|
5648
5650
|
const n = ht(e);
|
|
5649
5651
|
if (!Kt(e)) return;
|
|
5650
|
-
if (
|
|
5652
|
+
if (fr(e)) {
|
|
5651
5653
|
Vt(e);
|
|
5652
5654
|
return;
|
|
5653
5655
|
}
|
|
@@ -5684,7 +5686,7 @@ function Gs(e) {
|
|
|
5684
5686
|
const [t, n] = Ne.get(e);
|
|
5685
5687
|
Object.defineProperty(e, Re, { value: !0, configurable: !0 });
|
|
5686
5688
|
const r = window.scrollX, o = window.scrollY;
|
|
5687
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : t && t.parentNode ? t.parentNode.appendChild(e) :
|
|
5689
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : t && t.parentNode ? t.parentNode.appendChild(e) : pr(e)?.appendChild(e), !Kt(e)) return xn(e);
|
|
5688
5690
|
const [a, s, i, l] = Zs(e), c = ht(e), u = Y.get(e);
|
|
5689
5691
|
(r !== Ht || o !== Bt) && Js(e, r, o, c);
|
|
5690
5692
|
let f, h = {
|
|
@@ -5745,7 +5747,7 @@ function Js(e, t, n, r) {
|
|
|
5745
5747
|
h();
|
|
5746
5748
|
}
|
|
5747
5749
|
function Zs(e) {
|
|
5748
|
-
const t = Y.get(e), [n, , r] =
|
|
5750
|
+
const t = Y.get(e), [n, , r] = br(e, t, Oe(e));
|
|
5749
5751
|
let o = e.parentElement;
|
|
5750
5752
|
for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement); )
|
|
5751
5753
|
o = o.parentElement;
|
|
@@ -5753,14 +5755,14 @@ function Zs(e) {
|
|
|
5753
5755
|
const a = getComputedStyle(o), s = !U.has(e) || U.get(e)?.playState === "finished" ? Oe(o) : Y.get(o), i = Math.round(t.top - s.top) - ee(a.borderTopWidth), l = Math.round(t.left - s.left) - ee(a.borderLeftWidth);
|
|
5754
5756
|
return [i, l, n, r];
|
|
5755
5757
|
}
|
|
5756
|
-
function
|
|
5757
|
-
if (
|
|
5758
|
+
function gr(e, t = {}) {
|
|
5759
|
+
if (mr && Ae && !(window.matchMedia("(prefers-reduced-motion: reduce)").matches && !ze(t) && !t.disrespectUserMotionPreference)) {
|
|
5758
5760
|
Se.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), Qe(e, Ee, Ks, (s) => Ae?.observe(s)), ze(t) ? we.set(e, t) : we.set(e, {
|
|
5759
5761
|
duration: 250,
|
|
5760
5762
|
easing: "ease-in-out",
|
|
5761
5763
|
...t
|
|
5762
5764
|
});
|
|
5763
|
-
const a = new MutationObserver(
|
|
5765
|
+
const a = new MutationObserver(dr);
|
|
5764
5766
|
a.observe(e, { childList: !0 }), xt.set(e, a), Pt.add(e);
|
|
5765
5767
|
}
|
|
5766
5768
|
return Object.freeze({
|
|
@@ -5810,8 +5812,8 @@ const ei = [
|
|
|
5810
5812
|
"Domingo"
|
|
5811
5813
|
], Gi = () => /* @__PURE__ */ d(ti, {}), ti = () => /* @__PURE__ */ d("div", { children: ei.map((e) => /* @__PURE__ */ d(ni, { day: e }, e)) }), ni = ({ day: e }) => {
|
|
5812
5814
|
const [t, n] = F(!1), r = E(null);
|
|
5813
|
-
return
|
|
5814
|
-
r.current &&
|
|
5815
|
+
return _(() => {
|
|
5816
|
+
r.current && gr(r.current);
|
|
5815
5817
|
}, []), /* @__PURE__ */ p(
|
|
5816
5818
|
"div",
|
|
5817
5819
|
{
|
|
@@ -5842,8 +5844,8 @@ const ei = [
|
|
|
5842
5844
|
{ from: "08:00", to: "12:00" },
|
|
5843
5845
|
{ from: "14:00", to: "18:00" }
|
|
5844
5846
|
]), n = E(null);
|
|
5845
|
-
return
|
|
5846
|
-
n.current &&
|
|
5847
|
+
return _(() => {
|
|
5848
|
+
n.current && gr(n.current);
|
|
5847
5849
|
}, []), /* @__PURE__ */ p("div", { ref: n, children: [
|
|
5848
5850
|
e.map((r, o) => /* @__PURE__ */ p(
|
|
5849
5851
|
"div",
|
|
@@ -5866,7 +5868,7 @@ const ei = [
|
|
|
5866
5868
|
className: "w-full mt-4",
|
|
5867
5869
|
color: "contrast",
|
|
5868
5870
|
children: [
|
|
5869
|
-
/* @__PURE__ */ d(
|
|
5871
|
+
/* @__PURE__ */ d(Pn, { className: "stroke-1" }),
|
|
5870
5872
|
"Añadir hora"
|
|
5871
5873
|
]
|
|
5872
5874
|
}
|
|
@@ -5878,7 +5880,7 @@ export {
|
|
|
5878
5880
|
xi as Avatar,
|
|
5879
5881
|
Ni as AvatarsGroup,
|
|
5880
5882
|
X as Button,
|
|
5881
|
-
|
|
5883
|
+
Zn as Calendar,
|
|
5882
5884
|
gs as Checkbox,
|
|
5883
5885
|
Si as DatePickerDemo,
|
|
5884
5886
|
Ti as DatePickerPopover,
|
|
@@ -5892,7 +5894,7 @@ export {
|
|
|
5892
5894
|
Qi as FormTextArea,
|
|
5893
5895
|
Gi as FormWorkingHours,
|
|
5894
5896
|
Ts as Icon,
|
|
5895
|
-
|
|
5897
|
+
sr as Input,
|
|
5896
5898
|
_i as KeepAlive,
|
|
5897
5899
|
ji as List,
|
|
5898
5900
|
Ii as ListItem,
|
|
@@ -5912,7 +5914,7 @@ export {
|
|
|
5912
5914
|
qi as SuperModal,
|
|
5913
5915
|
zs as Switch,
|
|
5914
5916
|
Ys as Tags,
|
|
5915
|
-
|
|
5917
|
+
ur as TextArea,
|
|
5916
5918
|
Ci as TimePicker,
|
|
5917
5919
|
Hr as calculatePopoverPosition,
|
|
5918
5920
|
Je as checkOverflow,
|
|
@@ -5920,7 +5922,7 @@ export {
|
|
|
5920
5922
|
pi as debounce,
|
|
5921
5923
|
vi as extractDirtyData,
|
|
5922
5924
|
_r as generateInitials,
|
|
5923
|
-
|
|
5925
|
+
Ln as nullRead,
|
|
5924
5926
|
$t as nullSet,
|
|
5925
5927
|
Ir as removeWhitespaces,
|
|
5926
5928
|
jr as setFocusEnd,
|
|
@@ -5928,16 +5930,16 @@ export {
|
|
|
5928
5930
|
gi as toTitleCase,
|
|
5929
5931
|
Ei as useClickAway,
|
|
5930
5932
|
$i as useClickAwayAdvanced,
|
|
5931
|
-
|
|
5933
|
+
An as useClickAwayWithRef,
|
|
5932
5934
|
Ai as useKeepAlive,
|
|
5933
5935
|
Br as useKeyListener,
|
|
5934
5936
|
Wt as useLargeScreen,
|
|
5935
|
-
|
|
5937
|
+
Fn as useMergedRef,
|
|
5936
5938
|
Li as useMethods,
|
|
5937
5939
|
Rs as useModals,
|
|
5938
5940
|
Rr as useOverflow,
|
|
5939
5941
|
yi as useOverflowState,
|
|
5940
|
-
|
|
5942
|
+
Wn as usePopover,
|
|
5941
5943
|
Yr as useRipple
|
|
5942
5944
|
};
|
|
5943
5945
|
//# sourceMappingURL=index.js.map
|