@yuno-payments/dashboard-design-system 0.0.167 → 0.0.170

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 (161) hide show
  1. package/dist/components/atoms/access-denied-alert/access-denied-alert.d.ts +0 -16
  2. package/dist/components/atoms/accordion/accordion.d.ts +0 -66
  3. package/dist/components/atoms/alert/alert.d.ts +1 -26
  4. package/dist/components/atoms/alert/alert.js +8 -9
  5. package/dist/components/atoms/avatar/avatar-group.d.ts +0 -28
  6. package/dist/components/atoms/avatar/avatar.d.ts +0 -25
  7. package/dist/components/atoms/avatar/avatar.js +9 -9
  8. package/dist/components/atoms/badge/badge.d.ts +2 -30
  9. package/dist/components/atoms/badge/badge.js +11 -27
  10. package/dist/components/atoms/button/button.d.ts +0 -44
  11. package/dist/components/atoms/card/card.d.ts +3 -137
  12. package/dist/components/atoms/card/card.js +28 -56
  13. package/dist/components/atoms/checkbox/checkbox.d.ts +2 -38
  14. package/dist/components/atoms/checkbox/checkbox.js +27 -61
  15. package/dist/components/atoms/combobox/combobox.d.ts +0 -18
  16. package/dist/components/atoms/combobox/combobox.js +41 -41
  17. package/dist/components/atoms/combobox/types.d.ts +1 -90
  18. package/dist/components/atoms/currency-field/currency-field.d.ts +0 -38
  19. package/dist/components/atoms/currency-field/currency-field.js +19 -22
  20. package/dist/components/atoms/date-picker/date-picker.d.ts +0 -15
  21. package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +0 -15
  22. package/dist/components/atoms/dots-menu/dots-menu.d.ts +0 -16
  23. package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
  24. package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +0 -52
  25. package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +0 -50
  26. package/dist/components/atoms/field/field.d.ts +0 -55
  27. package/dist/components/atoms/field/field.js +46 -53
  28. package/dist/components/atoms/filter/filter-date-range.d.ts +2 -12
  29. package/dist/components/atoms/filter/filter-date-range.js +168 -203
  30. package/dist/components/atoms/filter/filter.d.ts +0 -6
  31. package/dist/components/atoms/filter/filter.js +76 -91
  32. package/dist/components/atoms/filter/index.d.ts +1 -1
  33. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +2 -208
  34. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +160 -214
  35. package/dist/components/atoms/icon/icon-list.d.ts +0 -5
  36. package/dist/components/atoms/icon/icon-list.js +384 -394
  37. package/dist/components/atoms/icon/icon.d.ts +0 -29
  38. package/dist/components/atoms/index.d.ts +2 -3
  39. package/dist/components/atoms/label/index.d.ts +1 -1
  40. package/dist/components/atoms/link/link.d.ts +0 -20
  41. package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
  42. package/dist/components/atoms/multi-select/multi-select.js +6 -6
  43. package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +0 -16
  44. package/dist/components/atoms/multi-values-field/multi-values-field.js +87 -109
  45. package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +0 -81
  46. package/dist/components/atoms/otp-field/otp-field.d.ts +0 -32
  47. package/dist/components/atoms/password-field/password-field.d.ts +0 -23
  48. package/dist/components/atoms/password-field/password-field.js +1 -1
  49. package/dist/components/atoms/progress/progress.d.ts +0 -15
  50. package/dist/components/atoms/protected-field/protected-field.d.ts +0 -10
  51. package/dist/components/atoms/protected-field/protected-field.types.d.ts +0 -14
  52. package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
  53. package/dist/components/atoms/radio-group/radio-group.d.ts +1 -50
  54. package/dist/components/atoms/radio-group/radio-group.js +12 -13
  55. package/dist/components/atoms/search-field/search-field.d.ts +0 -14
  56. package/dist/components/atoms/search-field/search-field.js +17 -17
  57. package/dist/components/atoms/search-field/search-field.types.d.ts +0 -57
  58. package/dist/components/atoms/select/index.d.ts +0 -2
  59. package/dist/components/atoms/select/select.d.ts +1 -83
  60. package/dist/components/atoms/select/select.js +21 -21
  61. package/dist/components/atoms/separator/separator.d.ts +0 -17
  62. package/dist/components/atoms/skeleton/index.d.ts +0 -9
  63. package/dist/components/atoms/switch/switch.d.ts +2 -56
  64. package/dist/components/atoms/switch/switch.js +32 -64
  65. package/dist/components/atoms/tabs/index.d.ts +0 -16
  66. package/dist/components/atoms/textarea/textarea.d.ts +0 -32
  67. package/dist/components/atoms/textarea/textarea.js +1 -1
  68. package/dist/components/atoms/time-picker/time-picker.d.ts +2 -73
  69. package/dist/components/atoms/time-picker/time-picker.js +3 -218
  70. package/dist/components/atoms/toaster/index.d.ts +0 -15
  71. package/dist/components/atoms/toggle-group/toggle-group.d.ts +1 -26
  72. package/dist/components/atoms/toggle-group/toggle-group.js +14 -15
  73. package/dist/components/atoms/tooltip/tooltip.d.ts +2 -53
  74. package/dist/components/atoms/typography/typography.d.ts +0 -18
  75. package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +0 -50
  76. package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
  77. package/dist/components/molecules/dialog-content/dialog-content.d.ts +0 -16
  78. package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +0 -20
  79. package/dist/components/molecules/dialog-header/dialog-header.d.ts +0 -31
  80. package/dist/components/molecules/empty/empty-icon.js +6 -6
  81. package/dist/components/molecules/empty/empty.d.ts +1 -16
  82. package/dist/components/molecules/empty/empty.js +34 -37
  83. package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +0 -17
  84. package/dist/components/molecules/pagination/pagination.d.ts +0 -49
  85. package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +0 -41
  86. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
  87. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
  88. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +0 -18
  89. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
  90. package/dist/components/organisms/data-table/components/data-table-body.d.ts +0 -18
  91. package/dist/components/organisms/data-table/components/data-table-header.d.ts +0 -12
  92. package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
  93. package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +0 -24
  94. package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
  95. package/dist/components/organisms/data-table/data-table.d.ts +4 -133
  96. package/dist/components/organisms/data-table/data-table.js +100 -132
  97. package/dist/components/organisms/data-table/data-table.types.d.ts +26 -35
  98. package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +41 -57
  99. package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +2 -8
  100. package/dist/components/organisms/data-table/hooks/use-data-table-state.js +47 -82
  101. package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +2 -8
  102. package/dist/components/organisms/data-table/utils/data-table-constants.js +10 -16
  103. package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +0 -1652
  104. package/dist/components/organisms/data-table/utils/data-table-styles.js +14 -29
  105. package/dist/components/organisms/dialog/dialog.d.ts +1 -67
  106. package/dist/components/organisms/dialog/dialog.js +61 -78
  107. package/dist/components/organisms/index.d.ts +0 -2
  108. package/dist/components/organisms/sheet/sheet.d.ts +0 -69
  109. package/dist/components/organisms/sheet/sheet.js +33 -34
  110. package/dist/index.css +1 -1
  111. package/dist/index.d.ts +0 -2
  112. package/dist/index.js +162 -173
  113. package/dist/vendor/shadcn/avatar.js +19 -19
  114. package/dist/vendor/shadcn/badge.js +15 -15
  115. package/dist/vendor/shadcn/card.js +7 -7
  116. package/dist/vendor/shadcn/date-picker.d.ts +2 -2
  117. package/dist/vendor/shadcn/date-picker.js +1 -1
  118. package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
  119. package/dist/vendor/shadcn/date-range-picker.js +1 -1
  120. package/dist/vendor/shadcn/dialog.js +2 -2
  121. package/dist/vendor/shadcn/input-group.js +17 -17
  122. package/dist/vendor/shadcn/input.js +7 -7
  123. package/dist/vendor/shadcn/popover.js +1 -1
  124. package/dist/vendor/shadcn/select.js +2 -2
  125. package/dist/vendor/shadcn/sonner.d.ts +1 -26
  126. package/dist/vendor/shadcn/sonner.js +8 -12
  127. package/dist/vendor/shadcn/table.js +30 -30
  128. package/dist/vendor/shadcn/textarea.js +9 -9
  129. package/dist/vendor/shadcn/time-picker.d.ts +2 -1
  130. package/dist/vendor/shadcn/time-picker.js +23 -17
  131. package/dist/vendor/shadcn/toggle.js +13 -13
  132. package/dist/vendor/shadcn/tooltip.js +15 -25
  133. package/package.json +1 -1
  134. package/dist/components/atoms/icon/aida-logo.d.ts +0 -3
  135. package/dist/components/atoms/icon/aida-logo.js +0 -64
  136. package/dist/components/atoms/label/label.d.ts +0 -11
  137. package/dist/components/atoms/label/label.js +0 -28
  138. package/dist/components/atoms/loading/index.d.ts +0 -1
  139. package/dist/components/atoms/loading/loading.d.ts +0 -39
  140. package/dist/components/atoms/loading/loading.js +0 -37
  141. package/dist/components/atoms/select/search-select.d.ts +0 -22
  142. package/dist/components/atoms/select/search-select.js +0 -201
  143. package/dist/components/organisms/tutorial/index.d.ts +0 -2
  144. package/dist/components/organisms/tutorial/tutorial.d.ts +0 -16
  145. package/dist/components/organisms/tutorial/tutorial.js +0 -114
  146. package/dist/components/organisms/tutorial/tutorial.types.d.ts +0 -15
  147. package/dist/hooks/index.d.ts +0 -3
  148. package/dist/hooks/use-body-scroll-lock.d.ts +0 -13
  149. package/dist/hooks/use-escape-key.d.ts +0 -14
  150. package/dist/hooks/use-media-query.d.ts +0 -20
  151. package/dist/hooks/use-media-query.js +0 -21
  152. package/dist/lib/notification-alert.d.ts +0 -42
  153. package/dist/lib/notification-alert.js +0 -75
  154. package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +0 -8
  155. package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +0 -8
  156. package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +0 -8
  157. package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +0 -8
  158. package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +0 -30
  159. package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +0 -36
  160. package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +0 -36
  161. package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +0 -30
@@ -1,6 +1,6 @@
1
1
  import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
- import { Icon as n } from "../../../../atoms/icon/icon.js";
3
- import { DropdownMenuContent as g, DropdownMenuItem as i, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
2
+ import { DropdownMenuContent as g, DropdownMenuItem as n, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
3
+ import { Icon as i } from "../../../../atoms/icon/icon.js";
4
4
  function p({
5
5
  column: s,
6
6
  isLastVisibleColumn: r,
@@ -9,63 +9,63 @@ function p({
9
9
  const l = s.getCanSort(), d = s.getCanPin(), x = s.getCanHide(), t = s.getIsPinned(), c = s.getIsSorted();
10
10
  return /* @__PURE__ */ e.jsxs(g, { align: "start", children: [
11
11
  l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
12
- /* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!1), children: [
13
- /* @__PURE__ */ e.jsx(n, { name: "ArrowUp", size: "sm" }),
12
+ /* @__PURE__ */ e.jsxs(n, { onClick: () => s.toggleSorting(!1), children: [
13
+ /* @__PURE__ */ e.jsx(i, { name: "ArrowUp", size: "sm" }),
14
14
  "Ascending"
15
15
  ] }),
16
- /* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!0), children: [
17
- /* @__PURE__ */ e.jsx(n, { name: "ArrowDown", size: "sm" }),
16
+ /* @__PURE__ */ e.jsxs(n, { onClick: () => s.toggleSorting(!0), children: [
17
+ /* @__PURE__ */ e.jsx(i, { name: "ArrowDown", size: "sm" }),
18
18
  "Descending"
19
19
  ] }),
20
- c && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.clearSorting(), children: [
21
- /* @__PURE__ */ e.jsx(n, { name: "X", size: "sm" }),
20
+ c && /* @__PURE__ */ e.jsxs(n, { onClick: () => s.clearSorting(), children: [
21
+ /* @__PURE__ */ e.jsx(i, { name: "X", size: "sm" }),
22
22
  "Clear sorting"
23
23
  ] }),
24
24
  /* @__PURE__ */ e.jsx(o, {})
25
25
  ] }),
26
26
  d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
27
27
  /* @__PURE__ */ e.jsxs(
28
- i,
28
+ n,
29
29
  {
30
30
  onClick: () => s.pin("left"),
31
31
  disabled: t === "left",
32
32
  children: [
33
- /* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
33
+ /* @__PURE__ */ e.jsx(i, { name: "PushPinSimple", size: "sm" }),
34
34
  "Pin to the left"
35
35
  ]
36
36
  }
37
37
  ),
38
38
  /* @__PURE__ */ e.jsxs(
39
- i,
39
+ n,
40
40
  {
41
41
  onClick: () => s.pin("right"),
42
42
  disabled: t === "right",
43
43
  children: [
44
- /* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
44
+ /* @__PURE__ */ e.jsx(i, { name: "PushPinSimple", size: "sm" }),
45
45
  "Pin to the right"
46
46
  ]
47
47
  }
48
48
  ),
49
- t && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.pin(!1), children: [
50
- /* @__PURE__ */ e.jsx(n, { name: "PushPinSimpleSlash", size: "sm" }),
49
+ t && /* @__PURE__ */ e.jsxs(n, { onClick: () => s.pin(!1), children: [
50
+ /* @__PURE__ */ e.jsx(i, { name: "PushPinSimpleSlash", size: "sm" }),
51
51
  "Unpin"
52
52
  ] }),
53
53
  /* @__PURE__ */ e.jsx(o, {})
54
54
  ] }),
55
55
  x && /* @__PURE__ */ e.jsxs(
56
- i,
56
+ n,
57
57
  {
58
58
  onClick: () => s.toggleVisibility(!1),
59
59
  disabled: r,
60
60
  children: [
61
- /* @__PURE__ */ e.jsx(n, { name: "EyeSlash", size: "sm" }),
61
+ /* @__PURE__ */ e.jsx(i, { name: "EyeSlash", size: "sm" }),
62
62
  "Hide",
63
63
  r && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: "(Last column)" })
64
64
  ]
65
65
  }
66
66
  ),
67
- /* @__PURE__ */ e.jsxs(i, { onClick: a, children: [
68
- /* @__PURE__ */ e.jsx(n, { name: "Columns", size: "sm" }),
67
+ /* @__PURE__ */ e.jsxs(n, { onClick: a, children: [
68
+ /* @__PURE__ */ e.jsx(i, { name: "Columns", size: "sm" }),
69
69
  "Manage columns"
70
70
  ] })
71
71
  ] });
@@ -1,27 +1,9 @@
1
1
  import { Column, Table } from '@tanstack/react-table';
2
- /**
3
- * Props for the DataTableColumnHeader component
4
- */
5
2
  interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
6
- /**
7
- * TanStack Table column instance
8
- */
9
3
  column: Column<TData, TValue>;
10
- /**
11
- * TanStack Table instance
12
- */
13
4
  table: Table<TData>;
14
- /**
15
- * Column header title text
16
- */
17
5
  title: string;
18
- /**
19
- * Optional info/tooltip text
20
- */
21
6
  info?: string;
22
7
  }
23
- /**
24
- * Column header component with sorting, pinning, and visibility controls
25
- */
26
8
  export declare function DataTableColumnHeader<TData, TValue>({ column, table, title, className, info, }: DataTableColumnHeaderProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
27
9
  export {};
@@ -1,10 +1,10 @@
1
1
  import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
- import { Icon as b } from "../../../../atoms/icon/icon.js";
3
2
  import { cn as m } from "../../../../../lib/utils.js";
4
- import { useColumnHeader as D } from "../../hooks/use-column-header.js";
5
- import { DataTableColumnHeaderMenu as O } from "./data-table-column-header-menu.js";
6
- import { DataTableManageColumnsDialog as v } from "../dialogs/data-table-manage-columns-dialog.js";
7
- import { DataTableColumnHeaderContent as H } from "./data-table-column-header-content.js";
3
+ import { useColumnHeader as b } from "../../hooks/use-column-header.js";
4
+ import { DataTableColumnHeaderMenu as D } from "./data-table-column-header-menu.js";
5
+ import { DataTableManageColumnsDialog as O } from "../dialogs/data-table-manage-columns-dialog.js";
6
+ import { DataTableColumnHeaderContent as v } from "./data-table-column-header-content.js";
7
+ import { Icon as H } from "../../../../atoms/icon/icon.js";
8
8
  import { DropdownMenu as I } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
9
9
  function z({
10
10
  column: o,
@@ -28,10 +28,10 @@ function z({
28
28
  visibleColumnsCount: j,
29
29
  isLastVisibleColumn: M,
30
30
  handleManageColumnsClick: h
31
- } = D(o, l);
31
+ } = b(o, l);
32
32
  return !i && !x ? /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-2", a), children: [
33
33
  n && /* @__PURE__ */ e.jsx(
34
- b,
34
+ H,
35
35
  {
36
36
  name: "Info",
37
37
  size: "sm",
@@ -43,7 +43,7 @@ function z({
43
43
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
44
44
  /* @__PURE__ */ e.jsx("div", { className: m("flex items-center gap-2", a), children: /* @__PURE__ */ e.jsxs(I, { open: t, onOpenChange: p, children: [
45
45
  /* @__PURE__ */ e.jsx(
46
- H,
46
+ v,
47
47
  {
48
48
  title: s,
49
49
  info: n,
@@ -57,7 +57,7 @@ function z({
57
57
  }
58
58
  ),
59
59
  /* @__PURE__ */ e.jsx(
60
- O,
60
+ D,
61
61
  {
62
62
  column: o,
63
63
  isLastVisibleColumn: M,
@@ -66,7 +66,7 @@ function z({
66
66
  )
67
67
  ] }) }),
68
68
  /* @__PURE__ */ e.jsx(
69
- v,
69
+ O,
70
70
  {
71
71
  isOpen: d,
72
72
  onOpenChange: C,
@@ -1,27 +1,9 @@
1
1
  import { Table } from '@tanstack/react-table';
2
- /**
3
- * Props for the DataTableBody component
4
- */
5
2
  interface DataTableBodyProps<TData> {
6
- /**
7
- * TanStack Table instance
8
- */
9
3
  table: Table<TData>;
10
- /**
11
- * Whether column resizing is enabled
12
- */
13
4
  enableColumnResizing?: boolean;
14
- /**
15
- * Callback fired when a row is clicked
16
- */
17
5
  onRowClick?: (row: TData) => void;
18
- /**
19
- * Fixed height for each row in pixels
20
- */
21
6
  rowHeight?: number;
22
7
  }
23
- /**
24
- * Table body component that renders data rows
25
- */
26
8
  export declare function DataTableBody<TData>({ table, enableColumnResizing, onRowClick, rowHeight, }: DataTableBodyProps<TData>): import("react/jsx-runtime").JSX.Element;
27
9
  export {};
@@ -1,19 +1,7 @@
1
1
  import { Table } from '@tanstack/react-table';
2
- /**
3
- * Props for the DataTableHeader component
4
- */
5
2
  interface DataTableHeaderProps<TData> {
6
- /**
7
- * TanStack Table instance
8
- */
9
3
  table: Table<TData>;
10
- /**
11
- * Whether column resizing is enabled
12
- */
13
4
  enableColumnResizing?: boolean;
14
5
  }
15
- /**
16
- * Renders the table header with sortable and resizable columns
17
- */
18
6
  export declare function DataTableHeader<TData>({ table, enableColumnResizing, }: DataTableHeaderProps<TData>): import("react/jsx-runtime").JSX.Element;
19
7
  export {};
@@ -1,15 +1,15 @@
1
1
  import { j as e } from "../../../../_virtual/jsx-runtime.js";
2
- import { TableHeader as i, TableRow as m } from "../../../../vendor/shadcn/table.js";
3
- import { DataTableHeaderCell as o } from "./cells/data-table-header-cell.js";
2
+ import { TableHeader as t, TableRow as i } from "../../../../vendor/shadcn/table.js";
3
+ import { DataTableHeaderCell as m } from "./cells/data-table-header-cell.js";
4
4
  function p({
5
- table: s,
6
- enableColumnResizing: l
5
+ table: l,
6
+ enableColumnResizing: s
7
7
  }) {
8
- return /* @__PURE__ */ e.jsx(i, { children: s.getHeaderGroups().map((a) => /* @__PURE__ */ e.jsx(m, { className: "bg-surface", children: a.headers.map((r) => /* @__PURE__ */ e.jsx(
9
- o,
8
+ return /* @__PURE__ */ e.jsx(t, { children: l.getHeaderGroups().map((a) => /* @__PURE__ */ e.jsx(i, { className: "bg-neutral-50", children: a.headers.map((r) => /* @__PURE__ */ e.jsx(
9
+ m,
10
10
  {
11
11
  header: r,
12
- enableColumnResizing: l ?? !1
12
+ enableColumnResizing: s ?? !1
13
13
  },
14
14
  r.id
15
15
  )) }, a.id)) });
@@ -1,34 +1,10 @@
1
1
  import { DataTableColumnDef, DataTableActionsConfig } from '../../data-table.types';
2
- /**
3
- * Props for the DataTableLoading component
4
- */
5
2
  interface DataTableLoadingProps<TData, TValue = unknown> {
6
- /**
7
- * Column definitions to determine header structure
8
- */
9
3
  columns: DataTableColumnDef<TData, TValue>[];
10
- /**
11
- * Number of skeleton rows to display
12
- * @default 5
13
- */
14
4
  rowsCount?: number;
15
- /**
16
- * Whether checkbox selection column is enabled
17
- * @default false
18
- */
19
5
  checkboxSelection?: boolean;
20
- /**
21
- * Actions configuration to determine if actions column should be shown
22
- */
23
6
  actions?: DataTableActionsConfig<TData>;
24
- /**
25
- * Fixed height for each skeleton row in pixels
26
- */
27
7
  rowHeight?: number;
28
8
  }
29
- /**
30
- * Loading state component for DataTable showing skeleton rows
31
- * Displays a table structure with skeleton loaders matching the expected column layout
32
- */
33
9
  export declare function DataTableLoading<TData, TValue = unknown>({ columns, rowsCount, checkboxSelection, actions, rowHeight, }: DataTableLoadingProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
34
10
  export {};
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
- import { Table as u, TableHeader as f, TableRow as a, TableHead as x, TableBody as p, TableCell as h } from "../../../../../vendor/shadcn/table.js";
2
+ import { Table as u, TableHeader as x, TableRow as a, TableHead as f, TableBody as p, TableCell as h } from "../../../../../vendor/shadcn/table.js";
3
3
  import { Skeleton as o } from "../../../../../vendor/shadcn/skeleton.js";
4
4
  function j(s) {
5
5
  return typeof s == "object" && s !== null && "title" in s && typeof s.title == "string";
@@ -13,20 +13,20 @@ function v({
13
13
  rowsCount: l = 5,
14
14
  checkboxSelection: c = !1,
15
15
  actions: d,
16
- rowHeight: t
16
+ rowHeight: i
17
17
  }) {
18
18
  const n = [];
19
19
  return c && n.push(null), s.forEach((r) => {
20
20
  n.push(b(r));
21
21
  }), d && n.push("Actions"), /* @__PURE__ */ e.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ e.jsxs(u, { children: [
22
- /* @__PURE__ */ e.jsx(f, { children: /* @__PURE__ */ e.jsx(a, { className: "bg-surface", children: n.map((r, i) => /* @__PURE__ */ e.jsx(x, { children: r ? /* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium", children: r }) : /* @__PURE__ */ e.jsx(o, { className: "h-4 w-4" }) }, i)) }) }),
23
- /* @__PURE__ */ e.jsx(p, { children: Array.from({ length: l }).map((r, i) => /* @__PURE__ */ e.jsx(
22
+ /* @__PURE__ */ e.jsx(x, { children: /* @__PURE__ */ e.jsx(a, { className: "bg-neutral-50", children: n.map((r, t) => /* @__PURE__ */ e.jsx(f, { children: r ? /* @__PURE__ */ e.jsx("div", { className: "text-xs font-medium", children: r }) : /* @__PURE__ */ e.jsx(o, { className: "h-4 w-4" }) }, t)) }) }),
23
+ /* @__PURE__ */ e.jsx(p, { children: Array.from({ length: l }).map((r, t) => /* @__PURE__ */ e.jsx(
24
24
  a,
25
25
  {
26
- style: { height: t ? `${t}px` : void 0 },
26
+ style: { height: i ? `${i}px` : void 0 },
27
27
  children: n.map((T, m) => /* @__PURE__ */ e.jsx(h, { children: /* @__PURE__ */ e.jsx(o, { className: "h-4 w-[80px]" }) }, m))
28
28
  },
29
- i
29
+ t
30
30
  )) })
31
31
  ] }) }) });
32
32
  }
@@ -1,151 +1,22 @@
1
1
  import { ColumnResizeMode } from '@tanstack/react-table';
2
- import { DataTableActionsConfig, DataTableColumnDef } from './data-table.types';
3
- import { EmptyProps } from '../../molecules';
4
- /**
5
- * Props for the DataTable component
6
- */
2
+ import { DataTableActionsConfig, DataTableColumnDef, DataTableEmptyConfig } from './data-table.types';
7
3
  export interface DataTableProps<TData, TValue> {
8
- /**
9
- * Column definitions for the table
10
- */
11
4
  columns: DataTableColumnDef<TData, TValue>[];
12
- /**
13
- * Array of data to display in the table
14
- */
15
5
  data: TData[];
16
- /**
17
- * Whether the table is in a loading state
18
- * @default false
19
- */
20
6
  isLoading?: boolean;
21
- /**
22
- * Configuration for the empty state when no data is available
23
- */
24
- empty?: EmptyProps;
25
- /**
26
- * Whether to enable checkbox selection column
27
- * @default false
28
- */
7
+ empty?: DataTableEmptyConfig;
29
8
  checkboxSelection?: boolean;
30
- /**
31
- * Controlled row selection state (optional)
32
- * If provided, component operates in controlled mode
33
- */
34
- rowSelection?: import('@tanstack/react-table').RowSelectionState;
35
- /**
36
- * Callback fired when row selection changes
37
- * In controlled mode, you must update the rowSelection prop
38
- */
39
- onRowSelectionChange?: (rowSelectionState: import('@tanstack/react-table').RowSelectionState, selectedRows: TData[]) => void;
40
- /**
41
- * Whether to enable column sorting
42
- * @default true
43
- */
9
+ onRowSelectionChange?: (selectedRows: TData[]) => void;
44
10
  enableSorting?: boolean;
45
- /**
46
- * Whether sorting is handled manually (server-side)
47
- * @default false
48
- */
49
11
  manualSorting?: boolean;
50
- /**
51
- * Controlled sorting state (optional)
52
- * If provided, component operates in controlled mode
53
- */
54
- sorting?: import('@tanstack/react-table').SortingState;
55
- /**
56
- * Callback when sorting changes (required for controlled mode)
57
- */
58
- onSortingChange?: (sorting: import('@tanstack/react-table').SortingState) => void;
59
- /**
60
- * Whether to enable column filtering
61
- * @default false
62
- */
63
12
  enableColumnFilters?: boolean;
64
- /**
65
- * Whether to enable column resizing
66
- * @default true
67
- */
68
13
  enableColumnResizing?: boolean;
69
- /**
70
- * Column resize mode: 'onChange' or 'onEnd'
71
- * @default 'onChange'
72
- */
73
14
  columnResizeMode?: ColumnResizeMode;
74
- /**
75
- * Whether to enable column pinning
76
- * @default true
77
- */
78
- enableColumnPinning?: boolean;
79
- /**
80
- * Callback fired when a row is clicked
81
- */
82
15
  onRowClick?: (row: TData) => void;
83
- /**
84
- * Configuration for actions column (always pinned to the right)
85
- */
86
16
  actions?: DataTableActionsConfig<TData>;
87
- /**
88
- * Fixed height for the table container
89
- */
90
17
  height?: string | number;
91
- /**
92
- * Height for each row in pixels
93
- * @default 52
94
- */
95
18
  rowHeight?: number;
96
- /**
97
- * Additional CSS classes for the container
98
- */
99
19
  className?: string;
100
- /**
101
- * Unique key for persisting table state in localStorage
102
- */
103
20
  persistKey?: string;
104
- /**
105
- * Initial settings to load (from backend/profile)
106
- * Takes precedence over localStorage
107
- */
108
- initialSettings?: import('./data-table.types').DataTableSettings;
109
- /**
110
- * Callback when table settings change (for syncing to backend)
111
- */
112
- onUpdate?: (settings: import('./data-table.types').DataTableSettings) => void;
113
21
  }
114
- /**
115
- * Advanced data table component built on TanStack Table.
116
- * Features sorting, filtering, column resizing, row selection, and loading/empty states.
117
- * Supports column pinning, visibility control, and state persistence.
118
- *
119
- * @example
120
- * ```tsx
121
- * // Uncontrolled selection
122
- * <DataTable
123
- * columns={[
124
- * { accessorKey: 'name', header: 'Name' },
125
- * { accessorKey: 'email', header: 'Email' }
126
- * ]}
127
- * data={users}
128
- * checkboxSelection
129
- * onRowSelectionChange={(rowSelectionState, selectedRows) => {
130
- * console.log('Selected rows:', selectedRows);
131
- * }}
132
- * actions={{
133
- * items: [{ label: 'Edit', onClick: (row) => editUser(row) }]
134
- * }}
135
- * />
136
- *
137
- * // Controlled selection
138
- * const [rowSelection, setRowSelection] = useState({});
139
- * <DataTable
140
- * columns={columns}
141
- * data={users}
142
- * checkboxSelection
143
- * rowSelection={rowSelection}
144
- * onRowSelectionChange={(newRowSelection, selectedRows) => {
145
- * setRowSelection(newRowSelection);
146
- * console.log('Selected rows:', selectedRows);
147
- * }}
148
- * />
149
- * ```
150
- */
151
- export declare function DataTable<TData, TValue>({ columns, data, isLoading, empty, checkboxSelection, rowSelection: externalRowSelection, onRowSelectionChange, enableSorting, manualSorting, sorting: externalSorting, onSortingChange: externalOnSortingChange, enableColumnFilters, enableColumnResizing, columnResizeMode, enableColumnPinning, onRowClick, actions, height, rowHeight, className, persistKey, initialSettings, onUpdate, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
22
+ export declare function DataTable<TData, TValue>({ columns, data, isLoading, empty, checkboxSelection, onRowSelectionChange, enableSorting, manualSorting, enableColumnFilters, enableColumnResizing, columnResizeMode, onRowClick, actions, height, rowHeight, className, persistKey, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;