@definable/ui 0.1.31 → 0.1.32

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.
@@ -1,45 +1,45 @@
1
- import { jsxs as t, Fragment as j, jsx as e } from "react/jsx-runtime";
2
- import { useState as f, useRef as S, useCallback as i } from "react";
3
- import { Button as h } from "./button.js";
1
+ import { jsxs as o, Fragment as j, jsx as e } from "react/jsx-runtime";
2
+ import { useState as h, useRef as S, useCallback as n } from "react";
3
+ import { Button as f } from "./button.js";
4
4
  import { RotateCw as F, X as O, Upload as U } from "lucide-react";
5
5
  import { ImageCropperModal as A } from "./image-cropper-modal.js";
6
6
  import { cn as E } from "../lib/utils.js";
7
7
  function Y({
8
8
  value: c,
9
9
  onChange: a,
10
- size: n = 120,
10
+ size: i = 120,
11
11
  className: g,
12
12
  placeholder: b = "Upload Image",
13
13
  title: v = "Crop Your Image",
14
14
  outputSize: x = 200
15
15
  }) {
16
- const [C, d] = f(!1), [N, s] = f(null), l = S(null), w = i((r) => {
17
- var m;
18
- const o = (m = r.target.files) == null ? void 0 : m[0];
19
- if (o) {
16
+ const [C, m] = h(!1), [N, s] = h(null), l = S(null), w = n((r) => {
17
+ var d;
18
+ const t = (d = r.target.files) == null ? void 0 : d[0];
19
+ if (t) {
20
20
  const p = new FileReader();
21
- p.onload = (R) => {
21
+ p.onload = (k) => {
22
22
  var u;
23
- const M = (u = R.target) == null ? void 0 : u.result;
24
- s(M), d(!0);
25
- }, p.readAsDataURL(o);
23
+ const M = (u = k.target) == null ? void 0 : u.result;
24
+ s(M), m(!0);
25
+ }, p.readAsDataURL(t);
26
26
  }
27
27
  r.target.value = "";
28
- }, []), y = i((r) => {
28
+ }, []), y = n((r) => {
29
29
  a(r), s(null);
30
- }, [a]), k = i(() => {
31
- d(!1), s(null), l.current && (l.current.value = "");
32
- }, []), I = i(() => {
30
+ }, [a]), I = n(() => {
31
+ m(!1), s(null), l.current && (l.current.value = "");
32
+ }, []), R = n(() => {
33
33
  a(null);
34
34
  }, [a]);
35
- return /* @__PURE__ */ t(j, { children: [
36
- /* @__PURE__ */ t("div", { className: E("space-y-3", g), children: [
37
- c ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-3", children: [
35
+ return /* @__PURE__ */ o(j, { children: [
36
+ /* @__PURE__ */ o("div", { className: E("space-y-3", g), children: [
37
+ c ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-3", children: [
38
38
  /* @__PURE__ */ e(
39
39
  "div",
40
40
  {
41
- className: "rounded-full border-2 border-border/50 overflow-hidden bg-background",
42
- style: { width: n, height: n },
41
+ className: "rounded-full border-2 border-light overflow-hidden bg-secondary",
42
+ style: { width: i, height: i },
43
43
  children: /* @__PURE__ */ e(
44
44
  "img",
45
45
  {
@@ -50,15 +50,15 @@ function Y({
50
50
  )
51
51
  }
52
52
  ),
53
- /* @__PURE__ */ t("div", { className: "flex gap-2", children: [
54
- /* @__PURE__ */ t(
55
- h,
53
+ /* @__PURE__ */ o("div", { className: "flex gap-2", children: [
54
+ /* @__PURE__ */ o(
55
+ f,
56
56
  {
57
57
  variant: "outline",
58
58
  size: "sm",
59
59
  onClick: (r) => {
60
- var o;
61
- r.stopPropagation(), (o = l.current) == null || o.click();
60
+ var t;
61
+ r.stopPropagation(), (t = l.current) == null || t.click();
62
62
  },
63
63
  children: [
64
64
  /* @__PURE__ */ e(F, { className: "h-3 w-3 mr-1" }),
@@ -66,12 +66,12 @@ function Y({
66
66
  ]
67
67
  }
68
68
  ),
69
- /* @__PURE__ */ t(
70
- h,
69
+ /* @__PURE__ */ o(
70
+ f,
71
71
  {
72
72
  variant: "outline",
73
73
  size: "sm",
74
- onClick: I,
74
+ onClick: R,
75
75
  children: [
76
76
  /* @__PURE__ */ e(O, { className: "h-3 w-3 mr-1" }),
77
77
  "Remove"
@@ -79,20 +79,20 @@ function Y({
79
79
  }
80
80
  )
81
81
  ] })
82
- ] }) : /* @__PURE__ */ t(
82
+ ] }) : /* @__PURE__ */ o(
83
83
  "button",
84
84
  {
85
85
  onClick: (r) => {
86
- var o;
87
- r.stopPropagation(), (o = l.current) == null || o.click();
86
+ var t;
87
+ r.stopPropagation(), (t = l.current) == null || t.click();
88
88
  },
89
- className: "w-full border-2 border-dashed border-border/50 rounded-lg p-6 hover:border-primary/50 hover:bg-primary/2 transition-colors group",
89
+ className: "w-full border-2 border-dashed border-light rounded-lg p-6 hover:border-primary/50 hover:bg-primary/2 transition-colors group",
90
90
  children: [
91
91
  /* @__PURE__ */ e(
92
92
  "div",
93
93
  {
94
94
  className: "mx-auto rounded-full bg-primary/10 flex items-center justify-center group-hover:bg-primary/15 transition-colors mb-3",
95
- style: { width: Math.min(n / 2, 60), height: Math.min(n / 2, 60) },
95
+ style: { width: Math.min(i / 2, 60), height: Math.min(i / 2, 60) },
96
96
  children: /* @__PURE__ */ e(U, { className: "h-6 w-6 text-primary" })
97
97
  }
98
98
  ),
@@ -116,7 +116,7 @@ function Y({
116
116
  A,
117
117
  {
118
118
  isOpen: C,
119
- onClose: k,
119
+ onClose: I,
120
120
  imageSrc: N,
121
121
  onCrop: y,
122
122
  title: v,
@@ -7,7 +7,7 @@ const l = n.forwardRef(
7
7
  {
8
8
  type: o,
9
9
  className: a(
10
- "h-10 w-full rounded-lg border-2 border-border bg-background px-4 py-2 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground focus:border-primary disabled:cursor-not-allowed disabled:opacity-50",
10
+ "h-10 w-full rounded-lg border-2 border-light bg-secondary px-4 py-2 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground focus:border-primary disabled:cursor-not-allowed disabled:opacity-50",
11
11
  r
12
12
  ),
13
13
  ref: t,
@@ -39,7 +39,7 @@ function h({
39
39
  },
40
40
  i
41
41
  )) });
42
- return s ? /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-background flex items-center justify-center z-[9999]", children: /* @__PURE__ */ r(
42
+ return s ? /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-secondary flex items-center justify-center z-[9999]", children: /* @__PURE__ */ r(
43
43
  a.div,
44
44
  {
45
45
  className: "text-center",
@@ -30,55 +30,55 @@ function I({
30
30
  onClose: i,
31
31
  title: d,
32
32
  description: a,
33
- icon: n,
34
- children: h,
35
- footer: s,
33
+ icon: s,
34
+ children: x,
35
+ footer: n,
36
36
  size: g = "md",
37
37
  showClose: w = !0,
38
38
  className: f,
39
- isContentScrollable: b = !0,
40
- mainClassName: v,
41
- contentClassName: y,
39
+ isContentScrollable: v = !0,
40
+ mainClassName: y,
41
+ contentClassName: N,
42
42
  header: c,
43
- headerClassName: N,
43
+ headerClassName: b,
44
44
  zIndexClassName: k = "z-[50]",
45
45
  mobileSheet: m
46
46
  }) {
47
47
  if (m != null && m.enable && r && window.innerWidth < 768) {
48
- const { position: x } = m;
48
+ const { position: h } = m;
49
49
  return /* @__PURE__ */ e(
50
50
  L,
51
51
  {
52
52
  isOpen: r,
53
53
  onClose: i,
54
- header: c || (d || a || n ? /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
55
- n && /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-lg flex items-center justify-center", children: n }),
54
+ header: c || (d || a || s ? /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
55
+ s && /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-lg flex items-center justify-center", children: s }),
56
56
  /* @__PURE__ */ t("div", { children: [
57
57
  d && /* @__PURE__ */ e("h2", { className: "text-sm font-medium", children: d }),
58
58
  a && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: a })
59
59
  ] })
60
60
  ] }) : void 0),
61
- footer: /* @__PURE__ */ e("div", { className: "flex gap-2 justify-end", children: s }),
61
+ footer: /* @__PURE__ */ e("div", { className: "flex gap-2 justify-end", children: n }),
62
62
  className: l(f, "w-full max-w-full"),
63
- position: x || "bottom",
64
- headerClassName: l(N, "w-full max-w-full"),
63
+ position: h || "bottom",
64
+ headerClassName: l(b, "w-full max-w-full"),
65
65
  enableFullscreen: !1,
66
- children: h
66
+ children: x
67
67
  }
68
68
  );
69
69
  }
70
- const u = F((x) => {
71
- x.key === "Escape" && r && i();
70
+ const u = F((h) => {
71
+ h.key === "Escape" && r && i();
72
72
  }, [r, i]);
73
73
  H(() => (document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u)), [u]);
74
- const o = d || a || n || c, j = /* @__PURE__ */ e(E, { children: r && /* @__PURE__ */ e("div", { className: l("fixed inset-0 z-50 overflow-hidden", k), children: /* @__PURE__ */ t("div", { className: l("min-h-full flex items-center justify-center p-4", v), children: [
74
+ const o = d || a || s || c, j = /* @__PURE__ */ e(E, { children: r && /* @__PURE__ */ e("div", { className: l("fixed inset-0 z-50 overflow-hidden", k), children: /* @__PURE__ */ t("div", { className: l("min-h-full flex items-center justify-center p-4", y), children: [
75
75
  /* @__PURE__ */ e(
76
76
  p.div,
77
77
  {
78
78
  initial: { opacity: 0 },
79
79
  animate: { opacity: 1 },
80
80
  exit: { opacity: 0 },
81
- className: "fixed inset-0 bg-background/80 backdrop-blur-sm",
81
+ className: "fixed inset-0 bg-secondary/80 backdrop-blur-sm",
82
82
  onClick: i
83
83
  }
84
84
  ),
@@ -90,14 +90,14 @@ function I({
90
90
  exit: { opacity: 0, scale: 0.95 },
91
91
  transition: { duration: 0.1, ease: "easeOut" },
92
92
  className: l(
93
- "relative transform rounded-lg bg-background shadow-xl border border-border/50 flex flex-col max-h-[85vh] overflow-hidden",
93
+ "relative transform rounded-lg bg-secondary shadow-xl border border-light flex flex-col max-h-[85vh] overflow-hidden",
94
94
  f
95
95
  ),
96
96
  style: P(g),
97
97
  children: [
98
- o && /* @__PURE__ */ t("div", { className: "flex-shrink-0 rounded-t-lg bg-card flex items-center justify-between p-2 border-b border-border/50", children: [
98
+ o && /* @__PURE__ */ t("div", { className: "flex-shrink-0 rounded-t-lg bg-card flex items-center justify-between p-2 border-b border-light", children: [
99
99
  c || /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
100
- n && /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-lg flex items-center justify-center", children: n }),
100
+ s && /* @__PURE__ */ e("div", { className: "h-8 w-8 rounded-lg flex items-center justify-center", children: s }),
101
101
  /* @__PURE__ */ t("div", { children: [
102
102
  d && /* @__PURE__ */ e("h2", { className: "text-sm font-small", children: d }),
103
103
  a && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: a })
@@ -117,13 +117,13 @@ function I({
117
117
  ] }),
118
118
  /* @__PURE__ */ e("div", { className: l(
119
119
  "flex-1 min-h-0",
120
- b ? "overflow-y-auto" : "",
121
- !s && !o ? "rounded-lg" : "",
122
- !s && o ? "rounded-b-lg" : "",
123
- s && !o ? "rounded-t-lg" : "",
124
- y
125
- ), children: h }),
126
- s && /* @__PURE__ */ e("div", { className: "flex-shrink-0 flex items-center justify-end gap-2 px-4 py-3 border-t border-border/50 bg-card rounded-b-lg", children: s })
120
+ v ? "overflow-y-auto" : "",
121
+ !n && !o ? "rounded-lg" : "",
122
+ !n && o ? "rounded-b-lg" : "",
123
+ n && !o ? "rounded-t-lg" : "",
124
+ N
125
+ ), children: x }),
126
+ n && /* @__PURE__ */ e("div", { className: "flex-shrink-0 flex items-center justify-end gap-2 px-4 py-3 border-t border-light bg-card rounded-b-lg", children: n })
127
127
  ]
128
128
  }
129
129
  )
@@ -28,7 +28,7 @@ function E({
28
28
  "div",
29
29
  {
30
30
  className: l("cursor-pointer select-none", g),
31
- children: f || /* @__PURE__ */ t("div", { className: "flex items-center justify-between p-3.5 bg-muted/20 hover:bg-muted/30 active:scale-[0.98] rounded-xl border border-border/40 transition-all group", children: [
31
+ children: f || /* @__PURE__ */ t("div", { className: "flex items-center justify-between p-3.5 bg-muted/20 hover:bg-muted/30 active:scale-[0.98] rounded-xl border border-light transition-all group", children: [
32
32
  /* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5 text-left", children: [
33
33
  /* @__PURE__ */ e("span", { className: "text-[10px] font-black uppercase tracking-[0.2em] text-muted-foreground/45", children: n }),
34
34
  /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
@@ -45,7 +45,7 @@ function E({
45
45
  ) }),
46
46
  /* @__PURE__ */ t(P, { children: [
47
47
  /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(V, { children: n }) }),
48
- /* @__PURE__ */ e("div", { className: "px-6 pt-0 space-y-5 pb-10", children: /* @__PURE__ */ t("div", { className: "relative h-[220px] bg-card/60 dark:bg-muted/10 rounded-[32px] overflow-hidden border border-border/10 shadow-sm", children: [
48
+ /* @__PURE__ */ e("div", { className: "px-6 pt-0 space-y-5 pb-10", children: /* @__PURE__ */ t("div", { className: "relative h-[220px] bg-card dark:bg-muted/10 rounded-[32px] overflow-hidden border border-light shadow-sm", children: [
49
49
  /* @__PURE__ */ e("div", { className: "absolute left-4 right-4 top-1/2 -translate-y-1/2 h-[56px] bg-primary/[0.04] dark:bg-primary/10 border-y border-primary/10 rounded-2xl pointer-events-none z-10" }),
50
50
  /* @__PURE__ */ e(
51
51
  i,
@@ -9,7 +9,7 @@ const I = e.Root, E = e.Group, L = e.Value, R = a.forwardRef(({ className: o, ch
9
9
  {
10
10
  ref: n,
11
11
  className: i(
12
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
12
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-secondary px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
13
13
  o
14
14
  ),
15
15
  ...r,
@@ -21,7 +21,7 @@ const I = e.Root, E = e.Group, L = e.Value, R = a.forwardRef(({ className: o, ch
21
21
  ));
22
22
  R.displayName = e.Trigger.displayName;
23
23
  const g = a.forwardRef(({ className: o, children: s, position: r = "popper", searchable: n, onSearch: m, searchPlaceholder: p = "Search...", ...f }, d) => {
24
- const [b, y] = a.useState(""), u = a.useRef(null);
24
+ const [y, b] = a.useState(""), u = a.useRef(null);
25
25
  a.useEffect(() => {
26
26
  n && u.current && setTimeout(() => {
27
27
  var l;
@@ -29,7 +29,7 @@ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", sea
29
29
  }, 50);
30
30
  }, [n]);
31
31
  const w = (l) => {
32
- y(l.target.value), m && m(l.target.value);
32
+ b(l.target.value), m && m(l.target.value);
33
33
  }, h = (l) => {
34
34
  l.stopPropagation();
35
35
  }, x = (l) => {
@@ -58,7 +58,7 @@ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", sea
58
58
  C,
59
59
  {
60
60
  ref: u,
61
- value: b,
61
+ value: y,
62
62
  onChange: w,
63
63
  onClick: h,
64
64
  onKeyDown: x,
@@ -17,7 +17,7 @@ function w({
17
17
  initial: { y: 100, opacity: 0 },
18
18
  animate: { y: 0, opacity: 1 },
19
19
  exit: { y: 100, opacity: 0 },
20
- className: "fixed bottom-4 left-1/2 -translate-x-1/2 w-fit bg-background rounded-lg border shadow-lg z-50",
20
+ className: "fixed bottom-4 left-1/2 -translate-x-1/2 w-fit bg-secondary rounded-lg border shadow-lg z-50",
21
21
  children: /* @__PURE__ */ i("div", { className: "flex items-center gap-6 px-4 py-2", children: [
22
22
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-sm font-medium", children: [
23
23
  /* @__PURE__ */ e("span", { className: "bg-primary text-primary-foreground w-8 h-8 rounded-lg flex items-center justify-center", children: l }),
@@ -1,26 +1,26 @@
1
1
  import { jsxs as l, jsx as t, Fragment as R } from "react/jsx-runtime";
2
2
  import { Minimize2 as B, Maximize2 as I, X as M } from "lucide-react";
3
- import { Button as b } from "./button.js";
3
+ import { Button as y } from "./button.js";
4
4
  import { useState as X, useRef as q, useEffect as m } from "react";
5
5
  import { cn as u } from "../lib/utils.js";
6
- import { AnimatePresence as D, motion as y } from "framer-motion";
6
+ import { AnimatePresence as D, motion as g } from "framer-motion";
7
7
  import { createPortal as G } from "react-dom";
8
8
  let a = [];
9
9
  function W({
10
10
  isOpen: i,
11
11
  onClose: s,
12
- children: g,
12
+ children: b,
13
13
  header: v,
14
14
  footer: f,
15
15
  className: N,
16
- enableFullscreen: k = !0,
16
+ enableFullscreen: w = !0,
17
17
  position: c = "right",
18
- headerClassName: w = "",
18
+ headerClassName: k = "",
19
19
  disableOutsideClose: h = !1
20
20
  }) {
21
- const [n, P] = X(!1), r = q(null);
22
- if (m(() => (i ? a.push(r) : a = a.filter((e) => e !== r), () => {
23
- a = a.filter((e) => e !== r);
21
+ const [r, P] = X(!1), n = q(null);
22
+ if (m(() => (i ? a.push(n) : a = a.filter((e) => e !== n), () => {
23
+ a = a.filter((e) => e !== n);
24
24
  }), [i]), m(() => {
25
25
  const e = (o) => {
26
26
  var p;
@@ -28,14 +28,14 @@ function W({
28
28
  const A = a.some(
29
29
  (x) => x.current && x.current.contains(o.target)
30
30
  ), F = (p = o.target) == null ? void 0 : p.closest("[data-sheet-close]");
31
- !A && !F && r.current && !r.current.contains(o.target) && s();
31
+ !A && !F && n.current && !n.current.contains(o.target) && s();
32
32
  };
33
- return i && !n && document.addEventListener("mousedown", e), () => {
33
+ return i && !r && document.addEventListener("mousedown", e), () => {
34
34
  document.removeEventListener("mousedown", e);
35
35
  };
36
- }, [i, n, h]), m(() => {
36
+ }, [i, r, h]), m(() => {
37
37
  const e = (o) => {
38
- o.key === "Escape" && i && a[a.length - 1] === r && s();
38
+ o.key === "Escape" && i && a[a.length - 1] === n && s();
39
39
  };
40
40
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
41
41
  }, [i]), !i) return null;
@@ -43,25 +43,25 @@ function W({
43
43
  e.stopPropagation(), s();
44
44
  }, z = /* @__PURE__ */ l("div", { className: "flex flex-col h-full", children: [
45
45
  /* @__PURE__ */ l("div", { className: u(
46
- "flex items-center bg-card justify-between py-4 px-4 h-header border-b border-border/50",
47
- w
46
+ "flex items-center bg-card justify-between py-4 px-4 h-header border-b border-light",
47
+ k
48
48
  ), children: [
49
49
  /* @__PURE__ */ t("div", { className: "text-sm font-medium", children: v }),
50
50
  /* @__PURE__ */ l("div", { className: "flex items-center gap-1 ml-auto", children: [
51
- k && /* @__PURE__ */ t(
52
- b,
51
+ w && /* @__PURE__ */ t(
52
+ y,
53
53
  {
54
54
  variant: "ghost",
55
55
  size: "icon",
56
56
  className: "h-7 w-7",
57
57
  onClick: (e) => {
58
- e.stopPropagation(), P(!n);
58
+ e.stopPropagation(), P(!r);
59
59
  },
60
- children: n ? /* @__PURE__ */ t(B, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(I, { className: "h-3.5 w-3.5" })
60
+ children: r ? /* @__PURE__ */ t(B, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(I, { className: "h-3.5 w-3.5" })
61
61
  }
62
62
  ),
63
63
  /* @__PURE__ */ t(
64
- b,
64
+ y,
65
65
  {
66
66
  variant: "ghost",
67
67
  size: "icon",
@@ -73,8 +73,8 @@ function W({
73
73
  )
74
74
  ] })
75
75
  ] }),
76
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: g }),
77
- f && /* @__PURE__ */ t("div", { className: "border-t border-border/50 bg-card py-2 px-3", children: /* @__PURE__ */ t("div", { className: "text-sm", children: f }) })
76
+ /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: b }),
77
+ f && /* @__PURE__ */ t("div", { className: "border-t border-light bg-card py-2 px-3", children: /* @__PURE__ */ t("div", { className: "text-sm", children: f }) })
78
78
  ] }), C = () => c === "left" ? {
79
79
  initial: { x: -100, opacity: 0 },
80
80
  animate: { x: 0, opacity: 1 },
@@ -87,9 +87,9 @@ function W({
87
87
  initial: { x: 100, opacity: 0 },
88
88
  animate: { x: 0, opacity: 1 },
89
89
  exit: { x: 100, opacity: 0 }
90
- }, L = () => n ? "inset-4 rounded-lg" : c === "left" ? "inset-y-0 left-0 border-r" : c === "bottom" ? "inset-x-0 bottom-0 border-t" : "inset-y-0 right-0 border-l", d = C(), S = L(), j = /* @__PURE__ */ t(D, { children: i && /* @__PURE__ */ l(R, { children: [
90
+ }, L = () => r ? "inset-4 rounded-lg" : c === "left" ? "inset-y-0 left-0 border-r" : c === "bottom" ? "inset-x-0 bottom-0 border-t" : "inset-y-0 right-0 border-l", d = C(), S = L(), j = /* @__PURE__ */ t(D, { children: i && /* @__PURE__ */ l(R, { children: [
91
91
  /* @__PURE__ */ t(
92
- y.div,
92
+ g.div,
93
93
  {
94
94
  initial: { opacity: 0 },
95
95
  animate: { opacity: 1 },
@@ -98,15 +98,15 @@ function W({
98
98
  e.stopPropagation(), s();
99
99
  },
100
100
  className: u(
101
- "fixed inset-0 z-[100] bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
102
- n ? "block" : "hidden"
101
+ "fixed inset-0 z-[100] bg-secondary/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
102
+ r ? "block" : "hidden"
103
103
  )
104
104
  }
105
105
  ),
106
106
  /* @__PURE__ */ t(
107
- y.div,
107
+ g.div,
108
108
  {
109
- ref: r,
109
+ ref: n,
110
110
  initial: d.initial,
111
111
  animate: d.animate,
112
112
  exit: d.exit,
@@ -115,7 +115,7 @@ function W({
115
115
  ease: [0.32, 0.72, 0, 1]
116
116
  },
117
117
  className: u(
118
- "fixed z-[100] bg-background shadow-lg flex flex-col border-border/50",
118
+ "fixed z-[100] bg-secondary shadow-lg flex flex-col border-light",
119
119
  S,
120
120
  N
121
121
  ),
@@ -1,13 +1,13 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
3
  import * as e from "@radix-ui/react-slider";
4
4
  import { cn as n } from "../lib/utils.js";
5
- const c = t.forwardRef(({ className: l, ...o }, a) => {
5
+ const c = t.forwardRef(({ className: l, ...o }, s) => {
6
6
  var i;
7
- return /* @__PURE__ */ s(
7
+ return /* @__PURE__ */ a(
8
8
  e.Root,
9
9
  {
10
- ref: a,
10
+ ref: s,
11
11
  className: n(
12
12
  "relative flex w-full touch-none select-none items-center",
13
13
  l
@@ -21,7 +21,7 @@ const c = t.forwardRef(({ className: l, ...o }, a) => {
21
21
  style: { width: `${(((i = o.value) == null ? void 0 : i[0]) || 0) * 100}%` }
22
22
  }
23
23
  ) }),
24
- /* @__PURE__ */ r(e.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:scale-110 active:scale-90" })
24
+ /* @__PURE__ */ r(e.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-secondary shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:scale-110 active:scale-90" })
25
25
  ]
26
26
  }
27
27
  );
@@ -15,7 +15,7 @@ const c = t.forwardRef(({ className: r, ...o }, s) => /* @__PURE__ */ i(
15
15
  children: /* @__PURE__ */ i(e.Thumb, { asChild: !0, children: /* @__PURE__ */ i(
16
16
  n.div,
17
17
  {
18
- className: "block h-4 w-4 rounded-full bg-background shadow-lg ring-0",
18
+ className: "block h-4 w-4 rounded-full bg-secondary shadow-lg ring-0",
19
19
  initial: !1,
20
20
  animate: {
21
21
  x: o.checked ? 16 : 0
@@ -1,8 +1,8 @@
1
- import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
- import { cn as c } from "../lib/utils.js";
3
- import { Checkbox as v } from "./checkbox.js";
4
- import { Tooltip as b } from "./tooltip.js";
5
- import { useState as g } from "react";
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { cn as p } from "../lib/utils.js";
3
+ import { Checkbox as g } from "./checkbox.js";
4
+ import { Tooltip as v } from "./tooltip.js";
5
+ import { useState as b } from "react";
6
6
  import { ChevronRight as x } from "lucide-react";
7
7
  function V({
8
8
  data: n,
@@ -11,67 +11,67 @@ function V({
11
11
  onRowClick: t,
12
12
  selectedItems: i,
13
13
  onSelect: l,
14
- isLoading: h = !1,
14
+ isLoading: c = !1,
15
15
  loadingRows: u = 3
16
16
  }) {
17
- const [f, p] = g(null);
18
- return h ? /* @__PURE__ */ r("div", { className: "space-y-4", children: Array(u).fill(0).map((a, s) => /* @__PURE__ */ d(
17
+ const [f, h] = b(null);
18
+ return c ? /* @__PURE__ */ e("div", { className: "space-y-4", children: Array(u).fill(0).map((a, s) => /* @__PURE__ */ d(
19
19
  "div",
20
20
  {
21
- className: "border border-border/50 rounded-xl p-4 space-y-4 shadow-sm bg-card/30 animate-pulse",
21
+ className: "border border-light rounded-xl p-4 space-y-4 shadow-sm bg-card animate-pulse",
22
22
  children: [
23
23
  /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
24
- /* @__PURE__ */ r("div", { className: "h-5 bg-muted/70 rounded-md w-2/5" }),
25
- m && /* @__PURE__ */ r("div", { className: "h-4 w-4 rounded-md bg-muted/50" })
24
+ /* @__PURE__ */ e("div", { className: "h-5 bg-muted/70 rounded-md w-2/5" }),
25
+ m && /* @__PURE__ */ e("div", { className: "h-4 w-4 rounded-md bg-muted/50" })
26
26
  ] }),
27
- /* @__PURE__ */ r("div", { className: "space-y-3 pt-2", children: o.slice(0, 4).map((e, N) => /* @__PURE__ */ d("div", { className: "flex items-start gap-3", children: [
28
- /* @__PURE__ */ r("div", { className: "h-4 bg-muted/40 rounded-md w-1/4" }),
29
- /* @__PURE__ */ r("div", { className: "h-4 bg-muted/60 rounded-md", style: { width: Math.random() * 50 + 30 + "%" } })
30
- ] }, `skeleton-col-${e.id}`)) })
27
+ /* @__PURE__ */ e("div", { className: "space-y-3 pt-2", children: o.slice(0, 4).map((r, N) => /* @__PURE__ */ d("div", { className: "flex items-start gap-3", children: [
28
+ /* @__PURE__ */ e("div", { className: "h-4 bg-muted/40 rounded-md w-1/4" }),
29
+ /* @__PURE__ */ e("div", { className: "h-4 bg-muted/60 rounded-md", style: { width: Math.random() * 50 + 30 + "%" } })
30
+ ] }, `skeleton-col-${r.id}`)) })
31
31
  ]
32
32
  },
33
33
  `skeleton-${s}`
34
- )) }) : n.length === 0 ? null : /* @__PURE__ */ r("div", { className: "space-y-4", children: n.map((a, s) => /* @__PURE__ */ d(
34
+ )) }) : n.length === 0 ? null : /* @__PURE__ */ e("div", { className: "space-y-4", children: n.map((a, s) => /* @__PURE__ */ d(
35
35
  "div",
36
36
  {
37
- className: c(
38
- "border border-border/40 rounded-xl overflow-hidden bg-card/30 shadow-sm transition-all duration-200",
39
- t && "cursor-pointer hover:border-primary/30 hover:shadow-md hover:bg-card/50"
37
+ className: p(
38
+ "border border-light/40 rounded-xl overflow-hidden bg-card shadow-sm transition-all duration-200",
39
+ t && "cursor-pointer hover:border-primary/30 hover:shadow-md hover:bg-card"
40
40
  ),
41
41
  onClick: () => t == null ? void 0 : t(a),
42
42
  children: [
43
- /* @__PURE__ */ d("div", { className: "flex items-center justify-between p-4 border-b border-border/30 bg-muted/5", children: [
44
- /* @__PURE__ */ r("div", { className: "font-medium", children: o[0].cell(a) || `Item ${s + 1}` }),
43
+ /* @__PURE__ */ d("div", { className: "flex items-center justify-between p-4 border-b border-light bg-muted/5", children: [
44
+ /* @__PURE__ */ e("div", { className: "font-medium", children: o[0].cell(a) || `Item ${s + 1}` }),
45
45
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
46
- m && /* @__PURE__ */ r(
47
- v,
46
+ m && /* @__PURE__ */ e(
47
+ g,
48
48
  {
49
49
  checked: i == null ? void 0 : i.has(a.id),
50
- onClick: (e) => {
51
- e.stopPropagation(), l == null || l(a.id, !(i != null && i.has(a.id)));
50
+ onClick: (r) => {
51
+ r.stopPropagation(), l == null || l(a.id, !(i != null && i.has(a.id)));
52
52
  },
53
53
  className: "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"
54
54
  }
55
55
  ),
56
- t && /* @__PURE__ */ r(x, { className: "h-4 w-4 text-muted-foreground/50" })
56
+ t && /* @__PURE__ */ e(x, { className: "h-4 w-4 text-muted-foreground/50" })
57
57
  ] })
58
58
  ] }),
59
- /* @__PURE__ */ r("div", { className: "px-4 py-3 space-y-3", children: o.slice(1).map((e) => /* @__PURE__ */ d(
59
+ /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-3", children: o.slice(1).map((r) => /* @__PURE__ */ d(
60
60
  "div",
61
61
  {
62
62
  className: "flex items-start gap-3 text-sm group",
63
- onMouseEnter: () => e.tooltipValue && p(`${s}-${e.id}`),
64
- onMouseLeave: () => p(null),
63
+ onMouseEnter: () => r.tooltipValue && h(`${s}-${r.id}`),
64
+ onMouseLeave: () => h(null),
65
65
  children: [
66
- /* @__PURE__ */ r("div", { className: "font-medium text-muted-foreground w-1/3 min-w-[80px] text-xs uppercase tracking-wide pt-0.5", children: e.header }),
67
- /* @__PURE__ */ r("div", { className: c(
66
+ /* @__PURE__ */ e("div", { className: "font-medium text-muted-foreground w-1/3 min-w-[80px] text-xs uppercase tracking-wide pt-0.5", children: r.header }),
67
+ /* @__PURE__ */ e("div", { className: p(
68
68
  "flex-1 min-w-0 text-foreground/90 group-hover:text-foreground transition-colors",
69
- e.truncate && "truncate"
70
- ), children: e.cell(a) }),
71
- e.tooltipValue && f === `${s}-${e.id}` && /* @__PURE__ */ r(
72
- b,
69
+ r.truncate && "truncate"
70
+ ), children: r.cell(a) }),
71
+ r.tooltipValue && f === `${s}-${r.id}` && /* @__PURE__ */ e(
72
+ v,
73
73
  {
74
- content: e.tooltipValue(a),
74
+ content: r.tooltipValue(a),
75
75
  side: "bottom",
76
76
  align: "start",
77
77
  isVisible: !0
@@ -79,7 +79,7 @@ function V({
79
79
  )
80
80
  ]
81
81
  },
82
- e.id
82
+ r.id
83
83
  )) })
84
84
  ]
85
85
  },