@pibit.ai/cure-design-system 0.3.17 → 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 +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +125 -64
- 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 -72
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +730 -75
- package/dist/patterns/table/index.d.ts +11 -1
- 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/styles/components.css +1 -1
- package/dist/styles/theme.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
export { Table, TableCard, TableCell } from './table';
|
|
1
|
+
export { Table, TableCard, TableCell, TableRowActionsDropdown } from './table';
|
|
2
2
|
export { TableWrapper, type TableWrapperProps } from './TableWrapper';
|
|
3
|
+
export type { TableWrapperPaginationConfig, TableWrapperToolbarConfig, BulkActionContext, TableWrapperEditChrome, TableWrapperSelectedKeys, TableWrapperSelectionChange, ColumnConfig, } from './types';
|
|
4
|
+
export { TablePagination, type TablePaginationConfig, type TablePaginationProps } from './TablePagination';
|
|
5
|
+
export { PaginationCardDefault } from './pagination-card';
|
|
6
|
+
export { Pagination } from './pagination-base';
|
|
7
|
+
export { ROW_HEIGHT_ICONS, type RowHeightIconKey } from './row-height-icons';
|
|
8
|
+
export { TOOLBAR_ICONS } from './toolbar-icons';
|
|
9
|
+
export type { TableColumnSchema, TableColumnMenuSchema, TableColumnValueType } from './types';
|
|
10
|
+
export { TableToolbar, pickCoreToolbarProps, registerToolbarExtensions, getToolbarExtensions, RowHeightDropdown, HideFieldsDropdown, AlignDropdown, GroupByDropdown, ShowSummaryDropdown, SummaryFooterRow, ColumnHeaderMenu, RowActionsMenu, BulkActionBar, applyHideAndReorder, getDefaultAlignmentForType, getEffectiveAlignment, alignmentClass, getAggregationsForType, computeAggregation, groupRows, resolveColumnLabel, ROW_HEIGHT_CLASS, AGGREGATION_LABELS, } from './toolbar';
|
|
11
|
+
export type { SearchToolConfig, SortToolConfig, FilterToolConfig, RowHeightToolConfig, HideFieldsToolConfig, AlignToolConfig, GroupByToolConfig, SummaryToolConfig, ToolbarExtensionComponents, LegacySortToolConfig, LegacyFilterToolConfig, RowHeightOption, SummaryFooterRowProps, ColumnMenuAction, ColumnMenuCapabilities, RowActionsConfig, CellAlignment, AggregationType, AggregationOption, RowGroup, } from './toolbar';
|
|
12
|
+
export { GridNavProvider, useGridKeyboardNavigation, isWithinCellEditor, findGridCell, focusGridCell, getGridNeighbor, getGridTabNeighbor, type GridNavDirection, type GridNeighbor, type GridNavValue, } from './useGridKeyboardNavigation';
|
|
3
13
|
export { EllipsisContentWithTooltip, createEllipsisContent, type EllipsisContentWithTooltipProps, } from '../../primitives/tooltip';
|
|
4
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,YAAY,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EAClB,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,QAAQ,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,+BAA+B,GACrC,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
type PaginationPage = {
|
|
3
|
+
type: "page";
|
|
4
|
+
value: number;
|
|
5
|
+
isCurrent: boolean;
|
|
6
|
+
};
|
|
7
|
+
type PaginationEllipsisType = {
|
|
8
|
+
type: "ellipsis";
|
|
9
|
+
key: number;
|
|
10
|
+
};
|
|
11
|
+
type PaginationItemType = PaginationPage | PaginationEllipsisType;
|
|
12
|
+
interface PaginationContextType {
|
|
13
|
+
pages: PaginationItemType[];
|
|
14
|
+
currentPage: number;
|
|
15
|
+
total: number;
|
|
16
|
+
onPageChange: (page: number) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface PaginationRootProps {
|
|
19
|
+
siblingCount?: number;
|
|
20
|
+
page: number;
|
|
21
|
+
total: number;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
className?: string;
|
|
25
|
+
onPageChange?: (page: number) => void;
|
|
26
|
+
}
|
|
27
|
+
interface TriggerRenderProps {
|
|
28
|
+
isDisabled: boolean;
|
|
29
|
+
onClick: () => void;
|
|
30
|
+
}
|
|
31
|
+
interface TriggerProps {
|
|
32
|
+
children: ReactNode | ((props: TriggerRenderProps) => ReactNode);
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
className?: string | ((args: {
|
|
35
|
+
isDisabled: boolean;
|
|
36
|
+
}) => string);
|
|
37
|
+
asChild?: boolean;
|
|
38
|
+
direction: "prev" | "next";
|
|
39
|
+
ariaLabel?: string;
|
|
40
|
+
}
|
|
41
|
+
interface PaginationItemRenderProps {
|
|
42
|
+
isSelected: boolean;
|
|
43
|
+
onClick: () => void;
|
|
44
|
+
value: number;
|
|
45
|
+
"aria-current"?: "page";
|
|
46
|
+
"aria-label"?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface PaginationItemProps {
|
|
49
|
+
value: number;
|
|
50
|
+
isCurrent: boolean;
|
|
51
|
+
children?: ReactNode | ((props: PaginationItemRenderProps) => ReactNode);
|
|
52
|
+
style?: CSSProperties;
|
|
53
|
+
className?: string | ((args: {
|
|
54
|
+
isSelected: boolean;
|
|
55
|
+
}) => string);
|
|
56
|
+
ariaLabel?: string;
|
|
57
|
+
asChild?: boolean;
|
|
58
|
+
loading?: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface PaginationEllipsisProps {
|
|
61
|
+
key: number;
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
style?: CSSProperties;
|
|
64
|
+
className?: string | (() => string);
|
|
65
|
+
}
|
|
66
|
+
interface PaginationContextComponentProps {
|
|
67
|
+
children: (pagination: PaginationContextType) => ReactNode;
|
|
68
|
+
}
|
|
69
|
+
export declare const Pagination: {
|
|
70
|
+
Root: ({ total, siblingCount, page, onPageChange, children, style, className, }: PaginationRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
PrevTrigger: FC<Omit<TriggerProps, "direction">>;
|
|
72
|
+
NextTrigger: FC<Omit<TriggerProps, "direction">>;
|
|
73
|
+
Item: ({ value, isCurrent, children, style, className, ariaLabel, asChild, loading, }: PaginationItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
Ellipsis: FC<PaginationEllipsisProps>;
|
|
75
|
+
Context: FC<PaginationContextComponentProps>;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=pagination-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-base.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/pagination-base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1E,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,kBAAkB,GAAG,cAAc,GAAG,sBAAsB,CAAC;AAElE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAA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CAAC,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,MAAM,CAAC,CAAC;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA+DD,UAAU,uBAAuB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;CACrC;AAWD,UAAU,+BAA+B;IACvC,QAAQ,EAAE,CAAC,UAAU,EAAE,qBAAqB,KAAK,SAAS,CAAC;CAC5D;AAQD,eAAO,MAAM,UAAU;qFAjPpB,mBAAmB;;;2FAmKnB,mBAAmB;;;CAqFrB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsx as a, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as k, createContext as R, isValidElement as w, cloneElement as I, useState as T, useCallback as S, useEffect as j } from "react";
|
|
3
|
+
const y = R(void 0), $ = ({
|
|
4
|
+
total: e,
|
|
5
|
+
siblingCount: o = 1,
|
|
6
|
+
page: t,
|
|
7
|
+
onPageChange: i,
|
|
8
|
+
children: c,
|
|
9
|
+
style: p,
|
|
10
|
+
className: f
|
|
11
|
+
}) => {
|
|
12
|
+
const [u, g] = T([]), m = S(() => {
|
|
13
|
+
const n = [];
|
|
14
|
+
if (o * 2 + 5 >= e)
|
|
15
|
+
for (let r = 1; r <= e; r++)
|
|
16
|
+
n.push({ type: "page", value: r, isCurrent: r === t });
|
|
17
|
+
else {
|
|
18
|
+
const r = Math.max(t - o, 1), d = Math.min(t + o, e), v = r > 2, C = d < e - 1;
|
|
19
|
+
if (!v && C) {
|
|
20
|
+
const l = o * 2 + 3;
|
|
21
|
+
x(1, l).forEach(
|
|
22
|
+
(h) => n.push({ type: "page", value: h, isCurrent: h === t })
|
|
23
|
+
), n.push({ type: "ellipsis", key: l + 1 }), n.push({ type: "page", value: e, isCurrent: e === t });
|
|
24
|
+
} else if (v && !C) {
|
|
25
|
+
const l = o * 2 + 3, h = x(e - l + 1, e);
|
|
26
|
+
n.push({ type: "page", value: 1, isCurrent: t === 1 }), n.push({ type: "ellipsis", key: e - l }), h.forEach(
|
|
27
|
+
(E) => n.push({ type: "page", value: E, isCurrent: E === t })
|
|
28
|
+
);
|
|
29
|
+
} else v && C && (n.push({ type: "page", value: 1, isCurrent: t === 1 }), n.push({ type: "ellipsis", key: r - 1 }), x(r, d).forEach(
|
|
30
|
+
(l) => n.push({ type: "page", value: l, isCurrent: l === t })
|
|
31
|
+
), n.push({ type: "ellipsis", key: d + 1 }), n.push({ type: "page", value: e, isCurrent: e === t }));
|
|
32
|
+
}
|
|
33
|
+
return n;
|
|
34
|
+
}, [e, o, t]);
|
|
35
|
+
j(() => {
|
|
36
|
+
g(m());
|
|
37
|
+
}, [m]);
|
|
38
|
+
const s = (n) => {
|
|
39
|
+
i == null || i(n);
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ a(
|
|
42
|
+
y.Provider,
|
|
43
|
+
{
|
|
44
|
+
value: { pages: u, currentPage: t, total: e, onPageChange: s },
|
|
45
|
+
children: /* @__PURE__ */ a("nav", { "aria-label": "Pagination Navigation", style: p, className: f, children: c })
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}, x = (e, o) => Array.from({ length: o - e + 1 }, (t, i) => i + e), N = ({ children: e, style: o, className: t, asChild: i = !1, direction: c, ariaLabel: p }) => {
|
|
49
|
+
const f = k(y);
|
|
50
|
+
if (!f) throw new Error("Pagination components must be used within a Pagination.Root");
|
|
51
|
+
const { currentPage: u, total: g, onPageChange: m } = f, s = c === "prev" ? u <= 1 : u >= g, n = () => {
|
|
52
|
+
s || m(c === "prev" ? u - 1 : u + 1);
|
|
53
|
+
}, P = typeof t == "function" ? t({ isDisabled: s }) : t, r = c === "prev" ? "Previous Page" : "Next Page";
|
|
54
|
+
return typeof e == "function" ? /* @__PURE__ */ a(b, { children: e({ isDisabled: s, onClick: n }) }) : i && w(e) ? I(e, {
|
|
55
|
+
onClick: n,
|
|
56
|
+
disabled: s,
|
|
57
|
+
isDisabled: s,
|
|
58
|
+
"aria-label": p || r,
|
|
59
|
+
style: { ...e.props.style, ...o },
|
|
60
|
+
className: [P, e.props.className].filter(Boolean).join(" ") || void 0
|
|
61
|
+
}) : /* @__PURE__ */ a(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
"aria-label": p || r,
|
|
65
|
+
onClick: n,
|
|
66
|
+
disabled: s,
|
|
67
|
+
style: o,
|
|
68
|
+
className: P,
|
|
69
|
+
children: e
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}, A = (e) => /* @__PURE__ */ a(N, { ...e, direction: "prev" }), B = (e) => /* @__PURE__ */ a(N, { ...e, direction: "next" }), M = ({
|
|
73
|
+
value: e,
|
|
74
|
+
isCurrent: o,
|
|
75
|
+
children: t,
|
|
76
|
+
style: i,
|
|
77
|
+
className: c,
|
|
78
|
+
ariaLabel: p,
|
|
79
|
+
asChild: f = !1,
|
|
80
|
+
loading: u = !1
|
|
81
|
+
}) => {
|
|
82
|
+
const g = k(y);
|
|
83
|
+
if (!g) throw new Error("Pagination components must be used within a <Pagination.Root />");
|
|
84
|
+
const { onPageChange: m } = g, s = o, n = () => m(e), P = typeof c == "function" ? c({ isSelected: s }) : c;
|
|
85
|
+
return typeof t == "function" ? /* @__PURE__ */ a(b, { children: t({
|
|
86
|
+
isSelected: s,
|
|
87
|
+
onClick: n,
|
|
88
|
+
value: e,
|
|
89
|
+
"aria-current": o ? "page" : void 0,
|
|
90
|
+
"aria-label": p || `Page ${e}`
|
|
91
|
+
}) }) : f && w(t) ? I(t, {
|
|
92
|
+
onClick: n,
|
|
93
|
+
"aria-current": o ? "page" : void 0,
|
|
94
|
+
"aria-label": p || `Page ${e}`,
|
|
95
|
+
style: { ...t.props.style, ...i },
|
|
96
|
+
className: [P, t.props.className].filter(Boolean).join(" ") || void 0
|
|
97
|
+
}) : /* @__PURE__ */ a(
|
|
98
|
+
"button",
|
|
99
|
+
{
|
|
100
|
+
onClick: n,
|
|
101
|
+
style: i,
|
|
102
|
+
className: P,
|
|
103
|
+
"aria-current": o ? "page" : void 0,
|
|
104
|
+
"aria-label": p || `Page ${e}`,
|
|
105
|
+
role: "listitem",
|
|
106
|
+
disabled: u,
|
|
107
|
+
children: t
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}, D = ({ children: e, style: o, className: t }) => {
|
|
111
|
+
const i = typeof t == "function" ? t() : t;
|
|
112
|
+
return /* @__PURE__ */ a("span", { style: o, className: i, "aria-hidden": "true", children: e });
|
|
113
|
+
}, F = ({ children: e }) => {
|
|
114
|
+
const o = k(y);
|
|
115
|
+
if (!o) throw new Error("Pagination components must be used within a Pagination.Root");
|
|
116
|
+
return /* @__PURE__ */ a(b, { children: e(o) });
|
|
117
|
+
}, _ = {
|
|
118
|
+
Root: $,
|
|
119
|
+
PrevTrigger: A,
|
|
120
|
+
NextTrigger: B,
|
|
121
|
+
Item: M,
|
|
122
|
+
Ellipsis: D,
|
|
123
|
+
Context: F
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
_ as Pagination
|
|
127
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaginationRootProps } from './pagination-base';
|
|
2
|
+
interface PaginationCardProps extends Partial<Omit<PaginationRootProps, "children">> {
|
|
3
|
+
rounded?: boolean;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Compact card-style pagination used below tables (matches platform-ui PaginationCardDefault). */
|
|
7
|
+
export declare const PaginationCardDefault: ({ rounded, page, total, loading, ...props }: PaginationCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=pagination-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-card.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/pagination-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,UAAU,mBAAoB,SAAQ,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA0BD,mGAAmG;AACnG,eAAO,MAAM,qBAAqB,GAAI,6CAMnC,mBAAmB,4CAiDrB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as s, Fragment as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as x, ChevronRight as g } from "@untitledui/icons";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
import { Pagination as i } from "./pagination-base.js";
|
|
5
|
+
import { Button as d } from "../../primitives/button/button.js";
|
|
6
|
+
const y = ({
|
|
7
|
+
value: r,
|
|
8
|
+
rounded: n,
|
|
9
|
+
isCurrent: a
|
|
10
|
+
}) => /* @__PURE__ */ e(
|
|
11
|
+
i.Item,
|
|
12
|
+
{
|
|
13
|
+
value: r,
|
|
14
|
+
isCurrent: a,
|
|
15
|
+
className: ({ isSelected: t }) => p(
|
|
16
|
+
"flex size-8 cursor-pointer items-center justify-center p-3 text-xs font-medium text-tertiary outline-focus-ring transition duration-100 ease-linear hover:bg-primary_hover hover:text-secondary focus-visible:z-10 focus-visible:bg-primary_hover focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
17
|
+
n ? "rounded-full" : "rounded-md",
|
|
18
|
+
t && "bg-primary_hover text-secondary"
|
|
19
|
+
),
|
|
20
|
+
children: r
|
|
21
|
+
}
|
|
22
|
+
), C = ({
|
|
23
|
+
rounded: r,
|
|
24
|
+
page: n = 1,
|
|
25
|
+
total: a = 10,
|
|
26
|
+
loading: t = !1,
|
|
27
|
+
...m
|
|
28
|
+
}) => /* @__PURE__ */ s(c, { children: [
|
|
29
|
+
t && /* @__PURE__ */ e("div", { "aria-hidden": !0, className: "absolute inset-0 z-10 cursor-not-allowed bg-transparent" }),
|
|
30
|
+
/* @__PURE__ */ s(i.Root, { ...m, page: n, total: a, className: "flex items-center justify-between gap-3", children: [
|
|
31
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 justify-start", children: /* @__PURE__ */ e(i.PrevTrigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
32
|
+
d,
|
|
33
|
+
{
|
|
34
|
+
iconLeading: x,
|
|
35
|
+
className: "bg-secondary ring-0",
|
|
36
|
+
color: "secondary",
|
|
37
|
+
size: "xs",
|
|
38
|
+
isDisabled: t
|
|
39
|
+
}
|
|
40
|
+
) }) }),
|
|
41
|
+
/* @__PURE__ */ e(i.Context, { children: ({ pages: f, currentPage: h, total: u }) => /* @__PURE__ */ s(c, { children: [
|
|
42
|
+
/* @__PURE__ */ e("div", { className: "hidden items-center justify-center gap-0.5 md:flex", children: f.map(
|
|
43
|
+
(o, l) => o.type === "page" ? /* @__PURE__ */ e(y, { rounded: r, ...o }, l) : /* @__PURE__ */ e(
|
|
44
|
+
i.Ellipsis,
|
|
45
|
+
{
|
|
46
|
+
className: "flex size-10 shrink-0 items-center justify-center text-tertiary",
|
|
47
|
+
children: "…"
|
|
48
|
+
},
|
|
49
|
+
l
|
|
50
|
+
)
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ s("div", { className: "flex justify-center text-xs whitespace-pre text-fg-secondary md:hidden", children: [
|
|
53
|
+
"Page ",
|
|
54
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: h }),
|
|
55
|
+
" of",
|
|
56
|
+
" ",
|
|
57
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: u })
|
|
58
|
+
] })
|
|
59
|
+
] }) }),
|
|
60
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ e(i.NextTrigger, { asChild: !0, children: /* @__PURE__ */ e(d, { iconTrailing: g, className: "bg-secondary ring-0", color: "secondary", size: "xs" }) }) })
|
|
61
|
+
] })
|
|
62
|
+
] });
|
|
63
|
+
export {
|
|
64
|
+
C as PaginationCardDefault
|
|
65
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Row-height toolbar icon URLs bundled with the design system. */
|
|
2
|
+
export declare const ROW_HEIGHT_ICONS: {
|
|
3
|
+
readonly small: string;
|
|
4
|
+
readonly medium: string;
|
|
5
|
+
readonly large: string;
|
|
6
|
+
readonly xl: string;
|
|
7
|
+
};
|
|
8
|
+
export type RowHeightIconKey = keyof typeof ROW_HEIGHT_ICONS;
|
|
9
|
+
//# sourceMappingURL=row-height-icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-height-icons.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/row-height-icons.ts"],"names":[],"mappings":"AAKA,mEAAmE;AACnE,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import r from "../../assets/icons/resize-1.svg.js";
|
|
2
|
+
import e from "../../assets/icons/resize-2.svg.js";
|
|
3
|
+
import m from "../../assets/icons/resize-4.svg.js";
|
|
4
|
+
import o from "../../assets/icons/resize-5.svg.js";
|
|
5
|
+
const f = {
|
|
6
|
+
small: r,
|
|
7
|
+
medium: e,
|
|
8
|
+
large: m,
|
|
9
|
+
xl: o
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
f as ROW_HEIGHT_ICONS
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function MockSortSlot({ activeCount }: {
|
|
2
|
+
activeCount?: number;
|
|
3
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function MockFilterSlot({ activeCount }: {
|
|
5
|
+
activeCount?: number;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=mockToolbarSlots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockToolbarSlots.d.ts","sourceRoot":"","sources":["../../../../src/patterns/table/storyHelpers/mockToolbarSlots.tsx"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,EAAE,WAAe,EAAE,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,2CAgBzE;AAED,wBAAgB,cAAc,CAAC,EAAE,WAAe,EAAE,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,2CAgB3E"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ColumnConfig, TableColumnSchema, TableWrapperToolbarConfig } from '../types';
|
|
2
|
+
import { ColumnMenuAction } from '../toolbar/ColumnHeaderMenu';
|
|
3
|
+
import { SummaryFooterRowProps } from '../toolbar/SummaryFooter';
|
|
4
|
+
import { CellAlignment } from '../toolbar/tableToolbarHelpers';
|
|
5
|
+
export type UseMockTableStateOptions<T extends Record<string, unknown>> = {
|
|
6
|
+
schema: TableColumnSchema[];
|
|
7
|
+
baseColumns: ColumnConfig[];
|
|
8
|
+
data: readonly T[];
|
|
9
|
+
searchableKeys?: string[];
|
|
10
|
+
hasActionsColumn?: boolean;
|
|
11
|
+
showBorders?: boolean;
|
|
12
|
+
initialGroupBy?: string | null;
|
|
13
|
+
initialShowSummary?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Storybook-only hook that mirrors the platform-ui `useTableState` pipeline:
|
|
17
|
+
* toolbar state drives visible columns, search filtering, grouping, and summary footer.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useMockTableState<T extends Record<string, unknown>>({ schema, baseColumns, data, searchableKeys, hasActionsColumn, showBorders, initialGroupBy, initialShowSummary, }: UseMockTableStateOptions<T>): {
|
|
20
|
+
toolbar: TableWrapperToolbarConfig;
|
|
21
|
+
rowHeightClass: string;
|
|
22
|
+
columns: ColumnConfig[];
|
|
23
|
+
columnSchema: TableColumnSchema[];
|
|
24
|
+
data: T[];
|
|
25
|
+
groupedData: import('..').RowGroup<Record<string, unknown>>[] | undefined;
|
|
26
|
+
showSummaryFooter: boolean;
|
|
27
|
+
summaryFooterProps: SummaryFooterRowProps | undefined;
|
|
28
|
+
columnAlignments: Map<string, CellAlignment>;
|
|
29
|
+
applyColumnMenuAction: (columnKey: string, action: ColumnMenuAction) => void;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useMockTableState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMockTableState.d.ts","sourceRoot":"","sources":["../../../../src/patterns/table/storyHelpers/useMockTableState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQrF,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACxE,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AASF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnE,MAAM,EACN,WAAW,EACX,IAAI,EACJ,cAAc,EACd,gBAAwB,EACxB,WAAkB,EAClB,cAAqB,EACrB,kBAA0B,GAC3B,EAAE,wBAAwB,CAAC,CAAC,CAAC;;;;;;;;;;uCAuF0B,MAAM,UAAU,gBAAgB;EAiCvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMockTableToolbar.d.ts","sourceRoot":"","sources":["../../../../src/patterns/table/storyHelpers/useMockTableToolbar.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithRef, HTMLAttributes, ReactNode, Ref, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
2
|
import { CellProps as AriaCellProps, ColumnProps as AriaColumnProps, RowProps as AriaRowProps, TableHeaderProps as AriaTableHeaderProps, TableProps as AriaTableProps, TableBody as AriaTableBody } from 'react-aria-components';
|
|
3
|
+
export declare const TableRowActionsDropdown: () => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
interface TableCardHeaderProps {
|
|
4
|
-
/** The title of the table card header. */
|
|
5
5
|
title: string;
|
|
6
|
-
/** The badge displayed next to the title. */
|
|
7
6
|
badge?: ReactNode;
|
|
8
|
-
/** The description of the table card header. */
|
|
9
7
|
description?: string;
|
|
10
|
-
/** The content displayed after the title and badge. */
|
|
11
8
|
contentTrailing?: ReactNode;
|
|
12
|
-
/** The class name of the table card header. */
|
|
13
9
|
className?: string;
|
|
14
10
|
}
|
|
15
11
|
interface TableRootProps extends AriaTableProps, Omit<ComponentPropsWithRef<"table">, "className" | "slot" | "style"> {
|
|
16
12
|
size?: "xs" | "sm" | "md";
|
|
17
13
|
isEditable?: boolean;
|
|
14
|
+
/** When true, selection checkboxes render inline in data columns instead of a dedicated column. */
|
|
15
|
+
inlineSelection?: boolean;
|
|
18
16
|
}
|
|
19
17
|
declare const TableRoot: {
|
|
20
|
-
({ className, size, isEditable, ...props }: TableRootProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
({ className, size, isEditable, inlineSelection, ...props }: TableRootProps): import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
displayName: string;
|
|
22
20
|
};
|
|
23
21
|
interface TableHeaderProps<T extends object> extends AriaTableHeaderProps<T>, Omit<ComponentPropsWithRef<"thead">, "children" | "className" | "slot" | "style"> {
|
|
24
22
|
bordered?: boolean;
|
|
25
|
-
/** Whether any rows in the table are expandable */
|
|
26
23
|
hasExpandableRows?: boolean;
|
|
27
24
|
}
|
|
28
25
|
declare const TableHeader: {
|
|
@@ -44,13 +41,13 @@ declare const TableHead: {
|
|
|
44
41
|
interface TableRowProps<T extends object> extends AriaRowProps<T>, Omit<ComponentPropsWithRef<"tr">, "children" | "className" | "onClick" | "slot" | "style" | "id"> {
|
|
45
42
|
columns?: any[];
|
|
46
43
|
highlightSelectedRow?: boolean;
|
|
47
|
-
/** Whether this row is expandable */
|
|
48
44
|
isExpandable?: boolean;
|
|
49
|
-
/** Content to render when row is expanded */
|
|
50
45
|
renderExpandedContent?: (item: T) => ReactNode;
|
|
46
|
+
/** Full colspan for the expanded detail row (includes selection/actions columns). */
|
|
47
|
+
expandedColSpan?: number;
|
|
51
48
|
}
|
|
52
49
|
declare const TableRow: {
|
|
53
|
-
<T extends object>({ columns, children, className, highlightSelectedRow, isExpandable, renderExpandedContent, ...props }: TableRowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
<T extends object>({ columns, children, className, highlightSelectedRow, isExpandable, renderExpandedContent, expandedColSpan, ...props }: TableRowProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
54
51
|
displayName: string;
|
|
55
52
|
};
|
|
56
53
|
interface TableCellProps extends AriaCellProps, Omit<TdHTMLAttributes<HTMLTableCellElement>, "children" | "className" | "style" | "id"> {
|
|
@@ -63,9 +60,9 @@ declare const TableCell: {
|
|
|
63
60
|
displayName: string;
|
|
64
61
|
};
|
|
65
62
|
declare const TableCard: {
|
|
66
|
-
Root:
|
|
63
|
+
Root: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
67
64
|
size?: "xs" | "sm" | "md";
|
|
68
|
-
} &
|
|
65
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
69
66
|
Header: {
|
|
70
67
|
({ title, badge, description, contentTrailing, className, }: TableCardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
71
68
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAqBvH,OAAO,KAAK,EACV,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,QAAQ,IAAI,YAAY,EACxB,gBAAgB,IAAI,oBAAoB,EACxC,UAAU,IAAI,cAAc,EAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAOL,SAAS,IAAI,aAAa,EAG3B,MAAM,uBAAuB,CAAC;AAQ/B,eAAO,MAAM,uBAAuB,+CAiBnC,CAAC;AA2EF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,E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