@nxgt/material 3.37.0 → 3.39.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.
- package/CHANGELOG.md +38 -0
- package/README.md +1 -1
- package/dist/{async-slice-BNI_F0jz.js → async-slice-BtUexP2l.js} +2 -2
- package/dist/{button-CB4nSAMd.js → button-CCAYSsgh.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-B6m3yagf.js → chip-Corr637n.js} +1 -1
- package/dist/{code-editor-BdiufnpC.js → code-editor-B8_ny_jT.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-v5Rnq425.js → code-language-items-1E5Qmfzb.js} +2 -2
- package/dist/components/components.css +2 -0
- package/dist/components/ui/collections/server-table/server-table-phone-row.css +189 -0
- package/dist/{components-mqgqmfvj.js → components-CTKlqX8g.js} +20201 -19716
- package/dist/components.js +15 -15
- package/dist/{dialog-DR9rACzY.js → dialog-DGlnqBbX.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CpSnRXd-.js → dropdown-menu-B-buMTGc.js} +1 -1
- package/dist/editor.js +7 -7
- package/dist/{empty-state-DMr94lsF.js → empty-state-DKgPt475.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-A4mI4vc1.js → i18n-provider-Bc7bdIRW.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-DXEBeS1y.js → icon-badge-BzLsPW3c.js} +1 -1
- package/dist/lib/components/ui/collections/data-table/data-table-list-slots.d.ts +12 -0
- package/dist/lib/components/ui/collections/data-table/internal.d.ts +1 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +11 -1
- package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +9 -1
- package/dist/lib/components/ui/collections/filter/internal.d.ts +1 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts +10 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band.d.ts +13 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +6 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk.d.ts +10 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-phone-row.d.ts +17 -0
- package/dist/lib/components/ui/dates/date-field/date-field-content.d.ts +1 -1
- package/dist/lib/components/ui/dates/date-field/date-field-popover.d.ts +3 -1
- package/dist/lib/components/ui/dates/date-field/date-field-sheet-entry.d.ts +3 -2
- package/dist/lib/components/ui/dates/date-field/date-field-surface.d.ts +1 -1
- package/dist/lib/components/ui/dates/date-field/date-field-typed.d.ts +3 -3
- package/dist/lib/components/ui/dates/date-field/date-field.d.ts +23 -2
- package/dist/lib/components/ui/dates/date-field/use-typed-date.d.ts +3 -1
- package/dist/lib/components/ui/dates/date-field/use-zoned-content.d.ts +36 -0
- package/dist/lib/components/ui/dates/date-range-field/date-range-field.types.d.ts +1 -1
- package/dist/lib/components/ui/dates/picker-popover/hero-text.d.ts +1 -0
- package/dist/lib/components/ui/dates/picker-trigger/floating-clock.d.ts +7 -0
- package/dist/lib/components/ui/dates/picker-trigger/typed-day.d.ts +8 -0
- package/dist/lib/components/ui/dates/picker-trigger/use-zoned-date-props.d.ts +38 -0
- package/dist/lib/components/ui/dates/picker-trigger/use-zoned-value.d.ts +20 -0
- package/dist/lib/components/ui/dates/picker-trigger/zoned-bounds.d.ts +16 -0
- package/dist/lib/components/ui/dates/picker-trigger/zoned-matchers.d.ts +8 -0
- package/dist/lib/components/ui/dates/time-field/time-field.d.ts +14 -1
- package/dist/lib/components/ui/dates/time-field/time-form-field.d.ts +5 -1
- package/dist/lib/components/ui/dates/time-field/time-string-field.d.ts +3 -2
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +2 -2
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +18 -1
- package/dist/lib/components/ui/layout/app-shell/app-breadcrumb.d.ts +20 -4
- package/dist/lib/components/ui/layout/app-shell/header-context.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/header-title.d.ts +5 -1
- package/dist/lib/components/ui/layout/app-shell/page-title.d.ts +21 -2
- package/dist/lib/components/ui/primitives/segmented-input/segment-date-time.d.ts +13 -0
- package/dist/lib/components/ui/primitives/segmented-input/segment-defs.d.ts +6 -0
- package/dist/lib/components/ui/primitives/segmented-input/segment-floating.d.ts +11 -0
- package/dist/lib/components/ui/primitives/segmented-input/segment-part.d.ts +19 -0
- package/dist/lib/components/ui/selection/chip-group-field/chip-group-columns.d.ts +3 -0
- package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.d.ts +28 -5
- package/dist/lib/components/ui/selection/chip-group-field/chip-group-field.types.d.ts +17 -0
- package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-option.d.ts +7 -3
- package/dist/lib/components/ui/selection/chip-group-field/partials/chip-group-sections.d.ts +13 -0
- package/dist/lib/components/ui/selection/choice-group/choice-key-target.d.ts +1 -1
- package/dist/lib/components/ui/selection/choice-group/choice-press.d.ts +2 -0
- package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +3 -1
- package/dist/lib/components/ui/selection/choice-group/use-choice-group.d.ts +2 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar-events.utils.d.ts +11 -1
- package/dist/lib/i18n/resources/en/en.d.ts +2 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +3 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +2 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +3 -1
- package/dist/lib/i18n/resources/resources.d.ts +4 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/lib/zoned-floating.d.ts +30 -0
- package/dist/lib/lib/zoned-instant.d.ts +16 -0
- package/dist/lib/lib/zoned.d.ts +11 -4
- package/dist/lib.js +1 -1
- package/dist/main.js +21 -21
- package/dist/map.js +4 -4
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-BdJCVnGS.js → public-CNlIuQOj.js} +6 -6
- package/dist/{rich-code-block-Bwhfhu7J.js → rich-code-block-Jo0OLy0J.js} +4 -4
- package/dist/{sortable-provider-BshacF8v.js → sortable-provider-DgIo378H.js} +3 -2
- package/dist/{spinner-CKlDba5I.js → spinner-BTR8rVN9.js} +1 -1
- package/dist/{stored-language-CfQGHLq9.js → stored-language-Bbwcy-Pv.js} +6 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle--Zcf5AM8.js → theme-toggle-DMZ_3HiG.js} +1 -1
- package/dist/{toolbar-items-B1W-uVHS.js → toolbar-items-D3SPTgXE.js} +2 -2
- package/dist/{translate-material-xDh10aWZ.js → translate-material-CRF13PON.js} +2 -2
- package/dist/{translator-BbOZntEF.js → translator-D7AVZCfQ.js} +1 -1
- package/dist/{use-chat-composer-C82hvxm4.js → use-chat-composer-D3kvp8Fw.js} +2310 -2184
- package/dist/{use-heading-spy-DXYCeegh.js → use-heading-spy-uyhOQV2O.js} +1 -1
- package/dist/{use-material-translation-BK2YYCY3.js → use-material-translation-kISeB-fY.js} +2 -2
- package/docs/components/data-table-filter-and-lists.md +55 -2
- package/docs/components/date-and-time.md +77 -3
- package/docs/components/navigation-and-layout.md +4 -2
- package/docs/components/selection-and-choice.md +67 -3
- package/docs/guides/app-shell.md +91 -2
- package/docs/guides/cards-and-tiles.md +5 -0
- package/docs/guides/forms.md +2 -2
- package/docs/guides/i18n.md +3 -2
- package/docs/roadmap.md +5 -1
- package/docs/troubleshooting.md +9 -1
- package/lib/components/components.css +2 -0
- package/lib/components/ui/collections/server-table/server-table-phone-row.css +189 -0
- package/package.json +2 -2
|
@@ -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;
|