@konstructio/ui 0.1.2-alpha.65 → 0.1.2-alpha.67

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 (89) hide show
  1. package/dist/{DayPicker-PUEUVAST.js → DayPicker-CaeUXRCF.js} +475 -470
  2. package/dist/assets/icons/components/AlertOutline.d.ts +3 -0
  3. package/dist/assets/icons/components/AlertOutline.js +28 -0
  4. package/dist/assets/icons/components/index.d.ts +1 -0
  5. package/dist/assets/icons/components/index.js +126 -124
  6. package/dist/assets/icons/index.js +122 -120
  7. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  8. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  9. package/dist/components/AlertDialog/components/index.js +1 -1
  10. package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
  11. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  12. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  13. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.js +51 -51
  15. package/dist/components/Command/Command.js +1 -1
  16. package/dist/components/Command/components/Command.js +1 -1
  17. package/dist/components/Command/components/CommandEmpty.js +1 -1
  18. package/dist/components/Command/components/CommandGroup.js +1 -1
  19. package/dist/components/Command/components/CommandInput.js +1 -1
  20. package/dist/components/Command/components/CommandItem.js +1 -1
  21. package/dist/components/Command/components/CommandList.js +1 -1
  22. package/dist/components/Command/components/CommandSeparator.js +1 -1
  23. package/dist/components/Command/components/DialogContent.js +1 -1
  24. package/dist/components/Command/components/DialogOverlay.js +1 -1
  25. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  26. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  27. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  28. package/dist/components/Datepicker/DatePicker.js +1 -1
  29. package/dist/components/Drawer/components/index.js +6 -6
  30. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -0
  31. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  32. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  33. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  34. package/dist/components/ProgressBar/ProgressBar.d.ts +0 -17
  35. package/dist/components/ProgressBar/ProgressBar.js +38 -59
  36. package/dist/components/ProgressBar/ProgressBar.types.d.ts +12 -28
  37. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +3 -3
  38. package/dist/components/ProgressBar/ProgressBar.variants.js +23 -24
  39. package/dist/components/Range/Range.js +1 -1
  40. package/dist/components/Slider/Slider.js +1 -1
  41. package/dist/components/Spinner/Spinner.d.ts +4 -0
  42. package/dist/components/Spinner/Spinner.js +57 -0
  43. package/dist/components/Spinner/Spinner.types.d.ts +13 -0
  44. package/dist/components/Spinner/Spinner.variants.d.ts +6 -0
  45. package/dist/components/Spinner/Spinner.variants.js +54 -0
  46. package/dist/components/Switch/Switch.js +47 -47
  47. package/dist/components/Tabs/Tabs.js +1 -1
  48. package/dist/components/Tabs/components/Content.js +1 -1
  49. package/dist/components/Tabs/components/List.js +1 -1
  50. package/dist/components/Tabs/components/Trigger.js +1 -1
  51. package/dist/components/Toast/Toast.js +9 -9
  52. package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +5 -0
  53. package/dist/components/VirtualizedTable/VirtualizedTable.js +83 -71
  54. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +5 -0
  55. package/dist/components/VirtualizedTable/components/Body/Body.js +56 -53
  56. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
  57. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +2 -2
  58. package/dist/components/VirtualizedTable/contexts/table.context.d.ts +4 -1
  59. package/dist/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
  60. package/dist/components/VirtualizedTable/contexts/table.provider.js +192 -108
  61. package/dist/components/VirtualizedTable/contexts/table.types.d.ts +4 -1
  62. package/dist/components/VirtualizedTable/events/index.d.ts +12 -0
  63. package/dist/components/VirtualizedTable/events/index.js +29 -0
  64. package/dist/components/index.d.ts +3 -0
  65. package/dist/components/index.js +98 -91
  66. package/dist/icons.d.ts +1 -1
  67. package/dist/icons.js +122 -120
  68. package/dist/{index-DKfEnhKr.js → index--l0zux8V.js} +2 -2
  69. package/dist/{index-AV6ZtGhy.js → index-3fEdeexs.js} +1 -1
  70. package/dist/{index-CeZcoQDw.js → index-9a-FL_6D.js} +6 -6
  71. package/dist/{index-Dy59FQl5.js → index-BKMaItIC.js} +1 -1
  72. package/dist/{index-DtEcCIrM.js → index-BRXMsxSL.js} +1 -1
  73. package/dist/{index-DMb4KD0b.js → index-CESXsoMn.js} +1 -1
  74. package/dist/{index-BG8O18ZY.js → index-CJnS4BVW.js} +1 -1
  75. package/dist/{index-vcSp8YRZ.js → index-Cmf-IG4l.js} +10 -10
  76. package/dist/{index-Byr10W8m.js → index-DPcwqB8q.js} +618 -613
  77. package/dist/{index-BqhYevy7.js → index-Dd_ZmIqU.js} +19 -19
  78. package/dist/{index-D9SSJ6om.js → index-Dfq4O3b4.js} +3 -3
  79. package/dist/{index-gSPwC-1I.js → index-Jr0cra7i.js} +9 -9
  80. package/dist/{index-BlSRBdPy.js → index-URQGEGX7.js} +1 -1
  81. package/dist/index.js +142 -135
  82. package/dist/{libphonenumber-C9G59k5J.js → libphonenumber-aZ-2KWIf.js} +3 -3
  83. package/dist/package.json +21 -21
  84. package/dist/{proxy-BhEKW5n7.js → proxy-BIRlSMN_.js} +856 -851
  85. package/dist/styles.css +1 -1
  86. package/dist/useBreadcrumb-C_Wb2cXs.js +1435 -0
  87. package/dist/utils/index.js +514 -355
  88. package/package.json +21 -21
  89. package/dist/useBreadcrumb-vSs0pRo3.js +0 -1412
@@ -3,12 +3,12 @@ import { S as B } from "../../index-BvoZGpli.js";
3
3
  import * as n from "react";
4
4
  import { useRef as xe, useEffect as be, useMemo as re, isValidElement as ne, useCallback as ge } from "react";
5
5
  import * as Se from "react-dom";
6
- import { P as D, c as Ne, a as Ie, b as x, d as Ae, u as De } from "../../index-DKfEnhKr.js";
6
+ import { P as D, a as Ne, c as x, b as Ie, d as Ae, u as De } from "../../index--l0zux8V.js";
7
7
  import { u as ie } from "../../index-DLcqcWxM.js";
8
- import { c as _e } from "../../index-BG8O18ZY.js";
9
- import { B as Fe, R as Le } from "../../index-BlSRBdPy.js";
10
- import { P as Me } from "../../index-DMb4KD0b.js";
11
- import { P as Oe } from "../../index-AV6ZtGhy.js";
8
+ import { c as _e } from "../../index-CJnS4BVW.js";
9
+ import { B as Fe, R as Le } from "../../index-URQGEGX7.js";
10
+ import { P as Me } from "../../index-CESXsoMn.js";
11
+ import { P as Oe } from "../../index-3fEdeexs.js";
12
12
  import { u as X } from "../../index-0ioNhtNM.js";
13
13
  import { R as ke } from "../../index-BKjcReYh.js";
14
14
  import { cn as j } from "../../utils/index.js";
@@ -37,7 +37,7 @@ var Ue = Object.freeze({
37
37
  )
38
38
  );
39
39
  Q.displayName = Xe;
40
- var Z = "ToastProvider", [ee, Ye, $e] = _e("Toast"), [ce, St] = Ne("Toast", [$e]), [Be, Y] = ce(Z), ue = (e) => {
40
+ var Z = "ToastProvider", [ee, Ye, $e] = _e("Toast"), [ce] = Ie("Toast", [$e]), [Be, Y] = ce(Z), ue = (e) => {
41
41
  const {
42
42
  __scopeToast: o,
43
43
  label: r = "Notification",
@@ -192,7 +192,7 @@ var fe = "ToastFocusProxy", J = n.forwardRef(
192
192
  J.displayName = fe;
193
193
  var O = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.swipeCancel", Je = "toast.swipeEnd", pe = n.forwardRef(
194
194
  (e, o) => {
195
- const { forceMount: r, open: t, defaultOpen: u, onOpenChange: d, ...f } = e, [w, v] = Ie({
195
+ const { forceMount: r, open: t, defaultOpen: u, onOpenChange: d, ...f } = e, [w, v] = Ne({
196
196
  prop: t,
197
197
  defaultProp: u ?? !0,
198
198
  onChange: d,
@@ -448,7 +448,7 @@ function q(e) {
448
448
  return e.some((r) => r === o ? !0 : (r.focus(), document.activeElement !== o));
449
449
  }
450
450
  var it = ue, ct = de, ut = pe, lt = me, dt = we, ft = ve;
451
- const Nt = ({
451
+ const St = ({
452
452
  title: e,
453
453
  duration: o = 5e3,
454
454
  titleClassName: r,
@@ -502,5 +502,5 @@ const Nt = ({
502
502
  ] });
503
503
  };
504
504
  export {
505
- Nt as Toast
505
+ St as Toast
506
506
  };
@@ -5,6 +5,11 @@ import { Props as ActionProps } from './components/Actions/Actions.types';
5
5
  type VirtualizedTableCompound = (<TData extends RowData>(props: Props<TData>) => JSX.Element) & {
6
6
  TruncateText: typeof TruncateText;
7
7
  Actions: <TData extends RowData>(props: ActionProps<TData>) => JSX.Element | null;
8
+ Events: {
9
+ sendExpandRowEvent: (tableId: string, rowId: string) => void;
10
+ sendCollapseRowEvent: (tableId: string, rowId: string) => void;
11
+ sendToggleRowEvent: (tableId: string, rowId: string) => void;
12
+ };
8
13
  displayName?: string;
9
14
  };
10
15
  declare const VirtualizedTable: VirtualizedTableCompound;
@@ -1,60 +1,64 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { useMemo as Q } from "react";
3
- import { cn as c } from "../../utils/index.js";
4
- import { TableProvider as R } from "./contexts/table.provider.js";
5
- import { Filter as S } from "./components/Filter/Filter.js";
6
- import { WrapperBody as U } from "./components/WrapperBody/WrapperBody.js";
7
- import { Header as X } from "./components/Header/Header.js";
8
- import { Body as Y } from "./components/Body/Body.js";
9
- import { Pagination as Z } from "./components/Pagination/Pagination.js";
10
- import { TruncateText as _ } from "./components/TruncateText/TruncateText.js";
11
- import { Actions as $ } from "./components/Actions/Actions.js";
12
- const D = ({
13
- id: n,
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { useMemo as U } from "react";
3
+ import { cn as s } from "../../utils/index.js";
4
+ import { sendToggleRowEvent as X, sendCollapseRowEvent as Y, sendExpandRowEvent as Z } from "./events/index.js";
5
+ import { TableProvider as _ } from "./contexts/table.provider.js";
6
+ import { Filter as $ } from "./components/Filter/Filter.js";
7
+ import { WrapperBody as D } from "./components/WrapperBody/WrapperBody.js";
8
+ import { Header as L } from "./components/Header/Header.js";
9
+ import { Body as rr } from "./components/Body/Body.js";
10
+ import { Pagination as er } from "./components/Pagination/Pagination.js";
11
+ import { TruncateText as or } from "./components/TruncateText/TruncateText.js";
12
+ import { Actions as ar } from "./components/Actions/Actions.js";
13
+ const tr = ({
14
+ id: c,
14
15
  ariaLabel: p,
15
16
  columns: d,
16
17
  data: f,
17
18
  totalItems: u = -1 / 0,
18
19
  className: b,
19
20
  classNameHeaderActiveArrows: T,
20
- classNameHeaderArrows: N,
21
+ classNameHeaderArrows: v,
21
22
  classNameHeaderTable: x,
22
- classNameTable: A,
23
- classNameWrapperTable: y,
23
+ classNameTable: E,
24
+ classNameWrapperTable: N,
24
25
  isLoading: a,
25
- fetchData: h,
26
- queryOptions: z,
26
+ getRowId: w,
27
+ fetchData: A,
28
+ queryOptions: y,
27
29
  // Pagination
28
- showPagination: B,
30
+ showPagination: h,
29
31
  showTotalItems: t,
30
32
  showDropdownPagination: i,
31
33
  showDotPagination: l,
32
34
  showFormPagination: m,
33
- pageSizes: V,
35
+ pageSizes: z,
34
36
  // Filter
35
- showFilter: j = !1,
36
- showFilterInput: k,
37
- filterSearchPlaceholder: v = "",
38
- multiSelectFilter: w,
39
- filterActions: P,
40
- showResetButton: E = !0,
41
- resetButtonClassName: H,
37
+ showFilter: B = !1,
38
+ showFilterInput: R,
39
+ filterSearchPlaceholder: V = "",
40
+ multiSelectFilter: g,
41
+ filterActions: j,
42
+ showResetButton: k = !0,
43
+ resetButtonClassName: P,
42
44
  // Hover row
43
- enableHoverRow: I,
44
- classNameHoverRow: K,
45
+ enableHoverRow: C,
46
+ classNameHoverRow: H,
45
47
  // Expandable rows
46
- enableExpandedRow: M,
47
- expandedState: W,
48
- defaultExpanded: g,
49
- classNameExpandedRow: q,
50
- classNameExpandedCell: C,
48
+ enableExpandedRow: I,
49
+ expandedState: K,
50
+ defaultExpanded: M,
51
+ classNameExpandedRow: W,
52
+ classNameExpandedCell: q,
51
53
  classNameExpandedContent: F,
52
54
  classNameExpandedHeader: G,
53
55
  classNameActiveExpandedRow: J,
54
- onExpandedChange: O
56
+ onExpandedChange: O,
57
+ renderExpandedRow: Q,
58
+ keepExpandColumnVisible: S
55
59
  }) => {
56
- const e = Q(
57
- () => B || [
60
+ const e = U(
61
+ () => h || [
58
62
  t,
59
63
  i,
60
64
  l,
@@ -63,87 +67,95 @@ const D = ({
63
67
  []
64
68
  );
65
69
  return /* @__PURE__ */ r(
66
- R,
70
+ _,
67
71
  {
68
- id: n,
72
+ id: c,
69
73
  columns: d,
70
74
  data: f,
71
- fetchData: h,
75
+ getRowId: w,
76
+ fetchData: A,
72
77
  totalItems: u,
73
- queryOptions: z,
78
+ queryOptions: y,
74
79
  isPaginationEnabled: e,
75
- enableExpandedRow: M,
76
- expandedState: W,
80
+ enableExpandedRow: I,
81
+ expandedState: K,
77
82
  onExpandedChange: O,
78
- defaultExpanded: g,
79
- classNameExpandedRow: q,
80
- classNameExpandedCell: C,
83
+ defaultExpanded: M,
84
+ classNameExpandedRow: W,
85
+ classNameExpandedCell: q,
81
86
  classNameExpandedContent: F,
82
87
  classNameExpandedHeader: G,
83
88
  classNameActiveExpandedRow: J,
84
- enableHoverRow: I,
85
- classNameHoverRow: K,
86
- children: /* @__PURE__ */ s("section", { className: c("w-full min-w-fit", b), children: [
87
- j && /* @__PURE__ */ r(
88
- S,
89
+ enableHoverRow: C,
90
+ classNameHoverRow: H,
91
+ renderExpandedRow: Q,
92
+ keepExpandColumnVisible: S,
93
+ children: /* @__PURE__ */ n("section", { className: s("w-full min-w-fit", b), children: [
94
+ B && /* @__PURE__ */ r(
95
+ $,
89
96
  {
90
- actions: P,
91
- multiSelectFilter: w,
92
- placeholder: v,
93
- showFilterInput: k,
94
- showResetButton: E,
95
- resetButtonClassName: H
97
+ actions: j,
98
+ multiSelectFilter: g,
99
+ placeholder: V,
100
+ showFilterInput: R,
101
+ showResetButton: k,
102
+ resetButtonClassName: P
96
103
  }
97
104
  ),
98
105
  /* @__PURE__ */ r(
99
- U,
106
+ D,
100
107
  {
101
108
  showPagination: e,
102
- classNameWrapperTable: y,
109
+ classNameWrapperTable: N,
103
110
  isLoading: a,
104
- children: /* @__PURE__ */ s(
111
+ children: /* @__PURE__ */ n(
105
112
  "table",
106
113
  {
107
- className: c(
114
+ className: s(
108
115
  "w-full border-collapse table-auto",
109
116
  "dark:border-separate dark:border-spacing-0",
110
- A
117
+ E
111
118
  ),
112
119
  "aria-label": p,
113
120
  children: [
114
121
  /* @__PURE__ */ r(
115
- X,
122
+ L,
116
123
  {
117
124
  className: x,
118
- classNameArrows: N,
125
+ classNameArrows: v,
119
126
  classNameActiveArrows: T
120
127
  }
121
128
  ),
122
- /* @__PURE__ */ r(Y, { isLoading: a, showPagination: e })
129
+ /* @__PURE__ */ r(rr, { isLoading: a, showPagination: e })
123
130
  ]
124
131
  }
125
132
  )
126
133
  }
127
134
  ),
128
135
  e && /* @__PURE__ */ r(
129
- Z,
136
+ er,
130
137
  {
131
138
  showTotalItems: t,
132
139
  showDropdownPagination: i,
133
140
  showDotPagination: l,
134
141
  showFormPagination: m,
135
- pageSizes: V,
142
+ pageSizes: z,
136
143
  isLoading: a
137
144
  }
138
145
  )
139
146
  ] })
140
147
  }
141
148
  );
142
- }, o = D;
149
+ }, o = tr;
143
150
  o.displayName = "KonstructVirtualizedTable";
144
- o.TruncateText = _;
145
- o.Actions = $;
151
+ o.TruncateText = or;
152
+ o.Actions = ar;
153
+ o.Events = {
154
+ sendExpandRowEvent: Z,
155
+ sendCollapseRowEvent: Y,
156
+ sendToggleRowEvent: X
157
+ };
146
158
  export {
147
- _ as TruncateText,
159
+ or as TruncateText,
148
160
  o as VirtualizedTable
149
161
  };
@@ -73,6 +73,7 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
73
73
  classNameHoverRow?: string;
74
74
  queryOptions?: Omit<UseQueryOptions<any, any, any, any>, 'queryKey' | 'queryFn'>;
75
75
  isLoading?: boolean;
76
+ getRowId?: (originalRow: TData, index: number) => string;
76
77
  fetchData?: (params: Record<string, string | number | string[] | number[] | undefined>) => Promise<{
77
78
  data: TData[];
78
79
  totalItemsCount?: number;
@@ -119,6 +120,8 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
119
120
  classNameExpandedHeader?: string;
120
121
  classNameActiveExpandedRow?: string;
121
122
  onExpandedChange?: OnChangeFn<ExpandedState>;
123
+ renderExpandedRow?: (data: TData) => ReactNode;
124
+ keepExpandColumnVisible?: boolean | Record<string, boolean>;
122
125
  } | {
123
126
  enableExpandedRow?: false | undefined;
124
127
  expandedState?: never;
@@ -129,4 +132,6 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
129
132
  classNameExpandedHeader?: never;
130
133
  classNameActiveExpandedRow?: never;
131
134
  onExpandedChange?: never;
135
+ renderExpandedRow?: never;
136
+ keepExpandColumnVisible?: never;
132
137
  });
@@ -1,62 +1,65 @@
1
- import { jsx as a, jsxs as F } from "react/jsx-runtime";
2
- import { f as S } from "../../../../index-CSWGJT-v.js";
3
- import { Fragment as j } from "react";
4
- import { Skeleton as H } from "../Skeleton/Skeleton.js";
5
- import { cn as s } from "../../../../utils/index.js";
6
- import { ExpandableRow as M } from "../ExpandableRow/ExpandableRow.js";
7
- import { useTableContext as A } from "../../contexts/table.hook.js";
8
- const G = ({
9
- isLoading: f,
1
+ import { jsx as a, jsxs as A } from "react/jsx-runtime";
2
+ import { f as B } from "../../../../index-CSWGJT-v.js";
3
+ import { Fragment as H } from "react";
4
+ import { Skeleton as M } from "../Skeleton/Skeleton.js";
5
+ import { cn as l } from "../../../../utils/index.js";
6
+ import { ExpandableRow as O } from "../ExpandableRow/ExpandableRow.js";
7
+ import { useTableContext as V } from "../../contexts/table.hook.js";
8
+ const U = ({
9
+ isLoading: g,
10
10
  showPagination: t
11
11
  }) => {
12
12
  const {
13
- table: c,
14
- pageSize: x,
15
- tableFetching: u,
16
- enableExpandedRow: h,
17
- classNameExpandedRow: N,
13
+ table: i,
14
+ pageSize: h,
15
+ tableFetching: w,
16
+ enableExpandedRow: N,
17
+ classNameExpandedRow: R,
18
18
  classNameExpandedCell: k,
19
- classNameExpandedContent: w,
20
- enableHoverRow: b,
21
- classNameHoverRow: R,
22
- classNameActiveExpandedRow: E
23
- } = A();
24
- if (f || u)
25
- return /* @__PURE__ */ a(H, { numberOfRows: x, table: c });
26
- const o = c.getRowModel().rows ?? [];
19
+ classNameExpandedContent: E,
20
+ enableHoverRow: p,
21
+ classNameHoverRow: C,
22
+ classNameActiveExpandedRow: v,
23
+ renderExpandedRow: b,
24
+ isBorderOnAdjacentCell: D,
25
+ isExpandColumnVisible: y
26
+ } = V();
27
+ if (g || w)
28
+ return /* @__PURE__ */ a(M, { numberOfRows: h, table: i });
29
+ const d = i.getRowModel().rows ?? [];
27
30
  return /* @__PURE__ */ a(
28
31
  "tbody",
29
32
  {
30
- className: s(
33
+ className: l(
31
34
  "text-slate-800",
32
35
  "text-sm",
33
36
  "font-normal",
34
37
  "relative",
35
38
  "dark:border-x"
36
39
  ),
37
- children: o.map((p, l) => {
38
- const { id: n, original: i, getVisibleCells: v } = p, { meta: d = {} } = i, m = v(), e = h && p.getIsExpanded(), y = !!d.expandedRow;
39
- return /* @__PURE__ */ F(j, { children: [
40
+ children: d.map((x, s) => {
41
+ const { id: m, original: c, getVisibleCells: j } = x, { meta: o = {} } = c, n = j(), e = N && x.getIsExpanded(), z = !!o.expandedRow || !!b, u = n[0]?.column.id !== "__expand" || y ? 0 : D ? 1 : null;
42
+ return /* @__PURE__ */ A(H, { children: [
40
43
  /* @__PURE__ */ a(
41
44
  "tr",
42
45
  {
43
- className: s(
44
- { "group/row": b },
46
+ className: l(
47
+ { "group/row": p },
45
48
  "border-b",
46
49
  "border-b-gray-200",
47
50
  "dark:text-metal-50",
48
51
  "dark:border-b-metal-700",
49
52
  "bg-transparent",
50
- d.className
53
+ o.className
51
54
  ),
52
- "data-row-id": n,
53
- ...d.attributes ?? {},
54
- children: m.map(({ id: C, column: r, getContext: D }, g) => {
55
- const z = typeof r.columnDef.meta?.className == "function" ? r.columnDef.meta?.className(i) : r.columnDef.meta?.className;
55
+ "data-row-id": m,
56
+ ...o.attributes ?? {},
57
+ children: n.map(({ id: F, column: r, getContext: S }, f) => {
58
+ const _ = typeof r.columnDef.meta?.className == "function" ? r.columnDef.meta?.className(c) : r.columnDef.meta?.className;
56
59
  return /* @__PURE__ */ a(
57
60
  "td",
58
61
  {
59
- className: s(
62
+ className: l(
60
63
  "px-4",
61
64
  "py-1",
62
65
  "text-sm",
@@ -67,47 +70,47 @@ const G = ({
67
70
  "dark:first:border-l",
68
71
  "dark:last:border-r",
69
72
  {
70
- "group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": b,
71
- [s(
73
+ "group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": p,
74
+ [l(
72
75
  "bg-zinc-100 dark:bg-metal-800",
73
- E
76
+ v
74
77
  )]: !!e
75
78
  },
76
- R,
77
- z,
79
+ C,
80
+ _,
78
81
  {
79
- "first:rounded-bl-lg": l === o.length - 1 && g === 0 && !t && !e,
80
- "last:rounded-br-lg": l === o.length - 1 && g === m.length - 1 && !t && !e,
82
+ "rounded-bl-lg": s === d.length - 1 && u !== null && f === u && !t && !e,
83
+ "rounded-br-lg": s === d.length - 1 && f === n.length - 1 && !t && !e,
81
84
  "dark:[tr:last-child_&]:border-b": !t
82
85
  }
83
86
  ),
84
87
  "data-expanded": e ? !0 : void 0,
85
88
  ...r.columnDef.meta?.attributes ?? {},
86
- children: S(r.columnDef.cell, D())
89
+ children: B(r.columnDef.cell, S())
87
90
  },
88
- C
91
+ F
89
92
  );
90
93
  })
91
94
  }
92
95
  ),
93
- y && /* @__PURE__ */ a(
94
- M,
96
+ z && /* @__PURE__ */ a(
97
+ O,
95
98
  {
96
99
  classNameExpandedCell: k,
97
- classNameExpandedContent: w,
98
- classNameExpandedRow: N,
99
- colSpan: m.length,
100
- id: n,
100
+ classNameExpandedContent: E,
101
+ classNameExpandedRow: R,
102
+ colSpan: n.length,
103
+ id: m,
101
104
  isExpanded: !!e,
102
- isLastRow: l === o.length - 1 && !t,
103
- children: d.expandedRow
105
+ isLastRow: s === d.length - 1 && !t,
106
+ children: o.expandedRow ?? b?.(c)
104
107
  }
105
108
  )
106
- ] }, n);
109
+ ] }, m);
107
110
  })
108
111
  }
109
112
  );
110
113
  };
111
114
  export {
112
- G as Body
115
+ U as Body
113
116
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
- import { P as u, R as b, T as m, C as p } from "../../../../index-Byr10W8m.js";
2
+ import { P as u, R as b, T as m, C as p } from "../../../../index-DPcwqB8q.js";
3
3
  import { d as h } from "../../../../debounce-DJveWHr_.js";
4
4
  import { useRef as x, useState as w, useCallback as g, useEffect as s } from "react";
5
5
  const v = ({ getValue: l, value: i }) => {
@@ -12,9 +12,9 @@ const p = ({
12
12
  "div",
13
13
  {
14
14
  className: m(
15
- "shadow rounded-t-lg",
15
+ "shadow rounded-t-lg overflow-hidden",
16
16
  {
17
- "overflow-hidden rounded-lg": !t || d || e
17
+ "rounded-lg": !t || d || e
18
18
  },
19
19
  r
20
20
  ),
@@ -1,5 +1,5 @@
1
1
  import { ColumnSort, SortingState, Table } from '@tanstack/react-table';
2
- import { Dispatch, SetStateAction } from 'react';
2
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
3
3
  import { RowData } from '../VirtualizedTable.types';
4
4
  export type ContextType<TData extends RowData = RowData> = {
5
5
  sortedData: ColumnSort[];
@@ -20,6 +20,9 @@ export type ContextType<TData extends RowData = RowData> = {
20
20
  classNameActiveExpandedRow?: string;
21
21
  enableHoverRow?: boolean;
22
22
  classNameHoverRow?: string;
23
+ isBorderOnAdjacentCell?: boolean;
24
+ isExpandColumnVisible?: boolean;
25
+ renderExpandedRow?: (data: RowData) => ReactNode;
23
26
  handlePage: (newPage: number) => void;
24
27
  onPageSize: (newPageSize: number) => void;
25
28
  onSorting: Dispatch<SetStateAction<SortingState>>;
@@ -1,3 +1,3 @@
1
1
  import { RowData } from '../VirtualizedTable.types';
2
2
  import { Props } from './table.types';
3
- export declare const TableProvider: <TData extends RowData = RowData>({ children, classNameExpandedCell, classNameExpandedContent, classNameExpandedRow, classNameExpandedHeader, classNameActiveExpandedRow, classNameHoverRow, columns, data: defaultData, defaultExpanded, enableExpandedRow, enableHoverRow, expandedState, id, isPaginationEnabled, queryOptions, totalItems, fetchData, onExpandedChange, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const TableProvider: <TData extends RowData = RowData>({ children, classNameExpandedCell, classNameExpandedContent, classNameExpandedRow, classNameExpandedHeader, classNameActiveExpandedRow, classNameHoverRow, columns, data: defaultData, defaultExpanded, enableExpandedRow, enableHoverRow, expandedState, id, isPaginationEnabled, queryOptions, totalItems, getRowId, fetchData, onExpandedChange, renderExpandedRow, keepExpandColumnVisible, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;