@definable/ui 0.1.32 → 0.1.36

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.
Files changed (51) hide show
  1. package/dist/components/alert-dialog.js +15 -15
  2. package/dist/components/alert.js +21 -21
  3. package/dist/components/avatar.js +7 -7
  4. package/dist/components/badge.js +10 -10
  5. package/dist/components/button.d.ts +1 -1
  6. package/dist/components/button.js +20 -18
  7. package/dist/components/calendar.js +26 -26
  8. package/dist/components/card.js +14 -14
  9. package/dist/components/carousel.js +39 -39
  10. package/dist/components/checkbox.js +7 -7
  11. package/dist/components/collapse.js +17 -17
  12. package/dist/components/command-menu.js +30 -30
  13. package/dist/components/command.js +52 -52
  14. package/dist/components/confirmation-modal.js +23 -23
  15. package/dist/components/context-menu.js +30 -30
  16. package/dist/components/dialog.js +32 -32
  17. package/dist/components/drawer.js +6 -6
  18. package/dist/components/dropdown-menu.js +16 -16
  19. package/dist/components/image-cropper-modal.js +27 -27
  20. package/dist/components/image-cropper.js +27 -27
  21. package/dist/components/input.js +9 -9
  22. package/dist/components/loader.js +3 -3
  23. package/dist/components/loading-placeholder.js +4 -4
  24. package/dist/components/mention.js +18 -18
  25. package/dist/components/modal.js +39 -39
  26. package/dist/components/picker.js +30 -30
  27. package/dist/components/popover.js +7 -7
  28. package/dist/components/progress.js +13 -13
  29. package/dist/components/radio-group.js +19 -19
  30. package/dist/components/scroll-area.js +20 -20
  31. package/dist/components/select.js +25 -25
  32. package/dist/components/selection-bar.js +17 -17
  33. package/dist/components/separator.js +8 -8
  34. package/dist/components/skeleton.js +8 -8
  35. package/dist/components/slider.js +11 -11
  36. package/dist/components/stepper.js +1 -1
  37. package/dist/components/switch.js +8 -8
  38. package/dist/components/table-empty.js +6 -6
  39. package/dist/components/table-mobile.js +45 -45
  40. package/dist/components/table.js +66 -66
  41. package/dist/components/tabs.js +16 -16
  42. package/dist/components/textarea.js +4 -4
  43. package/dist/components/use-toast.js +9 -9
  44. package/dist/icons/icons.d.ts +2 -0
  45. package/dist/icons/providers/byteplus.d.ts +2 -0
  46. package/dist/icons/providers/index.d.ts +2 -0
  47. package/dist/icons/providers/kling.d.ts +2 -0
  48. package/dist/index.js +285 -218
  49. package/dist/{stepper-modal-JXpOXOV2.js → stepper-modal-Bh6gsg8o.js} +79 -79
  50. package/dist/styles.css +1 -1
  51. package/package.json +1 -1
@@ -2,14 +2,14 @@ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
3
  import * as e from "@radix-ui/react-select";
4
4
  import { ChevronDown as N, Search as S, Check as v } from "lucide-react";
5
- import { cn as i } from "../lib/utils.js";
5
+ import { cn as d } from "../lib/utils.js";
6
6
  import { Input as C } from "./input.js";
7
7
  const I = e.Root, E = e.Group, L = e.Value, R = a.forwardRef(({ className: o, children: s, ...r }, n) => /* @__PURE__ */ c(
8
8
  e.Trigger,
9
9
  {
10
10
  ref: n,
11
- className: i(
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",
11
+ className: d(
12
+ "flex h-10 w-full items-center justify-between rounded-md border border-light bg-secondary px-3 py-2 text-sm ring-offset-white dark:ring-offset-[#1F1F20] placeholder:text-tertiary focus:outline-none focus:ring-2 focus:ring-black/20 dark:focus:ring-white/20 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
13
13
  o
14
14
  ),
15
15
  ...r,
@@ -20,7 +20,7 @@ const I = e.Root, E = e.Group, L = e.Value, R = a.forwardRef(({ className: o, ch
20
20
  }
21
21
  ));
22
22
  R.displayName = e.Trigger.displayName;
23
- const g = a.forwardRef(({ className: o, children: s, position: r = "popper", searchable: n, onSearch: m, searchPlaceholder: p = "Search...", ...f }, d) => {
23
+ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", searchable: n, onSearch: m, searchPlaceholder: f = "Search...", ...p }, i) => {
24
24
  const [y, b] = a.useState(""), u = a.useRef(null);
25
25
  a.useEffect(() => {
26
26
  n && u.current && setTimeout(() => {
@@ -38,22 +38,22 @@ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", sea
38
38
  return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ c(
39
39
  e.Content,
40
40
  {
41
- ref: d,
42
- className: i(
43
- "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
41
+ ref: i,
42
+ className: d(
43
+ "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-card text-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
44
44
  r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
45
45
  o
46
46
  ),
47
47
  position: r,
48
- ...f,
48
+ ...p,
49
49
  children: [
50
50
  n && /* @__PURE__ */ t(
51
51
  "div",
52
52
  {
53
- className: "px-2 py-1.5 sticky top-0 bg-popover z-10 border-b",
53
+ className: "px-2 py-1.5 sticky top-0 bg-card z-10 border-b",
54
54
  onClick: h,
55
55
  children: /* @__PURE__ */ c("div", { className: "relative", children: [
56
- /* @__PURE__ */ t(S, { className: "absolute left-2 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground" }),
56
+ /* @__PURE__ */ t(S, { className: "absolute left-2 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-tertiary" }),
57
57
  /* @__PURE__ */ t(
58
58
  C,
59
59
  {
@@ -62,7 +62,7 @@ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", sea
62
62
  onChange: w,
63
63
  onClick: h,
64
64
  onKeyDown: x,
65
- placeholder: p,
65
+ placeholder: f,
66
66
  className: "h-7 text-xs pl-7"
67
67
  }
68
68
  )
@@ -72,7 +72,7 @@ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", sea
72
72
  /* @__PURE__ */ t(
73
73
  e.Viewport,
74
74
  {
75
- className: i(
75
+ className: d(
76
76
  "p-1",
77
77
  r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
78
78
  ),
@@ -84,21 +84,21 @@ const g = a.forwardRef(({ className: o, children: s, position: r = "popper", sea
84
84
  ) });
85
85
  });
86
86
  g.displayName = e.Content.displayName;
87
- const V = a.forwardRef(({ className: o, ...s }, r) => /* @__PURE__ */ t(
87
+ const k = a.forwardRef(({ className: o, ...s }, r) => /* @__PURE__ */ t(
88
88
  e.Label,
89
89
  {
90
90
  ref: r,
91
- className: i("py-1.5 pl-8 pr-2 text-sm font-semibold", o),
91
+ className: d("py-1.5 pl-8 pr-2 text-sm font-semibold", o),
92
92
  ...s
93
93
  }
94
94
  ));
95
- V.displayName = e.Label.displayName;
96
- const k = a.forwardRef(({ className: o, children: s, ...r }, n) => /* @__PURE__ */ c(
95
+ k.displayName = e.Label.displayName;
96
+ const V = a.forwardRef(({ className: o, children: s, ...r }, n) => /* @__PURE__ */ c(
97
97
  e.Item,
98
98
  {
99
99
  ref: n,
100
- className: i(
101
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
100
+ className: d(
101
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-hover focus:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
102
102
  o
103
103
  ),
104
104
  ...r,
@@ -108,14 +108,14 @@ const k = a.forwardRef(({ className: o, children: s, ...r }, n) => /* @__PURE__
108
108
  ]
109
109
  }
110
110
  ));
111
- k.displayName = e.Item.displayName;
111
+ V.displayName = e.Item.displayName;
112
112
  const T = a.forwardRef(({ children: o, searchPlaceholder: s, ...r }, n) => {
113
- const [m, p] = a.useState(""), f = a.Children.map(o, (d) => a.isValidElement(d) && d.type === g ? a.cloneElement(d, {
113
+ const [m, f] = a.useState(""), p = a.Children.map(o, (i) => a.isValidElement(i) && i.type === g ? a.cloneElement(i, {
114
114
  searchable: !0,
115
- onSearch: p,
115
+ onSearch: f,
116
116
  searchPlaceholder: s
117
- }) : d);
118
- return /* @__PURE__ */ t(I, { ...r, children: f });
117
+ }) : i);
118
+ return /* @__PURE__ */ t(I, { ...r, children: p });
119
119
  });
120
120
  T.displayName = "SearchableSelect";
121
121
  export {
@@ -123,8 +123,8 @@ export {
123
123
  I as Select,
124
124
  g as SelectContent,
125
125
  E as SelectGroup,
126
- k as SelectItem,
127
- V as SelectLabel,
126
+ V as SelectItem,
127
+ k as SelectLabel,
128
128
  R as SelectTrigger,
129
129
  L as SelectValue
130
130
  };
@@ -1,13 +1,13 @@
1
1
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import { AnimatePresence as o, motion as d } from "framer-motion";
3
- import { Check as h, X as p, Download as g, Trash as x } from "lucide-react";
4
- import { Button as r } from "./button.js";
5
- function w({
6
- selectedCount: l,
3
+ import { Check as h, X as g, Download as p, Trash as x } from "lucide-react";
4
+ import { Button as t } from "./button.js";
5
+ function y({
6
+ selectedCount: c,
7
7
  onEnable: a,
8
8
  onDisable: s,
9
- onDelete: t,
10
- onDownload: c,
9
+ onDelete: r,
10
+ onDownload: l,
11
11
  onCancel: m,
12
12
  show: n
13
13
  }) {
@@ -20,34 +20,34 @@ function w({
20
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
- /* @__PURE__ */ e("span", { className: "bg-primary text-primary-foreground w-8 h-8 rounded-lg flex items-center justify-center", children: l }),
23
+ /* @__PURE__ */ e("span", { className: "bg-primary text-white w-8 h-8 rounded-lg flex items-center justify-center", children: c }),
24
24
  "Selected"
25
25
  ] }),
26
- /* @__PURE__ */ e("div", { className: "h-4 w-px bg-border" }),
26
+ /* @__PURE__ */ e("div", { className: "h-4 w-px bg-light" }),
27
27
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
28
- a && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", onClick: a, children: [
28
+ a && /* @__PURE__ */ i(t, { variant: "ghost", size: "sm", onClick: a, children: [
29
29
  /* @__PURE__ */ e(h, { className: "mr-2 h-4 w-4" }),
30
30
  "Enable"
31
31
  ] }),
32
- s && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", onClick: s, children: [
33
- /* @__PURE__ */ e(p, { className: "mr-2 h-4 w-4" }),
32
+ s && /* @__PURE__ */ i(t, { variant: "ghost", size: "sm", onClick: s, children: [
33
+ /* @__PURE__ */ e(g, { className: "mr-2 h-4 w-4" }),
34
34
  "Disable"
35
35
  ] }),
36
- c && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", onClick: c, children: [
37
- /* @__PURE__ */ e(g, { className: "mr-2 h-4 w-4" }),
36
+ l && /* @__PURE__ */ i(t, { variant: "ghost", size: "sm", onClick: l, children: [
37
+ /* @__PURE__ */ e(p, { className: "mr-2 h-4 w-4" }),
38
38
  "Download"
39
39
  ] }),
40
- t && /* @__PURE__ */ i(r, { variant: "ghost", size: "sm", className: "text-destructive", onClick: t, children: [
40
+ r && /* @__PURE__ */ i(t, { variant: "ghost", size: "sm", className: "text-red-500", onClick: r, children: [
41
41
  /* @__PURE__ */ e(x, { className: "mr-2 h-4 w-4" }),
42
42
  "Delete"
43
43
  ] })
44
44
  ] }),
45
- /* @__PURE__ */ e("div", { className: "h-4 w-px bg-border" }),
46
- /* @__PURE__ */ e(r, { variant: "ghost", size: "sm", onClick: m, children: "Cancel" })
45
+ /* @__PURE__ */ e("div", { className: "h-4 w-px bg-light" }),
46
+ /* @__PURE__ */ e(t, { variant: "ghost", size: "sm", onClick: m, children: "Cancel" })
47
47
  ] })
48
48
  }
49
49
  ) });
50
50
  }
51
51
  export {
52
- w as SelectionBar
52
+ y as SelectionBar
53
53
  };
@@ -1,16 +1,16 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import * as i from "react";
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import * as l from "react";
3
3
  import * as o from "@radix-ui/react-separator";
4
- import { cn as l } from "../lib/utils.js";
5
- const s = i.forwardRef(
6
- ({ className: a, orientation: r = "horizontal", decorative: t = !0, ...m }, p) => /* @__PURE__ */ e(
4
+ import { cn as e } from "../lib/utils.js";
5
+ const s = l.forwardRef(
6
+ ({ className: a, orientation: r = "horizontal", decorative: t = !0, ...m }, i) => /* @__PURE__ */ p(
7
7
  o.Root,
8
8
  {
9
- ref: p,
9
+ ref: i,
10
10
  decorative: t,
11
11
  orientation: r,
12
- className: l(
13
- "shrink-0 bg-border",
12
+ className: e(
13
+ "shrink-0 bg-light dark:bg-dark",
14
14
  r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
15
15
  a
16
16
  ),
@@ -1,17 +1,17 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { cn as r } from "../lib/utils.js";
3
- function d({
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cn as m } from "../lib/utils.js";
3
+ function i({
4
4
  className: e,
5
- ...m
5
+ ...o
6
6
  }) {
7
- return /* @__PURE__ */ o(
7
+ return /* @__PURE__ */ r(
8
8
  "div",
9
9
  {
10
- className: r("animate-pulse rounded-md bg-muted/60", e),
11
- ...m
10
+ className: m("animate-pulse rounded-md bg-hover/60", e),
11
+ ...o
12
12
  }
13
13
  );
14
14
  }
15
15
  export {
16
- d as Skeleton
16
+ i as Skeleton
17
17
  };
@@ -1,32 +1,32 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as i } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
3
  import * as e from "@radix-ui/react-slider";
4
- import { cn as n } from "../lib/utils.js";
5
- const c = t.forwardRef(({ className: l, ...o }, s) => {
6
- var i;
4
+ import { cn as c } from "../lib/utils.js";
5
+ const n = t.forwardRef(({ className: l, ...r }, s) => {
6
+ var o;
7
7
  return /* @__PURE__ */ a(
8
8
  e.Root,
9
9
  {
10
10
  ref: s,
11
- className: n(
11
+ className: c(
12
12
  "relative flex w-full touch-none select-none items-center",
13
13
  l
14
14
  ),
15
- ...o,
15
+ ...r,
16
16
  children: [
17
- /* @__PURE__ */ r(e.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ r(
17
+ /* @__PURE__ */ i(e.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ i(
18
18
  "div",
19
19
  {
20
20
  className: "absolute h-full bg-primary",
21
- style: { width: `${(((i = o.value) == null ? void 0 : i[0]) || 0) * 100}%` }
21
+ style: { width: `${(((o = r.value) == null ? void 0 : o[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-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" })
24
+ /* @__PURE__ */ i(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-black/20 dark:focus-visible:ring-white/20 disabled:pointer-events-none disabled:opacity-50 hover:scale-110 active:scale-90" })
25
25
  ]
26
26
  }
27
27
  );
28
28
  });
29
- c.displayName = e.Root.displayName;
29
+ n.displayName = e.Root.displayName;
30
30
  export {
31
- c as Slider
31
+ n as Slider
32
32
  };
@@ -1,4 +1,4 @@
1
- import { a as p, S as t, b as o } from "../stepper-modal-JXpOXOV2.js";
1
+ import { a as p, S as t, b as o } from "../stepper-modal-Bh6gsg8o.js";
2
2
  export {
3
3
  p as StepLayout,
4
4
  t as Stepper,
@@ -3,22 +3,22 @@ import * as t from "react";
3
3
  import * as e from "@radix-ui/react-switch";
4
4
  import { cn as a } from "../lib/utils.js";
5
5
  import { motion as n } from "framer-motion";
6
- const c = t.forwardRef(({ className: r, ...o }, s) => /* @__PURE__ */ i(
6
+ const l = t.forwardRef(({ className: o, ...r }, s) => /* @__PURE__ */ i(
7
7
  e.Root,
8
8
  {
9
9
  className: a(
10
- "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
11
- r
10
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black/20 dark:focus-visible:ring-white/20 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-[#1F1F20] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[var(--text-primary)] data-[state=unchecked]:bg-[var(--border-input)]",
11
+ o
12
12
  ),
13
- ...o,
13
+ ...r,
14
14
  ref: s,
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-secondary shadow-lg ring-0",
18
+ className: "block h-4 w-4 rounded-full bg-[var(--bg-card)] shadow-lg ring-0",
19
19
  initial: !1,
20
20
  animate: {
21
- x: o.checked ? 16 : 0
21
+ x: r.checked ? 16 : 0
22
22
  },
23
23
  transition: {
24
24
  type: "spring",
@@ -29,7 +29,7 @@ const c = t.forwardRef(({ className: r, ...o }, s) => /* @__PURE__ */ i(
29
29
  ) })
30
30
  }
31
31
  ));
32
- c.displayName = e.Root.displayName;
32
+ l.displayName = e.Root.displayName;
33
33
  export {
34
- c as Switch
34
+ l as Switch
35
35
  };
@@ -1,20 +1,20 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { FolderOpen as m } from "lucide-react";
3
- import { Button as i } from "./button.js";
2
+ import { FolderOpen as l } from "lucide-react";
3
+ import { Button as m } from "./button.js";
4
4
  function x({
5
5
  title: a = "No data available",
6
6
  description: s = "Get started by creating your first record.",
7
7
  actionLabel: c = "Create New",
8
8
  onAction: t,
9
- icon: l = /* @__PURE__ */ e(m, { className: "w-10 h-10 text-muted-foreground" })
9
+ icon: i = /* @__PURE__ */ e(l, { className: "w-10 h-10 text-tertiary" })
10
10
  }) {
11
11
  return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12 px-4", children: /* @__PURE__ */ r("div", { className: "space-y-5 text-center", children: [
12
- /* @__PURE__ */ e("div", { className: "flex justify-center", children: l }),
12
+ /* @__PURE__ */ e("div", { className: "flex justify-center", children: i }),
13
13
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
14
14
  /* @__PURE__ */ e("h3", { className: "text-lg font-medium", children: a }),
15
- /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground max-w-sm mx-auto", children: s })
15
+ /* @__PURE__ */ e("p", { className: "text-sm text-tertiary max-w-sm mx-auto", children: s })
16
16
  ] }),
17
- t && /* @__PURE__ */ e(i, { onClick: t, children: c })
17
+ t && /* @__PURE__ */ e(m, { onClick: t, children: c })
18
18
  ] }) });
19
19
  }
20
20
  export {
@@ -1,77 +1,77 @@
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";
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { cn as c } from "../lib/utils.js";
3
+ import { Checkbox as u } from "./checkbox.js";
4
+ import { Tooltip as f } from "./tooltip.js";
5
+ import { useState as g } from "react";
6
6
  import { ChevronRight as x } from "lucide-react";
7
7
  function V({
8
- data: n,
9
- columns: o,
10
- showCheckbox: m = !0,
8
+ data: h,
9
+ columns: l,
10
+ showCheckbox: n = !0,
11
11
  onRowClick: t,
12
- selectedItems: i,
13
- onSelect: l,
14
- isLoading: c = !1,
15
- loadingRows: u = 3
12
+ selectedItems: d,
13
+ onSelect: o,
14
+ isLoading: m = !1,
15
+ loadingRows: v = 3
16
16
  }) {
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(
17
+ const [b, p] = g(null);
18
+ return m ? /* @__PURE__ */ r("div", { className: "space-y-4", children: Array(v).fill(0).map((a, s) => /* @__PURE__ */ i(
19
19
  "div",
20
20
  {
21
21
  className: "border border-light rounded-xl p-4 space-y-4 shadow-sm bg-card animate-pulse",
22
22
  children: [
23
- /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
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" })
23
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
24
+ /* @__PURE__ */ r("div", { className: "h-5 bg-hover/70 rounded-md w-2/5" }),
25
+ n && /* @__PURE__ */ r("div", { className: "h-4 w-4 rounded-md bg-hover/50" })
26
26
  ] }),
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}`)) })
27
+ /* @__PURE__ */ r("div", { className: "space-y-3 pt-2", children: l.slice(0, 4).map((e, N) => /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
28
+ /* @__PURE__ */ r("div", { className: "h-4 bg-hover/40 rounded-md w-1/4" }),
29
+ /* @__PURE__ */ r("div", { className: "h-4 bg-hover/60 rounded-md", style: { width: Math.random() * 50 + 30 + "%" } })
30
+ ] }, `skeleton-col-${e.id}`)) })
31
31
  ]
32
32
  },
33
33
  `skeleton-${s}`
34
- )) }) : n.length === 0 ? null : /* @__PURE__ */ e("div", { className: "space-y-4", children: n.map((a, s) => /* @__PURE__ */ d(
34
+ )) }) : h.length === 0 ? null : /* @__PURE__ */ r("div", { className: "space-y-4", children: h.map((a, s) => /* @__PURE__ */ i(
35
35
  "div",
36
36
  {
37
- className: p(
37
+ className: c(
38
38
  "border border-light/40 rounded-xl overflow-hidden bg-card shadow-sm transition-all duration-200",
39
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-light bg-muted/5", children: [
44
- /* @__PURE__ */ e("div", { className: "font-medium", children: o[0].cell(a) || `Item ${s + 1}` }),
45
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
46
- m && /* @__PURE__ */ e(
47
- g,
43
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 border-b border-light bg-hover/5", children: [
44
+ /* @__PURE__ */ r("div", { className: "font-medium", children: l[0].cell(a) || `Item ${s + 1}` }),
45
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
46
+ n && /* @__PURE__ */ r(
47
+ u,
48
48
  {
49
- checked: i == null ? void 0 : i.has(a.id),
50
- onClick: (r) => {
51
- r.stopPropagation(), l == null || l(a.id, !(i != null && i.has(a.id)));
49
+ checked: d == null ? void 0 : d.has(a.id),
50
+ onClick: (e) => {
51
+ e.stopPropagation(), o == null || o(a.id, !(d != null && d.has(a.id)));
52
52
  },
53
- className: "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"
53
+ className: "data-[state=checked]:bg-primary data-[state=checked]:text-white"
54
54
  }
55
55
  ),
56
- t && /* @__PURE__ */ e(x, { className: "h-4 w-4 text-muted-foreground/50" })
56
+ t && /* @__PURE__ */ r(x, { className: "h-4 w-4 text-tertiary/50" })
57
57
  ] })
58
58
  ] }),
59
- /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-3", children: o.slice(1).map((r) => /* @__PURE__ */ d(
59
+ /* @__PURE__ */ r("div", { className: "px-4 py-3 space-y-3", children: l.slice(1).map((e) => /* @__PURE__ */ i(
60
60
  "div",
61
61
  {
62
62
  className: "flex items-start gap-3 text-sm group",
63
- onMouseEnter: () => r.tooltipValue && h(`${s}-${r.id}`),
64
- onMouseLeave: () => h(null),
63
+ onMouseEnter: () => e.tooltipValue && p(`${s}-${e.id}`),
64
+ onMouseLeave: () => p(null),
65
65
  children: [
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
- "flex-1 min-w-0 text-foreground/90 group-hover:text-foreground transition-colors",
69
- r.truncate && "truncate"
70
- ), children: r.cell(a) }),
71
- r.tooltipValue && f === `${s}-${r.id}` && /* @__PURE__ */ e(
72
- v,
66
+ /* @__PURE__ */ r("div", { className: "font-medium text-tertiary w-1/3 min-w-[80px] text-xs uppercase tracking-wide pt-0.5", children: e.header }),
67
+ /* @__PURE__ */ r("div", { className: c(
68
+ "flex-1 min-w-0 text-primary/90 group-hover:text-primary transition-colors",
69
+ e.truncate && "truncate"
70
+ ), children: e.cell(a) }),
71
+ e.tooltipValue && b === `${s}-${e.id}` && /* @__PURE__ */ r(
72
+ f,
73
73
  {
74
- content: r.tooltipValue(a),
74
+ content: e.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
- r.id
82
+ e.id
83
83
  )) })
84
84
  ]
85
85
  },