@framework-m/ui 0.10.4 → 0.11.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/Button.d.ts.map +1 -1
- package/dist/components/Card.d.ts +7 -10
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Popover.d.ts.map +1 -1
- package/dist/components/Primitives.d.ts +8 -26
- package/dist/components/Primitives.d.ts.map +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +546 -348
- package/dist/index.js.map +1 -1
- package/dist/theme/MProvider.d.ts +4 -1
- package/dist/theme/MProvider.d.ts.map +1 -1
- package/dist/theme/ThemeContext.d.ts +1 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -1
- package/dist/theme/index.d.ts +3 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/mThemeConfig.d.ts +116 -2
- package/dist/theme/mThemeConfig.d.ts.map +1 -1
- package/dist/theme/presets/frappePreset.d.ts +12 -0
- package/dist/theme/presets/frappePreset.d.ts.map +1 -0
- package/dist/theme/types.d.ts +21 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/tokens/config.d.ts +1 -0
- package/dist/tokens/config.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +19 -19
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 _ } from "react-i18next";
|
|
5
|
+
import { ScrollView as v } from "@tamagui/scroll-view";
|
|
6
|
+
import y from "react-dom";
|
|
7
|
+
import { Image as b } from "@tamagui/image";
|
|
8
|
+
import * as x from "@tamagui/lucide-icons-2";
|
|
9
9
|
//#region src/theme/ThemeContext.tsx
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let e = localStorage.getItem(
|
|
10
|
+
var S = t(null), C = "framework-m-theme";
|
|
11
|
+
function w() {
|
|
12
|
+
let e = localStorage.getItem(C);
|
|
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 T(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 E({ children: e, defaultTheme: t }) {
|
|
20
|
+
let [n, i] = o(t || w);
|
|
21
21
|
r(() => {
|
|
22
|
-
|
|
22
|
+
T(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(C) || 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(C, e), T(e);
|
|
33
33
|
}, s = {
|
|
34
34
|
theme: n,
|
|
35
35
|
setTheme: a,
|
|
@@ -37,19 +37,19 @@ function T({ children: e, defaultTheme: t }) {
|
|
|
37
37
|
a(n === "light" ? "dark" : "light");
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */ c(
|
|
40
|
+
return /* @__PURE__ */ c(S.Provider, {
|
|
41
41
|
value: s,
|
|
42
42
|
children: e
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
let e = n(
|
|
45
|
+
function D() {
|
|
46
|
+
let e = n(S);
|
|
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 O = g(f, {
|
|
53
53
|
name: "MStack",
|
|
54
54
|
display: "flex",
|
|
55
55
|
flexDirection: "column",
|
|
@@ -63,7 +63,7 @@ var D = g(f, {
|
|
|
63
63
|
height: "100%",
|
|
64
64
|
zIndex: 0
|
|
65
65
|
} } }
|
|
66
|
-
}),
|
|
66
|
+
}), k = g(f, {
|
|
67
67
|
name: "XStack",
|
|
68
68
|
display: "flex",
|
|
69
69
|
flexDirection: "row",
|
|
@@ -77,7 +77,7 @@ var D = g(f, {
|
|
|
77
77
|
height: "100%",
|
|
78
78
|
zIndex: 0
|
|
79
79
|
} } }
|
|
80
|
-
}),
|
|
80
|
+
}), A = g(f, {
|
|
81
81
|
name: "YStack",
|
|
82
82
|
display: "flex",
|
|
83
83
|
flexDirection: "column",
|
|
@@ -91,7 +91,7 @@ var D = g(f, {
|
|
|
91
91
|
height: "100%",
|
|
92
92
|
zIndex: 0
|
|
93
93
|
} } }
|
|
94
|
-
}),
|
|
94
|
+
}), j = g(f, {
|
|
95
95
|
name: "ZStack",
|
|
96
96
|
display: "flex",
|
|
97
97
|
position: "relative",
|
|
@@ -105,7 +105,7 @@ var D = g(f, {
|
|
|
105
105
|
height: "100%",
|
|
106
106
|
zIndex: 0
|
|
107
107
|
} } }
|
|
108
|
-
}),
|
|
108
|
+
}), M = g(d, {
|
|
109
109
|
name: "MText",
|
|
110
110
|
fontFamily: "$body",
|
|
111
111
|
display: "inline-flex",
|
|
@@ -118,11 +118,11 @@ var D = g(f, {
|
|
|
118
118
|
$xl: { fontSize: "$xl" },
|
|
119
119
|
$xxl: { fontSize: "$xxl" }
|
|
120
120
|
} }
|
|
121
|
-
}),
|
|
121
|
+
}), N = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(M, {
|
|
122
122
|
ref: r,
|
|
123
123
|
...n,
|
|
124
124
|
style: [t, { textAlign: e === "start" ? "left" : e === "end" ? "right" : e }]
|
|
125
|
-
})),
|
|
125
|
+
})), P = g(d, {
|
|
126
126
|
name: "Paragraph",
|
|
127
127
|
fontFamily: "$body",
|
|
128
128
|
display: "inline-flex",
|
|
@@ -135,11 +135,11 @@ var D = g(f, {
|
|
|
135
135
|
$xl: { fontSize: "$xl" },
|
|
136
136
|
$xxl: { fontSize: "$xxl" }
|
|
137
137
|
} }
|
|
138
|
-
}),
|
|
138
|
+
}), F = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(P, {
|
|
139
139
|
ref: r,
|
|
140
140
|
...n,
|
|
141
141
|
style: [t, { textAlign: e === "start" ? "left" : e === "end" ? "right" : e }]
|
|
142
|
-
})),
|
|
142
|
+
})), I = g(d, {
|
|
143
143
|
name: "Heading",
|
|
144
144
|
fontFamily: "$body",
|
|
145
145
|
fontWeight: "800",
|
|
@@ -153,56 +153,56 @@ var D = g(f, {
|
|
|
153
153
|
$xl: { fontSize: "$xl" },
|
|
154
154
|
$xxl: { fontSize: "$xxl" }
|
|
155
155
|
} }
|
|
156
|
-
}),
|
|
156
|
+
}), L = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(I, {
|
|
157
157
|
ref: r,
|
|
158
158
|
...n,
|
|
159
159
|
style: [t, { textAlign: e === "start" ? "left" : e === "end" ? "right" : e }]
|
|
160
|
-
})),
|
|
160
|
+
})), R = {
|
|
161
161
|
draft: {
|
|
162
|
-
bg: "
|
|
163
|
-
text: "
|
|
162
|
+
bg: "$backgroundActive",
|
|
163
|
+
text: "$colorMuted"
|
|
164
164
|
},
|
|
165
165
|
pending: {
|
|
166
|
-
bg: "
|
|
167
|
-
text: "
|
|
166
|
+
bg: "$warningBackground",
|
|
167
|
+
text: "$warning"
|
|
168
168
|
},
|
|
169
169
|
submitted: {
|
|
170
|
-
bg: "
|
|
171
|
-
text: "
|
|
170
|
+
bg: "$infoBackground",
|
|
171
|
+
text: "$info"
|
|
172
172
|
},
|
|
173
173
|
approved: {
|
|
174
|
-
bg: "
|
|
175
|
-
text: "
|
|
174
|
+
bg: "$successBackground",
|
|
175
|
+
text: "$success"
|
|
176
176
|
},
|
|
177
177
|
rejected: {
|
|
178
|
-
bg: "
|
|
179
|
-
text: "
|
|
178
|
+
bg: "$errorBackground",
|
|
179
|
+
text: "$error"
|
|
180
180
|
},
|
|
181
181
|
cancelled: {
|
|
182
|
-
bg: "
|
|
183
|
-
text: "
|
|
182
|
+
bg: "$backgroundActive",
|
|
183
|
+
text: "$colorMuted"
|
|
184
184
|
},
|
|
185
185
|
completed: {
|
|
186
|
-
bg: "
|
|
187
|
-
text: "
|
|
186
|
+
bg: "$successBackground",
|
|
187
|
+
text: "$success"
|
|
188
188
|
},
|
|
189
189
|
on_hold: {
|
|
190
|
-
bg: "
|
|
191
|
-
text: "
|
|
190
|
+
bg: "$warningBackground",
|
|
191
|
+
text: "$warning"
|
|
192
192
|
},
|
|
193
193
|
default: {
|
|
194
|
-
bg: "
|
|
195
|
-
text: "
|
|
194
|
+
bg: "$backgroundActive",
|
|
195
|
+
text: "$colorMuted"
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
function
|
|
199
|
-
return
|
|
198
|
+
function ee(e) {
|
|
199
|
+
return R[e.toLowerCase().replace(/\s+/g, "_")] ?? R.default;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function te({ 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 = ee(i);
|
|
205
|
+
return /* @__PURE__ */ c(N, {
|
|
206
206
|
className: n,
|
|
207
207
|
style: {
|
|
208
208
|
display: "inline-flex",
|
|
@@ -250,20 +250,20 @@ var ne = [
|
|
|
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(k, {
|
|
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(N, {
|
|
260
260
|
size: "$sm",
|
|
261
261
|
style: { lineHeight: 1 },
|
|
262
|
-
children: /* @__PURE__ */ c(
|
|
262
|
+
children: /* @__PURE__ */ c(K, {
|
|
263
263
|
name: "globe",
|
|
264
264
|
size: 15
|
|
265
265
|
})
|
|
266
|
-
}), /* @__PURE__ */ c(
|
|
266
|
+
}), /* @__PURE__ */ c(W, {
|
|
267
267
|
value: e,
|
|
268
268
|
onValueChange: t,
|
|
269
269
|
options: n.map((e) => ({
|
|
@@ -278,7 +278,7 @@ function z({ language: e, onChangeLanguage: t, locales: n = ne, 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",
|
|
@@ -311,23 +311,23 @@ var B = g(f, {
|
|
|
311
311
|
}
|
|
312
312
|
} },
|
|
313
313
|
defaultVariants: { variant: "text" }
|
|
314
|
-
}),
|
|
314
|
+
}), ie = ({ 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(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",
|
|
328
328
|
...n
|
|
329
329
|
});
|
|
330
|
-
},
|
|
330
|
+
}, ae = g(f, {
|
|
331
331
|
name: "Button",
|
|
332
332
|
flexDirection: "row",
|
|
333
333
|
alignItems: "center",
|
|
@@ -414,14 +414,14 @@ var B = g(f, {
|
|
|
414
414
|
variant: "default",
|
|
415
415
|
size: "md"
|
|
416
416
|
}
|
|
417
|
-
}),
|
|
418
|
-
let u =
|
|
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" ? "$primaryColor" : n === "danger" ? "$white" : "$color"), f = (e, t) => /* @__PURE__ */ c(N, {
|
|
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) => oe(e) ? f(e, t) : e);
|
|
425
425
|
return /* @__PURE__ */ c(u, {
|
|
426
426
|
ref: l,
|
|
427
427
|
tag: o,
|
|
@@ -430,13 +430,27 @@ var B = g(f, {
|
|
|
430
430
|
size: r,
|
|
431
431
|
disabled: a || i,
|
|
432
432
|
tabIndex: a || i ? -1 : 0,
|
|
433
|
+
...(s.onPress || a || i) && { onPress: (e) => {
|
|
434
|
+
if (a || i) {
|
|
435
|
+
e?.stopPropagation && e.stopPropagation();
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
s.onPress && s.onPress(e);
|
|
439
|
+
} },
|
|
440
|
+
...(s.onClick || a || i) && { onClick: (e) => {
|
|
441
|
+
if (a || i) {
|
|
442
|
+
e?.stopPropagation && e.stopPropagation();
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
s.onClick && s.onClick(e);
|
|
446
|
+
} },
|
|
433
447
|
onKeyDown: (e) => {
|
|
434
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.onPress ? s.onPress(e) : s.onClick && s.onClick(e)), s.onKeyDown && s.onKeyDown(e);
|
|
448
|
+
a || i || ((e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.onPress ? s.onPress(e) : s.onClick && s.onClick(e)), s.onKeyDown && s.onKeyDown(e));
|
|
435
449
|
},
|
|
436
450
|
...s,
|
|
437
451
|
children: p
|
|
438
452
|
});
|
|
439
|
-
}),
|
|
453
|
+
}), V = g(f, {
|
|
440
454
|
name: "Card",
|
|
441
455
|
flexDirection: "column",
|
|
442
456
|
backgroundColor: "$background",
|
|
@@ -471,7 +485,7 @@ var B = g(f, {
|
|
|
471
485
|
elevated: !0,
|
|
472
486
|
padded: "md"
|
|
473
487
|
}
|
|
474
|
-
}),
|
|
488
|
+
}), se = g("input", {
|
|
475
489
|
name: "Input",
|
|
476
490
|
backgroundColor: "$backgroundSecondary",
|
|
477
491
|
borderRadius: "$round",
|
|
@@ -520,9 +534,9 @@ var B = g(f, {
|
|
|
520
534
|
} }
|
|
521
535
|
},
|
|
522
536
|
defaultVariants: { size: "md" }
|
|
523
|
-
}),
|
|
537
|
+
}), H = e.forwardRef(({ onChange: e, onChangeText: t, value: n, textAlign: r, style: i, ...a }, o) => {
|
|
524
538
|
let s = n !== void 0;
|
|
525
|
-
return /* @__PURE__ */ c(
|
|
539
|
+
return /* @__PURE__ */ c(se, {
|
|
526
540
|
ref: o,
|
|
527
541
|
tabIndex: a.disabled ? -1 : 0,
|
|
528
542
|
...s ? { value: n } : {},
|
|
@@ -536,10 +550,10 @@ var B = g(f, {
|
|
|
536
550
|
...a
|
|
537
551
|
});
|
|
538
552
|
});
|
|
539
|
-
|
|
553
|
+
H.displayName = "Input";
|
|
540
554
|
//#endregion
|
|
541
555
|
//#region src/components/Popover.tsx
|
|
542
|
-
function
|
|
556
|
+
function U({ trigger: e, content: t, placement: n = "bottom-start", open: i, onOpenChange: s }) {
|
|
543
557
|
let [u, d] = o(!1), f = i === void 0 ? u : i, [p, m] = o(n), h = (e) => {
|
|
544
558
|
d(e), s?.(e);
|
|
545
559
|
}, g = a(null);
|
|
@@ -557,12 +571,13 @@ function W({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
557
571
|
g.current && !g.current.contains(e.target) && h(!1);
|
|
558
572
|
};
|
|
559
573
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
560
|
-
}, [g]), /* @__PURE__ */ l(
|
|
574
|
+
}, [g]), /* @__PURE__ */ l(A, {
|
|
561
575
|
position: "relative",
|
|
562
576
|
ref: g,
|
|
563
577
|
zIndex: f ? 1e4 : 1,
|
|
564
|
-
children: [/* @__PURE__ */ c(
|
|
578
|
+
children: [/* @__PURE__ */ c(k, {
|
|
565
579
|
onPress: () => h(!f),
|
|
580
|
+
onClick: () => h(!f),
|
|
566
581
|
style: { cursor: "pointer" },
|
|
567
582
|
tabIndex: 0,
|
|
568
583
|
role: "button",
|
|
@@ -572,7 +587,7 @@ function W({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
572
587
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), h(!f));
|
|
573
588
|
},
|
|
574
589
|
children: e
|
|
575
|
-
}), f && /* @__PURE__ */ c(
|
|
590
|
+
}), f && /* @__PURE__ */ c(j, {
|
|
576
591
|
position: "absolute",
|
|
577
592
|
zIndex: 1e3,
|
|
578
593
|
...(() => {
|
|
@@ -626,7 +641,7 @@ function W({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
626
641
|
},
|
|
627
642
|
shadowOpacity: .1,
|
|
628
643
|
shadowRadius: 10,
|
|
629
|
-
children: /* @__PURE__ */ c(
|
|
644
|
+
children: /* @__PURE__ */ c(V, {
|
|
630
645
|
elevated: !0,
|
|
631
646
|
padding: "$sm",
|
|
632
647
|
minWidth: 200,
|
|
@@ -639,45 +654,45 @@ function W({ trigger: e, content: t, placement: n = "bottom-start", open: i, onO
|
|
|
639
654
|
}
|
|
640
655
|
//#endregion
|
|
641
656
|
//#region src/components/DatePicker.tsx
|
|
642
|
-
var
|
|
643
|
-
let { t: m } =
|
|
657
|
+
var ce = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date", placeholder: s, popoverPlacement: u = "bottom-start", ...d }, p) => {
|
|
658
|
+
let { t: m } = _("ui"), [h, g] = o(!1), [v, y] = o(!1), [b, x] = o(!1), S = a === "datetime-local" || d.field?.format === "date-time" ? "datetime-local" : "date", C = (e) => {
|
|
644
659
|
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());
|
|
645
|
-
return
|
|
646
|
-
},
|
|
660
|
+
return S === "date" ? `${n}-${r}-${i}` : `${n}-${r}-${i}T${a}:${o}:${s}`;
|
|
661
|
+
}, w = i(() => {
|
|
647
662
|
if (!e) return /* @__PURE__ */ new Date();
|
|
648
663
|
let t = new Date(e);
|
|
649
664
|
return isNaN(t.getTime()) ? /* @__PURE__ */ new Date() : t;
|
|
650
|
-
}, [e]),
|
|
665
|
+
}, [e]), T = i(() => {
|
|
651
666
|
if (!e) return "";
|
|
652
667
|
let t = new Date(e);
|
|
653
|
-
return isNaN(t.getTime()) ? String(e) :
|
|
654
|
-
}, [e,
|
|
668
|
+
return isNaN(t.getTime()) ? String(e) : S === "date" ? t.toLocaleDateString() : t.toLocaleString();
|
|
669
|
+
}, [e, S]), [E, D] = o(new Date(w)), j = () => {
|
|
655
670
|
g(!0);
|
|
656
671
|
};
|
|
657
672
|
r(() => {
|
|
658
|
-
|
|
659
|
-
}, [
|
|
660
|
-
let
|
|
661
|
-
let r =
|
|
673
|
+
D(new Date(w));
|
|
674
|
+
}, [w]);
|
|
675
|
+
let M = (e) => {
|
|
676
|
+
let r = C(e);
|
|
662
677
|
t?.(r), n?.(r);
|
|
663
|
-
},
|
|
664
|
-
let t = new Date(
|
|
665
|
-
t.setDate(e), t.setHours(
|
|
666
|
-
},
|
|
667
|
-
let r = new Date(
|
|
668
|
-
r.setHours(r.getHours() + e), r.setMinutes(r.getMinutes() + t), r.setSeconds(r.getSeconds() + n),
|
|
669
|
-
}, F = () => {
|
|
670
|
-
let e = new Date(C), t = e.getHours();
|
|
671
|
-
e.setHours(t >= 12 ? t - 12 : t + 12), j(e);
|
|
678
|
+
}, P = (e) => {
|
|
679
|
+
let t = new Date(E);
|
|
680
|
+
t.setDate(e), t.setHours(w.getHours()), t.setMinutes(w.getMinutes()), t.setSeconds(w.getSeconds()), M(t), S === "date" && g(!1);
|
|
681
|
+
}, F = (e, t, n = 0) => {
|
|
682
|
+
let r = new Date(w);
|
|
683
|
+
r.setHours(r.getHours() + e), r.setMinutes(r.getMinutes() + t), r.setSeconds(r.getSeconds() + n), M(r);
|
|
672
684
|
}, I = () => {
|
|
685
|
+
let e = new Date(w), t = e.getHours();
|
|
686
|
+
e.setHours(t >= 12 ? t - 12 : t + 12), M(e);
|
|
687
|
+
}, L = () => {
|
|
673
688
|
let e = /* @__PURE__ */ new Date();
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
let e =
|
|
689
|
+
M(e), D(new Date(e));
|
|
690
|
+
}, R = (e, t) => new Date(t, e + 1, 0).getDate(), ee = (e, t) => new Date(t, e, 1).getDay(), te = i(() => {
|
|
691
|
+
let e = R(E.getMonth(), E.getFullYear()), t = ee(E.getMonth(), E.getFullYear()), n = [];
|
|
677
692
|
for (let e = 0; e < t; e++) n.push(null);
|
|
678
693
|
for (let t = 1; t <= e; t++) n.push(t);
|
|
679
694
|
return n;
|
|
680
|
-
}, [
|
|
695
|
+
}, [E]), ne = [
|
|
681
696
|
m("January"),
|
|
682
697
|
m("February"),
|
|
683
698
|
m("March"),
|
|
@@ -690,29 +705,29 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
690
705
|
m("October"),
|
|
691
706
|
m("November"),
|
|
692
707
|
m("December")
|
|
693
|
-
],
|
|
708
|
+
], re = /* @__PURE__ */ l(k, {
|
|
694
709
|
alignItems: "center",
|
|
695
710
|
position: "relative",
|
|
696
711
|
width: "100%",
|
|
697
|
-
children: [/* @__PURE__ */ c(
|
|
712
|
+
children: [/* @__PURE__ */ c(H, {
|
|
698
713
|
ref: p,
|
|
699
|
-
value:
|
|
714
|
+
value: T,
|
|
700
715
|
readOnly: !0,
|
|
701
|
-
placeholder: s || m(
|
|
716
|
+
placeholder: s || m(S === "date" ? "Select Date..." : "Select Date & Time..."),
|
|
702
717
|
paddingRight: 40,
|
|
703
718
|
...d,
|
|
704
719
|
type: "text",
|
|
705
720
|
onPressIn: (e) => {
|
|
706
|
-
d.onPressIn?.(e),
|
|
721
|
+
d.onPressIn?.(e), j();
|
|
707
722
|
},
|
|
708
723
|
onClick: (e) => {
|
|
709
|
-
d.onClick?.(e),
|
|
724
|
+
d.onClick?.(e), j();
|
|
710
725
|
},
|
|
711
726
|
onFocus: (e) => {
|
|
712
|
-
d.onFocus?.(e),
|
|
727
|
+
d.onFocus?.(e), j();
|
|
713
728
|
},
|
|
714
729
|
cursor: "pointer"
|
|
715
|
-
}), /* @__PURE__ */ c(
|
|
730
|
+
}), /* @__PURE__ */ c(k, {
|
|
716
731
|
position: "absolute",
|
|
717
732
|
right: 12,
|
|
718
733
|
pointerEvents: "none",
|
|
@@ -757,88 +772,88 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
757
772
|
]
|
|
758
773
|
})
|
|
759
774
|
})]
|
|
760
|
-
}),
|
|
775
|
+
}), z = /* @__PURE__ */ l(A, {
|
|
761
776
|
width: 304,
|
|
762
777
|
children: [
|
|
763
|
-
/* @__PURE__ */ l(
|
|
778
|
+
/* @__PURE__ */ l(k, {
|
|
764
779
|
justifyContent: "space-between",
|
|
765
780
|
alignItems: "center",
|
|
766
781
|
marginBottom: "$3",
|
|
767
782
|
children: [
|
|
768
|
-
/* @__PURE__ */ c(
|
|
783
|
+
/* @__PURE__ */ c(B, {
|
|
769
784
|
type: "button",
|
|
770
785
|
size: "sm",
|
|
771
786
|
borderRadius: 100,
|
|
772
787
|
width: 28,
|
|
773
788
|
height: 28,
|
|
774
789
|
padding: 0,
|
|
775
|
-
onPress: () =>
|
|
776
|
-
children: /* @__PURE__ */ c(
|
|
790
|
+
onPress: () => D(new Date(E.setMonth(E.getMonth() - 1))),
|
|
791
|
+
children: /* @__PURE__ */ c(N, {
|
|
777
792
|
fontSize: 12,
|
|
778
793
|
position: "relative",
|
|
779
794
|
left: -1,
|
|
780
795
|
children: "<"
|
|
781
796
|
})
|
|
782
797
|
}),
|
|
783
|
-
/* @__PURE__ */ l(
|
|
798
|
+
/* @__PURE__ */ l(k, {
|
|
784
799
|
alignItems: "center",
|
|
785
800
|
cursor: "pointer",
|
|
786
801
|
children: [
|
|
787
|
-
/* @__PURE__ */ c(
|
|
788
|
-
onDoubleClick: () =>
|
|
789
|
-
children:
|
|
802
|
+
/* @__PURE__ */ c(A, {
|
|
803
|
+
onDoubleClick: () => x(!0),
|
|
804
|
+
children: b ? /* @__PURE__ */ c(H, {
|
|
790
805
|
size: "sm",
|
|
791
806
|
width: 100,
|
|
792
807
|
style: { textAlign: "center" },
|
|
793
808
|
paddingHorizontal: 4,
|
|
794
|
-
defaultValue:
|
|
809
|
+
defaultValue: E.getMonth() + 1,
|
|
795
810
|
onKeyDown: (e) => {
|
|
796
811
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
797
812
|
},
|
|
798
813
|
onBlur: (e) => {
|
|
799
814
|
let t = parseInt(e.target.value);
|
|
800
|
-
!isNaN(t) && t > 0 && t <= 12 &&
|
|
815
|
+
!isNaN(t) && t > 0 && t <= 12 && D(new Date(E.setMonth(t - 1))), x(!1);
|
|
801
816
|
}
|
|
802
|
-
}) : /* @__PURE__ */ c(
|
|
817
|
+
}) : /* @__PURE__ */ c(N, {
|
|
803
818
|
fontSize: 12,
|
|
804
819
|
fontWeight: "700",
|
|
805
820
|
color: "$primary",
|
|
806
|
-
children: ne[
|
|
821
|
+
children: ne[E.getMonth()]
|
|
807
822
|
})
|
|
808
823
|
}),
|
|
809
824
|
/* @__PURE__ */ c(f, { width: 12 }),
|
|
810
|
-
/* @__PURE__ */ c(
|
|
811
|
-
onDoubleClick: () =>
|
|
812
|
-
children:
|
|
825
|
+
/* @__PURE__ */ c(A, {
|
|
826
|
+
onDoubleClick: () => y(!0),
|
|
827
|
+
children: v ? /* @__PURE__ */ c(H, {
|
|
813
828
|
size: "sm",
|
|
814
829
|
width: 60,
|
|
815
830
|
style: { textAlign: "center" },
|
|
816
831
|
paddingHorizontal: 4,
|
|
817
|
-
defaultValue:
|
|
832
|
+
defaultValue: E.getFullYear().toString(),
|
|
818
833
|
onKeyDown: (e) => {
|
|
819
834
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
820
835
|
},
|
|
821
836
|
onBlur: (e) => {
|
|
822
837
|
let t = parseInt(e.target.value);
|
|
823
|
-
isNaN(t) ||
|
|
838
|
+
isNaN(t) || D(new Date(E.setFullYear(t))), y(!1);
|
|
824
839
|
}
|
|
825
|
-
}) : /* @__PURE__ */ c(
|
|
840
|
+
}) : /* @__PURE__ */ c(N, {
|
|
826
841
|
fontWeight: "700",
|
|
827
842
|
color: "$primary",
|
|
828
|
-
children:
|
|
843
|
+
children: E.getFullYear()
|
|
829
844
|
})
|
|
830
845
|
})
|
|
831
846
|
]
|
|
832
847
|
}),
|
|
833
|
-
/* @__PURE__ */ c(
|
|
848
|
+
/* @__PURE__ */ c(B, {
|
|
834
849
|
type: "button",
|
|
835
850
|
size: "sm",
|
|
836
851
|
borderRadius: 100,
|
|
837
852
|
width: 28,
|
|
838
853
|
height: 28,
|
|
839
854
|
padding: 0,
|
|
840
|
-
onPress: () =>
|
|
841
|
-
children: /* @__PURE__ */ c(
|
|
855
|
+
onPress: () => D(new Date(E.setMonth(E.getMonth() + 1))),
|
|
856
|
+
children: /* @__PURE__ */ c(N, {
|
|
842
857
|
fontSize: 12,
|
|
843
858
|
position: "relative",
|
|
844
859
|
left: 1,
|
|
@@ -847,11 +862,11 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
847
862
|
})
|
|
848
863
|
]
|
|
849
864
|
}),
|
|
850
|
-
/* @__PURE__ */ l(
|
|
865
|
+
/* @__PURE__ */ l(k, {
|
|
851
866
|
flexWrap: "wrap",
|
|
852
867
|
gap: 2,
|
|
853
868
|
marginBottom: "$2",
|
|
854
|
-
children: [/* @__PURE__ */ c(
|
|
869
|
+
children: [/* @__PURE__ */ c(k, {
|
|
855
870
|
width: "100%",
|
|
856
871
|
justifyContent: "space-around",
|
|
857
872
|
children: [
|
|
@@ -862,19 +877,19 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
862
877
|
m("Th"),
|
|
863
878
|
m("Fr"),
|
|
864
879
|
m("Sa")
|
|
865
|
-
].map((e) => /* @__PURE__ */ c(
|
|
880
|
+
].map((e) => /* @__PURE__ */ c(O, {
|
|
866
881
|
width: 36,
|
|
867
882
|
alignItems: "center",
|
|
868
|
-
children: /* @__PURE__ */ c(
|
|
883
|
+
children: /* @__PURE__ */ c(N, {
|
|
869
884
|
fontSize: 10,
|
|
870
885
|
color: "muted",
|
|
871
886
|
fontWeight: "600",
|
|
872
887
|
children: e
|
|
873
888
|
})
|
|
874
889
|
}, e))
|
|
875
|
-
}),
|
|
876
|
-
let n = e ===
|
|
877
|
-
return /* @__PURE__ */ c(
|
|
890
|
+
}), te.map((e, t) => {
|
|
891
|
+
let n = e === w.getDate() && E.getMonth() === w.getMonth() && E.getFullYear() === w.getFullYear();
|
|
892
|
+
return /* @__PURE__ */ c(O, {
|
|
878
893
|
width: 36,
|
|
879
894
|
height: 36,
|
|
880
895
|
alignItems: "center",
|
|
@@ -883,9 +898,9 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
883
898
|
cursor: e ? "pointer" : "default",
|
|
884
899
|
backgroundColor: n ? "$primary" : "transparent",
|
|
885
900
|
hoverStyle: e ? { backgroundColor: n ? "$primary" : "$backgroundHover" } : {},
|
|
886
|
-
onPress: () => e &&
|
|
887
|
-
children: /* @__PURE__ */ c(
|
|
888
|
-
color: n ? "
|
|
901
|
+
onPress: () => e && P(e),
|
|
902
|
+
children: /* @__PURE__ */ c(N, {
|
|
903
|
+
color: n ? "$primaryColor" : "$color",
|
|
889
904
|
fontSize: 12,
|
|
890
905
|
fontWeight: n ? "700" : "400",
|
|
891
906
|
children: e || ""
|
|
@@ -893,32 +908,32 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
893
908
|
}, t);
|
|
894
909
|
})]
|
|
895
910
|
}),
|
|
896
|
-
|
|
911
|
+
S === "datetime-local" && /* @__PURE__ */ l(A, {
|
|
897
912
|
marginTop: "$2",
|
|
898
913
|
paddingTop: "$3",
|
|
899
914
|
borderTopWidth: 1,
|
|
900
915
|
borderColor: "$borderColor",
|
|
901
916
|
gap: "$2",
|
|
902
|
-
children: [/* @__PURE__ */ l(
|
|
917
|
+
children: [/* @__PURE__ */ l(k, {
|
|
903
918
|
justifyContent: "space-around",
|
|
904
919
|
alignItems: "center",
|
|
905
920
|
children: [
|
|
906
|
-
/* @__PURE__ */ l(
|
|
921
|
+
/* @__PURE__ */ l(A, {
|
|
907
922
|
alignItems: "center",
|
|
908
923
|
gap: "$1",
|
|
909
924
|
children: [
|
|
910
|
-
/* @__PURE__ */ c(
|
|
925
|
+
/* @__PURE__ */ c(B, {
|
|
911
926
|
type: "button",
|
|
912
927
|
size: "sm",
|
|
913
928
|
variant: "ghost",
|
|
914
929
|
padding: 0,
|
|
915
|
-
onPress: () =>
|
|
916
|
-
children: /* @__PURE__ */ c(
|
|
930
|
+
onPress: () => F(1, 0, 0),
|
|
931
|
+
children: /* @__PURE__ */ c(N, {
|
|
917
932
|
fontSize: 16,
|
|
918
933
|
children: "+"
|
|
919
934
|
})
|
|
920
935
|
}),
|
|
921
|
-
/* @__PURE__ */ c(
|
|
936
|
+
/* @__PURE__ */ c(H, {
|
|
922
937
|
size: "sm",
|
|
923
938
|
width: 52,
|
|
924
939
|
style: { textAlign: "center" },
|
|
@@ -926,30 +941,30 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
926
941
|
onKeyDown: (e) => {
|
|
927
942
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
928
943
|
},
|
|
929
|
-
value: (
|
|
944
|
+
value: (w.getHours() % 12 || 12).toString(),
|
|
930
945
|
onChangeText: (e) => {
|
|
931
946
|
let t = parseInt(e);
|
|
932
947
|
if (!isNaN(t)) {
|
|
933
948
|
t === 12 && (t = 0);
|
|
934
|
-
let e = new Date(
|
|
935
|
-
e.setHours(n ? t + 12 : t),
|
|
949
|
+
let e = new Date(w), n = e.getHours() >= 12;
|
|
950
|
+
e.setHours(n ? t + 12 : t), M(e);
|
|
936
951
|
}
|
|
937
952
|
}
|
|
938
953
|
}),
|
|
939
|
-
/* @__PURE__ */ c(
|
|
954
|
+
/* @__PURE__ */ c(B, {
|
|
940
955
|
type: "button",
|
|
941
956
|
size: "sm",
|
|
942
957
|
variant: "ghost",
|
|
943
958
|
padding: 0,
|
|
944
|
-
onPress: () =>
|
|
945
|
-
children: /* @__PURE__ */ c(
|
|
959
|
+
onPress: () => F(-1, 0, 0),
|
|
960
|
+
children: /* @__PURE__ */ c(N, {
|
|
946
961
|
fontSize: 16,
|
|
947
962
|
children: "-"
|
|
948
963
|
})
|
|
949
964
|
})
|
|
950
965
|
]
|
|
951
966
|
}),
|
|
952
|
-
/* @__PURE__ */ c(
|
|
967
|
+
/* @__PURE__ */ c(N, {
|
|
953
968
|
fontSize: 16,
|
|
954
969
|
color: "muted",
|
|
955
970
|
marginTop: 10,
|
|
@@ -957,22 +972,22 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
957
972
|
top: -2,
|
|
958
973
|
children: ":"
|
|
959
974
|
}),
|
|
960
|
-
/* @__PURE__ */ l(
|
|
975
|
+
/* @__PURE__ */ l(A, {
|
|
961
976
|
alignItems: "center",
|
|
962
977
|
gap: "$1",
|
|
963
978
|
children: [
|
|
964
|
-
/* @__PURE__ */ c(
|
|
979
|
+
/* @__PURE__ */ c(B, {
|
|
965
980
|
type: "button",
|
|
966
981
|
size: "sm",
|
|
967
982
|
variant: "ghost",
|
|
968
983
|
padding: 0,
|
|
969
|
-
onPress: () =>
|
|
970
|
-
children: /* @__PURE__ */ c(
|
|
984
|
+
onPress: () => F(0, 1, 0),
|
|
985
|
+
children: /* @__PURE__ */ c(N, {
|
|
971
986
|
fontSize: 16,
|
|
972
987
|
children: "+"
|
|
973
988
|
})
|
|
974
989
|
}),
|
|
975
|
-
/* @__PURE__ */ c(
|
|
990
|
+
/* @__PURE__ */ c(H, {
|
|
976
991
|
size: "sm",
|
|
977
992
|
width: 52,
|
|
978
993
|
style: { textAlign: "center" },
|
|
@@ -980,29 +995,29 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
980
995
|
onKeyDown: (e) => {
|
|
981
996
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
982
997
|
},
|
|
983
|
-
value:
|
|
998
|
+
value: w.getMinutes().toString().padStart(2, "0"),
|
|
984
999
|
onChangeText: (e) => {
|
|
985
1000
|
let t = parseInt(e);
|
|
986
1001
|
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
987
|
-
let e = new Date(
|
|
988
|
-
e.setMinutes(t),
|
|
1002
|
+
let e = new Date(w);
|
|
1003
|
+
e.setMinutes(t), M(e);
|
|
989
1004
|
}
|
|
990
1005
|
}
|
|
991
1006
|
}),
|
|
992
|
-
/* @__PURE__ */ c(
|
|
1007
|
+
/* @__PURE__ */ c(B, {
|
|
993
1008
|
type: "button",
|
|
994
1009
|
size: "sm",
|
|
995
1010
|
variant: "ghost",
|
|
996
1011
|
padding: 0,
|
|
997
|
-
onPress: () =>
|
|
998
|
-
children: /* @__PURE__ */ c(
|
|
1012
|
+
onPress: () => F(0, -1, 0),
|
|
1013
|
+
children: /* @__PURE__ */ c(N, {
|
|
999
1014
|
fontSize: 16,
|
|
1000
1015
|
children: "-"
|
|
1001
1016
|
})
|
|
1002
1017
|
})
|
|
1003
1018
|
]
|
|
1004
1019
|
}),
|
|
1005
|
-
/* @__PURE__ */ c(
|
|
1020
|
+
/* @__PURE__ */ c(N, {
|
|
1006
1021
|
fontSize: 16,
|
|
1007
1022
|
color: "muted",
|
|
1008
1023
|
marginTop: 10,
|
|
@@ -1010,22 +1025,22 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1010
1025
|
top: -2,
|
|
1011
1026
|
children: ":"
|
|
1012
1027
|
}),
|
|
1013
|
-
/* @__PURE__ */ l(
|
|
1028
|
+
/* @__PURE__ */ l(A, {
|
|
1014
1029
|
alignItems: "center",
|
|
1015
1030
|
gap: "$1",
|
|
1016
1031
|
children: [
|
|
1017
|
-
/* @__PURE__ */ c(
|
|
1032
|
+
/* @__PURE__ */ c(B, {
|
|
1018
1033
|
type: "button",
|
|
1019
1034
|
size: "sm",
|
|
1020
1035
|
variant: "ghost",
|
|
1021
1036
|
padding: 0,
|
|
1022
|
-
onPress: () =>
|
|
1023
|
-
children: /* @__PURE__ */ c(
|
|
1037
|
+
onPress: () => F(0, 0, 1),
|
|
1038
|
+
children: /* @__PURE__ */ c(N, {
|
|
1024
1039
|
fontSize: 16,
|
|
1025
1040
|
children: "+"
|
|
1026
1041
|
})
|
|
1027
1042
|
}),
|
|
1028
|
-
/* @__PURE__ */ c(
|
|
1043
|
+
/* @__PURE__ */ c(H, {
|
|
1029
1044
|
size: "sm",
|
|
1030
1045
|
width: 52,
|
|
1031
1046
|
style: { textAlign: "center" },
|
|
@@ -1033,64 +1048,64 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1033
1048
|
onKeyDown: (e) => {
|
|
1034
1049
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
1035
1050
|
},
|
|
1036
|
-
value:
|
|
1051
|
+
value: w.getSeconds().toString().padStart(2, "0"),
|
|
1037
1052
|
onChangeText: (e) => {
|
|
1038
1053
|
let t = parseInt(e);
|
|
1039
1054
|
if (!isNaN(t) && t >= 0 && t < 60) {
|
|
1040
|
-
let e = new Date(
|
|
1041
|
-
e.setSeconds(t),
|
|
1055
|
+
let e = new Date(w);
|
|
1056
|
+
e.setSeconds(t), M(e);
|
|
1042
1057
|
}
|
|
1043
1058
|
}
|
|
1044
1059
|
}),
|
|
1045
|
-
/* @__PURE__ */ c(
|
|
1060
|
+
/* @__PURE__ */ c(B, {
|
|
1046
1061
|
type: "button",
|
|
1047
1062
|
size: "sm",
|
|
1048
1063
|
variant: "ghost",
|
|
1049
1064
|
padding: 0,
|
|
1050
|
-
onPress: () =>
|
|
1051
|
-
children: /* @__PURE__ */ c(
|
|
1065
|
+
onPress: () => F(0, 0, -1),
|
|
1066
|
+
children: /* @__PURE__ */ c(N, {
|
|
1052
1067
|
fontSize: 16,
|
|
1053
1068
|
children: "-"
|
|
1054
1069
|
})
|
|
1055
1070
|
})
|
|
1056
1071
|
]
|
|
1057
1072
|
}),
|
|
1058
|
-
/* @__PURE__ */ c(
|
|
1073
|
+
/* @__PURE__ */ c(A, {
|
|
1059
1074
|
justifyContent: "center",
|
|
1060
1075
|
marginTop: 10,
|
|
1061
1076
|
position: "relative",
|
|
1062
1077
|
top: -2,
|
|
1063
|
-
children: /* @__PURE__ */ c(
|
|
1078
|
+
children: /* @__PURE__ */ c(B, {
|
|
1064
1079
|
type: "button",
|
|
1065
1080
|
size: "sm",
|
|
1066
1081
|
variant: "primary",
|
|
1067
1082
|
paddingHorizontal: "$2",
|
|
1068
|
-
onPress:
|
|
1083
|
+
onPress: I,
|
|
1069
1084
|
borderRadius: "$2",
|
|
1070
1085
|
minWidth: 46,
|
|
1071
1086
|
backgroundColor: "$primary",
|
|
1072
|
-
children: /* @__PURE__ */ c(
|
|
1087
|
+
children: /* @__PURE__ */ c(N, {
|
|
1073
1088
|
fontSize: 10,
|
|
1074
1089
|
fontWeight: "900",
|
|
1075
|
-
color: "
|
|
1076
|
-
children:
|
|
1090
|
+
color: "$primaryColor",
|
|
1091
|
+
children: w.getHours() >= 12 ? "PM" : "AM"
|
|
1077
1092
|
})
|
|
1078
1093
|
})
|
|
1079
1094
|
})
|
|
1080
1095
|
]
|
|
1081
|
-
}), /* @__PURE__ */ l(
|
|
1096
|
+
}), /* @__PURE__ */ l(k, {
|
|
1082
1097
|
marginTop: "$1",
|
|
1083
1098
|
children: [
|
|
1084
|
-
/* @__PURE__ */ c(
|
|
1099
|
+
/* @__PURE__ */ c(B, {
|
|
1085
1100
|
type: "button",
|
|
1086
1101
|
variant: "default",
|
|
1087
1102
|
size: "sm",
|
|
1088
|
-
onPress:
|
|
1103
|
+
onPress: L,
|
|
1089
1104
|
flex: 1,
|
|
1090
1105
|
children: m("Now")
|
|
1091
1106
|
}),
|
|
1092
1107
|
/* @__PURE__ */ c(f, { width: 8 }),
|
|
1093
|
-
/* @__PURE__ */ c(
|
|
1108
|
+
/* @__PURE__ */ c(B, {
|
|
1094
1109
|
type: "button",
|
|
1095
1110
|
variant: "primary",
|
|
1096
1111
|
size: "sm",
|
|
@@ -1103,51 +1118,51 @@ var G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date"
|
|
|
1103
1118
|
})
|
|
1104
1119
|
]
|
|
1105
1120
|
});
|
|
1106
|
-
return /* @__PURE__ */ c(
|
|
1121
|
+
return /* @__PURE__ */ c(A, {
|
|
1107
1122
|
position: "relative",
|
|
1108
1123
|
width: d.width ?? "100%",
|
|
1109
1124
|
zIndex: h ? 1e4 : 1,
|
|
1110
|
-
children: /* @__PURE__ */ c(
|
|
1111
|
-
trigger:
|
|
1112
|
-
content:
|
|
1125
|
+
children: /* @__PURE__ */ c(U, {
|
|
1126
|
+
trigger: re,
|
|
1127
|
+
content: z,
|
|
1113
1128
|
placement: u,
|
|
1114
1129
|
open: h,
|
|
1115
1130
|
onOpenChange: g
|
|
1116
1131
|
})
|
|
1117
1132
|
});
|
|
1118
1133
|
});
|
|
1119
|
-
|
|
1134
|
+
ce.displayName = "DatePicker";
|
|
1120
1135
|
//#endregion
|
|
1121
1136
|
//#region src/components/Select.tsx
|
|
1122
|
-
var
|
|
1123
|
-
let { t:
|
|
1137
|
+
var W = 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: y, borderWidth: b, borderColor: x, borderRadius: S, paddingHorizontal: C, ...w }, T) => {
|
|
1138
|
+
let { t: E } = _("ui"), D = (s || []).find((e) => e.value === r), O = D ? D.label : u || "Select an option...", [k, j] = o(!1), M = (e) => {
|
|
1124
1139
|
a?.(e), i && i({ target: {
|
|
1125
1140
|
value: e,
|
|
1126
1141
|
name: f || ""
|
|
1127
|
-
} }),
|
|
1128
|
-
},
|
|
1129
|
-
ref:
|
|
1142
|
+
} }), j(!1);
|
|
1143
|
+
}, N = /* @__PURE__ */ l(B, {
|
|
1144
|
+
ref: T,
|
|
1130
1145
|
disabled: d,
|
|
1131
1146
|
tabIndex: -1,
|
|
1132
1147
|
size: n,
|
|
1133
1148
|
variant: "ghost",
|
|
1134
1149
|
width: "100%",
|
|
1135
1150
|
justifyContent: "space-between",
|
|
1136
|
-
borderWidth:
|
|
1137
|
-
borderColor: t ? "$error" :
|
|
1138
|
-
backgroundColor:
|
|
1139
|
-
borderRadius:
|
|
1140
|
-
paddingHorizontal:
|
|
1151
|
+
borderWidth: b ?? 1,
|
|
1152
|
+
borderColor: t ? "$error" : x ?? "$borderColor",
|
|
1153
|
+
backgroundColor: y ?? "$backgroundSecondary",
|
|
1154
|
+
borderRadius: S ?? "$round",
|
|
1155
|
+
paddingHorizontal: C,
|
|
1141
1156
|
hoverStyle: { backgroundColor: "$backgroundHover" },
|
|
1142
1157
|
pointerEvents: "none",
|
|
1143
|
-
children: [/* @__PURE__ */ c(
|
|
1158
|
+
children: [/* @__PURE__ */ c(F, {
|
|
1144
1159
|
fontSize: n === "sm" ? "$xs" : "$sm",
|
|
1145
|
-
color:
|
|
1160
|
+
color: D ? "$color" : "$colorMuted",
|
|
1146
1161
|
numberOfLines: 1,
|
|
1147
1162
|
flex: 1,
|
|
1148
1163
|
overflow: "hidden",
|
|
1149
|
-
children:
|
|
1150
|
-
}), /* @__PURE__ */ c(
|
|
1164
|
+
children: O
|
|
1165
|
+
}), /* @__PURE__ */ c(A, {
|
|
1151
1166
|
width: 0,
|
|
1152
1167
|
height: 0,
|
|
1153
1168
|
borderLeftWidth: 5,
|
|
@@ -1158,47 +1173,47 @@ var K = e.forwardRef(({ error: t, size: n = "md", value: r, onChange: i, onValue
|
|
|
1158
1173
|
borderTopColor: "$colorMuted",
|
|
1159
1174
|
opacity: .6
|
|
1160
1175
|
})]
|
|
1161
|
-
}), [
|
|
1176
|
+
}), [P, I] = o(""), L = (s || []).filter((e) => e.label.toLowerCase().includes(P.toLowerCase())), R = /* @__PURE__ */ l(A, { children: [(s || []).length > 5 && /* @__PURE__ */ c(A, {
|
|
1162
1177
|
padding: "$xs",
|
|
1163
1178
|
paddingBottom: 0,
|
|
1164
|
-
children: /* @__PURE__ */ c(
|
|
1179
|
+
children: /* @__PURE__ */ c(H, {
|
|
1165
1180
|
size: "sm",
|
|
1166
|
-
placeholder:
|
|
1167
|
-
value:
|
|
1168
|
-
onChangeText:
|
|
1181
|
+
placeholder: E("search", { defaultValue: "Search..." }),
|
|
1182
|
+
value: P,
|
|
1183
|
+
onChangeText: I,
|
|
1169
1184
|
onKeyDown: (e) => e.stopPropagation()
|
|
1170
1185
|
})
|
|
1171
|
-
}), /* @__PURE__ */ c(
|
|
1186
|
+
}), /* @__PURE__ */ c(v, {
|
|
1172
1187
|
maxHeight: 250,
|
|
1173
|
-
children: /* @__PURE__ */ l(
|
|
1188
|
+
children: /* @__PURE__ */ l(A, {
|
|
1174
1189
|
gap: "$xs",
|
|
1175
1190
|
padding: "$xs",
|
|
1176
1191
|
children: [
|
|
1177
|
-
u && /* @__PURE__ */ c(
|
|
1192
|
+
u && /* @__PURE__ */ c(B, {
|
|
1178
1193
|
variant: "ghost",
|
|
1179
1194
|
size: "sm",
|
|
1180
1195
|
justifyContent: "flex-start",
|
|
1181
|
-
onPress: () =>
|
|
1182
|
-
children: /* @__PURE__ */ c(
|
|
1196
|
+
onPress: () => M(""),
|
|
1197
|
+
children: /* @__PURE__ */ c(F, {
|
|
1183
1198
|
fontSize: "$sm",
|
|
1184
1199
|
color: "$colorMuted",
|
|
1185
1200
|
children: u
|
|
1186
1201
|
})
|
|
1187
1202
|
}),
|
|
1188
|
-
|
|
1203
|
+
L.length === 0 && /* @__PURE__ */ c(F, {
|
|
1189
1204
|
fontSize: "$sm",
|
|
1190
1205
|
color: "$colorMuted",
|
|
1191
1206
|
padding: "$sm",
|
|
1192
1207
|
textAlign: "center",
|
|
1193
|
-
children:
|
|
1208
|
+
children: E("no_options_found", { defaultValue: "No options found" })
|
|
1194
1209
|
}),
|
|
1195
|
-
|
|
1210
|
+
L.map((e) => /* @__PURE__ */ c(B, {
|
|
1196
1211
|
variant: "ghost",
|
|
1197
1212
|
size: "sm",
|
|
1198
1213
|
justifyContent: "flex-start",
|
|
1199
|
-
onPress: () =>
|
|
1214
|
+
onPress: () => M(e.value),
|
|
1200
1215
|
backgroundColor: e.value === r ? "$primary1" : "transparent",
|
|
1201
|
-
children: /* @__PURE__ */ c(
|
|
1216
|
+
children: /* @__PURE__ */ c(F, {
|
|
1202
1217
|
fontSize: "$sm",
|
|
1203
1218
|
children: e.label
|
|
1204
1219
|
})
|
|
@@ -1207,37 +1222,37 @@ var K = e.forwardRef(({ error: t, size: n = "md", value: r, onChange: i, onValue
|
|
|
1207
1222
|
})
|
|
1208
1223
|
})] });
|
|
1209
1224
|
return e.useEffect(() => {
|
|
1210
|
-
|
|
1211
|
-
}, [
|
|
1225
|
+
k || I("");
|
|
1226
|
+
}, [k]), /* @__PURE__ */ c(A, {
|
|
1212
1227
|
position: "relative",
|
|
1213
|
-
width:
|
|
1214
|
-
minWidth:
|
|
1215
|
-
...
|
|
1216
|
-
children: /* @__PURE__ */ c(
|
|
1217
|
-
trigger:
|
|
1218
|
-
content:
|
|
1228
|
+
width: w.width || "100%",
|
|
1229
|
+
minWidth: w.minWidth,
|
|
1230
|
+
...w,
|
|
1231
|
+
children: /* @__PURE__ */ c(U, {
|
|
1232
|
+
trigger: N,
|
|
1233
|
+
content: R,
|
|
1219
1234
|
placement: g || "bottom-start",
|
|
1220
|
-
open:
|
|
1221
|
-
onOpenChange:
|
|
1235
|
+
open: k,
|
|
1236
|
+
onOpenChange: j
|
|
1222
1237
|
})
|
|
1223
1238
|
});
|
|
1224
1239
|
});
|
|
1225
|
-
|
|
1240
|
+
W.displayName = "Select";
|
|
1226
1241
|
//#endregion
|
|
1227
1242
|
//#region src/components/Toast.tsx
|
|
1228
|
-
var
|
|
1243
|
+
var le = {
|
|
1229
1244
|
success: "✓",
|
|
1230
1245
|
error: "✕",
|
|
1231
1246
|
warning: "⚠",
|
|
1232
1247
|
info: "ℹ"
|
|
1233
1248
|
};
|
|
1234
|
-
function
|
|
1249
|
+
function ue({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i }) {
|
|
1235
1250
|
return r(() => {
|
|
1236
1251
|
if (n > 0 && i) {
|
|
1237
1252
|
let e = setTimeout(i, n);
|
|
1238
1253
|
return () => clearTimeout(e);
|
|
1239
1254
|
}
|
|
1240
|
-
}, [n, i]), /* @__PURE__ */ c(
|
|
1255
|
+
}, [n, i]), /* @__PURE__ */ c(A, {
|
|
1241
1256
|
className: `toast toast-${t}`,
|
|
1242
1257
|
role: "alert",
|
|
1243
1258
|
"aria-live": "assertive",
|
|
@@ -1253,19 +1268,19 @@ function q({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1253
1268
|
width: 0,
|
|
1254
1269
|
height: 4
|
|
1255
1270
|
},
|
|
1256
|
-
children: /* @__PURE__ */ l(
|
|
1271
|
+
children: /* @__PURE__ */ l(k, {
|
|
1257
1272
|
alignItems: "center",
|
|
1258
1273
|
gap: "$sm",
|
|
1259
1274
|
children: [
|
|
1260
|
-
/* @__PURE__ */ c(
|
|
1275
|
+
/* @__PURE__ */ c(N, {
|
|
1261
1276
|
fontWeight: "600",
|
|
1262
|
-
children:
|
|
1277
|
+
children: le[t]
|
|
1263
1278
|
}),
|
|
1264
|
-
/* @__PURE__ */ c(
|
|
1279
|
+
/* @__PURE__ */ c(N, {
|
|
1265
1280
|
flex: 1,
|
|
1266
1281
|
children: e
|
|
1267
1282
|
}),
|
|
1268
|
-
i && /* @__PURE__ */ c(
|
|
1283
|
+
i && /* @__PURE__ */ c(B, {
|
|
1269
1284
|
variant: "ghost",
|
|
1270
1285
|
size: "sm",
|
|
1271
1286
|
onPress: i,
|
|
@@ -1276,8 +1291,8 @@ function q({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i })
|
|
|
1276
1291
|
})
|
|
1277
1292
|
});
|
|
1278
1293
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return /* @__PURE__ */ c(
|
|
1294
|
+
function de({ toasts: e, onDismiss: t }) {
|
|
1295
|
+
return /* @__PURE__ */ c(A, {
|
|
1281
1296
|
"aria-label": "Notifications",
|
|
1282
1297
|
position: "fixed",
|
|
1283
1298
|
bottom: "$lg",
|
|
@@ -1285,9 +1300,9 @@ function ce({ toasts: e, onDismiss: t }) {
|
|
|
1285
1300
|
zIndex: 60,
|
|
1286
1301
|
gap: "$sm",
|
|
1287
1302
|
pointerEvents: "none",
|
|
1288
|
-
children: e.map((e) => /* @__PURE__ */ c(
|
|
1303
|
+
children: e.map((e) => /* @__PURE__ */ c(A, {
|
|
1289
1304
|
pointerEvents: "auto",
|
|
1290
|
-
children: /* @__PURE__ */ c(
|
|
1305
|
+
children: /* @__PURE__ */ c(ue, {
|
|
1291
1306
|
...e,
|
|
1292
1307
|
onDismiss: () => t(e.id)
|
|
1293
1308
|
})
|
|
@@ -1296,10 +1311,10 @@ function ce({ toasts: e, onDismiss: t }) {
|
|
|
1296
1311
|
}
|
|
1297
1312
|
//#endregion
|
|
1298
1313
|
//#region src/components/Portal.tsx
|
|
1299
|
-
var
|
|
1314
|
+
var fe = t(null), pe = ({ children: e }) => {
|
|
1300
1315
|
let [t, n] = o(/* @__PURE__ */ new Map());
|
|
1301
1316
|
/* v8 ignore stop */
|
|
1302
|
-
return /* @__PURE__ */ l(
|
|
1317
|
+
return /* @__PURE__ */ l(fe.Provider, {
|
|
1303
1318
|
value: {
|
|
1304
1319
|
register: (e, t) => {
|
|
1305
1320
|
n((n) => {
|
|
@@ -1314,10 +1329,10 @@ var le = t(null), ue = ({ children: e }) => {
|
|
|
1314
1329
|
});
|
|
1315
1330
|
}
|
|
1316
1331
|
},
|
|
1317
|
-
children: [e, /* @__PURE__ */ c(
|
|
1332
|
+
children: [e, /* @__PURE__ */ c(me, { portals: t })]
|
|
1318
1333
|
});
|
|
1319
|
-
},
|
|
1320
|
-
let t = n(
|
|
1334
|
+
}, me = ({ portals: t }) => typeof document < "u" ? null : /* @__PURE__ */ c(s, { children: Array.from(t.entries()).map(([t, n]) => /* @__PURE__ */ c(e.Fragment, { children: n }, t)) }), G = ({ children: e }) => {
|
|
1335
|
+
let t = n(fe), [i] = o(() => Math.random().toString(36).substr(2, 9));
|
|
1321
1336
|
if (r(() => {
|
|
1322
1337
|
if (!(typeof document < "u" || !t))
|
|
1323
1338
|
/* v8 ignore next */
|
|
@@ -1330,16 +1345,16 @@ var le = t(null), ue = ({ children: e }) => {
|
|
|
1330
1345
|
let t = document.getElementById("portal-root");
|
|
1331
1346
|
t || (t = document.createElement("div"), t.id = "portal-root", document.body.appendChild(t));
|
|
1332
1347
|
let n = document.documentElement.className;
|
|
1333
|
-
return t.className !== n && (t.className = n),
|
|
1348
|
+
return t.className !== n && (t.className = n), y.createPortal(e, t);
|
|
1334
1349
|
}
|
|
1335
1350
|
/* v8 ignore next */
|
|
1336
1351
|
return null;
|
|
1337
|
-
},
|
|
1352
|
+
}, he = {
|
|
1338
1353
|
sm: 400,
|
|
1339
1354
|
md: 600,
|
|
1340
1355
|
lg: 900,
|
|
1341
1356
|
xl: 1200
|
|
1342
|
-
},
|
|
1357
|
+
}, ge = ({ isOpen: e, onClose: t, title: n, footer: r, size: i = "md", children: a }) => e ? /* @__PURE__ */ c(G, { children: /* @__PURE__ */ l(j, {
|
|
1343
1358
|
position: "absolute",
|
|
1344
1359
|
top: 0,
|
|
1345
1360
|
left: 0,
|
|
@@ -1350,7 +1365,7 @@ var le = t(null), ue = ({ children: e }) => {
|
|
|
1350
1365
|
zIndex: 99999,
|
|
1351
1366
|
alignItems: "center",
|
|
1352
1367
|
justifyContent: "center",
|
|
1353
|
-
children: [/* @__PURE__ */ c(
|
|
1368
|
+
children: [/* @__PURE__ */ c(A, {
|
|
1354
1369
|
position: "absolute",
|
|
1355
1370
|
top: 0,
|
|
1356
1371
|
left: 0,
|
|
@@ -1359,8 +1374,8 @@ var le = t(null), ue = ({ children: e }) => {
|
|
|
1359
1374
|
backgroundColor: "rgba(0,0,0,0.6)",
|
|
1360
1375
|
onPress: t,
|
|
1361
1376
|
zIndex: 10
|
|
1362
|
-
}), /* @__PURE__ */ l(
|
|
1363
|
-
width:
|
|
1377
|
+
}), /* @__PURE__ */ l(V, {
|
|
1378
|
+
width: he[i],
|
|
1364
1379
|
maxWidth: "95%",
|
|
1365
1380
|
maxHeight: "90vh",
|
|
1366
1381
|
backgroundColor: "$background",
|
|
@@ -1372,33 +1387,33 @@ var le = t(null), ue = ({ children: e }) => {
|
|
|
1372
1387
|
borderColor: "$borderColor",
|
|
1373
1388
|
zIndex: 100,
|
|
1374
1389
|
children: [
|
|
1375
|
-
/* @__PURE__ */ l(
|
|
1390
|
+
/* @__PURE__ */ l(k, {
|
|
1376
1391
|
padding: "$4",
|
|
1377
1392
|
borderBottomWidth: 1,
|
|
1378
1393
|
borderBottomColor: "$borderColor",
|
|
1379
1394
|
justifyContent: "space-between",
|
|
1380
1395
|
alignItems: "center",
|
|
1381
1396
|
backgroundColor: "$backgroundSecondary",
|
|
1382
|
-
children: [/* @__PURE__ */ c(
|
|
1397
|
+
children: [/* @__PURE__ */ c(N, {
|
|
1383
1398
|
fontWeight: "700",
|
|
1384
1399
|
size: "lg",
|
|
1385
1400
|
children: n
|
|
1386
|
-
}), /* @__PURE__ */ c(
|
|
1401
|
+
}), /* @__PURE__ */ c(B, {
|
|
1387
1402
|
size: "sm",
|
|
1388
1403
|
variant: "ghost",
|
|
1389
1404
|
onPress: t,
|
|
1390
1405
|
padding: "$2",
|
|
1391
|
-
children: /* @__PURE__ */ c(
|
|
1406
|
+
children: /* @__PURE__ */ c(N, { children: "✕" })
|
|
1392
1407
|
})]
|
|
1393
1408
|
}),
|
|
1394
|
-
/* @__PURE__ */ c(
|
|
1409
|
+
/* @__PURE__ */ c(A, {
|
|
1395
1410
|
flex: 1,
|
|
1396
1411
|
overflow: "scroll",
|
|
1397
1412
|
minHeight: 300,
|
|
1398
1413
|
backgroundColor: "$background",
|
|
1399
1414
|
children: a
|
|
1400
1415
|
}),
|
|
1401
|
-
r && /* @__PURE__ */ c(
|
|
1416
|
+
r && /* @__PURE__ */ c(k, {
|
|
1402
1417
|
padding: "$4",
|
|
1403
1418
|
borderTopWidth: 1,
|
|
1404
1419
|
borderTopColor: "$borderColor",
|
|
@@ -1412,8 +1427,8 @@ var le = t(null), ue = ({ children: e }) => {
|
|
|
1412
1427
|
}) }) : null;
|
|
1413
1428
|
//#endregion
|
|
1414
1429
|
//#region src/components/Drawer.tsx
|
|
1415
|
-
function
|
|
1416
|
-
return e ? /* @__PURE__ */ c(
|
|
1430
|
+
function _e({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, footer: a }) {
|
|
1431
|
+
return e ? /* @__PURE__ */ c(G, { children: /* @__PURE__ */ l(j, {
|
|
1417
1432
|
position: "absolute",
|
|
1418
1433
|
top: 0,
|
|
1419
1434
|
left: 0,
|
|
@@ -1422,7 +1437,7 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1422
1437
|
width: "100%",
|
|
1423
1438
|
height: "100%",
|
|
1424
1439
|
zIndex: 1e5,
|
|
1425
|
-
children: [/* @__PURE__ */ c(
|
|
1440
|
+
children: [/* @__PURE__ */ c(A, {
|
|
1426
1441
|
position: "absolute",
|
|
1427
1442
|
top: 0,
|
|
1428
1443
|
left: 0,
|
|
@@ -1431,7 +1446,7 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1431
1446
|
backgroundColor: "rgba(0,0,0,0.45)",
|
|
1432
1447
|
onPress: t,
|
|
1433
1448
|
zIndex: 10
|
|
1434
|
-
}), /* @__PURE__ */ l(
|
|
1449
|
+
}), /* @__PURE__ */ l(V, {
|
|
1435
1450
|
style: {
|
|
1436
1451
|
position: "fixed",
|
|
1437
1452
|
top: 0,
|
|
@@ -1454,31 +1469,31 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1454
1469
|
elevated: !1,
|
|
1455
1470
|
zIndex: 100,
|
|
1456
1471
|
children: [
|
|
1457
|
-
/* @__PURE__ */ l(
|
|
1472
|
+
/* @__PURE__ */ l(k, {
|
|
1458
1473
|
padding: "$md",
|
|
1459
1474
|
borderBottomWidth: 1,
|
|
1460
1475
|
borderColor: "$borderColor",
|
|
1461
1476
|
justifyContent: "space-between",
|
|
1462
1477
|
alignItems: "center",
|
|
1463
1478
|
backgroundColor: "$backgroundSecondary",
|
|
1464
|
-
children: [/* @__PURE__ */ c(
|
|
1479
|
+
children: [/* @__PURE__ */ c(N, {
|
|
1465
1480
|
fontWeight: "700",
|
|
1466
1481
|
size: "$md",
|
|
1467
1482
|
children: n
|
|
1468
|
-
}), /* @__PURE__ */ c(
|
|
1483
|
+
}), /* @__PURE__ */ c(B, {
|
|
1469
1484
|
size: "sm",
|
|
1470
1485
|
variant: "ghost",
|
|
1471
1486
|
onPress: t,
|
|
1472
1487
|
children: "✕"
|
|
1473
1488
|
})]
|
|
1474
1489
|
}),
|
|
1475
|
-
/* @__PURE__ */ c(
|
|
1490
|
+
/* @__PURE__ */ c(A, {
|
|
1476
1491
|
flex: 1,
|
|
1477
1492
|
padding: "$md",
|
|
1478
1493
|
style: { overflowY: "auto" },
|
|
1479
1494
|
children: i
|
|
1480
1495
|
}),
|
|
1481
|
-
a && /* @__PURE__ */ c(
|
|
1496
|
+
a && /* @__PURE__ */ c(k, {
|
|
1482
1497
|
padding: "$md",
|
|
1483
1498
|
borderTopWidth: 1,
|
|
1484
1499
|
borderColor: "$borderColor",
|
|
@@ -1493,15 +1508,15 @@ function me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, foot
|
|
|
1493
1508
|
}
|
|
1494
1509
|
//#endregion
|
|
1495
1510
|
//#region src/components/Avatar.tsx
|
|
1496
|
-
var
|
|
1511
|
+
var ve = {
|
|
1497
1512
|
$sm: 24,
|
|
1498
1513
|
$md: 32,
|
|
1499
1514
|
$lg: 40,
|
|
1500
1515
|
$xl: 48
|
|
1501
1516
|
};
|
|
1502
|
-
function
|
|
1503
|
-
let [s, l] = o(!1), u = typeof n == "number" ? n :
|
|
1504
|
-
return /* @__PURE__ */ c(
|
|
1517
|
+
function ye({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidth: i, borderColor: a }) {
|
|
1518
|
+
let [s, l] = o(!1), u = typeof n == "number" ? n : ve[n] || 32;
|
|
1519
|
+
return /* @__PURE__ */ c(A, {
|
|
1505
1520
|
width: u,
|
|
1506
1521
|
height: u,
|
|
1507
1522
|
borderRadius: r ? u / 2 : "$sm",
|
|
@@ -1511,7 +1526,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1511
1526
|
overflow: "hidden",
|
|
1512
1527
|
borderWidth: i,
|
|
1513
1528
|
borderColor: a,
|
|
1514
|
-
children: e && !s ? /* @__PURE__ */ c(
|
|
1529
|
+
children: e && !s ? /* @__PURE__ */ c(b, {
|
|
1515
1530
|
source: {
|
|
1516
1531
|
uri: e,
|
|
1517
1532
|
width: u,
|
|
@@ -1520,7 +1535,7 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1520
1535
|
width: "100%",
|
|
1521
1536
|
height: "100%",
|
|
1522
1537
|
onError: () => l(!0)
|
|
1523
|
-
}) : typeof t == "string" ? /* @__PURE__ */ c(
|
|
1538
|
+
}) : typeof t == "string" ? /* @__PURE__ */ c(N, {
|
|
1524
1539
|
color: "$colorMuted",
|
|
1525
1540
|
size: "$sm",
|
|
1526
1541
|
fontWeight: "600",
|
|
@@ -1530,8 +1545,8 @@ function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidt
|
|
|
1530
1545
|
}
|
|
1531
1546
|
//#endregion
|
|
1532
1547
|
//#region src/components/Separator.tsx
|
|
1533
|
-
function
|
|
1534
|
-
return /* @__PURE__ */ c(
|
|
1548
|
+
function be({ vertical: e }) {
|
|
1549
|
+
return /* @__PURE__ */ c(A, {
|
|
1535
1550
|
width: e ? 1 : "100%",
|
|
1536
1551
|
height: e ? "100%" : 1,
|
|
1537
1552
|
backgroundColor: "$borderColor"
|
|
@@ -1539,11 +1554,11 @@ function _e({ vertical: e }) {
|
|
|
1539
1554
|
}
|
|
1540
1555
|
//#endregion
|
|
1541
1556
|
//#region src/components/Icon.tsx
|
|
1542
|
-
function
|
|
1557
|
+
function xe(e) {
|
|
1543
1558
|
return e.replace(/[-_](.)/g, (e, t) => t.toUpperCase()).replace(/^(.)/, (e) => e.toUpperCase());
|
|
1544
1559
|
}
|
|
1545
|
-
function
|
|
1546
|
-
let a =
|
|
1560
|
+
function K({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
|
|
1561
|
+
let a = xe(e), o = a in x ? x[a] : x.Box;
|
|
1547
1562
|
return /* @__PURE__ */ c(o, {
|
|
1548
1563
|
size: t,
|
|
1549
1564
|
color: n,
|
|
@@ -1553,20 +1568,20 @@ function Y({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
|
|
|
1553
1568
|
}
|
|
1554
1569
|
//#endregion
|
|
1555
1570
|
//#region src/theme/ThemeToggle.tsx
|
|
1556
|
-
function
|
|
1557
|
-
let { theme: e, toggleTheme: t } =
|
|
1558
|
-
return /* @__PURE__ */ c(
|
|
1571
|
+
function Se() {
|
|
1572
|
+
let { theme: e, toggleTheme: t } = D();
|
|
1573
|
+
return /* @__PURE__ */ c(B, {
|
|
1559
1574
|
variant: "ghost",
|
|
1560
1575
|
onPress: t,
|
|
1561
1576
|
"aria-label": `Switch to ${e === "light" ? "dark" : "light"} mode`,
|
|
1562
1577
|
title: `Current theme: ${e}`,
|
|
1563
|
-
children: /* @__PURE__ */ c(
|
|
1578
|
+
children: /* @__PURE__ */ c(K, {
|
|
1564
1579
|
name: e === "light" ? "moon" : "sun",
|
|
1565
1580
|
size: 20
|
|
1566
1581
|
})
|
|
1567
1582
|
});
|
|
1568
1583
|
}
|
|
1569
|
-
var
|
|
1584
|
+
var q = {
|
|
1570
1585
|
brand: {
|
|
1571
1586
|
violet: {
|
|
1572
1587
|
50: "#F5F3FF",
|
|
@@ -1649,7 +1664,7 @@ var X = {
|
|
|
1649
1664
|
borderColorMuted: "rgba(30, 51, 88, 0.4)"
|
|
1650
1665
|
}
|
|
1651
1666
|
}
|
|
1652
|
-
},
|
|
1667
|
+
}, J = {
|
|
1653
1668
|
fontFamily: {
|
|
1654
1669
|
sans: "'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
1655
1670
|
mono: "'JetBrains Mono', 'Fira Code', monospace"
|
|
@@ -1675,7 +1690,7 @@ var X = {
|
|
|
1675
1690
|
normal: 1.5,
|
|
1676
1691
|
relaxed: 1.6
|
|
1677
1692
|
}
|
|
1678
|
-
},
|
|
1693
|
+
}, Y = {
|
|
1679
1694
|
spacing: {
|
|
1680
1695
|
xs: "0.25rem",
|
|
1681
1696
|
sm: "0.5rem",
|
|
@@ -1699,24 +1714,24 @@ var X = {
|
|
|
1699
1714
|
};
|
|
1700
1715
|
//#endregion
|
|
1701
1716
|
//#region src/tokens/config.ts
|
|
1702
|
-
function
|
|
1717
|
+
function Ce() {
|
|
1703
1718
|
return {
|
|
1704
|
-
primary:
|
|
1705
|
-
secondary:
|
|
1719
|
+
primary: q.semantic.light.primary,
|
|
1720
|
+
secondary: q.semantic.light.secondary,
|
|
1706
1721
|
white: "#ffffff",
|
|
1707
1722
|
black: "#000000",
|
|
1708
1723
|
transparent: "transparent"
|
|
1709
1724
|
};
|
|
1710
1725
|
}
|
|
1711
|
-
function
|
|
1726
|
+
function we() {
|
|
1712
1727
|
let e = {};
|
|
1713
|
-
return Object.entries(
|
|
1728
|
+
return Object.entries(J.fontSize).forEach(([t, n]) => {
|
|
1714
1729
|
let r = parseFloat(n.toString());
|
|
1715
1730
|
e[t] = isNaN(r) ? 16 : r * 16;
|
|
1716
1731
|
}), e;
|
|
1717
1732
|
}
|
|
1718
|
-
function
|
|
1719
|
-
let t =
|
|
1733
|
+
function Te(e) {
|
|
1734
|
+
let t = q.semantic[e];
|
|
1720
1735
|
return {
|
|
1721
1736
|
background: t.bg,
|
|
1722
1737
|
backgroundSecondary: t.bgSecondary,
|
|
@@ -1728,6 +1743,7 @@ function Se(e) {
|
|
|
1728
1743
|
borderColorMuted: t.borderColorMuted || t.border,
|
|
1729
1744
|
placeholderColor: t.textMuted || "#94a3b8",
|
|
1730
1745
|
primary: t.primary,
|
|
1746
|
+
primaryColor: e === "light" ? "#ffffff" : "#0f172a",
|
|
1731
1747
|
secondary: t.secondary,
|
|
1732
1748
|
success: t.success,
|
|
1733
1749
|
warning: t.warning,
|
|
@@ -1739,27 +1755,27 @@ function Se(e) {
|
|
|
1739
1755
|
}, {})
|
|
1740
1756
|
};
|
|
1741
1757
|
}
|
|
1742
|
-
function
|
|
1758
|
+
function Ee() {
|
|
1743
1759
|
let e = {};
|
|
1744
|
-
return Object.entries(
|
|
1760
|
+
return Object.entries(Y.spacing).forEach(([t, n]) => {
|
|
1745
1761
|
let r = parseFloat(n.toString());
|
|
1746
1762
|
e[t] = isNaN(r) ? 0 : r * 16;
|
|
1747
1763
|
}), e;
|
|
1748
1764
|
}
|
|
1749
|
-
function
|
|
1765
|
+
function De() {
|
|
1750
1766
|
let e = {};
|
|
1751
|
-
return Object.entries(
|
|
1767
|
+
return Object.entries(Y.borderRadius).forEach(([t, n]) => {
|
|
1752
1768
|
let r = parseFloat(n.toString());
|
|
1753
1769
|
e[t] = isNaN(r) ? 0 : r;
|
|
1754
1770
|
}), e.full = 9999, e.pill = 9999, e.round = 8, e;
|
|
1755
1771
|
}
|
|
1756
|
-
function
|
|
1772
|
+
function Oe() {
|
|
1757
1773
|
return {
|
|
1758
1774
|
tokens: {
|
|
1759
|
-
color:
|
|
1760
|
-
space:
|
|
1761
|
-
size:
|
|
1762
|
-
radius:
|
|
1775
|
+
color: Ce(),
|
|
1776
|
+
space: Ee(),
|
|
1777
|
+
size: we(),
|
|
1778
|
+
radius: De(),
|
|
1763
1779
|
zIndex: {
|
|
1764
1780
|
base: 0,
|
|
1765
1781
|
dropdown: 100,
|
|
@@ -1768,22 +1784,27 @@ function Te() {
|
|
|
1768
1784
|
}
|
|
1769
1785
|
},
|
|
1770
1786
|
themes: {
|
|
1771
|
-
light:
|
|
1772
|
-
dark:
|
|
1787
|
+
light: Te("light"),
|
|
1788
|
+
dark: Te("dark")
|
|
1773
1789
|
}
|
|
1774
1790
|
};
|
|
1775
1791
|
}
|
|
1776
1792
|
//#endregion
|
|
1777
1793
|
//#region src/theme/mThemeConfig.ts
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
size:
|
|
1794
|
+
function ke(e, t) {
|
|
1795
|
+
let n = { ...e };
|
|
1796
|
+
for (let [e, r] of Object.entries(t ?? {})) r !== void 0 && (n[e] = r);
|
|
1797
|
+
return n;
|
|
1798
|
+
}
|
|
1799
|
+
var X = Oe(), Z = {
|
|
1800
|
+
color: X.tokens.color,
|
|
1801
|
+
space: X.tokens.space,
|
|
1802
|
+
size: X.tokens.size,
|
|
1803
|
+
radius: X.tokens.radius,
|
|
1804
|
+
zIndex: X.tokens.zIndex
|
|
1805
|
+
}, Ae = h(Z), je = p({
|
|
1806
|
+
family: J.fontFamily.sans,
|
|
1807
|
+
size: X.tokens.size,
|
|
1787
1808
|
lineHeight: {
|
|
1788
1809
|
tight: 1.3,
|
|
1789
1810
|
normal: 1.5
|
|
@@ -1798,9 +1819,9 @@ var $ = Te(), Ee = h({
|
|
|
1798
1819
|
base: 0,
|
|
1799
1820
|
lg: -.2
|
|
1800
1821
|
}
|
|
1801
|
-
}),
|
|
1802
|
-
family:
|
|
1803
|
-
size:
|
|
1822
|
+
}), Me = p({
|
|
1823
|
+
family: J.fontFamily.sans,
|
|
1824
|
+
size: X.tokens.size,
|
|
1804
1825
|
lineHeight: {
|
|
1805
1826
|
tight: 1.3,
|
|
1806
1827
|
normal: 1.5
|
|
@@ -1811,41 +1832,218 @@ var $ = Te(), Ee = h({
|
|
|
1811
1832
|
semibold: "600",
|
|
1812
1833
|
bold: "700"
|
|
1813
1834
|
}
|
|
1814
|
-
}),
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
},
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1835
|
+
}), Ne = {
|
|
1836
|
+
xs: { maxWidth: 659 },
|
|
1837
|
+
sm: { maxWidth: 800 },
|
|
1838
|
+
md: { maxWidth: 1024 },
|
|
1839
|
+
lg: { maxWidth: 1280 },
|
|
1840
|
+
xl: { maxWidth: 1420 },
|
|
1841
|
+
gtXs: { minWidth: 660 },
|
|
1842
|
+
gtSm: { minWidth: 801 },
|
|
1843
|
+
gtMd: { minWidth: 1025 },
|
|
1844
|
+
gtLg: { minWidth: 1281 },
|
|
1845
|
+
short: { maxHeight: 820 },
|
|
1846
|
+
tall: { minHeight: 821 },
|
|
1847
|
+
hoverNone: { hover: "none" },
|
|
1848
|
+
pointerCoarse: { pointer: "coarse" }
|
|
1849
|
+
};
|
|
1850
|
+
function Q(e) {
|
|
1851
|
+
let t = e?.tokens ? h({
|
|
1852
|
+
color: {
|
|
1853
|
+
...Z.color,
|
|
1854
|
+
...e.tokens.color ?? {}
|
|
1855
|
+
},
|
|
1856
|
+
space: {
|
|
1857
|
+
...Z.space,
|
|
1858
|
+
...e.tokens.space ?? {}
|
|
1859
|
+
},
|
|
1860
|
+
size: {
|
|
1861
|
+
...Z.size,
|
|
1862
|
+
...e.tokens.size ?? {}
|
|
1863
|
+
},
|
|
1864
|
+
radius: {
|
|
1865
|
+
...Z.radius,
|
|
1866
|
+
...e.tokens.radius ?? {}
|
|
1867
|
+
},
|
|
1868
|
+
zIndex: {
|
|
1869
|
+
...Z.zIndex,
|
|
1870
|
+
...e.tokens.zIndex ?? {}
|
|
1871
|
+
}
|
|
1872
|
+
}) : Ae, n = {
|
|
1873
|
+
light: ke(X.themes.light, e?.themes?.light),
|
|
1874
|
+
dark: ke(X.themes.dark, e?.themes?.dark)
|
|
1875
|
+
};
|
|
1876
|
+
return m({
|
|
1877
|
+
tokens: t,
|
|
1878
|
+
themes: n,
|
|
1879
|
+
fonts: {
|
|
1880
|
+
heading: je,
|
|
1881
|
+
body: Me
|
|
1882
|
+
},
|
|
1883
|
+
defaultTheme: "light",
|
|
1884
|
+
media: Ne
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
var Pe = Q();
|
|
1838
1888
|
//#endregion
|
|
1839
1889
|
//#region src/theme/MProvider.tsx
|
|
1840
|
-
function
|
|
1841
|
-
let
|
|
1890
|
+
function $({ children: e, preset: t, defaultTheme: r }) {
|
|
1891
|
+
let a = n(S)?.theme ?? r ?? "light", o = i(() => t ? Q(t) : Pe, [t]);
|
|
1842
1892
|
return /* @__PURE__ */ c(u, {
|
|
1843
|
-
config:
|
|
1844
|
-
defaultTheme:
|
|
1845
|
-
children: /* @__PURE__ */ c(
|
|
1893
|
+
config: o,
|
|
1894
|
+
defaultTheme: a,
|
|
1895
|
+
children: /* @__PURE__ */ c(pe, { children: e })
|
|
1846
1896
|
});
|
|
1847
1897
|
}
|
|
1898
|
+
function Fe(e) {
|
|
1899
|
+
return n(S) ? /* @__PURE__ */ c($, { ...e }) : /* @__PURE__ */ c(E, {
|
|
1900
|
+
defaultTheme: e.defaultTheme,
|
|
1901
|
+
children: /* @__PURE__ */ c($, { ...e })
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
//#endregion
|
|
1905
|
+
//#region src/theme/presets/frappePreset.ts
|
|
1906
|
+
var Ie = {
|
|
1907
|
+
name: "frappe",
|
|
1908
|
+
tokens: {
|
|
1909
|
+
color: {
|
|
1910
|
+
primary: "#111827",
|
|
1911
|
+
primaryHover: "#1f2937",
|
|
1912
|
+
gray50: "#f8fafc",
|
|
1913
|
+
gray100: "#f1f5f9",
|
|
1914
|
+
gray200: "#e2e8f0",
|
|
1915
|
+
gray300: "#cbd5e1",
|
|
1916
|
+
gray400: "#94a3b8",
|
|
1917
|
+
gray500: "#64748b",
|
|
1918
|
+
gray600: "#475569",
|
|
1919
|
+
gray700: "#334155",
|
|
1920
|
+
gray800: "#1e293b",
|
|
1921
|
+
gray900: "#0f172a"
|
|
1922
|
+
},
|
|
1923
|
+
radius: {
|
|
1924
|
+
xs: 2,
|
|
1925
|
+
sm: 4,
|
|
1926
|
+
md: 6,
|
|
1927
|
+
lg: 8,
|
|
1928
|
+
xl: 12,
|
|
1929
|
+
full: 9999
|
|
1930
|
+
},
|
|
1931
|
+
size: {
|
|
1932
|
+
xs: 10,
|
|
1933
|
+
sm: 12,
|
|
1934
|
+
base: 13,
|
|
1935
|
+
md: 14,
|
|
1936
|
+
lg: 16,
|
|
1937
|
+
xl: 18,
|
|
1938
|
+
"2xl": 24
|
|
1939
|
+
},
|
|
1940
|
+
space: {
|
|
1941
|
+
1: 4,
|
|
1942
|
+
2: 8,
|
|
1943
|
+
3: 12,
|
|
1944
|
+
4: 16,
|
|
1945
|
+
5: 20,
|
|
1946
|
+
6: 24,
|
|
1947
|
+
8: 32,
|
|
1948
|
+
10: 40
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
themes: {
|
|
1952
|
+
light: {
|
|
1953
|
+
background: "#f8fafc",
|
|
1954
|
+
backgroundSecondary: "#ffffff",
|
|
1955
|
+
backgroundTertiary: "#f1f5f9",
|
|
1956
|
+
backgroundHover: "#f1f5f9",
|
|
1957
|
+
backgroundActive: "#e2e8f0",
|
|
1958
|
+
backgroundFocus: "#ffffff",
|
|
1959
|
+
color: "#0f172a",
|
|
1960
|
+
colorSecondary: "#475569",
|
|
1961
|
+
colorMuted: "#64748b",
|
|
1962
|
+
colorDisabled: "#94a3b8",
|
|
1963
|
+
placeholderColor: "#94a3b8",
|
|
1964
|
+
borderColor: "#e2e8f0",
|
|
1965
|
+
borderColorHover: "#cbd5e1",
|
|
1966
|
+
borderColorFocus: "#2490ef",
|
|
1967
|
+
borderColorMuted: "rgba(226, 232, 240, 0.6)",
|
|
1968
|
+
primary: "#111827",
|
|
1969
|
+
primaryColor: "#ffffff",
|
|
1970
|
+
primaryHover: "#1f2937",
|
|
1971
|
+
primaryActive: "#000000",
|
|
1972
|
+
secondary: "#f1f5f9",
|
|
1973
|
+
focusRing: "rgba(17, 24, 39, 0.25)",
|
|
1974
|
+
"focus-ring": "rgba(17, 24, 39, 0.25)",
|
|
1975
|
+
sidebarBg: "#f8fafc",
|
|
1976
|
+
sidebarText: "#111827",
|
|
1977
|
+
sidebarTextMuted: "#6b7280",
|
|
1978
|
+
sidebarHover: "#f1f5f9",
|
|
1979
|
+
sidebarSearchBg: "#f1f5f9",
|
|
1980
|
+
sidebarItemActiveBg: "#ffffff",
|
|
1981
|
+
"sidebar-bg": "#f8fafc",
|
|
1982
|
+
"sidebar-text": "#111827",
|
|
1983
|
+
"sidebar-text-muted": "#6b7280",
|
|
1984
|
+
"sidebar-hover": "#f1f5f9",
|
|
1985
|
+
"sidebar-search-bg": "#f1f5f9",
|
|
1986
|
+
"sidebar-item-active-bg": "#ffffff",
|
|
1987
|
+
success: "#10b981",
|
|
1988
|
+
successBackground: "#ecfdf5",
|
|
1989
|
+
warning: "#f59e0b",
|
|
1990
|
+
warningBackground: "#fffbeb",
|
|
1991
|
+
error: "#ef4444",
|
|
1992
|
+
errorBackground: "#fef2f2",
|
|
1993
|
+
info: "#0284c7",
|
|
1994
|
+
infoBackground: "#f0f9ff",
|
|
1995
|
+
shadowColor: "rgba(15, 23, 42, 0.06)",
|
|
1996
|
+
shadowColorHover: "rgba(15, 23, 42, 0.12)"
|
|
1997
|
+
},
|
|
1998
|
+
dark: {
|
|
1999
|
+
background: "#121212",
|
|
2000
|
+
backgroundSecondary: "#18181b",
|
|
2001
|
+
backgroundTertiary: "#27272a",
|
|
2002
|
+
backgroundHover: "#27272a",
|
|
2003
|
+
backgroundActive: "#3f3f46",
|
|
2004
|
+
backgroundFocus: "#18181b",
|
|
2005
|
+
color: "#f4f4f5",
|
|
2006
|
+
colorSecondary: "#a1a1aa",
|
|
2007
|
+
colorMuted: "#71717a",
|
|
2008
|
+
colorDisabled: "#52525b",
|
|
2009
|
+
placeholderColor: "#71717a",
|
|
2010
|
+
borderColor: "#27272a",
|
|
2011
|
+
borderColorHover: "#3f3f46",
|
|
2012
|
+
borderColorFocus: "#fafafa",
|
|
2013
|
+
borderColorMuted: "rgba(39, 39, 42, 0.6)",
|
|
2014
|
+
primary: "#fafafa",
|
|
2015
|
+
primaryColor: "#121212",
|
|
2016
|
+
primaryHover: "#e4e4e7",
|
|
2017
|
+
primaryActive: "#d4d4d8",
|
|
2018
|
+
secondary: "#18181b",
|
|
2019
|
+
focusRing: "rgba(250, 250, 250, 0.25)",
|
|
2020
|
+
"focus-ring": "rgba(250, 250, 250, 0.25)",
|
|
2021
|
+
sidebarBg: "#121212",
|
|
2022
|
+
sidebarText: "#f4f4f5",
|
|
2023
|
+
sidebarTextMuted: "#a1a1aa",
|
|
2024
|
+
sidebarHover: "#18181b",
|
|
2025
|
+
sidebarSearchBg: "#18181b",
|
|
2026
|
+
sidebarItemActiveBg: "#27272a",
|
|
2027
|
+
"sidebar-bg": "#121212",
|
|
2028
|
+
"sidebar-text": "#f4f4f5",
|
|
2029
|
+
"sidebar-text-muted": "#a1a1aa",
|
|
2030
|
+
"sidebar-hover": "#18181b",
|
|
2031
|
+
"sidebar-search-bg": "#18181b",
|
|
2032
|
+
"sidebar-item-active-bg": "#27272a",
|
|
2033
|
+
success: "#34d399",
|
|
2034
|
+
successBackground: "rgba(16, 185, 129, 0.15)",
|
|
2035
|
+
warning: "#fbbf24",
|
|
2036
|
+
warningBackground: "rgba(245, 158, 11, 0.15)",
|
|
2037
|
+
error: "#f87171",
|
|
2038
|
+
errorBackground: "rgba(239, 68, 68, 0.15)",
|
|
2039
|
+
info: "#38bdf8",
|
|
2040
|
+
infoBackground: "rgba(2, 132, 199, 0.15)",
|
|
2041
|
+
shadowColor: "rgba(0, 0, 0, 0.8)",
|
|
2042
|
+
shadowColorHover: "rgba(0, 0, 0, 0.95)"
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
};
|
|
1848
2046
|
//#endregion
|
|
1849
|
-
export {
|
|
2047
|
+
export { ye as Avatar, B as Button, V as Card, ce as DatePicker, _e as Drawer, L as Heading, K as Icon, H as Input, re as LocaleSwitcher, Fe as MProvider, O as MStack, N as MText, ge as Modal, F as Paragraph, U as Popover, G as Portal, me as PortalHost, pe as PortalProvider, W as Select, be as Separator, ie as Skeleton, te as StateBadge, E as ThemeProvider, Se as ThemeToggle, ue as Toast, de as ToastContainer, k as XStack, A as YStack, j as ZStack, Q as buildMThemeConfig, q as colors, Ie as frappePreset, Oe as generateMDesignConfig, Pe as mThemeConfig, Y as spacing, J as typography, D as useTheme };
|
|
1850
2048
|
|
|
1851
2049
|
//# sourceMappingURL=index.js.map
|