@nxgt/material 3.87.0 → 3.88.1

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 (88) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -0
  3. package/dist/{alert-dialog-DC_9MW49.js → alert-dialog-CEGs7LMN.js} +1 -1
  4. package/dist/{async-slice-C6XbESai.js → async-slice-CR0M95Jq.js} +1 -1
  5. package/dist/{button-BksHtogl.js → button-DuTNpo28.js} +3 -3
  6. package/dist/{calculator-C_dTrMWE.js → calculator-DsGk_fCw.js} +10 -10
  7. package/dist/calculator-field.js +6 -6
  8. package/dist/{calculator-segment-FOUl66f6.js → calculator-segment-DMFptsDf.js} +1 -1
  9. package/dist/calculator.js +1 -1
  10. package/dist/charts.js +3 -3
  11. package/dist/{chip-BWaC87zs.js → chip-C-RAjar5.js} +2 -2
  12. package/dist/{code-editor-ddbQ0pEc.js → code-editor-DApeIOZ3.js} +4 -4
  13. package/dist/code-editor.js +4 -4
  14. package/dist/{code-language-items-jRlQfjAm.js → code-language-items-CGtYfc1l.js} +2 -2
  15. package/dist/components/ui/dates/duration-field/duration-field-expressive.css +1 -1
  16. package/dist/components/ui/dates/picker-trigger/typed-box-expressive.css +5 -24
  17. package/dist/{components-B5p3JKhQ.js → components-DiEY0nrG.js} +11936 -11736
  18. package/dist/components.js +37 -37
  19. package/dist/{conversion-variant-Cauk0BMS.js → conversion-variant-DfQiOwYC.js} +3 -3
  20. package/dist/{currency-field-Dy2e9kSr.js → currency-field-cwC7cqUE.js} +4 -4
  21. package/dist/{dialog-DNDT81SC.js → dialog-Bul68q8u.js} +3 -3
  22. package/dist/dnd.js +1 -1
  23. package/dist/{dropdown-menu-DtVC2xQW.js → dropdown-menu-xUUE5X6T.js} +1 -1
  24. package/dist/editor.js +7 -7
  25. package/dist/{empty-state-Dfsp5UF4.js → empty-state-D7ofGDU_.js} +8 -7
  26. package/dist/{financial-variant-0fJAMale.js → financial-variant-CYgRZzKT.js} +5 -5
  27. package/dist/{hooks-kPRle6lM.js → hooks-CpvvZCs7.js} +2 -2
  28. package/dist/hooks.js +2 -2
  29. package/dist/{hover-card-CsxW7S7D.js → hover-card-CZLFQwZv.js} +1 -1
  30. package/dist/i18n.js +3 -3
  31. package/dist/{icon-badge-8CPy2xAU.js → icon-badge-0Xo9q7Ey.js} +1 -1
  32. package/dist/{icon-button-caFcCpXV.js → icon-button-DE1EcO2-.js} +1 -1
  33. package/dist/lib/components/ui/collections/server-table/server-table-classes.d.ts +5 -2
  34. package/dist/lib/components/ui/dates/half-day-range-field/half-day-end.d.ts +21 -0
  35. package/dist/lib/components/ui/dates/half-day-range-field/half-day-ends.d.ts +11 -0
  36. package/dist/lib/components/ui/dates/half-day-range-field/half-day-range-field.d.ts +39 -0
  37. package/dist/lib/components/ui/dates/half-day-range-field/half-day-range-form-field.d.ts +3 -0
  38. package/dist/lib/components/ui/dates/half-day-range-field/half-day-range.d.ts +25 -0
  39. package/dist/lib/components/ui/dates/half-day-range-field/index.d.ts +3 -0
  40. package/dist/lib/components/ui/dates/half-day-range-field/use-half-day-draft.d.ts +30 -0
  41. package/dist/lib/components/ui/dates/index.d.ts +1 -0
  42. package/dist/lib/components/ui/dates/picker-trigger/typed-box.d.ts +1 -1
  43. package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +2 -1
  44. package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +1 -1
  45. package/dist/lib/components/ui/display/list-tile/partials/list-tile-row.d.ts +3 -1
  46. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  47. package/dist/lib/i18n/resources/en/en.d.ts +7 -0
  48. package/dist/lib/i18n/resources/en/material.json.d.ts +7 -0
  49. package/dist/lib/i18n/resources/fr/fr.d.ts +7 -0
  50. package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -0
  51. package/dist/lib/i18n/resources/resources.d.ts +14 -0
  52. package/dist/lib/i18n/translator.d.ts +1 -1
  53. package/dist/lib.js +1 -1
  54. package/dist/main.js +53 -53
  55. package/dist/map.js +7 -7
  56. package/dist/material.css +1 -1
  57. package/dist/pdf-reader.js +1 -1
  58. package/dist/{percent-field-B6mJfY_p.js → percent-field-BFwxazf1.js} +1 -1
  59. package/dist/{picker-surface-CVAW0t-r.js → picker-surface-DkfTv_ft.js} +4 -4
  60. package/dist/{popover-DhRPftzZ.js → popover-BM6xApJd.js} +1 -1
  61. package/dist/{pos-types-QcM9WTr0.js → pos-types-CpTpT4vE.js} +1 -1
  62. package/dist/{pos-variant-BeON2e_Q.js → pos-variant-Bs5BUB1L.js} +4 -4
  63. package/dist/print.js +1 -1
  64. package/dist/{programmer-variant-3cEMiII7.js → programmer-variant-B1eI1fd0.js} +2 -2
  65. package/dist/{public-DezkDXv3.js → public-CzLMnSsS.js} +9 -9
  66. package/dist/{rich-code-block-DloPqrFQ.js → rich-code-block-CdVtxD75.js} +5 -5
  67. package/dist/{scientific-variant-0Fq8HLiY.js → scientific-variant-rfvJKxB4.js} +2 -2
  68. package/dist/{sortable-provider-OB35mdNh.js → sortable-provider-BopzsciJ.js} +2 -2
  69. package/dist/{spinner-CngjH5-n.js → spinner-DcW21pN1.js} +1 -1
  70. package/dist/{tabs-C0CPqX5U.js → tabs-CdoBFtWx.js} +1 -1
  71. package/dist/theme-picker.js +2 -2
  72. package/dist/{theme-toggle-BfXRbCwj.js → theme-toggle-Ch3GkDDU.js} +1 -1
  73. package/dist/{toolbar-items-BU5_H3UA.js → toolbar-items-CZ1lJXZZ.js} +4 -4
  74. package/dist/{translate-material-B1wzg7uX.js → translate-material-BrYBBZ66.js} +1 -1
  75. package/dist/{translator-BwUYrek9.js → translator-DoVsjUff.js} +14 -0
  76. package/dist/{use-chat-composer-Bsc1gCRQ.js → use-chat-composer-C9DG7O1Z.js} +15 -15
  77. package/dist/{use-heading-spy-BpeWvZ2y.js → use-heading-spy-kyOSe9rb.js} +4 -4
  78. package/dist/{use-material-translation-BDVGF7-Z.js → use-material-translation-BdrItuwY.js} +1 -1
  79. package/dist/{use-return-focus-BttT8j1o.js → use-return-focus-Cqzvj9R0.js} +1 -1
  80. package/docs/components/README.md +2 -1
  81. package/docs/components/data-table-filter-and-lists.md +1 -1
  82. package/docs/components/date-and-time.md +111 -0
  83. package/docs/guides/forms.md +1 -0
  84. package/docs/guides/i18n.md +7 -0
  85. package/docs/previews/date-time-halfdayrangefield.webp +0 -0
  86. package/lib/components/ui/dates/duration-field/duration-field-expressive.css +1 -1
  87. package/lib/components/ui/dates/picker-trigger/typed-box-expressive.css +5 -24
  88. package/package.json +1 -1
@@ -0,0 +1,30 @@
1
+ import { HalfDay, HalfDayRange } from './half-day-range.js';
2
+ export type Side = 'start' | 'end';
3
+ export type Draft = {
4
+ startDate?: Date;
5
+ startHalf: HalfDay;
6
+ endDate?: Date;
7
+ endHalf: HalfDay;
8
+ };
9
+ export declare function toDraft(value?: HalfDayRange): Draft;
10
+ /** The range both days make, ordered or not; `undefined` while a day is missing. */
11
+ export declare function toRange(draft: Draft): HalfDayRange | undefined;
12
+ export declare function isUnordered(draft: Draft): boolean;
13
+ /**
14
+ * The two ends being edited. A half-typed range (a day missing) is the
15
+ * draft's, not a value: `onValueChange(undefined)`. Both days set, the range
16
+ * goes out as it is, ordered or not (`unordered` says the end is refused, and
17
+ * the form wrapper's rule refuses it in the form). The draft follows `value`
18
+ * when it changes from outside (a reset to `undefined` empties it), and keeps
19
+ * itself without a `value` (uncontrolled, from `defaultValue`).
20
+ *
21
+ * Limit: a reset to `undefined` while the emitted value is already
22
+ * `undefined` is not news, so a half-typed start or a cleared end stays on
23
+ * screen. Give the field a `key` that changes on reset to empty it.
24
+ */
25
+ export declare function useHalfDayDraft(value: HalfDayRange | undefined, defaultValue: HalfDayRange | undefined, onValueChange: ((value?: HalfDayRange) => void) | undefined): {
26
+ draft: Draft;
27
+ unordered: boolean;
28
+ setDate: (side: Side, date?: Date) => void;
29
+ setHalf: (side: Side, half: HalfDay) => void;
30
+ };
@@ -2,6 +2,7 @@ export * from './calendar/index.js';
2
2
  export * from './date-field/index.js';
3
3
  export * from './date-range-field/index.js';
4
4
  export * from './duration-field/index.js';
5
+ export * from './half-day-range-field/index.js';
5
6
  export * from './mini-month/index.js';
6
7
  export * from './now-indicator/index.js';
7
8
  export * from './time-field/index.js';
@@ -32,7 +32,7 @@ export type TypedBoxProps = {
32
32
  * button while they hold something, and the button that opens the picker.
33
33
  * Its look is the field box's (`fieldBoxAttributes`): filled, open, the
34
34
  * focus look while a segment has focus, invalid and disabled. `data-tonal`
35
- * marks the tonal box of typed-box-expressive.css; the compact `'sm'` box is
35
+ * marks the shared bordered box that typed-box-expressive.css styles; the compact `'sm'` box is
36
36
  * a plain outlined one (typed-box-compact.ts).
37
37
  */
38
38
  export declare function TypedBox({ ref, children, filled, open, invalid, disabled, onLeave, onClear, first, clearLabel, buttonsDescribedBy, suffix, openButton, size, className, }: TypedBoxProps): import("react").JSX.Element;
@@ -12,7 +12,8 @@ export type ListTileCommonProps = {
12
12
  * The tile is the current one. A link tile (`href`) gets
13
13
  * `aria-current="page"` (pass your own `aria-current`, such as `"true"`
14
14
  * for a selection that is not a page, to replace it) and the selected look;
15
- * a button tile (`onClick`) gets `aria-pressed`. For list-detail
15
+ * a button tile (`onClick`) gets `aria-pressed` only when `selected` is
16
+ * given (a plain clickable tile is not a toggle). For list-detail
16
17
  * navigation, give `selected` from the router's location and the tile
17
18
  * keeps a shareable URL.
18
19
  */
@@ -1,3 +1,3 @@
1
1
  import { ListTileCommonProps, ListTileLinkOrButtonProps } from '../list-tile.js';
2
2
  /** A link, a button or a plain tile, with or without `actions` beside it. */
3
- export declare function ListTileLine({ title, subtitle, leading, trailing, chips, content, variant, inset, actions, className, selected, size, href, chevron, linkComponent: ownLink, disabled, onClick, ...props }: ListTileCommonProps & Omit<ListTileLinkOrButtonProps, 'toggle'>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
3
+ export declare function ListTileLine({ title, subtitle, leading, trailing, chips, content, variant, inset, actions, className, selected: selectedProp, size, href, chevron, linkComponent: ownLink, disabled, onClick, ...props }: ListTileCommonProps & Omit<ListTileLinkOrButtonProps, 'toggle'>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
@@ -12,6 +12,8 @@ type RenderRowOptions = {
12
12
  disabled?: boolean;
13
13
  onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
14
14
  selected: boolean;
15
+ /** The raw `selected` prop: a button is a toggle (`aria-pressed`) only when it is set. */
16
+ pressed?: boolean;
15
17
  rowClass: string;
16
18
  body: ReactNode;
17
19
  };
@@ -20,5 +22,5 @@ type RenderRowOptions = {
20
22
  * tile (it carries the tile's attributes); with them, only the row inside the
21
23
  * box, which keeps the rest props so `aria-label`, `id`… still land on it.
22
24
  */
23
- export declare function renderRow({ props, tileAttrs, split, href, linkComponent, disabled, onClick, selected, rowClass, body, }: RenderRowOptions): ReactNode;
25
+ export declare function renderRow({ props, tileAttrs, split, href, linkComponent, disabled, onClick, selected, pressed, rowClass, body, }: RenderRowOptions): ReactNode;
24
26
  export {};