@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/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 ee } from "react-i18next";
5
- import { ScrollView as _ } from "@tamagui/scroll-view";
6
- import v from "react-dom";
7
- import { Image as y } from "@tamagui/image";
8
- import * as b from "@tamagui/lucide-icons-2";
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 x = t(null), S = "framework-m-theme";
11
- function C() {
12
- let e = localStorage.getItem(S);
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 w(e) {
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 T({ children: e, defaultTheme: t }) {
20
- let [n, i] = o(t || C);
19
+ function E({ children: e, defaultTheme: t }) {
20
+ let [n, i] = o(t || w);
21
21
  r(() => {
22
- w(n);
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(S) || i(e.matches ? "dark" : "light");
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(S, e), w(e);
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(x.Provider, {
40
+ return /* @__PURE__ */ c(S.Provider, {
41
41
  value: s,
42
42
  children: e
43
43
  });
44
44
  }
45
- function E() {
46
- let e = n(x);
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 D = g(f, {
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
- }), O = g(f, {
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
- }), k = g(f, {
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
- }), A = g(f, {
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
- }), j = g(d, {
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
- }), M = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(j, {
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
- })), N = g(d, {
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
- }), P = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(N, {
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
- })), F = g(d, {
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
- }), I = e.forwardRef(({ textAlign: e, style: t, ...n }, r) => /* @__PURE__ */ c(F, {
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
- })), L = {
160
+ })), R = {
161
161
  draft: {
162
- bg: "#e0e0e0",
163
- text: "#333"
162
+ bg: "$backgroundActive",
163
+ text: "$colorMuted"
164
164
  },
165
165
  pending: {
166
- bg: "#fff3cd",
167
- text: "#856404"
166
+ bg: "$warningBackground",
167
+ text: "$warning"
168
168
  },
169
169
  submitted: {
170
- bg: "#cce5ff",
171
- text: "#004085"
170
+ bg: "$infoBackground",
171
+ text: "$info"
172
172
  },
173
173
  approved: {
174
- bg: "#d4edda",
175
- text: "#155724"
174
+ bg: "$successBackground",
175
+ text: "$success"
176
176
  },
177
177
  rejected: {
178
- bg: "#f8d7da",
179
- text: "#721c24"
178
+ bg: "$errorBackground",
179
+ text: "$error"
180
180
  },
181
181
  cancelled: {
182
- bg: "#f5f5f5",
183
- text: "#666"
182
+ bg: "$backgroundActive",
183
+ text: "$colorMuted"
184
184
  },
185
185
  completed: {
186
- bg: "#d4edda",
187
- text: "#155724"
186
+ bg: "$successBackground",
187
+ text: "$success"
188
188
  },
189
189
  on_hold: {
190
- bg: "#fff3cd",
191
- text: "#856404"
190
+ bg: "$warningBackground",
191
+ text: "$warning"
192
192
  },
193
193
  default: {
194
- bg: "#e9ecef",
195
- text: "#495057"
194
+ bg: "$backgroundActive",
195
+ text: "$colorMuted"
196
196
  }
197
197
  };
198
- function te(e) {
199
- return L[e.toLowerCase().replace(/\s+/g, "_")] ?? L.default;
198
+ function ee(e) {
199
+ return R[e.toLowerCase().replace(/\s+/g, "_")] ?? R.default;
200
200
  }
201
- function R({ state: e, docstatus: t, className: n, style: r }) {
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 = te(i);
205
- return /* @__PURE__ */ c(M, {
204
+ let a = ee(i);
205
+ return /* @__PURE__ */ c(N, {
206
206
  className: n,
207
- style: {
208
- display: "inline-flex",
209
- padding: "0.25rem 0.75rem",
210
- borderRadius: "9999px",
211
- fontSize: "0.75rem",
212
- fontWeight: 500,
213
- textTransform: "capitalize",
214
- backgroundColor: a.bg,
215
- color: a.text,
216
- ...r
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 z({ language: e, onChangeLanguage: t, locales: n = ne, placement: r }) {
254
- return /* @__PURE__ */ l(O, {
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(M, {
258
+ children: [/* @__PURE__ */ c(N, {
260
259
  size: "$sm",
261
260
  style: { lineHeight: 1 },
262
- children: /* @__PURE__ */ c(Y, {
261
+ children: /* @__PURE__ */ c(K, {
263
262
  name: "globe",
264
263
  size: 15
265
264
  })
266
- }), /* @__PURE__ */ c(K, {
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 B = g(f, {
280
+ var z = g(f, {
282
281
  name: "Skeleton",
283
- backgroundColor: "$colorBgTertiary",
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
- }), re = ({ count: e = 1, className: t = "", ...n }) => {
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(B, {
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(B, {
323
+ }) : /* @__PURE__ */ c(z, {
325
324
  className: r,
326
325
  "aria-busy": !0,
327
326
  "aria-label": "Loading",
328
327
  ...n
329
328
  });
330
- }, ie = g(f, {
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
- }), ae = (e) => typeof e == "string" || typeof e == "number", V = e.forwardRef(({ children: t, variant: n = "default", size: r = "md", loading: i, disabled: a, tag: o = "button", ...s }, l) => {
418
- let u = ie, d = s.color || (n === "primary" || n === "danger" ? "$white" : "$color"), f = (e, t) => /* @__PURE__ */ c(M, {
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) => ae(e) ? f(e, t) : e);
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(), 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(), m ? m(e) : h && h(e)), g && g(e));
435
449
  },
436
- ...s,
437
450
  children: p
438
451
  });
439
- }), H = g(f, {
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
- }), oe = g("input", {
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
- }), U = e.forwardRef(({ onChange: e, onChangeText: t, value: n, textAlign: r, style: i, ...a }, o) => {
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(oe, {
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
- U.displayName = "Input";
552
+ H.displayName = "Input";
540
553
  //#endregion
541
554
  //#region src/components/Popover.tsx
542
- function W({ trigger: e, content: t, placement: n = "bottom-start", open: i, onOpenChange: s }) {
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(k, {
573
+ }, [g]), /* @__PURE__ */ l(A, {
561
574
  position: "relative",
562
575
  ref: g,
563
576
  zIndex: f ? 1e4 : 1,
564
- children: [/* @__PURE__ */ c(O, {
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(A, {
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(H, {
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 G = e.forwardRef(({ value: e, onChange: t, onChangeText: n, type: a = "date", placeholder: s, popoverPlacement: u = "bottom-start", ...d }, p) => {
643
- let { t: m } = ee("ui"), [h, g] = o(!1), [_, v] = o(!1), [y, b] = o(!1), x = a === "datetime-local" || d.field?.format === "date-time" ? "datetime-local" : "date", S = (e) => {
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 x === "date" ? `${n}-${r}-${i}` : `${n}-${r}-${i}T${a}:${o}:${s}`;
646
- }, C = i(() => {
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]), w = i(() => {
664
+ }, [e]), T = i(() => {
651
665
  if (!e) return "";
652
666
  let t = new Date(e);
653
- return isNaN(t.getTime()) ? String(e) : x === "date" ? t.toLocaleDateString() : t.toLocaleString();
654
- }, [e, x]), [T, E] = o(new Date(C)), A = () => {
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
- E(new Date(C));
659
- }, [C]);
660
- let j = (e) => {
661
- let r = S(e);
672
+ D(new Date(w));
673
+ }, [w]);
674
+ let M = (e) => {
675
+ let r = C(e);
662
676
  t?.(r), n?.(r);
663
- }, N = (e) => {
664
- let t = new Date(T);
665
- t.setDate(e), t.setHours(C.getHours()), t.setMinutes(C.getMinutes()), t.setSeconds(C.getSeconds()), j(t), x === "date" && g(!1);
666
- }, P = (e, t, n = 0) => {
667
- let r = new Date(C);
668
- r.setHours(r.getHours() + e), r.setMinutes(r.getMinutes() + t), r.setSeconds(r.getSeconds() + n), j(r);
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
- j(e), E(new Date(e));
675
- }, L = (e, t) => new Date(t, e + 1, 0).getDate(), te = (e, t) => new Date(t, e, 1).getDay(), R = i(() => {
676
- let e = L(T.getMonth(), T.getFullYear()), t = te(T.getMonth(), T.getFullYear()), n = [];
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
- }, [T]), ne = [
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
- ], z = /* @__PURE__ */ l(O, {
707
+ ], re = /* @__PURE__ */ l(k, {
694
708
  alignItems: "center",
695
709
  position: "relative",
696
710
  width: "100%",
697
- children: [/* @__PURE__ */ c(U, {
711
+ children: [/* @__PURE__ */ c(H, {
698
712
  ref: p,
699
- value: w,
713
+ value: T,
700
714
  readOnly: !0,
701
- placeholder: s || m(x === "date" ? "Select Date..." : "Select Date & Time..."),
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), A();
720
+ d.onPressIn?.(e), j();
707
721
  },
708
722
  onClick: (e) => {
709
- d.onClick?.(e), A();
723
+ d.onClick?.(e), j();
710
724
  },
711
725
  onFocus: (e) => {
712
- d.onFocus?.(e), A();
726
+ d.onFocus?.(e), j();
713
727
  },
714
728
  cursor: "pointer"
715
- }), /* @__PURE__ */ c(O, {
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
- }), B = /* @__PURE__ */ l(k, {
774
+ }), z = /* @__PURE__ */ l(A, {
761
775
  width: 304,
762
776
  children: [
763
- /* @__PURE__ */ l(O, {
777
+ /* @__PURE__ */ l(k, {
764
778
  justifyContent: "space-between",
765
779
  alignItems: "center",
766
780
  marginBottom: "$3",
767
781
  children: [
768
- /* @__PURE__ */ c(V, {
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: () => E(new Date(T.setMonth(T.getMonth() - 1))),
776
- children: /* @__PURE__ */ c(M, {
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(O, {
797
+ /* @__PURE__ */ l(k, {
784
798
  alignItems: "center",
785
799
  cursor: "pointer",
786
800
  children: [
787
- /* @__PURE__ */ c(k, {
788
- onDoubleClick: () => b(!0),
789
- children: y ? /* @__PURE__ */ c(U, {
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: T.getMonth() + 1,
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 && E(new Date(T.setMonth(t - 1))), b(!1);
814
+ !isNaN(t) && t > 0 && t <= 12 && D(new Date(E.setMonth(t - 1))), x(!1);
801
815
  }
802
- }) : /* @__PURE__ */ c(M, {
816
+ }) : /* @__PURE__ */ c(N, {
803
817
  fontSize: 12,
804
818
  fontWeight: "700",
805
819
  color: "$primary",
806
- children: ne[T.getMonth()]
820
+ children: ne[E.getMonth()]
807
821
  })
808
822
  }),
809
823
  /* @__PURE__ */ c(f, { width: 12 }),
810
- /* @__PURE__ */ c(k, {
811
- onDoubleClick: () => v(!0),
812
- children: _ ? /* @__PURE__ */ c(U, {
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: T.getFullYear().toString(),
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) || E(new Date(T.setFullYear(t))), v(!1);
837
+ isNaN(t) || D(new Date(E.setFullYear(t))), y(!1);
824
838
  }
825
- }) : /* @__PURE__ */ c(M, {
839
+ }) : /* @__PURE__ */ c(N, {
826
840
  fontWeight: "700",
827
841
  color: "$primary",
828
- children: T.getFullYear()
842
+ children: E.getFullYear()
829
843
  })
830
844
  })
831
845
  ]
832
846
  }),
833
- /* @__PURE__ */ c(V, {
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: () => E(new Date(T.setMonth(T.getMonth() + 1))),
841
- children: /* @__PURE__ */ c(M, {
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(O, {
864
+ /* @__PURE__ */ l(k, {
851
865
  flexWrap: "wrap",
852
866
  gap: 2,
853
867
  marginBottom: "$2",
854
- children: [/* @__PURE__ */ c(O, {
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(D, {
879
+ ].map((e) => /* @__PURE__ */ c(O, {
866
880
  width: 36,
867
881
  alignItems: "center",
868
- children: /* @__PURE__ */ c(M, {
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
- }), R.map((e, t) => {
876
- let n = e === C.getDate() && T.getMonth() === C.getMonth() && T.getFullYear() === C.getFullYear();
877
- return /* @__PURE__ */ c(D, {
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 && N(e),
887
- children: /* @__PURE__ */ c(M, {
888
- color: n ? "#fff" : "$color",
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
- x === "datetime-local" && /* @__PURE__ */ l(k, {
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(O, {
916
+ children: [/* @__PURE__ */ l(k, {
903
917
  justifyContent: "space-around",
904
918
  alignItems: "center",
905
919
  children: [
906
- /* @__PURE__ */ l(k, {
920
+ /* @__PURE__ */ l(A, {
907
921
  alignItems: "center",
908
922
  gap: "$1",
909
923
  children: [
910
- /* @__PURE__ */ c(V, {
924
+ /* @__PURE__ */ c(B, {
911
925
  type: "button",
912
926
  size: "sm",
913
927
  variant: "ghost",
914
928
  padding: 0,
915
- onPress: () => P(1, 0, 0),
916
- children: /* @__PURE__ */ c(M, {
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(U, {
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: (C.getHours() % 12 || 12).toString(),
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(C), n = e.getHours() >= 12;
935
- e.setHours(n ? t + 12 : t), j(e);
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(V, {
953
+ /* @__PURE__ */ c(B, {
940
954
  type: "button",
941
955
  size: "sm",
942
956
  variant: "ghost",
943
957
  padding: 0,
944
- onPress: () => P(-1, 0, 0),
945
- children: /* @__PURE__ */ c(M, {
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(M, {
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(k, {
974
+ /* @__PURE__ */ l(A, {
961
975
  alignItems: "center",
962
976
  gap: "$1",
963
977
  children: [
964
- /* @__PURE__ */ c(V, {
978
+ /* @__PURE__ */ c(B, {
965
979
  type: "button",
966
980
  size: "sm",
967
981
  variant: "ghost",
968
982
  padding: 0,
969
- onPress: () => P(0, 1, 0),
970
- children: /* @__PURE__ */ c(M, {
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(U, {
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: C.getMinutes().toString().padStart(2, "0"),
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(C);
988
- e.setMinutes(t), j(e);
1001
+ let e = new Date(w);
1002
+ e.setMinutes(t), M(e);
989
1003
  }
990
1004
  }
991
1005
  }),
992
- /* @__PURE__ */ c(V, {
1006
+ /* @__PURE__ */ c(B, {
993
1007
  type: "button",
994
1008
  size: "sm",
995
1009
  variant: "ghost",
996
1010
  padding: 0,
997
- onPress: () => P(0, -1, 0),
998
- children: /* @__PURE__ */ c(M, {
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(M, {
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(k, {
1027
+ /* @__PURE__ */ l(A, {
1014
1028
  alignItems: "center",
1015
1029
  gap: "$1",
1016
1030
  children: [
1017
- /* @__PURE__ */ c(V, {
1031
+ /* @__PURE__ */ c(B, {
1018
1032
  type: "button",
1019
1033
  size: "sm",
1020
1034
  variant: "ghost",
1021
1035
  padding: 0,
1022
- onPress: () => P(0, 0, 1),
1023
- children: /* @__PURE__ */ c(M, {
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(U, {
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: C.getSeconds().toString().padStart(2, "0"),
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(C);
1041
- e.setSeconds(t), j(e);
1054
+ let e = new Date(w);
1055
+ e.setSeconds(t), M(e);
1042
1056
  }
1043
1057
  }
1044
1058
  }),
1045
- /* @__PURE__ */ c(V, {
1059
+ /* @__PURE__ */ c(B, {
1046
1060
  type: "button",
1047
1061
  size: "sm",
1048
1062
  variant: "ghost",
1049
1063
  padding: 0,
1050
- onPress: () => P(0, 0, -1),
1051
- children: /* @__PURE__ */ c(M, {
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(k, {
1072
+ /* @__PURE__ */ c(A, {
1059
1073
  justifyContent: "center",
1060
1074
  marginTop: 10,
1061
1075
  position: "relative",
1062
1076
  top: -2,
1063
- children: /* @__PURE__ */ c(V, {
1077
+ children: /* @__PURE__ */ c(B, {
1064
1078
  type: "button",
1065
1079
  size: "sm",
1066
1080
  variant: "primary",
1067
1081
  paddingHorizontal: "$2",
1068
- onPress: F,
1082
+ onPress: I,
1069
1083
  borderRadius: "$2",
1070
1084
  minWidth: 46,
1071
1085
  backgroundColor: "$primary",
1072
- children: /* @__PURE__ */ c(M, {
1086
+ children: /* @__PURE__ */ c(N, {
1073
1087
  fontSize: 10,
1074
1088
  fontWeight: "900",
1075
- color: "#fff",
1076
- children: C.getHours() >= 12 ? "PM" : "AM"
1089
+ color: "$primaryColor",
1090
+ children: w.getHours() >= 12 ? "PM" : "AM"
1077
1091
  })
1078
1092
  })
1079
1093
  })
1080
1094
  ]
1081
- }), /* @__PURE__ */ l(O, {
1095
+ }), /* @__PURE__ */ l(k, {
1082
1096
  marginTop: "$1",
1083
1097
  children: [
1084
- /* @__PURE__ */ c(V, {
1098
+ /* @__PURE__ */ c(B, {
1085
1099
  type: "button",
1086
1100
  variant: "default",
1087
1101
  size: "sm",
1088
- onPress: I,
1102
+ onPress: L,
1089
1103
  flex: 1,
1090
1104
  children: m("Now")
1091
1105
  }),
1092
1106
  /* @__PURE__ */ c(f, { width: 8 }),
1093
- /* @__PURE__ */ c(V, {
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(k, {
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(W, {
1111
- trigger: z,
1112
- content: B,
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
- G.displayName = "DatePicker";
1133
+ ce.displayName = "DatePicker";
1120
1134
  //#endregion
1121
1135
  //#region src/components/Select.tsx
1122
- var K = e.forwardRef(({ error: t, size: n = "md", value: r, onChange: i, onValueChange: a, options: s, placeholder: u, disabled: d, name: f, color: p, onBlur: m, onFocus: h, placement: g, backgroundColor: v, borderWidth: y, borderColor: b, borderRadius: x, paddingHorizontal: S, ...C }, w) => {
1123
- let { t: T } = ee("ui"), E = s.find((e) => e.value === r), D = E ? E.label : u || "Select an option...", [O, A] = o(!1), j = (e) => {
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
- } }), A(!1);
1128
- }, M = /* @__PURE__ */ l(V, {
1129
- ref: w,
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: y ?? 1,
1137
- borderColor: t ? "$error" : b ?? "$borderColor",
1138
- backgroundColor: v ?? "$backgroundSecondary",
1139
- borderRadius: x ?? "$round",
1140
- paddingHorizontal: S,
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(P, {
1157
+ children: [/* @__PURE__ */ c(F, {
1144
1158
  fontSize: n === "sm" ? "$xs" : "$sm",
1145
- color: E ? "$color" : "$colorMuted",
1159
+ color: D ? "$color" : "$colorMuted",
1146
1160
  numberOfLines: 1,
1147
1161
  flex: 1,
1148
1162
  overflow: "hidden",
1149
- children: D
1150
- }), /* @__PURE__ */ c(k, {
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
- }), [N, F] = o(""), I = s.filter((e) => e.label.toLowerCase().includes(N.toLowerCase())), L = /* @__PURE__ */ l(k, { children: [s.length > 5 && /* @__PURE__ */ c(k, {
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(U, {
1178
+ children: /* @__PURE__ */ c(H, {
1165
1179
  size: "sm",
1166
- placeholder: T("search", { defaultValue: "Search..." }),
1167
- value: N,
1168
- onChangeText: F,
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(k, {
1187
+ children: /* @__PURE__ */ l(A, {
1174
1188
  gap: "$xs",
1175
1189
  padding: "$xs",
1176
1190
  children: [
1177
- u && /* @__PURE__ */ c(V, {
1191
+ u && /* @__PURE__ */ c(B, {
1178
1192
  variant: "ghost",
1179
1193
  size: "sm",
1180
1194
  justifyContent: "flex-start",
1181
- onPress: () => j(""),
1182
- children: /* @__PURE__ */ c(P, {
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
- I.length === 0 && /* @__PURE__ */ c(P, {
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: T("no_options_found", { defaultValue: "No options found" })
1207
+ children: E("no_options_found", { defaultValue: "No options found" })
1194
1208
  }),
1195
- I.map((e) => /* @__PURE__ */ c(V, {
1209
+ L.map((e) => /* @__PURE__ */ c(B, {
1196
1210
  variant: "ghost",
1197
1211
  size: "sm",
1198
1212
  justifyContent: "flex-start",
1199
- onPress: () => j(e.value),
1200
- backgroundColor: e.value === r ? "$primary1" : "transparent",
1201
- children: /* @__PURE__ */ c(P, {
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
- O || F("");
1211
- }, [O]), /* @__PURE__ */ c(k, {
1224
+ k || I("");
1225
+ }, [k]), /* @__PURE__ */ c(A, {
1212
1226
  position: "relative",
1213
- width: C.width || "100%",
1214
- minWidth: C.minWidth,
1215
- ...C,
1216
- children: /* @__PURE__ */ c(W, {
1217
- trigger: M,
1218
- content: L,
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: O,
1221
- onOpenChange: A
1234
+ open: k,
1235
+ onOpenChange: j
1222
1236
  })
1223
1237
  });
1224
1238
  });
1225
- K.displayName = "Select";
1239
+ W.displayName = "Select";
1226
1240
  //#endregion
1227
1241
  //#region src/components/Toast.tsx
1228
- var se = {
1242
+ var le = {
1229
1243
  success: "✓",
1230
1244
  error: "✕",
1231
1245
  warning: "⚠",
1232
1246
  info: "ℹ"
1233
1247
  };
1234
- function q({ message: e, variant: t = "info", duration: n = 4e3, onDismiss: i }) {
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(k, {
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(O, {
1270
+ children: /* @__PURE__ */ l(k, {
1257
1271
  alignItems: "center",
1258
1272
  gap: "$sm",
1259
1273
  children: [
1260
- /* @__PURE__ */ c(M, {
1274
+ /* @__PURE__ */ c(N, {
1261
1275
  fontWeight: "600",
1262
- children: se[t]
1276
+ children: le[t]
1263
1277
  }),
1264
- /* @__PURE__ */ c(M, {
1278
+ /* @__PURE__ */ c(N, {
1265
1279
  flex: 1,
1266
1280
  children: e
1267
1281
  }),
1268
- i && /* @__PURE__ */ c(V, {
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 ce({ toasts: e, onDismiss: t }) {
1280
- return /* @__PURE__ */ c(k, {
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(k, {
1302
+ children: e.map((e) => /* @__PURE__ */ c(A, {
1289
1303
  pointerEvents: "auto",
1290
- children: /* @__PURE__ */ c(q, {
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 le = t(null), ue = ({ children: e }) => {
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(le.Provider, {
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(de, { portals: t })]
1331
+ children: [e, /* @__PURE__ */ c(me, { portals: t })]
1318
1332
  });
1319
- }, de = ({ portals: t }) => typeof document < "u" ? null : /* @__PURE__ */ c(s, { children: Array.from(t.entries()).map(([t, n]) => /* @__PURE__ */ c(e.Fragment, { children: n }, t)) }), J = ({ children: e }) => {
1320
- let t = n(le), [i] = o(() => Math.random().toString(36).substr(2, 9));
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), v.createPortal(e, t);
1347
+ return t.className !== n && (t.className = n), y.createPortal(e, t);
1334
1348
  }
1335
1349
  /* v8 ignore next */
1336
1350
  return null;
1337
- }, fe = {
1351
+ }, he = {
1338
1352
  sm: 400,
1339
1353
  md: 600,
1340
1354
  lg: 900,
1341
1355
  xl: 1200
1342
- }, pe = ({ isOpen: e, onClose: t, title: n, footer: r, size: i = "md", children: a }) => e ? /* @__PURE__ */ c(J, { children: /* @__PURE__ */ l(A, {
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(k, {
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: "rgba(0,0,0,0.6)",
1373
+ backgroundColor: "$shadowColor",
1360
1374
  onPress: t,
1361
1375
  zIndex: 10
1362
- }), /* @__PURE__ */ l(H, {
1363
- width: fe[i],
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(O, {
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(M, {
1396
+ children: [/* @__PURE__ */ c(N, {
1383
1397
  fontWeight: "700",
1384
1398
  size: "lg",
1385
1399
  children: n
1386
- }), /* @__PURE__ */ c(V, {
1400
+ }), /* @__PURE__ */ c(B, {
1387
1401
  size: "sm",
1388
1402
  variant: "ghost",
1389
1403
  onPress: t,
1390
1404
  padding: "$2",
1391
- children: /* @__PURE__ */ c(M, { children: "✕" })
1405
+ children: /* @__PURE__ */ c(N, { children: "✕" })
1392
1406
  })]
1393
1407
  }),
1394
- /* @__PURE__ */ c(k, {
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(O, {
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 me({ isOpen: e, onClose: t, title: n, width: r = 420, children: i, footer: a }) {
1416
- return e ? /* @__PURE__ */ c(J, { children: /* @__PURE__ */ l(A, {
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(k, {
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: "rgba(0,0,0,0.45)",
1445
+ backgroundColor: "$shadowColor",
1432
1446
  onPress: t,
1433
1447
  zIndex: 10
1434
- }), /* @__PURE__ */ l(H, {
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 rgba(0,0,0,0.18)",
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(O, {
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(M, {
1478
+ children: [/* @__PURE__ */ c(N, {
1465
1479
  fontWeight: "700",
1466
1480
  size: "$md",
1467
1481
  children: n
1468
- }), /* @__PURE__ */ c(V, {
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(k, {
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(O, {
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 he = {
1510
+ var ve = {
1497
1511
  $sm: 24,
1498
1512
  $md: 32,
1499
1513
  $lg: 40,
1500
1514
  $xl: 48
1501
1515
  };
1502
- function ge({ src: e, fallback: t, size: n = "$md", circular: r = !0, borderWidth: i, borderColor: a }) {
1503
- let [s, l] = o(!1), u = typeof n == "number" ? n : he[n] || 32;
1504
- return /* @__PURE__ */ c(k, {
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(y, {
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(M, {
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 _e({ vertical: e }) {
1534
- return /* @__PURE__ */ c(k, {
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 ve(e) {
1556
+ function xe(e) {
1543
1557
  return e.replace(/[-_](.)/g, (e, t) => t.toUpperCase()).replace(/^(.)/, (e) => e.toUpperCase());
1544
1558
  }
1545
- function Y({ name: e, size: t, color: n, strokeWidth: r, ...i }) {
1546
- let a = ve(e), o = a in b ? b[a] : b.Box;
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 ye() {
1557
- let { theme: e, toggleTheme: t } = E();
1558
- return /* @__PURE__ */ c(V, {
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(Y, {
1577
+ children: /* @__PURE__ */ c(K, {
1564
1578
  name: e === "light" ? "moon" : "sun",
1565
1579
  size: 20
1566
1580
  })
1567
1581
  });
1568
1582
  }
1569
- var X = {
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
- }, Z = {
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
- }, Q = {
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 be() {
1716
+ function Ce() {
1703
1717
  return {
1704
- primary: X.semantic.light.primary,
1705
- secondary: X.semantic.light.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 xe() {
1725
+ function we() {
1712
1726
  let e = {};
1713
- return Object.entries(Z.fontSize).forEach(([t, n]) => {
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 Se(e) {
1719
- let t = X.semantic[e];
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 Ce() {
1757
+ function Ee() {
1743
1758
  let e = {};
1744
- return Object.entries(Q.spacing).forEach(([t, n]) => {
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 we() {
1764
+ function De() {
1750
1765
  let e = {};
1751
- return Object.entries(Q.borderRadius).forEach(([t, n]) => {
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 Te() {
1771
+ function Oe() {
1757
1772
  return {
1758
1773
  tokens: {
1759
- color: be(),
1760
- space: Ce(),
1761
- size: xe(),
1762
- radius: we(),
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: Se("light"),
1772
- dark: Se("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
- var $ = Te(), Ee = h({
1779
- color: $.tokens.color,
1780
- space: $.tokens.space,
1781
- size: $.tokens.size,
1782
- radius: $.tokens.radius,
1783
- zIndex: $.tokens.zIndex
1784
- }), De = p({
1785
- family: Z.fontFamily.sans,
1786
- size: $.tokens.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
- }), Oe = p({
1802
- family: Z.fontFamily.sans,
1803
- size: $.tokens.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
- }), ke = m({
1815
- tokens: Ee,
1816
- themes: $.themes,
1817
- fonts: {
1818
- heading: De,
1819
- body: Oe
1820
- },
1821
- defaultTheme: "light",
1822
- media: {
1823
- xs: { maxWidth: 659 },
1824
- sm: { maxWidth: 800 },
1825
- md: { maxWidth: 1024 },
1826
- lg: { maxWidth: 1280 },
1827
- xl: { maxWidth: 1420 },
1828
- gtXs: { minWidth: 660 },
1829
- gtSm: { minWidth: 801 },
1830
- gtMd: { minWidth: 1025 },
1831
- gtLg: { minWidth: 1281 },
1832
- short: { maxHeight: 820 },
1833
- tall: { minHeight: 821 },
1834
- hoverNone: { hover: "none" },
1835
- pointerCoarse: { pointer: "coarse" }
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 Ae({ children: e }) {
1841
- let { theme: t } = E();
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: ke,
1844
- defaultTheme: t,
1845
- children: /* @__PURE__ */ c(ue, { children: e })
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
- export { ge as Avatar, V as Button, H as Card, G as DatePicker, me as Drawer, I as Heading, Y as Icon, U as Input, z as LocaleSwitcher, Ae as MProvider, D as MStack, M as MText, pe as Modal, P as Paragraph, W as Popover, J as Portal, de as PortalHost, ue as PortalProvider, K as Select, _e as Separator, re as Skeleton, R as StateBadge, T as ThemeProvider, ye as ThemeToggle, q as Toast, ce as ToastContainer, O as XStack, k as YStack, A as ZStack, X as colors, Te as generateMDesignConfig, ke as mThemeConfig, Q as spacing, Z as typography, E as useTheme };
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