@nxgt/material 3.38.0 → 3.41.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 (112) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +3 -3
  3. package/dist/{async-slice-DqjtOYlO.js → async-slice-Dj0tAKRI.js} +2 -2
  4. package/dist/{button-D52ron-a.js → button-CTsT_LqL.js} +1 -1
  5. package/dist/charts.js +1733 -1364
  6. package/dist/{chip-0XYwSp9o.js → chip-DP7EyhtT.js} +1 -1
  7. package/dist/{code-editor-BetIXpJ6.js → code-editor-BWn0AXBf.js} +4 -4
  8. package/dist/code-editor.js +4 -4
  9. package/dist/{code-language-items-C7prxl_7.js → code-language-items-CCRuLYpA.js} +2 -2
  10. package/dist/components/components.css +1 -0
  11. package/dist/components/ui/widgets/native-charts/native-charts-reference.css +102 -0
  12. package/dist/{components-NoCZ44Ri.js → components-BUFDh6nQ.js} +16216 -15813
  13. package/dist/components.js +15 -15
  14. package/dist/{dialog-BCsT_aLo.js → dialog-uQld1gKm.js} +1 -1
  15. package/dist/dnd.js +1 -1
  16. package/dist/{dropdown-menu-Crt5QvTr.js → dropdown-menu-BA70o7HC.js} +1 -1
  17. package/dist/editor.js +7 -7
  18. package/dist/{empty-state-DFWq2CWB.js → empty-state-BzwyRX5J.js} +1 -1
  19. package/dist/hooks.js +2 -2
  20. package/dist/{i18n-provider-C0RBM8rH.js → i18n-provider-DkeMr5bw.js} +1 -1
  21. package/dist/i18n.js +5 -5
  22. package/dist/{icon-badge-XBoBIt_R.js → icon-badge-D_z5BGbc.js} +1 -1
  23. package/dist/lib/charts/index.d.ts +3 -1
  24. package/dist/lib/components/ui/collections/server-table/bulk-action-targets.d.ts +18 -0
  25. package/dist/lib/components/ui/collections/server-table/bulk-action.d.ts +50 -3
  26. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +5 -3
  27. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-focus.d.ts +31 -0
  28. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-more.d.ts +24 -0
  29. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-notice.d.ts +16 -0
  30. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-texts.d.ts +9 -0
  31. package/dist/lib/components/ui/collections/server-table/server-table.d.ts +1 -1
  32. package/dist/lib/components/ui/dates/date-field/date-field-content.d.ts +1 -1
  33. package/dist/lib/components/ui/dates/date-field/date-field-popover.d.ts +3 -1
  34. package/dist/lib/components/ui/dates/date-field/date-field-sheet-entry.d.ts +3 -2
  35. package/dist/lib/components/ui/dates/date-field/date-field-surface.d.ts +1 -1
  36. package/dist/lib/components/ui/dates/date-field/date-field-typed.d.ts +3 -3
  37. package/dist/lib/components/ui/dates/date-field/date-field.d.ts +23 -2
  38. package/dist/lib/components/ui/dates/date-field/use-typed-date.d.ts +3 -1
  39. package/dist/lib/components/ui/dates/date-field/use-zoned-content.d.ts +36 -0
  40. package/dist/lib/components/ui/dates/date-range-field/date-range-field.types.d.ts +1 -1
  41. package/dist/lib/components/ui/dates/picker-popover/hero-text.d.ts +1 -0
  42. package/dist/lib/components/ui/dates/picker-trigger/floating-clock.d.ts +7 -0
  43. package/dist/lib/components/ui/dates/picker-trigger/typed-day.d.ts +8 -0
  44. package/dist/lib/components/ui/dates/picker-trigger/use-zoned-date-props.d.ts +38 -0
  45. package/dist/lib/components/ui/dates/picker-trigger/use-zoned-value.d.ts +20 -0
  46. package/dist/lib/components/ui/dates/picker-trigger/zoned-bounds.d.ts +16 -0
  47. package/dist/lib/components/ui/dates/picker-trigger/zoned-matchers.d.ts +8 -0
  48. package/dist/lib/components/ui/dates/time-field/time-field.d.ts +14 -1
  49. package/dist/lib/components/ui/dates/time-field/time-form-field.d.ts +5 -1
  50. package/dist/lib/components/ui/dates/time-field/time-string-field.d.ts +3 -2
  51. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  52. package/dist/lib/components/ui/primitives/segmented-input/segment-date-time.d.ts +13 -0
  53. package/dist/lib/components/ui/primitives/segmented-input/segment-defs.d.ts +6 -0
  54. package/dist/lib/components/ui/primitives/segmented-input/segment-floating.d.ts +11 -0
  55. package/dist/lib/components/ui/primitives/segmented-input/segment-part.d.ts +19 -0
  56. package/dist/lib/components/ui/widgets/native-charts/core/point-tones.d.ts +17 -0
  57. package/dist/lib/components/ui/widgets/native-charts/core/reference-text.d.ts +30 -0
  58. package/dist/lib/components/ui/widgets/native-charts/core/reference.d.ts +45 -0
  59. package/dist/lib/components/ui/widgets/native-charts/core/summary.d.ts +3 -0
  60. package/dist/lib/components/ui/widgets/native-charts/core/table.d.ts +7 -0
  61. package/dist/lib/components/ui/widgets/native-charts/core/types.d.ts +25 -0
  62. package/dist/lib/components/ui/widgets/native-charts/hooks/chart-model-types.d.ts +18 -1
  63. package/dist/lib/components/ui/widgets/native-charts/hooks/model-parts.d.ts +3 -0
  64. package/dist/lib/components/ui/widgets/native-charts/hooks/model-series.d.ts +3 -0
  65. package/dist/lib/components/ui/widgets/native-charts/hooks/model-tones.d.ts +19 -0
  66. package/dist/lib/components/ui/widgets/native-charts/hooks/use-chart-model.d.ts +3 -3
  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 +26 -1
  69. package/dist/lib/components/ui/widgets/native-charts/line-chart/line-geometry.d.ts +4 -0
  70. package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/reference-marks.d.ts +17 -0
  71. package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/tone-points.d.ts +11 -0
  72. package/dist/lib/components/ui/widgets/native-charts/partials/chart-tooltip.d.ts +3 -0
  73. package/dist/lib/i18n/resources/en/en.d.ts +23 -0
  74. package/dist/lib/i18n/resources/en/material.json.d.ts +23 -0
  75. package/dist/lib/i18n/resources/fr/fr.d.ts +23 -0
  76. package/dist/lib/i18n/resources/fr/material.json.d.ts +23 -0
  77. package/dist/lib/i18n/resources/resources.d.ts +46 -0
  78. package/dist/lib/i18n/translator.d.ts +1 -1
  79. package/dist/lib/lib/zoned-floating.d.ts +30 -0
  80. package/dist/lib/lib/zoned-instant.d.ts +16 -0
  81. package/dist/lib/lib/zoned.d.ts +11 -4
  82. package/dist/lib.js +1 -1
  83. package/dist/main.js +21 -21
  84. package/dist/map.js +4 -4
  85. package/dist/material.css +1 -1
  86. package/dist/pdf-reader.js +1 -1
  87. package/dist/print.js +2 -2
  88. package/dist/{public-CWIpzLzO.js → public-ib0sK0Hr.js} +6 -6
  89. package/dist/{rich-code-block-C4aBv4cA.js → rich-code-block-D_PTTZWQ.js} +4 -4
  90. package/dist/{sortable-provider-0uBi0zcP.js → sortable-provider-CrS51nKB.js} +1 -1
  91. package/dist/{spinner-CuxEwO0d.js → spinner-DLd_IHev.js} +1 -1
  92. package/dist/{stored-language-D8aemZhx.js → stored-language-B5SMR-W2.js} +46 -0
  93. package/dist/theme-picker.js +2 -2
  94. package/dist/{theme-toggle-ik5nV1P5.js → theme-toggle-wJYmnwgu.js} +1 -1
  95. package/dist/{toolbar-items-C97E5HRa.js → toolbar-items-BLjrk8uU.js} +2 -2
  96. package/dist/{translate-material-B84ufMSF.js → translate-material-BYRDtSEk.js} +2 -2
  97. package/dist/{translator-Bq8UHmvu.js → translator-C-_M57ZA.js} +1 -1
  98. package/dist/{use-chat-composer-DmDcEGp4.js → use-chat-composer-DrFgIE3T.js} +12 -12
  99. package/dist/{use-heading-spy-BgG7Q47k.js → use-heading-spy-wElRpO2G.js} +1 -1
  100. package/dist/{use-material-translation-CiYhVc39.js → use-material-translation-CFF73jk5.js} +2 -2
  101. package/docs/README.md +1 -1
  102. package/docs/components/data-table-filter-and-lists.md +59 -4
  103. package/docs/components/date-and-time.md +77 -3
  104. package/docs/components/rich-widgets.md +6 -0
  105. package/docs/guides/charts.md +78 -2
  106. package/docs/guides/forms.md +2 -2
  107. package/docs/guides/i18n.md +3 -2
  108. package/docs/roadmap.md +7 -0
  109. package/docs/troubleshooting.md +9 -1
  110. package/lib/components/components.css +1 -0
  111. package/lib/components/ui/widgets/native-charts/native-charts-reference.css +102 -0
  112. package/package.json +2 -2
@@ -70,5 +70,5 @@ export type DateRangeFieldProps = {
70
70
  surface?: 'auto' | 'popover' | 'sheet';
71
71
  /** Called as the calendar opens and closes (a half-picked range is final once it closes). */
72
72
  onOpenChange?: (open: boolean) => void;
73
- } & Omit<CalendarProps, 'mode' | 'label' | 'onSelect' | 'disabled'>;
73
+ } & Omit<CalendarProps, 'mode' | 'label' | 'onSelect' | 'disabled' | 'timeZone'>;
74
74
  export {};
@@ -7,6 +7,7 @@ import { DateRange } from '../calendar/calendar.js';
7
7
  export declare function heroDate(date: Date | undefined, code: string, empty: string, options?: {
8
8
  withTime?: boolean;
9
9
  today?: Date;
10
+ floating?: boolean;
10
11
  }): string;
11
12
  /** A range as "Oct 12 – Oct 16" ("Oct 12 – …" while the end is missing); `empty` with no start. */
12
13
  export declare function heroRange(range: DateRange | undefined, code: string, empty: string, options?: {
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The zone a date or time field edits in, when it does: its parts then hold
3
+ * floating dates (the wall clock, read through UTC getters, `@/lib/zoned-floating`)
4
+ * instead of machine-local ones. `undefined` outside a zoned field.
5
+ */
6
+ export declare const FloatingClockContext: import('react').Context<string | undefined>;
7
+ export declare const useFloatingZone: () => string | undefined;
@@ -24,3 +24,11 @@ export declare function acceptsDay(date: Date, bounds: TypedBounds): boolean;
24
24
  * was given, the calendar keeps the day unpickable, and the form refuses it.
25
25
  */
26
26
  export declare function settleDay(date: Date, bounds: TypedBounds): Date | undefined;
27
+ /**
28
+ * The bounds of a zoned field's typed day: floating `minDate` / `maxDate`
29
+ * compared by day, and the day rule against the day as react-day-picker
30
+ * reads it (a local `Date` at noon).
31
+ */
32
+ export declare function acceptsFloatingDay(date: Date, bounds: TypedBounds): boolean;
33
+ /** `settleDay` for a zoned field's floating day. */
34
+ export declare function settleFloatingDay(date: Date, bounds: TypedBounds): Date | undefined;
@@ -0,0 +1,38 @@
1
+ import { Matcher } from 'react-day-picker';
2
+ type Bounds = {
3
+ minDate?: Date;
4
+ maxDate?: Date;
5
+ disablePast?: boolean;
6
+ disableFuture?: boolean;
7
+ today?: Date;
8
+ };
9
+ /**
10
+ * What `DateField` needs to edit in `timeZone`: the value and its callback as
11
+ * floating dates (`useZonedValue`), the calendar's props with the bounds,
12
+ * today and the day rule in the zone. Without a zone everything passes
13
+ * through unchanged and `zone` is `undefined`.
14
+ */
15
+ export declare function useZonedDateProps<P extends Bounds>({ value, onValueChange, timeZone, props, dayRule, }: {
16
+ value?: Date;
17
+ onValueChange?: (value?: Date) => void;
18
+ timeZone?: string;
19
+ props: P;
20
+ dayRule?: Matcher | Matcher[];
21
+ }): {
22
+ props: P;
23
+ dayRule: Matcher | Matcher[] | undefined;
24
+ zone: string | undefined;
25
+ value: Date | undefined;
26
+ onValueChange: ((value?: Date) => void) | undefined;
27
+ };
28
+ /** What `TimeField` needs to edit in `timeZone`: the value and its callback as floating dates. */
29
+ export declare function useZonedTimeProps(model: {
30
+ value?: Date;
31
+ onValueChange?: (value?: Date) => void;
32
+ timeZone?: string;
33
+ }): {
34
+ zone: string | undefined;
35
+ value: Date | undefined;
36
+ onValueChange: ((value?: Date) => void) | undefined;
37
+ };
38
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The value of a field that edits in a time zone. The field's `value` is
3
+ * the true instant; every part inside works on its wall clock in `timeZone`
4
+ * as a floating date (`floatingOf`: read through UTC getters, so no
5
+ * machine zone or clock change moves it), and what it emits is turned back
6
+ * into the instant (`zonedInstant`; a time in a gap moves forward, a repeated
7
+ * one keeps the occurrence being edited).
8
+ *
9
+ * Without a `timeZone` the value and the callback pass through unchanged.
10
+ * `zone` is the name `Intl` knows it by (`UTC` for an unknown one).
11
+ */
12
+ export declare function useZonedValue({ value, onValueChange, timeZone, }: {
13
+ value?: Date;
14
+ onValueChange?: (value?: Date) => void;
15
+ timeZone?: string;
16
+ }): {
17
+ zone: string | undefined;
18
+ value: Date | undefined;
19
+ onValueChange: ((value?: Date) => void) | undefined;
20
+ };
@@ -0,0 +1,16 @@
1
+ type Bounds = {
2
+ minDate?: Date;
3
+ maxDate?: Date;
4
+ disablePast?: boolean;
5
+ disableFuture?: boolean;
6
+ };
7
+ /**
8
+ * A field's day bounds as floating dates (`floatingOf`) in `zone`: `minDate`
9
+ * and `maxDate` (instants) as the wall clock they are in the zone, and
10
+ * `disablePast` / `disableFuture` resolved against today in the zone (not
11
+ * the machine's), so a field for Europe/Paris refuses yesterday's Paris date
12
+ * even where it is still the 3rd. The two flags come back unset: they are
13
+ * already in `minDate` / `maxDate`. Bounds are compared by day.
14
+ */
15
+ export declare function zonedBounds({ minDate, maxDate, disablePast, disableFuture }: Bounds, zone: string, now?: Date): Bounds;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Matcher } from 'react-day-picker';
2
+ /**
3
+ * A field's day rule (`disabledDays`) with the instants in it moved into the
4
+ * zone: a `Date`, `{ before }`, `{ after }`, `{ from, to }` and the lists of
5
+ * them name the days they fall on in `zone`, not on the machine. A function,
6
+ * `{ dayOfWeek }` and the like are given the zone's days already and stay.
7
+ */
8
+ export declare function zonedMatchers(rule: Matcher | Matcher[] | undefined, zone: string): Matcher | Matcher[] | undefined;
@@ -30,6 +30,19 @@ export type TimeFieldProps = {
30
30
  * row of times such as opening hours. `'default'` is 44px.
31
31
  */
32
32
  size?: 'default' | 'sm';
33
+ /**
34
+ * An IANA zone (`Europe/Paris`) the time is read and written in.
35
+ * `value` and `onValueChange` stay the true instant: 09:30 typed with
36
+ * `Europe/Paris` is `07:30Z` in summer and `08:30Z` in winter, whatever
37
+ * zone the browser runs in, and the field shows the value's Paris wall
38
+ * clock. The time lands on the value's day in the zone (today in the zone
39
+ * when there is no value). A time that does not exist (the clocks go
40
+ * forward) moves to the end of the gap; one that happens twice (they go
41
+ * back) is the first occurrence, unless the value already holds the
42
+ * second. An unknown name is `UTC`. Without it the machine's zone is
43
+ * used, as before.
44
+ */
45
+ timeZone?: string;
33
46
  } & Pick<TimePickerProps, 'variant' | 'hourCycle' | 'minuteStep'> & Omit<ComponentProps<'div'>, 'onChange'>;
34
47
  /**
35
48
  * A time, picked in a popover on a desktop and in a bottom sheet on a phone. Both
@@ -39,4 +52,4 @@ export type TimeFieldProps = {
39
52
  * field's root `div`, which holds the `Label`, the trigger and the helper
40
53
  * text.
41
54
  */
42
- export declare function TimeField({ value, size, label, helperText, error, onValueChange, placeholder, className, disabled, onBlur, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, variant, hourCycle, minuteStep, entry: _entry, clearable, surface, ...rest }: TimeFieldProps): import("react").JSX.Element;
55
+ export declare function TimeField({ value: instant, timeZone, size, label, helperText, error, onValueChange: emit, placeholder, className, disabled, onBlur, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, variant, hourCycle, minuteStep, entry: _entry, clearable, surface, ...rest }: TimeFieldProps): import("react").JSX.Element;
@@ -1,5 +1,9 @@
1
1
  import { UseControllerProps } from 'react-hook-form';
2
2
  import { TimeFieldProps } from './time-field.js';
3
- export declare function TimeFormField<T extends Record<string, any>>({ control, name, asString, ...props }: {
3
+ export declare function TimeFormField<T extends Record<string, any>>({ control, name, asString, timeZone, ...props }: {
4
+ /**
5
+ * The form holds `HH:mm` instead of a `Date`. That string is the wall
6
+ * clock itself, so `timeZone` has no effect with it.
7
+ */
4
8
  asString?: boolean;
5
9
  } & Pick<UseControllerProps<T>, 'control' | 'name'> & Omit<TimeFieldProps, 'name'>): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { TimeFieldProps } from './time-field.js';
2
- export type TimeStringFieldProps = Omit<TimeFieldProps, 'value' | 'onValueChange'> & {
2
+ export type TimeStringFieldProps = Omit<TimeFieldProps, 'value' | 'onValueChange' | 'timeZone'> & {
3
3
  /** The time as `HH:mm` (`'09:30'`); empty or malformed shows an empty field. */
4
4
  value?: string;
5
5
  /** The new `HH:mm`, or `undefined` once the field is emptied. */
@@ -9,6 +9,7 @@ export type TimeStringFieldProps = Omit<TimeFieldProps, 'value' | 'onValueChange
9
9
  * A `TimeField` whose value is an `HH:mm` string instead of a `Date`: what
10
10
  * a stored time of day (opening hours, a schedule) holds. It is the same
11
11
  * field (`size`, `surface`, the picker, the typed segments), so it keeps no
12
- * look of its own.
12
+ * look of its own. A time of day written as text has no instant, so there is
13
+ * no `timeZone`: the string is the wall clock.
13
14
  */
14
15
  export declare function TimeStringField({ value, onValueChange, ...props }: TimeStringFieldProps): import("react").JSX.Element;