@nxgt/material 3.73.0 → 3.74.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 +24 -0
- package/README.md +3 -1
- package/dist/{alert-dialog-A8K8zai1.js → alert-dialog-BfO_ri-N.js} +1 -1
- package/dist/{async-slice-B8933IHY.js → async-slice-roMAJVzG.js} +1 -1
- package/dist/{button-C8moFnIT.js → button-DgenqmpS.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-B6AY1E91.js → chip-CiDczNxO.js} +2 -2
- package/dist/{code-editor-DQZIKL54.js → code-editor-CohlhFsA.js} +5 -5
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-8VL0aMKG.js → code-language-items-Cs8GLYDp.js} +2 -2
- package/dist/components/ui/display/seat-ring/seat-ring.css +26 -0
- package/dist/components/ui/feedback/feedback.css +2 -0
- package/dist/components/ui/feedback/moment/moment.css +22 -0
- package/dist/{components-Cvp2F9uk.js → components-y18qSFzl.js} +14136 -13891
- package/dist/components.js +28 -28
- package/dist/{dialog-WuLTwxkr.js → dialog-AGsB3bv4.js} +4 -4
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-tadySeGH.js → dropdown-menu-CzR6JP31.js} +1 -1
- package/dist/editor.js +10 -10
- package/dist/{empty-state-ZYiFSSBQ.js → empty-state-DjHGMp5F.js} +2 -2
- package/dist/{field-blur-BYR0yE5L.js → field-blur-CdASxjL7.js} +1 -1
- package/dist/{field-blur-context-bEhByoK-.js → field-blur-context-kZ4SD7xu.js} +1 -1
- package/dist/{hooks-GpwD8iDu.js → hooks-Dqq8O3Az.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BowaI_ra.js → hover-card-BPKqte4a.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-B1B0Lg02.js → icon-badge-B9uvDoyY.js} +3 -3
- package/dist/{icon-button-BbGU17cb.js → icon-button-Cr-DyDGg.js} +1 -1
- package/dist/lib/components/ui/collections/filter/bar/filter-bar-classes.d.ts +2 -2
- package/dist/lib/components/ui/collections/filter/bar/filter-bar-view.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/facets/filter-facets.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/types.d.ts +6 -0
- package/dist/lib/components/ui/collections/filter/query/view-types.d.ts +1 -0
- package/dist/lib/components/ui/collections/filter/sections/chips/filter-chip-body.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/sections/filter-search.d.ts +1 -0
- package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +8 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-page.d.ts +4 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +7 -1
- package/dist/lib/components/ui/display/highlighted-text/highlight-ranges.d.ts +11 -0
- package/dist/lib/components/ui/display/highlighted-text/highlighted-text.d.ts +16 -0
- package/dist/lib/components/ui/display/highlighted-text/index.d.ts +2 -0
- package/dist/lib/components/ui/display/index.d.ts +1 -0
- package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +10 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-box.d.ts +16 -0
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-classes.d.ts +3 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +1 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-row.d.ts +1 -1
- package/dist/lib/components/ui/display/seat-ring/types.d.ts +6 -0
- package/dist/lib/components/ui/feedback/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/moment/index.d.ts +1 -0
- package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +9 -0
- package/dist/lib/components/ui/feedback/moment/moment.d.ts +33 -0
- package/dist/lib/components/ui/fields/choice-list/choice-list-control.d.ts +17 -0
- package/dist/lib/components/ui/fields/choice-list/choice-list-focus.d.ts +7 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/overlays/command/command-dialog.d.ts +8 -1
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +5 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +5 -1
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +42 -42
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -1
- package/dist/{public-CFj2qn7l.js → public-DC9VQw4Z.js} +9 -9
- package/dist/{rich-code-block-B7Teg7-e.js → rich-code-block-DBSL9zEN.js} +5 -5
- package/dist/{sortable-provider-DU2zp_jn.js → sortable-provider-C4tk5esY.js} +2 -2
- package/dist/{spinner-C5Kb6MWu.js → spinner-B2MubVWb.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-B1JZg7mU.js → theme-toggle-BInlu21G.js} +1 -1
- package/dist/{toolbar-items-m_1FTFPQ.js → toolbar-items-CRJSx1MU.js} +3 -3
- package/dist/{translate-material-D1ndrd7a.js → translate-material-pVlPJ1v4.js} +1 -1
- package/dist/{translator-CtEC_AQa.js → translator-BoYCward.js} +10 -2
- package/dist/{typography-prQHb3gI.js → typography-B6YMbCge.js} +1 -1
- package/dist/{use-chat-composer-BAoUsyKN.js → use-chat-composer-Cn6yaeO0.js} +16 -16
- package/dist/{use-heading-spy-Bzj5mIUZ.js → use-heading-spy-B_Z4ArDh.js} +4 -4
- package/dist/{use-material-translation-C6H0B4kE.js → use-material-translation-CIS2n3RB.js} +1 -1
- package/dist/{use-return-focus-CkUX1HFl.js → use-return-focus-DNQtADAR.js} +1 -1
- package/docs/components/data-display.md +58 -5
- package/docs/components/data-table-filter-and-lists.md +8 -3
- package/docs/components/feedback-and-status.md +40 -0
- package/docs/components/form-fields.md +9 -2
- package/docs/components/overlays-and-menus.md +2 -1
- package/docs/guides/i18n.md +4 -1
- package/docs/guides/theming.md +4 -0
- package/docs/previews/data-display-highlightedtext.webp +0 -0
- package/docs/roadmap.md +1 -0
- package/docs/troubleshooting.md +4 -2
- package/lib/components/ui/display/seat-ring/seat-ring.css +26 -0
- package/lib/components/ui/feedback/feedback.css +2 -0
- package/lib/components/ui/feedback/moment/moment.css +22 -0
- package/package.json +2 -2
|
@@ -12,9 +12,11 @@ type ListTileClassesOptions = {
|
|
|
12
12
|
dense?: boolean;
|
|
13
13
|
/** `divided` only: a 16px inline inset (`px-4`) in place of 4px (`px-1`). */
|
|
14
14
|
inset?: boolean;
|
|
15
|
+
/** The tile has `content`: it wraps onto a full-width line under the row. */
|
|
16
|
+
stacked?: boolean;
|
|
15
17
|
};
|
|
16
18
|
/** The classes shared by the tile's three elements (link, button, div). */
|
|
17
|
-
export declare function listTileClasses({ compact, selected, interactive, disabled, className, split, divided, dense, inset, }: ListTileClassesOptions): string;
|
|
19
|
+
export declare function listTileClasses({ compact, selected, interactive, disabled, className, split, divided, dense, inset, stacked, }: ListTileClassesOptions): string;
|
|
18
20
|
/**
|
|
19
21
|
* The row of a tile with `actions` (its link, button or div): it fills the
|
|
20
22
|
* tile's box except for the actions, and a link or button stretches over the
|
|
@@ -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, 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, 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;
|
|
@@ -2,7 +2,7 @@ import { MouseEventHandler, ReactNode } from 'react';
|
|
|
2
2
|
import { LinkComponent } from '../../../primitives/link/link-component.js';
|
|
3
3
|
type Attrs = Record<string, unknown>;
|
|
4
4
|
/** What stays on the box of a tile with actions: `data-*` and `style` (the class is its own). */
|
|
5
|
-
export declare function boxProps(props:
|
|
5
|
+
export declare function boxProps(props: object): Attrs;
|
|
6
6
|
type RenderRowOptions = {
|
|
7
7
|
props: Attrs;
|
|
8
8
|
tileAttrs: Attrs;
|
|
@@ -21,6 +21,12 @@ export type Seat = {
|
|
|
21
21
|
badge?: ReactNode;
|
|
22
22
|
/** Cannot be picked: `aria-disabled`, still reachable by keyboard. */
|
|
23
23
|
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Eliminated: the seat stays visible but dimmed, its name struck through and
|
|
26
|
+
* its avatar greyed, with the word "Out" (`material.seat-ring.out`) shown and
|
|
27
|
+
* read as part of the seat's name. It stays pickable unless `disabled`.
|
|
28
|
+
*/
|
|
29
|
+
out?: boolean;
|
|
24
30
|
/** Nobody sits here: a dashed placeholder, never selectable. */
|
|
25
31
|
empty?: boolean;
|
|
26
32
|
};
|
|
@@ -11,6 +11,7 @@ export * from './empty-state/index.js';
|
|
|
11
11
|
export * from './error-state/index.js';
|
|
12
12
|
export * from './hydrate-loading/index.js';
|
|
13
13
|
export * from './loading-indicator/index.js';
|
|
14
|
+
export * from './moment/index.js';
|
|
14
15
|
export * from './notification-row/index.js';
|
|
15
16
|
export * from './notifications/index.js';
|
|
16
17
|
export * from './page-load-failed/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './moment.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** What a Moment shows: the picture, the title, the description (or the hint for assistive technology), the action and the close button. */
|
|
3
|
+
export declare function MomentBody({ illustration, title, description, action, closeLabel, }: {
|
|
4
|
+
illustration?: ReactNode;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
action?: ReactNode;
|
|
8
|
+
closeLabel?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Tone } from '../../tones.js';
|
|
3
|
+
export interface MomentProps {
|
|
4
|
+
/** Whether the announcement is on screen. */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Called with `false` when it is dismissed: Escape, a tap, the close button, the action or the end of `duration`. */
|
|
7
|
+
onOpenChange: (open: boolean) => void;
|
|
8
|
+
/** Dismisses it by itself after this many milliseconds. Unset: it stays until dismissed. */
|
|
9
|
+
duration?: number;
|
|
10
|
+
/** The picture above the title: a scene, a pictogram, an icon. Decorative (hidden from assistive technology): the title says it all. */
|
|
11
|
+
illustration?: ReactNode;
|
|
12
|
+
/** What happened, and the dialog's accessible name. */
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
/** The line under the title. It sits in a `<p>`: phrasing content only. */
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
/** A button or a link under the text. A click on it dismisses the Moment after its own handler, unless that handler calls `event.preventDefault()`. */
|
|
17
|
+
action?: ReactNode;
|
|
18
|
+
/** The colour of the meaning: one of the library's tones, or an app's own. Unset: `neutral`. */
|
|
19
|
+
tone?: Tone;
|
|
20
|
+
/** Accessible name of the close button (translated by default). */
|
|
21
|
+
closeLabel?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A transient full-screen announcement for a dramatic one-off event (a
|
|
26
|
+
* player is eliminated, a role is revealed). It is a modal dialog named by
|
|
27
|
+
* its title and described by its description, so a screen reader announces
|
|
28
|
+
* it as it opens; focus moves into it and goes back to the element that had
|
|
29
|
+
* it when it closes. Escape, a tap anywhere, the close button and the
|
|
30
|
+
* `action` dismiss it, and so does `duration`. It fades in and its picture
|
|
31
|
+
* pops in, none of it under `prefers-reduced-motion`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function Moment({ open, onOpenChange, duration, illustration, title, description, action, tone, closeLabel, className, }: MomentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMaterialTranslation } from '../../../../i18n/use-material-translation.js';
|
|
2
|
+
import { ArrayError, useRefusedFocus } from './choice-list-focus.js';
|
|
3
|
+
import { defaultRowLabel } from './choice-list-names.js';
|
|
4
|
+
import { ChoiceListFieldProps, ChoiceRow } from './types.js';
|
|
5
|
+
export type ChoiceListControlProps = Pick<ChoiceListFieldProps, 'min' | 'rowLabel' | 'disabled' | 'onChange'> & {
|
|
6
|
+
selection: NonNullable<ChoiceListFieldProps['selection']>;
|
|
7
|
+
rows: ChoiceRow[];
|
|
8
|
+
error: ArrayError | undefined;
|
|
9
|
+
focus: ReturnType<typeof useRefusedFocus>;
|
|
10
|
+
/** Sets the ids without dirtying the form; absent, they go through `onChange`. */
|
|
11
|
+
setIds?: (next: ChoiceRow[]) => void;
|
|
12
|
+
t: ReturnType<typeof useMaterialTranslation>['t'];
|
|
13
|
+
label: ReturnType<typeof defaultRowLabel>;
|
|
14
|
+
props: Omit<ChoiceListFieldProps, 'value' | 'onChange' | 'onAssignIds' | 'error' | 'rowErrors' | 'onBlur'>;
|
|
15
|
+
};
|
|
16
|
+
/** The list itself, with the group and per-row errors of the field. */
|
|
17
|
+
export declare function ChoiceListControl({ rows, error, focus, setIds, onChange, t, label, min, selection, rowLabel, disabled, props, }: ChoiceListControlProps): import("react").JSX.Element;
|
|
@@ -37,6 +37,13 @@ export declare function refusedFocus(handle: FocusHandle, read: {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare function useRefusedFocus(error: () => ArrayError | undefined, blank: () => string): {
|
|
39
39
|
rows: RefObject<readonly ChoiceRow[]>;
|
|
40
|
+
list: RefObject<Element | null>;
|
|
40
41
|
listRef: (node: Element | null) => void;
|
|
41
42
|
through: (fieldRef: RefCallback<unknown>) => RefCallback<unknown>;
|
|
42
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* The handle React Hook Form gets as the `ref` of a row path
|
|
46
|
+
* (`choices.<i>.text`): `setFocus` and `setError(…, { shouldFocus })` on that
|
|
47
|
+
* path call its `focus()`, which goes to the row's text input.
|
|
48
|
+
*/
|
|
49
|
+
export declare function rowFocus(list: RefObject<Element | null>, position: number): FocusHandle;
|