@dashforge/tw 0.5.0-beta → 0.7.0-beta
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/CHANGELOG.md +526 -0
- package/THEME-AUDIT.md +175 -0
- package/dist/index.esm.js +2504 -51
- package/dist/src/components/Accordion/accordion.variants.d.ts.map +1 -1
- package/dist/src/components/Box/box.variants.d.ts.map +1 -1
- package/dist/src/components/DataGrid/DataGrid.d.ts +29 -0
- package/dist/src/components/DataGrid/DataGrid.d.ts.map +1 -0
- package/dist/src/components/DataGrid/dataGrid.types.d.ts +171 -0
- package/dist/src/components/DataGrid/dataGrid.types.d.ts.map +1 -0
- package/dist/src/components/DataGrid/dataGrid.variants.d.ts +216 -0
- package/dist/src/components/DataGrid/dataGrid.variants.d.ts.map +1 -0
- package/dist/src/components/Dialog/dialog.variants.d.ts.map +1 -1
- package/dist/src/components/Divider/divider.variants.d.ts.map +1 -1
- package/dist/src/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/src/components/Pagination/pagination.variants.d.ts.map +1 -1
- package/dist/src/components/Popover/popover.variants.d.ts.map +1 -1
- package/dist/src/components/Skeleton/skeleton.variants.d.ts.map +1 -1
- package/dist/src/components/Table/Table.d.ts +24 -0
- package/dist/src/components/Table/Table.d.ts.map +1 -0
- package/dist/src/components/Table/cells/RenderButton.d.ts +13 -0
- package/dist/src/components/Table/cells/RenderButton.d.ts.map +1 -0
- package/dist/src/components/Table/cells/RenderChip.d.ts +80 -0
- package/dist/src/components/Table/cells/RenderChip.d.ts.map +1 -0
- package/dist/src/components/Table/cells/RenderText.d.ts +21 -0
- package/dist/src/components/Table/cells/RenderText.d.ts.map +1 -0
- package/dist/src/components/Table/cells/RenderTwoLine.d.ts +20 -0
- package/dist/src/components/Table/cells/RenderTwoLine.d.ts.map +1 -0
- package/dist/src/components/Table/cells/RowActionsMenu.d.ts +36 -0
- package/dist/src/components/Table/cells/RowActionsMenu.d.ts.map +1 -0
- package/dist/src/components/Table/cells/index.d.ts +11 -0
- package/dist/src/components/Table/cells/index.d.ts.map +1 -0
- package/dist/src/components/Table/table.types.d.ts +312 -0
- package/dist/src/components/Table/table.types.d.ts.map +1 -0
- package/dist/src/components/Table/table.variants.d.ts +285 -0
- package/dist/src/components/Table/table.variants.d.ts.map +1 -0
- package/dist/src/components/Tabs/tabs.variants.d.ts.map +1 -1
- package/dist/src/components/Tooltip/tooltip.variants.d.ts.map +1 -1
- package/dist/src/components/Typography/typography.variants.d.ts.map +1 -1
- package/dist/src/components/_shared/data/getNestedValue.d.ts +20 -0
- package/dist/src/components/_shared/data/getNestedValue.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useColumnAutoDetect.d.ts +45 -0
- package/dist/src/components/_shared/data/useColumnAutoDetect.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useControllableState.d.ts +23 -0
- package/dist/src/components/_shared/data/useControllableState.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useDebouncedValue.d.ts +10 -0
- package/dist/src/components/_shared/data/useDebouncedValue.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useTableFilter.d.ts +13 -0
- package/dist/src/components/_shared/data/useTableFilter.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useTableSearch.d.ts +23 -0
- package/dist/src/components/_shared/data/useTableSearch.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useTableSelection.d.ts +25 -0
- package/dist/src/components/_shared/data/useTableSelection.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useTableSort.d.ts +20 -0
- package/dist/src/components/_shared/data/useTableSort.d.ts.map +1 -0
- package/dist/src/components/_shared/data/useVirtualizer.d.ts +107 -0
- package/dist/src/components/_shared/data/useVirtualizer.d.ts.map +1 -0
- package/dist/src/index.d.ts +10 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Accordion/accordion.variants.ts +5 -3
- package/src/components/Box/Box.test.tsx +32 -11
- package/src/components/Box/box.variants.ts +23 -4
- package/src/components/DataGrid/DataGrid.test.tsx +496 -0
- package/src/components/DataGrid/DataGrid.tsx +831 -0
- package/src/components/DataGrid/dataGrid.types.ts +189 -0
- package/src/components/DataGrid/dataGrid.variants.ts +144 -0
- package/src/components/Dialog/dialog.variants.ts +10 -6
- package/src/components/Divider/Divider.test.tsx +3 -1
- package/src/components/Divider/Divider.tsx +1 -1
- package/src/components/Divider/divider.variants.ts +2 -1
- package/src/components/Pagination/Pagination.tsx +3 -1
- package/src/components/Pagination/pagination.variants.ts +19 -13
- package/src/components/Popover/popover.variants.ts +10 -4
- package/src/components/Skeleton/skeleton.variants.ts +2 -1
- package/src/components/Table/Table.test.tsx +603 -0
- package/src/components/Table/Table.tsx +816 -0
- package/src/components/Table/cells/RenderButton.tsx +23 -0
- package/src/components/Table/cells/RenderChip.tsx +103 -0
- package/src/components/Table/cells/RenderText.tsx +37 -0
- package/src/components/Table/cells/RenderTwoLine.tsx +34 -0
- package/src/components/Table/cells/RowActionsMenu.tsx +147 -0
- package/src/components/Table/cells/index.ts +14 -0
- package/src/components/Table/table.types.ts +346 -0
- package/src/components/Table/table.variants.ts +207 -0
- package/src/components/Tabs/tabs.variants.ts +19 -8
- package/src/components/Tooltip/tooltip.variants.ts +12 -2
- package/src/components/Typography/Typography.test.tsx +3 -1
- package/src/components/Typography/typography.variants.ts +6 -2
- package/src/components/_shared/data/getNestedValue.test.ts +50 -0
- package/src/components/_shared/data/getNestedValue.ts +32 -0
- package/src/components/_shared/data/useColumnAutoDetect.test.ts +123 -0
- package/src/components/_shared/data/useColumnAutoDetect.ts +100 -0
- package/src/components/_shared/data/useControllableState.ts +48 -0
- package/src/components/_shared/data/useDebouncedValue.ts +24 -0
- package/src/components/_shared/data/useTableFilter.ts +37 -0
- package/src/components/_shared/data/useTableSearch.test.ts +115 -0
- package/src/components/_shared/data/useTableSearch.ts +66 -0
- package/src/components/_shared/data/useTableSelection.test.ts +100 -0
- package/src/components/_shared/data/useTableSelection.ts +100 -0
- package/src/components/_shared/data/useTableSort.test.ts +150 -0
- package/src/components/_shared/data/useTableSort.ts +141 -0
- package/src/components/_shared/data/useVirtualizer.test.ts +158 -0
- package/src/components/_shared/data/useVirtualizer.ts +199 -0
- package/src/components/_shared/themeIdentity.test.ts +113 -0
- package/src/index.ts +59 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/accordion.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"accordion.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/accordion.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA2B5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/box.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"box.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/box.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAqLtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { DataGridProps } from './dataGrid.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashforge TW `<DataGrid>` — virtualized data table.
|
|
4
|
+
*
|
|
5
|
+
* Companion to `<Table>` for large data sets (~500+ rows up to
|
|
6
|
+
* millions via virtualization). Same column model, sort/search/
|
|
7
|
+
* filter/selection logic (shared via `_shared/data/` helpers) —
|
|
8
|
+
* differs in render path: only the visible window of rows is mounted
|
|
9
|
+
* in DOM, with spacer `<tr>` above and below to preserve scrollbar
|
|
10
|
+
* size.
|
|
11
|
+
*
|
|
12
|
+
* Virtualization: hand-rolled (`useVirtualizer`) using
|
|
13
|
+
* `IntersectionObserver` + scroll-event + `requestAnimationFrame`
|
|
14
|
+
* debounce + `ResizeObserver`. Zero new runtime deps.
|
|
15
|
+
*
|
|
16
|
+
* Server-side mode (4 independent opt-in flags):
|
|
17
|
+
* - `serverSideSort` — emits `onSortChange` but does NOT sort locally
|
|
18
|
+
* - `serverSideFilter` — emits `onFilterChange` but does NOT filter
|
|
19
|
+
* - `serverSideSearch` — emits `onSearchQueryChange` (debounced)
|
|
20
|
+
* - `serverSidePagination` — `totalCount` prop sizes the virtual
|
|
21
|
+
* scrollbar; `rows` is the page slice from the server
|
|
22
|
+
*
|
|
23
|
+
* Selection at scale: `selectAllScope`:
|
|
24
|
+
* - `'allLoaded'` (default) — header checkbox toggles all rows in
|
|
25
|
+
* `rows` prop
|
|
26
|
+
* - `'visible'` — toggles only the current viewport window
|
|
27
|
+
*/
|
|
28
|
+
export declare function DataGrid<T extends object>(props: DataGridProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
//# sourceMappingURL=DataGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAwBzD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,kDAwYjE"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AccessRequirement } from '@dashforge/rbac';
|
|
3
|
+
import type { DataGridVariants } from './dataGrid.variants.js';
|
|
4
|
+
import type { TableColumn, TableSortModel, TableFilterModel, TableRowSelectionMode, TableLabels } from '../Table/table.types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Determines what the "select all" header checkbox covers when
|
|
7
|
+
* `rowSelection="multiple"` is enabled.
|
|
8
|
+
*
|
|
9
|
+
* - `'visible'` — only the rows currently in the viewport (after
|
|
10
|
+
* virtualization windowing) are toggled. Useful when the
|
|
11
|
+
* underlying data is paginated server-side and "all" semantically
|
|
12
|
+
* refers to the screen.
|
|
13
|
+
* - `'allLoaded'` (default) — all rows currently in the `rows` prop
|
|
14
|
+
* are toggled. The standard "select everything I can see in this
|
|
15
|
+
* dataset" pattern.
|
|
16
|
+
*
|
|
17
|
+
* For "select all in server-side dataset", the consumer wires it
|
|
18
|
+
* themselves (e.g. fetch all ids + setSelectedRowIds).
|
|
19
|
+
*/
|
|
20
|
+
export type DataGridSelectAllScope = 'visible' | 'allLoaded';
|
|
21
|
+
/**
|
|
22
|
+
* Independent opt-in flags that delegate the corresponding pipeline
|
|
23
|
+
* step to the consumer. With each flag enabled, DataGrid emits the
|
|
24
|
+
* `onXChange` callback but does NOT perform the operation locally
|
|
25
|
+
* — the consumer is expected to provide the resulting `rows` array.
|
|
26
|
+
*/
|
|
27
|
+
export interface DataGridServerSideFlags {
|
|
28
|
+
serverSideSort?: boolean;
|
|
29
|
+
serverSideFilter?: boolean;
|
|
30
|
+
serverSideSearch?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* When true, DataGrid does NOT slice `rows` for pagination. The
|
|
33
|
+
* virtualization math uses `totalCount` (required) to size the
|
|
34
|
+
* scroll container.
|
|
35
|
+
*/
|
|
36
|
+
serverSidePagination?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface DataGridPaginationConfig {
|
|
39
|
+
page: number;
|
|
40
|
+
pageSize: number;
|
|
41
|
+
onPageChange: (page: number) => void;
|
|
42
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
43
|
+
pageSizeOptions?: number[];
|
|
44
|
+
}
|
|
45
|
+
export interface DataGridSlotProps {
|
|
46
|
+
root?: {
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
toolbar?: {
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
search?: {
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
scroll?: {
|
|
56
|
+
className?: string;
|
|
57
|
+
};
|
|
58
|
+
table?: {
|
|
59
|
+
className?: string;
|
|
60
|
+
};
|
|
61
|
+
thead?: {
|
|
62
|
+
className?: string;
|
|
63
|
+
};
|
|
64
|
+
tbody?: {
|
|
65
|
+
className?: string;
|
|
66
|
+
};
|
|
67
|
+
headerRow?: {
|
|
68
|
+
className?: string;
|
|
69
|
+
};
|
|
70
|
+
headerCell?: {
|
|
71
|
+
className?: string;
|
|
72
|
+
};
|
|
73
|
+
row?: {
|
|
74
|
+
className?: string;
|
|
75
|
+
};
|
|
76
|
+
cell?: {
|
|
77
|
+
className?: string;
|
|
78
|
+
};
|
|
79
|
+
emptyState?: {
|
|
80
|
+
className?: string;
|
|
81
|
+
};
|
|
82
|
+
loadingOverlay?: {
|
|
83
|
+
className?: string;
|
|
84
|
+
};
|
|
85
|
+
selectionCell?: {
|
|
86
|
+
className?: string;
|
|
87
|
+
};
|
|
88
|
+
rowActionsCell?: {
|
|
89
|
+
className?: string;
|
|
90
|
+
};
|
|
91
|
+
bulkActionFooter?: {
|
|
92
|
+
className?: string;
|
|
93
|
+
};
|
|
94
|
+
/** Optional Pagination wrapper below the virtualized scroll. */
|
|
95
|
+
pagination?: {
|
|
96
|
+
className?: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Props for `<DataGrid>`.
|
|
101
|
+
*
|
|
102
|
+
* Companion to `<Table>` for large data sets. Where Table renders
|
|
103
|
+
* every row in DOM, DataGrid uses **homemade virtualization**
|
|
104
|
+
* (`IntersectionObserver` + scroll-event + `requestAnimationFrame`
|
|
105
|
+
* — no external libs) to render only a window of visible rows.
|
|
106
|
+
*
|
|
107
|
+
* Required:
|
|
108
|
+
* - `rows`, `cols`, `getRowId` — same as Table
|
|
109
|
+
* - `rowHeight` (fixed in v1; variable-height deferred to v1-bis)
|
|
110
|
+
* - `height` — explicit container height in CSS units, OR
|
|
111
|
+
* consumer sets it via `sx` / parent layout (the scroll container
|
|
112
|
+
* needs a bounded height for virtualization to work)
|
|
113
|
+
*
|
|
114
|
+
* Optional:
|
|
115
|
+
* - `overscan` — extra rows above/below viewport (default 5)
|
|
116
|
+
* - Server-side mode flags (4 independent opt-ins)
|
|
117
|
+
* - Internal pagination (opt-in via `pagination` config)
|
|
118
|
+
* - `selectAllScope` — `'visible'` vs `'allLoaded'` for header
|
|
119
|
+
* select-all checkbox
|
|
120
|
+
* - Everything Table accepts: sort / filter / search / selection /
|
|
121
|
+
* row actions / RBAC / variants / i18n labels / sx / slotProps
|
|
122
|
+
*/
|
|
123
|
+
export interface DataGridProps<T extends object> extends Pick<DataGridVariants, 'variant' | 'size' | 'density'>, DataGridServerSideFlags {
|
|
124
|
+
rows: T[];
|
|
125
|
+
cols: TableColumn<T>[];
|
|
126
|
+
getRowId: (row: T, index: number) => string;
|
|
127
|
+
/** Required: total dataset count. In client-side mode equals
|
|
128
|
+
* `rows.length`; in `serverSidePagination` mode the consumer
|
|
129
|
+
* provides the full count so the virtual scroll height matches. */
|
|
130
|
+
totalCount?: number;
|
|
131
|
+
/** Fixed row height in pixels. Required for windowing math. */
|
|
132
|
+
rowHeight: number;
|
|
133
|
+
/** Rows rendered above/below the viewport. @default 5 */
|
|
134
|
+
overscan?: number;
|
|
135
|
+
/** Container height in CSS units (e.g. `"600px"`, `"100vh"`).
|
|
136
|
+
* Required for the scroll container to bound the virtualization. */
|
|
137
|
+
height?: string;
|
|
138
|
+
sortModel?: TableSortModel;
|
|
139
|
+
onSortChange?: (model: TableSortModel) => void;
|
|
140
|
+
defaultSortModel?: TableSortModel;
|
|
141
|
+
enableSearch?: boolean;
|
|
142
|
+
searchQuery?: string;
|
|
143
|
+
onSearchQueryChange?: (q: string) => void;
|
|
144
|
+
searchPlaceholder?: string;
|
|
145
|
+
searchDebounceMs?: number;
|
|
146
|
+
filterModel?: TableFilterModel;
|
|
147
|
+
onFilterChange?: (model: TableFilterModel) => void;
|
|
148
|
+
rowSelection?: TableRowSelectionMode;
|
|
149
|
+
selectedRowIds?: string[];
|
|
150
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
151
|
+
/** Bulk action sticky footer (visible only when selection > 0). */
|
|
152
|
+
bulkActions?: (selectedRows: T[]) => ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* Scope of the "select all" header checkbox.
|
|
155
|
+
* @default 'allLoaded'
|
|
156
|
+
*/
|
|
157
|
+
selectAllScope?: DataGridSelectAllScope;
|
|
158
|
+
pagination?: DataGridPaginationConfig;
|
|
159
|
+
rowActions?: (row: T) => ReactNode;
|
|
160
|
+
loading?: boolean;
|
|
161
|
+
loadingRowCount?: number;
|
|
162
|
+
emptyState?: ReactNode;
|
|
163
|
+
stickyHeader?: boolean;
|
|
164
|
+
caption?: ReactNode;
|
|
165
|
+
showCaption?: boolean;
|
|
166
|
+
access?: AccessRequirement;
|
|
167
|
+
labels?: TableLabels;
|
|
168
|
+
sx?: string;
|
|
169
|
+
slotProps?: DataGridSlotProps;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=dataGrid.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataGrid.types.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/dataGrid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO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,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
/**
|
|
3
|
+
* `<DataGrid>` variant recipe.
|
|
4
|
+
*
|
|
5
|
+
* Sibling of `tableVariants` — shares the same visual axes (variant /
|
|
6
|
+
* size / density) and the same identity-rule patterns:
|
|
7
|
+
* - No `dark:` variants on neutral palette (auto-invert via the
|
|
8
|
+
* dashforgePreset() CSS var swap).
|
|
9
|
+
* - Selected row uses LeftNav `itemActive` pattern
|
|
10
|
+
* (`bg-primary-100 text-primary-900`) — guaranteed contrast.
|
|
11
|
+
* - Hover uses one-tier elevation (`bg-neutral-100`).
|
|
12
|
+
*
|
|
13
|
+
* DataGrid-specific slot additions vs Table:
|
|
14
|
+
* - `stickyLeftCell` — column that uses `cols[i].sticky === 'left'`.
|
|
15
|
+
* Z-index ordering: `thead` (z-10) < `stickyLeftCell` (z-11) <
|
|
16
|
+
* `header × stickyLeft top-left corner cell` (z-20).
|
|
17
|
+
* - `paginationFooter` — wraps the optional `<Pagination>`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const dataGridVariants: import("tailwind-variants").TVReturnType<{
|
|
20
|
+
variant: {
|
|
21
|
+
plain: {};
|
|
22
|
+
lines: {};
|
|
23
|
+
striped: {
|
|
24
|
+
row: string;
|
|
25
|
+
};
|
|
26
|
+
bordered: {
|
|
27
|
+
table: string;
|
|
28
|
+
cell: string;
|
|
29
|
+
headerCell: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
sm: {
|
|
34
|
+
headerCell: string;
|
|
35
|
+
cell: string;
|
|
36
|
+
search: string;
|
|
37
|
+
};
|
|
38
|
+
md: {
|
|
39
|
+
headerCell: string;
|
|
40
|
+
cell: string;
|
|
41
|
+
search: string;
|
|
42
|
+
};
|
|
43
|
+
lg: {
|
|
44
|
+
headerCell: string;
|
|
45
|
+
cell: string;
|
|
46
|
+
search: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
density: {
|
|
50
|
+
compact: {
|
|
51
|
+
headerCell: string;
|
|
52
|
+
cell: string;
|
|
53
|
+
};
|
|
54
|
+
comfortable: {
|
|
55
|
+
headerCell: string;
|
|
56
|
+
cell: string;
|
|
57
|
+
};
|
|
58
|
+
spacious: {
|
|
59
|
+
headerCell: string;
|
|
60
|
+
cell: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
root: string;
|
|
65
|
+
toolbar: string;
|
|
66
|
+
search: string[];
|
|
67
|
+
scroll: string;
|
|
68
|
+
table: string;
|
|
69
|
+
thead: string;
|
|
70
|
+
tbody: string;
|
|
71
|
+
headerRow: string;
|
|
72
|
+
headerCell: string[];
|
|
73
|
+
headerCellButton: string[];
|
|
74
|
+
row: string[];
|
|
75
|
+
cell: string[];
|
|
76
|
+
selectionCell: string;
|
|
77
|
+
rowActionsCell: string[];
|
|
78
|
+
emptyState: string;
|
|
79
|
+
loadingOverlay: string;
|
|
80
|
+
bulkActionFooter: string[];
|
|
81
|
+
stickyLeftCell: string;
|
|
82
|
+
stickyLeftHeaderCell: string;
|
|
83
|
+
paginationFooter: string;
|
|
84
|
+
}, undefined, {
|
|
85
|
+
variant: {
|
|
86
|
+
plain: {};
|
|
87
|
+
lines: {};
|
|
88
|
+
striped: {
|
|
89
|
+
row: string;
|
|
90
|
+
};
|
|
91
|
+
bordered: {
|
|
92
|
+
table: string;
|
|
93
|
+
cell: string;
|
|
94
|
+
headerCell: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
size: {
|
|
98
|
+
sm: {
|
|
99
|
+
headerCell: string;
|
|
100
|
+
cell: string;
|
|
101
|
+
search: string;
|
|
102
|
+
};
|
|
103
|
+
md: {
|
|
104
|
+
headerCell: string;
|
|
105
|
+
cell: string;
|
|
106
|
+
search: string;
|
|
107
|
+
};
|
|
108
|
+
lg: {
|
|
109
|
+
headerCell: string;
|
|
110
|
+
cell: string;
|
|
111
|
+
search: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
density: {
|
|
115
|
+
compact: {
|
|
116
|
+
headerCell: string;
|
|
117
|
+
cell: string;
|
|
118
|
+
};
|
|
119
|
+
comfortable: {
|
|
120
|
+
headerCell: string;
|
|
121
|
+
cell: string;
|
|
122
|
+
};
|
|
123
|
+
spacious: {
|
|
124
|
+
headerCell: string;
|
|
125
|
+
cell: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
}, {
|
|
129
|
+
root: string;
|
|
130
|
+
toolbar: string;
|
|
131
|
+
search: string[];
|
|
132
|
+
scroll: string;
|
|
133
|
+
table: string;
|
|
134
|
+
thead: string;
|
|
135
|
+
tbody: string;
|
|
136
|
+
headerRow: string;
|
|
137
|
+
headerCell: string[];
|
|
138
|
+
headerCellButton: string[];
|
|
139
|
+
row: string[];
|
|
140
|
+
cell: string[];
|
|
141
|
+
selectionCell: string;
|
|
142
|
+
rowActionsCell: string[];
|
|
143
|
+
emptyState: string;
|
|
144
|
+
loadingOverlay: string;
|
|
145
|
+
bulkActionFooter: string[];
|
|
146
|
+
stickyLeftCell: string;
|
|
147
|
+
stickyLeftHeaderCell: string;
|
|
148
|
+
paginationFooter: string;
|
|
149
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
150
|
+
variant: {
|
|
151
|
+
plain: {};
|
|
152
|
+
lines: {};
|
|
153
|
+
striped: {
|
|
154
|
+
row: string;
|
|
155
|
+
};
|
|
156
|
+
bordered: {
|
|
157
|
+
table: string;
|
|
158
|
+
cell: string;
|
|
159
|
+
headerCell: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
size: {
|
|
163
|
+
sm: {
|
|
164
|
+
headerCell: string;
|
|
165
|
+
cell: string;
|
|
166
|
+
search: string;
|
|
167
|
+
};
|
|
168
|
+
md: {
|
|
169
|
+
headerCell: string;
|
|
170
|
+
cell: string;
|
|
171
|
+
search: string;
|
|
172
|
+
};
|
|
173
|
+
lg: {
|
|
174
|
+
headerCell: string;
|
|
175
|
+
cell: string;
|
|
176
|
+
search: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
density: {
|
|
180
|
+
compact: {
|
|
181
|
+
headerCell: string;
|
|
182
|
+
cell: string;
|
|
183
|
+
};
|
|
184
|
+
comfortable: {
|
|
185
|
+
headerCell: string;
|
|
186
|
+
cell: string;
|
|
187
|
+
};
|
|
188
|
+
spacious: {
|
|
189
|
+
headerCell: string;
|
|
190
|
+
cell: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
}, {
|
|
194
|
+
root: string;
|
|
195
|
+
toolbar: string;
|
|
196
|
+
search: string[];
|
|
197
|
+
scroll: string;
|
|
198
|
+
table: string;
|
|
199
|
+
thead: string;
|
|
200
|
+
tbody: string;
|
|
201
|
+
headerRow: string;
|
|
202
|
+
headerCell: string[];
|
|
203
|
+
headerCellButton: string[];
|
|
204
|
+
row: string[];
|
|
205
|
+
cell: string[];
|
|
206
|
+
selectionCell: string;
|
|
207
|
+
rowActionsCell: string[];
|
|
208
|
+
emptyState: string;
|
|
209
|
+
loadingOverlay: string;
|
|
210
|
+
bulkActionFooter: string[];
|
|
211
|
+
stickyLeftCell: string;
|
|
212
|
+
stickyLeftHeaderCell: string;
|
|
213
|
+
paginationFooter: string;
|
|
214
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
215
|
+
export type DataGridVariants = VariantProps<typeof dataGridVariants>;
|
|
216
|
+
//# sourceMappingURL=dataGrid.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataGrid.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGrid/dataGrid.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA0H3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/dialog.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dialog.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/dialog.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA6CzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Divider/divider.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEA0B1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AAYnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+
|
|
1
|
+
{"version":3,"file":"divider.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Divider/divider.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEA0B1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AAYnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA0C9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,uBAAuB,CAAC;AAgB/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,uBAAuB,CAAC;AAgB/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAmOhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/pagination.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pagination.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/pagination.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA4F7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/popover.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"popover.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Popover/popover.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmB1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton/skeleton.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"skeleton.variants.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton/skeleton.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmD3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TableProps } from './table.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashforge TW `<Table>` — declarative-first, market-grounded table.
|
|
4
|
+
*
|
|
5
|
+
* Design references:
|
|
6
|
+
* - Visual: Stripe (clean line dividers, hover row actions, sticky header)
|
|
7
|
+
* - Density: Pencil & Paper UX research (compact / comfortable / spacious)
|
|
8
|
+
* - A11Y: W3C WAI Table tutorial (semantic `<table>`, scope, aria-sort)
|
|
9
|
+
* - Column model: extended from Dashforge MUI Table existing API
|
|
10
|
+
*
|
|
11
|
+
* Smart defaults: column types auto-detected → numbers right-aligned
|
|
12
|
+
* + tabular-nums, dates monospace, booleans center-aligned. Override
|
|
13
|
+
* via explicit `align` / `monospace` per column.
|
|
14
|
+
*
|
|
15
|
+
* State (sort / search / filter / selection / expansion) is internal
|
|
16
|
+
* by default; pass the controlled prop + matching change handler to
|
|
17
|
+
* lift state up — same pattern as `<TextField>` value.
|
|
18
|
+
*
|
|
19
|
+
* i18n: pass `header: t('users.name')` for column headers; pass
|
|
20
|
+
* `labels={{ searchPlaceholder: t('...'), ... }}` for internal default
|
|
21
|
+
* strings.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Table<T extends object>(props: TableProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,UAAU,EAKX,MAAM,kBAAkB,CAAC;AA0B1B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,kDAgW3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps } from '../../Button/button.types.js';
|
|
3
|
+
export interface RenderButtonProps extends Pick<ButtonProps, 'variant' | 'color' | 'size' | 'disabled' | 'access'> {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Inline button cell renderer. Thin wrapper over `<Button>` with
|
|
9
|
+
* the size narrowed to `sm` by default (table density expects compact
|
|
10
|
+
* controls).
|
|
11
|
+
*/
|
|
12
|
+
export declare function RenderButton(props: RenderButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=RenderButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/cells/RenderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC/E,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAOpD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
3
|
+
/**
|
|
4
|
+
* Internal mini-chip used by the cell renderer library. Not exported
|
|
5
|
+
* from `@dashforge/tw` as a standalone component (per Sprint 4.1
|
|
6
|
+
* scope decision — a standalone `<Chip>` may ship in Sprint 5 if
|
|
7
|
+
* demand emerges).
|
|
8
|
+
*
|
|
9
|
+
* Variants:
|
|
10
|
+
* - `color`: 7 intents (neutral / primary / success / warning /
|
|
11
|
+
* danger / info / secondary)
|
|
12
|
+
* - `variant`: `soft` (default) / `solid` / `outline`
|
|
13
|
+
* - `size`: `sm` / `md`
|
|
14
|
+
*/
|
|
15
|
+
declare const chipVariants: import("tailwind-variants").TVReturnType<{
|
|
16
|
+
color: {
|
|
17
|
+
neutral: string;
|
|
18
|
+
primary: string;
|
|
19
|
+
success: string;
|
|
20
|
+
warning: string;
|
|
21
|
+
danger: string;
|
|
22
|
+
info: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
};
|
|
25
|
+
variant: {
|
|
26
|
+
soft: string;
|
|
27
|
+
solid: string;
|
|
28
|
+
outline: string;
|
|
29
|
+
};
|
|
30
|
+
size: {
|
|
31
|
+
sm: string;
|
|
32
|
+
md: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, string[], {
|
|
35
|
+
color: {
|
|
36
|
+
neutral: string;
|
|
37
|
+
primary: string;
|
|
38
|
+
success: string;
|
|
39
|
+
warning: string;
|
|
40
|
+
danger: string;
|
|
41
|
+
info: string;
|
|
42
|
+
secondary: string;
|
|
43
|
+
};
|
|
44
|
+
variant: {
|
|
45
|
+
soft: string;
|
|
46
|
+
solid: string;
|
|
47
|
+
outline: string;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
sm: string;
|
|
51
|
+
md: string;
|
|
52
|
+
};
|
|
53
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
54
|
+
color: {
|
|
55
|
+
neutral: string;
|
|
56
|
+
primary: string;
|
|
57
|
+
success: string;
|
|
58
|
+
warning: string;
|
|
59
|
+
danger: string;
|
|
60
|
+
info: string;
|
|
61
|
+
secondary: string;
|
|
62
|
+
};
|
|
63
|
+
variant: {
|
|
64
|
+
soft: string;
|
|
65
|
+
solid: string;
|
|
66
|
+
outline: string;
|
|
67
|
+
};
|
|
68
|
+
size: {
|
|
69
|
+
sm: string;
|
|
70
|
+
md: string;
|
|
71
|
+
};
|
|
72
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
73
|
+
type ChipVariants = VariantProps<typeof chipVariants>;
|
|
74
|
+
export interface RenderChipProps extends ChipVariants {
|
|
75
|
+
children: ReactNode;
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare function RenderChip(props: RenderChipProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=RenderChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderChip.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/cells/RenderChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAsEhB,CAAC;AAEH,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAEtD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAOhD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface RenderTextProps {
|
|
3
|
+
value: ReactNode;
|
|
4
|
+
/** Truncate to one line with ellipsis on overflow. @default false */
|
|
5
|
+
truncate?: boolean;
|
|
6
|
+
/** Secondary text color (less prominent). @default false */
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
/** Extra class merged via `tailwind-merge`. */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Plain text cell renderer. Wraps the value in a `<span>` and
|
|
13
|
+
* optionally truncates on overflow. Use this for the most common
|
|
14
|
+
* case: render a single string value.
|
|
15
|
+
*
|
|
16
|
+
* The Table component does NOT use this by default for plain
|
|
17
|
+
* string columns — it just renders `{value}` directly. Use
|
|
18
|
+
* `RenderText` when you need the truncate / muted styling.
|
|
19
|
+
*/
|
|
20
|
+
export declare function RenderText(props: RenderTextProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=RenderText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderText.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/cells/RenderText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAchD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface RenderTwoLineProps {
|
|
3
|
+
primary: ReactNode;
|
|
4
|
+
secondary: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Two-line cell renderer: a bold primary line stacked above a muted
|
|
9
|
+
* secondary line. Useful for `Name + email`, `Title + ID`, etc.
|
|
10
|
+
*
|
|
11
|
+
* Replaces the MUI-side `RenderTwoLineCell` without the magic-number
|
|
12
|
+
* vertical-align fudges (`mt: 0.8 / 0.2`) — flexbox handles the
|
|
13
|
+
* vertical layout cleanly.
|
|
14
|
+
*
|
|
15
|
+
* Dashforge identity rule: text colors auto-invert via the
|
|
16
|
+
* `dashforgePreset()` CSS-variable swap. No `dark:` variants needed
|
|
17
|
+
* on neutral palette.
|
|
18
|
+
*/
|
|
19
|
+
export declare function RenderTwoLine(props: RenderTwoLineProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=RenderTwoLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderTwoLine.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/cells/RenderTwoLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAYtD"}
|