@framework-m/ui 0.8.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/index.js +584 -566
- package/dist/index.js.map +1 -1
- package/dist/locales/en/ui.json +3 -1
- package/dist/locales/es/ui.json +3 -1
- package/dist/locales/fr/ui.json +3 -1
- package/dist/locales/hi/ui.json +3 -1
- package/dist/locales/mr/ui.json +3 -1
- package/dist/locales/ta/ui.json +3 -1
- package/dist/locales/ur/ui.json +3 -1
- package/locales/en/ui.json +3 -1
- package/locales/es/ui.json +3 -1
- package/locales/fr/ui.json +3 -1
- package/locales/hi/ui.json +3 -1
- package/locales/mr/ui.json +3 -1
- package/locales/ta/ui.json +3 -1
- package/locales/ur/ui.json +3 -1
- package/package.json +22 -22
package/dist/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import e, { createContext as t, useContext as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
2
2
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
3
3
|
import { TamaguiProvider as u, Text as d, View as f, createFont as p, createTamagui as m, createTokens as h, styled as g } from "@tamagui/core";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { ScrollView as
|
|
6
|
-
import
|
|
7
|
-
import { Image as
|
|
8
|
-
import * as
|
|
4
|
+
import { useTranslation as ee } from "react-i18next";
|
|
5
|
+
import { ScrollView as _ } from "@tamagui/scroll-view";
|
|
6
|
+
import v from "react-dom";
|
|
7
|
+
import { Image as y } from "@tamagui/image";
|
|
8
|
+
import * as b from "@tamagui/lucide-icons-2";
|
|
9
9
|
//#region src/theme/ThemeContext.tsx
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let e = localStorage.getItem(
|
|
10
|
+
var x = t(null), S = "framework-m-theme";
|
|
11
|
+
function C() {
|
|
12
|
+
let e = localStorage.getItem(S);
|
|
13
13
|
return e === "light" || e === "dark" ? e : window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function w(e) {
|
|
16
16
|
let t = document.documentElement;
|
|
17
17
|
e === "dark" ? t.classList.add("dark") : t.classList.remove("dark");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
let [n, i] = o(t ||
|
|
19
|
+
function T({ children: e, defaultTheme: t }) {
|
|
20
|
+
let [n, i] = o(t || C);
|
|
21
21
|
r(() => {
|
|
22
|
-
|
|
22
|
+
w(n);
|
|
23
23
|
}, [n]), r(() => {
|
|
24
24
|
t && i(t);
|
|
25
25
|
}, [t]), r(() => {
|
|
26
26
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => {
|
|
27
|
-
localStorage.getItem(
|
|
27
|
+
localStorage.getItem(S) || i(e.matches ? "dark" : "light");
|
|
28
28
|
};
|
|
29
29
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
30
30
|
}, []);
|
|
31
31
|
let a = (e) => {
|
|
32
|
-
i(e), localStorage.setItem(
|
|
32
|
+
i(e), localStorage.setItem(S, e), w(e);
|
|
33
33
|
}, s = {
|
|
34
34
|
theme: n,
|
|
35
35
|
setTheme: a,
|
|
@@ -37,19 +37,19 @@ function E({ children: e, defaultTheme: t }) {
|
|
|
37
37
|
a(n === "light" ? "dark" : "light");
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */ c(
|
|
40
|
+
return /* @__PURE__ */ c(x.Provider, {
|
|
41
41
|
value: s,
|
|
42
42
|
children: e
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
let e = n(
|
|
45
|
+
function E() {
|
|
46
|
+
let e = n(x);
|
|
47
47
|
if (!e) throw Error("useTheme must be used within ThemeProvider");
|
|
48
48
|
return e;
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/components/Primitives.tsx
|
|
52
|
-
var
|
|
52
|
+
var D = g(f, {
|
|
53
53
|
name: "MStack",
|
|
54
54
|
display: "flex",
|
|
55
55
|
flexDirection: "column",
|
|
@@ -63,7 +63,7 @@ var O = g(f, {
|
|
|
63
63
|
height: "100%",
|
|
64
64
|
zIndex: 0
|
|
65
65
|
} } }
|
|
66
|
-
}),
|
|
66
|
+
}), O = g(f, {
|
|
67
67
|
name: "XStack",
|
|
68
68
|
display: "flex",
|
|
69
69
|
flexDirection: "row",
|
|
@@ -77,7 +77,7 @@ var O = g(f, {
|
|
|
77
77
|
height: "100%",
|
|
78
78
|
zIndex: 0
|
|
79
79
|
} } }
|
|
80
|
-
}),
|
|
80
|
+
}), k = g(f, {
|
|
81
81
|
name: "YStack",
|
|
82
82
|
display: "flex",
|
|
83
83
|
flexDirection: "column",
|
|
@@ -91,7 +91,7 @@ var O = g(f, {
|
|
|
91
91
|
height: "100%",
|
|
92
92
|
zIndex: 0
|
|
93
93
|
} } }
|
|
94
|
-
}),
|
|
94
|
+
}), A = g(f, {
|
|
95
95
|
name: "ZStack",
|
|
96
96
|
display: "flex",
|
|
97
97
|
position: "relative",
|
|
@@ -105,7 +105,7 @@ var O = g(f, {
|
|
|
105
105
|
height: "100%",
|
|
106
106
|
zIndex: 0
|
|
107
107
|
} } }
|
|
108
|
-
}),
|
|
108
|
+
}), j = g(d, {
|
|
109
109
|
name: "MText",
|
|
110
110
|
fontFamily: "$body",
|
|
111
111
|
display: "inline-flex",
|
|
@@ -118,11 +118,11 @@ var O = g(f, {
|
|
|
118
118
|
$xl: { fontSize: "$xl" },
|
|
119
119
|
$xxl: { fontSize: "$xxl" }
|
|
120
120
|
} }
|
|
121
|
-
}),
|
|
121
|
+
}), M = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(j, {
|
|
122
122
|
ref: r,
|
|
123
123
|
...n,
|
|
124
124
|
style: [t, { textAlign: e === "start" ? "left" : e === "end" ? "right" : e }]
|
|
125
|
-
})),
|
|
125
|
+
})), N = g(d, {
|
|
126
126
|
name: "Paragraph",
|
|
127
127
|
fontFamily: "$body",
|
|
128
128
|
display: "inline-flex",
|
|
@@ -135,11 +135,11 @@ var O = g(f, {
|
|
|
135
135
|
$xl: { fontSize: "$xl" },
|
|
136
136
|
$xxl: { fontSize: "$xxl" }
|
|
137
137
|
} }
|
|
138
|
-
}),
|
|
138
|
+
}), P = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(N, {
|
|
139
139
|
ref: r,
|
|
140
140
|
...n,
|
|
141
141
|
style: [t, { textAlign: e === "start" ? "left" : e === "end" ? "right" : e }]
|
|
142
|
-
})),
|
|
142
|
+
})), F = g(d, {
|
|
143
143
|
name: "Heading",
|
|
144
144
|
fontFamily: "$body",
|
|
145
145
|
fontWeight: "800",
|
|
@@ -153,7 +153,7 @@ var O = g(f, {
|
|
|
153
153
|
$xl: { fontSize: "$xl" },
|
|
154
154
|
$xxl: { fontSize: "$xxl" }
|
|
155
155
|
} }
|
|
156
|
-
}), I = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(
|
|
156
|
+
}), I = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(F, {
|
|
157
157
|
ref: r,
|
|
158
158
|
...n,
|
|
159
159
|
style: [t, { textAlign: e === "start" ? "left" : e === "end" ? "right" : e }]
|
|
@@ -195,14 +195,14 @@ var O = g(f, {
|
|
|
195
195
|
text: "#495057"
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
function
|
|
198
|
+
function te(e) {
|
|
199
199
|
return L[e.toLowerCase().replace(/\s+/g, "_")] ?? L.default;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function R({ state: e, docstatus: t, className: n, style: r }) {
|
|
202
202
|
let i = e ?? (t === 0 ? "Draft" : t === 1 ? "Submitted" : t === 2 ? "Cancelled" : void 0);
|
|
203
203
|
if (!i) return null;
|
|
204
|
-
let a =
|
|
205
|
-
return /* @__PURE__ */ c(
|
|
204
|
+
let a = te(i);
|
|
205
|
+
return /* @__PURE__ */ c(M, {
|
|
206
206
|
className: n,
|
|
207
207
|
style: {
|
|
208
208
|
display: "inline-flex",
|
|
@@ -220,7 +220,7 @@ function z({ state: e, docstatus: t, className: n, style: r }) {
|
|
|
220
220
|
}
|
|
221
221
|
//#endregion
|
|
222
222
|
//#region src/components/LocaleSwitcher.tsx
|
|
223
|
-
var
|
|
223
|
+
var ne = [
|
|
224
224
|
{
|
|
225
225
|
code: "en",
|
|
226
226
|
label: "English"
|
|
@@ -250,20 +250,20 @@ var te = [
|
|
|
250
250
|
label: "اردو"
|
|
251
251
|
}
|
|
252
252
|
];
|
|
253
|
-
function
|
|
254
|
-
return /* @__PURE__ */ l(
|
|
253
|
+
function z({ language: e, onChangeLanguage: t, locales: n = ne, placement: r }) {
|
|
254
|
+
return /* @__PURE__ */ l(O, {
|
|
255
255
|
alignItems: "center",
|
|
256
256
|
gap: "$xs",
|
|
257
257
|
width: "auto",
|
|
258
258
|
style: { verticalAlign: "middle" },
|
|
259
|
-
children: [/* @__PURE__ */ c(
|
|
259
|
+
children: [/* @__PURE__ */ c(M, {
|
|
260
260
|
size: "$sm",
|
|
261
261
|
style: { lineHeight: 1 },
|
|
262
262
|
children: /* @__PURE__ */ c(Y, {
|
|
263
263
|
name: "globe",
|
|
264
264
|
size: 15
|
|
265
265
|
})
|
|
266
|
-
}), /* @__PURE__ */ c(
|
|
266
|
+
}), /* @__PURE__ */ c(K, {
|
|
267
267
|
value: e,
|
|
268
268
|
onValueChange: t,
|
|
269
269
|
options: n.map((e) => ({
|
|
@@ -278,7 +278,7 @@ function ne({ language: e, onChangeLanguage: t, locales: n = te, placement: r })
|
|
|
278
278
|
}
|
|
279
279
|
//#endregion
|
|
280
280
|
//#region src/components/Skeleton.tsx
|
|
281
|
-
var
|
|
281
|
+
var B = g(f, {
|
|
282
282
|
name: "Skeleton",
|
|
283
283
|
backgroundColor: "$colorBgTertiary",
|
|
284
284
|
borderRadius: "$md",
|
|
@@ -311,23 +311,23 @@ var re = g(f, {
|
|
|
311
311
|
}
|
|
312
312
|
} },
|
|
313
313
|
defaultVariants: { variant: "text" }
|
|
314
|
-
}),
|
|
314
|
+
}), re = ({ count: e = 1, className: t = "", ...n }) => {
|
|
315
315
|
let r = `skeleton ${t}`.trim();
|
|
316
316
|
return e > 1 ? /* @__PURE__ */ c(f, {
|
|
317
317
|
"aria-busy": !0,
|
|
318
318
|
"aria-label": "Loading content",
|
|
319
|
-
children: Array.from({ length: e }, (t, i) => /* @__PURE__ */ c(
|
|
319
|
+
children: Array.from({ length: e }, (t, i) => /* @__PURE__ */ c(B, {
|
|
320
320
|
className: r,
|
|
321
321
|
...n,
|
|
322
322
|
...i === e - 1 && n.variant === "text" ? { width: "60%" } : {}
|
|
323
323
|
}, i))
|
|
324
|
-
}) : /* @__PURE__ */ c(
|
|
324
|
+
}) : /* @__PURE__ */ c(B, {
|
|
325
325
|
className: r,
|
|
326
326
|
"aria-busy": !0,
|
|
327
327
|
"aria-label": "Loading",
|
|
328
328
|
...n
|
|
329
329
|
});
|
|
330
|
-
},
|
|
330
|
+
}, ie = g(f, {
|
|
331
331
|
name: "Button",
|
|
332
332
|
flexDirection: "row",
|
|
333
333
|
alignItems: "center",
|
|
@@ -414,14 +414,14 @@ var re = g(f, {
|
|
|
414
414
|
variant: "default",
|
|
415
415
|
size: "md"
|
|
416
416
|
}
|
|
417
|
-
}),
|
|
418
|
-
let u =
|
|
417
|
+
}), ae = (e) => typeof e == "string" || typeof e == "number", V = e.forwardRef(({ children: t, variant: n = "default", size: r = "md", loading: i, disabled: a, tag: o = "button", ...s }, l) => {
|
|
418
|
+
let u = ie, d = s.color || (n === "primary" || n === "danger" ? "$white" : "$color"), f = (e, t) => /* @__PURE__ */ c(M, {
|
|
419
419
|
color: d,
|
|
420
420
|
fontWeight: "600",
|
|
421
421
|
fontSize: r === "sm" ? "$xs" : "$sm",
|
|
422
422
|
pointerEvents: "none",
|
|
423
423
|
children: e
|
|
424
|
-
}, t), p = i ? f("...") : e.Children.map(t, (e, t) =>
|
|
424
|
+
}, t), p = i ? f("...") : e.Children.map(t, (e, t) => ae(e) ? f(e, t) : e);
|
|
425
425
|
return /* @__PURE__ */ c(u, {
|
|
426
426
|
ref: l,
|
|
427
427
|
tag: o,
|
|
@@ -436,7 +436,7 @@ var re = g(f, {
|
|
|
436
436
|
...s,
|
|
437
437
|
children: p
|
|
438
438
|
});
|
|
439
|
-
}),
|
|
439
|
+
}), H = g(f, {
|
|
440
440
|
name: "Card",
|
|
441
441
|
flexDirection: "column",
|
|
442
442
|
backgroundColor: "$background",
|
|
@@ -471,7 +471,7 @@ var re = g(f, {
|
|
|
471
471
|
elevated: !0,
|
|
472
472
|
padded: "md"
|
|
473
473
|
}
|
|
474
|
-
}),
|
|
474
|
+
}), oe = g("input", {
|
|
475
475
|
name: "Input",
|
|
476
476
|
backgroundColor: "$backgroundSecondary",
|
|
477
477
|
borderRadius: "$round",
|
|
@@ -520,9 +520,9 @@ var re = g(f, {
|
|
|
520
520
|
} }
|
|
521
521
|
},
|
|
522
522
|
defaultVariants: { size: "md" }
|
|
523
|
-
}),
|
|
523
|
+
}), U = e.forwardRef(({ onChange: e, onChangeText: t, value: n, textAlign: r, style: i, ...a }, o) => {
|
|
524
524
|
let s = n !== void 0;
|
|
525
|
-
return /* @__PURE__ */ c(
|
|
525
|
+
return /* @__PURE__ */ c(oe, {
|
|
526
526
|
ref: o,
|
|
527
527
|
tabIndex: a.disabled ? -1 : 0,
|
|
528
528
|
...s ? { value: n } : {},
|
|
@@ -536,10 +536,10 @@ var re = g(f, {
|
|
|
536
536
|
...a
|
|
537
537
|
});
|
|
538
538
|
});
|
|
539
|
-
|
|
539
|
+
U.displayName = "Input";
|
|
540
540
|
//#endregion
|
|
541
541
|
//#region src/components/Popover.tsx
|
|
542
|
-
function
|
|
542
|
+
function W({ trigger: e, content: t, placement: n = "bottom-start", open: i, onOpenChange: s }) {
|
|
543
543
|
let [u, d] = o(!1), f = i === void 0 ? u : i, [p, m] = o(n), h = (e) => {
|
|
544
544
|
d(e), s?.(e);
|
|
545
545
|
}, g = a(null);
|
|
@@ -557,10 +557,10 @@ function U({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
557
557
|
g.current && !g.current.contains(e.target) && h(!1);
|
|
558
558
|
};
|
|
559
559
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
560
|
-
}, [g]), /* @__PURE__ */ l(
|
|
560
|
+
}, [g]), /* @__PURE__ */ l(k, {
|
|
561
561
|
position: "relative",
|
|
562
562
|
ref: g,
|
|
563
|
-
children: [/* @__PURE__ */ c(
|
|
563
|
+
children: [/* @__PURE__ */ c(O, {
|
|
564
564
|
onPress: () => h(!f),
|
|
565
565
|
style: { cursor: "pointer" },
|
|
566
566
|
tabIndex: 0,
|
|
@@ -571,7 +571,7 @@ function U({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
571
571
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), h(!f));
|
|
572
572
|
},
|
|
573
573
|
children: e
|
|
574
|
-
}), f && /* @__PURE__ */ c(
|
|
574
|
+
}), f && /* @__PURE__ */ c(A, {
|
|
575
575
|
position: "absolute",
|
|
576
576
|
zIndex: 1e3,
|
|
577
577
|
...(() => {
|
|
@@ -625,7 +625,7 @@ function U({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
625
625
|
},
|
|
626
626
|
shadowOpacity: .1,
|
|
627
627
|
shadowRadius: 10,
|
|
628
|
-
children: /* @__PURE__ */ c(
|
|
628
|
+
children: /* @__PURE__ */ c(H, {
|
|
629
629
|
elevated: !0,
|
|
630
630
|
padding: "$sm",
|
|
631
631
|
minWidth: 200,
|
|
@@ -638,8 +638,8 @@ function U({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
638
638
|
}
|
|
639
639
|
//#endregion
|
|
640
640
|
//#region src/components/DatePicker.tsx
|
|
641
|
-
var
|
|
642
|
-
let { t:
|
|
641
|
+
var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date", placeholder: s, popoverPlacement: u = "bottom-start", ...d }, p) => {
|
|
642
|
+
let { t: m } = ee("ui"), [h, g] = o(!1), [_, v] = o(!1), [y, b] = o(!1), x = a === "datetime-local" || d.field?.format === "date-time" ? "datetime-local" : "date", S = (e) => {
|
|
643
643
|
let t = (e) => e.toString().padStart(2, "0"), n = e.getFullYear(), r = t(e.getMonth() + 1), i = t(e.getDate()), a = t(e.getHours()), o = t(e.getMinutes()), s = t(e.getSeconds());
|
|
644
644
|
return x === "date" ? `${n}-${r}-${i}` : `${n}-${r}-${i}T${a}:${o}:${s}`;
|
|
645
645
|
}, C = i(() => {
|
|
@@ -650,8 +650,8 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
650
650
|
if (!e) return "";
|
|
651
651
|
let t = new Date(e);
|
|
652
652
|
return isNaN(t.getTime()) ? String(e) : x === "date" ? t.toLocaleDateString() : t.toLocaleString();
|
|
653
|
-
}, [e, x]), [T, E] = o(new Date(C)),
|
|
654
|
-
|
|
653
|
+
}, [e, x]), [T, E] = o(new Date(C)), A = () => {
|
|
654
|
+
g(!0);
|
|
655
655
|
};
|
|
656
656
|
r(() => {
|
|
657
657
|
E(new Date(C));
|
|
@@ -659,498 +659,493 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
659
659
|
let j = (e) => {
|
|
660
660
|
let r = S(e);
|
|
661
661
|
t?.(r), n?.(r);
|
|
662
|
-
},
|
|
662
|
+
}, N = (e) => {
|
|
663
663
|
let t = new Date(T);
|
|
664
|
-
t.setDate(e), t.setHours(C.getHours()), t.setMinutes(C.getMinutes()), t.setSeconds(C.getSeconds()), j(t), x === "date" &&
|
|
664
|
+
t.setDate(e), t.setHours(C.getHours()), t.setMinutes(C.getMinutes()), t.setSeconds(C.getSeconds()), j(t), x === "date" && g(!1);
|
|
665
665
|
}, P = (e, t, n = 0) => {
|
|
666
666
|
let r = new Date(C);
|
|
667
667
|
r.setHours(r.getHours() + e), r.setMinutes(r.getMinutes() + t), r.setSeconds(r.getSeconds() + n), j(r);
|
|
668
668
|
}, F = () => {
|
|
669
669
|
let e = new Date(C), t = e.getHours();
|
|
670
670
|
e.setHours(t >= 12 ? t - 12 : t + 12), j(e);
|
|
671
|
-
},
|
|
671
|
+
}, I = () => {
|
|
672
672
|
let e = /* @__PURE__ */ new Date();
|
|
673
673
|
j(e), E(new Date(e));
|
|
674
|
-
},
|
|
675
|
-
let e =
|
|
674
|
+
}, L = (e, t) => new Date(t, e + 1, 0).getDate(), te = (e, t) => new Date(t, e, 1).getDay(), R = i(() => {
|
|
675
|
+
let e = L(T.getMonth(), T.getFullYear()), t = te(T.getMonth(), T.getFullYear()), n = [];
|
|
676
676
|
for (let e = 0; e < t; e++) n.push(null);
|
|
677
677
|
for (let t = 1; t <= e; t++) n.push(t);
|
|
678
678
|
return n;
|
|
679
|
-
}, [T]),
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
]
|
|
693
|
-
|
|
679
|
+
}, [T]), ne = [
|
|
680
|
+
m("January"),
|
|
681
|
+
m("February"),
|
|
682
|
+
m("March"),
|
|
683
|
+
m("April"),
|
|
684
|
+
m("May"),
|
|
685
|
+
m("June"),
|
|
686
|
+
m("July"),
|
|
687
|
+
m("August"),
|
|
688
|
+
m("September"),
|
|
689
|
+
m("October"),
|
|
690
|
+
m("November"),
|
|
691
|
+
m("December")
|
|
692
|
+
], z = /* @__PURE__ */ l(O, {
|
|
693
|
+
alignItems: "center",
|
|
694
694
|
position: "relative",
|
|
695
695
|
width: "100%",
|
|
696
|
-
children: /* @__PURE__ */ c(U, {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
696
|
+
children: [/* @__PURE__ */ c(U, {
|
|
697
|
+
ref: p,
|
|
698
|
+
value: w,
|
|
699
|
+
readOnly: !0,
|
|
700
|
+
placeholder: s || m(x === "date" ? "Select Date..." : "Select Date & Time..."),
|
|
701
|
+
paddingRight: 40,
|
|
702
|
+
...d,
|
|
703
|
+
type: "text",
|
|
704
|
+
onPressIn: (e) => {
|
|
705
|
+
d.onPressIn?.(e), A();
|
|
706
|
+
},
|
|
707
|
+
onClick: (e) => {
|
|
708
|
+
d.onClick?.(e), A();
|
|
709
|
+
},
|
|
710
|
+
onFocus: (e) => {
|
|
711
|
+
d.onFocus?.(e), A();
|
|
712
|
+
},
|
|
713
|
+
cursor: "pointer"
|
|
714
|
+
}), /* @__PURE__ */ c(O, {
|
|
715
|
+
position: "absolute",
|
|
716
|
+
right: 12,
|
|
717
|
+
pointerEvents: "none",
|
|
718
|
+
opacity: .6,
|
|
719
|
+
children: /* @__PURE__ */ l("svg", {
|
|
720
|
+
viewBox: "0 0 24 24",
|
|
721
|
+
width: "18",
|
|
722
|
+
height: "18",
|
|
723
|
+
fill: "none",
|
|
724
|
+
stroke: "currentColor",
|
|
725
|
+
strokeWidth: "2",
|
|
726
|
+
strokeLinecap: "round",
|
|
727
|
+
strokeLinejoin: "round",
|
|
728
|
+
style: { color: "var(--primary)" },
|
|
729
|
+
children: [
|
|
730
|
+
/* @__PURE__ */ c("rect", {
|
|
731
|
+
x: "3",
|
|
732
|
+
y: "4",
|
|
726
733
|
width: "18",
|
|
727
734
|
height: "18",
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}),
|
|
749
|
-
/* @__PURE__ */ c("line", {
|
|
750
|
-
x1: "8",
|
|
751
|
-
y1: "2",
|
|
752
|
-
x2: "8",
|
|
753
|
-
y2: "6"
|
|
754
|
-
}),
|
|
755
|
-
/* @__PURE__ */ c("line", {
|
|
756
|
-
x1: "3",
|
|
757
|
-
y1: "10",
|
|
758
|
-
x2: "21",
|
|
759
|
-
y2: "10"
|
|
760
|
-
})
|
|
761
|
-
]
|
|
735
|
+
rx: "2",
|
|
736
|
+
ry: "2"
|
|
737
|
+
}),
|
|
738
|
+
/* @__PURE__ */ c("line", {
|
|
739
|
+
x1: "16",
|
|
740
|
+
y1: "2",
|
|
741
|
+
x2: "16",
|
|
742
|
+
y2: "6"
|
|
743
|
+
}),
|
|
744
|
+
/* @__PURE__ */ c("line", {
|
|
745
|
+
x1: "8",
|
|
746
|
+
y1: "2",
|
|
747
|
+
x2: "8",
|
|
748
|
+
y2: "6"
|
|
749
|
+
}),
|
|
750
|
+
/* @__PURE__ */ c("line", {
|
|
751
|
+
x1: "3",
|
|
752
|
+
y1: "10",
|
|
753
|
+
x2: "21",
|
|
754
|
+
y2: "10"
|
|
762
755
|
})
|
|
763
|
-
|
|
764
|
-
})
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
756
|
+
]
|
|
757
|
+
})
|
|
758
|
+
})]
|
|
759
|
+
}), B = /* @__PURE__ */ l(k, {
|
|
760
|
+
width: 304,
|
|
761
|
+
children: [
|
|
762
|
+
/* @__PURE__ */ l(O, {
|
|
763
|
+
justifyContent: "space-between",
|
|
764
|
+
alignItems: "center",
|
|
765
|
+
marginBottom: "$3",
|
|
772
766
|
children: [
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
|
|
767
|
+
/* @__PURE__ */ c(V, {
|
|
768
|
+
type: "button",
|
|
769
|
+
size: "sm",
|
|
770
|
+
borderRadius: 100,
|
|
771
|
+
width: 28,
|
|
772
|
+
height: 28,
|
|
773
|
+
padding: 0,
|
|
774
|
+
onPress: () => E(new Date(T.setMonth(T.getMonth() - 1))),
|
|
775
|
+
children: /* @__PURE__ */ c(M, {
|
|
776
|
+
fontSize: 12,
|
|
777
|
+
position: "relative",
|
|
778
|
+
left: -1,
|
|
779
|
+
children: "<"
|
|
780
|
+
})
|
|
781
|
+
}),
|
|
782
|
+
/* @__PURE__ */ l(O, {
|
|
775
783
|
alignItems: "center",
|
|
776
|
-
|
|
784
|
+
cursor: "pointer",
|
|
777
785
|
children: [
|
|
778
|
-
/* @__PURE__ */ c(
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
786
|
+
/* @__PURE__ */ c(k, {
|
|
787
|
+
onDoubleClick: () => b(!0),
|
|
788
|
+
children: y ? /* @__PURE__ */ c(U, {
|
|
789
|
+
size: "sm",
|
|
790
|
+
width: 100,
|
|
791
|
+
style: { textAlign: "center" },
|
|
792
|
+
paddingHorizontal: 4,
|
|
793
|
+
defaultValue: T.getMonth() + 1,
|
|
794
|
+
onKeyDown: (e) => {
|
|
795
|
+
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
796
|
+
},
|
|
797
|
+
onBlur: (e) => {
|
|
798
|
+
let t = parseInt(e.target.value);
|
|
799
|
+
!isNaN(t) && t > 0 && t <= 12 && E(new Date(T.setMonth(t - 1))), b(!1);
|
|
800
|
+
}
|
|
801
|
+
}) : /* @__PURE__ */ c(M, {
|
|
787
802
|
fontSize: 12,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
children:
|
|
803
|
+
fontWeight: "700",
|
|
804
|
+
color: "$primary",
|
|
805
|
+
children: ne[T.getMonth()]
|
|
791
806
|
})
|
|
792
807
|
}),
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
children:
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
fontSize: 12,
|
|
814
|
-
fontWeight: "700",
|
|
815
|
-
color: "$primary",
|
|
816
|
-
children: z[T.getMonth()]
|
|
817
|
-
})
|
|
818
|
-
}),
|
|
819
|
-
/* @__PURE__ */ c(f, { width: 12 }),
|
|
820
|
-
/* @__PURE__ */ c(A, {
|
|
821
|
-
onDoubleClick: () => v(!0),
|
|
822
|
-
children: g ? /* @__PURE__ */ c(H, {
|
|
823
|
-
size: "sm",
|
|
824
|
-
width: 60,
|
|
825
|
-
style: { textAlign: "center" },
|
|
826
|
-
paddingHorizontal: 4,
|
|
827
|
-
defaultValue: T.getFullYear().toString(),
|
|
828
|
-
onKeyDown: (e) => {
|
|
829
|
-
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
830
|
-
},
|
|
831
|
-
onBlur: (e) => {
|
|
832
|
-
let t = parseInt(e.target.value);
|
|
833
|
-
isNaN(t) || E(new Date(T.setFullYear(t))), v(!1);
|
|
834
|
-
}
|
|
835
|
-
}) : /* @__PURE__ */ c(N, {
|
|
836
|
-
fontWeight: "700",
|
|
837
|
-
color: "$primary",
|
|
838
|
-
children: T.getFullYear()
|
|
839
|
-
})
|
|
840
|
-
})
|
|
841
|
-
]
|
|
842
|
-
}),
|
|
843
|
-
/* @__PURE__ */ c(B, {
|
|
844
|
-
type: "button",
|
|
845
|
-
size: "sm",
|
|
846
|
-
borderRadius: 100,
|
|
847
|
-
width: 28,
|
|
848
|
-
height: 28,
|
|
849
|
-
padding: 0,
|
|
850
|
-
onPress: () => E(new Date(T.setMonth(T.getMonth() + 1))),
|
|
851
|
-
children: /* @__PURE__ */ c(N, {
|
|
852
|
-
fontSize: 12,
|
|
853
|
-
position: "relative",
|
|
854
|
-
left: 1,
|
|
855
|
-
children: ">"
|
|
808
|
+
/* @__PURE__ */ c(f, { width: 12 }),
|
|
809
|
+
/* @__PURE__ */ c(k, {
|
|
810
|
+
onDoubleClick: () => v(!0),
|
|
811
|
+
children: _ ? /* @__PURE__ */ c(U, {
|
|
812
|
+
size: "sm",
|
|
813
|
+
width: 60,
|
|
814
|
+
style: { textAlign: "center" },
|
|
815
|
+
paddingHorizontal: 4,
|
|
816
|
+
defaultValue: T.getFullYear().toString(),
|
|
817
|
+
onKeyDown: (e) => {
|
|
818
|
+
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
819
|
+
},
|
|
820
|
+
onBlur: (e) => {
|
|
821
|
+
let t = parseInt(e.target.value);
|
|
822
|
+
isNaN(t) || E(new Date(T.setFullYear(t))), v(!1);
|
|
823
|
+
}
|
|
824
|
+
}) : /* @__PURE__ */ c(M, {
|
|
825
|
+
fontWeight: "700",
|
|
826
|
+
color: "$primary",
|
|
827
|
+
children: T.getFullYear()
|
|
856
828
|
})
|
|
857
829
|
})
|
|
858
830
|
]
|
|
859
831
|
}),
|
|
860
|
-
/* @__PURE__ */
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
832
|
+
/* @__PURE__ */ c(V, {
|
|
833
|
+
type: "button",
|
|
834
|
+
size: "sm",
|
|
835
|
+
borderRadius: 100,
|
|
836
|
+
width: 28,
|
|
837
|
+
height: 28,
|
|
838
|
+
padding: 0,
|
|
839
|
+
onPress: () => E(new Date(T.setMonth(T.getMonth() + 1))),
|
|
840
|
+
children: /* @__PURE__ */ c(M, {
|
|
841
|
+
fontSize: 12,
|
|
842
|
+
position: "relative",
|
|
843
|
+
left: 1,
|
|
844
|
+
children: ">"
|
|
845
|
+
})
|
|
846
|
+
})
|
|
847
|
+
]
|
|
848
|
+
}),
|
|
849
|
+
/* @__PURE__ */ l(O, {
|
|
850
|
+
flexWrap: "wrap",
|
|
851
|
+
gap: 2,
|
|
852
|
+
marginBottom: "$2",
|
|
853
|
+
children: [/* @__PURE__ */ c(O, {
|
|
854
|
+
width: "100%",
|
|
855
|
+
justifyContent: "space-around",
|
|
856
|
+
children: [
|
|
857
|
+
m("Su"),
|
|
858
|
+
m("Mo"),
|
|
859
|
+
m("Tu"),
|
|
860
|
+
m("We"),
|
|
861
|
+
m("Th"),
|
|
862
|
+
m("Fr"),
|
|
863
|
+
m("Sa")
|
|
864
|
+
].map((e) => /* @__PURE__ */ c(D, {
|
|
865
|
+
width: 36,
|
|
866
|
+
alignItems: "center",
|
|
867
|
+
children: /* @__PURE__ */ c(M, {
|
|
868
|
+
fontSize: 10,
|
|
869
|
+
color: "muted",
|
|
870
|
+
fontWeight: "600",
|
|
871
|
+
children: e
|
|
872
|
+
})
|
|
873
|
+
}, e))
|
|
874
|
+
}), R.map((e, t) => {
|
|
875
|
+
let n = e === C.getDate() && T.getMonth() === C.getMonth() && T.getFullYear() === C.getFullYear();
|
|
876
|
+
return /* @__PURE__ */ c(D, {
|
|
877
|
+
width: 36,
|
|
878
|
+
height: 36,
|
|
879
|
+
alignItems: "center",
|
|
880
|
+
justifyContent: "center",
|
|
881
|
+
borderRadius: "$2",
|
|
882
|
+
cursor: e ? "pointer" : "default",
|
|
883
|
+
backgroundColor: n ? "$primary" : "transparent",
|
|
884
|
+
hoverStyle: e ? { backgroundColor: n ? "$primary" : "$backgroundHover" } : {},
|
|
885
|
+
onPress: () => e && N(e),
|
|
886
|
+
children: /* @__PURE__ */ c(M, {
|
|
887
|
+
color: n ? "#fff" : "$color",
|
|
888
|
+
fontSize: 12,
|
|
889
|
+
fontWeight: n ? "700" : "400",
|
|
890
|
+
children: e || ""
|
|
891
|
+
})
|
|
892
|
+
}, t);
|
|
893
|
+
})]
|
|
894
|
+
}),
|
|
895
|
+
x === "datetime-local" && /* @__PURE__ */ l(k, {
|
|
896
|
+
marginTop: "$2",
|
|
897
|
+
paddingTop: "$3",
|
|
898
|
+
borderTopWidth: 1,
|
|
899
|
+
borderColor: "$borderColor",
|
|
900
|
+
gap: "$2",
|
|
901
|
+
children: [/* @__PURE__ */ l(O, {
|
|
902
|
+
justifyContent: "space-around",
|
|
903
|
+
alignItems: "center",
|
|
904
|
+
children: [
|
|
905
|
+
/* @__PURE__ */ l(k, {
|
|
914
906
|
alignItems: "center",
|
|
907
|
+
gap: "$1",
|
|
915
908
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
children: /* @__PURE__ */ c(N, {
|
|
927
|
-
fontSize: 16,
|
|
928
|
-
children: "+"
|
|
929
|
-
})
|
|
930
|
-
}),
|
|
931
|
-
/* @__PURE__ */ c(H, {
|
|
932
|
-
size: "sm",
|
|
933
|
-
width: 52,
|
|
934
|
-
style: { textAlign: "center" },
|
|
935
|
-
paddingHorizontal: 4,
|
|
936
|
-
onKeyDown: (e) => {
|
|
937
|
-
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
938
|
-
},
|
|
939
|
-
value: (C.getHours() % 12 || 12).toString(),
|
|
940
|
-
onChangeText: (e) => {
|
|
941
|
-
let t = parseInt(e);
|
|
942
|
-
if (!isNaN(t)) {
|
|
943
|
-
t === 12 && (t = 0);
|
|
944
|
-
let e = new Date(C), n = e.getHours() >= 12;
|
|
945
|
-
e.setHours(n ? t + 12 : t), j(e);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
}),
|
|
949
|
-
/* @__PURE__ */ c(B, {
|
|
950
|
-
type: "button",
|
|
951
|
-
size: "sm",
|
|
952
|
-
variant: "ghost",
|
|
953
|
-
padding: 0,
|
|
954
|
-
onPress: () => P(-1, 0, 0),
|
|
955
|
-
children: /* @__PURE__ */ c(N, {
|
|
956
|
-
fontSize: 16,
|
|
957
|
-
children: "-"
|
|
958
|
-
})
|
|
959
|
-
})
|
|
960
|
-
]
|
|
961
|
-
}),
|
|
962
|
-
/* @__PURE__ */ c(N, {
|
|
963
|
-
fontSize: 16,
|
|
964
|
-
color: "muted",
|
|
965
|
-
marginTop: 10,
|
|
966
|
-
position: "relative",
|
|
967
|
-
top: -2,
|
|
968
|
-
children: ":"
|
|
909
|
+
/* @__PURE__ */ c(V, {
|
|
910
|
+
type: "button",
|
|
911
|
+
size: "sm",
|
|
912
|
+
variant: "ghost",
|
|
913
|
+
padding: 0,
|
|
914
|
+
onPress: () => P(1, 0, 0),
|
|
915
|
+
children: /* @__PURE__ */ c(M, {
|
|
916
|
+
fontSize: 16,
|
|
917
|
+
children: "+"
|
|
918
|
+
})
|
|
969
919
|
}),
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
width: 52,
|
|
988
|
-
style: { textAlign: "center" },
|
|
989
|
-
paddingHorizontal: 4,
|
|
990
|
-
onKeyDown: (e) => {
|
|
991
|
-
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
992
|
-
},
|
|
993
|
-
value: C.getMinutes().toString().padStart(2, "0"),
|
|
994
|
-
onChangeText: (e) => {
|
|
995
|
-
let t = parseInt(e);
|
|
996
|
-
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
997
|
-
let e = new Date(C);
|
|
998
|
-
e.setMinutes(t), j(e);
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
}),
|
|
1002
|
-
/* @__PURE__ */ c(B, {
|
|
1003
|
-
type: "button",
|
|
1004
|
-
size: "sm",
|
|
1005
|
-
variant: "ghost",
|
|
1006
|
-
padding: 0,
|
|
1007
|
-
onPress: () => P(0, -1, 0),
|
|
1008
|
-
children: /* @__PURE__ */ c(N, {
|
|
1009
|
-
fontSize: 16,
|
|
1010
|
-
children: "-"
|
|
1011
|
-
})
|
|
1012
|
-
})
|
|
1013
|
-
]
|
|
920
|
+
/* @__PURE__ */ c(U, {
|
|
921
|
+
size: "sm",
|
|
922
|
+
width: 52,
|
|
923
|
+
style: { textAlign: "center" },
|
|
924
|
+
paddingHorizontal: 4,
|
|
925
|
+
onKeyDown: (e) => {
|
|
926
|
+
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
927
|
+
},
|
|
928
|
+
value: (C.getHours() % 12 || 12).toString(),
|
|
929
|
+
onChangeText: (e) => {
|
|
930
|
+
let t = parseInt(e);
|
|
931
|
+
if (!isNaN(t)) {
|
|
932
|
+
t === 12 && (t = 0);
|
|
933
|
+
let e = new Date(C), n = e.getHours() >= 12;
|
|
934
|
+
e.setHours(n ? t + 12 : t), j(e);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
1014
937
|
}),
|
|
1015
|
-
/* @__PURE__ */ c(
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
children:
|
|
938
|
+
/* @__PURE__ */ c(V, {
|
|
939
|
+
type: "button",
|
|
940
|
+
size: "sm",
|
|
941
|
+
variant: "ghost",
|
|
942
|
+
padding: 0,
|
|
943
|
+
onPress: () => P(-1, 0, 0),
|
|
944
|
+
children: /* @__PURE__ */ c(M, {
|
|
945
|
+
fontSize: 16,
|
|
946
|
+
children: "-"
|
|
947
|
+
})
|
|
948
|
+
})
|
|
949
|
+
]
|
|
950
|
+
}),
|
|
951
|
+
/* @__PURE__ */ c(M, {
|
|
952
|
+
fontSize: 16,
|
|
953
|
+
color: "muted",
|
|
954
|
+
marginTop: 10,
|
|
955
|
+
position: "relative",
|
|
956
|
+
top: -2,
|
|
957
|
+
children: ":"
|
|
958
|
+
}),
|
|
959
|
+
/* @__PURE__ */ l(k, {
|
|
960
|
+
alignItems: "center",
|
|
961
|
+
gap: "$1",
|
|
962
|
+
children: [
|
|
963
|
+
/* @__PURE__ */ c(V, {
|
|
964
|
+
type: "button",
|
|
965
|
+
size: "sm",
|
|
966
|
+
variant: "ghost",
|
|
967
|
+
padding: 0,
|
|
968
|
+
onPress: () => P(0, 1, 0),
|
|
969
|
+
children: /* @__PURE__ */ c(M, {
|
|
970
|
+
fontSize: 16,
|
|
971
|
+
children: "+"
|
|
972
|
+
})
|
|
1022
973
|
}),
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
size: "sm",
|
|
1040
|
-
width: 52,
|
|
1041
|
-
style: { textAlign: "center" },
|
|
1042
|
-
paddingHorizontal: 4,
|
|
1043
|
-
onKeyDown: (e) => {
|
|
1044
|
-
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
1045
|
-
},
|
|
1046
|
-
value: C.getSeconds().toString().padStart(2, "0"),
|
|
1047
|
-
onChangeText: (e) => {
|
|
1048
|
-
let t = parseInt(e);
|
|
1049
|
-
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
1050
|
-
let e = new Date(C);
|
|
1051
|
-
e.setSeconds(t), j(e);
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}),
|
|
1055
|
-
/* @__PURE__ */ c(B, {
|
|
1056
|
-
type: "button",
|
|
1057
|
-
size: "sm",
|
|
1058
|
-
variant: "ghost",
|
|
1059
|
-
padding: 0,
|
|
1060
|
-
onPress: () => P(0, 0, -1),
|
|
1061
|
-
children: /* @__PURE__ */ c(N, {
|
|
1062
|
-
fontSize: 16,
|
|
1063
|
-
children: "-"
|
|
1064
|
-
})
|
|
1065
|
-
})
|
|
1066
|
-
]
|
|
974
|
+
/* @__PURE__ */ c(U, {
|
|
975
|
+
size: "sm",
|
|
976
|
+
width: 52,
|
|
977
|
+
style: { textAlign: "center" },
|
|
978
|
+
paddingHorizontal: 4,
|
|
979
|
+
onKeyDown: (e) => {
|
|
980
|
+
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
981
|
+
},
|
|
982
|
+
value: C.getMinutes().toString().padStart(2, "0"),
|
|
983
|
+
onChangeText: (e) => {
|
|
984
|
+
let t = parseInt(e);
|
|
985
|
+
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
986
|
+
let e = new Date(C);
|
|
987
|
+
e.setMinutes(t), j(e);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
1067
990
|
}),
|
|
1068
|
-
/* @__PURE__ */ c(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
paddingHorizontal: "$2",
|
|
1078
|
-
onPress: F,
|
|
1079
|
-
borderRadius: "$2",
|
|
1080
|
-
minWidth: 46,
|
|
1081
|
-
backgroundColor: "$primary",
|
|
1082
|
-
children: /* @__PURE__ */ c(N, {
|
|
1083
|
-
fontSize: 10,
|
|
1084
|
-
fontWeight: "900",
|
|
1085
|
-
color: "#fff",
|
|
1086
|
-
children: C.getHours() >= 12 ? "PM" : "AM"
|
|
1087
|
-
})
|
|
991
|
+
/* @__PURE__ */ c(V, {
|
|
992
|
+
type: "button",
|
|
993
|
+
size: "sm",
|
|
994
|
+
variant: "ghost",
|
|
995
|
+
padding: 0,
|
|
996
|
+
onPress: () => P(0, -1, 0),
|
|
997
|
+
children: /* @__PURE__ */ c(M, {
|
|
998
|
+
fontSize: 16,
|
|
999
|
+
children: "-"
|
|
1088
1000
|
})
|
|
1089
1001
|
})
|
|
1090
1002
|
]
|
|
1091
|
-
}),
|
|
1092
|
-
|
|
1003
|
+
}),
|
|
1004
|
+
/* @__PURE__ */ c(M, {
|
|
1005
|
+
fontSize: 16,
|
|
1006
|
+
color: "muted",
|
|
1007
|
+
marginTop: 10,
|
|
1008
|
+
position: "relative",
|
|
1009
|
+
top: -2,
|
|
1010
|
+
children: ":"
|
|
1011
|
+
}),
|
|
1012
|
+
/* @__PURE__ */ l(k, {
|
|
1013
|
+
alignItems: "center",
|
|
1014
|
+
gap: "$1",
|
|
1093
1015
|
children: [
|
|
1094
|
-
/* @__PURE__ */ c(
|
|
1016
|
+
/* @__PURE__ */ c(V, {
|
|
1095
1017
|
type: "button",
|
|
1096
|
-
variant: "default",
|
|
1097
1018
|
size: "sm",
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1019
|
+
variant: "ghost",
|
|
1020
|
+
padding: 0,
|
|
1021
|
+
onPress: () => P(0, 0, 1),
|
|
1022
|
+
children: /* @__PURE__ */ c(M, {
|
|
1023
|
+
fontSize: 16,
|
|
1024
|
+
children: "+"
|
|
1025
|
+
})
|
|
1026
|
+
}),
|
|
1027
|
+
/* @__PURE__ */ c(U, {
|
|
1028
|
+
size: "sm",
|
|
1029
|
+
width: 52,
|
|
1030
|
+
style: { textAlign: "center" },
|
|
1031
|
+
paddingHorizontal: 4,
|
|
1032
|
+
onKeyDown: (e) => {
|
|
1033
|
+
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
1034
|
+
},
|
|
1035
|
+
value: C.getSeconds().toString().padStart(2, "0"),
|
|
1036
|
+
onChangeText: (e) => {
|
|
1037
|
+
let t = parseInt(e);
|
|
1038
|
+
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
1039
|
+
let e = new Date(C);
|
|
1040
|
+
e.setSeconds(t), j(e);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1101
1043
|
}),
|
|
1102
|
-
/* @__PURE__ */ c(
|
|
1103
|
-
/* @__PURE__ */ c(B, {
|
|
1044
|
+
/* @__PURE__ */ c(V, {
|
|
1104
1045
|
type: "button",
|
|
1105
|
-
variant: "primary",
|
|
1106
1046
|
size: "sm",
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1047
|
+
variant: "ghost",
|
|
1048
|
+
padding: 0,
|
|
1049
|
+
onPress: () => P(0, 0, -1),
|
|
1050
|
+
children: /* @__PURE__ */ c(M, {
|
|
1051
|
+
fontSize: 16,
|
|
1052
|
+
children: "-"
|
|
1053
|
+
})
|
|
1110
1054
|
})
|
|
1111
1055
|
]
|
|
1112
|
-
})
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1056
|
+
}),
|
|
1057
|
+
/* @__PURE__ */ c(k, {
|
|
1058
|
+
justifyContent: "center",
|
|
1059
|
+
marginTop: 10,
|
|
1060
|
+
position: "relative",
|
|
1061
|
+
top: -2,
|
|
1062
|
+
children: /* @__PURE__ */ c(V, {
|
|
1063
|
+
type: "button",
|
|
1064
|
+
size: "sm",
|
|
1065
|
+
variant: "primary",
|
|
1066
|
+
paddingHorizontal: "$2",
|
|
1067
|
+
onPress: F,
|
|
1068
|
+
borderRadius: "$2",
|
|
1069
|
+
minWidth: 46,
|
|
1070
|
+
backgroundColor: "$primary",
|
|
1071
|
+
children: /* @__PURE__ */ c(M, {
|
|
1072
|
+
fontSize: 10,
|
|
1073
|
+
fontWeight: "900",
|
|
1074
|
+
color: "#fff",
|
|
1075
|
+
children: C.getHours() >= 12 ? "PM" : "AM"
|
|
1076
|
+
})
|
|
1077
|
+
})
|
|
1078
|
+
})
|
|
1079
|
+
]
|
|
1080
|
+
}), /* @__PURE__ */ l(O, {
|
|
1081
|
+
marginTop: "$1",
|
|
1082
|
+
children: [
|
|
1083
|
+
/* @__PURE__ */ c(V, {
|
|
1084
|
+
type: "button",
|
|
1085
|
+
variant: "default",
|
|
1086
|
+
size: "sm",
|
|
1087
|
+
onPress: I,
|
|
1088
|
+
flex: 1,
|
|
1089
|
+
children: m("Now")
|
|
1090
|
+
}),
|
|
1091
|
+
/* @__PURE__ */ c(f, { width: 8 }),
|
|
1092
|
+
/* @__PURE__ */ c(V, {
|
|
1093
|
+
type: "button",
|
|
1094
|
+
variant: "primary",
|
|
1095
|
+
size: "sm",
|
|
1096
|
+
onPress: () => g(!1),
|
|
1097
|
+
flex: 2,
|
|
1098
|
+
children: m("Apply Selection")
|
|
1099
|
+
})
|
|
1100
|
+
]
|
|
1101
|
+
})]
|
|
1102
|
+
})
|
|
1103
|
+
]
|
|
1104
|
+
});
|
|
1105
|
+
return /* @__PURE__ */ c(k, {
|
|
1106
|
+
position: "relative",
|
|
1107
|
+
width: d.width ?? "100%",
|
|
1108
|
+
children: /* @__PURE__ */ c(W, {
|
|
1109
|
+
trigger: z,
|
|
1110
|
+
content: B,
|
|
1111
|
+
placement: u,
|
|
1112
|
+
open: h,
|
|
1113
|
+
onOpenChange: g
|
|
1119
1114
|
})
|
|
1120
1115
|
});
|
|
1121
1116
|
});
|
|
1122
|
-
|
|
1117
|
+
G.displayName = "DatePicker";
|
|
1123
1118
|
//#endregion
|
|
1124
1119
|
//#region src/components/Select.tsx
|
|
1125
|
-
var
|
|
1126
|
-
let
|
|
1127
|
-
|
|
1120
|
+
var K = e.forwardRef(({ error: t, size: n = "md", value: r, onChange: i, onValueChange: a, options: s, placeholder: u, disabled: d, name: f, color: p, onBlur: m, onFocus: h, placement: g, backgroundColor: v, borderWidth: y, borderColor: b, borderRadius: x, paddingHorizontal: S, ...C }, w) => {
|
|
1121
|
+
let { t: T } = ee("ui"), E = s.find((e) => e.value === r), D = E ? E.label : u || "Select an option...", [O, A] = o(!1), j = (e) => {
|
|
1122
|
+
a?.(e), i && i({ target: {
|
|
1128
1123
|
value: e,
|
|
1129
|
-
name:
|
|
1130
|
-
} }),
|
|
1131
|
-
},
|
|
1132
|
-
ref:
|
|
1133
|
-
disabled:
|
|
1124
|
+
name: f || ""
|
|
1125
|
+
} }), A(!1);
|
|
1126
|
+
}, M = /* @__PURE__ */ l(V, {
|
|
1127
|
+
ref: w,
|
|
1128
|
+
disabled: d,
|
|
1134
1129
|
tabIndex: -1,
|
|
1135
|
-
size:
|
|
1130
|
+
size: n,
|
|
1136
1131
|
variant: "ghost",
|
|
1137
1132
|
width: "100%",
|
|
1138
1133
|
justifyContent: "space-between",
|
|
1139
|
-
borderWidth:
|
|
1140
|
-
borderColor:
|
|
1141
|
-
backgroundColor:
|
|
1142
|
-
borderRadius:
|
|
1143
|
-
paddingHorizontal:
|
|
1134
|
+
borderWidth: y ?? 1,
|
|
1135
|
+
borderColor: t ? "$error" : b ?? "$borderColor",
|
|
1136
|
+
backgroundColor: v ?? "$backgroundSecondary",
|
|
1137
|
+
borderRadius: x ?? "$round",
|
|
1138
|
+
paddingHorizontal: S,
|
|
1144
1139
|
hoverStyle: { backgroundColor: "$backgroundHover" },
|
|
1145
1140
|
pointerEvents: "none",
|
|
1146
|
-
children: [/* @__PURE__ */ c(
|
|
1147
|
-
fontSize:
|
|
1148
|
-
color:
|
|
1141
|
+
children: [/* @__PURE__ */ c(P, {
|
|
1142
|
+
fontSize: n === "sm" ? "$xs" : "$sm",
|
|
1143
|
+
color: E ? "$color" : "$colorMuted",
|
|
1149
1144
|
numberOfLines: 1,
|
|
1150
1145
|
flex: 1,
|
|
1151
1146
|
overflow: "hidden",
|
|
1152
|
-
children:
|
|
1153
|
-
}), /* @__PURE__ */ c(
|
|
1147
|
+
children: D
|
|
1148
|
+
}), /* @__PURE__ */ c(k, {
|
|
1154
1149
|
width: 0,
|
|
1155
1150
|
height: 0,
|
|
1156
1151
|
borderLeftWidth: 5,
|
|
@@ -1161,63 +1156,86 @@ var G = e.forwardRef(({ error: e, size: t = "md", value: n, onChange: r, onValue
|
|
|
1161
1156
|
borderTopColor: "$colorMuted",
|
|
1162
1157
|
opacity: .6
|
|
1163
1158
|
})]
|
|
1164
|
-
}),
|
|
1159
|
+
}), [N, F] = o(""), I = s.filter((e) => e.label.toLowerCase().includes(N.toLowerCase())), L = /* @__PURE__ */ l(k, { children: [s.length > 5 && /* @__PURE__ */ c(k, {
|
|
1160
|
+
padding: "$xs",
|
|
1161
|
+
paddingBottom: 0,
|
|
1162
|
+
children: /* @__PURE__ */ c(U, {
|
|
1163
|
+
size: "sm",
|
|
1164
|
+
placeholder: T("search", { defaultValue: "Search..." }),
|
|
1165
|
+
value: N,
|
|
1166
|
+
onChangeText: F,
|
|
1167
|
+
onKeyDown: (e) => e.stopPropagation()
|
|
1168
|
+
})
|
|
1169
|
+
}), /* @__PURE__ */ c(_, {
|
|
1165
1170
|
maxHeight: 250,
|
|
1166
|
-
children: /* @__PURE__ */ l(
|
|
1171
|
+
children: /* @__PURE__ */ l(k, {
|
|
1167
1172
|
gap: "$xs",
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1173
|
+
padding: "$xs",
|
|
1174
|
+
children: [
|
|
1175
|
+
u && /* @__PURE__ */ c(V, {
|
|
1176
|
+
variant: "ghost",
|
|
1177
|
+
size: "sm",
|
|
1178
|
+
justifyContent: "flex-start",
|
|
1179
|
+
onPress: () => j(""),
|
|
1180
|
+
children: /* @__PURE__ */ c(P, {
|
|
1181
|
+
fontSize: "$sm",
|
|
1182
|
+
color: "$colorMuted",
|
|
1183
|
+
children: u
|
|
1184
|
+
})
|
|
1185
|
+
}),
|
|
1186
|
+
I.length === 0 && /* @__PURE__ */ c(P, {
|
|
1174
1187
|
fontSize: "$sm",
|
|
1175
1188
|
color: "$colorMuted",
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
children:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
+
padding: "$sm",
|
|
1190
|
+
textAlign: "center",
|
|
1191
|
+
children: T("no_options_found", { defaultValue: "No options found" })
|
|
1192
|
+
}),
|
|
1193
|
+
I.map((e) => /* @__PURE__ */ c(V, {
|
|
1194
|
+
variant: "ghost",
|
|
1195
|
+
size: "sm",
|
|
1196
|
+
justifyContent: "flex-start",
|
|
1197
|
+
onPress: () => j(e.value),
|
|
1198
|
+
backgroundColor: e.value === r ? "$primary1" : "transparent",
|
|
1199
|
+
children: /* @__PURE__ */ c(P, {
|
|
1200
|
+
fontSize: "$sm",
|
|
1201
|
+
children: e.label
|
|
1202
|
+
})
|
|
1203
|
+
}, e.value))
|
|
1204
|
+
]
|
|
1189
1205
|
})
|
|
1190
|
-
});
|
|
1191
|
-
return
|
|
1206
|
+
})] });
|
|
1207
|
+
return e.useEffect(() => {
|
|
1208
|
+
O || F("");
|
|
1209
|
+
}, [O]), /* @__PURE__ */ c(k, {
|
|
1192
1210
|
position: "relative",
|
|
1193
|
-
width:
|
|
1194
|
-
minWidth:
|
|
1195
|
-
...
|
|
1196
|
-
children: /* @__PURE__ */ c(
|
|
1197
|
-
trigger:
|
|
1198
|
-
content:
|
|
1199
|
-
placement:
|
|
1200
|
-
open:
|
|
1201
|
-
onOpenChange:
|
|
1211
|
+
width: C.width || "100%",
|
|
1212
|
+
minWidth: C.minWidth,
|
|
1213
|
+
...C,
|
|
1214
|
+
children: /* @__PURE__ */ c(W, {
|
|
1215
|
+
trigger: M,
|
|
1216
|
+
content: L,
|
|
1217
|
+
placement: g || "bottom-start",
|
|
1218
|
+
open: O,
|
|
1219
|
+
onOpenChange: A
|
|
1202
1220
|
})
|
|
1203
1221
|
});
|
|
1204
1222
|
});
|
|
1205
|
-
|
|
1223
|
+
K.displayName = "Select";
|
|
1206
1224
|
//#endregion
|
|
1207
1225
|
//#region src/components/Toast.tsx
|
|
1208
|
-
var
|
|
1226
|
+
var se = {
|
|
1209
1227
|
success: "✓",
|
|
1210
1228
|
error: "✕",
|
|
1211
1229
|
warning: "⚠",
|
|
1212
1230
|
info: "ℹ"
|
|
1213
1231
|
};
|
|
1214
|
-
function
|
|
1232
|
+
function q({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i }) {
|
|
1215
1233
|
return r(() => {
|
|
1216
1234
|
if (n > 0 && i) {
|
|
1217
1235
|
let e = setTimeout(i, n);
|
|
1218
1236
|
return () => clearTimeout(e);
|
|
1219
1237
|
}
|
|
1220
|
-
}, [n, i]), /* @__PURE__ */ c(
|
|
1238
|
+
}, [n, i]), /* @__PURE__ */ c(k, {
|
|
1221
1239
|
className: `toast toast-${t}`,
|
|
1222
1240
|
role: "alert",
|
|
1223
1241
|
"aria-live": "assertive",
|
|
@@ -1233,19 +1251,19 @@ function K({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1233
1251
|
width: 0,
|
|
1234
1252
|
height: 4
|
|
1235
1253
|
},
|
|
1236
|
-
children: /* @__PURE__ */ l(
|
|
1254
|
+
children: /* @__PURE__ */ l(O, {
|
|
1237
1255
|
alignItems: "center",
|
|
1238
1256
|
gap: "$sm",
|
|
1239
1257
|
children: [
|
|
1240
|
-
/* @__PURE__ */ c(
|
|
1258
|
+
/* @__PURE__ */ c(M, {
|
|
1241
1259
|
fontWeight: "600",
|
|
1242
|
-
children:
|
|
1260
|
+
children: se[t]
|
|
1243
1261
|
}),
|
|
1244
|
-
/* @__PURE__ */ c(
|
|
1262
|
+
/* @__PURE__ */ c(M, {
|
|
1245
1263
|
flex: 1,
|
|
1246
1264
|
children: e
|
|
1247
1265
|
}),
|
|
1248
|
-
i && /* @__PURE__ */ c(
|
|
1266
|
+
i && /* @__PURE__ */ c(V, {
|
|
1249
1267
|
variant: "ghost",
|
|
1250
1268
|
size: "sm",
|
|
1251
1269
|
onPress: i,
|
|
@@ -1256,8 +1274,8 @@ function K({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1256
1274
|
})
|
|
1257
1275
|
});
|
|
1258
1276
|
}
|
|
1259
|
-
function
|
|
1260
|
-
return /* @__PURE__ */ c(
|
|
1277
|
+
function ce({ toasts: e, onDismiss: t }) {
|
|
1278
|
+
return /* @__PURE__ */ c(k, {
|
|
1261
1279
|
"aria-label": "Notifications",
|
|
1262
1280
|
position: "fixed",
|
|
1263
1281
|
bottom: "$lg",
|
|
@@ -1265,9 +1283,9 @@ function le({ toasts: e, onDismiss: t }) {
|
|
|
1265
1283
|
zIndex: 60,
|
|
1266
1284
|
gap: "$sm",
|
|
1267
1285
|
pointerEvents: "none",
|
|
1268
|
-
children: e.map((e) => /* @__PURE__ */ c(
|
|
1286
|
+
children: e.map((e) => /* @__PURE__ */ c(k, {
|
|
1269
1287
|
pointerEvents: "auto",
|
|
1270
|
-
children: /* @__PURE__ */ c(
|
|
1288
|
+
children: /* @__PURE__ */ c(q, {
|
|
1271
1289
|
...e,
|
|
1272
1290
|
onDismiss: () => t(e.id)
|
|
1273
1291
|
})
|
|
@@ -1276,10 +1294,10 @@ function le({ toasts: e, onDismiss: t }) {
|
|
|
1276
1294
|
}
|
|
1277
1295
|
//#endregion
|
|
1278
1296
|
//#region src/components/Portal.tsx
|
|
1279
|
-
var
|
|
1297
|
+
var le = t(null), ue = ({ children: e }) => {
|
|
1280
1298
|
let [t, n] = o(/* @__PURE__ */ new Map());
|
|
1281
1299
|
/* v8 ignore stop */
|
|
1282
|
-
return /* @__PURE__ */ l(
|
|
1300
|
+
return /* @__PURE__ */ l(le.Provider, {
|
|
1283
1301
|
value: {
|
|
1284
1302
|
register: (e, t) => {
|
|
1285
1303
|
n((n) => {
|
|
@@ -1297,7 +1315,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1297
1315
|
children: [e, /* @__PURE__ */ c(de, { portals: t })]
|
|
1298
1316
|
});
|
|
1299
1317
|
}, de = ({ portals: t }) => typeof document < "u" ? null : /* @__PURE__ */ c(s, { children: Array.from(t.entries()).map(([t, n]) => /* @__PURE__ */ c(e.Fragment, { children: n }, t)) }), J = ({ children: e }) => {
|
|
1300
|
-
let t = n(
|
|
1318
|
+
let t = n(le), [i] = o(() => Math.random().toString(36).substr(2, 9));
|
|
1301
1319
|
if (r(() => {
|
|
1302
1320
|
if (!(typeof document < "u" || !t))
|
|
1303
1321
|
/* v8 ignore next */
|
|
@@ -1310,7 +1328,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1310
1328
|
let t = document.getElementById("portal-root");
|
|
1311
1329
|
t || (t = document.createElement("div"), t.id = "portal-root", document.body.appendChild(t));
|
|
1312
1330
|
let n = document.documentElement.className;
|
|
1313
|
-
return t.className !== n && (t.className = n),
|
|
1331
|
+
return t.className !== n && (t.className = n), v.createPortal(e, t);
|
|
1314
1332
|
}
|
|
1315
1333
|
/* v8 ignore next */
|
|
1316
1334
|
return null;
|
|
@@ -1319,7 +1337,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1319
1337
|
md: 600,
|
|
1320
1338
|
lg: 900,
|
|
1321
1339
|
xl: 1200
|
|
1322
|
-
}, pe = ({ isOpen: e, onClose: t, title: n, footer: r, size: i = "md", children: a }) => e ? /* @__PURE__ */ c(J, { children: /* @__PURE__ */ l(
|
|
1340
|
+
}, pe = ({ isOpen: e, onClose: t, title: n, footer: r, size: i = "md", children: a }) => e ? /* @__PURE__ */ c(J, { children: /* @__PURE__ */ l(A, {
|
|
1323
1341
|
position: "absolute",
|
|
1324
1342
|
top: 0,
|
|
1325
1343
|
left: 0,
|
|
@@ -1330,7 +1348,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1330
1348
|
zIndex: 99999,
|
|
1331
1349
|
alignItems: "center",
|
|
1332
1350
|
justifyContent: "center",
|
|
1333
|
-
children: [/* @__PURE__ */ c(
|
|
1351
|
+
children: [/* @__PURE__ */ c(k, {
|
|
1334
1352
|
position: "absolute",
|
|
1335
1353
|
top: 0,
|
|
1336
1354
|
left: 0,
|
|
@@ -1339,7 +1357,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1339
1357
|
backgroundColor: "rgba(0,0,0,0.6)",
|
|
1340
1358
|
onPress: t,
|
|
1341
1359
|
zIndex: 10
|
|
1342
|
-
}), /* @__PURE__ */ l(
|
|
1360
|
+
}), /* @__PURE__ */ l(H, {
|
|
1343
1361
|
width: fe[i],
|
|
1344
1362
|
maxWidth: "95%",
|
|
1345
1363
|
maxHeight: "90vh",
|
|
@@ -1352,33 +1370,33 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1352
1370
|
borderColor: "$borderColor",
|
|
1353
1371
|
zIndex: 100,
|
|
1354
1372
|
children: [
|
|
1355
|
-
/* @__PURE__ */ l(
|
|
1373
|
+
/* @__PURE__ */ l(O, {
|
|
1356
1374
|
padding: "$4",
|
|
1357
1375
|
borderBottomWidth: 1,
|
|
1358
1376
|
borderBottomColor: "$borderColor",
|
|
1359
1377
|
justifyContent: "space-between",
|
|
1360
1378
|
alignItems: "center",
|
|
1361
1379
|
backgroundColor: "$backgroundSecondary",
|
|
1362
|
-
children: [/* @__PURE__ */ c(
|
|
1380
|
+
children: [/* @__PURE__ */ c(M, {
|
|
1363
1381
|
fontWeight: "700",
|
|
1364
1382
|
size: "lg",
|
|
1365
1383
|
children: n
|
|
1366
|
-
}), /* @__PURE__ */ c(
|
|
1384
|
+
}), /* @__PURE__ */ c(V, {
|
|
1367
1385
|
size: "sm",
|
|
1368
1386
|
variant: "ghost",
|
|
1369
1387
|
onPress: t,
|
|
1370
1388
|
padding: "$2",
|
|
1371
|
-
children: /* @__PURE__ */ c(
|
|
1389
|
+
children: /* @__PURE__ */ c(M, { children: "✕" })
|
|
1372
1390
|
})]
|
|
1373
1391
|
}),
|
|
1374
|
-
/* @__PURE__ */ c(
|
|
1392
|
+
/* @__PURE__ */ c(k, {
|
|
1375
1393
|
flex: 1,
|
|
1376
1394
|
overflow: "scroll",
|
|
1377
1395
|
minHeight: 250,
|
|
1378
1396
|
backgroundColor: "$background",
|
|
1379
1397
|
children: a
|
|
1380
1398
|
}),
|
|
1381
|
-
r && /* @__PURE__ */ c(
|
|
1399
|
+
r && /* @__PURE__ */ c(O, {
|
|
1382
1400
|
padding: "$4",
|
|
1383
1401
|
borderTopWidth: 1,
|
|
1384
1402
|
borderTopColor: "$borderColor",
|
|
@@ -1393,7 +1411,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1393
1411
|
//#endregion
|
|
1394
1412
|
//#region src/components/Drawer.tsx
|
|
1395
1413
|
function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, footer: a }) {
|
|
1396
|
-
return e ? /* @__PURE__ */ c(J, { children: /* @__PURE__ */ l(
|
|
1414
|
+
return e ? /* @__PURE__ */ c(J, { children: /* @__PURE__ */ l(A, {
|
|
1397
1415
|
position: "absolute",
|
|
1398
1416
|
top: 0,
|
|
1399
1417
|
left: 0,
|
|
@@ -1402,7 +1420,7 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1402
1420
|
width: "100%",
|
|
1403
1421
|
height: "100%",
|
|
1404
1422
|
zIndex: 1e5,
|
|
1405
|
-
children: [/* @__PURE__ */ c(
|
|
1423
|
+
children: [/* @__PURE__ */ c(k, {
|
|
1406
1424
|
position: "absolute",
|
|
1407
1425
|
top: 0,
|
|
1408
1426
|
left: 0,
|
|
@@ -1411,7 +1429,7 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1411
1429
|
backgroundColor: "rgba(0,0,0,0.45)",
|
|
1412
1430
|
onPress: t,
|
|
1413
1431
|
zIndex: 10
|
|
1414
|
-
}), /* @__PURE__ */ l(
|
|
1432
|
+
}), /* @__PURE__ */ l(H, {
|
|
1415
1433
|
style: {
|
|
1416
1434
|
position: "fixed",
|
|
1417
1435
|
top: 0,
|
|
@@ -1434,31 +1452,31 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1434
1452
|
elevated: !1,
|
|
1435
1453
|
zIndex: 100,
|
|
1436
1454
|
children: [
|
|
1437
|
-
/* @__PURE__ */ l(
|
|
1455
|
+
/* @__PURE__ */ l(O, {
|
|
1438
1456
|
padding: "$md",
|
|
1439
1457
|
borderBottomWidth: 1,
|
|
1440
1458
|
borderColor: "$borderColor",
|
|
1441
1459
|
justifyContent: "space-between",
|
|
1442
1460
|
alignItems: "center",
|
|
1443
1461
|
backgroundColor: "$backgroundSecondary",
|
|
1444
|
-
children: [/* @__PURE__ */ c(
|
|
1462
|
+
children: [/* @__PURE__ */ c(M, {
|
|
1445
1463
|
fontWeight: "700",
|
|
1446
1464
|
size: "$md",
|
|
1447
1465
|
children: n
|
|
1448
|
-
}), /* @__PURE__ */ c(
|
|
1466
|
+
}), /* @__PURE__ */ c(V, {
|
|
1449
1467
|
size: "sm",
|
|
1450
1468
|
variant: "ghost",
|
|
1451
1469
|
onPress: t,
|
|
1452
1470
|
children: "✕"
|
|
1453
1471
|
})]
|
|
1454
1472
|
}),
|
|
1455
|
-
/* @__PURE__ */ c(
|
|
1473
|
+
/* @__PURE__ */ c(k, {
|
|
1456
1474
|
flex: 1,
|
|
1457
1475
|
padding: "$md",
|
|
1458
1476
|
style: { overflowY: "auto" },
|
|
1459
1477
|
children: i
|
|
1460
1478
|
}),
|
|
1461
|
-
a && /* @__PURE__ */ c(
|
|
1479
|
+
a && /* @__PURE__ */ c(O, {
|
|
1462
1480
|
padding: "$md",
|
|
1463
1481
|
borderTopWidth: 1,
|
|
1464
1482
|
borderColor: "$borderColor",
|
|
@@ -1481,7 +1499,7 @@ var he = {
|
|
|
1481
1499
|
};
|
|
1482
1500
|
function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidth: i, borderColor: a }) {
|
|
1483
1501
|
let [s, l] = o(!1), u = typeof n == "number" ? n : he[n] || 32;
|
|
1484
|
-
return /* @__PURE__ */ c(
|
|
1502
|
+
return /* @__PURE__ */ c(k, {
|
|
1485
1503
|
width: u,
|
|
1486
1504
|
height: u,
|
|
1487
1505
|
borderRadius: r ? u / 2 : "$sm",
|
|
@@ -1491,7 +1509,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1491
1509
|
overflow: "hidden",
|
|
1492
1510
|
borderWidth: i,
|
|
1493
1511
|
borderColor: a,
|
|
1494
|
-
children: e && !s ? /* @__PURE__ */ c(
|
|
1512
|
+
children: e && !s ? /* @__PURE__ */ c(y, {
|
|
1495
1513
|
source: {
|
|
1496
1514
|
uri: e,
|
|
1497
1515
|
width: u,
|
|
@@ -1500,7 +1518,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1500
1518
|
width: "100%",
|
|
1501
1519
|
height: "100%",
|
|
1502
1520
|
onError: () => l(!0)
|
|
1503
|
-
}) : typeof t == "string" ? /* @__PURE__ */ c(
|
|
1521
|
+
}) : typeof t == "string" ? /* @__PURE__ */ c(M, {
|
|
1504
1522
|
color: "$colorMuted",
|
|
1505
1523
|
size: "$sm",
|
|
1506
1524
|
fontWeight: "600",
|
|
@@ -1511,7 +1529,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1511
1529
|
//#endregion
|
|
1512
1530
|
//#region src/components/Separator.tsx
|
|
1513
1531
|
function _e({ vertical: e }) {
|
|
1514
|
-
return /* @__PURE__ */ c(
|
|
1532
|
+
return /* @__PURE__ */ c(k, {
|
|
1515
1533
|
width: e ? 1 : "100%",
|
|
1516
1534
|
height: e ? "100%" : 1,
|
|
1517
1535
|
backgroundColor: "$borderColor"
|
|
@@ -1524,7 +1542,7 @@ function ve(e) {
|
|
|
1524
1542
|
}
|
|
1525
1543
|
function Y({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
|
|
1526
1544
|
let a = ve(e);
|
|
1527
|
-
return /* @__PURE__ */ c(a in
|
|
1545
|
+
return /* @__PURE__ */ c(a in b ? b[a] : b.Box, {
|
|
1528
1546
|
size: t,
|
|
1529
1547
|
color: n,
|
|
1530
1548
|
strokeWidth: r,
|
|
@@ -1534,8 +1552,8 @@ function Y({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
|
|
|
1534
1552
|
//#endregion
|
|
1535
1553
|
//#region src/theme/ThemeToggle.tsx
|
|
1536
1554
|
function ye() {
|
|
1537
|
-
let { theme: e, toggleTheme: t } =
|
|
1538
|
-
return /* @__PURE__ */ c(
|
|
1555
|
+
let { theme: e, toggleTheme: t } = E();
|
|
1556
|
+
return /* @__PURE__ */ c(V, {
|
|
1539
1557
|
variant: "ghost",
|
|
1540
1558
|
onPress: t,
|
|
1541
1559
|
"aria-label": `Switch to ${e === "light" ? "dark" : "light"} mode`,
|
|
@@ -1818,7 +1836,7 @@ var $ = Te(), Ee = h({
|
|
|
1818
1836
|
//#endregion
|
|
1819
1837
|
//#region src/theme/MProvider.tsx
|
|
1820
1838
|
function Ae({ children: e }) {
|
|
1821
|
-
let { theme: t } =
|
|
1839
|
+
let { theme: t } = E();
|
|
1822
1840
|
return /* @__PURE__ */ c(u, {
|
|
1823
1841
|
config: ke,
|
|
1824
1842
|
defaultTheme: t,
|
|
@@ -1826,6 +1844,6 @@ function Ae({ children: e }) {
|
|
|
1826
1844
|
});
|
|
1827
1845
|
}
|
|
1828
1846
|
//#endregion
|
|
1829
|
-
export { ge as Avatar,
|
|
1847
|
+
export { ge as Avatar, V as Button, H as Card, G as DatePicker, me as Drawer, I as Heading, Y as Icon, U as Input, z as LocaleSwitcher, Ae as MProvider, D as MStack, M as MText, pe as Modal, P as Paragraph, W as Popover, J as Portal, de as PortalHost, ue as PortalProvider, K as Select, _e as Separator, re as Skeleton, R as StateBadge, T as ThemeProvider, ye as ThemeToggle, q as Toast, ce as ToastContainer, O as XStack, k as YStack, A as ZStack, X as colors, Te as generateMDesignConfig, ke as mThemeConfig, Q as spacing, Z as typography, E as useTheme };
|
|
1830
1848
|
|
|
1831
1849
|
//# sourceMappingURL=index.js.map
|