@nxgt/material 3.103.0 → 3.104.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 (133) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +5 -3
  3. package/dist/{alert-dialog-NFyAiSqc.js → alert-dialog-CK_47jfm.js} +1 -1
  4. package/dist/{async-slice-D35bX79S.js → async-slice-1ZNMiwyJ.js} +1 -1
  5. package/dist/{button-Be7GZzF9.js → button-YfEMZbRO.js} +1 -1
  6. package/dist/{calculator-BGy1Q7rn.js → calculator-BmYZId4c.js} +11 -11
  7. package/dist/calculator-field.js +6 -6
  8. package/dist/{calculator-segment-uixk6lBg.js → calculator-segment-DJ08DJ-n.js} +1 -1
  9. package/dist/calculator.js +1 -1
  10. package/dist/charts.js +819 -764
  11. package/dist/{chip-3rWebZEM.js → chip-DPj6e-3v.js} +2 -2
  12. package/dist/{code-editor-BqSVMfy-.js → code-editor-CZg3nLZO.js} +4 -4
  13. package/dist/code-editor.js +4 -4
  14. package/dist/{code-language-items-Cf2LJVg2.js → code-language-items-Nq1iOGId.js} +2 -2
  15. package/dist/components/ui/display/chip/chip-soft.css +27 -2
  16. package/dist/components/ui/primitives/collapsible/collapsible.css +9 -0
  17. package/dist/{components-D2liJ9Yu.js → components-B2wrH_W0.js} +16884 -16603
  18. package/dist/components.js +38 -38
  19. package/dist/{conversion-variant-clFZ6ZMJ.js → conversion-variant-C-LPx5ek.js} +4 -4
  20. package/dist/{currency-field-CBFEVNM1.js → currency-field-DnsRIA80.js} +4 -4
  21. package/dist/{dialog-CrIIINTk.js → dialog-BKBsDGFc.js} +3 -3
  22. package/dist/dnd.js +1 -1
  23. package/dist/{dropdown-menu-BnfLWu8n.js → dropdown-menu-QMDbRidH.js} +1 -1
  24. package/dist/editor.js +8 -8
  25. package/dist/{empty-state-CuUaCPY7.js → empty-state-BLIJ6znY.js} +1 -1
  26. package/dist/{financial-variant-BY_VCUuk.js → financial-variant-Ws0Jp01H.js} +5 -5
  27. package/dist/{hooks-hHoZbL-4.js → hooks-C3vkQmzh.js} +2 -2
  28. package/dist/hooks.js +2 -2
  29. package/dist/{hover-card-Do2-uzlF.js → hover-card-Df649U6I.js} +1 -1
  30. package/dist/i18n.js +3 -3
  31. package/dist/{icon-badge-CHaVNEmb.js → icon-badge-Cma1qOOJ.js} +1 -1
  32. package/dist/{icon-button-BIAubLeJ.js → icon-button-CpKxV264.js} +1 -1
  33. package/dist/keypad.js +3 -3
  34. package/dist/lib/components/ui/actions/index.d.ts +1 -0
  35. package/dist/lib/components/ui/actions/product-tile/index.d.ts +1 -0
  36. package/dist/lib/components/ui/actions/product-tile/product-tile-link.d.ts +16 -0
  37. package/dist/lib/components/ui/actions/product-tile/product-tile.d.ts +41 -0
  38. package/dist/lib/components/ui/collections/data-table/data-table-density.d.ts +1 -1
  39. package/dist/lib/components/ui/collections/data-table/partials/data-table-scroll-region.d.ts +4 -1
  40. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +6 -3
  41. package/dist/lib/components/ui/collections/data-table/partials/layouts/list-bar-in-row.d.ts +2 -1
  42. package/dist/lib/components/ui/collections/data-table/types.d.ts +11 -8
  43. package/dist/lib/components/ui/collections/data-table/virtual-option.d.ts +9 -3
  44. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -0
  45. package/dist/lib/components/ui/collections/server-table/partials/server-table-passed-through.d.ts +1 -0
  46. package/dist/lib/components/ui/collections/server-table/types.d.ts +1 -1
  47. package/dist/lib/components/ui/display/chip/chip.variants.d.ts +5 -4
  48. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  49. package/dist/lib/components/ui/fields/index.d.ts +1 -0
  50. package/dist/lib/components/ui/fields/quantity-field/types.d.ts +1 -1
  51. package/dist/lib/components/ui/fields/quantity-stepper/index.d.ts +2 -0
  52. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper-model.d.ts +9 -0
  53. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper-value.d.ts +15 -0
  54. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper.d.ts +9 -0
  55. package/dist/lib/components/ui/fields/quantity-stepper/quantity-stepper.types.d.ts +35 -0
  56. package/dist/lib/components/ui/fields/quantity-stepper/use-quantity-stepper.d.ts +28 -0
  57. package/dist/lib/components/ui/layout/pane-layout/pane-layout.d.ts +8 -3
  58. package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-classes.d.ts +2 -2
  59. package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-context.d.ts +9 -0
  60. package/dist/lib/components/ui/layout/pane-layout/partials/use-pane-layout-state.d.ts +7 -2
  61. package/dist/lib/components/ui/layout/panel-card/panel-card.d.ts +3 -1
  62. package/dist/lib/components/ui/primitives/collapsible/collapsible.d.ts +9 -1
  63. package/dist/lib/components/ui/primitives/tabs/partials/tabs-list.d.ts +6 -1
  64. package/dist/lib/components/ui/primitives/tabs/tabs-classes.d.ts +1 -0
  65. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.d.ts +8 -0
  66. package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.types.d.ts +6 -0
  67. package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-reasons.d.ts +10 -0
  68. package/dist/lib/components/ui/selection/chip-group-field/partials/use-chip-rail.d.ts +12 -0
  69. package/dist/lib/components/ui/selection/choice-group/choice-group-root.d.ts +5 -2
  70. package/dist/lib/components/ui/widgets/native-charts/core/label-placement.d.ts +25 -0
  71. package/dist/lib/components/ui/widgets/native-charts/core/reference-geometry.d.ts +3 -2
  72. package/dist/lib/i18n/resources/en/en.d.ts +3 -0
  73. package/dist/lib/i18n/resources/en/material.json.d.ts +4 -1
  74. package/dist/lib/i18n/resources/fr/fr.d.ts +3 -0
  75. package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -1
  76. package/dist/lib/i18n/resources/resources.d.ts +6 -0
  77. package/dist/lib/i18n/translator.d.ts +1 -1
  78. package/dist/lib/print/output/csv.d.ts +37 -0
  79. package/dist/lib/print/output/index.d.ts +1 -0
  80. package/dist/lib.js +1 -1
  81. package/dist/main.js +54 -54
  82. package/dist/map.js +8 -8
  83. package/dist/material.css +1 -1
  84. package/dist/pdf-reader.js +1 -1
  85. package/dist/{percent-field-DU8eIMD3.js → percent-field-sAq7BaxN.js} +2 -2
  86. package/dist/{picker-surface-XmA--JVI.js → picker-surface--6E-nvpU.js} +4 -4
  87. package/dist/{popover-D8iHiAbl.js → popover-bEB8I_-w.js} +1 -1
  88. package/dist/{pos-types-BEAY27Rm.js → pos-types-Cpdc4E33.js} +1 -1
  89. package/dist/{pos-variant-ClGI92Lt.js → pos-variant-ClMGu59I.js} +5 -5
  90. package/dist/print.js +146 -127
  91. package/dist/{programmer-variant-Boq2O8hB.js → programmer-variant-ChzgyA7x.js} +2 -2
  92. package/dist/{public-DOrXKmcL.js → public-BY8N5NDT.js} +9 -9
  93. package/dist/{rich-code-block-Djj2XE_u.js → rich-code-block-D2GiWuqD.js} +5 -5
  94. package/dist/{scientific-variant-BzF_aMQP.js → scientific-variant-31_93gcZ.js} +2 -2
  95. package/dist/{sortable-provider-DCZjsIIH.js → sortable-provider-DGiVn72t.js} +2 -2
  96. package/dist/{spinner-Cg0y_E_K.js → spinner-CEVomQ5K.js} +1 -1
  97. package/dist/{tabs-DpessV5s.js → tabs-B8MXBbPW.js} +14 -14
  98. package/dist/{text-field-Dxk9lAKM.js → text-field-DN88qD0Q.js} +1 -1
  99. package/dist/theme-picker.js +2 -2
  100. package/dist/{theme-toggle-B6Jl5Kfn.js → theme-toggle-C7pnu1Xh.js} +1 -1
  101. package/dist/{toolbar-items-Cs1XrZsH.js → toolbar-items-BDfoh8QB.js} +4 -4
  102. package/dist/{translate-material-Du0j0t97.js → translate-material-s_lxIV43.js} +1 -1
  103. package/dist/{translator-BVs4n0Fz.js → translator-Cgql9srO.js} +4 -2
  104. package/dist/{use-calculator-keyboard-BZ1CA4Ut.js → use-calculator-keyboard-DysnFK8m.js} +1 -1
  105. package/dist/{use-chat-composer-B4m3OEm1.js → use-chat-composer-xCcp9fVc.js} +2050 -1996
  106. package/dist/{use-heading-spy-CO3_AtY9.js → use-heading-spy-FIZlf9qj.js} +4 -4
  107. package/dist/{use-material-translation-uNc1FyC8.js → use-material-translation-xNzbSVgS.js} +1 -1
  108. package/dist/{use-return-focus-AfLRrUm-.js → use-return-focus-CW9KkDkp.js} +1 -1
  109. package/docs/README.md +1 -1
  110. package/docs/components/README.md +1 -0
  111. package/docs/components/buttons-and-actions.md +47 -0
  112. package/docs/components/data-display.md +2 -2
  113. package/docs/components/data-table-filter-and-lists.md +19 -6
  114. package/docs/components/form-fields.md +60 -7
  115. package/docs/components/navigation-and-layout.md +20 -2
  116. package/docs/components/primitives.md +44 -2
  117. package/docs/components/selection-and-choice.md +56 -1
  118. package/docs/guides/cards-and-tiles.md +10 -0
  119. package/docs/guides/csp.md +4 -3
  120. package/docs/guides/data-grid.md +5 -4
  121. package/docs/guides/field-look-refined.md +2 -2
  122. package/docs/guides/keypad.md +9 -1
  123. package/docs/guides/printing.md +51 -1
  124. package/docs/previews/buttons-actions-producttile.webp +0 -0
  125. package/docs/previews/form-fields-quantitystepper.webp +0 -0
  126. package/docs/previews/navigation-layout-panelcard.webp +0 -0
  127. package/docs/roadmap.md +10 -10
  128. package/docs/troubleshooting.md +5 -4
  129. package/lib/components/ui/display/chip/chip-soft.css +27 -2
  130. package/lib/components/ui/primitives/collapsible/collapsible.css +9 -0
  131. package/lib/components/ui/widgets/calculator/calculator-keys.css +3 -0
  132. package/lib/components/ui/widgets/calculator/calculator.css +38 -7
  133. package/package.json +1 -1
@@ -8,11 +8,12 @@ import { DataTableTable } from '../../types.js';
8
8
  * replaces in place, and "Clear selection") goes to the host's start slot,
9
9
  * the sort to its sort slot.
10
10
  */
11
- export declare function ListBarInRow<TData extends RowData>({ table, slots, count, countText, selectAll, clear, }: {
11
+ export declare function ListBarInRow<TData extends RowData>({ table, slots, count, countText, selectAll, clear, showSort, }: {
12
12
  table: DataTableTable<TData>;
13
13
  slots: DataTableListSlots;
14
14
  count: number;
15
15
  countText: string;
16
16
  selectAll: (visibleLabel?: string) => ReactNode;
17
17
  clear: ReactNode;
18
+ showSort?: boolean;
18
19
  }): import("react").JSX.Element;
@@ -37,19 +37,22 @@ export interface DataTableProps<TData extends RowData> extends DataTableEmptyPro
37
37
  /** The header row (column names, sorting, "Select all"). Shown at every
38
38
  * width; `false` hides it. */
39
39
  showHeader?: boolean;
40
+ /** `false`: `cards` and `tiles` drop their sort control (phone too); columns
41
+ * stay sortable, header sorting unchanged. Default: shown. */
42
+ showSort?: boolean;
40
43
  /** Caps the table's height (`400`, `'60vh'`); the rows then scroll inside
41
44
  * it. Default: none — the table is as tall as its rows, and the page
42
45
  * scrolls. */
43
46
  maxHeight?: number | string;
47
+ /** `maxHeight` as a Tailwind class (`'max-h-[28rem]'`): no inline `style`,
48
+ * server included (strict CSP). Wins over `maxHeight`. */
49
+ maxHeightClassName?: string;
44
50
  /** Renders only the rows in view (and a few around them), for long
45
- * lists. Needs `maxHeight`: without it, it is off and warns in
46
- * development. In client mode every filtered and sorted row is in one
47
- * scrolling list, with no paging and no pagination footer; in `manual`
48
- * mode the rows given are. The table gets `aria-rowcount` and each row
49
- * its `aria-rowindex`, and switches to `table-fixed`: give columns their
50
- * widths with `meta.className`. `renderExpandedRow` is ignored while it
51
- * is on. The server renders the first `ssrRows` rows, with no inline
52
- * `style`. */
51
+ * lists. Needs `maxHeight` or `maxHeightClassName`, else it is off and
52
+ * warns in development. Client mode: every filtered and sorted row in one
53
+ * list, no paging; `manual`: the rows given. Adds `aria-rowcount`,
54
+ * `aria-rowindex` and `table-fixed` (widths in `meta.className`).
55
+ * `renderExpandedRow` is ignored. The server renders `ssrRows` rows. */
53
56
  virtual?: DataTableVirtual;
54
57
  /** The name of the scroll region the table becomes while it overflows.
55
58
  * Default: "Scrollable table" (`material.table.labels.scroll-region`). */
@@ -7,9 +7,15 @@ export type DataTableVirtualOptions = {
7
7
  };
8
8
  /**
9
9
  * `DataTable`'s `virtual`, or `undefined` when it is off. It needs
10
- * `maxHeight` (the rows scroll inside the table, not the page): without it,
11
- * it stays off and warns. `renderExpandedRow` is ignored while it is on —
10
+ * `maxHeight` or `maxHeightClassName` (the rows scroll inside the table, not
11
+ * the page): without either, it stays off and warns. `renderExpandedRow` is ignored while it is on —
12
12
  * an expanded row changes its row's height under the virtualizer — and
13
13
  * warns too.
14
14
  */
15
- export declare function resolveVirtual(virtual: DataTableVirtual | undefined, maxHeight: number | string | undefined, expandable: boolean): DataTableVirtualOptions | undefined;
15
+ export declare function resolveVirtual(virtual: DataTableVirtual | undefined, capped: boolean, expandable: boolean): DataTableVirtualOptions | undefined;
16
+ /** Whether the table's height is capped, by `maxHeight` or by
17
+ * `maxHeightClassName`: the rows then scroll inside it. */
18
+ export declare function isCapped(props: {
19
+ maxHeight?: number | string;
20
+ maxHeightClassName?: string;
21
+ }): boolean;
@@ -2326,6 +2326,7 @@ export declare function useFilterFieldConfig({ field, value, onChange, error, di
2326
2326
  label?: import('react').ReactNode;
2327
2327
  columns?: import('../../selection/index.js').ChipGroupColumns | undefined;
2328
2328
  content?: string | undefined | undefined;
2329
+ overflow?: "wrap" | "scroll" | undefined;
2329
2330
  size?: import('../../display/index.js').ChipSize | undefined;
2330
2331
  translate?: "yes" | "no" | undefined | undefined;
2331
2332
  color?: string | undefined | undefined;
@@ -2623,6 +2624,7 @@ export declare function useFilterFieldConfig({ field, value, onChange, error, di
2623
2624
  label?: import('react').ReactNode;
2624
2625
  columns?: import('../../selection/index.js').ChipGroupColumns | undefined;
2625
2626
  content?: string | undefined | undefined;
2627
+ overflow?: "wrap" | "scroll" | undefined;
2626
2628
  size?: import('../../display/index.js').ChipSize | undefined;
2627
2629
  translate?: "yes" | "no" | undefined | undefined;
2628
2630
  color?: string | undefined | undefined;
@@ -19,6 +19,7 @@ export declare function passedThrough<T extends RowData>(props: ServerTableProps
19
19
  expandedRowModel: (table: import('@tanstack/table-core').Table<any, any>) => () => import('@tanstack/table-core').RowModel<any, any>;
20
20
  }, T, any>[];
21
21
  maxHeight: string | number | undefined;
22
+ maxHeightClassName: string | undefined;
22
23
  scrollLabel: string | undefined;
23
24
  showViewOptions: boolean | undefined;
24
25
  renderExpandedRow: ((row: import('@tanstack/table-core').Row<{
@@ -15,7 +15,7 @@ export type ServerTableSelection = {
15
15
  deselect(ids: readonly string[]): void;
16
16
  };
17
17
  /** The `DataTable` props `ServerTable` passes through as they are. */
18
- export type PassedThrough<T extends RowData> = Pick<DataTableProps<T>, 'columns' | 'maxHeight' | 'scrollLabel' | 'showViewOptions' | 'renderExpandedRow' | 'options' | 'loading' | 'loadingRows' | 'getRowHref' | 'onRowClick' | 'linkComponent' | 'density' | 'layout' | 'cardDensity' | 'renderCard' | 'renderTile' | 'focusRef' | 'enableRowSelection' | 'rowSelectionDisabledReason'>;
18
+ export type PassedThrough<T extends RowData> = Pick<DataTableProps<T>, 'columns' | 'maxHeight' | 'maxHeightClassName' | 'scrollLabel' | 'showViewOptions' | 'renderExpandedRow' | 'options' | 'loading' | 'loadingRows' | 'getRowHref' | 'onRowClick' | 'linkComponent' | 'density' | 'layout' | 'cardDensity' | 'renderCard' | 'renderTile' | 'focusRef' | 'enableRowSelection' | 'rowSelectionDisabledReason'>;
19
19
  export type ServerTableProps<T extends RowData> = PassedThrough<T> & ServerTablePagingProps & {
20
20
  /** The URL's search params, as the router reads them. */
21
21
  params: URLSearchParams;
@@ -1,3 +1,4 @@
1
+ import { Tone } from '../../tones.js';
1
2
  /**
2
3
  * A `Chip`'s look. `outlined` (the default) is a neutral hairline pill;
3
4
  * `tonal` and `filled` a soft tonal fill; `tag` a compact tag led by a
@@ -10,8 +11,8 @@ export type ChipVariant = 'outlined' | 'tonal' | 'filled' | 'tag' | 'dashed'
10
11
  | 'ghost'
11
12
  /** @deprecated A Button variant: draws the hairline look, as `outlined`. */
12
13
  | 'link';
13
- /** A `Chip`'s tone: `default` (and nothing) is neutral. */
14
- export type ChipColor = 'default' | 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error';
14
+ /** A `Chip`'s tone: `default` (and nothing) is neutral; else a tone `Badge` takes, an app's own included. */
15
+ export type ChipColor = 'default' | Tone;
15
16
  /**
16
17
  * A `Chip`'s density: `default` 28px, `sm` 24px (the 24px target kept), `lg`
17
18
  * 44px (the touch target, drawn at every pointer).
@@ -21,7 +22,7 @@ export type ChipLook = 'hairline' | 'soft' | 'tag';
21
22
  /** The look a variant draws. */
22
23
  export declare function chipLook(variant: ChipVariant | null | undefined): ChipLook;
23
24
  /** The tone a colour draws: no colour, and `default`, are neutral. */
24
- export declare function chipTone(color: ChipColor | null | undefined): "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral";
25
+ export declare function chipTone(color: ChipColor | null | undefined): Tone;
25
26
  /** The data attributes a chip's root carries, and the look and tone they name. */
26
27
  export declare function chipAttributes({ variant, size, color, selected, }: {
27
28
  variant: ChipVariant;
@@ -30,6 +31,6 @@ export declare function chipAttributes({ variant, size, color, selected, }: {
30
31
  selected?: boolean;
31
32
  }): {
32
33
  look: ChipLook;
33
- tone: string;
34
+ tone: Tone;
34
35
  attributes: Record<string, string | undefined>;
35
36
  };