@framework-m/ui 0.8.1 → 0.9.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/Select.d.ts.map +1 -1
- package/dist/index.js +294 -271
- 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 +1 -1
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,16 +250,16 @@ var te = [
|
|
|
250
250
|
label: "اردو"
|
|
251
251
|
}
|
|
252
252
|
];
|
|
253
|
-
function
|
|
254
|
-
return /* @__PURE__ */ l(
|
|
253
|
+
function re({ 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
|
-
children: /* @__PURE__ */ c(
|
|
262
|
+
children: /* @__PURE__ */ c(J, {
|
|
263
263
|
name: "globe",
|
|
264
264
|
size: 15
|
|
265
265
|
})
|
|
@@ -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 z = g(f, {
|
|
282
282
|
name: "Skeleton",
|
|
283
283
|
backgroundColor: "$colorBgTertiary",
|
|
284
284
|
borderRadius: "$md",
|
|
@@ -316,12 +316,12 @@ var re = g(f, {
|
|
|
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(z, {
|
|
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(z, {
|
|
325
325
|
className: r,
|
|
326
326
|
"aria-busy": !0,
|
|
327
327
|
"aria-label": "Loading",
|
|
@@ -415,7 +415,7 @@ var re = g(f, {
|
|
|
415
415
|
size: "md"
|
|
416
416
|
}
|
|
417
417
|
}), oe = (e) => typeof e == "string" || typeof e == "number", B = e.forwardRef(({ children: t, variant: n = "default", size: r = "md", loading: i, disabled: a, tag: o = "button", ...s }, l) => {
|
|
418
|
-
let u = ae, d = s.color || (n === "primary" || n === "danger" ? "$white" : "$color"), f = (e, t) => /* @__PURE__ */ c(
|
|
418
|
+
let u = ae, 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",
|
|
@@ -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
|
...(() => {
|
|
@@ -639,44 +639,44 @@ function U({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
639
639
|
//#endregion
|
|
640
640
|
//#region src/components/DatePicker.tsx
|
|
641
641
|
var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date", placeholder: s, ...u }, d) => {
|
|
642
|
-
let { t: p } =
|
|
642
|
+
let { t: p } = ee("ui"), [m, h] = o(!1), [g, _] = o(!1), [v, y] = o(!1), b = a === "datetime-local" || u.field?.format === "date-time" ? "datetime-local" : "date", x = (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
|
-
return
|
|
645
|
-
},
|
|
644
|
+
return b === "date" ? `${n}-${r}-${i}` : `${n}-${r}-${i}T${a}:${o}:${s}`;
|
|
645
|
+
}, S = i(() => {
|
|
646
646
|
if (!e) return /* @__PURE__ */ new Date();
|
|
647
647
|
let t = new Date(e);
|
|
648
648
|
return isNaN(t.getTime()) ? /* @__PURE__ */ new Date() : t;
|
|
649
|
-
}, [e]),
|
|
649
|
+
}, [e]), C = i(() => {
|
|
650
650
|
if (!e) return "";
|
|
651
651
|
let t = new Date(e);
|
|
652
|
-
return isNaN(t.getTime()) ? String(e) :
|
|
653
|
-
}, [e,
|
|
652
|
+
return isNaN(t.getTime()) ? String(e) : b === "date" ? t.toLocaleDateString() : t.toLocaleString();
|
|
653
|
+
}, [e, b]), [w, T] = o(new Date(S)), E = () => {
|
|
654
654
|
h(!0);
|
|
655
655
|
};
|
|
656
656
|
r(() => {
|
|
657
|
-
|
|
658
|
-
}, [
|
|
659
|
-
let
|
|
660
|
-
let r =
|
|
657
|
+
T(new Date(S));
|
|
658
|
+
}, [S]);
|
|
659
|
+
let A = (e) => {
|
|
660
|
+
let r = x(e);
|
|
661
661
|
t?.(r), n?.(r);
|
|
662
|
-
},
|
|
663
|
-
let t = new Date(
|
|
664
|
-
t.setDate(e), t.setHours(
|
|
665
|
-
},
|
|
666
|
-
let r = new Date(
|
|
667
|
-
r.setHours(r.getHours() + e), r.setMinutes(r.getMinutes() + t), r.setSeconds(r.getSeconds() + n),
|
|
662
|
+
}, j = (e) => {
|
|
663
|
+
let t = new Date(w);
|
|
664
|
+
t.setDate(e), t.setHours(S.getHours()), t.setMinutes(S.getMinutes()), t.setSeconds(S.getSeconds()), A(t), b === "date" && h(!1);
|
|
665
|
+
}, N = (e, t, n = 0) => {
|
|
666
|
+
let r = new Date(S);
|
|
667
|
+
r.setHours(r.getHours() + e), r.setMinutes(r.getMinutes() + t), r.setSeconds(r.getSeconds() + n), A(r);
|
|
668
|
+
}, P = () => {
|
|
669
|
+
let e = new Date(S), t = e.getHours();
|
|
670
|
+
e.setHours(t >= 12 ? t - 12 : t + 12), A(e);
|
|
668
671
|
}, F = () => {
|
|
669
|
-
let e = new Date(C), t = e.getHours();
|
|
670
|
-
e.setHours(t >= 12 ? t - 12 : t + 12), j(e);
|
|
671
|
-
}, ee = () => {
|
|
672
672
|
let e = /* @__PURE__ */ new Date();
|
|
673
|
-
|
|
674
|
-
}, I = (e, t) => new Date(t, e + 1, 0).getDate(), L = (e, t) => new Date(t, e, 1).getDay(),
|
|
675
|
-
let e = I(
|
|
673
|
+
A(e), T(new Date(e));
|
|
674
|
+
}, I = (e, t) => new Date(t, e + 1, 0).getDate(), L = (e, t) => new Date(t, e, 1).getDay(), te = i(() => {
|
|
675
|
+
let e = I(w.getMonth(), w.getFullYear()), t = L(w.getMonth(), w.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
|
-
}, [
|
|
679
|
+
}, [w]), R = [
|
|
680
680
|
p("January"),
|
|
681
681
|
p("February"),
|
|
682
682
|
p("March"),
|
|
@@ -690,33 +690,33 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
690
690
|
p("November"),
|
|
691
691
|
p("December")
|
|
692
692
|
];
|
|
693
|
-
return /* @__PURE__ */ c(
|
|
693
|
+
return /* @__PURE__ */ c(k, {
|
|
694
694
|
position: "relative",
|
|
695
695
|
width: "100%",
|
|
696
696
|
children: /* @__PURE__ */ c(U, {
|
|
697
|
-
trigger: /* @__PURE__ */ l(
|
|
697
|
+
trigger: /* @__PURE__ */ l(O, {
|
|
698
698
|
alignItems: "center",
|
|
699
699
|
position: "relative",
|
|
700
700
|
width: "100%",
|
|
701
701
|
children: [/* @__PURE__ */ c(H, {
|
|
702
702
|
ref: d,
|
|
703
|
-
value:
|
|
703
|
+
value: C,
|
|
704
704
|
readOnly: !0,
|
|
705
|
-
placeholder: s || p(
|
|
705
|
+
placeholder: s || p(b === "date" ? "Select Date..." : "Select Date & Time..."),
|
|
706
706
|
paddingRight: 40,
|
|
707
707
|
...u,
|
|
708
708
|
type: "text",
|
|
709
709
|
onPressIn: (e) => {
|
|
710
|
-
u.onPressIn?.(e),
|
|
710
|
+
u.onPressIn?.(e), E();
|
|
711
711
|
},
|
|
712
712
|
onClick: (e) => {
|
|
713
|
-
u.onClick?.(e),
|
|
713
|
+
u.onClick?.(e), E();
|
|
714
714
|
},
|
|
715
715
|
onFocus: (e) => {
|
|
716
|
-
u.onFocus?.(e),
|
|
716
|
+
u.onFocus?.(e), E();
|
|
717
717
|
},
|
|
718
718
|
cursor: "pointer"
|
|
719
|
-
}), /* @__PURE__ */ c(
|
|
719
|
+
}), /* @__PURE__ */ c(O, {
|
|
720
720
|
position: "absolute",
|
|
721
721
|
right: 12,
|
|
722
722
|
pointerEvents: "none",
|
|
@@ -770,7 +770,7 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
770
770
|
borderColor: "$borderColor",
|
|
771
771
|
borderWidth: 1,
|
|
772
772
|
children: [
|
|
773
|
-
/* @__PURE__ */ l(
|
|
773
|
+
/* @__PURE__ */ l(O, {
|
|
774
774
|
justifyContent: "space-between",
|
|
775
775
|
alignItems: "center",
|
|
776
776
|
marginBottom: "$3",
|
|
@@ -782,60 +782,60 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
782
782
|
width: 28,
|
|
783
783
|
height: 28,
|
|
784
784
|
padding: 0,
|
|
785
|
-
onPress: () =>
|
|
786
|
-
children: /* @__PURE__ */ c(
|
|
785
|
+
onPress: () => T(new Date(w.setMonth(w.getMonth() - 1))),
|
|
786
|
+
children: /* @__PURE__ */ c(M, {
|
|
787
787
|
fontSize: 12,
|
|
788
788
|
position: "relative",
|
|
789
789
|
left: -1,
|
|
790
790
|
children: "<"
|
|
791
791
|
})
|
|
792
792
|
}),
|
|
793
|
-
/* @__PURE__ */ l(
|
|
793
|
+
/* @__PURE__ */ l(O, {
|
|
794
794
|
alignItems: "center",
|
|
795
795
|
cursor: "pointer",
|
|
796
796
|
children: [
|
|
797
|
-
/* @__PURE__ */ c(
|
|
798
|
-
onDoubleClick: () =>
|
|
799
|
-
children:
|
|
797
|
+
/* @__PURE__ */ c(k, {
|
|
798
|
+
onDoubleClick: () => y(!0),
|
|
799
|
+
children: v ? /* @__PURE__ */ c(H, {
|
|
800
800
|
size: "sm",
|
|
801
801
|
width: 100,
|
|
802
802
|
style: { textAlign: "center" },
|
|
803
803
|
paddingHorizontal: 4,
|
|
804
|
-
defaultValue:
|
|
804
|
+
defaultValue: w.getMonth() + 1,
|
|
805
805
|
onKeyDown: (e) => {
|
|
806
806
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
807
807
|
},
|
|
808
808
|
onBlur: (e) => {
|
|
809
809
|
let t = parseInt(e.target.value);
|
|
810
|
-
!isNaN(t) && t > 0 && t <= 12 &&
|
|
810
|
+
!isNaN(t) && t > 0 && t <= 12 && T(new Date(w.setMonth(t - 1))), y(!1);
|
|
811
811
|
}
|
|
812
|
-
}) : /* @__PURE__ */ c(
|
|
812
|
+
}) : /* @__PURE__ */ c(M, {
|
|
813
813
|
fontSize: 12,
|
|
814
814
|
fontWeight: "700",
|
|
815
815
|
color: "$primary",
|
|
816
|
-
children:
|
|
816
|
+
children: R[w.getMonth()]
|
|
817
817
|
})
|
|
818
818
|
}),
|
|
819
819
|
/* @__PURE__ */ c(f, { width: 12 }),
|
|
820
|
-
/* @__PURE__ */ c(
|
|
821
|
-
onDoubleClick: () =>
|
|
820
|
+
/* @__PURE__ */ c(k, {
|
|
821
|
+
onDoubleClick: () => _(!0),
|
|
822
822
|
children: g ? /* @__PURE__ */ c(H, {
|
|
823
823
|
size: "sm",
|
|
824
824
|
width: 60,
|
|
825
825
|
style: { textAlign: "center" },
|
|
826
826
|
paddingHorizontal: 4,
|
|
827
|
-
defaultValue:
|
|
827
|
+
defaultValue: w.getFullYear().toString(),
|
|
828
828
|
onKeyDown: (e) => {
|
|
829
829
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
830
830
|
},
|
|
831
831
|
onBlur: (e) => {
|
|
832
832
|
let t = parseInt(e.target.value);
|
|
833
|
-
isNaN(t) ||
|
|
833
|
+
isNaN(t) || T(new Date(w.setFullYear(t))), _(!1);
|
|
834
834
|
}
|
|
835
|
-
}) : /* @__PURE__ */ c(
|
|
835
|
+
}) : /* @__PURE__ */ c(M, {
|
|
836
836
|
fontWeight: "700",
|
|
837
837
|
color: "$primary",
|
|
838
|
-
children:
|
|
838
|
+
children: w.getFullYear()
|
|
839
839
|
})
|
|
840
840
|
})
|
|
841
841
|
]
|
|
@@ -847,8 +847,8 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
847
847
|
width: 28,
|
|
848
848
|
height: 28,
|
|
849
849
|
padding: 0,
|
|
850
|
-
onPress: () =>
|
|
851
|
-
children: /* @__PURE__ */ c(
|
|
850
|
+
onPress: () => T(new Date(w.setMonth(w.getMonth() + 1))),
|
|
851
|
+
children: /* @__PURE__ */ c(M, {
|
|
852
852
|
fontSize: 12,
|
|
853
853
|
position: "relative",
|
|
854
854
|
left: 1,
|
|
@@ -857,11 +857,11 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
857
857
|
})
|
|
858
858
|
]
|
|
859
859
|
}),
|
|
860
|
-
/* @__PURE__ */ l(
|
|
860
|
+
/* @__PURE__ */ l(O, {
|
|
861
861
|
flexWrap: "wrap",
|
|
862
862
|
gap: 2,
|
|
863
863
|
marginBottom: "$2",
|
|
864
|
-
children: [/* @__PURE__ */ c(
|
|
864
|
+
children: [/* @__PURE__ */ c(O, {
|
|
865
865
|
width: "100%",
|
|
866
866
|
justifyContent: "space-around",
|
|
867
867
|
children: [
|
|
@@ -872,19 +872,19 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
872
872
|
p("Th"),
|
|
873
873
|
p("Fr"),
|
|
874
874
|
p("Sa")
|
|
875
|
-
].map((e) => /* @__PURE__ */ c(
|
|
875
|
+
].map((e) => /* @__PURE__ */ c(D, {
|
|
876
876
|
width: 36,
|
|
877
877
|
alignItems: "center",
|
|
878
|
-
children: /* @__PURE__ */ c(
|
|
878
|
+
children: /* @__PURE__ */ c(M, {
|
|
879
879
|
fontSize: 10,
|
|
880
880
|
color: "muted",
|
|
881
881
|
fontWeight: "600",
|
|
882
882
|
children: e
|
|
883
883
|
})
|
|
884
884
|
}, e))
|
|
885
|
-
}),
|
|
886
|
-
let n = e ===
|
|
887
|
-
return /* @__PURE__ */ c(
|
|
885
|
+
}), te.map((e, t) => {
|
|
886
|
+
let n = e === S.getDate() && w.getMonth() === S.getMonth() && w.getFullYear() === S.getFullYear();
|
|
887
|
+
return /* @__PURE__ */ c(D, {
|
|
888
888
|
width: 36,
|
|
889
889
|
height: 36,
|
|
890
890
|
alignItems: "center",
|
|
@@ -893,8 +893,8 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
893
893
|
cursor: e ? "pointer" : "default",
|
|
894
894
|
backgroundColor: n ? "$primary" : "transparent",
|
|
895
895
|
hoverStyle: e ? { backgroundColor: n ? "$primary" : "$backgroundHover" } : {},
|
|
896
|
-
onPress: () => e &&
|
|
897
|
-
children: /* @__PURE__ */ c(
|
|
896
|
+
onPress: () => e && j(e),
|
|
897
|
+
children: /* @__PURE__ */ c(M, {
|
|
898
898
|
color: n ? "#fff" : "$color",
|
|
899
899
|
fontSize: 12,
|
|
900
900
|
fontWeight: n ? "700" : "400",
|
|
@@ -903,17 +903,17 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
903
903
|
}, t);
|
|
904
904
|
})]
|
|
905
905
|
}),
|
|
906
|
-
|
|
906
|
+
b === "datetime-local" && /* @__PURE__ */ l(k, {
|
|
907
907
|
marginTop: "$2",
|
|
908
908
|
paddingTop: "$3",
|
|
909
909
|
borderTopWidth: 1,
|
|
910
910
|
borderColor: "$borderColor",
|
|
911
911
|
gap: "$2",
|
|
912
|
-
children: [/* @__PURE__ */ l(
|
|
912
|
+
children: [/* @__PURE__ */ l(O, {
|
|
913
913
|
justifyContent: "space-around",
|
|
914
914
|
alignItems: "center",
|
|
915
915
|
children: [
|
|
916
|
-
/* @__PURE__ */ l(
|
|
916
|
+
/* @__PURE__ */ l(k, {
|
|
917
917
|
alignItems: "center",
|
|
918
918
|
gap: "$1",
|
|
919
919
|
children: [
|
|
@@ -922,8 +922,8 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
922
922
|
size: "sm",
|
|
923
923
|
variant: "ghost",
|
|
924
924
|
padding: 0,
|
|
925
|
-
onPress: () =>
|
|
926
|
-
children: /* @__PURE__ */ c(
|
|
925
|
+
onPress: () => N(1, 0, 0),
|
|
926
|
+
children: /* @__PURE__ */ c(M, {
|
|
927
927
|
fontSize: 16,
|
|
928
928
|
children: "+"
|
|
929
929
|
})
|
|
@@ -936,13 +936,13 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
936
936
|
onKeyDown: (e) => {
|
|
937
937
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
938
938
|
},
|
|
939
|
-
value: (
|
|
939
|
+
value: (S.getHours() % 12 || 12).toString(),
|
|
940
940
|
onChangeText: (e) => {
|
|
941
941
|
let t = parseInt(e);
|
|
942
942
|
if (!isNaN(t)) {
|
|
943
943
|
t === 12 && (t = 0);
|
|
944
|
-
let e = new Date(
|
|
945
|
-
e.setHours(n ? t + 12 : t),
|
|
944
|
+
let e = new Date(S), n = e.getHours() >= 12;
|
|
945
|
+
e.setHours(n ? t + 12 : t), A(e);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
}),
|
|
@@ -951,15 +951,15 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
951
951
|
size: "sm",
|
|
952
952
|
variant: "ghost",
|
|
953
953
|
padding: 0,
|
|
954
|
-
onPress: () =>
|
|
955
|
-
children: /* @__PURE__ */ c(
|
|
954
|
+
onPress: () => N(-1, 0, 0),
|
|
955
|
+
children: /* @__PURE__ */ c(M, {
|
|
956
956
|
fontSize: 16,
|
|
957
957
|
children: "-"
|
|
958
958
|
})
|
|
959
959
|
})
|
|
960
960
|
]
|
|
961
961
|
}),
|
|
962
|
-
/* @__PURE__ */ c(
|
|
962
|
+
/* @__PURE__ */ c(M, {
|
|
963
963
|
fontSize: 16,
|
|
964
964
|
color: "muted",
|
|
965
965
|
marginTop: 10,
|
|
@@ -967,7 +967,7 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
967
967
|
top: -2,
|
|
968
968
|
children: ":"
|
|
969
969
|
}),
|
|
970
|
-
/* @__PURE__ */ l(
|
|
970
|
+
/* @__PURE__ */ l(k, {
|
|
971
971
|
alignItems: "center",
|
|
972
972
|
gap: "$1",
|
|
973
973
|
children: [
|
|
@@ -976,8 +976,8 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
976
976
|
size: "sm",
|
|
977
977
|
variant: "ghost",
|
|
978
978
|
padding: 0,
|
|
979
|
-
onPress: () =>
|
|
980
|
-
children: /* @__PURE__ */ c(
|
|
979
|
+
onPress: () => N(0, 1, 0),
|
|
980
|
+
children: /* @__PURE__ */ c(M, {
|
|
981
981
|
fontSize: 16,
|
|
982
982
|
children: "+"
|
|
983
983
|
})
|
|
@@ -990,12 +990,12 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
990
990
|
onKeyDown: (e) => {
|
|
991
991
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
992
992
|
},
|
|
993
|
-
value:
|
|
993
|
+
value: S.getMinutes().toString().padStart(2, "0"),
|
|
994
994
|
onChangeText: (e) => {
|
|
995
995
|
let t = parseInt(e);
|
|
996
996
|
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
997
|
-
let e = new Date(
|
|
998
|
-
e.setMinutes(t),
|
|
997
|
+
let e = new Date(S);
|
|
998
|
+
e.setMinutes(t), A(e);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
}),
|
|
@@ -1004,15 +1004,15 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1004
1004
|
size: "sm",
|
|
1005
1005
|
variant: "ghost",
|
|
1006
1006
|
padding: 0,
|
|
1007
|
-
onPress: () =>
|
|
1008
|
-
children: /* @__PURE__ */ c(
|
|
1007
|
+
onPress: () => N(0, -1, 0),
|
|
1008
|
+
children: /* @__PURE__ */ c(M, {
|
|
1009
1009
|
fontSize: 16,
|
|
1010
1010
|
children: "-"
|
|
1011
1011
|
})
|
|
1012
1012
|
})
|
|
1013
1013
|
]
|
|
1014
1014
|
}),
|
|
1015
|
-
/* @__PURE__ */ c(
|
|
1015
|
+
/* @__PURE__ */ c(M, {
|
|
1016
1016
|
fontSize: 16,
|
|
1017
1017
|
color: "muted",
|
|
1018
1018
|
marginTop: 10,
|
|
@@ -1020,7 +1020,7 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1020
1020
|
top: -2,
|
|
1021
1021
|
children: ":"
|
|
1022
1022
|
}),
|
|
1023
|
-
/* @__PURE__ */ l(
|
|
1023
|
+
/* @__PURE__ */ l(k, {
|
|
1024
1024
|
alignItems: "center",
|
|
1025
1025
|
gap: "$1",
|
|
1026
1026
|
children: [
|
|
@@ -1029,8 +1029,8 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1029
1029
|
size: "sm",
|
|
1030
1030
|
variant: "ghost",
|
|
1031
1031
|
padding: 0,
|
|
1032
|
-
onPress: () =>
|
|
1033
|
-
children: /* @__PURE__ */ c(
|
|
1032
|
+
onPress: () => N(0, 0, 1),
|
|
1033
|
+
children: /* @__PURE__ */ c(M, {
|
|
1034
1034
|
fontSize: 16,
|
|
1035
1035
|
children: "+"
|
|
1036
1036
|
})
|
|
@@ -1043,12 +1043,12 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1043
1043
|
onKeyDown: (e) => {
|
|
1044
1044
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
1045
1045
|
},
|
|
1046
|
-
value:
|
|
1046
|
+
value: S.getSeconds().toString().padStart(2, "0"),
|
|
1047
1047
|
onChangeText: (e) => {
|
|
1048
1048
|
let t = parseInt(e);
|
|
1049
1049
|
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
1050
|
-
let e = new Date(
|
|
1051
|
-
e.setSeconds(t),
|
|
1050
|
+
let e = new Date(S);
|
|
1051
|
+
e.setSeconds(t), A(e);
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
}),
|
|
@@ -1057,15 +1057,15 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1057
1057
|
size: "sm",
|
|
1058
1058
|
variant: "ghost",
|
|
1059
1059
|
padding: 0,
|
|
1060
|
-
onPress: () =>
|
|
1061
|
-
children: /* @__PURE__ */ c(
|
|
1060
|
+
onPress: () => N(0, 0, -1),
|
|
1061
|
+
children: /* @__PURE__ */ c(M, {
|
|
1062
1062
|
fontSize: 16,
|
|
1063
1063
|
children: "-"
|
|
1064
1064
|
})
|
|
1065
1065
|
})
|
|
1066
1066
|
]
|
|
1067
1067
|
}),
|
|
1068
|
-
/* @__PURE__ */ c(
|
|
1068
|
+
/* @__PURE__ */ c(k, {
|
|
1069
1069
|
justifyContent: "center",
|
|
1070
1070
|
marginTop: 10,
|
|
1071
1071
|
position: "relative",
|
|
@@ -1075,27 +1075,27 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1075
1075
|
size: "sm",
|
|
1076
1076
|
variant: "primary",
|
|
1077
1077
|
paddingHorizontal: "$2",
|
|
1078
|
-
onPress:
|
|
1078
|
+
onPress: P,
|
|
1079
1079
|
borderRadius: "$2",
|
|
1080
1080
|
minWidth: 46,
|
|
1081
1081
|
backgroundColor: "$primary",
|
|
1082
|
-
children: /* @__PURE__ */ c(
|
|
1082
|
+
children: /* @__PURE__ */ c(M, {
|
|
1083
1083
|
fontSize: 10,
|
|
1084
1084
|
fontWeight: "900",
|
|
1085
1085
|
color: "#fff",
|
|
1086
|
-
children:
|
|
1086
|
+
children: S.getHours() >= 12 ? "PM" : "AM"
|
|
1087
1087
|
})
|
|
1088
1088
|
})
|
|
1089
1089
|
})
|
|
1090
1090
|
]
|
|
1091
|
-
}), /* @__PURE__ */ l(
|
|
1091
|
+
}), /* @__PURE__ */ l(O, {
|
|
1092
1092
|
marginTop: "$1",
|
|
1093
1093
|
children: [
|
|
1094
1094
|
/* @__PURE__ */ c(B, {
|
|
1095
1095
|
type: "button",
|
|
1096
1096
|
variant: "default",
|
|
1097
1097
|
size: "sm",
|
|
1098
|
-
onPress:
|
|
1098
|
+
onPress: F,
|
|
1099
1099
|
flex: 1,
|
|
1100
1100
|
children: p("Now")
|
|
1101
1101
|
}),
|
|
@@ -1122,35 +1122,35 @@ var W = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1122
1122
|
W.displayName = "DatePicker";
|
|
1123
1123
|
//#endregion
|
|
1124
1124
|
//#region src/components/Select.tsx
|
|
1125
|
-
var G = e.forwardRef(({ error:
|
|
1126
|
-
let
|
|
1127
|
-
|
|
1125
|
+
var G = 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) => {
|
|
1126
|
+
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) => {
|
|
1127
|
+
a?.(e), i && i({ target: {
|
|
1128
1128
|
value: e,
|
|
1129
|
-
name:
|
|
1130
|
-
} }),
|
|
1131
|
-
},
|
|
1132
|
-
ref:
|
|
1133
|
-
disabled:
|
|
1129
|
+
name: f || ""
|
|
1130
|
+
} }), A(!1);
|
|
1131
|
+
}, M = /* @__PURE__ */ l(B, {
|
|
1132
|
+
ref: w,
|
|
1133
|
+
disabled: d,
|
|
1134
1134
|
tabIndex: -1,
|
|
1135
|
-
size:
|
|
1135
|
+
size: n,
|
|
1136
1136
|
variant: "ghost",
|
|
1137
1137
|
width: "100%",
|
|
1138
1138
|
justifyContent: "space-between",
|
|
1139
|
-
borderWidth:
|
|
1140
|
-
borderColor:
|
|
1141
|
-
backgroundColor:
|
|
1142
|
-
borderRadius:
|
|
1143
|
-
paddingHorizontal:
|
|
1139
|
+
borderWidth: y ?? 1,
|
|
1140
|
+
borderColor: t ? "$error" : b ?? "$borderColor",
|
|
1141
|
+
backgroundColor: v ?? "$backgroundSecondary",
|
|
1142
|
+
borderRadius: x ?? "$round",
|
|
1143
|
+
paddingHorizontal: S,
|
|
1144
1144
|
hoverStyle: { backgroundColor: "$backgroundHover" },
|
|
1145
1145
|
pointerEvents: "none",
|
|
1146
|
-
children: [/* @__PURE__ */ c(
|
|
1147
|
-
fontSize:
|
|
1148
|
-
color:
|
|
1146
|
+
children: [/* @__PURE__ */ c(P, {
|
|
1147
|
+
fontSize: n === "sm" ? "$xs" : "$sm",
|
|
1148
|
+
color: E ? "$color" : "$colorMuted",
|
|
1149
1149
|
numberOfLines: 1,
|
|
1150
1150
|
flex: 1,
|
|
1151
1151
|
overflow: "hidden",
|
|
1152
|
-
children:
|
|
1153
|
-
}), /* @__PURE__ */ c(
|
|
1152
|
+
children: D
|
|
1153
|
+
}), /* @__PURE__ */ c(k, {
|
|
1154
1154
|
width: 0,
|
|
1155
1155
|
height: 0,
|
|
1156
1156
|
borderLeftWidth: 5,
|
|
@@ -1161,44 +1161,67 @@ var G = e.forwardRef(({ error: e, size: t = "md", value: n, onChange: r, onValue
|
|
|
1161
1161
|
borderTopColor: "$colorMuted",
|
|
1162
1162
|
opacity: .6
|
|
1163
1163
|
})]
|
|
1164
|
-
}),
|
|
1164
|
+
}), [N, F] = o(""), I = s.filter((e) => e.label.toLowerCase().includes(N.toLowerCase())), L = /* @__PURE__ */ l(k, { children: [s.length > 5 && /* @__PURE__ */ c(k, {
|
|
1165
|
+
padding: "$xs",
|
|
1166
|
+
paddingBottom: 0,
|
|
1167
|
+
children: /* @__PURE__ */ c(H, {
|
|
1168
|
+
size: "sm",
|
|
1169
|
+
placeholder: T("search", { defaultValue: "Search..." }),
|
|
1170
|
+
value: N,
|
|
1171
|
+
onChangeText: F,
|
|
1172
|
+
onKeyDown: (e) => e.stopPropagation()
|
|
1173
|
+
})
|
|
1174
|
+
}), /* @__PURE__ */ c(_, {
|
|
1165
1175
|
maxHeight: 250,
|
|
1166
|
-
children: /* @__PURE__ */ l(
|
|
1176
|
+
children: /* @__PURE__ */ l(k, {
|
|
1167
1177
|
gap: "$xs",
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1178
|
+
padding: "$xs",
|
|
1179
|
+
children: [
|
|
1180
|
+
u && /* @__PURE__ */ c(B, {
|
|
1181
|
+
variant: "ghost",
|
|
1182
|
+
size: "sm",
|
|
1183
|
+
justifyContent: "flex-start",
|
|
1184
|
+
onPress: () => j(""),
|
|
1185
|
+
children: /* @__PURE__ */ c(P, {
|
|
1186
|
+
fontSize: "$sm",
|
|
1187
|
+
color: "$colorMuted",
|
|
1188
|
+
children: u
|
|
1189
|
+
})
|
|
1190
|
+
}),
|
|
1191
|
+
I.length === 0 && /* @__PURE__ */ c(P, {
|
|
1174
1192
|
fontSize: "$sm",
|
|
1175
1193
|
color: "$colorMuted",
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
children:
|
|
1187
|
-
|
|
1188
|
-
|
|
1194
|
+
padding: "$sm",
|
|
1195
|
+
textAlign: "center",
|
|
1196
|
+
children: T("no_options_found", { defaultValue: "No options found" })
|
|
1197
|
+
}),
|
|
1198
|
+
I.map((e) => /* @__PURE__ */ c(B, {
|
|
1199
|
+
variant: "ghost",
|
|
1200
|
+
size: "sm",
|
|
1201
|
+
justifyContent: "flex-start",
|
|
1202
|
+
onPress: () => j(e.value),
|
|
1203
|
+
backgroundColor: e.value === r ? "$primary1" : "transparent",
|
|
1204
|
+
children: /* @__PURE__ */ c(P, {
|
|
1205
|
+
fontSize: "$sm",
|
|
1206
|
+
children: e.label
|
|
1207
|
+
})
|
|
1208
|
+
}, e.value))
|
|
1209
|
+
]
|
|
1189
1210
|
})
|
|
1190
|
-
});
|
|
1191
|
-
return
|
|
1211
|
+
})] });
|
|
1212
|
+
return e.useEffect(() => {
|
|
1213
|
+
O || F("");
|
|
1214
|
+
}, [O]), /* @__PURE__ */ c(k, {
|
|
1192
1215
|
position: "relative",
|
|
1193
|
-
width:
|
|
1194
|
-
minWidth:
|
|
1195
|
-
...
|
|
1216
|
+
width: C.width || "100%",
|
|
1217
|
+
minWidth: C.minWidth,
|
|
1218
|
+
...C,
|
|
1196
1219
|
children: /* @__PURE__ */ c(U, {
|
|
1197
|
-
trigger:
|
|
1198
|
-
content:
|
|
1199
|
-
placement:
|
|
1200
|
-
open:
|
|
1201
|
-
onOpenChange:
|
|
1220
|
+
trigger: M,
|
|
1221
|
+
content: L,
|
|
1222
|
+
placement: g || "bottom-start",
|
|
1223
|
+
open: O,
|
|
1224
|
+
onOpenChange: A
|
|
1202
1225
|
})
|
|
1203
1226
|
});
|
|
1204
1227
|
});
|
|
@@ -1217,7 +1240,7 @@ function K({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1217
1240
|
let e = setTimeout(i, n);
|
|
1218
1241
|
return () => clearTimeout(e);
|
|
1219
1242
|
}
|
|
1220
|
-
}, [n, i]), /* @__PURE__ */ c(
|
|
1243
|
+
}, [n, i]), /* @__PURE__ */ c(k, {
|
|
1221
1244
|
className: `toast toast-${t}`,
|
|
1222
1245
|
role: "alert",
|
|
1223
1246
|
"aria-live": "assertive",
|
|
@@ -1233,15 +1256,15 @@ function K({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1233
1256
|
width: 0,
|
|
1234
1257
|
height: 4
|
|
1235
1258
|
},
|
|
1236
|
-
children: /* @__PURE__ */ l(
|
|
1259
|
+
children: /* @__PURE__ */ l(O, {
|
|
1237
1260
|
alignItems: "center",
|
|
1238
1261
|
gap: "$sm",
|
|
1239
1262
|
children: [
|
|
1240
|
-
/* @__PURE__ */ c(
|
|
1263
|
+
/* @__PURE__ */ c(M, {
|
|
1241
1264
|
fontWeight: "600",
|
|
1242
1265
|
children: ce[t]
|
|
1243
1266
|
}),
|
|
1244
|
-
/* @__PURE__ */ c(
|
|
1267
|
+
/* @__PURE__ */ c(M, {
|
|
1245
1268
|
flex: 1,
|
|
1246
1269
|
children: e
|
|
1247
1270
|
}),
|
|
@@ -1257,7 +1280,7 @@ function K({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1257
1280
|
});
|
|
1258
1281
|
}
|
|
1259
1282
|
function le({ toasts: e, onDismiss: t }) {
|
|
1260
|
-
return /* @__PURE__ */ c(
|
|
1283
|
+
return /* @__PURE__ */ c(k, {
|
|
1261
1284
|
"aria-label": "Notifications",
|
|
1262
1285
|
position: "fixed",
|
|
1263
1286
|
bottom: "$lg",
|
|
@@ -1265,7 +1288,7 @@ function le({ toasts: e, onDismiss: t }) {
|
|
|
1265
1288
|
zIndex: 60,
|
|
1266
1289
|
gap: "$sm",
|
|
1267
1290
|
pointerEvents: "none",
|
|
1268
|
-
children: e.map((e) => /* @__PURE__ */ c(
|
|
1291
|
+
children: e.map((e) => /* @__PURE__ */ c(k, {
|
|
1269
1292
|
pointerEvents: "auto",
|
|
1270
1293
|
children: /* @__PURE__ */ c(K, {
|
|
1271
1294
|
...e,
|
|
@@ -1276,10 +1299,10 @@ function le({ toasts: e, onDismiss: t }) {
|
|
|
1276
1299
|
}
|
|
1277
1300
|
//#endregion
|
|
1278
1301
|
//#region src/components/Portal.tsx
|
|
1279
|
-
var
|
|
1302
|
+
var ue = t(null), de = ({ children: e }) => {
|
|
1280
1303
|
let [t, n] = o(/* @__PURE__ */ new Map());
|
|
1281
1304
|
/* v8 ignore stop */
|
|
1282
|
-
return /* @__PURE__ */ l(
|
|
1305
|
+
return /* @__PURE__ */ l(ue.Provider, {
|
|
1283
1306
|
value: {
|
|
1284
1307
|
register: (e, t) => {
|
|
1285
1308
|
n((n) => {
|
|
@@ -1294,10 +1317,10 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1294
1317
|
});
|
|
1295
1318
|
}
|
|
1296
1319
|
},
|
|
1297
|
-
children: [e, /* @__PURE__ */ c(
|
|
1320
|
+
children: [e, /* @__PURE__ */ c(fe, { portals: t })]
|
|
1298
1321
|
});
|
|
1299
|
-
},
|
|
1300
|
-
let t = n(
|
|
1322
|
+
}, fe = ({ portals: t }) => typeof document < "u" ? null : /* @__PURE__ */ c(s, { children: Array.from(t.entries()).map(([t, n]) => /* @__PURE__ */ c(e.Fragment, { children: n }, t)) }), q = ({ children: e }) => {
|
|
1323
|
+
let t = n(ue), [i] = o(() => Math.random().toString(36).substr(2, 9));
|
|
1301
1324
|
if (r(() => {
|
|
1302
1325
|
if (!(typeof document < "u" || !t))
|
|
1303
1326
|
/* v8 ignore next */
|
|
@@ -1310,16 +1333,16 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1310
1333
|
let t = document.getElementById("portal-root");
|
|
1311
1334
|
t || (t = document.createElement("div"), t.id = "portal-root", document.body.appendChild(t));
|
|
1312
1335
|
let n = document.documentElement.className;
|
|
1313
|
-
return t.className !== n && (t.className = n),
|
|
1336
|
+
return t.className !== n && (t.className = n), v.createPortal(e, t);
|
|
1314
1337
|
}
|
|
1315
1338
|
/* v8 ignore next */
|
|
1316
1339
|
return null;
|
|
1317
|
-
},
|
|
1340
|
+
}, pe = {
|
|
1318
1341
|
sm: 400,
|
|
1319
1342
|
md: 600,
|
|
1320
1343
|
lg: 900,
|
|
1321
1344
|
xl: 1200
|
|
1322
|
-
},
|
|
1345
|
+
}, me = ({ isOpen: e, onClose: t, title: n, footer: r, size: i = "md", children: a }) => e ? /* @__PURE__ */ c(q, { children: /* @__PURE__ */ l(A, {
|
|
1323
1346
|
position: "absolute",
|
|
1324
1347
|
top: 0,
|
|
1325
1348
|
left: 0,
|
|
@@ -1330,7 +1353,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1330
1353
|
zIndex: 99999,
|
|
1331
1354
|
alignItems: "center",
|
|
1332
1355
|
justifyContent: "center",
|
|
1333
|
-
children: [/* @__PURE__ */ c(
|
|
1356
|
+
children: [/* @__PURE__ */ c(k, {
|
|
1334
1357
|
position: "absolute",
|
|
1335
1358
|
top: 0,
|
|
1336
1359
|
left: 0,
|
|
@@ -1340,7 +1363,7 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1340
1363
|
onPress: t,
|
|
1341
1364
|
zIndex: 10
|
|
1342
1365
|
}), /* @__PURE__ */ l(V, {
|
|
1343
|
-
width:
|
|
1366
|
+
width: pe[i],
|
|
1344
1367
|
maxWidth: "95%",
|
|
1345
1368
|
maxHeight: "90vh",
|
|
1346
1369
|
backgroundColor: "$background",
|
|
@@ -1352,14 +1375,14 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1352
1375
|
borderColor: "$borderColor",
|
|
1353
1376
|
zIndex: 100,
|
|
1354
1377
|
children: [
|
|
1355
|
-
/* @__PURE__ */ l(
|
|
1378
|
+
/* @__PURE__ */ l(O, {
|
|
1356
1379
|
padding: "$4",
|
|
1357
1380
|
borderBottomWidth: 1,
|
|
1358
1381
|
borderBottomColor: "$borderColor",
|
|
1359
1382
|
justifyContent: "space-between",
|
|
1360
1383
|
alignItems: "center",
|
|
1361
1384
|
backgroundColor: "$backgroundSecondary",
|
|
1362
|
-
children: [/* @__PURE__ */ c(
|
|
1385
|
+
children: [/* @__PURE__ */ c(M, {
|
|
1363
1386
|
fontWeight: "700",
|
|
1364
1387
|
size: "lg",
|
|
1365
1388
|
children: n
|
|
@@ -1368,17 +1391,17 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1368
1391
|
variant: "ghost",
|
|
1369
1392
|
onPress: t,
|
|
1370
1393
|
padding: "$2",
|
|
1371
|
-
children: /* @__PURE__ */ c(
|
|
1394
|
+
children: /* @__PURE__ */ c(M, { children: "✕" })
|
|
1372
1395
|
})]
|
|
1373
1396
|
}),
|
|
1374
|
-
/* @__PURE__ */ c(
|
|
1397
|
+
/* @__PURE__ */ c(k, {
|
|
1375
1398
|
flex: 1,
|
|
1376
1399
|
overflow: "scroll",
|
|
1377
1400
|
minHeight: 250,
|
|
1378
1401
|
backgroundColor: "$background",
|
|
1379
1402
|
children: a
|
|
1380
1403
|
}),
|
|
1381
|
-
r && /* @__PURE__ */ c(
|
|
1404
|
+
r && /* @__PURE__ */ c(O, {
|
|
1382
1405
|
padding: "$4",
|
|
1383
1406
|
borderTopWidth: 1,
|
|
1384
1407
|
borderTopColor: "$borderColor",
|
|
@@ -1392,8 +1415,8 @@ var q = t(null), ue = ({ children: e }) => {
|
|
|
1392
1415
|
}) }) : null;
|
|
1393
1416
|
//#endregion
|
|
1394
1417
|
//#region src/components/Drawer.tsx
|
|
1395
|
-
function
|
|
1396
|
-
return e ? /* @__PURE__ */ c(
|
|
1418
|
+
function he({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, footer: a }) {
|
|
1419
|
+
return e ? /* @__PURE__ */ c(q, { children: /* @__PURE__ */ l(A, {
|
|
1397
1420
|
position: "absolute",
|
|
1398
1421
|
top: 0,
|
|
1399
1422
|
left: 0,
|
|
@@ -1402,7 +1425,7 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1402
1425
|
width: "100%",
|
|
1403
1426
|
height: "100%",
|
|
1404
1427
|
zIndex: 1e5,
|
|
1405
|
-
children: [/* @__PURE__ */ c(
|
|
1428
|
+
children: [/* @__PURE__ */ c(k, {
|
|
1406
1429
|
position: "absolute",
|
|
1407
1430
|
top: 0,
|
|
1408
1431
|
left: 0,
|
|
@@ -1434,14 +1457,14 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1434
1457
|
elevated: !1,
|
|
1435
1458
|
zIndex: 100,
|
|
1436
1459
|
children: [
|
|
1437
|
-
/* @__PURE__ */ l(
|
|
1460
|
+
/* @__PURE__ */ l(O, {
|
|
1438
1461
|
padding: "$md",
|
|
1439
1462
|
borderBottomWidth: 1,
|
|
1440
1463
|
borderColor: "$borderColor",
|
|
1441
1464
|
justifyContent: "space-between",
|
|
1442
1465
|
alignItems: "center",
|
|
1443
1466
|
backgroundColor: "$backgroundSecondary",
|
|
1444
|
-
children: [/* @__PURE__ */ c(
|
|
1467
|
+
children: [/* @__PURE__ */ c(M, {
|
|
1445
1468
|
fontWeight: "700",
|
|
1446
1469
|
size: "$md",
|
|
1447
1470
|
children: n
|
|
@@ -1452,13 +1475,13 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1452
1475
|
children: "✕"
|
|
1453
1476
|
})]
|
|
1454
1477
|
}),
|
|
1455
|
-
/* @__PURE__ */ c(
|
|
1478
|
+
/* @__PURE__ */ c(k, {
|
|
1456
1479
|
flex: 1,
|
|
1457
1480
|
padding: "$md",
|
|
1458
1481
|
style: { overflowY: "auto" },
|
|
1459
1482
|
children: i
|
|
1460
1483
|
}),
|
|
1461
|
-
a && /* @__PURE__ */ c(
|
|
1484
|
+
a && /* @__PURE__ */ c(O, {
|
|
1462
1485
|
padding: "$md",
|
|
1463
1486
|
borderTopWidth: 1,
|
|
1464
1487
|
borderColor: "$borderColor",
|
|
@@ -1473,15 +1496,15 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1473
1496
|
}
|
|
1474
1497
|
//#endregion
|
|
1475
1498
|
//#region src/components/Avatar.tsx
|
|
1476
|
-
var
|
|
1499
|
+
var ge = {
|
|
1477
1500
|
$sm: 24,
|
|
1478
1501
|
$md: 32,
|
|
1479
1502
|
$lg: 40,
|
|
1480
1503
|
$xl: 48
|
|
1481
1504
|
};
|
|
1482
|
-
function
|
|
1483
|
-
let [s, l] = o(!1), u = typeof n == "number" ? n :
|
|
1484
|
-
return /* @__PURE__ */ c(
|
|
1505
|
+
function _e({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidth: i, borderColor: a }) {
|
|
1506
|
+
let [s, l] = o(!1), u = typeof n == "number" ? n : ge[n] || 32;
|
|
1507
|
+
return /* @__PURE__ */ c(k, {
|
|
1485
1508
|
width: u,
|
|
1486
1509
|
height: u,
|
|
1487
1510
|
borderRadius: r ? u / 2 : "$sm",
|
|
@@ -1491,7 +1514,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1491
1514
|
overflow: "hidden",
|
|
1492
1515
|
borderWidth: i,
|
|
1493
1516
|
borderColor: a,
|
|
1494
|
-
children: e && !s ? /* @__PURE__ */ c(
|
|
1517
|
+
children: e && !s ? /* @__PURE__ */ c(y, {
|
|
1495
1518
|
source: {
|
|
1496
1519
|
uri: e,
|
|
1497
1520
|
width: u,
|
|
@@ -1500,7 +1523,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1500
1523
|
width: "100%",
|
|
1501
1524
|
height: "100%",
|
|
1502
1525
|
onError: () => l(!0)
|
|
1503
|
-
}) : typeof t == "string" ? /* @__PURE__ */ c(
|
|
1526
|
+
}) : typeof t == "string" ? /* @__PURE__ */ c(M, {
|
|
1504
1527
|
color: "$colorMuted",
|
|
1505
1528
|
size: "$sm",
|
|
1506
1529
|
fontWeight: "600",
|
|
@@ -1510,8 +1533,8 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1510
1533
|
}
|
|
1511
1534
|
//#endregion
|
|
1512
1535
|
//#region src/components/Separator.tsx
|
|
1513
|
-
function
|
|
1514
|
-
return /* @__PURE__ */ c(
|
|
1536
|
+
function ve({ vertical: e }) {
|
|
1537
|
+
return /* @__PURE__ */ c(k, {
|
|
1515
1538
|
width: e ? 1 : "100%",
|
|
1516
1539
|
height: e ? "100%" : 1,
|
|
1517
1540
|
backgroundColor: "$borderColor"
|
|
@@ -1519,12 +1542,12 @@ function _e({ vertical: e }) {
|
|
|
1519
1542
|
}
|
|
1520
1543
|
//#endregion
|
|
1521
1544
|
//#region src/components/Icon.tsx
|
|
1522
|
-
function
|
|
1545
|
+
function ye(e) {
|
|
1523
1546
|
return e.replace(/[-_](.)/g, (e, t) => t.toUpperCase()).replace(/^(.)/, (e) => e.toUpperCase());
|
|
1524
1547
|
}
|
|
1525
|
-
function
|
|
1526
|
-
let a =
|
|
1527
|
-
return /* @__PURE__ */ c(a in
|
|
1548
|
+
function J({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
|
|
1549
|
+
let a = ye(e);
|
|
1550
|
+
return /* @__PURE__ */ c(a in b ? b[a] : b.Box, {
|
|
1528
1551
|
size: t,
|
|
1529
1552
|
color: n,
|
|
1530
1553
|
strokeWidth: r,
|
|
@@ -1533,20 +1556,20 @@ function Y({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
|
|
|
1533
1556
|
}
|
|
1534
1557
|
//#endregion
|
|
1535
1558
|
//#region src/theme/ThemeToggle.tsx
|
|
1536
|
-
function
|
|
1537
|
-
let { theme: e, toggleTheme: t } =
|
|
1559
|
+
function be() {
|
|
1560
|
+
let { theme: e, toggleTheme: t } = E();
|
|
1538
1561
|
return /* @__PURE__ */ c(B, {
|
|
1539
1562
|
variant: "ghost",
|
|
1540
1563
|
onPress: t,
|
|
1541
1564
|
"aria-label": `Switch to ${e === "light" ? "dark" : "light"} mode`,
|
|
1542
1565
|
title: `Current theme: ${e}`,
|
|
1543
|
-
children: /* @__PURE__ */ c(
|
|
1566
|
+
children: /* @__PURE__ */ c(J, {
|
|
1544
1567
|
name: e === "light" ? "moon" : "sun",
|
|
1545
1568
|
size: 20
|
|
1546
1569
|
})
|
|
1547
1570
|
});
|
|
1548
1571
|
}
|
|
1549
|
-
var
|
|
1572
|
+
var Y = {
|
|
1550
1573
|
brand: {
|
|
1551
1574
|
violet: {
|
|
1552
1575
|
50: "#F5F3FF",
|
|
@@ -1629,7 +1652,7 @@ var X = {
|
|
|
1629
1652
|
borderColorMuted: "rgba(30, 51, 88, 0.4)"
|
|
1630
1653
|
}
|
|
1631
1654
|
}
|
|
1632
|
-
},
|
|
1655
|
+
}, X = {
|
|
1633
1656
|
fontFamily: {
|
|
1634
1657
|
sans: "'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
1635
1658
|
mono: "'JetBrains Mono', 'Fira Code', monospace"
|
|
@@ -1655,7 +1678,7 @@ var X = {
|
|
|
1655
1678
|
normal: 1.5,
|
|
1656
1679
|
relaxed: 1.6
|
|
1657
1680
|
}
|
|
1658
|
-
},
|
|
1681
|
+
}, Z = {
|
|
1659
1682
|
spacing: {
|
|
1660
1683
|
xs: "0.25rem",
|
|
1661
1684
|
sm: "0.5rem",
|
|
@@ -1679,24 +1702,24 @@ var X = {
|
|
|
1679
1702
|
};
|
|
1680
1703
|
//#endregion
|
|
1681
1704
|
//#region src/tokens/config.ts
|
|
1682
|
-
function
|
|
1705
|
+
function xe() {
|
|
1683
1706
|
return {
|
|
1684
|
-
primary:
|
|
1685
|
-
secondary:
|
|
1707
|
+
primary: Y.semantic.light.primary,
|
|
1708
|
+
secondary: Y.semantic.light.secondary,
|
|
1686
1709
|
white: "#ffffff",
|
|
1687
1710
|
black: "#000000",
|
|
1688
1711
|
transparent: "transparent"
|
|
1689
1712
|
};
|
|
1690
1713
|
}
|
|
1691
|
-
function
|
|
1714
|
+
function Se() {
|
|
1692
1715
|
let e = {};
|
|
1693
|
-
return Object.entries(
|
|
1716
|
+
return Object.entries(X.fontSize).forEach(([t, n]) => {
|
|
1694
1717
|
let r = parseFloat(n.toString());
|
|
1695
1718
|
e[t] = isNaN(r) ? 16 : r * 16;
|
|
1696
1719
|
}), e;
|
|
1697
1720
|
}
|
|
1698
|
-
function
|
|
1699
|
-
let t =
|
|
1721
|
+
function Ce(e) {
|
|
1722
|
+
let t = Y.semantic[e];
|
|
1700
1723
|
return {
|
|
1701
1724
|
background: t.bg,
|
|
1702
1725
|
backgroundSecondary: t.bgSecondary,
|
|
@@ -1719,27 +1742,27 @@ function Se(e) {
|
|
|
1719
1742
|
}, {})
|
|
1720
1743
|
};
|
|
1721
1744
|
}
|
|
1722
|
-
function
|
|
1745
|
+
function we() {
|
|
1723
1746
|
let e = {};
|
|
1724
|
-
return Object.entries(
|
|
1747
|
+
return Object.entries(Z.spacing).forEach(([t, n]) => {
|
|
1725
1748
|
let r = parseFloat(n.toString());
|
|
1726
1749
|
e[t] = isNaN(r) ? 0 : r * 16;
|
|
1727
1750
|
}), e;
|
|
1728
1751
|
}
|
|
1729
|
-
function
|
|
1752
|
+
function Te() {
|
|
1730
1753
|
let e = {};
|
|
1731
|
-
return Object.entries(
|
|
1754
|
+
return Object.entries(Z.borderRadius).forEach(([t, n]) => {
|
|
1732
1755
|
let r = parseFloat(n.toString());
|
|
1733
1756
|
e[t] = isNaN(r) ? 0 : r;
|
|
1734
1757
|
}), e.full = 9999, e.pill = 9999, e.round = 8, e;
|
|
1735
1758
|
}
|
|
1736
|
-
function
|
|
1759
|
+
function Ee() {
|
|
1737
1760
|
return {
|
|
1738
1761
|
tokens: {
|
|
1739
|
-
color:
|
|
1740
|
-
space:
|
|
1741
|
-
size:
|
|
1742
|
-
radius:
|
|
1762
|
+
color: xe(),
|
|
1763
|
+
space: we(),
|
|
1764
|
+
size: Se(),
|
|
1765
|
+
radius: Te(),
|
|
1743
1766
|
zIndex: {
|
|
1744
1767
|
base: 0,
|
|
1745
1768
|
dropdown: 100,
|
|
@@ -1748,22 +1771,22 @@ function Te() {
|
|
|
1748
1771
|
}
|
|
1749
1772
|
},
|
|
1750
1773
|
themes: {
|
|
1751
|
-
light:
|
|
1752
|
-
dark:
|
|
1774
|
+
light: Ce("light"),
|
|
1775
|
+
dark: Ce("dark")
|
|
1753
1776
|
}
|
|
1754
1777
|
};
|
|
1755
1778
|
}
|
|
1756
1779
|
//#endregion
|
|
1757
1780
|
//#region src/theme/mThemeConfig.ts
|
|
1758
|
-
var
|
|
1759
|
-
color:
|
|
1760
|
-
space:
|
|
1761
|
-
size:
|
|
1762
|
-
radius:
|
|
1763
|
-
zIndex:
|
|
1764
|
-
}),
|
|
1765
|
-
family:
|
|
1766
|
-
size:
|
|
1781
|
+
var Q = Ee(), De = h({
|
|
1782
|
+
color: Q.tokens.color,
|
|
1783
|
+
space: Q.tokens.space,
|
|
1784
|
+
size: Q.tokens.size,
|
|
1785
|
+
radius: Q.tokens.radius,
|
|
1786
|
+
zIndex: Q.tokens.zIndex
|
|
1787
|
+
}), Oe = p({
|
|
1788
|
+
family: X.fontFamily.sans,
|
|
1789
|
+
size: Q.tokens.size,
|
|
1767
1790
|
lineHeight: {
|
|
1768
1791
|
tight: 1.3,
|
|
1769
1792
|
normal: 1.5
|
|
@@ -1778,9 +1801,9 @@ var $ = Te(), Ee = h({
|
|
|
1778
1801
|
base: 0,
|
|
1779
1802
|
lg: -.2
|
|
1780
1803
|
}
|
|
1781
|
-
}),
|
|
1782
|
-
family:
|
|
1783
|
-
size:
|
|
1804
|
+
}), ke = p({
|
|
1805
|
+
family: X.fontFamily.sans,
|
|
1806
|
+
size: Q.tokens.size,
|
|
1784
1807
|
lineHeight: {
|
|
1785
1808
|
tight: 1.3,
|
|
1786
1809
|
normal: 1.5
|
|
@@ -1791,12 +1814,12 @@ var $ = Te(), Ee = h({
|
|
|
1791
1814
|
semibold: "600",
|
|
1792
1815
|
bold: "700"
|
|
1793
1816
|
}
|
|
1794
|
-
}),
|
|
1795
|
-
tokens:
|
|
1796
|
-
themes:
|
|
1817
|
+
}), $ = m({
|
|
1818
|
+
tokens: De,
|
|
1819
|
+
themes: Q.themes,
|
|
1797
1820
|
fonts: {
|
|
1798
|
-
heading:
|
|
1799
|
-
body:
|
|
1821
|
+
heading: Oe,
|
|
1822
|
+
body: ke
|
|
1800
1823
|
},
|
|
1801
1824
|
defaultTheme: "light",
|
|
1802
1825
|
media: {
|
|
@@ -1818,14 +1841,14 @@ var $ = Te(), Ee = h({
|
|
|
1818
1841
|
//#endregion
|
|
1819
1842
|
//#region src/theme/MProvider.tsx
|
|
1820
1843
|
function Ae({ children: e }) {
|
|
1821
|
-
let { theme: t } =
|
|
1844
|
+
let { theme: t } = E();
|
|
1822
1845
|
return /* @__PURE__ */ c(u, {
|
|
1823
|
-
config:
|
|
1846
|
+
config: $,
|
|
1824
1847
|
defaultTheme: t,
|
|
1825
|
-
children: /* @__PURE__ */ c(
|
|
1848
|
+
children: /* @__PURE__ */ c(de, { children: e })
|
|
1826
1849
|
});
|
|
1827
1850
|
}
|
|
1828
1851
|
//#endregion
|
|
1829
|
-
export {
|
|
1852
|
+
export { _e as Avatar, B as Button, V as Card, W as DatePicker, he as Drawer, I as Heading, J as Icon, H as Input, re as LocaleSwitcher, Ae as MProvider, D as MStack, M as MText, me as Modal, P as Paragraph, U as Popover, q as Portal, fe as PortalHost, de as PortalProvider, G as Select, ve as Separator, ie as Skeleton, R as StateBadge, T as ThemeProvider, be as ThemeToggle, K as Toast, le as ToastContainer, O as XStack, k as YStack, A as ZStack, Y as colors, Ee as generateMDesignConfig, $ as mThemeConfig, Z as spacing, X as typography, E as useTheme };
|
|
1830
1853
|
|
|
1831
1854
|
//# sourceMappingURL=index.js.map
|