@ai-matrx/design-system 0.49.36 → 0.49.37
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 +6 -0
- package/dist/data-table/index.cjs +1804 -1772
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +32 -3
- package/dist/data-table/index.d.ts +32 -3
- package/dist/data-table/index.js +1812 -1779
- package/dist/data-table/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -83,8 +83,13 @@ interface MatrxTableCardProps {
|
|
|
83
83
|
iconClassName?: string;
|
|
84
84
|
/** Classes for the left accent rail (e.g. `bg-violet-500`). Left out: no rail. */
|
|
85
85
|
railClassName?: string;
|
|
86
|
-
/**
|
|
87
|
-
|
|
86
|
+
/**
|
|
87
|
+
* The records the table holds: "4 clients". Leave `count` out and the card uses the count the
|
|
88
|
+
* table inside it reports (its source's total), shown once the table knows it.
|
|
89
|
+
*/
|
|
90
|
+
records?: Omit<MatrxTableCardNoun, "count"> & {
|
|
91
|
+
count?: number;
|
|
92
|
+
};
|
|
88
93
|
/**
|
|
89
94
|
* The columns the table's records carry: "14 fields". Field is the canonical word for a column
|
|
90
95
|
* definition (Data Doctrine §1.3); pass `singular`/`plural` to say something else.
|
|
@@ -145,12 +150,15 @@ declare function MatrxTableCardEmpty({ message, action, children }: MatrxTableCa
|
|
|
145
150
|
* instead of stacking a second row. `null` while the header mounts (draw nothing, never a flash).
|
|
146
151
|
* - `footerSlot`: the card's footer row; the table's "Show more" sits beside "+ Add".
|
|
147
152
|
* - `initialRows`: how many rows the table shows before "Show more".
|
|
153
|
+
* - `reportTotal`: the table tells the card how many records it holds, so the counts line says
|
|
154
|
+
* "4 clients" from the table's own answer (no second read). `undefined` while it is unknown.
|
|
148
155
|
*/
|
|
149
156
|
interface MatrxTableCardContextValue {
|
|
150
157
|
appearance: MatrxDataTableAppearance;
|
|
151
158
|
toolbarSlot: HTMLElement | null;
|
|
152
159
|
footerSlot: HTMLElement | null;
|
|
153
160
|
initialRows: number;
|
|
161
|
+
reportTotal: (total: number | undefined) => void;
|
|
154
162
|
}
|
|
155
163
|
declare const MatrxTableCardContext: React.Context<MatrxTableCardContextValue | null>;
|
|
156
164
|
/** The enclosing table card, or null outside one. */
|
|
@@ -158,6 +166,27 @@ declare function useMatrxTableCard(): MatrxTableCardContextValue | null;
|
|
|
158
166
|
/** The card's default initial row count (Arman, 2026-09-29). */
|
|
159
167
|
declare const TABLE_CARD_DEFAULT_INITIAL_ROWS = 10;
|
|
160
168
|
|
|
169
|
+
interface MatrxTableCardShowMoreProps {
|
|
170
|
+
shown: number;
|
|
171
|
+
/** Left out when the source cannot say (a full page): the control reads "10 shown". */
|
|
172
|
+
total?: number | undefined;
|
|
173
|
+
/** A fetch for the next batch is in flight. */
|
|
174
|
+
busy?: boolean;
|
|
175
|
+
onShowMore: () => void;
|
|
176
|
+
/**
|
|
177
|
+
* The card to draw in. Left out: the enclosing card. A `MatrxDataTable` passes its own (it hides
|
|
178
|
+
* the card from what it renders so nested tables stay ordinary).
|
|
179
|
+
*/
|
|
180
|
+
card?: MatrxTableCardContextValue | null;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The table card's one footer control: "10 of 642 · Show more", drawn in the card's footer row
|
|
184
|
+
* beside "+ Add". `MatrxDataTable` draws it for its own rows; a host that pages its own source
|
|
185
|
+
* inside a card (records-ui's classic Grid) draws it too, so a card never shows two pagers.
|
|
186
|
+
* Outside a card it sits under the rows.
|
|
187
|
+
*/
|
|
188
|
+
declare function MatrxTableCardShowMore({ shown, total, busy, onShowMore, card }: MatrxTableCardShowMoreProps): React.JSX.Element | null;
|
|
189
|
+
|
|
161
190
|
interface SavedViewsControlProps {
|
|
162
191
|
views: ReadonlyArray<{
|
|
163
192
|
id: string;
|
|
@@ -475,4 +504,4 @@ declare function useDrillUrlState({ fallback, prefix, }: {
|
|
|
475
504
|
prefix?: string | undefined;
|
|
476
505
|
}): DrillUrlState;
|
|
477
506
|
|
|
478
|
-
export { ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillQuestion, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
|
507
|
+
export { ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillQuestion, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, MatrxTableCardShowMore, type MatrxTableCardShowMoreProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
|
@@ -83,8 +83,13 @@ interface MatrxTableCardProps {
|
|
|
83
83
|
iconClassName?: string;
|
|
84
84
|
/** Classes for the left accent rail (e.g. `bg-violet-500`). Left out: no rail. */
|
|
85
85
|
railClassName?: string;
|
|
86
|
-
/**
|
|
87
|
-
|
|
86
|
+
/**
|
|
87
|
+
* The records the table holds: "4 clients". Leave `count` out and the card uses the count the
|
|
88
|
+
* table inside it reports (its source's total), shown once the table knows it.
|
|
89
|
+
*/
|
|
90
|
+
records?: Omit<MatrxTableCardNoun, "count"> & {
|
|
91
|
+
count?: number;
|
|
92
|
+
};
|
|
88
93
|
/**
|
|
89
94
|
* The columns the table's records carry: "14 fields". Field is the canonical word for a column
|
|
90
95
|
* definition (Data Doctrine §1.3); pass `singular`/`plural` to say something else.
|
|
@@ -145,12 +150,15 @@ declare function MatrxTableCardEmpty({ message, action, children }: MatrxTableCa
|
|
|
145
150
|
* instead of stacking a second row. `null` while the header mounts (draw nothing, never a flash).
|
|
146
151
|
* - `footerSlot`: the card's footer row; the table's "Show more" sits beside "+ Add".
|
|
147
152
|
* - `initialRows`: how many rows the table shows before "Show more".
|
|
153
|
+
* - `reportTotal`: the table tells the card how many records it holds, so the counts line says
|
|
154
|
+
* "4 clients" from the table's own answer (no second read). `undefined` while it is unknown.
|
|
148
155
|
*/
|
|
149
156
|
interface MatrxTableCardContextValue {
|
|
150
157
|
appearance: MatrxDataTableAppearance;
|
|
151
158
|
toolbarSlot: HTMLElement | null;
|
|
152
159
|
footerSlot: HTMLElement | null;
|
|
153
160
|
initialRows: number;
|
|
161
|
+
reportTotal: (total: number | undefined) => void;
|
|
154
162
|
}
|
|
155
163
|
declare const MatrxTableCardContext: React.Context<MatrxTableCardContextValue | null>;
|
|
156
164
|
/** The enclosing table card, or null outside one. */
|
|
@@ -158,6 +166,27 @@ declare function useMatrxTableCard(): MatrxTableCardContextValue | null;
|
|
|
158
166
|
/** The card's default initial row count (Arman, 2026-09-29). */
|
|
159
167
|
declare const TABLE_CARD_DEFAULT_INITIAL_ROWS = 10;
|
|
160
168
|
|
|
169
|
+
interface MatrxTableCardShowMoreProps {
|
|
170
|
+
shown: number;
|
|
171
|
+
/** Left out when the source cannot say (a full page): the control reads "10 shown". */
|
|
172
|
+
total?: number | undefined;
|
|
173
|
+
/** A fetch for the next batch is in flight. */
|
|
174
|
+
busy?: boolean;
|
|
175
|
+
onShowMore: () => void;
|
|
176
|
+
/**
|
|
177
|
+
* The card to draw in. Left out: the enclosing card. A `MatrxDataTable` passes its own (it hides
|
|
178
|
+
* the card from what it renders so nested tables stay ordinary).
|
|
179
|
+
*/
|
|
180
|
+
card?: MatrxTableCardContextValue | null;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The table card's one footer control: "10 of 642 · Show more", drawn in the card's footer row
|
|
184
|
+
* beside "+ Add". `MatrxDataTable` draws it for its own rows; a host that pages its own source
|
|
185
|
+
* inside a card (records-ui's classic Grid) draws it too, so a card never shows two pagers.
|
|
186
|
+
* Outside a card it sits under the rows.
|
|
187
|
+
*/
|
|
188
|
+
declare function MatrxTableCardShowMore({ shown, total, busy, onShowMore, card }: MatrxTableCardShowMoreProps): React.JSX.Element | null;
|
|
189
|
+
|
|
161
190
|
interface SavedViewsControlProps {
|
|
162
191
|
views: ReadonlyArray<{
|
|
163
192
|
id: string;
|
|
@@ -475,4 +504,4 @@ declare function useDrillUrlState({ fallback, prefix, }: {
|
|
|
475
504
|
prefix?: string | undefined;
|
|
476
505
|
}): DrillUrlState;
|
|
477
506
|
|
|
478
|
-
export { ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillQuestion, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|
|
507
|
+
export { ColumnMarker, DefaultTableReadFailure, DefaultTableStaleNotice, type DrillUrlState, FORMAT_MISMATCH_CLASS, FormattedCell, type FrozenColumns, MatrxColumnDef, MatrxDataTable, MatrxDataTableAppearance, MatrxDataTableProps, MatrxDataTableRead, MatrxDataTableRecordControls, MatrxDrillAnswerTable, type MatrxDrillAnswerTableProps, MatrxDrillAnswers, MatrxDrillDimension, MatrxDrillGroupByMenu, MatrxDrillMeasure, MatrxDrillMeasurePicker, MatrxDrillQuestion, MatrxDrillTrail, MatrxDrillWindowMenu, MatrxTableCard, MatrxTableCardContext, type MatrxTableCardContextValue, MatrxTableCardEmpty, type MatrxTableCardEmptyProps, type MatrxTableCardNoun, type MatrxTableCardProps, MatrxTableCardShowMore, type MatrxTableCardShowMoreProps, type MatrxTableGroupHeaderCell, MatrxTableGroupHeaderRow, type MatrxTableGroupHeaderRowProps, MatrxTableRowAlchemyProvider, NO_FROZEN_COLUMNS, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TABLE_CARD_DEFAULT_INITIAL_ROWS, TOOLBAR_CONTROL_HEIGHT, TableReadFailureProps, type TableReadView, TableStaleNoticeProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type ToggleSelectionArgs, type ToggleSelectionResult, ToolbarListedLabel, ToolbarOverflowMenu, type ToolbarOverflowMode, ToolbarOverflowSheet, alignForFormat, formatColumnValue, parseTableViewSnapshot, pixelWidth, resolveColumnMarker, resolveFrozenColumns, tableReadView, toggleSelection, useDrillUrlState, useMatrxTableCard, useToolbarListed };
|