@mechane-ai/elements 0.45.0 → 0.46.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/README.md +48 -18
- package/bin/mechane-elements-catalog.mjs +42 -4
- package/dist/ai.js +268 -202
- package/dist/catalog.json +91 -31
- package/dist/categorical-values-BXi-rJuv.js +74 -0
- package/dist/chart-cursor-1mFd48Jc.js +23 -0
- package/dist/chart-data-CIJVWCYt.js +21 -0
- package/dist/{chart-frame-Ztktqs1b.js → chart-frame-BaxKn_MB.js} +22 -41
- package/dist/{chart-input-BO3BqlFO.js → chart-input-Bm82_9Rd.js} +2 -2
- package/dist/chart-theme-4zprJ3rW.js +404 -0
- package/dist/charts/cartesian.js +1598 -1432
- package/dist/charts/distribution.js +476 -404
- package/dist/charts/graph.js +363 -349
- package/dist/charts/hierarchy.js +103 -94
- package/dist/charts/matrix.js +340 -333
- package/dist/charts/timeline.js +167 -134
- package/dist/charts.js +3 -3
- package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
- package/dist/collections.js +1648 -1188
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +67 -66
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/csp.js +6 -11
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +274 -214
- package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
- package/dist/forms.js +3 -3
- package/dist/index.js +1 -1
- package/dist/layout.js +207 -207
- package/dist/navigation.js +4 -3
- package/dist/packages/ai/src/conversation.d.ts +2 -0
- package/dist/packages/ai/src/prompt-input.d.ts +7 -2
- package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
- package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
- package/dist/packages/charts/src/categorical-values.d.ts +14 -9
- package/dist/packages/charts/src/chart-frame.d.ts +7 -9
- package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
- package/dist/packages/charts/src/chart-range.d.ts +33 -0
- package/dist/packages/charts/src/chart-rows.d.ts +20 -0
- package/dist/packages/charts/src/chart-theme.d.ts +17 -0
- package/dist/packages/charts/src/chart.d.ts +81 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +4 -4
- package/dist/packages/charts/src/index.d.ts +1 -0
- package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
- package/dist/packages/charts/src/plot-width.d.ts +0 -1
- package/dist/packages/charts/src/timeline/index.d.ts +1 -1
- package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
- package/dist/packages/collections/src/collection-controls.d.ts +5 -1
- package/dist/packages/collections/src/collection-filters.d.ts +4 -1
- package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
- package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
- package/dist/packages/collections/src/data-table-text.d.ts +13 -0
- package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
- package/dist/packages/collections/src/data-table.d.ts +3 -85
- package/dist/packages/collections/src/index.d.ts +11 -6
- package/dist/packages/collections/src/query-controls.d.ts +6 -2
- package/dist/packages/collections/src/table-results.d.ts +47 -13
- package/dist/packages/collections/src/timeline.d.ts +1 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
- package/dist/packages/collections/src/use-table-window.d.ts +25 -0
- package/dist/packages/content/src/viewer.d.ts +8 -0
- package/dist/packages/core/src/disclosure.d.ts +9 -1
- package/dist/packages/core/src/index.d.ts +1 -0
- package/dist/packages/core/src/route-link.d.ts +11 -0
- package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
- package/dist/packages/forms/src/file-picker.d.ts +15 -0
- package/dist/packages/forms/src/form-controls.d.ts +1 -6
- package/dist/packages/forms/src/forms.d.ts +4 -1
- package/dist/packages/forms/src/index.d.ts +4 -2
- package/dist/packages/forms/src/selection.d.ts +14 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
- package/dist/packages/navigation/src/index.d.ts +1 -1
- package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
- package/dist/plot-width-v2c_rA20.js +63 -0
- package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
- package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
- package/dist/src-CGc_hjxJ.js +409 -0
- package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
- package/dist/{src-Dcs3SZ9V.js → src-DVHlknB6.js} +1 -1
- package/dist/styles2.css +136 -114
- package/package.json +1 -4
- package/skills/extend-elements/SKILL.md +74 -0
- package/skills/review-elements/SKILL.md +76 -0
- package/skills/upgrade-elements/SKILL.md +34 -0
- package/skills/upgrade-elements/references/releases.md +58 -0
- package/skills/use-elements/SKILL.md +64 -13
- package/skills/use-elements/references/agent.md +57 -0
- package/skills/use-elements/references/charts.md +63 -0
- package/skills/use-elements/references/collections.md +89 -0
- package/skills/use-elements/references/conversations.md +47 -0
- package/skills/use-elements/references/forms.md +81 -0
- package/skills/use-elements/references/styling.md +70 -0
- package/skills/use-elements/references/workspace.md +3 -3
- package/dist/categorical-values-DZLGQVW1.js +0 -63
- package/dist/chart-navigation-BAbb5PV9.js +0 -154
- package/dist/header-styles-COxCYFZx.js +0 -90
- package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
- package/dist/packages/charts/src/chart-surface.d.ts +0 -27
- package/dist/packages/navigation/src/route-link.d.ts +0 -2
- package/dist/plot-width-CIqBiHcd.js +0 -105
- package/dist/src-Bk7M67zy.js +0 -396
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type TableSizing = 'content' | 'fill';
|
|
4
|
+
export type RowSizing = 'fixed' | 'content';
|
|
5
|
+
export type DataTableColumnRole = 'primary' | 'text' | 'status' | 'number' | 'timestamp' | 'actions';
|
|
6
|
+
export declare const cellSizingStyles: {
|
|
7
|
+
fixed: Readonly<{}>;
|
|
8
|
+
content: Readonly<{
|
|
9
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const columnRoleStyles: {
|
|
13
|
+
primary: Readonly<{
|
|
14
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "start">;
|
|
15
|
+
}>;
|
|
16
|
+
text: Readonly<{
|
|
17
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "start">;
|
|
18
|
+
}>;
|
|
19
|
+
status: Readonly<{
|
|
20
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "start">;
|
|
21
|
+
}>;
|
|
22
|
+
number: Readonly<{
|
|
23
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
|
|
24
|
+
}>;
|
|
25
|
+
timestamp: Readonly<{
|
|
26
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
|
|
27
|
+
}>;
|
|
28
|
+
actions: Readonly<{
|
|
29
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
export declare const frameStyles: {
|
|
33
|
+
content: Readonly<{}>;
|
|
34
|
+
fill: Readonly<{
|
|
35
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
36
|
+
readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
|
|
37
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
38
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 0>;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
export declare const viewportStyles: {
|
|
42
|
+
content: Readonly<{}>;
|
|
43
|
+
fill: Readonly<{
|
|
44
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
45
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 0>;
|
|
46
|
+
}>;
|
|
47
|
+
};
|
|
48
|
+
export type DataTableColumnLayout = {
|
|
49
|
+
readonly id: string;
|
|
50
|
+
readonly label: string;
|
|
51
|
+
readonly role: DataTableColumnRole;
|
|
52
|
+
readonly width?: number;
|
|
53
|
+
readonly isSecondary?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type DataTableColumn<Row> = DataTableColumnLayout & {
|
|
56
|
+
readonly cell: (row: Row) => ReactNode;
|
|
57
|
+
readonly shouldTruncate?: boolean;
|
|
58
|
+
readonly canSort?: boolean;
|
|
59
|
+
};
|
|
60
|
+
export declare function prepareColumns<Column extends DataTableColumnLayout>(columns: ReadonlyArray<Column>): (Column & {
|
|
61
|
+
width?: number;
|
|
62
|
+
})[];
|
|
63
|
+
export declare function tableWidths(columns: ReadonlyArray<DataTableColumnLayout>, selectionWidth?: number): {
|
|
64
|
+
minimumWidth: number;
|
|
65
|
+
compactWidth: number;
|
|
66
|
+
};
|
|
67
|
+
export declare function subscribeToCompactTable(onChange: () => void): () => void;
|
|
68
|
+
export declare function isCompactTable(): boolean;
|
|
69
|
+
export declare function ColumnGroup({ columns, canSelect, }: {
|
|
70
|
+
readonly columns: ReadonlyArray<DataTableColumnLayout>;
|
|
71
|
+
readonly canSelect?: boolean;
|
|
72
|
+
}): ReactNode;
|
|
73
|
+
export declare function TableCellContent({ role, isFixed, shouldTruncate, children, }: {
|
|
74
|
+
readonly role: DataTableColumnRole;
|
|
75
|
+
readonly isFixed: boolean;
|
|
76
|
+
readonly shouldTruncate: boolean | undefined;
|
|
77
|
+
readonly children: ReactNode;
|
|
78
|
+
}): ReactNode;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CollectionPaginationProps } from './collection-controls.tsx';
|
|
3
|
+
import type { DataTableColumn, RowSizing } from './data-table-layout.tsx';
|
|
4
|
+
import type { DataTableRowAction } from './data-table-trigger.tsx';
|
|
5
|
+
import type { DataTableSelectionDetails, DataTableSort, DataTableSortDetails, TableResultStatus } from './table-results.tsx';
|
|
6
|
+
export type DataTableWindow = {
|
|
7
|
+
readonly height: number | 'fill';
|
|
8
|
+
readonly estimatedRowHeight?: number;
|
|
9
|
+
};
|
|
10
|
+
type SortProperties<Row> = {
|
|
11
|
+
readonly columns: ReadonlyArray<DataTableColumn<Row>>;
|
|
12
|
+
readonly sort: DataTableSort | undefined;
|
|
13
|
+
readonly onSortChange: (sort: DataTableSort | undefined, details: DataTableSortDetails) => void;
|
|
14
|
+
} | {
|
|
15
|
+
readonly columns: ReadonlyArray<DataTableColumn<Row> & {
|
|
16
|
+
readonly canSort?: false;
|
|
17
|
+
}>;
|
|
18
|
+
readonly sort?: never;
|
|
19
|
+
readonly onSortChange?: never;
|
|
20
|
+
};
|
|
21
|
+
type SelectionProperties<Row> = {
|
|
22
|
+
readonly selectedIds: ReadonlySet<string>;
|
|
23
|
+
readonly onSelectionChange: (selectedIds: ReadonlySet<string>, details: DataTableSelectionDetails) => void;
|
|
24
|
+
readonly selectionLabel: (row: Row) => string;
|
|
25
|
+
};
|
|
26
|
+
type OptionalSelection<Row> = SelectionProperties<Row> | {
|
|
27
|
+
readonly selectedIds?: never;
|
|
28
|
+
readonly onSelectionChange?: never;
|
|
29
|
+
readonly selectionLabel?: never;
|
|
30
|
+
};
|
|
31
|
+
export type TableRowsProps<Row> = SortProperties<Row> & OptionalSelection<Row> & {
|
|
32
|
+
readonly rows: ReadonlyArray<Row>;
|
|
33
|
+
readonly getRowId: (row: Row) => string;
|
|
34
|
+
readonly caption: string;
|
|
35
|
+
readonly empty: ReactNode;
|
|
36
|
+
readonly filteredEmpty?: ReactNode;
|
|
37
|
+
readonly rowAction?: DataTableRowAction<Row>;
|
|
38
|
+
readonly activeRowId?: string | undefined;
|
|
39
|
+
readonly focusRowId?: string | undefined;
|
|
40
|
+
readonly onRowHighlightChange?: ((rowId: string | undefined) => void) | undefined;
|
|
41
|
+
readonly hideCaption?: boolean;
|
|
42
|
+
readonly hideHeaders?: boolean;
|
|
43
|
+
readonly rowSizing?: RowSizing;
|
|
44
|
+
readonly window?: DataTableWindow;
|
|
45
|
+
readonly endContent?: ReactNode;
|
|
46
|
+
readonly onEndReached?: () => void;
|
|
47
|
+
readonly footer?: ReactNode;
|
|
48
|
+
readonly pagination?: CollectionPaginationProps;
|
|
49
|
+
readonly resultStatus?: TableResultStatus;
|
|
50
|
+
};
|
|
51
|
+
export declare function TableRows<Row extends object>({ rows, columns: suppliedColumns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, onRowHighlightChange, hideCaption, hideHeaders, rowSizing, window, endContent, onEndReached, footer, pagination, resultStatus, isPlaceholder, }: TableRowsProps<Row> & {
|
|
52
|
+
isPlaceholder?: boolean;
|
|
53
|
+
}): ReactNode;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { conditions } from '../../foundations/src/constants.stylex.ts';
|
|
3
|
+
export declare const selectionColumnWidth = 76;
|
|
4
|
+
export declare const tableStyles: Readonly<{
|
|
5
|
+
readonly frame: Readonly<{
|
|
6
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
7
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
8
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
9
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
10
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
11
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
12
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
13
|
+
}>;
|
|
14
|
+
readonly content: {};
|
|
15
|
+
readonly placeholder: Readonly<{
|
|
16
|
+
readonly pointerEvents: stylex.StyleXClassNameFor<"pointerEvents", "none">;
|
|
17
|
+
}>;
|
|
18
|
+
readonly fillFrame: Readonly<{
|
|
19
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
20
|
+
readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
|
|
21
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
22
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 0>;
|
|
23
|
+
}>;
|
|
24
|
+
readonly viewport: Readonly<{
|
|
25
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
26
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
27
|
+
readonly containerType: stylex.StyleXClassNameFor<"containerType", "inline-size">;
|
|
28
|
+
readonly overflow: stylex.StyleXClassNameFor<"overflow", "auto">;
|
|
29
|
+
readonly overscrollBehaviorY: stylex.StyleXClassNameFor<"overscrollBehaviorY", "auto">;
|
|
30
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none">;
|
|
31
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
32
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
33
|
+
readonly outlineStyle: "solid";
|
|
34
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
35
|
+
readonly outlineOffset: -2;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
38
|
+
readonly fillViewport: Readonly<{
|
|
39
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
40
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 0>;
|
|
41
|
+
}>;
|
|
42
|
+
readonly virtual: (height: number) => readonly [Readonly<{
|
|
43
|
+
maxHeight: stylex.StyleXClassNameFor<"maxHeight", number>;
|
|
44
|
+
}>, stylex.InlineStyles];
|
|
45
|
+
readonly table: Readonly<{
|
|
46
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
47
|
+
readonly borderCollapse: stylex.StyleXClassNameFor<"borderCollapse", "collapse">;
|
|
48
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
49
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "left">;
|
|
50
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
51
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
52
|
+
}>;
|
|
53
|
+
readonly fixed: Readonly<{
|
|
54
|
+
readonly tableLayout: stylex.StyleXClassNameFor<"tableLayout", "fixed">;
|
|
55
|
+
}>;
|
|
56
|
+
readonly minimumWidth: (width: number, compactWidth: number) => readonly [Readonly<{
|
|
57
|
+
minWidth: stylex.StyleXClassNameFor<"minWidth", number>;
|
|
58
|
+
}>, stylex.InlineStyles];
|
|
59
|
+
readonly caption: Readonly<{
|
|
60
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "left">;
|
|
61
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
62
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
63
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
64
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
65
|
+
}>;
|
|
66
|
+
readonly header: Readonly<{
|
|
67
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
68
|
+
readonly position: stylex.StyleXClassNameFor<"position", "sticky">;
|
|
69
|
+
readonly top: stylex.StyleXClassNameFor<"top", 0>;
|
|
70
|
+
readonly zIndex: stylex.StyleXClassNameFor<"zIndex", string>;
|
|
71
|
+
readonly height: stylex.StyleXClassNameFor<"height", number>;
|
|
72
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", 0>;
|
|
73
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
74
|
+
readonly borderBottomWidth: stylex.StyleXClassNameFor<"borderBottomWidth", 1>;
|
|
75
|
+
readonly borderBottomStyle: stylex.StyleXClassNameFor<"borderBottomStyle", "solid">;
|
|
76
|
+
readonly borderBottomColor: stylex.StyleXClassNameFor<"borderBottomColor", string>;
|
|
77
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
78
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
79
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
80
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
81
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
82
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
83
|
+
}>;
|
|
84
|
+
readonly headerLabel: Readonly<{
|
|
85
|
+
readonly display: stylex.StyleXClassNameFor<"display", "block">;
|
|
86
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
87
|
+
readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
|
|
88
|
+
readonly textOverflow: stylex.StyleXClassNameFor<"textOverflow", "ellipsis">;
|
|
89
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
90
|
+
}>;
|
|
91
|
+
readonly sort: Readonly<{
|
|
92
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
93
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
94
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
95
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "100%">;
|
|
96
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
97
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
98
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
99
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
100
|
+
readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
|
|
101
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
|
|
102
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", "inherit">;
|
|
103
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "inherit">;
|
|
104
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", "inherit">;
|
|
105
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", "inherit">;
|
|
106
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
107
|
+
readonly ':hover': stylex.StyleXClassNameFor<":hover", {
|
|
108
|
+
readonly color: {
|
|
109
|
+
readonly [conditions.hoverPointer]: stylex.StyleXVar<string>;
|
|
110
|
+
};
|
|
111
|
+
}>;
|
|
112
|
+
readonly ':active': stylex.StyleXClassNameFor<":active", {
|
|
113
|
+
readonly backgroundColor: stylex.StyleXVar<string>;
|
|
114
|
+
}>;
|
|
115
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
116
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
117
|
+
readonly outlineStyle: "solid";
|
|
118
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
119
|
+
readonly outlineOffset: 2;
|
|
120
|
+
}>;
|
|
121
|
+
}>;
|
|
122
|
+
readonly sortIcon: Readonly<{
|
|
123
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
124
|
+
}>;
|
|
125
|
+
readonly row: Readonly<{
|
|
126
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
127
|
+
readonly isolation: stylex.StyleXClassNameFor<"isolation", "isolate">;
|
|
128
|
+
readonly height: stylex.StyleXClassNameFor<"height", number>;
|
|
129
|
+
readonly borderBottomWidth: stylex.StyleXClassNameFor<"borderBottomWidth", 1>;
|
|
130
|
+
readonly borderBottomStyle: stylex.StyleXClassNameFor<"borderBottomStyle", "solid">;
|
|
131
|
+
readonly borderBottomColor: stylex.StyleXClassNameFor<"borderBottomColor", string>;
|
|
132
|
+
readonly ':hover:not(:active)': stylex.StyleXClassNameFor<":hover:not(:active)", {
|
|
133
|
+
readonly backgroundColor: {
|
|
134
|
+
readonly [conditions.hoverPointer]: stylex.StyleXVar<string>;
|
|
135
|
+
};
|
|
136
|
+
}>;
|
|
137
|
+
readonly ':last-child': stylex.StyleXClassNameFor<":last-child", {
|
|
138
|
+
readonly borderBottomWidth: 0;
|
|
139
|
+
}>;
|
|
140
|
+
}>;
|
|
141
|
+
readonly selected: Readonly<{
|
|
142
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
143
|
+
}>;
|
|
144
|
+
readonly actionable: Readonly<{
|
|
145
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
146
|
+
readonly ':active': stylex.StyleXClassNameFor<":active", {
|
|
147
|
+
readonly backgroundColor: stylex.StyleXVar<string>;
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
150
|
+
readonly trigger: Readonly<{
|
|
151
|
+
readonly WebkitUserSelect: stylex.StyleXClassNameFor<"WebkitUserSelect", "text">;
|
|
152
|
+
readonly userSelect: stylex.StyleXClassNameFor<"userSelect", "text">;
|
|
153
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
154
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
155
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
156
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
157
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
158
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
159
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
160
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
161
|
+
readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
|
|
162
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
|
|
163
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", "inherit">;
|
|
164
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "inherit">;
|
|
165
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", "inherit">;
|
|
166
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", "inherit">;
|
|
167
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "inherit">;
|
|
168
|
+
readonly textDecoration: stylex.StyleXClassNameFor<"textDecoration", "none">;
|
|
169
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
170
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none">;
|
|
171
|
+
readonly '::after': stylex.StyleXClassNameFor<"::after", {
|
|
172
|
+
readonly content: "\"\"";
|
|
173
|
+
readonly position: "absolute";
|
|
174
|
+
readonly inset: 0;
|
|
175
|
+
}>;
|
|
176
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
177
|
+
readonly '::after': {
|
|
178
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
179
|
+
readonly outlineStyle: "solid";
|
|
180
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
181
|
+
readonly outlineOffset: -2;
|
|
182
|
+
};
|
|
183
|
+
}>;
|
|
184
|
+
readonly ':disabled': stylex.StyleXClassNameFor<":disabled", {
|
|
185
|
+
readonly cursor: "default";
|
|
186
|
+
readonly color: stylex.StyleXVar<string>;
|
|
187
|
+
}>;
|
|
188
|
+
}>;
|
|
189
|
+
readonly cell: Readonly<{
|
|
190
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
191
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", 0>;
|
|
192
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
193
|
+
readonly verticalAlign: stylex.StyleXClassNameFor<"verticalAlign", "middle">;
|
|
194
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
195
|
+
}>;
|
|
196
|
+
readonly start: Readonly<{
|
|
197
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "start">;
|
|
198
|
+
}>;
|
|
199
|
+
readonly end: Readonly<{
|
|
200
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
|
|
201
|
+
}>;
|
|
202
|
+
readonly width: (width: number) => readonly [Readonly<{
|
|
203
|
+
width: stylex.StyleXClassNameFor<"width", number>;
|
|
204
|
+
minWidth: stylex.StyleXClassNameFor<"minWidth", number>;
|
|
205
|
+
}>, stylex.InlineStyles];
|
|
206
|
+
readonly secondary: Readonly<{
|
|
207
|
+
readonly display: stylex.StyleXClassNameFor<"display", {
|
|
208
|
+
readonly [conditions.compactTable]: "none";
|
|
209
|
+
}>;
|
|
210
|
+
}>;
|
|
211
|
+
readonly truncated: Readonly<{
|
|
212
|
+
readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
|
|
213
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
214
|
+
readonly textOverflow: stylex.StyleXClassNameFor<"textOverflow", "ellipsis">;
|
|
215
|
+
}>;
|
|
216
|
+
readonly cellContent: Readonly<{
|
|
217
|
+
readonly display: stylex.StyleXClassNameFor<"display", "block">;
|
|
218
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
219
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
220
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "100%">;
|
|
221
|
+
readonly ':has(a, button, input, select, textarea, label, summary, [tabindex], [contenteditable])': stylex.StyleXClassNameFor<":has(a, button, input, select, textarea, label, summary, [tabindex], [contenteditable])", {
|
|
222
|
+
readonly position: "relative";
|
|
223
|
+
readonly zIndex: 1;
|
|
224
|
+
}>;
|
|
225
|
+
}>;
|
|
226
|
+
readonly rowControl: Readonly<{
|
|
227
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
228
|
+
readonly zIndex: stylex.StyleXClassNameFor<"zIndex", 1>;
|
|
229
|
+
}>;
|
|
230
|
+
readonly text: Readonly<{
|
|
231
|
+
readonly display: stylex.StyleXClassNameFor<"display", "block">;
|
|
232
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
233
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
234
|
+
}>;
|
|
235
|
+
readonly textColumn: Readonly<{
|
|
236
|
+
readonly flex: stylex.StyleXClassNameFor<"flex", 1>;
|
|
237
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
238
|
+
}>;
|
|
239
|
+
readonly textRow: Readonly<{
|
|
240
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
241
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
242
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
243
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
244
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
245
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
246
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
247
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
248
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
249
|
+
}>;
|
|
250
|
+
readonly primaryRow: Readonly<{
|
|
251
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
252
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
253
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", string>;
|
|
254
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
255
|
+
}>;
|
|
256
|
+
readonly primaryText: Readonly<{
|
|
257
|
+
readonly width: stylex.StyleXClassNameFor<"width", "auto">;
|
|
258
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 1>;
|
|
259
|
+
}>;
|
|
260
|
+
readonly adornment: Readonly<{
|
|
261
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
262
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
263
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
264
|
+
}>;
|
|
265
|
+
readonly secondaryText: Readonly<{
|
|
266
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
267
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
268
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
269
|
+
}>;
|
|
270
|
+
readonly cellViewport: Readonly<{
|
|
271
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
272
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
273
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
274
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
275
|
+
readonly height: stylex.StyleXClassNameFor<"height", `calc(${number}px - 1px)`>;
|
|
276
|
+
}>;
|
|
277
|
+
readonly fixedContent: Readonly<{
|
|
278
|
+
readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", `calc(${number}px - 1px)`>;
|
|
279
|
+
}>;
|
|
280
|
+
readonly readable: Readonly<{
|
|
281
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
282
|
+
}>;
|
|
283
|
+
readonly contentCell: Readonly<{
|
|
284
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
285
|
+
}>;
|
|
286
|
+
readonly contentViewport: Readonly<{
|
|
287
|
+
readonly height: stylex.StyleXClassNameFor<"height", "auto">;
|
|
288
|
+
}>;
|
|
289
|
+
readonly selection: Readonly<{
|
|
290
|
+
readonly width: stylex.StyleXClassNameFor<"width", 76>;
|
|
291
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
292
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
293
|
+
}>;
|
|
294
|
+
readonly spacer: (height: number) => readonly [Readonly<{
|
|
295
|
+
height: stylex.StyleXClassNameFor<"height", number>;
|
|
296
|
+
padding: stylex.StyleXClassNameFor<"padding", number>;
|
|
297
|
+
borderWidth: stylex.StyleXClassNameFor<"borderWidth", number>;
|
|
298
|
+
}>, stylex.InlineStyles];
|
|
299
|
+
readonly sizer: (height: number) => readonly [Readonly<{
|
|
300
|
+
position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
301
|
+
top: stylex.StyleXClassNameFor<"top", number>;
|
|
302
|
+
insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", number>;
|
|
303
|
+
width: stylex.StyleXClassNameFor<"width", number>;
|
|
304
|
+
height: stylex.StyleXClassNameFor<"height", number>;
|
|
305
|
+
visibility: stylex.StyleXClassNameFor<"visibility", "hidden">;
|
|
306
|
+
pointerEvents: stylex.StyleXClassNameFor<"pointerEvents", "none">;
|
|
307
|
+
}>, stylex.InlineStyles];
|
|
308
|
+
readonly emptyCell: Readonly<{
|
|
309
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
310
|
+
}>;
|
|
311
|
+
readonly empty: Readonly<{
|
|
312
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
313
|
+
readonly position: stylex.StyleXClassNameFor<"position", "sticky">;
|
|
314
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", 0>;
|
|
315
|
+
readonly width: stylex.StyleXClassNameFor<"width", "100cqi">;
|
|
316
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "100%">;
|
|
317
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
318
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "center">;
|
|
319
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "normal">;
|
|
320
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
321
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
322
|
+
}>;
|
|
323
|
+
readonly footer: Readonly<{
|
|
324
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
325
|
+
readonly borderTopWidth: stylex.StyleXClassNameFor<"borderTopWidth", 1>;
|
|
326
|
+
readonly borderTopStyle: stylex.StyleXClassNameFor<"borderTopStyle", "solid">;
|
|
327
|
+
readonly borderTopColor: stylex.StyleXClassNameFor<"borderTopColor", string>;
|
|
328
|
+
}>;
|
|
329
|
+
readonly endContent: Readonly<{
|
|
330
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
331
|
+
readonly padding: stylex.StyleXClassNameFor<"padding", string>;
|
|
332
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
333
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
334
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
335
|
+
readonly ':empty': stylex.StyleXClassNameFor<":empty", {
|
|
336
|
+
readonly minHeight: 0;
|
|
337
|
+
readonly padding: 0;
|
|
338
|
+
}>;
|
|
339
|
+
}>;
|
|
340
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type DataTableTextProps = {
|
|
3
|
+
readonly children: string;
|
|
4
|
+
readonly secondary?: string | undefined;
|
|
5
|
+
readonly leading?: ReactNode;
|
|
6
|
+
readonly trailing?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type DataTableTextPlaceholderProps = {
|
|
9
|
+
readonly leading?: ReactNode;
|
|
10
|
+
readonly isSecondary?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function DataTableText({ children, secondary, leading, trailing }: DataTableTextProps): ReactNode;
|
|
13
|
+
export declare function DataTableTextPlaceholder({ leading, isSecondary }: DataTableTextPlaceholderProps): ReactNode;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export type DataTableRowAction<Row> = {
|
|
3
|
+
readonly label?: (row: Row) => string;
|
|
4
|
+
} & ({
|
|
5
|
+
readonly href: (row: Row) => string;
|
|
6
|
+
readonly onActivate?: (row: Row) => void;
|
|
7
|
+
readonly disabled?: never;
|
|
8
|
+
} | ({
|
|
9
|
+
readonly href?: never;
|
|
10
|
+
readonly onActivate: (row: Row) => void;
|
|
11
|
+
} & Pick<ComponentProps<'button'>, 'disabled'>));
|
|
12
|
+
type RowTriggerProps<Row> = {
|
|
13
|
+
/** The row's position among the supplied rows, which the table's one Tab stop moves by. */
|
|
14
|
+
readonly index: number;
|
|
15
|
+
readonly recordId: string;
|
|
16
|
+
readonly row: Row;
|
|
17
|
+
readonly action: DataTableRowAction<Row>;
|
|
18
|
+
readonly isActive: boolean;
|
|
19
|
+
readonly children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
/** A row's primary link or button. It covers the row's plain cells, and the rows share one Tab stop. */
|
|
22
|
+
export declare function RowTrigger<Row>({ index, recordId, row, action, isActive, children }: RowTriggerProps<Row>): ReactNode;
|
|
23
|
+
export {};
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DataTableColumnLayout } from './data-table-layout.tsx';
|
|
3
|
+
import type { TableRowsProps } from './data-table-rows.tsx';
|
|
3
4
|
import type { LocalTableQuery, TableQuery } from './table-query.tsx';
|
|
4
|
-
import type { DataTableSort, TableResultStatus } from './table-results.tsx';
|
|
5
|
-
type RowSizing = 'fixed' | 'content';
|
|
6
|
-
export type DataTableColumnRole = 'primary' | 'text' | 'status' | 'number' | 'timestamp' | 'actions';
|
|
7
|
-
export type DataTableColumnLayout = {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly label: string;
|
|
10
|
-
readonly role: DataTableColumnRole;
|
|
11
|
-
readonly width?: number;
|
|
12
|
-
readonly isSecondary?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export type DataTableColumn<Row> = DataTableColumnLayout & {
|
|
15
|
-
readonly cell: (row: Row) => ReactNode;
|
|
16
|
-
readonly shouldTruncate?: boolean;
|
|
17
|
-
readonly canSort?: boolean;
|
|
18
|
-
};
|
|
19
5
|
export type DataTablePlaceholderProps = Pick<DataTableProps<object>, 'caption' | 'hideCaption' | 'hideHeaders' | 'rowSizing' | 'window' | 'footer'> & {
|
|
20
6
|
readonly columns: ReadonlyArray<DataTableColumnLayout & {
|
|
21
7
|
readonly shouldTruncate?: boolean;
|
|
@@ -24,74 +10,6 @@ export type DataTablePlaceholderProps = Pick<DataTableProps<object>, 'caption' |
|
|
|
24
10
|
readonly rows?: number;
|
|
25
11
|
};
|
|
26
12
|
export declare function DataTablePlaceholder({ columns, rows, hideCaption, ...props }: DataTablePlaceholderProps): ReactNode;
|
|
27
|
-
export type DataTableTextProps = {
|
|
28
|
-
readonly children: string;
|
|
29
|
-
readonly secondary?: string | undefined;
|
|
30
|
-
readonly leading?: ReactNode;
|
|
31
|
-
readonly trailing?: ReactNode;
|
|
32
|
-
};
|
|
33
|
-
export type DataTableTextPlaceholderProps = {
|
|
34
|
-
readonly leading?: ReactNode;
|
|
35
|
-
readonly isSecondary?: boolean;
|
|
36
|
-
};
|
|
37
|
-
export declare function DataTableText({ children, secondary, leading, trailing }: DataTableTextProps): ReactNode;
|
|
38
|
-
export declare function DataTableTextPlaceholder({ leading, isSecondary }: DataTableTextPlaceholderProps): ReactNode;
|
|
39
|
-
export type { DataTableSort } from './table-results.tsx';
|
|
40
|
-
export type DataTableWindow = {
|
|
41
|
-
readonly height: number | 'fill';
|
|
42
|
-
readonly estimatedRowHeight?: number;
|
|
43
|
-
};
|
|
44
|
-
export type DataTableRowAction<Row> = {
|
|
45
|
-
readonly label?: (row: Row) => string;
|
|
46
|
-
} & ({
|
|
47
|
-
readonly href: (row: Row) => string;
|
|
48
|
-
readonly onActivate?: (row: Row) => void;
|
|
49
|
-
readonly disabled?: never;
|
|
50
|
-
} | ({
|
|
51
|
-
readonly href?: never;
|
|
52
|
-
readonly onActivate: (row: Row) => void;
|
|
53
|
-
} & Pick<ComponentProps<'button'>, 'disabled'>));
|
|
54
|
-
type SortProperties<Row> = {
|
|
55
|
-
readonly columns: ReadonlyArray<DataTableColumn<Row>>;
|
|
56
|
-
readonly sort: DataTableSort | undefined;
|
|
57
|
-
readonly onSortChange: (sort: DataTableSort | undefined) => void;
|
|
58
|
-
} | {
|
|
59
|
-
readonly columns: ReadonlyArray<DataTableColumn<Row> & {
|
|
60
|
-
readonly canSort?: false;
|
|
61
|
-
}>;
|
|
62
|
-
readonly sort?: never;
|
|
63
|
-
readonly onSortChange?: never;
|
|
64
|
-
};
|
|
65
|
-
type SelectionProperties<Row> = {
|
|
66
|
-
readonly selectedIds: ReadonlySet<string>;
|
|
67
|
-
readonly onSelectionChange: (selectedIds: ReadonlySet<string>) => void;
|
|
68
|
-
readonly selectionLabel: (row: Row) => string;
|
|
69
|
-
};
|
|
70
|
-
type OptionalSelection<Row> = SelectionProperties<Row> | {
|
|
71
|
-
readonly selectedIds?: never;
|
|
72
|
-
readonly onSelectionChange?: never;
|
|
73
|
-
readonly selectionLabel?: never;
|
|
74
|
-
};
|
|
75
|
-
type TableRowsProps<Row> = SortProperties<Row> & OptionalSelection<Row> & {
|
|
76
|
-
readonly rows: ReadonlyArray<Row>;
|
|
77
|
-
readonly getRowId: (row: Row) => string;
|
|
78
|
-
readonly caption: string;
|
|
79
|
-
readonly empty: ReactNode;
|
|
80
|
-
readonly filteredEmpty?: ReactNode;
|
|
81
|
-
readonly rowAction?: DataTableRowAction<Row>;
|
|
82
|
-
readonly activeRowId?: string | undefined;
|
|
83
|
-
readonly focusRowId?: string | undefined;
|
|
84
|
-
readonly onRowHighlightChange?: ((rowId: string | undefined) => void) | undefined;
|
|
85
|
-
readonly hideCaption?: boolean;
|
|
86
|
-
readonly hideHeaders?: boolean;
|
|
87
|
-
readonly rowSizing?: RowSizing;
|
|
88
|
-
readonly window?: DataTableWindow;
|
|
89
|
-
readonly endContent?: ReactNode;
|
|
90
|
-
readonly onEndReached?: () => void;
|
|
91
|
-
readonly footer?: ReactNode;
|
|
92
|
-
readonly pagination?: CollectionPaginationProps;
|
|
93
|
-
readonly resultStatus?: TableResultStatus;
|
|
94
|
-
};
|
|
95
13
|
export type DataTableProps<Row> = TableRowsProps<Row> & ({
|
|
96
14
|
readonly query: TableQuery<Row>;
|
|
97
15
|
readonly onEndReached?: never;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
export type { CollectionToolbarProps, FilterChip, FilterChipsProps, DisplayOption, DisplayOptionsProps, CollectionPaginationProps, } from './collection-controls.tsx';
|
|
1
|
+
export type { CollectionToolbarProps, FilterChip, FilterChipsProps, FilterRemoveDetails, DisplayOption, DisplayOptionsProps, CollectionPaginationProps, } from './collection-controls.tsx';
|
|
2
2
|
export { CollectionToolbar, FilterChips, DisplayOptions, CollectionPagination } from './collection-controls.tsx';
|
|
3
|
-
export type { DataTableColumn, DataTableColumnLayout,
|
|
4
|
-
export {
|
|
3
|
+
export type { DataTableColumn, DataTableColumnLayout, DataTableColumnRole } from './data-table-layout.tsx';
|
|
4
|
+
export type { DataTableWindow } from './data-table-rows.tsx';
|
|
5
|
+
export type { DataTableTextProps, DataTableTextPlaceholderProps } from './data-table-text.tsx';
|
|
6
|
+
export { DataTableText, DataTableTextPlaceholder } from './data-table-text.tsx';
|
|
7
|
+
export type { DataTableRowAction } from './data-table-trigger.tsx';
|
|
8
|
+
export type { DataTablePlaceholderProps, DataTableProps } from './data-table.tsx';
|
|
9
|
+
export { DataTable, DataTablePlaceholder } from './data-table.tsx';
|
|
5
10
|
export type { CollectionEndProps, CollectionScrollProps } from './collection-scroll.tsx';
|
|
6
11
|
export { CollectionEnd, CollectionScroll } from './collection-scroll.tsx';
|
|
7
12
|
export type { InspectorProps } from './inspector.tsx';
|
|
@@ -14,10 +19,10 @@ export { Timestamp } from './timestamp.tsx';
|
|
|
14
19
|
export { Timeline } from './timeline.tsx';
|
|
15
20
|
export type { TimelineProps, TimelineItemProps } from './timeline.tsx';
|
|
16
21
|
export { useCollectionControls } from './use-collection-controls.tsx';
|
|
17
|
-
export type { CollectionSearch } from './query-controls.tsx';
|
|
18
|
-
export type { TableResultStatus } from './table-results.tsx';
|
|
22
|
+
export type { CollectionSearch, CollectionSearchDetails, CollectionSubmitDetails } from './query-controls.tsx';
|
|
23
|
+
export type { DataTableSelectionDetails, DataTableSort, DataTableSortDetails, TableResultStatus, } from './table-results.tsx';
|
|
19
24
|
export type { CollectionControlsProps } from './use-collection-controls.tsx';
|
|
20
25
|
export { CollectionFilters } from './collection-filters.tsx';
|
|
21
|
-
export type { CollectionFilter, FilterOption } from './collection-filters.tsx';
|
|
26
|
+
export type { CollectionFilter, CollectionFilterDetails, FilterOption } from './collection-filters.tsx';
|
|
22
27
|
export { TableQueryFrame, useLocalTableQuery } from './table-query.tsx';
|
|
23
28
|
export type { LocalTableQuery, TableFilterDimension, TableQuery, TableQueryException } from './table-query.tsx';
|