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