@pibit.ai/cure-design-system 0.5.11 → 0.5.12

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.
@@ -102,7 +102,7 @@ const k = ({ session: r }) => {
102
102
  ref: e,
103
103
  "aria-hidden": !0,
104
104
  className: L(
105
- "pointer-events-none fixed z-[10000] overflow-hidden rounded-md bg-primary shadow-lg",
105
+ "pointer-events-none fixed z-(--z-index-drag-overlay) overflow-hidden rounded-md bg-primary shadow-lg",
106
106
  "cursor-grabbing"
107
107
  ),
108
108
  style: {
@@ -117,12 +117,12 @@ const k = ({ session: r }) => {
117
117
  ),
118
118
  document.body
119
119
  );
120
- }, q = ({ y: r, left: e, width: t }) => A(
120
+ }, z = ({ y: r, left: e, width: t }) => A(
121
121
  /* @__PURE__ */ x(
122
122
  "div",
123
123
  {
124
124
  "aria-hidden": !0,
125
- className: "pointer-events-none fixed z-[10000] h-0.5",
125
+ className: "pointer-events-none fixed z-(--z-index-drag-indicator) h-0.5",
126
126
  style: {
127
127
  top: r - 1,
128
128
  left: e,
@@ -135,7 +135,7 @@ const k = ({ session: r }) => {
135
135
  document.body
136
136
  );
137
137
  export {
138
- q as DropIndicatorLine,
138
+ z as DropIndicatorLine,
139
139
  k as FloatingRowPreview,
140
140
  D as ROW_DRAG_SCROLL_EDGE_PX,
141
141
  O as ROW_DRAG_SCROLL_MAX_PX,
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnHeaderMenu.d.ts","sourceRoot":"","sources":["../../../../src/patterns/table/toolbar/ColumnHeaderMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAsB1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAA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;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,QAAQ,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC3C,gBAAgB,EAAE,aAAa,CAAC;IAChC,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,SAAS,CAAC;IAChE,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAoFD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAwLtD,CAAC"}
@@ -1,9 +1,9 @@
1
- import { jsxs as n, jsx as e, Fragment as m } from "react/jsx-runtime";
2
- import { useState as q } from "react";
3
- import { AlignLeft as V, AlignCenter as Z, AlignRight as B, ChevronDown as G, Eye as K, Edit03 as $, ArrowRight as J, ArrowLeft as Q, ArrowDown as W, ArrowUp as X, ChevronRight as P, FilterLines as Y, EyeOff as D, Trash01 as ee, Check as te } from "@untitledui/icons";
4
- import { Button as z } from "react-aria-components";
5
- import { cx as p } from "../../../utils/cn.js";
6
- import { Dropdown as g } from "../../../primitives/dropdown/dropdown.js";
1
+ import { jsxs as n, jsx as e, Fragment as p } from "react/jsx-runtime";
2
+ import { useState as _ } from "react";
3
+ import { AlignLeft as V, AlignCenter as Z, AlignRight as B, ChevronDown as G, Eye as K, Edit03 as $, ArrowRight as J, ArrowLeft as Q, ArrowDown as W, ArrowUp as X, ChevronRight as j, FilterLines as Y, EyeOff as D, Trash01 as ee, Check as re } from "@untitledui/icons";
4
+ import { Button as q } from "react-aria-components";
5
+ import { cx as u } from "../../../utils/cn.js";
6
+ import { Dropdown as y } from "../../../primitives/dropdown/dropdown.js";
7
7
  const i = ({
8
8
  icon: o,
9
9
  label: a,
@@ -11,17 +11,19 @@ const i = ({
11
11
  submenu: h,
12
12
  selected: t,
13
13
  disabled: d,
14
- title: y,
15
- onClick: u
14
+ title: v,
15
+ onClick: m
16
16
  }) => /* @__PURE__ */ n(
17
17
  "div",
18
18
  {
19
- onClick: d ? void 0 : u,
20
- title: y,
19
+ onClick: (f) => {
20
+ f.stopPropagation(), d || m == null || m();
21
+ },
22
+ title: v,
21
23
  "aria-disabled": d || void 0,
22
- className: p(
24
+ className: u(
23
25
  "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium transition-colors w-full text-left",
24
- d ? "cursor-not-allowed text-disabled" : p(
26
+ d ? "cursor-not-allowed text-disabled" : u(
25
27
  "cursor-pointer",
26
28
  s ? "text-error-primary hover:bg-error-primary" : t ? "bg-utility-brand-25 text-secondary" : "text-secondary hover:bg-primary_hover"
27
29
  )
@@ -31,18 +33,18 @@ const i = ({
31
33
  o,
32
34
  {
33
35
  size: 16,
34
- className: p(
36
+ className: u(
35
37
  "shrink-0",
36
38
  d ? "text-fg-disabled" : s ? "text-error-primary" : "text-fg-quaternary"
37
39
  )
38
40
  }
39
41
  ),
40
42
  /* @__PURE__ */ e("span", { className: "flex-1 truncate", children: a }),
41
- t && /* @__PURE__ */ e(te, { size: 14, className: "shrink-0 text-brand-600" }),
42
- h && /* @__PURE__ */ e(P, { size: 14, className: "shrink-0 text-fg-quaternary" })
43
+ t && /* @__PURE__ */ e(re, { size: 14, className: "shrink-0 text-brand-600" }),
44
+ h && /* @__PURE__ */ e(j, { size: 14, className: "shrink-0 text-fg-quaternary" })
43
45
  ]
44
46
  }
45
- ), c = () => /* @__PURE__ */ e("div", { className: "my-1 h-px w-full bg-secondary" }), j = ({ children: o }) => /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase tracking-wider text-tertiary", children: o }), re = ({ label: o, suffix: a }) => /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5 rounded-md border border-secondary bg-primary px-1.5 py-0.5", children: [
47
+ ), c = () => /* @__PURE__ */ e("div", { className: "my-1 h-px w-full bg-secondary" }), z = ({ children: o }) => /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase tracking-wider text-tertiary", children: o }), te = ({ label: o, suffix: a }) => /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5 rounded-md border border-secondary bg-primary px-1.5 py-0.5", children: [
46
48
  /* @__PURE__ */ e("span", { className: "flex h-4 w-4 items-center justify-center rounded-sm border border-secondary text-[9px] font-semibold text-tertiary", children: "T" }),
47
49
  /* @__PURE__ */ e("span", { className: "text-xs font-semibold text-primary", children: o }),
48
50
  a && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary", children: a })
@@ -57,149 +59,168 @@ const i = ({
57
59
  currentAlignment: h,
58
60
  capabilities: t,
59
61
  hideDisabled: d,
60
- onAction: y,
61
- renderExtraItems: u,
62
- showOnHeaderHover: w = !1,
62
+ onAction: v,
63
+ renderExtraItems: m,
64
+ showOnHeaderHover: f = !1,
63
65
  isHeaderHovered: M = !1
64
66
  }) => {
65
- var T, _;
66
- const A = (s == null ? void 0 : s.data_type) ?? o.dataType, x = A === "LOOKUP" || o.variant === "lookup", O = A === "DERIVED" || o.variant === "derived", E = x ? "Hide field" : "Hide column", f = (t == null ? void 0 : t.sort) ?? !0, v = (t == null ? void 0 : t.align) ?? !0, k = (t == null ? void 0 : t.filter) ?? !0, N = (t == null ? void 0 : t.hide) ?? !0, [F, L] = q(!1), [H, b] = q(!1), I = !w || F || M, l = (r) => {
67
- y(r), b(!1), L(!1);
68
- }, R = C.find((r) => r.id === h) ?? C[0], U = R.icon, S = u == null ? void 0 : u(o);
67
+ var S, T;
68
+ const O = (s == null ? void 0 : s.data_type) ?? o.dataType, g = O === "LOOKUP" || o.variant === "lookup", F = O === "DERIVED" || o.variant === "derived", E = g ? "Hide field" : "Hide column", x = (t == null ? void 0 : t.sort) ?? !0, N = (t == null ? void 0 : t.align) ?? !0, b = (t == null ? void 0 : t.filter) ?? !0, k = (t == null ? void 0 : t.hide) ?? !0, [L, R] = _(!1), [H, w] = _(!1), I = !f || L || M, l = (r) => {
69
+ v(r), w(!1), R(!1);
70
+ }, P = C.find((r) => r.id === h) ?? C[0], U = P.icon, A = m == null ? void 0 : m(o);
69
71
  return /* @__PURE__ */ n(
70
- g.Root,
72
+ y.Root,
71
73
  {
72
- isOpen: F,
74
+ isOpen: L,
73
75
  onOpenChange: (r) => {
74
- L(r), r || b(!1);
76
+ R(r), r || w(!1);
75
77
  },
76
78
  children: [
77
79
  /* @__PURE__ */ e(
78
- z,
80
+ q,
79
81
  {
80
82
  "aria-label": `Open ${a} column menu`,
83
+ "data-column-reorder-ignore": !0,
81
84
  onClick: (r) => r.stopPropagation(),
82
- className: p(
85
+ className: u(
83
86
  "flex items-center justify-center rounded p-0.5 outline-none cursor-pointer transition-opacity",
84
87
  "text-fg-quaternary hover:bg-secondary_subtle hover:text-fg-quaternary_hover",
85
88
  "data-[pressed]:bg-secondary_subtle data-[focus-visible]:ring-2 data-[focus-visible]:ring-focus-ring",
86
- w && !I && "pointer-events-none opacity-0"
89
+ f && !I && "pointer-events-none opacity-0"
87
90
  ),
88
91
  children: /* @__PURE__ */ e(G, { size: 14, className: "stroke-2" })
89
92
  }
90
93
  ),
91
- /* @__PURE__ */ e(g.Popover, { className: p(x || O ? "w-72" : "w-56"), children: /* @__PURE__ */ n("div", { className: "flex flex-col py-1 px-1.5", children: [
92
- x && /* @__PURE__ */ n(m, { children: [
93
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5 px-2 py-2", children: [
94
- /* @__PURE__ */ e(j, { children: "Lookup field" }),
95
- /* @__PURE__ */ e(re, { label: a, suffix: "Object name" })
96
- ] }),
97
- /* @__PURE__ */ e(c, {}),
98
- /* @__PURE__ */ e(i, { icon: K, label: "View Field", onClick: () => l({ type: "lookup-view" }) }),
99
- /* @__PURE__ */ e(i, { icon: $, label: "Edit field", onClick: () => l({ type: "lookup-edit" }) }),
100
- /* @__PURE__ */ e(c, {}),
101
- /* @__PURE__ */ e(
102
- i,
103
- {
104
- icon: J,
105
- label: "Add field to right",
106
- onClick: () => l({ type: "add-field", side: "right" })
107
- }
108
- ),
109
- /* @__PURE__ */ e(
110
- i,
111
- {
112
- icon: Q,
113
- label: "Add field to left",
114
- onClick: () => l({ type: "add-field", side: "left" })
115
- }
116
- ),
117
- /* @__PURE__ */ e(c, {})
118
- ] }),
119
- O && /* @__PURE__ */ n(m, { children: [
120
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5 px-2 py-2", children: [
121
- /* @__PURE__ */ e(j, { children: "Formula" }),
122
- /* @__PURE__ */ e("div", { className: "text-xs font-medium text-secondary break-words", children: ((T = s == null ? void 0 : s.formula) == null ? void 0 : T.trim()) || ((_ = o.formula) == null ? void 0 : _.trim()) || a })
123
- ] }),
124
- /* @__PURE__ */ e(c, {})
125
- ] }),
126
- S,
127
- S && (f || v || k || N) && /* @__PURE__ */ e(c, {}),
128
- f && /* @__PURE__ */ n(m, { children: [
129
- /* @__PURE__ */ e(
130
- i,
131
- {
132
- icon: W,
133
- label: "Sort A to Z",
134
- onClick: () => l({ type: "sort", direction: "asc" })
135
- }
136
- ),
137
- /* @__PURE__ */ e(
138
- i,
139
- {
140
- icon: X,
141
- label: "Sort Z to A",
142
- onClick: () => l({ type: "sort", direction: "desc" })
143
- }
144
- )
145
- ] }),
146
- v && /* @__PURE__ */ n(m, { children: [
147
- f && /* @__PURE__ */ e(c, {}),
148
- /* @__PURE__ */ n(g.Root, { isOpen: H, onOpenChange: b, children: [
149
- /* @__PURE__ */ n(
150
- z,
151
- {
152
- className: p(
153
- "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium cursor-pointer transition-colors w-full text-left outline-none",
154
- "text-secondary hover:bg-primary_hover",
155
- "data-[focus-visible]:ring-2 data-[focus-visible]:ring-focus-ring"
94
+ /* @__PURE__ */ e(
95
+ y.Popover,
96
+ {
97
+ "data-column-reorder-ignore": !0,
98
+ className: u(g || F ? "w-72" : "w-56"),
99
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col py-1 px-1.5", children: [
100
+ g && /* @__PURE__ */ n(p, { children: [
101
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5 px-2 py-2", children: [
102
+ /* @__PURE__ */ e(z, { children: "Lookup field" }),
103
+ /* @__PURE__ */ e(te, { label: a, suffix: "Object name" })
104
+ ] }),
105
+ /* @__PURE__ */ e(c, {}),
106
+ /* @__PURE__ */ e(i, { icon: K, label: "View Field", onClick: () => l({ type: "lookup-view" }) }),
107
+ /* @__PURE__ */ e(i, { icon: $, label: "Edit field", onClick: () => l({ type: "lookup-edit" }) }),
108
+ /* @__PURE__ */ e(c, {}),
109
+ /* @__PURE__ */ e(
110
+ i,
111
+ {
112
+ icon: J,
113
+ label: "Add field to right",
114
+ onClick: () => l({ type: "add-field", side: "right" })
115
+ }
116
+ ),
117
+ /* @__PURE__ */ e(
118
+ i,
119
+ {
120
+ icon: Q,
121
+ label: "Add field to left",
122
+ onClick: () => l({ type: "add-field", side: "left" })
123
+ }
124
+ ),
125
+ /* @__PURE__ */ e(c, {})
126
+ ] }),
127
+ F && /* @__PURE__ */ n(p, { children: [
128
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5 px-2 py-2", children: [
129
+ /* @__PURE__ */ e(z, { children: "Formula" }),
130
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium text-secondary break-words", children: ((S = s == null ? void 0 : s.formula) == null ? void 0 : S.trim()) || ((T = o.formula) == null ? void 0 : T.trim()) || a })
131
+ ] }),
132
+ /* @__PURE__ */ e(c, {})
133
+ ] }),
134
+ A && // Same guard `MenuRow` applies: the popover is portalled, but React
135
+ // still bubbles clicks to the header cell, which would also run its
136
+ // sort/drag handlers. The consumer's own handlers fire first.
137
+ /* @__PURE__ */ e("div", { onClick: (r) => r.stopPropagation(), children: A }),
138
+ A && (x || N || b || k) && /* @__PURE__ */ e(c, {}),
139
+ x && /* @__PURE__ */ n(p, { children: [
140
+ /* @__PURE__ */ e(
141
+ i,
142
+ {
143
+ icon: W,
144
+ label: "Sort A to Z",
145
+ onClick: () => l({ type: "sort", direction: "asc" })
146
+ }
147
+ ),
148
+ /* @__PURE__ */ e(
149
+ i,
150
+ {
151
+ icon: X,
152
+ label: "Sort Z to A",
153
+ onClick: () => l({ type: "sort", direction: "desc" })
154
+ }
155
+ )
156
+ ] }),
157
+ N && /* @__PURE__ */ n(p, { children: [
158
+ x && /* @__PURE__ */ e(c, {}),
159
+ /* @__PURE__ */ n(y.Root, { isOpen: H, onOpenChange: w, children: [
160
+ /* @__PURE__ */ n(
161
+ q,
162
+ {
163
+ className: u(
164
+ "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium cursor-pointer transition-colors w-full text-left outline-none",
165
+ "text-secondary hover:bg-primary_hover",
166
+ "data-[focus-visible]:ring-2 data-[focus-visible]:ring-focus-ring"
167
+ ),
168
+ children: [
169
+ /* @__PURE__ */ e(U, { size: 16, className: "shrink-0 text-fg-quaternary" }),
170
+ /* @__PURE__ */ e("span", { className: "flex-1 truncate", children: P.label }),
171
+ /* @__PURE__ */ e(j, { size: 14, className: "shrink-0 text-fg-quaternary" })
172
+ ]
173
+ }
156
174
  ),
157
- children: [
158
- /* @__PURE__ */ e(U, { size: 16, className: "shrink-0 text-fg-quaternary" }),
159
- /* @__PURE__ */ e("span", { className: "flex-1 truncate", children: R.label }),
160
- /* @__PURE__ */ e(P, { size: 14, className: "shrink-0 text-fg-quaternary" })
161
- ]
162
- }
163
- ),
164
- /* @__PURE__ */ e(g.Popover, { placement: "right top", className: "w-44", children: /* @__PURE__ */ e("div", { className: "flex flex-col py-1 px-1.5", children: C.map((r) => /* @__PURE__ */ e(
165
- i,
166
- {
167
- icon: r.icon,
168
- label: r.label,
169
- selected: h === r.id,
170
- onClick: () => l({ type: "align", alignment: r.id })
171
- },
172
- r.id
173
- )) }) })
175
+ /* @__PURE__ */ e(
176
+ y.Popover,
177
+ {
178
+ "data-column-reorder-ignore": !0,
179
+ placement: "right top",
180
+ className: "w-44",
181
+ children: /* @__PURE__ */ e("div", { className: "flex flex-col py-1 px-1.5", children: C.map((r) => /* @__PURE__ */ e(
182
+ i,
183
+ {
184
+ icon: r.icon,
185
+ label: r.label,
186
+ selected: h === r.id,
187
+ onClick: () => l({ type: "align", alignment: r.id })
188
+ },
189
+ r.id
190
+ )) })
191
+ }
192
+ )
193
+ ] })
194
+ ] }),
195
+ (b || k) && /* @__PURE__ */ n(p, { children: [
196
+ (x || N) && /* @__PURE__ */ e(c, {}),
197
+ b && /* @__PURE__ */ e(i, { icon: Y, label: "Filter by", onClick: () => l({ type: "filter" }) }),
198
+ k && /* @__PURE__ */ e(
199
+ i,
200
+ {
201
+ icon: D,
202
+ label: E,
203
+ disabled: d,
204
+ title: d ? "At least one column must remain visible" : void 0,
205
+ onClick: () => l({ type: "hide" })
206
+ }
207
+ )
208
+ ] }),
209
+ g && /* @__PURE__ */ n(p, { children: [
210
+ /* @__PURE__ */ e(c, {}),
211
+ /* @__PURE__ */ e(
212
+ i,
213
+ {
214
+ icon: ee,
215
+ label: "Delete fields",
216
+ danger: !0,
217
+ onClick: () => l({ type: "lookup-delete" })
218
+ }
219
+ )
220
+ ] })
174
221
  ] })
175
- ] }),
176
- (k || N) && /* @__PURE__ */ n(m, { children: [
177
- (f || v) && /* @__PURE__ */ e(c, {}),
178
- k && /* @__PURE__ */ e(i, { icon: Y, label: "Filter by", onClick: () => l({ type: "filter" }) }),
179
- N && /* @__PURE__ */ e(
180
- i,
181
- {
182
- icon: D,
183
- label: E,
184
- disabled: d,
185
- title: d ? "At least one column must remain visible" : void 0,
186
- onClick: () => l({ type: "hide" })
187
- }
188
- )
189
- ] }),
190
- x && /* @__PURE__ */ n(m, { children: [
191
- /* @__PURE__ */ e(c, {}),
192
- /* @__PURE__ */ e(
193
- i,
194
- {
195
- icon: ee,
196
- label: "Delete fields",
197
- danger: !0,
198
- onClick: () => l({ type: "lookup-delete" })
199
- }
200
- )
201
- ] })
202
- ] }) })
222
+ }
223
+ )
203
224
  ]
204
225
  }
205
226
  );
@@ -1,6 +1,6 @@
1
1
  import { ForwardedRef, RefAttributes } from 'react';
2
2
  import { TableComponentProps } from './types';
3
- declare function TableComponentInner<TData extends object>({ data, columns, getRowId, ariaLabel, headerGroups, size, loading, loadingRowCount, emptyState, showBorders, removeRowBorders, fillWidth, zoom, zoomDisabled, className, rootClassName, tableClassName, headerClassName, getRowClassName, onRowClick, onRowHover, toolbar, renderToolbar, pagination, summaryRow, rowGroups, renderGroupHeader, collapsedGroupIds: controlledCollapsedGroupIds, defaultCollapsedGroupIds, onCollapsedGroupIdsChange, enableSorting, sorting: controlledSorting, defaultSorting, onSortingChange, columnVisibility: controlledColumnVisibility, defaultColumnVisibility, onColumnVisibilityChange, columnOrder: controlledColumnOrder, defaultColumnOrder, onColumnOrderChange, selectionMode, rowSelection: controlledRowSelection, defaultRowSelection, onRowSelectionChange, expanded: controlledExpanded, defaultExpanded, onExpandedChange, expansionMode, getRowCanExpand, renderExpandedContent, onCellClick, onCellDoubleClick, onCellActivate, cellSelection, onCellSelectionChange, onCopyCells, onPasteCells, onClearCells, onReorderRows, enableRowReorder, activateOnSingleClick, }: TableComponentProps<TData>, ref: ForwardedRef<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
3
+ declare function TableComponentInner<TData extends object>({ data, columns, getRowId, ariaLabel, headerGroups, size, loading, loadingRowCount, emptyState, showBorders, removeRowBorders, fillWidth, zoom, zoomDisabled, className, rootClassName, tableClassName, headerClassName, getRowClassName, onRowClick, onRowHover, toolbar, renderToolbar, pagination, summaryRow, rowGroups, renderGroupHeader, collapsedGroupIds: controlledCollapsedGroupIds, defaultCollapsedGroupIds, onCollapsedGroupIdsChange, enableSorting, sorting: controlledSorting, defaultSorting, onSortingChange, columnVisibility: controlledColumnVisibility, defaultColumnVisibility, onColumnVisibilityChange, columnOrder: controlledColumnOrder, defaultColumnOrder, onColumnOrderChange, enableColumnReorder, enableColumnResize, columnWidths, onColumnWidthsChange, selectionMode, rowSelection: controlledRowSelection, defaultRowSelection, onRowSelectionChange, expanded: controlledExpanded, defaultExpanded, onExpandedChange, expansionMode, getRowCanExpand, renderExpandedContent, onCellClick, onCellDoubleClick, onCellActivate, cellSelection, onCellSelectionChange, onCopyCells, onPasteCells, onClearCells, onReorderRows, enableRowReorder, activateOnSingleClick, }: TableComponentProps<TData>, ref: ForwardedRef<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
4
4
  export declare const TableComponent: <TData extends object>(props: TableComponentProps<TData> & RefAttributes<HTMLDivElement>) => ReturnType<typeof TableComponentInner>;
5
5
  export default TableComponent;
6
6
  //# sourceMappingURL=TableComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../src/patterns/table-component/TableComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EAIjB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAwDf,OAAO,KAAK,EAIV,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAkIjB,iBAAS,mBAAmB,CAAC,KAAK,SAAS,MAAM,EAC/C,EACE,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,IAAW,EACX,OAAe,EACf,eAA2C,EAC3C,UAA4B,EAC5B,WAAmB,EACnB,gBAAwB,EACxB,SAAiB,EACjB,IAAI,EACJ,YAAoB,EACpB,SAAS,EACT,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,OAAO,EACP,aAAa,EACb,UAAU,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EAAE,2BAA2B,EAC9C,wBAA6B,EAC7B,yBAAyB,EACzB,aAAqB,EACrB,OAAO,EAAE,iBAAiB,EAC1B,cAAmB,EACnB,eAAe,EACf,gBAAgB,EAAE,0BAA0B,EAC5C,uBAA4B,EAC5B,wBAAwB,EACxB,WAAW,EAAE,qBAAqB,EAClC,kBAAuB,EACvB,mBAAmB,EACnB,aAAsB,EACtB,YAAY,EAAE,sBAAsB,EACpC,mBAAwB,EACxB,oBAAoB,EACpB,QAAQ,EAAE,kBAAkB,EAC5B,eAAoB,EACpB,gBAAgB,EAChB,aAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,qBAAqB,GACtB,EAAE,mBAAmB,CAAC,KAAK,CAAC,EAC7B,GAAG,EAAE,YAAY,CAAC,cAAc,CAAC,2CA0gClC;AAED,eAAO,MAAM,cAAc,EAAsC,CAC/D,KAAK,SAAS,MAAM,EAEpB,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC,KAC9D,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5C,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"TableComponent.d.ts","sourceRoot":"","sources":["../../../src/patterns/table-component/TableComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,YAAY,EAKjB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAqEf,OAAO,KAAK,EAIV,mBAAmB,EACpB,MAAM,SAAS,CAAC;AA8VjB,iBAAS,mBAAmB,CAAC,KAAK,SAAS,MAAM,EAC/C,EACE,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,IAAW,EACX,OAAe,EACf,eAA2C,EAC3C,UAA4B,EAC5B,WAAmB,EACnB,gBAAwB,EACxB,SAAiB,EACjB,IAAI,EACJ,YAAoB,EACpB,SAAS,EACT,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,OAAO,EAC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