@nxgt/material 3.52.0 → 3.54.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.
Files changed (136) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +5 -4
  3. package/dist/{async-slice-BGtmF3K5.js → async-slice-DDSsekfm.js} +2 -2
  4. package/dist/{button-Ct0KRBsN.js → button-Ct8DSLVv.js} +1 -1
  5. package/dist/charts.js +1064 -932
  6. package/dist/{chip-Ca1SEd70.js → chip-BzoNsd-W.js} +2 -2
  7. package/dist/{code-editor-DtwRhK8B.js → code-editor-DsLQeiZc.js} +6 -6
  8. package/dist/code-editor.js +5 -5
  9. package/dist/{code-language-items-CEclGxhA.js → code-language-items-4zXlIEZ0.js} +2 -2
  10. package/dist/components/components.css +1 -5
  11. package/dist/components/theme-tokens.css +19 -15
  12. package/dist/components/ui/actions/action-card/action-card-tile.css +11 -2
  13. package/dist/components/ui/collections/data-table/data-table-items-record.css +27 -0
  14. package/dist/components/ui/collections/data-table/index.css +14 -0
  15. package/dist/components/ui/overlays/dialog/dialog.css +2 -1
  16. package/dist/components/ui/overlays/popover/popover.css +3 -2
  17. package/dist/{components-CzELzsOi.js → components-DFG2mgsM.js} +14052 -13890
  18. package/dist/components.js +26 -26
  19. package/dist/{dialog-BIy04Hpd.js → dialog-DwPmwmA3.js} +4 -4
  20. package/dist/dnd.js +1 -1
  21. package/dist/draw-animate.js +1 -1
  22. package/dist/{dropdown-menu-B0Kd8x3G.js → dropdown-menu-CDN6Nqx6.js} +1 -1
  23. package/dist/editor.js +9 -9
  24. package/dist/{empty-state-CKxORwFE.js → empty-state-Bb9W9did.js} +2 -2
  25. package/dist/{escape-owner-BGKjiglh.js → escape-owner-DI_lg2ID.js} +1 -1
  26. package/dist/{field-blur-Dz1zPaYK.js → field-blur-BcJH8H9B.js} +1 -1
  27. package/dist/{field-blur-context-1T6GkSNc.js → field-blur-context-Dg1nwWOV.js} +1 -1
  28. package/dist/hooks.js +2 -2
  29. package/dist/{hover-card-BwQ9IRxa.js → hover-card-Qse4gnop.js} +2 -2
  30. package/dist/i18n-provider-DlVPS58N.js +79 -0
  31. package/dist/i18n.js +5 -5
  32. package/dist/{icon-badge-D5Ns7ndZ.js → icon-badge-DVPBQOKe.js} +3 -3
  33. package/dist/{icon-button-VzdqY_Tv.js → icon-button-C3wDxsh6.js} +12 -12
  34. package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +17 -1
  35. package/dist/lib/components/ui/actions/action-card/action-card.d.ts +16 -2
  36. package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +6 -2
  37. package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +15 -1
  38. package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +2 -1
  39. package/dist/lib/components/ui/collections/data-grid/columns/column-codec.d.ts +3 -3
  40. package/dist/lib/components/ui/collections/data-grid/columns/column-edit.d.ts +5 -5
  41. package/dist/lib/components/ui/collections/data-grid/columns/row-meta.d.ts +24 -0
  42. package/dist/lib/components/ui/collections/data-grid/grid-meta.d.ts +19 -6
  43. package/dist/lib/components/ui/collections/data-table/data-table.d.ts +1 -1
  44. package/dist/lib/components/ui/collections/data-table/layout-types.d.ts +27 -0
  45. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-item-context.d.ts +2 -0
  46. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-item-row.d.ts +8 -0
  47. package/dist/lib/components/ui/collections/data-table/types.d.ts +1 -1
  48. package/dist/lib/components/ui/collections/filter/bar/filter-bar-classes.d.ts +7 -2
  49. package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +5 -0
  50. package/dist/lib/components/ui/display/list-tile/internal.d.ts +1 -0
  51. package/dist/lib/components/ui/display/list-tile/partials/list-tile-dense-text.d.ts +28 -0
  52. package/dist/lib/components/ui/feedback/toast/toast-text.d.ts +7 -0
  53. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  54. package/dist/lib/components/ui/forms/index.d.ts +2 -0
  55. package/dist/lib/components/ui/forms/use-fast-form.d.ts +25 -0
  56. package/dist/lib/components/ui/forms/use-focus-on-refusal.d.ts +14 -0
  57. package/dist/lib/components/ui/layout/app-shell/activity-content-aside.d.ts +3 -1
  58. package/dist/lib/components/ui/layout/app-shell/activity-content.d.ts +10 -1
  59. package/dist/lib/components/ui/selection/switcher/partials/switcher-tooltip.d.ts +10 -2
  60. package/dist/lib/components/ui/selection/switcher/partials/switcher-trigger.d.ts +3 -1
  61. package/dist/lib/components/ui/selection/switcher/switcher.d.ts +1 -1
  62. package/dist/lib/components/ui/selection/switcher/types.d.ts +7 -0
  63. package/dist/lib/components/ui/widgets/native-charts/core/reference-text.d.ts +14 -6
  64. package/dist/lib/components/ui/widgets/native-charts/core/reference.d.ts +57 -10
  65. package/dist/lib/components/ui/widgets/native-charts/core/types.d.ts +13 -5
  66. package/dist/lib/components/ui/widgets/native-charts/hooks/chart-model-types.d.ts +3 -2
  67. package/dist/lib/components/ui/widgets/native-charts/index.d.ts +1 -1
  68. package/dist/lib/components/ui/widgets/native-charts/line-chart/line-chart-types.d.ts +6 -1
  69. package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/reference-marks.d.ts +1 -1
  70. package/dist/lib/i18n/material-resources-registry.d.ts +21 -0
  71. package/dist/lib/i18n/resources/en/en.d.ts +4 -0
  72. package/dist/lib/i18n/resources/en/material.json.d.ts +5 -1
  73. package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
  74. package/dist/lib/i18n/resources/fr/material.json.d.ts +5 -1
  75. package/dist/lib/i18n/resources/resources.d.ts +8 -0
  76. package/dist/lib/i18n/translator.d.ts +1 -1
  77. package/dist/lib.js +1 -1
  78. package/dist/main.js +43 -43
  79. package/dist/map.js +8 -8
  80. package/dist/material.css +1 -1
  81. package/dist/pdf-reader.js +1 -1
  82. package/dist/print.js +2 -2
  83. package/dist/{public-D-J3nZFm.js → public-BoVE0ffh.js} +9 -9
  84. package/dist/{rich-code-block-Ig0ERAa2.js → rich-code-block-DAUM7Yh_.js} +5 -5
  85. package/dist/{sortable-provider-DfPkSN90.js → sortable-provider-BLXsGE_0.js} +2 -2
  86. package/dist/{spinner-KQb3YuR_.js → spinner-Rg4PnBPH.js} +1 -1
  87. package/dist/{stored-language-Cb9FMEwk.js → stored-language-B1lJMPbR.js} +10 -2
  88. package/dist/styles.css +1 -0
  89. package/dist/theme-picker.js +2 -2
  90. package/dist/{theme-toggle-BY-SpsFV.js → theme-toggle-jVdxF_mc.js} +1 -1
  91. package/dist/{toolbar-items-30w9rG5h.js → toolbar-items-BFY_hns5.js} +4 -4
  92. package/dist/{translate-material-BPl8TQLg.js → translate-material-q-JNxP1m.js} +2 -2
  93. package/dist/{translator-BnQXtpSZ.js → translator-BU1o3_l9.js} +1 -1
  94. package/dist/{use-chat-composer-BSKJRYMB.js → use-chat-composer-DGbDuIUa.js} +3758 -3716
  95. package/dist/{use-heading-spy-BgXA8uz6.js → use-heading-spy-CP63sAcS.js} +1 -1
  96. package/dist/{use-material-translation-ByM3gD9R.js → use-material-translation-nNF8fUXz.js} +2 -2
  97. package/dist/use-shape-morph-DXdy2X5g.js +35 -0
  98. package/docs/components/buttons-and-actions.md +30 -1
  99. package/docs/components/data-table-filter-and-lists.md +2 -2
  100. package/docs/components/navigation-and-layout.md +2 -1
  101. package/docs/components/rich-widgets.md +2 -1
  102. package/docs/components/selection-and-choice.md +21 -1
  103. package/docs/guides/app-shell.md +22 -0
  104. package/docs/guides/cards-and-tiles.md +40 -4
  105. package/docs/guides/charts.md +30 -2
  106. package/docs/guides/data-grid.md +80 -3
  107. package/docs/guides/forms.md +35 -0
  108. package/docs/guides/i18n.md +6 -2
  109. package/docs/guides/theming.md +8 -0
  110. package/docs/roadmap.md +85 -684
  111. package/docs/troubleshooting.md +36 -0
  112. package/lib/components/components.css +1 -5
  113. package/lib/components/theme-tokens.css +19 -15
  114. package/lib/components/ui/actions/action-card/action-card-tile.css +11 -2
  115. package/lib/components/ui/collections/data-table/data-table-items-record.css +27 -0
  116. package/lib/components/ui/collections/data-table/index.css +14 -0
  117. package/lib/components/ui/overlays/dialog/dialog.css +2 -1
  118. package/lib/components/ui/overlays/popover/popover.css +3 -2
  119. package/lib/styles.css +1 -0
  120. package/lib/themes/ambre.css +8 -6
  121. package/lib/themes/ardoise.css +8 -6
  122. package/lib/themes/bleumono.css +8 -6
  123. package/lib/themes/bluemoon.css +8 -6
  124. package/lib/themes/corail.css +8 -6
  125. package/lib/themes/foret.css +8 -6
  126. package/lib/themes/lavande.css +8 -6
  127. package/lib/themes/menthe.css +8 -6
  128. package/lib/themes/ocean.css +8 -6
  129. package/lib/themes/pink.css +8 -6
  130. package/lib/themes/prune.css +8 -6
  131. package/lib/themes/sable.css +8 -6
  132. package/lib/themes/slate.css +8 -6
  133. package/lib/themes/teal.css +8 -6
  134. package/package.json +4 -4
  135. package/dist/i18n-provider-BFNrM0Qu.js +0 -45
  136. package/dist/use-shape-morph-BKA_R5P5.js +0 -35
@@ -1,4 +1,4 @@
1
- import { ComponentProps, ElementType, ReactNode } from 'react';
1
+ import { ComponentProps, ElementType, ReactElement, ReactNode } from 'react';
2
2
  import { useActionCardNames } from '../use-action-card-names.js';
3
3
  import { useReveal } from '../use-reveal.js';
4
4
  import { ActionCardTitleButton } from './action-card-title-button.js';
@@ -8,7 +8,7 @@ import { ActionCardTitleButton } from './action-card-title-button.js';
8
8
  * meta line. With an `action` the button is always there, named after the
9
9
  * status and the meta when there is no title.
10
10
  */
11
- export declare function ActionCardText({ title, description, status, meta, Title, button, names, reveal, }: {
11
+ export declare function ActionCardText({ title, description, status, meta, Title, button, names, reveal, link, }: {
12
12
  title: ReactNode;
13
13
  description: ReactNode;
14
14
  status: ReactNode;
@@ -17,4 +17,8 @@ export declare function ActionCardText({ title, description, status, meta, Title
17
17
  button: Omit<ComponentProps<typeof ActionCardTitleButton>, 'id' | 'labelledBy' | 'describedBy' | 'children'> | undefined;
18
18
  names: ReturnType<typeof useActionCardNames>;
19
19
  reveal: ReturnType<typeof useReveal>;
20
+ /** The caller's link element: the title becomes it (`titleLink`). */
21
+ link?: ReactElement<{
22
+ className?: string;
23
+ }>;
20
24
  }): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ComponentProps, ReactNode } from 'react';
1
+ import { ComponentProps, ReactElement, ReactNode } from 'react';
2
2
  /**
3
3
  * The title of a card that has an `action`: the card's one button. Its
4
4
  * `::after` is stretched over the card (action-card-tile.css), so the whole
@@ -12,3 +12,17 @@ export declare function ActionCardTitleButton({ id, labelledBy, describedBy, chi
12
12
  describedBy: string | undefined;
13
13
  children?: ReactNode;
14
14
  } & Omit<ComponentProps<'button'>, 'children' | 'id'>): import("react").JSX.Element;
15
+ /**
16
+ * The title of a card with a `titleLink`: the caller's link element (a router
17
+ * `Link`, an `<a>`) given the title as its children. It takes the button's
18
+ * class, so its `::after` covers the card, and the same name and description.
19
+ */
20
+ export declare function ActionCardTitleLink({ id, labelledBy, describedBy, link, children, }: {
21
+ id: string;
22
+ labelledBy: string | undefined;
23
+ describedBy: string | undefined;
24
+ link: ReactElement<{
25
+ className?: string;
26
+ }>;
27
+ children?: ReactNode;
28
+ }): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  /** The card's trailing parts: its `action` in its own area, then the indicator. */
3
- export declare function ActionCardTrail({ action, withIndicator, }: {
3
+ export declare function ActionCardTrail({ action, footer, withIndicator, }: {
4
4
  action: ReactNode;
5
+ footer?: ReactNode;
5
6
  withIndicator: boolean;
6
7
  }): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { GridMsg } from '@nxgt/material-core/data-grid';
2
- import { ColumnMeta, RowData } from '@tanstack/react-table';
3
- import { DataTableFeatures } from '../../data-table/features.js';
2
+ import { RowData } from '@tanstack/react-table';
4
3
  import { DataGridFormatContext } from '../grid-meta.js';
5
- type Meta<TData extends RowData> = ColumnMeta<DataTableFeatures, TData>;
4
+ import { RowMeta } from './row-meta.js';
5
+ type Meta<TData extends RowData> = RowMeta<TData>;
6
6
  type Result = {
7
7
  value: unknown;
8
8
  } | {
@@ -4,10 +4,11 @@ import { DataTableFeatures } from '../../data-table/features.js';
4
4
  import { DataGridEditor, DataGridEditorName } from '../editors/editor-types.js';
5
5
  import { DataGridFormatContext } from '../grid-meta.js';
6
6
  import { GridColumn } from '../use-grid-model.js';
7
- type Meta<TData extends RowData> = ColumnMeta<DataTableFeatures, TData>;
7
+ export { metaFor, type RowMeta } from './row-meta.js';
8
8
  /** The kind of editor a column has: a name, `'custom'` (a component), or `null` (none). */
9
9
  export type ColumnEditorKind = DataGridEditorName | 'custom' | null;
10
- export declare function editorKind<TData extends RowData>(meta: Meta<TData> | undefined): ColumnEditorKind;
10
+ /** The kind of editor a (row's) meta names. */
11
+ export declare function editorKind<TData extends RowData>(meta: Pick<ColumnMeta<DataTableFeatures, TData>, 'editor'> | undefined): ColumnEditorKind;
11
12
  /** The column's custom editor, when it has one. */
12
13
  export declare function customEditor<TData extends RowData>(column: GridColumn<TData>): DataGridEditor<TData> | undefined;
13
14
  /**
@@ -16,9 +17,9 @@ export declare function customEditor<TData extends RowData>(column: GridColumn<T
16
17
  * code's or an option's label, a date in the locale), else the value as a
17
18
  * string.
18
19
  */
19
- export declare function formatValue<TData extends RowData>(column: GridColumn<TData>, value: unknown, ctx: DataGridFormatContext): string;
20
+ export declare function formatValue<TData extends RowData>(column: GridColumn<TData>, value: unknown, ctx: DataGridFormatContext, row: TData | undefined): string;
20
21
  /** Whether the grid writes the cell's text itself (`format`, a number, a select, a date), rather than the column's `cell`. */
21
- export declare function formatsItself<TData extends RowData>(column: GridColumn<TData>): boolean;
22
+ export declare function formatsItself<TData extends RowData>(column: GridColumn<TData>, row: TData | undefined): boolean;
22
23
  /** `text` parsed and checked by the column (parse, `validate`, `schema`). */
23
24
  export declare function validateText<TData extends RowData>(column: GridColumn<TData>, text: string, row: TData, ctx: DataGridFormatContext): GridValidation<unknown> | Promise<GridValidation<unknown>>;
24
25
  /**
@@ -47,4 +48,3 @@ export declare function settledCheck<TData extends RowData>(column: GridColumn<T
47
48
  export declare function settledCheck<TData extends RowData>(column: GridColumn<TData>, result: GridValidation<unknown> | Promise<GridValidation<unknown>>, timeout?: number): GridValidation<unknown> | Promise<GridValidation<unknown>>;
48
49
  /** The value Delete leaves: unchecked for a checkbox, else what the empty text parses to (`null` if it does not). */
49
50
  export declare function clearedValue<TData extends RowData>(column: GridColumn<TData>, row: TData, ctx: DataGridFormatContext): unknown;
50
- export {};
@@ -0,0 +1,24 @@
1
+ import { GridBound, GridOption } from '@nxgt/material-core/data-grid';
2
+ import { ColumnMeta, RowData } from '@tanstack/react-table';
3
+ import { DataTableFeatures } from '../../data-table/features.js';
4
+ import { GridColumn } from '../use-grid-model.js';
5
+ type Meta<TData extends RowData> = ColumnMeta<DataTableFeatures, TData>;
6
+ /** A column's meta once the row has decided what depends on it: a plain editor, option list and decimals. */
7
+ export type RowMeta<TData extends RowData> = Omit<Meta<TData>, 'options' | 'number'> & {
8
+ options?: GridOption[];
9
+ number?: {
10
+ min?: GridBound<TData>;
11
+ max?: GridBound<TData>;
12
+ decimals?: number;
13
+ /** The decimals came from the row: the cell shows exactly that many. */
14
+ fixed?: boolean;
15
+ };
16
+ };
17
+ /**
18
+ * The column's meta for one row: `rowEditor`, a function `options` and a
19
+ * function `decimals` resolved. A column with none of them gives its own
20
+ * meta; otherwise one resolved meta per (column, row), so the codec cache
21
+ * keeps working.
22
+ */
23
+ export declare function metaFor<TData extends RowData>(column: GridColumn<TData>, row: TData | undefined): RowMeta<TData> | undefined;
24
+ export {};
@@ -7,7 +7,7 @@ export type { DataGridEditorName } from './editors/editor-types.js';
7
7
  export type DataGridRule = boolean | {
8
8
  reason: string;
9
9
  };
10
- /** What a column's `parse` and `format` are told: the page's language, the row (parse only). */
10
+ /** What a column's `parse` and `format` are told: the page's language, and the row (`format` has none for a total). */
11
11
  export type DataGridFormatContext = {
12
12
  lang: string;
13
13
  locale: string;
@@ -49,19 +49,26 @@ declare module '@tanstack/react-table' {
49
49
  * column without one is read-only.
50
50
  */
51
51
  editor?: DataGridEditorName | DataGridEditor<TData, TValue>;
52
- /** The number editor's bounds (`max` may depend on the row) and decimals. */
52
+ /**
53
+ * The built-in editor a row's cell has, when it differs from row to
54
+ * row (a result column of numbers, picks and texts): it wins over
55
+ * `editor`. A name only; a component stays `editor`'s.
56
+ */
57
+ rowEditor?: (row: TData) => DataGridEditorName;
58
+ /** The number editor's bounds and decimals; each may depend on the row. A function `decimals` is also what a cell shows: exactly that many fraction digits (2.50). */
53
59
  number?: {
54
60
  min?: GridBound<TData>;
55
61
  max?: GridBound<TData>;
56
- decimals?: number;
62
+ decimals?: number | ((row: TData) => number);
57
63
  };
58
64
  /** Symbolic values the number editor also takes ("abs"), in every language. */
59
65
  codes?: GridCode[];
60
66
  /**
61
67
  * The select editor's options: the value stored, the label shown and
62
68
  * copied. A pasted or typed text is a label or a value, in any case.
69
+ * A function gives each row its own list.
63
70
  */
64
- options?: GridOption[];
71
+ options?: GridOption[] | ((row: TData) => GridOption[]);
65
72
  /**
66
73
  * The date editor's bounds, as ISO dates (`'2026-09-01'`): a day
67
74
  * outside them is an error. The value is an ISO date, shown in the
@@ -75,8 +82,14 @@ declare module '@tanstack/react-table' {
75
82
  parse?: (text: string, ctx: DataGridFormatContext & {
76
83
  row: TData;
77
84
  }) => DataGridParseResult<TValue | null>;
78
- /** Value to text, shown in the cell and edited; replaces the editor's own. */
79
- format?: (value: TValue | null, ctx: DataGridFormatContext) => string;
85
+ /**
86
+ * Value to text, shown in the cell and edited; replaces the editor's own.
87
+ * `ctx.row` is the cell's row (absent for a total), so a format can follow
88
+ * the row, as a function `number.decimals` does.
89
+ */
90
+ format?: (value: TValue | null, ctx: DataGridFormatContext & {
91
+ row?: TData;
92
+ }) => string;
80
93
  /** Checks a parsed value; a message flags the cell in error. */
81
94
  validate?: (value: TValue | null, row: TData) => GridMsg | string | null | undefined;
82
95
  /** A Standard Schema (zod, valibot…) the value must pass, after `validate`; a nullable one too. */
@@ -1,5 +1,5 @@
1
1
  import { RowData } from '@tanstack/react-table';
2
2
  import { DataTableProps } from './types.js';
3
3
  export type { DataTableEmpty, DataTableEmptyState, } from './partials/data-table-empty-row.js';
4
- export type { DataTableControls, DataTableDensity, DataTableItem, DataTableItemTitleElement, DataTableLayout, DataTableLayoutProp, DataTableLinkComponent, DataTableLinkProps, DataTableOptions, DataTablePageTarget, DataTableProps, DataTableResponsiveLayout, DataTableServerPagination, DataTableSlot, DataTableVirtual, } from './types.js';
4
+ export type { DataTableControls, DataTableDensity, DataTableItem, DataTableItemRowProps, DataTableItemTitleElement, DataTableLayout, DataTableLayoutProp, DataTableLinkComponent, DataTableLinkProps, DataTableOptions, DataTablePageTarget, DataTableProps, DataTableResponsiveLayout, DataTableServerPagination, DataTableSlot, DataTableVirtual, } from './types.js';
5
5
  export declare function DataTable<TData extends RowData>(props: DataTableProps<TData>): import("react").JSX.Element;
@@ -14,6 +14,25 @@ export type DataTableResponsiveLayout = {
14
14
  export type DataTableLayoutProp = DataTableLayout | DataTableResponsiveLayout;
15
15
  /** The heading level (or `span`) of a card's title. */
16
16
  export type DataTableItemTitleElement = 'h2' | 'h3' | 'h4' | 'span';
17
+ /** The compact record row `item.Row` lays out (the dense row of `ListTile`,
18
+ * `size="sm"` with `chips`). */
19
+ export type DataTableItemRowProps = {
20
+ /** The title text: the item's one link (or button), as `Title`. */
21
+ title: ReactNode;
22
+ /** The heading level of the title, as `Title`'s `as`. Default `span`. */
23
+ as?: DataTableItemTitleElement;
24
+ /** A note after the title: on its line from a width of 28rem, under it below. */
25
+ subtitle?: ReactNode;
26
+ /** Tags after the text (usually `<Chip size="sm">`s), under it below 36rem;
27
+ * decoration, never buttons. */
28
+ chips?: ReactNode;
29
+ /** Facts at the end of the row, before the chevron: decoration, never buttons. */
30
+ trailing?: ReactNode;
31
+ /** Before the text, such as an `Avatar`. */
32
+ leading?: ReactNode;
33
+ /** The discreet chevron of a link row. Default: on when the item has a link. */
34
+ chevron?: boolean;
35
+ };
17
36
  /** What `renderCard` and `renderTile` are handed beside the row. */
18
37
  export type DataTableItem = {
19
38
  /** The card's (or tile's) one link and its accessible name: wrap the title text in
@@ -25,6 +44,14 @@ export type DataTableItem = {
25
44
  children: ReactNode;
26
45
  as?: DataTableItemTitleElement;
27
46
  }>;
47
+ /** The compact record row, in place of a hand-laid title and content:
48
+ * `<Row as="h2" title subtitle chips trailing />` lays out the dense row of
49
+ * `ListTile`, keeps the item's corner checkbox and makes `title` the one
50
+ * link. Render it once, instead of `Title`. In a tile (`layout="tiles"`) it
51
+ * is 36px tall (44px on a coarse pointer). It is passed to `renderCard`
52
+ * too: there it is the same row inside the card's own padding, border and
53
+ * columns, with no height of its own. */
54
+ Row: ComponentType<DataTableItemRowProps>;
28
55
  /** The row is selected. */
29
56
  selected: boolean;
30
57
  /** The row cannot be selected (`enableRowSelection` is false for it). */
@@ -9,5 +9,7 @@ export type DataTableItemContextValue = {
9
9
  /** `onRowClick(row, event)`: the title is a button, or runs before the link. */
10
10
  onActivate: ((event: MouseEvent) => void) | undefined;
11
11
  linkComponent: DataTableLinkComponent;
12
+ /** The item is selected. */
13
+ selected?: boolean;
12
14
  };
13
15
  export declare const DataTableItemContext: import('react').Context<DataTableItemContextValue | null>;
@@ -0,0 +1,8 @@
1
+ import { DataTableItemRowProps } from '../../layout-types.js';
2
+ /** The compact record row of a tile: the dense layout of `ListTile`
3
+ * (`size="sm"` with `chips`), laid out by the item. The subtitle shares the
4
+ * title's line from a width of 28rem, the chips sit after the text from 36rem
5
+ * and under it below that (a container query on the row). The title is the
6
+ * item's one link, so the item keeps its corner checkbox and its states; the
7
+ * row itself is not interactive. */
8
+ export declare function DataTableItemRow({ title, as, subtitle, chips, trailing, leading, chevron, }: DataTableItemRowProps): import("react").JSX.Element;
@@ -5,7 +5,7 @@ import { DataTableFeatures } from './features.js';
5
5
  import { DataTableDensity, DataTableItem, DataTableLayoutProp, DataTableVirtual } from './layout-types.js';
6
6
  import { DataTableLinkComponent, DataTableServerPagination } from './server-pagination.js';
7
7
  import { DataTableSlot, DataTableTable } from './slots.js';
8
- export type { DataTableDensity, DataTableItem, DataTableItemTitleElement, DataTableLayout, DataTableLayoutProp, DataTableResponsiveLayout, DataTableVirtual, } from './layout-types.js';
8
+ export type { DataTableDensity, DataTableItem, DataTableItemRowProps, DataTableItemTitleElement, DataTableLayout, DataTableLayoutProp, DataTableResponsiveLayout, DataTableVirtual, } from './layout-types.js';
9
9
  export type { DataTableLinkComponent, DataTableLinkProps, DataTablePageTarget, DataTableServerPagination, } from './server-pagination.js';
10
10
  export type { DataTableControls, DataTableSlot, DataTableTable, } from './slots.js';
11
11
  export type DataTableOptions = {
@@ -36,7 +36,12 @@ export declare const FILTER_MENU_ITEM_LABEL_CLASS = "min-w-0 flex-1 truncate";
36
36
  /** A field already active, in the menu: its condition, after its label. */
37
37
  export declare const FILTER_MENU_ITEM_CURRENT_CLASS = "min-w-0 max-w-[50%] truncate text-muted-foreground text-xs";
38
38
  export declare const FILTER_MENU_CHEVRON_CLASS = "size-3.5 text-muted-foreground";
39
- /** The quick filters, beside "Add filter". */
40
- export declare const FILTER_QUICK_LIST_CLASS = "flex flex-wrap items-center";
39
+ /** The quick filters, beside "Add filter": `contents`, so each pill and "Add
40
+ * filter" are items of the bar's own wrapping row. "Add filter" follows the
41
+ * last pill wherever it lands, and wraps only when the row is really full
42
+ * (#1752), instead of the whole list moving down as one block. The list is
43
+ * `display: contents` and keeps its `role="group"` name on the library's
44
+ * Tailwind 4 baseline (Safari 16.4+, Chrome 111+). */
45
+ export declare const FILTER_QUICK_LIST_CLASS = "contents";
41
46
  /** "Done" while the value is unreadable: `aria-disabled`, dimmed like a disabled button. */
42
47
  export declare const FILTER_DONE_CLASS = "aria-disabled:cursor-not-allowed aria-disabled:opacity-50";
@@ -22,3 +22,8 @@ export declare const SERVER_TABLE_PHONE_ROW_START_CLASS = "min-w-0 flex-1";
22
22
  /** The row's end: the sort slot (`contents`, its child is the item), then
23
23
  * "Filters (N)" and the actions. */
24
24
  export declare const SERVER_TABLE_PHONE_ROW_END_CLASS = "flex shrink-0 items-center gap-1";
25
+ /** The bar's search floor in the band: from md the band lowers it to 8rem,
26
+ * though `SERVER_TABLE_BAR_CLASS` (shared with Vue, so left as is) says 10rem:
27
+ * the search gives up that much more room before "Add filter" wraps alone to
28
+ * a second row (#1752). It follows `SERVER_TABLE_BAR_CLASS`, so it wins. */
29
+ export declare const SERVER_TABLE_BAR_FLOOR_CLASS = "md:[&_[data-slot=search-field]]:basis-32";
@@ -0,0 +1 @@
1
+ export { ListTileDenseText } from './partials/list-tile-dense-text.js';
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ type SubtitleProps = {
3
+ subtitle: ReactNode;
4
+ selected?: boolean;
5
+ /** The record row's subtitle is a note: smaller than its title. */
6
+ note?: boolean;
7
+ id?: string;
8
+ };
9
+ /** A tile's second line; the muted colour is 4.4:1 on the selected tint, so a selected tile gets a darker one. */
10
+ export declare function ListTileSubtitle({ subtitle, selected, note, id, }: SubtitleProps): import("react").JSX.Element | null;
11
+ type DenseTextProps = {
12
+ /** The title, already rendered: ListTile's `Typography`, or a table item's `Title`. */
13
+ title: ReactNode;
14
+ subtitle?: ReactNode;
15
+ chips?: ReactNode;
16
+ selected?: boolean;
17
+ /** The note look of the subtitle (`size="sm"`). Default `true`. */
18
+ compact?: boolean;
19
+ subtitleId?: string;
20
+ };
21
+ /**
22
+ * The record row's text block, shared by ListTile (`size="sm"` with `chips`)
23
+ * and a table tile's `item.Row`: the subtitle shares the title's line from the
24
+ * container's `@md`, the chips come after the text from `@xl` and under it
25
+ * below. The nearest `@container` ancestor measures.
26
+ */
27
+ export declare function ListTileDenseText({ title, subtitle, chips, selected, compact, subtitleId, }: DenseTextProps): import("react").JSX.Element;
28
+ export {};
@@ -0,0 +1,7 @@
1
+ import { MaterialLocaleKey } from '../../../../i18n/types.js';
2
+ /**
3
+ * A `material.*` word for a toast, which runs outside React: it follows the
4
+ * mounted `I18nProvider`'s `resources` and language, else the base bundle in
5
+ * the stored language.
6
+ */
7
+ export declare function toastText(key: MaterialLocaleKey, fallback: string): string;