@nxgt/material 3.49.0 → 3.50.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 +22 -0
- package/README.md +1 -1
- package/dist/{async-slice-DlvKCKAa.js → async-slice-3loEtzUY.js} +2 -2
- package/dist/{button-DJgaQbBD.js → button-BRUaHD8z.js} +45 -76
- package/dist/charts.js +3 -3
- package/dist/{chip-DN44R1vW.js → chip-DneTrtNj.js} +3 -3
- package/dist/{code-editor-BJ9ewxSC.js → code-editor-R_nPN_-d.js} +6 -6
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-BJE3VuQg.js → code-language-items-BKEUhQlF.js} +2 -2
- package/dist/{components-AtBccCir.js → components-D6xFLcoE.js} +11464 -11348
- package/dist/components.js +26 -27
- package/dist/{dialog-ODql4vH7.js → dialog-S7dLsYRZ.js} +7 -7
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-DRXYP9ta.js → dropdown-menu-XLlxfDgq.js} +25 -26
- package/dist/editor.js +9 -9
- package/dist/{empty-state-C9QqvBU1.js → empty-state-Dsf6R-Zo.js} +2 -2
- package/dist/{escape-owner-DCrlERLM.js → escape-owner-B9eCwjLw.js} +1 -1
- package/dist/{field-blur-DYGyIdfD.js → field-blur-5uRDFHvB.js} +1 -1
- package/dist/{field-blur-context-B-fSpl1H.js → field-blur-context-Cwt4TuBq.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-EO_CckIx.js → hover-card-PHUgRSjJ.js} +14 -14
- package/dist/{i18n-provider-C0fB0sEL.js → i18n-provider-DPM_ALQ4.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-BQYj_LE6.js → icon-badge-Dh6-FNOF.js} +3 -3
- package/dist/{icon-button-B481L2TP.js → icon-button-DSC2-IAG.js} +119 -87
- package/dist/lib/components/ui/actions/icon-button/icon-button-busy.d.ts +22 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +2 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +7 -0
- package/dist/lib/components/ui/collections/filter/bar/partials/filter-quick-toggle.d.ts +3 -2
- package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +7 -1
- package/dist/lib/components/ui/collections/page-footer/page-footer.d.ts +6 -1
- package/dist/lib/components/ui/collections/row-menu/row-menu-trigger.d.ts +5 -2
- package/dist/lib/components/ui/collections/server-table/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-chips.d.ts +5 -3
- package/dist/lib/components/ui/collections/server-table/types-paging.d.ts +17 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -10
- package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-body.d.ts +5 -3
- package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-request-error.d.ts +15 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/step-up-dialog.d.ts +6 -3
- package/dist/lib/components/ui/feedback/step-up-dialog/types.d.ts +12 -1
- package/dist/lib/components/ui/feedback/step-up-dialog/use-retry-focus.d.ts +27 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/use-retry.d.ts +11 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/verification-code/use-settled-focus.d.ts +10 -0
- package/dist/lib/i18n/resources/en/en.d.ts +1 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +2 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +1 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +2 -1
- package/dist/lib/i18n/resources/resources.d.ts +2 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +43 -44
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-CZBz4JVu.js → public-vxiijIJF.js} +20 -20
- package/dist/{rich-code-block-597e0_Qm.js → rich-code-block-BwvCXPqq.js} +5 -5
- package/dist/{sortable-provider-CK_xAk2H.js → sortable-provider-D2pAFWQB.js} +2 -2
- package/dist/{dist-B61_o9Mg.js → spinner-BpVwI1ps.js} +478 -256
- package/dist/{stored-language-IaL1Ftn_.js → stored-language-Beyj2ult.js} +4 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-Dnjn83TJ.js → theme-toggle-BTYRPkP4.js} +1 -1
- package/dist/{toolbar-items-CCwIu7fE.js → toolbar-items-CIMo4F9q.js} +106 -106
- package/dist/{translate-material-v9u-e7Kd.js → translate-material-DEUlaL_1.js} +2 -2
- package/dist/{translator-Dk4_qE6U.js → translator-CBgIb3zP.js} +1 -1
- package/dist/{use-chat-composer-Ot5XUbdn.js → use-chat-composer-D8UAsX0f.js} +4881 -4882
- package/dist/{button-tones-BwuVvAmd.js → use-click-lock-BZYtTmVt.js} +37 -7
- package/dist/{use-heading-spy-DjKixjLm.js → use-heading-spy-C5LXtA8Z.js} +1 -1
- package/dist/{use-material-translation-DOkTaWK_.js → use-material-translation-DWWeeg-B.js} +2 -2
- package/docs/components/buttons-and-actions.md +2 -1
- package/docs/components/data-table-filter-and-lists.md +29 -9
- package/docs/components/feedback-and-status.md +22 -3
- package/docs/components/form-fields.md +7 -0
- package/docs/guides/server-lists-url.md +3 -2
- package/package.json +1 -1
- package/dist/spinner-BhuZuHK1.js +0 -229
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { StepUpDialogProps } from '../types.js';
|
|
3
|
-
|
|
3
|
+
import { StepUpRequestError } from './step-up-request-error.js';
|
|
4
|
+
type Props = Pick<StepUpDialogProps, 'via' | 'requestError' | 'confirming' | 'attemptsLeft' | 'locked' | 'error' | 'retryAfter' | 'pending' | 'onSubmit' | 'onResend' | 'resent' | 'length' | 'allowRecovery' | 'autoFocus' | 'icons'> & {
|
|
4
5
|
formId: string;
|
|
5
6
|
labels: NonNullable<StepUpDialogProps['labels']>;
|
|
6
7
|
/** What is said instead of the field (requesting, confirming). */
|
|
7
8
|
statusText: ReactNode;
|
|
9
|
+
retry: Omit<ComponentProps<typeof StepUpRequestError>, 'requestError'>;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* What sits between the title and the footer: the code form, or, when it is
|
|
11
13
|
* not there (a code still being requested, a request that failed, an
|
|
12
14
|
* accepted code), the status line or the alert that replaces it.
|
|
13
15
|
*/
|
|
14
|
-
export declare function StepUpBody({ via, requestError, confirming, formId, labels, statusText, icons, ...code }: Props): import("react").JSX.Element;
|
|
16
|
+
export declare function StepUpBody({ via, requestError, confirming, formId, labels, statusText, icons, retry, ...code }: Props): import("react").JSX.Element;
|
|
15
17
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FocusEvent, ReactNode, RefObject } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
requestError: ReactNode;
|
|
4
|
+
/** The "Retry" button is drawn only with a handler. */
|
|
5
|
+
onRetry?: () => void;
|
|
6
|
+
retryLabel: string;
|
|
7
|
+
retrying: boolean;
|
|
8
|
+
/** Retries that finished: a new key tells the live region again, even for the same text. */
|
|
9
|
+
settled: number;
|
|
10
|
+
retryRef: RefObject<HTMLButtonElement | null>;
|
|
11
|
+
onRetryBlur: (event: FocusEvent) => void;
|
|
12
|
+
};
|
|
13
|
+
/** The alert that replaces the field when the code could not be requested, with "Retry" when the host offers it. */
|
|
14
|
+
export declare function StepUpRequestError({ requestError, onRetry, retryLabel, retrying, settled, retryRef, onRetryBlur, }: Props): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -7,10 +7,13 @@ import { StepUpDialogProps } from './types.js';
|
|
|
7
7
|
* `error`, `pending`, `resent`, `onSubmit`, `onResend`), which the app
|
|
8
8
|
* wires to its own model.
|
|
9
9
|
*
|
|
10
|
-
* The title takes the focus on open
|
|
10
|
+
* The title takes the focus on open (unless `autoFocus` sends it to the
|
|
11
|
+
* field) and whenever the field goes (a code
|
|
11
12
|
* being requested, a code accepted); the field takes it after a refusal; on
|
|
12
13
|
* close it goes back to what opened the dialog. Escape, a click outside and
|
|
13
14
|
* Cancel call `onCancel`, except while `confirming`. A locked code leaves
|
|
14
|
-
* Cancel usable.
|
|
15
|
+
* Cancel usable. A failed code request (`requestError`) offers "Retry" when
|
|
16
|
+
* `onRetry` is set: the focus stays on it while it runs and goes to the
|
|
17
|
+
* field once the request succeeds.
|
|
15
18
|
*/
|
|
16
|
-
export declare function StepUpDialog({ open, onCancel, cancelVariant, via, destination, requestError, confirming, confirmedLabel, title, description, labels: labelOverrides, icons, ...code }: StepUpDialogProps): import("react").JSX.Element;
|
|
19
|
+
export declare function StepUpDialog({ open, onCancel, cancelVariant, via, destination, requestError, onRetry, confirming, confirmedLabel, title, description, labels: labelOverrides, icons, ...code }: StepUpDialogProps): import("react").JSX.Element;
|
|
@@ -19,8 +19,10 @@ export type StepUpDialogLabels = {
|
|
|
19
19
|
cancel: string;
|
|
20
20
|
/** Said once the code was accepted and the host finishes its action. */
|
|
21
21
|
confirmed: string;
|
|
22
|
+
/** The "Retry" button of a failed code request (see `onRetry`). */
|
|
23
|
+
retry: string;
|
|
22
24
|
};
|
|
23
|
-
export type StepUpDialogProps = Pick<VerificationCodeProps, 'attemptsLeft' | 'locked' | 'error' | 'retryAfter' | 'pending' | 'onSubmit' | 'onResend' | 'resent' | 'length' | 'allowRecovery'> & {
|
|
25
|
+
export type StepUpDialogProps = Pick<VerificationCodeProps, 'attemptsLeft' | 'locked' | 'error' | 'retryAfter' | 'pending' | 'onSubmit' | 'onResend' | 'resent' | 'length' | 'allowRecovery' | 'autoFocus'> & {
|
|
24
26
|
open: boolean;
|
|
25
27
|
/**
|
|
26
28
|
* Escape, a click outside and Cancel call it, except while `confirming`.
|
|
@@ -38,6 +40,15 @@ export type StepUpDialogProps = Pick<VerificationCodeProps, 'attemptsLeft' | 'lo
|
|
|
38
40
|
destination?: ReactNode;
|
|
39
41
|
/** The request for a code failed; shown as an alert in place of the field. */
|
|
40
42
|
requestError?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Draws a "Retry" button in the `requestError` alert. Pressing it calls
|
|
45
|
+
* this; while the returned promise is pending the button is busy and keeps
|
|
46
|
+
* the focus. Answer by clearing `requestError` and setting `via` (the code
|
|
47
|
+
* field takes the focus) or by setting a new `requestError` (the focus
|
|
48
|
+
* stays on "Retry" and the new text is announced). Left out, the alert
|
|
49
|
+
* has no button.
|
|
50
|
+
*/
|
|
51
|
+
onRetry?: () => unknown;
|
|
41
52
|
/**
|
|
42
53
|
* The code was accepted and the host re-runs its action: the field goes,
|
|
43
54
|
* a status line shows `labels.confirmed` and Cancel is disabled until the
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
type Input = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
fieldShown: boolean;
|
|
5
|
+
requestError: unknown;
|
|
6
|
+
confirming: boolean;
|
|
7
|
+
formId: string;
|
|
8
|
+
titleRef: RefObject<HTMLElement | null>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Where the focus goes around a "Retry": it stays on the button while the
|
|
12
|
+
* retry runs and when the request fails again (the button may be taken away
|
|
13
|
+
* and put back by the host meanwhile, the title holding the focus in the
|
|
14
|
+
* gap), and goes to the code field once the request succeeds. Only after a
|
|
15
|
+
* press of "Retry", and only while the focus is still free (the page, the
|
|
16
|
+
* dialog itself, the title or the button): a focus the user moved elsewhere is left alone.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useRetryFocus({ open, fieldShown, requestError, confirming, formId, titleRef, }: Input): {
|
|
19
|
+
retryRef: RefObject<HTMLButtonElement | null>;
|
|
20
|
+
/** On "Retry": the focus it holds is followed from here on. */
|
|
21
|
+
arm: () => void;
|
|
22
|
+
/** On the button's blur: a focus that went to another control is not ours any more. */
|
|
23
|
+
release: (event: {
|
|
24
|
+
relatedTarget: EventTarget | null;
|
|
25
|
+
}) => void;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The retry of a failed code request: `run` calls the host's `onRetry` and
|
|
3
|
+
* stays `retrying` until what it returned settles (a thrown or rejected
|
|
4
|
+
* retry is the host's to show as a new `requestError`). `settled` counts the
|
|
5
|
+
* retries that finished, so the alert is told again, even for the same text.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useRetry(onRetry: (() => unknown) | undefined): {
|
|
8
|
+
retrying: boolean;
|
|
9
|
+
settled: number;
|
|
10
|
+
run: () => Promise<void>;
|
|
11
|
+
};
|