laif-ds 0.2.23 → 0.2.24

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 (44) hide show
  1. package/dist/components/ui/alert-dialog.js +6 -6
  2. package/dist/components/ui/app-multiple-select-dropdown.js +34 -34
  3. package/dist/components/ui/app-select.js +127 -124
  4. package/dist/components/ui/badge.js +13 -12
  5. package/dist/components/ui/button.js +20 -18
  6. package/dist/components/ui/calendar.js +6 -6
  7. package/dist/components/ui/checkbox.js +9 -9
  8. package/dist/components/ui/confirmer.js +45 -19
  9. package/dist/components/ui/context-menu.js +4 -4
  10. package/dist/components/ui/input-otp.js +16 -16
  11. package/dist/components/ui/input-selector.js +19 -19
  12. package/dist/components/ui/input.js +19 -19
  13. package/dist/components/ui/menubar.js +1 -1
  14. package/dist/components/ui/pagination.js +90 -77
  15. package/dist/components/ui/radio-group.js +14 -14
  16. package/dist/components/ui/select.js +27 -27
  17. package/dist/components/ui/switch.js +8 -6
  18. package/dist/components/ui/table.js +16 -16
  19. package/dist/components/ui/tables/data-cross-table/data-cross-table.js +6 -6
  20. package/dist/components/ui/tables/data-table/components/data-table-actions.js +51 -0
  21. package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +470 -0
  22. package/dist/components/ui/tables/data-table/components/data-table-body.js +340 -0
  23. package/dist/components/ui/tables/data-table/components/data-table-column-visibility.js +274 -0
  24. package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +177 -0
  25. package/dist/components/ui/tables/data-table/components/data-table-filters.js +286 -0
  26. package/dist/components/ui/tables/data-table/components/data-table-pagination.js +131 -0
  27. package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +112 -0
  28. package/dist/components/ui/tables/data-table/components/data-table-simple-filters.js +263 -0
  29. package/dist/components/ui/tables/data-table/components/data-table-sorting.js +128 -0
  30. package/dist/components/ui/tables/data-table/data-table-constants.js +58 -0
  31. package/dist/components/ui/tables/data-table/data-table-i18n.js +138 -0
  32. package/dist/components/ui/tables/data-table/data-table.js +549 -0
  33. package/dist/components/ui/tables/data-table/data-table.service.js +254 -0
  34. package/dist/components/ui/tabs.js +33 -33
  35. package/dist/components/ui/textarea.js +11 -11
  36. package/dist/components/ui/tooltip.js +10 -10
  37. package/dist/css-for-template.css +57 -0
  38. package/dist/index.d.ts +245 -75
  39. package/dist/index.js +64 -64
  40. package/dist/styles.css +1 -1
  41. package/dist/styles.v3.css +1 -1
  42. package/package.json +5 -3
  43. package/dist/components/ui/data-table.js +0 -461
  44. package/dist/components/ui/data-table.service.js +0 -62
@@ -1,164 +1,177 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as o } from "react/jsx-runtime";
3
- import { cn as t } from "../../lib/utils.js";
2
+ import { jsx as a, jsxs as r } from "react/jsx-runtime";
3
+ import { cn as i } from "../../lib/utils.js";
4
4
  import { buttonVariants as c } from "./button.js";
5
- import p from "../../node_modules/lucide-react/dist/esm/icons/ellipsis.js";
6
- import m from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
7
- import u from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
8
- import d from "../../node_modules/lucide-react/dist/esm/icons/chevron-first.js";
5
+ import m from "../../node_modules/lucide-react/dist/esm/icons/ellipsis.js";
6
+ import p from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
7
+ import d from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
8
+ import u from "../../node_modules/lucide-react/dist/esm/icons/chevron-first.js";
9
9
  import g from "../../node_modules/lucide-react/dist/esm/icons/chevron-last.js";
10
- function C({ className: a, ...n }) {
11
- return /* @__PURE__ */ i(
10
+ function j({ className: n, ...e }) {
11
+ return /* @__PURE__ */ a(
12
12
  "nav",
13
13
  {
14
14
  role: "navigation",
15
15
  "aria-label": "pagination",
16
16
  "data-slot": "pagination",
17
- className: t("mx-auto flex w-full justify-center", a),
18
- ...n
17
+ className: i("mx-auto flex w-full justify-center", n),
18
+ ...e
19
19
  }
20
20
  );
21
21
  }
22
- function j({
23
- className: a,
24
- ...n
22
+ function k({
23
+ className: n,
24
+ ...e
25
25
  }) {
26
- return /* @__PURE__ */ i(
26
+ return /* @__PURE__ */ a(
27
27
  "ul",
28
28
  {
29
29
  "data-slot": "pagination-content",
30
- className: t("flex flex-row items-center gap-1", a),
31
- ...n
30
+ className: i("flex flex-row items-center gap-1", n),
31
+ ...e
32
32
  }
33
33
  );
34
34
  }
35
- function y({ ...a }) {
36
- return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
35
+ function C({ ...n }) {
36
+ return /* @__PURE__ */ a("li", { "data-slot": "pagination-item", ...n });
37
37
  }
38
- function r({
39
- className: a,
40
- isActive: n,
41
- isDisabled: e,
38
+ function o({
39
+ className: n,
40
+ isActive: e,
41
+ isDisabled: t,
42
42
  size: s = "icon",
43
43
  ...l
44
44
  }) {
45
- return /* @__PURE__ */ i(
45
+ return /* @__PURE__ */ a(
46
46
  "a",
47
47
  {
48
- "aria-current": n ? "page" : void 0,
48
+ "aria-current": e ? "page" : void 0,
49
49
  "data-slot": "pagination-link",
50
- "data-active": n,
51
- className: t(
50
+ "data-active": e,
51
+ className: i(
52
+ "border-d-border/30 select-none",
52
53
  c({
53
- variant: n ? "outline" : "ghost",
54
- // variant: isDisabled ? "disabled" : isActive ? "outline" : "ghost",
54
+ variant: e ? "outline" : "ghost",
55
55
  size: s
56
56
  }),
57
- e && "pointer-events-none cursor-not-allowed opacity-40",
58
- a
57
+ t && "pointer-events-none cursor-not-allowed opacity-40",
58
+ e && "bg-d-secondary border-d-border border",
59
+ n
59
60
  ),
60
61
  ...l
61
62
  }
62
63
  );
63
64
  }
64
65
  function G({
65
- className: a,
66
- label: n,
67
- ...e
66
+ className: n,
67
+ label: e,
68
+ ...t
68
69
  }) {
69
- return /* @__PURE__ */ o(
70
- r,
70
+ return /* @__PURE__ */ r(
71
+ o,
71
72
  {
72
73
  "aria-label": "Go to previous page",
73
- className: t("gap-1 px-2.5 sm:pl-2.5", a),
74
- ...e,
74
+ className: i(
75
+ "flex items-center justify-center gap-1 px-2.5 align-middle select-none sm:pl-2.5",
76
+ n
77
+ ),
78
+ ...t,
75
79
  children: [
76
- /* @__PURE__ */ i(d, {}),
77
- /* @__PURE__ */ i("span", { className: "hidden sm:block", children: n ?? "Primo" })
80
+ /* @__PURE__ */ a(u, {}),
81
+ /* @__PURE__ */ a("span", { className: "hidden sm:block", children: e ?? "Primo" })
78
82
  ]
79
83
  }
80
84
  );
81
85
  }
82
86
  function L({
83
- className: a,
84
- label: n,
85
- ...e
87
+ className: n,
88
+ label: e,
89
+ ...t
86
90
  }) {
87
- return /* @__PURE__ */ o(
88
- r,
91
+ return /* @__PURE__ */ r(
92
+ o,
89
93
  {
90
94
  "aria-label": "Go to previous page",
91
- className: t("gap-1 px-2.5 sm:pl-2.5", a),
92
- ...e,
95
+ className: i(
96
+ "flex items-center justify-center gap-1 px-2.5 align-middle select-none sm:pl-2.5",
97
+ n
98
+ ),
99
+ ...t,
93
100
  children: [
94
- /* @__PURE__ */ i(u, {}),
95
- /* @__PURE__ */ i("span", { className: "hidden sm:block", children: n ?? "Precedente" })
101
+ /* @__PURE__ */ a(d, {}),
102
+ /* @__PURE__ */ a("span", { className: "hidden sm:block", children: e ?? "Precedente" })
96
103
  ]
97
104
  }
98
105
  );
99
106
  }
100
107
  function w({
101
- className: a,
102
- label: n,
103
- ...e
108
+ className: n,
109
+ label: e,
110
+ ...t
104
111
  }) {
105
- return /* @__PURE__ */ o(
106
- r,
112
+ return /* @__PURE__ */ r(
113
+ o,
107
114
  {
108
115
  "aria-label": "Go to next page",
109
- className: t("gap-1 px-2.5 sm:pr-2.5", a),
110
- ...e,
116
+ className: i(
117
+ "flex items-center justify-center gap-1 px-2.5 align-middle select-none sm:pl-2.5",
118
+ n
119
+ ),
120
+ ...t,
111
121
  children: [
112
- /* @__PURE__ */ i("span", { className: "hidden sm:block", children: n ?? "Prossimo" }),
113
- /* @__PURE__ */ i(m, {})
122
+ /* @__PURE__ */ a("span", { className: "hidden sm:block", children: e ?? "Prossimo" }),
123
+ /* @__PURE__ */ a(p, {})
114
124
  ]
115
125
  }
116
126
  );
117
127
  }
118
128
  function z({
119
- className: a,
120
- label: n,
121
- ...e
129
+ className: n,
130
+ label: e,
131
+ ...t
122
132
  }) {
123
- return /* @__PURE__ */ o(
124
- r,
133
+ return /* @__PURE__ */ r(
134
+ o,
125
135
  {
126
136
  "aria-label": "Go to next page",
127
- className: t("gap-1 px-2.5 sm:pr-2.5", a),
128
- ...e,
137
+ className: i(
138
+ "flex items-center justify-center gap-1 px-2.5 align-middle select-none sm:pr-2.5",
139
+ n
140
+ ),
141
+ ...t,
129
142
  children: [
130
- /* @__PURE__ */ i("span", { className: "hidden sm:block", children: n ?? "Ultimo" }),
131
- /* @__PURE__ */ i(g, {})
143
+ /* @__PURE__ */ a("span", { className: "hidden sm:block", children: e ?? "Ultimo" }),
144
+ /* @__PURE__ */ a(g, {})
132
145
  ]
133
146
  }
134
147
  );
135
148
  }
136
149
  function E({
137
- className: a,
138
- ...n
150
+ className: n,
151
+ ...e
139
152
  }) {
140
- return /* @__PURE__ */ o(
153
+ return /* @__PURE__ */ r(
141
154
  "span",
142
155
  {
143
156
  "aria-hidden": !0,
144
157
  "data-slot": "pagination-ellipsis",
145
- className: t("flex size-9 items-center justify-center", a),
146
- ...n,
158
+ className: i("flex size-9 items-center justify-center", n),
159
+ ...e,
147
160
  children: [
148
- /* @__PURE__ */ i(p, { className: "size-4" }),
149
- /* @__PURE__ */ i("span", { className: "sr-only", children: "More pages" })
161
+ /* @__PURE__ */ a(m, { className: "size-4" }),
162
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "More pages" })
150
163
  ]
151
164
  }
152
165
  );
153
166
  }
154
167
  export {
155
- C as Pagination,
156
- j as PaginationContent,
168
+ j as Pagination,
169
+ k as PaginationContent,
157
170
  E as PaginationEllipsis,
158
171
  G as PaginationFirst,
159
- y as PaginationItem,
172
+ C as PaginationItem,
160
173
  z as PaginationLast,
161
- r as PaginationLink,
174
+ o as PaginationLink,
162
175
  w as PaginationNext,
163
176
  L as PaginationPrevious
164
177
  };
@@ -1,40 +1,40 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
- import { Root as a, Item as t, Indicator as d } from "../../node_modules/@radix-ui/react-radio-group/dist/index.js";
4
- import { cn as o } from "../../lib/utils.js";
5
- import s from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
3
+ import { Root as t, Item as a, Indicator as s } from "../../node_modules/@radix-ui/react-radio-group/dist/index.js";
4
+ import { cn as e } from "../../lib/utils.js";
5
+ import d from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
6
6
  function m({
7
7
  className: i,
8
- ...e
8
+ ...o
9
9
  }) {
10
10
  return /* @__PURE__ */ r(
11
- a,
11
+ t,
12
12
  {
13
13
  "data-slot": "radio-group",
14
- className: o("grid gap-3", i),
15
- ...e
14
+ className: e("grid gap-3", i),
15
+ ...o
16
16
  }
17
17
  );
18
18
  }
19
19
  function p({
20
20
  className: i,
21
- ...e
21
+ ...o
22
22
  }) {
23
23
  return /* @__PURE__ */ r(
24
- t,
24
+ a,
25
25
  {
26
26
  "data-slot": "radio-group-item",
27
- className: o(
28
- "border-d-border text-d-primary focus-visible:border-d-ring focus-visible:ring-d-ring/50 aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive dark:bg-d-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
27
+ className: e(
28
+ "border-d-border text-d-primary focus-visible:border-d-ring focus-visible:ring-d-ring/50 aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
29
29
  i
30
30
  ),
31
- ...e,
31
+ ...o,
32
32
  children: /* @__PURE__ */ r(
33
- d,
33
+ s,
34
34
  {
35
35
  "data-slot": "radio-group-indicator",
36
36
  className: "relative flex items-center justify-center",
37
- children: /* @__PURE__ */ r(s, { className: "fill-d-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
37
+ children: /* @__PURE__ */ r(d, { className: "fill-d-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
38
38
  }
39
39
  )
40
40
  }
@@ -1,22 +1,22 @@
1
1
  "use client";
2
2
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
- import * as c from "react";
4
3
  import { Root as p, Group as f, Value as g, Trigger as x, Icon as h, Portal as v, Content as b, Viewport as y, Label as S, Item as z, ItemIndicator as w, ItemText as N, Separator as C, ScrollUpButton as I, ScrollDownButton as _ } from "../../node_modules/@radix-ui/react-select/dist/index.js";
5
- import { cn as s } from "../../lib/utils.js";
4
+ import * as c from "react";
6
5
  import { Label as j } from "./label.js";
6
+ import { cn as o } from "../../lib/utils.js";
7
7
  import u from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
8
8
  import k from "../../node_modules/lucide-react/dist/esm/icons/check.js";
9
9
  import B from "../../node_modules/lucide-react/dist/esm/icons/chevron-up.js";
10
10
  function q({
11
11
  size: t = "default",
12
12
  label: a,
13
- className: r,
14
- labelClassName: o,
13
+ className: s,
14
+ labelClassName: r,
15
15
  ...d
16
16
  }) {
17
17
  const n = c.useId();
18
- return /* @__PURE__ */ i("div", { className: s("space-y-1.5", r), children: [
19
- a && /* @__PURE__ */ e(j, { htmlFor: n, className: o, children: a }),
18
+ return /* @__PURE__ */ i("div", { className: o("space-y-1.5", s), children: [
19
+ a && /* @__PURE__ */ e(j, { htmlFor: n, className: r, children: a }),
20
20
  /* @__PURE__ */ e(m.Provider, { value: { size: t, id: n }, children: /* @__PURE__ */ e(p, { "data-slot": "select", ...d }) })
21
21
  ] });
22
22
  }
@@ -34,8 +34,8 @@ function E({
34
34
  function H({
35
35
  className: t,
36
36
  size: a,
37
- children: r,
38
- ...o
37
+ children: s,
38
+ ...r
39
39
  }) {
40
40
  const { size: d, id: n } = L(), l = a || d;
41
41
  return /* @__PURE__ */ i(
@@ -44,13 +44,13 @@ function H({
44
44
  id: n,
45
45
  "data-slot": "select-trigger",
46
46
  "data-size": l,
47
- className: s(
47
+ className: o(
48
48
  "border-d-border/50 ring-offset-background data-[placeholder]:text-d-muted-foreground bg-d-input flex items-center justify-between rounded-md border px-3 py-2 whitespace-nowrap focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
49
49
  "focus-visible:ring-d-ring focus-visible:ring-1",
50
50
  // Ring solo con tastiera
51
51
  "data-[state=open]:ring-d-ring data-[state=open]:ring-1",
52
52
  // Ring quando dropdown è aperto
53
- "aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
53
+ "aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive",
54
54
  "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
55
55
  "*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
56
56
  "transition-all duration-300",
@@ -59,9 +59,9 @@ function H({
59
59
  l === "lg" && "h-10 text-lg",
60
60
  t
61
61
  ),
62
- ...o,
62
+ ...r,
63
63
  children: [
64
- r,
64
+ s,
65
65
  /* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "size-4 opacity-50" }) })
66
66
  ]
67
67
  }
@@ -70,28 +70,28 @@ function H({
70
70
  function J({
71
71
  className: t,
72
72
  children: a,
73
- position: r = "popper",
74
- ...o
73
+ position: s = "popper",
74
+ ...r
75
75
  }) {
76
76
  return /* @__PURE__ */ e(v, { children: /* @__PURE__ */ i(
77
77
  b,
78
78
  {
79
79
  "data-slot": "select-content",
80
- className: s(
80
+ className: o(
81
81
  "bg-d-popover text-d-popover-foreground 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 border-d-border relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
82
- 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",
82
+ s === "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",
83
83
  t
84
84
  ),
85
- position: r,
86
- ...o,
85
+ position: s,
86
+ ...r,
87
87
  children: [
88
88
  /* @__PURE__ */ e(D, {}),
89
89
  /* @__PURE__ */ e(
90
90
  y,
91
91
  {
92
- className: s(
92
+ className: o(
93
93
  "p-1",
94
- r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
94
+ s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
95
95
  ),
96
96
  children: a
97
97
  }
@@ -109,7 +109,7 @@ function K({
109
109
  S,
110
110
  {
111
111
  "data-slot": "select-label",
112
- className: s(
112
+ className: o(
113
113
  "text-d-secondary-foreground px-2 py-1.5 text-xs",
114
114
  t
115
115
  ),
@@ -120,17 +120,17 @@ function K({
120
120
  function M({
121
121
  className: t,
122
122
  children: a,
123
- ...r
123
+ ...s
124
124
  }) {
125
125
  return /* @__PURE__ */ i(
126
126
  z,
127
127
  {
128
128
  "data-slot": "select-item",
129
- className: s(
129
+ className: o(
130
130
  "focus:bg-d-accent focus:text-d-accent-foreground [&_svg:not([class*='text-'])]:text-d-secondary-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
131
131
  t
132
132
  ),
133
- ...r,
133
+ ...s,
134
134
  children: [
135
135
  /* @__PURE__ */ e("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(k, { className: "size-4" }) }) }),
136
136
  /* @__PURE__ */ e(N, { children: a })
@@ -146,7 +146,7 @@ function O({
146
146
  C,
147
147
  {
148
148
  "data-slot": "select-separator",
149
- className: s(
149
+ className: o(
150
150
  "bg-d-border pointer-events-none -mx-1 my-1 h-px",
151
151
  t
152
152
  ),
@@ -162,7 +162,7 @@ function D({
162
162
  I,
163
163
  {
164
164
  "data-slot": "select-scroll-up-button",
165
- className: s(
165
+ className: o(
166
166
  "flex cursor-default items-center justify-center py-1",
167
167
  t
168
168
  ),
@@ -179,7 +179,7 @@ function R({
179
179
  _,
180
180
  {
181
181
  "data-slot": "select-scroll-down-button",
182
- className: s(
182
+ className: o(
183
183
  "flex cursor-default items-center justify-center py-1",
184
184
  t
185
185
  ),
@@ -1,26 +1,28 @@
1
1
  "use client";
2
2
  import { jsx as e } from "react/jsx-runtime";
3
- import { Root as d, Thumb as n } from "../../node_modules/@radix-ui/react-switch/dist/index.js";
3
+ import { Root as a, Thumb as n } from "../../node_modules/@radix-ui/react-switch/dist/index.js";
4
4
  import { cn as t } from "../../lib/utils.js";
5
5
  function c({
6
6
  className: r,
7
- ...a
7
+ ...o
8
8
  }) {
9
9
  return /* @__PURE__ */ e(
10
- d,
10
+ a,
11
11
  {
12
12
  "data-slot": "switch",
13
13
  className: t(
14
- "peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-input focus-visible:border-d-ring focus-visible:ring-d-ring/50 dark:data-[state=unchecked]:bg-d-foreground/20 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all duration-300 outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
14
+ "peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-foreground/20 focus-visible:border-d-ring focus-visible:ring-d-ring/50 inline-flex h-[1.25rem] w-8 shrink-0 cursor-pointer items-center justify-start rounded-full border-0 px-0.5 py-0.5 transition-colors duration-300 outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
15
15
  r
16
16
  ),
17
- ...a,
17
+ ...o,
18
18
  children: /* @__PURE__ */ e(
19
19
  n,
20
20
  {
21
21
  "data-slot": "switch-thumb",
22
22
  className: t(
23
- "bg-d-background dark:data-[state=unchecked]:bg-d-foreground dark:data-[state=checked]:bg-d-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
23
+ // Smooth slide: track w-8 (32px) with px-0.5 (2px) each side => inner 28px.
24
+ // Thumb size is 16px, so travel distance = 28 - 16 = 12px.
25
+ "bg-d-foreground data-[state=unchecked]:bg-d-foreground data-[state=checked]:bg-d-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform duration-200 ease-out will-change-transform data-[state=checked]:translate-x-[12px] data-[state=unchecked]:translate-x-0"
24
26
  )
25
27
  }
26
28
  )
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
- import { cn as a } from "../../lib/utils.js";
4
- function d({ className: e, ...t }) {
3
+ import { cn as o } from "../../lib/utils.js";
4
+ function l({ className: e, ...t }) {
5
5
  return /* @__PURE__ */ r(
6
6
  "table",
7
7
  {
8
8
  "data-slot": "table-container",
9
- className: a(
9
+ className: o(
10
10
  "relative w-full caption-bottom overflow-x-auto text-sm",
11
11
  e
12
12
  ),
@@ -14,22 +14,22 @@ function d({ className: e, ...t }) {
14
14
  }
15
15
  );
16
16
  }
17
- function n({ className: e, ...t }) {
17
+ function b({ className: e, ...t }) {
18
18
  return /* @__PURE__ */ r(
19
19
  "thead",
20
20
  {
21
21
  "data-slot": "table-header",
22
- className: a("border-d-border [&_tr]:border-b", e),
22
+ className: o("border-d-border [&_tr]:border-b", e),
23
23
  ...t
24
24
  }
25
25
  );
26
26
  }
27
- function b({ className: e, ...t }) {
27
+ function n({ className: e, ...t }) {
28
28
  return /* @__PURE__ */ r(
29
29
  "tbody",
30
30
  {
31
31
  "data-slot": "table-body",
32
- className: a("border-d-border [&_tr:last-child]:border-0", e),
32
+ className: o("border-d-border [&_tr:last-child]:border-0", e),
33
33
  ...t
34
34
  }
35
35
  );
@@ -39,7 +39,7 @@ function s({ className: e, ...t }) {
39
39
  "tfoot",
40
40
  {
41
41
  "data-slot": "table-footer",
42
- className: a(
42
+ className: o(
43
43
  "bg-d-secondary/50 border-d-border border-t font-medium [&>tr]:last:border-b-0",
44
44
  e
45
45
  ),
@@ -52,7 +52,7 @@ function c({ className: e, ...t }) {
52
52
  "tr",
53
53
  {
54
54
  "data-slot": "table-row",
55
- className: a(
55
+ className: o(
56
56
  "hover:bg-d-secondary/50 data-[state=selected]:bg-d-secondary border-d-border border-b transition-colors",
57
57
  e
58
58
  ),
@@ -65,7 +65,7 @@ function i({ className: e, ...t }) {
65
65
  "th",
66
66
  {
67
67
  "data-slot": "table-head",
68
- className: a(
68
+ className: o(
69
69
  "text-d-foreground border-d-border h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
70
70
  e
71
71
  ),
@@ -78,8 +78,8 @@ function u({ className: e, ...t }) {
78
78
  "td",
79
79
  {
80
80
  "data-slot": "table-cell",
81
- className: a(
82
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
81
+ className: o(
82
+ "border-d-border/50 border p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
83
83
  e
84
84
  ),
85
85
  ...t
@@ -94,18 +94,18 @@ function m({
94
94
  "caption",
95
95
  {
96
96
  "data-slot": "table-caption",
97
- className: a("text-d-secondary-foreground mt-4 text-sm", e),
97
+ className: o("text-d-secondary-foreground mt-4 text-sm", e),
98
98
  ...t
99
99
  }
100
100
  );
101
101
  }
102
102
  export {
103
- d as Table,
104
- b as TableBody,
103
+ l as Table,
104
+ n as TableBody,
105
105
  m as TableCaption,
106
106
  u as TableCell,
107
107
  s as TableFooter,
108
108
  i as TableHead,
109
- n as TableHeader,
109
+ b as TableHeader,
110
110
  c as TableRow
111
111
  };
@@ -10,8 +10,8 @@ import { cn as V } from "../../../../lib/utils.js";
10
10
  import { Button as k } from "../../button.js";
11
11
  import { Icon as q } from "../../icon.js";
12
12
  import { Popover as Be, PopoverTrigger as Fe, PopoverContent as Oe } from "../../popover.js";
13
- import { Table as ie, TableHeader as ae, TableRow as G, TableHead as ce, TableBody as We, TableCell as Ue } from "../../table.js";
14
- import { getSortedRowModel as Xe, getCoreRowModel as Ye } from "../../../../node_modules/@tanstack/table-core/build/lib/index.js";
13
+ import { getSortedRowModel as We, getCoreRowModel as Ue } from "../../../../node_modules/@tanstack/table-core/build/lib/index.js";
14
+ import { Table as ie, TableHeader as ae, TableRow as G, TableHead as ce, TableBody as Xe, TableCell as Ye } from "../../table.js";
15
15
  function ct({
16
16
  crossTableData: E,
17
17
  filterable: v = !1,
@@ -180,8 +180,8 @@ function ct({
180
180
  columns: Ee,
181
181
  state: { sorting: ge },
182
182
  onSortingChange: xe,
183
- getCoreRowModel: Ye(),
184
- getSortedRowModel: Xe()
183
+ getCoreRowModel: Ue(),
184
+ getSortedRowModel: We()
185
185
  }), Z = Le(null), ee = $e({
186
186
  count: R.getRowModel().rows.length,
187
187
  getScrollElement: () => Z.current,
@@ -287,7 +287,7 @@ function ct({
287
287
  }
288
288
  ),
289
289
  /* @__PURE__ */ l(
290
- We,
290
+ Xe,
291
291
  {
292
292
  style: {
293
293
  height: `${ee.getTotalSize()}px`,
@@ -312,7 +312,7 @@ function ct({
312
312
  children: e.getVisibleCells().map((n, o) => {
313
313
  const i = o === 0, r = n.getValue(), a = i ? "var(--d-secondary)" : r?.bgColor || "transparent", N = r.editable ?? !0;
314
314
  return /* @__PURE__ */ l(
315
- Ue,
315
+ Ye,
316
316
  {
317
317
  onClick: (m) => {
318
318
  !N || !C || (m.stopPropagation(), m.preventDefault());