@pibit.ai/cure-design-system 0.3.16 → 1.0.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.
- package/dist/assets/icons/group-by.svg.js +4 -0
- package/dist/assets/icons/reorder-dots-new.svg.js +4 -0
- package/dist/assets/icons/reorder-dots.svg.js +4 -0
- package/dist/assets/icons/resize-1.svg.js +4 -0
- package/dist/assets/icons/resize-2.svg.js +4 -0
- package/dist/assets/icons/resize-4.svg.js +4 -0
- package/dist/assets/icons/resize-5.svg.js +4 -0
- package/dist/assets/icons/show-summary.svg.js +4 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +124 -62
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +65 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js +70 -0
- package/dist/node_modules/framer-motion/dist/es/value/use-combine-values.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/value/use-computed.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/value/use-motion-value.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/transform.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js +21 -18
- package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
- package/dist/patterns/table/TablePagination.d.ts +23 -0
- package/dist/patterns/table/TablePagination.d.ts.map +1 -0
- package/dist/patterns/table/TablePagination.js +60 -0
- package/dist/patterns/table/TableWrapper.d.ts +2 -81
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +726 -157
- package/dist/patterns/table/index.d.ts +13 -2
- package/dist/patterns/table/index.d.ts.map +1 -1
- package/dist/patterns/table/pagination-base.d.ts +78 -0
- package/dist/patterns/table/pagination-base.d.ts.map +1 -0
- package/dist/patterns/table/pagination-base.js +127 -0
- package/dist/patterns/table/pagination-card.d.ts +9 -0
- package/dist/patterns/table/pagination-card.d.ts.map +1 -0
- package/dist/patterns/table/pagination-card.js +65 -0
- package/dist/patterns/table/row-height-icons.d.ts +9 -0
- package/dist/patterns/table/row-height-icons.d.ts.map +1 -0
- package/dist/patterns/table/row-height-icons.js +13 -0
- package/dist/patterns/table/storyHelpers/mockToolbarSlots.d.ts +7 -0
- package/dist/patterns/table/storyHelpers/mockToolbarSlots.d.ts.map +1 -0
- package/dist/patterns/table/storyHelpers/useMockTableState.d.ts +31 -0
- package/dist/patterns/table/storyHelpers/useMockTableState.d.ts.map +1 -0
- package/dist/patterns/table/storyHelpers/useMockTableToolbar.d.ts +3 -0
- package/dist/patterns/table/storyHelpers/useMockTableToolbar.d.ts.map +1 -0
- package/dist/patterns/table/table.d.ts +10 -13
- package/dist/patterns/table/table.d.ts.map +1 -1
- package/dist/patterns/table/table.js +235 -312
- package/dist/patterns/table/toolbar/AlignDropdown.d.ts +11 -0
- package/dist/patterns/table/toolbar/AlignDropdown.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/AlignDropdown.js +77 -0
- package/dist/patterns/table/toolbar/BasicSortPanel.d.ts +6 -0
- package/dist/patterns/table/toolbar/BasicSortPanel.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/BulkActionBar.d.ts +12 -0
- package/dist/patterns/table/toolbar/BulkActionBar.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/BulkActionBar.js +62 -0
- package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts +41 -0
- package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/ColumnHeaderMenu.js +171 -0
- package/dist/patterns/table/toolbar/GroupByDropdown.d.ts +11 -0
- package/dist/patterns/table/toolbar/GroupByDropdown.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/GroupByDropdown.js +80 -0
- package/dist/patterns/table/toolbar/HideFieldsDropdown.d.ts +13 -0
- package/dist/patterns/table/toolbar/HideFieldsDropdown.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/HideFieldsDropdown.js +180 -0
- package/dist/patterns/table/toolbar/LegacySortFilterTools.d.ts +9 -0
- package/dist/patterns/table/toolbar/LegacySortFilterTools.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/RowActionsMenu.d.ts +19 -0
- package/dist/patterns/table/toolbar/RowActionsMenu.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/RowActionsMenu.js +84 -0
- package/dist/patterns/table/toolbar/RowHeightDropdown.d.ts +9 -0
- package/dist/patterns/table/toolbar/RowHeightDropdown.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/RowHeightDropdown.js +60 -0
- package/dist/patterns/table/toolbar/ShowSummaryDropdown.d.ts +8 -0
- package/dist/patterns/table/toolbar/ShowSummaryDropdown.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/ShowSummaryDropdown.js +22 -0
- package/dist/patterns/table/toolbar/SummaryFooter.d.ts +16 -0
- package/dist/patterns/table/toolbar/SummaryFooter.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/SummaryFooter.js +83 -0
- package/dist/patterns/table/toolbar/TableToolbar.d.ts +55 -0
- package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/TableToolbar.js +234 -0
- package/dist/patterns/table/toolbar/ToolbarRadio.d.ts +18 -0
- package/dist/patterns/table/toolbar/ToolbarRadio.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/ToolbarRadio.js +63 -0
- package/dist/patterns/table/toolbar/index.d.ts +24 -0
- package/dist/patterns/table/toolbar/index.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/legacyToolbarTypes.d.ts +69 -0
- package/dist/patterns/table/toolbar/legacyToolbarTypes.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts +35 -0
- package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/tableToolbarHelpers.js +259 -0
- package/dist/patterns/table/toolbar/tableToolbarHelpers.test.d.ts +2 -0
- package/dist/patterns/table/toolbar/tableToolbarHelpers.test.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/toolbarExtensions.d.ts +12 -0
- package/dist/patterns/table/toolbar/toolbarExtensions.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/toolbarExtensions.js +18 -0
- package/dist/patterns/table/toolbar-icons.d.ts +8 -0
- package/dist/patterns/table/toolbar-icons.d.ts.map +1 -0
- package/dist/patterns/table/toolbar-icons.js +13 -0
- package/dist/patterns/table/types.d.ts +141 -0
- package/dist/patterns/table/types.d.ts.map +1 -0
- package/dist/patterns/table/useGridKeyboardNavigation.d.ts +38 -0
- package/dist/patterns/table/useGridKeyboardNavigation.d.ts.map +1 -0
- package/dist/patterns/table/useGridKeyboardNavigation.js +65 -0
- package/dist/primitives/checkbox/checkbox.d.ts +2 -2
- package/dist/primitives/checkbox/checkbox.d.ts.map +1 -1
- package/dist/primitives/dropdown/dropdown.d.ts +32 -0
- package/dist/primitives/dropdown/dropdown.d.ts.map +1 -0
- package/dist/primitives/dropdown/dropdown.js +118 -0
- package/dist/primitives/dropdown/index.d.ts +2 -0
- package/dist/primitives/dropdown/index.d.ts.map +1 -0
- package/dist/primitives/select/ExpandableSearchInput.d.ts +5 -1
- package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
- package/dist/primitives/select/ExpandableSearchInput.js +80 -77
- package/dist/primitives/shimmer/index.d.ts +2 -0
- package/dist/primitives/shimmer/index.d.ts.map +1 -0
- package/dist/primitives/shimmer/shimmer.d.ts +24 -0
- package/dist/primitives/shimmer/shimmer.d.ts.map +1 -0
- package/dist/primitives/shimmer/shimmer.js +37 -0
- package/dist/primitives/tooltip/ellipsis-content.d.ts +12 -0
- package/dist/primitives/tooltip/ellipsis-content.d.ts.map +1 -0
- package/dist/primitives/tooltip/ellipsis-content.js +113 -0
- package/dist/primitives/tooltip/index.d.ts +1 -0
- package/dist/primitives/tooltip/index.d.ts.map +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/theme.css +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { time as n } from "../frameloop/sync-time.js";
|
|
2
2
|
import { frame as d } from "../frameloop/frame.js";
|
|
3
|
-
import { warnOnce as
|
|
4
|
-
import { SubscriptionManager as
|
|
5
|
-
import { velocityPerSecond as
|
|
6
|
-
const a = 30,
|
|
7
|
-
|
|
3
|
+
import { warnOnce as p } from "../../../../motion-utils/dist/es/warn-once.js";
|
|
4
|
+
import { SubscriptionManager as u } from "../../../../motion-utils/dist/es/subscription-manager.js";
|
|
5
|
+
import { velocityPerSecond as f } from "../../../../motion-utils/dist/es/velocity-per-second.js";
|
|
6
|
+
const a = 30, l = (s) => !isNaN(parseFloat(s)), h = {
|
|
7
|
+
current: void 0
|
|
8
|
+
};
|
|
9
|
+
class m {
|
|
8
10
|
/**
|
|
9
11
|
* @param init - The initiating value
|
|
10
12
|
* @param config - Optional configuration options
|
|
@@ -14,14 +16,14 @@ class l {
|
|
|
14
16
|
constructor(t, e = {}) {
|
|
15
17
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
|
|
16
18
|
var r;
|
|
17
|
-
const
|
|
18
|
-
if (this.updatedAt !==
|
|
19
|
-
for (const
|
|
20
|
-
|
|
19
|
+
const o = n.now();
|
|
20
|
+
if (this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && ((r = this.events.change) == null || r.notify(this.current), this.dependents))
|
|
21
|
+
for (const c of this.dependents)
|
|
22
|
+
c.dirty();
|
|
21
23
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
|
|
22
24
|
}
|
|
23
25
|
setCurrent(t) {
|
|
24
|
-
this.current = t, this.updatedAt = n.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity =
|
|
26
|
+
this.current = t, this.updatedAt = n.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = l(this.current));
|
|
25
27
|
}
|
|
26
28
|
setPrevFrameValue(t = this.current) {
|
|
27
29
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -67,10 +69,10 @@ class l {
|
|
|
67
69
|
* @deprecated
|
|
68
70
|
*/
|
|
69
71
|
onChange(t) {
|
|
70
|
-
return process.env.NODE_ENV !== "production" &&
|
|
72
|
+
return process.env.NODE_ENV !== "production" && p(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
71
73
|
}
|
|
72
74
|
on(t, e) {
|
|
73
|
-
this.events[t] || (this.events[t] = new
|
|
75
|
+
this.events[t] || (this.events[t] = new u());
|
|
74
76
|
const i = this.events[t].add(e);
|
|
75
77
|
return t === "change" ? () => {
|
|
76
78
|
i(), d.read(() => {
|
|
@@ -134,7 +136,7 @@ class l {
|
|
|
134
136
|
* @public
|
|
135
137
|
*/
|
|
136
138
|
get() {
|
|
137
|
-
return this.current;
|
|
139
|
+
return h.current && h.current.push(this), this.current;
|
|
138
140
|
}
|
|
139
141
|
/**
|
|
140
142
|
* @public
|
|
@@ -154,7 +156,7 @@ class l {
|
|
|
154
156
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > a)
|
|
155
157
|
return 0;
|
|
156
158
|
const e = Math.min(this.updatedAt - this.prevUpdatedAt, a);
|
|
157
|
-
return
|
|
159
|
+
return f(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
158
160
|
}
|
|
159
161
|
/**
|
|
160
162
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -206,10 +208,11 @@ class l {
|
|
|
206
208
|
(t = this.dependents) == null || t.clear(), (e = this.events.destroy) == null || e.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
|
-
function
|
|
210
|
-
return new
|
|
211
|
+
function E(s, t) {
|
|
212
|
+
return new m(s, t);
|
|
211
213
|
}
|
|
212
214
|
export {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
+
m as MotionValue,
|
|
216
|
+
h as collectMotionValues,
|
|
217
|
+
E as motionValue
|
|
215
218
|
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
function
|
|
1
|
+
function l(e, n) {
|
|
2
2
|
e.indexOf(n) === -1 && e.push(n);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
function u(e, n) {
|
|
5
|
+
const t = e.indexOf(n);
|
|
6
|
+
t > -1 && e.splice(t, 1);
|
|
7
|
+
}
|
|
8
|
+
function f([...e], n, t) {
|
|
9
|
+
const i = n < 0 ? e.length + n : n;
|
|
10
|
+
if (i >= 0 && i < e.length) {
|
|
11
|
+
const c = t < 0 ? e.length + t : t, [s] = e.splice(n, 1);
|
|
12
|
+
e.splice(c, 0, s);
|
|
13
|
+
}
|
|
14
|
+
return e;
|
|
7
15
|
}
|
|
8
16
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
l as addUniqueItem,
|
|
18
|
+
f as moveItem,
|
|
19
|
+
u as removeItem
|
|
11
20
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type TablePaginationConfig = {
|
|
2
|
+
currentPage: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
totalPages: number;
|
|
5
|
+
totalItems: number;
|
|
6
|
+
onPageChange: (page: number) => void;
|
|
7
|
+
onPageSizeChange: (size: number | string) => void;
|
|
8
|
+
/** Whether pagination should actually render. Default: true. */
|
|
9
|
+
showPagination?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export interface TablePaginationProps extends TablePaginationConfig {
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
rootClassName?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Table footer pagination — page-size select, total count, and page controls.
|
|
17
|
+
* Matches the `TableWrapperPaginationConfig` contract used in platform-ui.
|
|
18
|
+
*/
|
|
19
|
+
export declare function TablePagination({ currentPage, pageSize, totalPages, totalItems, onPageChange, onPageSizeChange, showPagination, loading, rootClassName, }: TablePaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export declare namespace TablePagination {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=TablePagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/TablePagination.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAClD,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AASD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,cAAqB,EACrB,OAAe,EACf,aAAa,GACd,EAAE,oBAAoB,kDAwCtB;yBAlDe,eAAe"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "../../utils/cn.js";
|
|
3
|
+
import { PaginationCardDefault as f } from "./pagination-card.js";
|
|
4
|
+
import { Select as i } from "../../primitives/select/select.js";
|
|
5
|
+
const b = [
|
|
6
|
+
{ label: "10", id: "10" },
|
|
7
|
+
{ label: "20", id: "20" },
|
|
8
|
+
{ label: "50", id: "50" },
|
|
9
|
+
{ label: "100", id: "100" }
|
|
10
|
+
];
|
|
11
|
+
function h({
|
|
12
|
+
currentPage: n,
|
|
13
|
+
pageSize: s,
|
|
14
|
+
totalPages: o,
|
|
15
|
+
totalItems: l,
|
|
16
|
+
onPageChange: m,
|
|
17
|
+
onPageSizeChange: c,
|
|
18
|
+
showPagination: d = !0,
|
|
19
|
+
loading: r = !1,
|
|
20
|
+
rootClassName: p
|
|
21
|
+
}) {
|
|
22
|
+
return !d || l === 0 ? null : /* @__PURE__ */ a("div", { className: x("flex items-center justify-between border-t border-secondary pt-2", p), children: [
|
|
23
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ e("p", { className: "text-xs font-normal text-tertiary", children: "Show rows per page" }),
|
|
25
|
+
/* @__PURE__ */ e(
|
|
26
|
+
i,
|
|
27
|
+
{
|
|
28
|
+
isDisabled: r,
|
|
29
|
+
size: "sm",
|
|
30
|
+
value: s.toString(),
|
|
31
|
+
items: b,
|
|
32
|
+
onSelectionChange: (t) => {
|
|
33
|
+
t != null && c(t);
|
|
34
|
+
},
|
|
35
|
+
className: "w-auto min-w-10",
|
|
36
|
+
popoverClassName: "w-20",
|
|
37
|
+
textStyles: "text-xs align-center",
|
|
38
|
+
children: (t) => /* @__PURE__ */ e(i.Item, { id: t.id, textStyles: "text-xs font-normal", children: t.label })
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ a("p", { className: "ml-4 text-xs", children: [
|
|
42
|
+
/* @__PURE__ */ e("span", { className: "font-normal text-tertiary", children: "Total rows " }),
|
|
43
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-primary", children: l.toLocaleString() })
|
|
44
|
+
] })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e(
|
|
47
|
+
f,
|
|
48
|
+
{
|
|
49
|
+
loading: r,
|
|
50
|
+
page: n,
|
|
51
|
+
total: o,
|
|
52
|
+
onPageChange: m
|
|
53
|
+
}
|
|
54
|
+
) })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
h.displayName = "TablePagination";
|
|
58
|
+
export {
|
|
59
|
+
h as TablePagination
|
|
60
|
+
};
|
|
@@ -1,83 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
* Props for the TableWrapper component
|
|
4
|
-
*/
|
|
5
|
-
export type TableWrapperProps = {
|
|
6
|
-
/** Array of data items to display in the table */
|
|
7
|
-
data: any[];
|
|
8
|
-
/** Column configuration for the table */
|
|
9
|
-
columns: {
|
|
10
|
-
/** Column header label */
|
|
11
|
-
label: string;
|
|
12
|
-
/** Unique key for the column (maps to data property) */
|
|
13
|
-
key: string;
|
|
14
|
-
/** Make column sticky (left or right) */
|
|
15
|
-
sticky?: "left" | "right";
|
|
16
|
-
/** Offset for sticky positioning (in pixels) */
|
|
17
|
-
stickyOffset?: number;
|
|
18
|
-
/** Enable sorting for this column */
|
|
19
|
-
allowsSorting?: boolean;
|
|
20
|
-
/** Maximum width for the column */
|
|
21
|
-
maxWidth?: string;
|
|
22
|
-
}[];
|
|
23
|
-
/** Function to render cell content. Receives (key, value, item) and returns ReactNode */
|
|
24
|
-
renderRowCell: (key: string, val: any, item: any) => ReactNode;
|
|
25
|
-
/** Callback when a row is clicked */
|
|
26
|
-
onRowClick?: (item: any) => void;
|
|
27
|
-
/** Aria label for accessibility */
|
|
28
|
-
arialabel?: string;
|
|
29
|
-
/** Table size variant */
|
|
30
|
-
size?: "sm" | "md" | "xs";
|
|
31
|
-
/** Allow default prose styling on rows */
|
|
32
|
-
allowDefaultRowClass?: boolean;
|
|
33
|
-
/** Array of column keys that should have centered headers */
|
|
34
|
-
centeredHeaders?: string[];
|
|
35
|
-
/** Additional className for the table element */
|
|
36
|
-
tableClassName?: string;
|
|
37
|
-
/** Additional className for the header */
|
|
38
|
-
headerClassName?: string;
|
|
39
|
-
/** Additional className for the root container */
|
|
40
|
-
rootClassName?: string;
|
|
41
|
-
/** Remove borders between rows */
|
|
42
|
-
removeBorders?: boolean;
|
|
43
|
-
/** Function to determine if a row is expandable */
|
|
44
|
-
isRowExpandable?: (item: any) => boolean;
|
|
45
|
-
/** Function to render expanded row content */
|
|
46
|
-
renderExpandedContent?: (item: any) => ReactNode;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* TableWrapper - A simplified wrapper around Table component with column-based API
|
|
50
|
-
*
|
|
51
|
-
* Provides an easier way to work with tables using a columns/data structure.
|
|
52
|
-
* Supports sticky columns, expandable rows, and custom cell rendering.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```tsx
|
|
56
|
-
* <TableWrapper
|
|
57
|
-
* data={users}
|
|
58
|
-
* columns={[
|
|
59
|
-
* { label: 'Name', key: 'name', allowsSorting: true },
|
|
60
|
-
* { label: 'Email', key: 'email' },
|
|
61
|
-
* { label: 'Actions', key: 'actions' },
|
|
62
|
-
* ]}
|
|
63
|
-
* renderRowCell={(key, val, item) => {
|
|
64
|
-
* if (key === 'name') return <span>{item.name}</span>;
|
|
65
|
-
* if (key === 'actions') return <button>Edit</button>;
|
|
66
|
-
* return val;
|
|
67
|
-
* }}
|
|
68
|
-
* onRowClick={(user) => console.log(user)}
|
|
69
|
-
* size="sm"
|
|
70
|
-
* />
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
1
|
+
import { TableWrapperProps } from './types';
|
|
2
|
+
export type { BulkActionContext, ColumnConfig, TableWrapperEditChrome, TableWrapperPaginationConfig, TableWrapperProps, TableWrapperSelectedKeys, TableWrapperSelectionChange, TableWrapperToolbarConfig, } from './types';
|
|
73
3
|
export declare const TableWrapper: import('react').ForwardRefExoticComponent<TableWrapperProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
74
|
-
export declare const EllipsisContentWithTooltip: ({ content, className, link, textClassName, }: {
|
|
75
|
-
content: string;
|
|
76
|
-
className?: string;
|
|
77
|
-
link?: boolean;
|
|
78
|
-
tooltipPosition?: "start" | "center" | "end";
|
|
79
|
-
tooltipSide?: "above" | "below";
|
|
80
|
-
textClassName?: string;
|
|
81
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
export declare const createEllipsisContent: (content: string, className?: string, link?: boolean, tooltipPosition?: "start" | "center" | "end", tooltipSide?: "above" | "below", placeholder?: string, textClassName?: string) => import("react/jsx-runtime").JSX.Element;
|
|
83
4
|
//# sourceMappingURL=TableWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableWrapper.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/TableWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableWrapper.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/TableWrapper.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAKR,iBAAiB,EAGpB,MAAM,SAAS,CAAC;AAUjB,YAAY,EACR,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,GAC5B,MAAM,SAAS,CAAC;AA4GjB,eAAO,MAAM,YAAY,8GAy7BvB,CAAC"}
|