@sth87/shadcn-design-system 0.2.11 → 0.3.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.
Files changed (82) hide show
  1. package/README.md +2 -3
  2. package/dist/AI_CONTEXT.md +4 -4
  3. package/dist/cjs/components/Calendar/Calendar.cjs +1 -1
  4. package/dist/cjs/components/Calendar/index.cjs +1 -1
  5. package/dist/cjs/components/Checkbox/Checkbox.cjs +1 -1
  6. package/dist/cjs/components/Checkbox/Confetti.cjs +1 -0
  7. package/dist/cjs/components/DatePicker/DatePicker.cjs +1 -1
  8. package/dist/cjs/components/DatePicker/RangePicker.cjs +1 -1
  9. package/dist/cjs/components/DatePicker/TimePicker.cjs +1 -1
  10. package/dist/cjs/components/Slider/Slider.cjs +1 -1
  11. package/dist/cjs/components/Slider/SpecSliderLabel.cjs +1 -0
  12. package/dist/cjs/components/Table/TableFilter/data-table-filter-popover.cjs +1 -1
  13. package/dist/cjs/components/Table/data-table.cjs +1 -1
  14. package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
  15. package/dist/cjs/components/Tooltip/SpecTooltip.cjs +1 -0
  16. package/dist/cjs/components/Tooltip/Tooltip.cjs +1 -1
  17. package/dist/cjs/index.cjs +1 -1
  18. package/dist/cjs/packages/ui/src/components/calendar-logic.cjs +1 -0
  19. package/dist/cjs/packages/ui/src/components/calendar.cjs +1 -1
  20. package/dist/cjs/styles/index.css +1 -1
  21. package/dist/cjs/utils/animations.cjs +1 -1
  22. package/dist/cjs/utils/data-table.cjs +1 -1
  23. package/dist/cjs/utils/date-format.cjs +1 -0
  24. package/dist/esm/components/Calendar/Calendar.js +23 -19
  25. package/dist/esm/components/Calendar/index.js +7 -3
  26. package/dist/esm/components/Checkbox/Checkbox.js +46 -44
  27. package/dist/esm/components/Checkbox/Confetti.js +28 -0
  28. package/dist/esm/components/DatePicker/DatePicker.js +78 -81
  29. package/dist/esm/components/DatePicker/RangePicker.js +121 -124
  30. package/dist/esm/components/DatePicker/TimePicker.js +122 -124
  31. package/dist/esm/components/Slider/Slider.js +140 -199
  32. package/dist/esm/components/Slider/SpecSliderLabel.js +60 -0
  33. package/dist/esm/components/Table/TableFilter/data-table-filter-popover.js +30 -26
  34. package/dist/esm/components/Table/data-table.js +51 -47
  35. package/dist/esm/components/Tabs/Tabs.js +80 -91
  36. package/dist/esm/components/Tooltip/SpecTooltip.js +69 -0
  37. package/dist/esm/components/Tooltip/Tooltip.js +42 -85
  38. package/dist/esm/index.js +162 -158
  39. package/dist/esm/packages/ui/src/components/calendar-logic.js +83 -0
  40. package/dist/esm/packages/ui/src/components/calendar.js +459 -184
  41. package/dist/esm/styles/index.css +1 -1
  42. package/dist/esm/utils/animations.js +36 -44
  43. package/dist/esm/utils/data-table.js +6 -0
  44. package/dist/esm/utils/date-format.js +162 -0
  45. package/dist/types/components/Calendar/Calendar.d.ts +5 -5
  46. package/dist/types/components/Calendar/Calendar.d.ts.map +1 -1
  47. package/dist/types/components/Calendar/index.d.ts +1 -1
  48. package/dist/types/components/Calendar/index.d.ts.map +1 -1
  49. package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
  50. package/dist/types/components/Checkbox/Confetti.d.ts +2 -0
  51. package/dist/types/components/Checkbox/Confetti.d.ts.map +1 -0
  52. package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -1
  53. package/dist/types/components/DatePicker/RangePicker.d.ts.map +1 -1
  54. package/dist/types/components/DatePicker/TimePicker.d.ts.map +1 -1
  55. package/dist/types/components/Marquee/Marquee.d.ts +1 -1
  56. package/dist/types/components/Slider/Slider.d.ts +1 -1
  57. package/dist/types/components/Slider/Slider.d.ts.map +1 -1
  58. package/dist/types/components/Slider/SpecSliderLabel.d.ts +14 -0
  59. package/dist/types/components/Slider/SpecSliderLabel.d.ts.map +1 -0
  60. package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts.map +1 -1
  61. package/dist/types/components/Table/data-table.d.ts.map +1 -1
  62. package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
  63. package/dist/types/components/Tooltip/SpecTooltip.d.ts +11 -0
  64. package/dist/types/components/Tooltip/SpecTooltip.d.ts.map +1 -0
  65. package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
  66. package/dist/types/components/Upload/Upload.d.ts +1 -1
  67. package/dist/types/packages/ui/src/components/badge.d.ts +2 -2
  68. package/dist/types/packages/ui/src/components/button.d.ts +1 -1
  69. package/dist/types/packages/ui/src/components/calendar-logic.d.ts +72 -0
  70. package/dist/types/packages/ui/src/components/calendar-logic.d.ts.map +1 -0
  71. package/dist/types/packages/ui/src/components/calendar.d.ts +95 -6
  72. package/dist/types/packages/ui/src/components/calendar.d.ts.map +1 -1
  73. package/dist/types/utils/animations.d.ts +0 -19
  74. package/dist/types/utils/animations.d.ts.map +1 -1
  75. package/dist/types/utils/data-table.d.ts.map +1 -1
  76. package/dist/types/utils/date-format.d.ts +24 -0
  77. package/dist/types/utils/date-format.d.ts.map +1 -0
  78. package/package.json +2 -3
  79. package/dist/cjs/utils/css.cjs +0 -1
  80. package/dist/esm/utils/css.js +0 -24
  81. package/dist/types/utils/css.d.ts +0 -4
  82. package/dist/types/utils/css.d.ts.map +0 -1
@@ -1,13 +1,13 @@
1
- import { jsxs as b, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import { flexRender as C } from "@tanstack/react-table";
3
3
  import { Fragment as k } from "react";
4
4
  import { DataTablePagination as F } from "./data-table-pagination.js";
5
- import { cn as d } from "../../packages/ui/src/lib/utils.js";
6
- import { Table as B, TableHeader as L, TableRow as i, TableHead as O, TableBody as V, TableCell as f, TableFooter as _ } from "../../packages/ui/src/components/table.js";
5
+ import { cn as n } from "../../packages/ui/src/lib/utils.js";
6
+ import { Table as B, TableHeader as L, TableRow as c, TableHead as O, TableBody as V, TableCell as b, TableFooter as q } from "../../packages/ui/src/components/table.js";
7
7
  import { getCommonPinningStyles as T } from "../../utils/data-table.js";
8
- import { DataTableColumnHeader as $ } from "./data-table-column-header.js";
9
- function W({
10
- table: n,
8
+ import { DataTableColumnHeader as W } from "./data-table-column-header.js";
9
+ function U({
10
+ table: d,
11
11
  actionBar: g,
12
12
  children: H,
13
13
  className: R,
@@ -16,26 +16,26 @@ function W({
16
16
  stickyFooter: D = !1,
17
17
  bordered: P = !0,
18
18
  loading: p,
19
- loadingIndicator: I,
19
+ loadingIndicator: z,
20
20
  footer: h,
21
- emptyState: j,
22
- onRowClick: u,
23
- rowClassName: m,
21
+ emptyState: I,
22
+ onRowClick: m,
23
+ rowClassName: u,
24
24
  renderRow: w,
25
25
  renderCell: x,
26
26
  classNames: l,
27
27
  showTotalCount: N = !0,
28
- totalCount: z,
28
+ totalCount: j,
29
29
  ...M
30
30
  }) {
31
- const c = s ? {
31
+ const i = s ? {
32
32
  offsetHeader: typeof s == "object" ? s.offsetHeader ?? 0 : 0,
33
33
  offsetScroll: typeof s == "object" ? s.offsetScroll : void 0
34
- } : null, v = n.getVisibleLeafColumns().length;
35
- return /* @__PURE__ */ b(
34
+ } : null, v = d.getVisibleLeafColumns().length;
35
+ return /* @__PURE__ */ f(
36
36
  "div",
37
37
  {
38
- className: d(
38
+ className: n(
39
39
  "ds:flex ds:w-full ds:flex-col ds:gap-2.5 ds:relative",
40
40
  R
41
41
  ),
@@ -45,18 +45,19 @@ function W({
45
45
  p && /* @__PURE__ */ e(
46
46
  "div",
47
47
  {
48
- className: d(
48
+ className: n(
49
49
  "ds:absolute ds:inset-0 ds:bg-background/50 ds:flex ds:items-center ds:justify-center ds:z-20",
50
50
  l?.loadingOverlay
51
51
  ),
52
- children: I ?? "Loading..."
52
+ children: z ?? "Loading..."
53
53
  }
54
54
  ),
55
- /* @__PURE__ */ b(
55
+ /* @__PURE__ */ f(
56
56
  B,
57
57
  {
58
- className: l?.table,
59
- containerClassName: d(
58
+ className: n("ds:table-fixed", l?.table),
59
+ style: { minWidth: d.getTotalSize() },
60
+ containerClassName: n(
60
61
  P && "ds:rounded-md ds:border ds:border-border",
61
62
  // Thin, unobtrusive scrollbar that darkens only when hovering the thumb itself
62
63
  "ds:[scrollbar-width:thin] ds:[scrollbar-color:var(--border)_transparent]",
@@ -64,18 +65,20 @@ function W({
64
65
  "ds:[&::-webkit-scrollbar-track]:bg-transparent",
65
66
  "ds:[&::-webkit-scrollbar-thumb]:rounded-full ds:[&::-webkit-scrollbar-thumb]:bg-border",
66
67
  "ds:[&::-webkit-scrollbar-thumb:hover]:bg-muted-foreground",
68
+ // Size container so the footer can use `cqw` units (see footer cell)
69
+ "ds:[container-type:inline-size]",
67
70
  p && "ds:blur-sm",
68
71
  l?.container
69
72
  ),
70
- containerStyle: c ? {
71
- maxHeight: `calc(100vh - ${c.offsetScroll ?? 0}px)`
73
+ containerStyle: i ? {
74
+ maxHeight: `calc(100vh - ${i.offsetScroll ?? 0}px)`
72
75
  } : void 0,
73
76
  children: [
74
- /* @__PURE__ */ e(L, { children: n.getHeaderGroups().map((t) => /* @__PURE__ */ e(i, { className: l?.headerRow, children: t.headers.map((o) => /* @__PURE__ */ e(
77
+ /* @__PURE__ */ e(L, { children: d.getHeaderGroups().map((t) => /* @__PURE__ */ e(c, { className: l?.headerRow, children: t.headers.map((o) => /* @__PURE__ */ e(
75
78
  O,
76
79
  {
77
80
  colSpan: o.colSpan,
78
- className: d(
81
+ className: n(
79
82
  l?.headerCell,
80
83
  o.column.getIsPinned() && "ds:bg-background"
81
84
  ),
@@ -84,9 +87,9 @@ function W({
84
87
  column: o.column,
85
88
  withBorder: !0
86
89
  }),
87
- ...c && {
90
+ ...i && {
88
91
  position: "sticky",
89
- top: c.offsetHeader,
92
+ top: i.offsetHeader,
90
93
  zIndex: o.column.getIsPinned() ? 3 : 2,
91
94
  background: "var(--background)"
92
95
  }
@@ -94,26 +97,27 @@ function W({
94
97
  children: o.isPlaceholder ? null : o.column.columnDef.header ? typeof o.column.columnDef.header == "function" ? C(
95
98
  o.column.columnDef.header,
96
99
  o.getContext()
97
- ) : /* @__PURE__ */ e($, { column: o.column }) : null
100
+ ) : /* @__PURE__ */ e(W, { column: o.column }) : null
98
101
  },
99
102
  o.id
100
103
  )) }, t.id)) }),
101
- /* @__PURE__ */ e(V, { className: l?.body, children: n.getRowModel().rows?.length ? n.getRowModel().rows.map((t) => {
102
- const o = typeof m == "function" ? m(t) : m, y = /* @__PURE__ */ e(
103
- i,
104
+ /* @__PURE__ */ e(V, { className: l?.body, children: d.getRowModel().rows?.length ? d.getRowModel().rows.map((t) => {
105
+ const o = typeof u == "function" ? u(t) : u, y = /* @__PURE__ */ e(
106
+ c,
104
107
  {
105
108
  "data-state": t.getIsSelected() && "selected",
106
- className: d(
109
+ className: n(
107
110
  l?.row,
108
111
  o,
109
- u && "ds:cursor-pointer"
112
+ m && "ds:cursor-pointer"
110
113
  ),
111
- onClick: u ? (r) => u(t, r) : void 0,
114
+ onClick: m ? (r) => m(t, r) : void 0,
112
115
  children: t.getVisibleCells().map((r) => {
113
116
  const S = /* @__PURE__ */ e(
114
- f,
117
+ b,
115
118
  {
116
- className: d(
119
+ className: n(
120
+ "ds:overflow-hidden ds:text-ellipsis",
117
121
  l?.cell,
118
122
  // Static background on purpose — see the comment on
119
123
  // getCommonPinningStyles for why pinned cells must
@@ -139,16 +143,16 @@ function W({
139
143
  t.id
140
144
  );
141
145
  return w ? /* @__PURE__ */ e(k, { children: w(t, y) }, t.id) : y;
142
- }) : /* @__PURE__ */ e(i, { className: l?.emptyRow, children: /* @__PURE__ */ e(
143
- f,
146
+ }) : /* @__PURE__ */ e(c, { className: l?.emptyRow, children: /* @__PURE__ */ e(
147
+ b,
144
148
  {
145
149
  colSpan: v,
146
- className: d("ds:h-24 ds:text-center", l?.emptyCell),
147
- children: j ?? "No results."
150
+ className: n("ds:h-24 ds:text-center", l?.emptyCell),
151
+ children: I ?? "No results."
148
152
  }
149
153
  ) }) }),
150
- h && /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(i, { className: l?.footerRow, children: /* @__PURE__ */ e(
151
- f,
154
+ h && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(c, { className: l?.footerRow, children: /* @__PURE__ */ e(
155
+ b,
152
156
  {
153
157
  colSpan: v,
154
158
  className: l?.footerCell,
@@ -157,30 +161,30 @@ function W({
157
161
  bottom: 0,
158
162
  zIndex: 2
159
163
  } : void 0,
160
- children: h(n.getRowModel().rows.map((t) => t.original))
164
+ children: /* @__PURE__ */ e("div", { className: "ds:sticky ds:left-2 ds:w-[calc(100cqw-1rem)]", children: h(d.getRowModel().rows.map((t) => t.original)) })
161
165
  }
162
166
  ) }) })
163
167
  ]
164
168
  }
165
169
  ),
166
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-2.5", children: [
170
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-2.5", children: [
167
171
  a && /* @__PURE__ */ e(
168
172
  F,
169
173
  {
170
174
  showTotalCount: N,
171
- totalCount: z,
175
+ totalCount: j,
172
176
  showPageSizeOptions: !0,
173
177
  showRowSelectionCount: !0,
174
- table: n,
178
+ table: d,
175
179
  ...a === !0 ? {} : a
176
180
  }
177
181
  ),
178
- g && n.getFilteredSelectedRowModel().rows.length > 0 && g
182
+ g && d.getFilteredSelectedRowModel().rows.length > 0 && g
179
183
  ] })
180
184
  ]
181
185
  }
182
186
  );
183
187
  }
184
188
  export {
185
- W as DataTable
189
+ U as DataTable
186
190
  };
@@ -1,22 +1,21 @@
1
- import { jsxs as x, jsx as l, Fragment as Ne } from "react/jsx-runtime";
1
+ import { jsxs as x, jsx as l, Fragment as Se } from "react/jsx-runtime";
2
2
  import u from "react";
3
3
  import { Tabs as ze, TabsContent as Re, TabsList as Le, TabsTrigger as Ee } from "../../packages/ui/src/components/tabs.js";
4
- import { motion as Z } from "motion/react";
5
4
  import { cn as a } from "../../packages/ui/src/lib/utils.js";
6
- import { ScrollArea as K, ScrollBar as ee } from "../ScrollArea/ScrollArea.js";
7
- import { Popover as se } from "../Popover/index.js";
8
- import { MoreHorizontal as te } from "lucide-react";
9
- import { variantClasses as Oe, getColorClasses as We, getListBorderClasses as He, alignmentClasses as re, positionClasses as oe, sizeClasses as Ae, getUnderlinedTriggerClasses as Ve, getEnclosedTriggerClasses as Be, getEnclosedFillTriggerClasses as Ie } from "./classes.js";
10
- const Me = u.forwardRef((de, ne) => {
5
+ import { ScrollArea as K, ScrollBar as Z } from "../ScrollArea/ScrollArea.js";
6
+ import { Popover as ee } from "../Popover/index.js";
7
+ import { MoreHorizontal as se } from "lucide-react";
8
+ import { variantClasses as Oe, getColorClasses as Ae, getListBorderClasses as Ie, alignmentClasses as te, positionClasses as re, sizeClasses as We, getUnderlinedTriggerClasses as He, getEnclosedTriggerClasses as Ve, getEnclosedFillTriggerClasses as Be } from "./classes.js";
9
+ const oe = "ds:transition-[left,width,top,height] ds:duration-300 ds:ease-out motion-reduce:ds:transition-none", Me = u.forwardRef((de, ne) => {
11
10
  const {
12
11
  items: c,
13
12
  defaultActiveKey: D,
14
- activeKey: W,
13
+ activeKey: A,
15
14
  onChange: le,
16
15
  tabPosition: p = "top",
17
16
  size: ie = "md",
18
- alignment: P = "start",
19
- fullWidth: _ = !1,
17
+ alignment: _ = "start",
18
+ fullWidth: P = !1,
20
19
  overflowMode: n = "scroll",
21
20
  variant: e = "solid",
22
21
  color: o = "muted",
@@ -29,14 +28,14 @@ const Me = u.forwardRef((de, ne) => {
29
28
  width: 0,
30
29
  top: 0,
31
30
  height: 0
32
- }), [he, ge] = u.useState(W || D || c[0]?.key), [y, G] = u.useState(!1), [U, be] = u.useState(c.length), [H, A] = u.useState(!1), [pe, $] = u.useState(!1), [me, J] = u.useState(!1), C = W !== void 0 ? W : he, t = p === "left" || p === "right";
31
+ }), [he, be] = u.useState(A || D || c[0]?.key), [y, G] = u.useState(!1), [U, ge] = u.useState(c.length), [I, W] = u.useState(!1), [pe, $] = u.useState(!1), [me, J] = u.useState(!1), C = A !== void 0 ? A : he, t = p === "left" || p === "right";
33
32
  u.useLayoutEffect(() => {
34
33
  if (!n || n === "dropdown") return;
35
34
  const s = () => {
36
- const d = R.current, g = E.current;
37
- if (!d || !g) return;
38
- const m = t ? d.clientHeight : d.clientWidth, S = (t ? g.scrollHeight : g.scrollWidth) > m;
39
- G(S);
35
+ const d = R.current, b = E.current;
36
+ if (!d || !b) return;
37
+ const m = t ? d.clientHeight : d.clientWidth, N = (t ? b.scrollHeight : b.scrollWidth) > m;
38
+ G(N);
40
39
  };
41
40
  s();
42
41
  const r = new ResizeObserver(s);
@@ -48,21 +47,21 @@ const Me = u.forwardRef((de, ne) => {
48
47
  const s = () => {
49
48
  const d = R.current;
50
49
  if (!d) return;
51
- const g = t ? d.clientHeight : d.clientWidth;
50
+ const b = t ? d.clientHeight : d.clientWidth;
52
51
  let m = 0;
53
- const k = 48, S = 6, f = e === "enclosed-fill" || e === "bordered" || e === "pills" || e === "pill-stroke" || e === "text" || e === "outline" ? 4 : 0;
52
+ const k = 48, N = 6, f = e === "enclosed-fill" || e === "bordered" || e === "pills" || e === "pill-stroke" || e === "text" || e === "outline" ? 4 : 0;
54
53
  let i = 0;
55
54
  for (let h = 0; h < z.current.length; h++) {
56
55
  const T = z.current[h];
57
56
  if (!T) break;
58
- const N = t ? T.offsetHeight : T.offsetWidth, w = h > 0 ? f : 0, O = h < z.current.length - 1;
59
- if (m + N + w + (O ? k : 0) + S <= g)
60
- m += N + w, i++;
57
+ const S = t ? T.offsetHeight : T.offsetWidth, w = h > 0 ? f : 0, O = h < z.current.length - 1;
58
+ if (m + S + w + (O ? k : 0) + N <= b)
59
+ m += S + w, i++;
61
60
  else
62
61
  break;
63
62
  }
64
- const b = i < c.length;
65
- G(b), be(Math.max(1, i));
63
+ const g = i < c.length;
64
+ G(g), ge(Math.max(1, i));
66
65
  };
67
66
  s();
68
67
  const r = new ResizeObserver(s);
@@ -72,22 +71,22 @@ const Me = u.forwardRef((de, ne) => {
72
71
  r.disconnect();
73
72
  };
74
73
  }, [c, n, t, e]), u.useLayoutEffect(() => {
75
- const s = c.findIndex((g) => g.key === C), r = z.current[s], d = E.current;
74
+ const s = c.findIndex((b) => b.key === C), r = z.current[s], d = E.current;
76
75
  if (r && d) {
77
- const g = d.getBoundingClientRect(), m = r.getBoundingClientRect(), k = m.left - g.left, S = m.top - g.top;
76
+ const b = d.getBoundingClientRect(), m = r.getBoundingClientRect(), k = m.left - b.left, N = m.top - b.top;
78
77
  if (Y({
79
78
  left: k,
80
79
  width: m.width,
81
- top: S,
80
+ top: N,
82
81
  height: m.height
83
82
  }), n === "fade" && L.current) {
84
83
  const f = L.current.querySelector(
85
84
  "[data-radix-scroll-area-viewport]"
86
85
  );
87
86
  if (f) {
88
- const i = f.getBoundingClientRect(), b = r.getBoundingClientRect(), h = 96;
87
+ const i = f.getBoundingClientRect(), g = r.getBoundingClientRect(), h = 96;
89
88
  if (t) {
90
- const T = f.scrollTop, N = f.scrollHeight, w = i.height, O = b.top - i.top + T, B = b.height;
89
+ const T = f.scrollTop, S = f.scrollHeight, w = i.height, O = g.top - i.top + T, V = g.height;
91
90
  if (s === 0)
92
91
  f.scrollTo({
93
92
  top: 0,
@@ -95,11 +94,11 @@ const Me = u.forwardRef((de, ne) => {
95
94
  });
96
95
  else if (s === c.length - 1)
97
96
  f.scrollTo({
98
- top: N - w,
97
+ top: S - w,
99
98
  behavior: "smooth"
100
99
  });
101
100
  else {
102
- const F = O - w / 2 + B / 2, q = N - w, j = Math.max(
101
+ const F = O - w / 2 + V / 2, q = S - w, j = Math.max(
103
102
  h / 2,
104
103
  Math.min(F, q - h / 2)
105
104
  );
@@ -109,7 +108,7 @@ const Me = u.forwardRef((de, ne) => {
109
108
  });
110
109
  }
111
110
  } else {
112
- const T = f.scrollLeft, N = f.scrollWidth, w = i.width, O = b.left - i.left + T, B = b.width;
111
+ const T = f.scrollLeft, S = f.scrollWidth, w = i.width, O = g.left - i.left + T, V = g.width;
113
112
  if (s === 0)
114
113
  f.scrollTo({
115
114
  left: 0,
@@ -117,11 +116,11 @@ const Me = u.forwardRef((de, ne) => {
117
116
  });
118
117
  else if (s === c.length - 1)
119
118
  f.scrollTo({
120
- left: N - w,
119
+ left: S - w,
121
120
  behavior: "smooth"
122
121
  });
123
122
  else {
124
- const F = O - w / 2 + B / 2, q = N - w, j = Math.max(
123
+ const F = O - w / 2 + V / 2, q = S - w, j = Math.max(
125
124
  h / 2,
126
125
  Math.min(F, q - h / 2)
127
126
  );
@@ -144,22 +143,22 @@ const Me = u.forwardRef((de, ne) => {
144
143
  const d = () => {
145
144
  r !== null && cancelAnimationFrame(r), r = requestAnimationFrame(() => {
146
145
  if (t) {
147
- const i = s.scrollTop, b = s.scrollHeight, h = s.clientHeight;
148
- $(i > 5), J(i < b - h - 5);
146
+ const i = s.scrollTop, g = s.scrollHeight, h = s.clientHeight;
147
+ $(i > 5), J(i < g - h - 5);
149
148
  } else {
150
- const i = s.scrollLeft, b = s.scrollWidth, h = s.clientWidth;
151
- $(i > 5), J(i < b - h - 5);
149
+ const i = s.scrollLeft, g = s.scrollWidth, h = s.clientWidth;
150
+ $(i > 5), J(i < g - h - 5);
152
151
  }
153
152
  const k = c.findIndex(
154
153
  (i) => i.key === C
155
- ), S = z.current[k], f = E.current;
156
- if (S && f) {
157
- const i = f.getBoundingClientRect(), b = S.getBoundingClientRect(), h = b.left - i.left, T = b.top - i.top;
154
+ ), N = z.current[k], f = E.current;
155
+ if (N && f) {
156
+ const i = f.getBoundingClientRect(), g = N.getBoundingClientRect(), h = g.left - i.left, T = g.top - i.top;
158
157
  Y({
159
158
  left: h,
160
- width: b.width,
159
+ width: g.width,
161
160
  top: T,
162
- height: b.height
161
+ height: g.height
163
162
  });
164
163
  }
165
164
  r = null;
@@ -168,9 +167,9 @@ const Me = u.forwardRef((de, ne) => {
168
167
  d(), s.addEventListener("scroll", d, {
169
168
  passive: !0
170
169
  });
171
- const g = new ResizeObserver(d);
172
- return g.observe(s), () => {
173
- r !== null && cancelAnimationFrame(r), s.removeEventListener("scroll", d), g.disconnect();
170
+ const b = new ResizeObserver(d);
171
+ return b.observe(s), () => {
172
+ r !== null && cancelAnimationFrame(r), s.removeEventListener("scroll", d), b.disconnect();
174
173
  };
175
174
  }, [n, t, y, c, C]), u.useEffect(() => {
176
175
  if (n !== "scroll" && n !== "fade" || t) return;
@@ -185,13 +184,13 @@ const Me = u.forwardRef((de, ne) => {
185
184
  s.removeEventListener("wheel", r);
186
185
  };
187
186
  }, [n, t]);
188
- const I = (s) => {
189
- W === void 0 && ge(s), le?.(s);
187
+ const B = (s) => {
188
+ A === void 0 && be(s), le?.(s);
190
189
  }, ve = t ? "vertical" : "horizontal", Q = Oe[e], we = Q.list[t ? "vertical" : "horizontal"];
191
- let V = Q.trigger[t ? "vertical" : "horizontal"];
192
- e === "underlined" ? V = Ve(p) : e === "enclosed" ? V = Be(p) : e === "enclosed-fill" && (V = Ie(p));
193
- const xe = We(e, o), ye = He(e, o, p), Te = n === "dropdown" && y ? c.slice(0, U) : c, M = n === "dropdown" && y ? c.slice(U) : n === "fade" && y ? c : [], Ce = n === "dropdown" && y && M.length > 0, X = n === "dropdown" && y && M.some((s) => s.key === C), ke = (s, r = 0) => /* @__PURE__ */ l(Ne, { children: s.map((d, g) => {
194
- const m = r + g;
190
+ let H = Q.trigger[t ? "vertical" : "horizontal"];
191
+ e === "underlined" ? H = He(p) : e === "enclosed" ? H = Ve(p) : e === "enclosed-fill" && (H = Be(p));
192
+ const xe = Ae(e, o), ye = Ie(e, o, p), Te = n === "dropdown" && y ? c.slice(0, U) : c, M = n === "dropdown" && y ? c.slice(U) : n === "fade" && y ? c : [], Ce = n === "dropdown" && y && M.length > 0, X = n === "dropdown" && y && M.some((s) => s.key === C), ke = (s, r = 0) => /* @__PURE__ */ l(Se, { children: s.map((d, b) => {
193
+ const m = r + b;
195
194
  return /* @__PURE__ */ x(
196
195
  Ee,
197
196
  {
@@ -201,7 +200,7 @@ const Me = u.forwardRef((de, ne) => {
201
200
  value: d.key,
202
201
  disabled: d.disabled,
203
202
  className: a(
204
- V,
203
+ H,
205
204
  // Apply styles based on variant
206
205
  {
207
206
  // For sliding indicator variants, remove default background
@@ -213,7 +212,7 @@ const Me = u.forwardRef((de, ne) => {
213
212
  "ds:data-[state=active]:text-accent-foreground": (e === "bordered" || e === "pills") && o === "accent",
214
213
  "ds:data-[state=active]:text-destructive-foreground": (e === "bordered" || e === "pills") && o === "destructive",
215
214
  "ds:data-[state=active]:text-white": (e === "bordered" || e === "pills") && (o === "success" || o === "warning"),
216
- "ds:flex-1": _ && !t,
215
+ "ds:flex-1": P && !t,
217
216
  "ds:w-full ds:justify-start": t
218
217
  },
219
218
  // For other variants, apply normal color classes
@@ -228,14 +227,14 @@ const Me = u.forwardRef((de, ne) => {
228
227
  },
229
228
  d.key
230
229
  );
231
- }) }), Se = () => {
230
+ }) }), Ne = () => {
232
231
  const s = /* @__PURE__ */ x(
233
232
  Le,
234
233
  {
235
234
  ref: E,
236
235
  className: a(
237
- oe[p].list,
238
- Ae[ie][t ? "vertical" : "horizontal"],
236
+ re[p].list,
237
+ We[ie][t ? "vertical" : "horizontal"],
239
238
  we,
240
239
  ye,
241
240
  ce,
@@ -251,9 +250,9 @@ const Me = u.forwardRef((de, ne) => {
251
250
  children: [
252
251
  ke(Te),
253
252
  e === "underlined" && v.width > 0 && !X && /* @__PURE__ */ l(
254
- Z.div,
253
+ "div",
255
254
  {
256
- className: a("ds:absolute ds:rounded-full ds:z-10", {
255
+ className: a(oe, "ds:absolute ds:rounded-full ds:z-10", {
257
256
  // Horizontal positions (top/bottom)
258
257
  "ds:h-0.5 ds:bottom-0": p === "top",
259
258
  "ds:h-0.5 ds:top-0": p === "bottom",
@@ -269,24 +268,19 @@ const Me = u.forwardRef((de, ne) => {
269
268
  "ds:bg-success": o === "success",
270
269
  "ds:bg-warning": o === "warning"
271
270
  }),
272
- animate: t ? {
271
+ style: t ? {
273
272
  top: v.top,
274
273
  height: v.height
275
274
  } : {
276
275
  left: v.left,
277
276
  width: v.width
278
- },
279
- transition: {
280
- type: "spring",
281
- stiffness: 300,
282
- damping: 30
283
277
  }
284
278
  }
285
279
  ),
286
280
  (e === "solid" || e === "bordered" || e === "pills" || e === "pill-stroke") && v.width > 0 && !X && /* @__PURE__ */ l(
287
- Z.div,
281
+ "div",
288
282
  {
289
- className: a("ds:absolute ds:rounded-md ds:pointer-events-none ds:z-0", {
283
+ className: a(oe, "ds:absolute ds:rounded-md ds:pointer-events-none ds:z-0", {
290
284
  "ds:bg-background ds:shadow-sm": e === "solid",
291
285
  "ds:bg-primary": (e === "bordered" || e === "pills") && o === "primary",
292
286
  "ds:bg-secondary": (e === "bordered" || e === "pills") && o === "secondary",
@@ -303,16 +297,11 @@ const Me = u.forwardRef((de, ne) => {
303
297
  "ds:border ds:rounded-full ds:border-success": e === "pill-stroke" && o === "success",
304
298
  "ds:border ds:rounded-full ds:border-warning": e === "pill-stroke" && o === "warning"
305
299
  }),
306
- animate: {
300
+ style: {
307
301
  left: v.left,
308
302
  width: v.width,
309
303
  top: v.top,
310
304
  height: v.height
311
- },
312
- transition: {
313
- type: "spring",
314
- stiffness: 300,
315
- damping: 30
316
305
  }
317
306
  }
318
307
  )
@@ -330,7 +319,7 @@ const Me = u.forwardRef((de, ne) => {
330
319
  }),
331
320
  children: [
332
321
  s,
333
- /* @__PURE__ */ l(ee, { orientation: t ? "vertical" : "horizontal" })
322
+ /* @__PURE__ */ l(Z, { orientation: t ? "vertical" : "horizontal" })
334
323
  ]
335
324
  }
336
325
  ) : n === "dropdown" && Ce ? /* @__PURE__ */ x(
@@ -342,10 +331,10 @@ const Me = u.forwardRef((de, ne) => {
342
331
  children: [
343
332
  s,
344
333
  /* @__PURE__ */ l(
345
- se,
334
+ ee,
346
335
  {
347
- open: H,
348
- onOpenChange: A,
336
+ open: I,
337
+ onOpenChange: W,
349
338
  trigger: /* @__PURE__ */ l(
350
339
  "button",
351
340
  {
@@ -356,18 +345,18 @@ const Me = u.forwardRef((de, ne) => {
356
345
  "ds:hover:bg-accent ds:hover:text-accent-foreground",
357
346
  "ds:h-9 ds:px-3 ds:shrink-0",
358
347
  {
359
- "ds:bg-accent ds:text-accent-foreground": H
348
+ "ds:bg-accent ds:text-accent-foreground": I
360
349
  }
361
350
  ),
362
351
  "aria-label": "More tabs",
363
- children: /* @__PURE__ */ l(te, { className: "ds:h-4 ds:w-4" })
352
+ children: /* @__PURE__ */ l(se, { className: "ds:h-4 ds:w-4" })
364
353
  }
365
354
  ),
366
355
  content: /* @__PURE__ */ l("div", { className: a("ds:flex ds:flex-col ds:gap-1 ds:p-1"), children: M.map((r) => /* @__PURE__ */ x(
367
356
  "button",
368
357
  {
369
358
  onClick: () => {
370
- I(r.key), A(!1);
359
+ B(r.key), W(!1);
371
360
  },
372
361
  disabled: r.disabled,
373
362
  className: a(
@@ -420,7 +409,7 @@ const Me = u.forwardRef((de, ne) => {
420
409
  }),
421
410
  children: [
422
411
  s,
423
- /* @__PURE__ */ l(ee, { orientation: t ? "vertical" : "horizontal" })
412
+ /* @__PURE__ */ l(Z, { orientation: t ? "vertical" : "horizontal" })
424
413
  ]
425
414
  }
426
415
  ),
@@ -446,10 +435,10 @@ const Me = u.forwardRef((de, ne) => {
446
435
  }
447
436
  ),
448
437
  /* @__PURE__ */ l(
449
- se,
438
+ ee,
450
439
  {
451
- open: H,
452
- onOpenChange: A,
440
+ open: I,
441
+ onOpenChange: W,
453
442
  trigger: /* @__PURE__ */ l(
454
443
  "button",
455
444
  {
@@ -460,11 +449,11 @@ const Me = u.forwardRef((de, ne) => {
460
449
  "ds:hover:bg-accent ds:hover:text-accent-foreground",
461
450
  "ds:h-9 ds:px-3 ds:shrink-0",
462
451
  {
463
- "ds:bg-accent ds:text-accent-foreground": H
452
+ "ds:bg-accent ds:text-accent-foreground": I
464
453
  }
465
454
  ),
466
455
  "aria-label": "More tabs",
467
- children: /* @__PURE__ */ l(te, { className: "ds:h-4 ds:w-4" })
456
+ children: /* @__PURE__ */ l(se, { className: "ds:h-4 ds:w-4" })
468
457
  }
469
458
  ),
470
459
  content: (
@@ -478,7 +467,7 @@ const Me = u.forwardRef((de, ne) => {
478
467
  "button",
479
468
  {
480
469
  onClick: () => {
481
- I(r.key), A(!1);
470
+ B(r.key), W(!1);
482
471
  },
483
472
  disabled: r.disabled,
484
473
  className: a(
@@ -516,21 +505,21 @@ const Me = u.forwardRef((de, ne) => {
516
505
  ref: ne,
517
506
  defaultValue: D,
518
507
  value: C,
519
- onValueChange: I,
508
+ onValueChange: B,
520
509
  orientation: ve,
521
- className: a("ds:gap-2", oe[p].root, ae),
510
+ className: a("ds:gap-2", re[p].root, ae),
522
511
  children: [
523
512
  /* @__PURE__ */ l(
524
513
  "div",
525
514
  {
526
515
  ref: R,
527
516
  className: a("ds:flex", {
528
- [re[P].horizontal]: !t,
529
- [re[P].vertical]: t,
530
- "ds:w-full": (_ || n === "dropdown" || n === "fade") && !t,
517
+ [te[_].horizontal]: !t,
518
+ [te[_].vertical]: t,
519
+ "ds:w-full": (P || n === "dropdown" || n === "fade") && !t,
531
520
  "ds:overflow-hidden": n === "dropdown" || n === "fade"
532
521
  }),
533
- children: Se()
522
+ children: Ne()
534
523
  }
535
524
  ),
536
525
  c.map((s) => /* @__PURE__ */ l(