@nxgt/material 3.36.0 → 3.38.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 +33 -0
- package/README.md +1 -1
- package/dist/{async-slice-BNI_F0jz.js → async-slice-DqjtOYlO.js} +2 -2
- package/dist/{button-EMWOFSDB.js → button-D52ron-a.js} +3 -2
- package/dist/charts.js +3 -3
- package/dist/{chip-B6m3yagf.js → chip-0XYwSp9o.js} +1 -1
- package/dist/{code-editor-BdiufnpC.js → code-editor-BetIXpJ6.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-v5Rnq425.js → code-language-items-C7prxl_7.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-C0WjV2oy.js → components-NoCZ44Ri.js} +15551 -15316
- package/dist/components.js +24 -24
- package/dist/{dialog-DR9rACzY.js → dialog-BCsT_aLo.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CpSnRXd-.js → dropdown-menu-Crt5QvTr.js} +1 -1
- package/dist/editor.js +908 -909
- package/dist/{empty-state-DMr94lsF.js → empty-state-DFWq2CWB.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-A4mI4vc1.js → i18n-provider-C0RBM8rH.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-DXEBeS1y.js → icon-badge-XBoBIt_R.js} +1 -1
- package/dist/lib/components/ui/actions/button/button.d.ts +8 -0
- package/dist/lib/components/ui/collections/data-table/data-table-list-slots.d.ts +12 -0
- package/dist/lib/components/ui/collections/data-table/hooks.d.ts +6 -1
- 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/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/facets/partials/filter-facets-footer.d.ts +4 -1
- package/dist/lib/components/ui/collections/filter/facets/partials/filter-facets-panel.d.ts +3 -1
- package/dist/lib/components/ui/collections/filter/filter-presets.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/internal.d.ts +1 -0
- package/dist/lib/components/ui/collections/filter/query/types.d.ts +13 -0
- package/dist/lib/components/ui/collections/filter/sections/sheet/filter-sheet-footer.d.ts +3 -1
- package/dist/lib/components/ui/collections/filter/sections/sheet/filter-sheet.d.ts +3 -1
- package/dist/lib/components/ui/collections/filter/types-props.d.ts +3 -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/feedback/confirm-dialog/confirm-dialog.d.ts +7 -1
- package/dist/lib/components/ui/feedback/confirmation-dialog/confirmation-dialog.d.ts +7 -1
- package/dist/lib/components/ui/fields/attributes/attribute-dialog.d.ts +4 -1
- package/dist/lib/components/ui/fields/attributes/attributes-field/attributes-dialog-field.d.ts +4 -1
- package/dist/lib/components/ui/fields/attributes/attributes-field/attributes-inline-field.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/contact-dialog.d.ts +4 -1
- package/dist/lib/components/ui/fields/contacts/contacts-dialog-form-field.d.ts +4 -1
- package/dist/lib/components/ui/fields/contacts/contacts-form-field.d.ts +4 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/opening-hours/opening-hours-dialog-form-field.d.ts +4 -1
- package/dist/lib/components/ui/fields/opening-hours/opening-hours-dialog.d.ts +4 -1
- package/dist/lib/components/ui/fields/opening-hours/opening-hours-form-field.d.ts +4 -1
- package/dist/lib/components/ui/fields/postal-address/postal-address-dialog.d.ts +4 -1
- package/dist/lib/components/ui/fields/postal-address/postal-address-form-field.d.ts +4 -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/media/image-cropper/image-cropper.d.ts +4 -1
- 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/components/ui/widgets/rich-text-editor/types.d.ts +3 -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 +41 -41
- 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-f9CBkMZP.js → public-CWIpzLzO.js} +6 -6
- package/dist/{rich-code-block-Bwhfhu7J.js → rich-code-block-C4aBv4cA.js} +4 -4
- package/dist/{sortable-provider-BshacF8v.js → sortable-provider-0uBi0zcP.js} +3 -2
- package/dist/{spinner-CKlDba5I.js → spinner-CuxEwO0d.js} +1 -1
- package/dist/{stored-language-CfQGHLq9.js → stored-language-D8aemZhx.js} +4 -2
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle--Zcf5AM8.js → theme-toggle-ik5nV1P5.js} +1 -1
- package/dist/{toolbar-items-B1W-uVHS.js → toolbar-items-C97E5HRa.js} +2 -2
- package/dist/{translate-material-xDh10aWZ.js → translate-material-B84ufMSF.js} +2 -2
- package/dist/{translator-BbOZntEF.js → translator-Bq8UHmvu.js} +1 -1
- package/dist/{use-chat-composer-C5g_Va_g.js → use-chat-composer-DmDcEGp4.js} +2317 -2190
- package/dist/{use-heading-spy-DXYCeegh.js → use-heading-spy-BgG7Q47k.js} +1 -1
- package/dist/{use-material-translation-BK2YYCY3.js → use-material-translation-CiYhVc39.js} +2 -2
- package/docs/components/buttons-and-actions.md +19 -1
- package/docs/components/data-table-filter-and-lists.md +65 -3
- package/docs/components/feedback-and-status.md +3 -1
- package/docs/components/form-fields.md +10 -4
- package/docs/components/media-and-files.md +1 -0
- package/docs/components/navigation-and-layout.md +4 -2
- package/docs/components/primitives.md +1 -1
- package/docs/components/rich-widgets.md +2 -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/i18n.md +1 -1
- package/docs/roadmap.md +5 -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 +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
2
|
+
import { t } from "./use-material-translation-CiYhVc39.js";
|
|
3
3
|
import { i as n } from "./escape-owner-C4W_sOAU.js";
|
|
4
4
|
import { a as r, c as i, i as a, n as o, o as s, r as c, t as l, u } from "./state-scenes-BX03WmSu.js";
|
|
5
5
|
import { AlertCircle as d, Construction as f, FileQuestion as p, PackageOpen as m, Search as h, ShieldAlert as g, WifiOff as _ } from "lucide-react";
|
package/dist/hooks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as e } from "./i18n-provider-
|
|
1
|
+
import { r as e } from "./i18n-provider-C0RBM8rH.js";
|
|
2
2
|
import { a as t, i as n, o as r, r as i, s as a } from "./theme-store-CSl51uNH.js";
|
|
3
3
|
import { n as o, t as s } from "./use-theme-DMcyJ52N.js";
|
|
4
4
|
import { t as c } from "./number.utils-BG_eEt5g.js";
|
|
5
|
-
import { n as l, r as u, t as d } from "./use-heading-spy-
|
|
5
|
+
import { n as l, r as u, t as d } from "./use-heading-spy-BgG7Q47k.js";
|
|
6
6
|
import { r as f } from "./use-csp-nonce-ZKs9k-ov.js";
|
|
7
7
|
import { t as p } from "./use-mobile-BDro060N.js";
|
|
8
8
|
import { t as m } from "./use-scroll-away-PQRFZkT2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "./stored-language-
|
|
1
|
+
import { i as e, r as t, t as n } from "./stored-language-D8aemZhx.js";
|
|
2
2
|
import { createContext as r, useCallback as i, useContext as a, useMemo as o, useState as s } from "react";
|
|
3
3
|
import { jsx as c } from "react/jsx-runtime";
|
|
4
4
|
//#region lib/i18n/i18n-provider.tsx
|
package/dist/i18n.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./is-production-GLw59WU8.js";
|
|
2
|
-
import { a as t, i as n, n as r, r as i } from "./stored-language-
|
|
3
|
-
import { n as a, r as o, t as s } from "./i18n-provider-
|
|
4
|
-
import { i as c, n as l, o as u, r as d, t as f } from "./translator-
|
|
2
|
+
import { a as t, i as n, n as r, r as i } from "./stored-language-D8aemZhx.js";
|
|
3
|
+
import { n as a, r as o, t as s } from "./i18n-provider-C0RBM8rH.js";
|
|
4
|
+
import { i as c, n as l, o as u, r as d, t as f } from "./translator-Bq8UHmvu.js";
|
|
5
5
|
import { o as p, t as m } from "./merge-BCZE6HGq.js";
|
|
6
|
-
import { t as h } from "./translate-material-
|
|
7
|
-
import { t as g } from "./use-material-translation-
|
|
6
|
+
import { t as h } from "./translate-material-B84ufMSF.js";
|
|
7
|
+
import { t as g } from "./use-material-translation-CiYhVc39.js";
|
|
8
8
|
import { useCallback as _ } from "react";
|
|
9
9
|
//#region lib/i18n/merge-resources.ts
|
|
10
10
|
function v(e, t, n = "") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { f as t } from "./dialog-
|
|
2
|
+
import { f as t } from "./dialog-BCsT_aLo.js";
|
|
3
3
|
import { a as n, i as r, n as i } from "./field-blur-context-Cft9s7Hg.js";
|
|
4
4
|
import { t as a } from "./icon-button-CN9r5TNE.js";
|
|
5
5
|
import { isValidElement as o, useId as s } from "react";
|
|
@@ -41,5 +41,13 @@ export type ButtonProps = ComponentProps<'button'> & ButtonVariants & {
|
|
|
41
41
|
tooltip?: string;
|
|
42
42
|
};
|
|
43
43
|
export declare function Button({ tooltip, ...props }: ButtonProps): import("react").JSX.Element;
|
|
44
|
+
/** One `variant` of `Button`: `filled`, `tonal`, `outlined`, `ghost` or `link`. */
|
|
45
|
+
export type ButtonVariant = NonNullable<ButtonVariants['variant']>;
|
|
46
|
+
/**
|
|
47
|
+
* The variant of the Cancel / Close button a component draws in its footer:
|
|
48
|
+
* `tonal`, under a filled Confirm. The components that draw one take a
|
|
49
|
+
* `cancelVariant` prop to restore another look (`'outlined'`, `'ghost'`).
|
|
50
|
+
*/
|
|
51
|
+
export declare const DEFAULT_CANCEL_VARIANT: ButtonVariant;
|
|
44
52
|
export type { ButtonVariants };
|
|
45
53
|
export { buttonVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a phone's list bar goes when the page that hosts the list has a row
|
|
3
|
+
* of its own for it (`ServerTable`'s two-row header, #1719): the start group
|
|
4
|
+
* ("Select all", or the count and "Clear selection") and the sort, each an
|
|
5
|
+
* element the host renders. Without it, or from 768px, the list bar stays
|
|
6
|
+
* above the list.
|
|
7
|
+
*/
|
|
8
|
+
export type DataTableListSlots = {
|
|
9
|
+
start: HTMLElement;
|
|
10
|
+
sort: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
export declare const DataTableListSlotsContext: import('react').Context<DataTableListSlots | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Row, RowData } from '@tanstack/react-table';
|
|
2
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
2
3
|
import { DataTableFeatures } from './features.js';
|
|
3
4
|
export declare function useColumnHelpers<T extends RowData>(): {
|
|
4
5
|
columnHelper: import('@tanstack/table-core').ColumnHelper<{
|
|
@@ -65,7 +66,11 @@ export type DeleteRowsHandler<T extends RowData> = (rows: Row<DataTableFeatures,
|
|
|
65
66
|
* {confirmDialog}
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
|
-
export declare function useDeleteRowsHandler<T extends RowData>(onDelete?: (rows: T[]) => void
|
|
69
|
+
export declare function useDeleteRowsHandler<T extends RowData>(onDelete?: (rows: T[]) => void,
|
|
70
|
+
/** `cancelVariant`: the Cancel button's variant, default `'tonal'`. */
|
|
71
|
+
options?: {
|
|
72
|
+
cancelVariant?: ButtonVariant;
|
|
73
|
+
}): {
|
|
69
74
|
handleDelete: DeleteRowsHandler<T>;
|
|
70
75
|
confirmDialog: import("react").JSX.Element;
|
|
71
76
|
};
|
package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { RefObject } from 'react';
|
|
2
3
|
import { DataTableTable } from '../../types.js';
|
|
3
4
|
/** Whether the table has a `select` column ("Select all on this page"). */
|
|
4
5
|
export declare const isSelectable: <TData extends RowData>(table: DataTableTable<TData>) => boolean;
|
|
@@ -14,7 +15,16 @@ export declare const hasListBar: <TData extends RowData>(table: DataTableTable<T
|
|
|
14
15
|
* named and with a tooltip) and the sort, on one row. It keeps its height
|
|
15
16
|
* whatever the selection, so nothing moves; the bulk bar (`actions`) stays in
|
|
16
17
|
* the toolbar above, as for the table.
|
|
18
|
+
*
|
|
19
|
+
* Below 768px, when the host gives the list a row of its own
|
|
20
|
+
* (`DataTableListSlotsContext`: `ServerTable`'s second header row, beside
|
|
21
|
+
* "Filters"), the bar is not drawn above the list: its start group goes to
|
|
22
|
+
* the host's start slot, with a short visible "Select all" label that the
|
|
23
|
+
* count replaces in place while rows are selected, and the sort to its sort
|
|
24
|
+
* slot (#1719). The names and the behaviour are the same.
|
|
17
25
|
*/
|
|
18
|
-
export declare function DataTableListBar<TData extends RowData>({ table, }: {
|
|
26
|
+
export declare function DataTableListBar<TData extends RowData>({ table, rootRef, }: {
|
|
19
27
|
table: DataTableTable<TData>;
|
|
28
|
+
/** The list's root, where the focus goes once "Clear selection" is gone. */
|
|
29
|
+
rootRef?: RefObject<HTMLElement | null>;
|
|
20
30
|
}): import("react").JSX.Element;
|
|
@@ -14,12 +14,20 @@ export declare const SELECT_CHECKBOX_CLASS = "relative before:absolute before:to
|
|
|
14
14
|
* cell's start, with 8px after the label, which keeps the next column's
|
|
15
15
|
* control clear and the rows' boxes 44px apart). */
|
|
16
16
|
export declare const SELECT_CHECKBOX_LABEL_CLASS = "ms-2 me-3 flex w-fit items-center justify-center pointer-coarse:size-11 pointer-coarse:-ms-1 pointer-coarse:me-2 pointer-coarse:-my-2";
|
|
17
|
+
/** The same label with its text beside the box (`SelectAllCheckbox`'s
|
|
18
|
+
* `visibleLabel`): on a coarse pointer it is as tall and at least as wide as
|
|
19
|
+
* the 44px box, the text inside it, so a tap on the words toggles the box. */
|
|
20
|
+
export declare const SELECT_CHECKBOX_LABELLED_CLASS = "ms-2 me-3 flex w-fit items-center gap-2 pointer-coarse:min-h-11 pointer-coarse:min-w-11 pointer-coarse:-ms-1 pointer-coarse:me-2 pointer-coarse:-my-2 pointer-coarse:ps-3.5 pointer-coarse:pe-2";
|
|
17
21
|
/** The `select` column's header: disabled while the table loads, when the
|
|
18
22
|
* rows it would select are inert, and when no row on the page can be
|
|
19
23
|
* selected (`enableRowSelection`). Its state counts only selectable rows. */
|
|
20
|
-
export declare function SelectAllCheckbox<T extends RowData>({ table, label, }: {
|
|
24
|
+
export declare function SelectAllCheckbox<T extends RowData>({ table, label, visibleLabel, }: {
|
|
21
25
|
table: Table<DataTableFeatures, T>;
|
|
26
|
+
/** The box's name (`aria-label`). */
|
|
22
27
|
label: string;
|
|
28
|
+
/** A short text beside the box, inside its `<label>` ("Select all"); the
|
|
29
|
+
* name stays `label`, which contains it. Without it the box has none. */
|
|
30
|
+
visibleLabel?: string;
|
|
23
31
|
}): import("react").JSX.Element;
|
|
24
32
|
/** A row's `select` checkbox. A row that cannot be selected
|
|
25
33
|
* (`enableRowSelection`) has one of three boxes:
|
|
@@ -7,4 +7,4 @@ import { FilterViewProps } from '../query/types.js';
|
|
|
7
7
|
* CSS from the first paint). The live region tells the count; `/` and `F`
|
|
8
8
|
* are its shortcuts (`F` opens the sheet on a phone).
|
|
9
9
|
*/
|
|
10
|
-
export declare function FilterBarView({ label, searchLabel, searchPlaceholder, className, detachedChips, sheetTrigger, bandDensity, }: FilterViewProps): import("react").JSX.Element;
|
|
10
|
+
export declare function FilterBarView({ label, searchLabel, searchPlaceholder, className, detachedChips, sheetTrigger, bandDensity, cancelVariant, }: FilterViewProps): import("react").JSX.Element;
|
|
@@ -6,4 +6,4 @@ import { FilterViewProps } from '../query/types.js';
|
|
|
6
6
|
* (N)", which opens the same sheet with the same facets (mounted there
|
|
7
7
|
* only; the server renders the panel, which a phone unmounts once hydrated). One live region, the bar's.
|
|
8
8
|
*/
|
|
9
|
-
export declare function FilterFacets({ label, searchLabel, searchPlaceholder, className, }: FilterViewProps): import("react").JSX.Element;
|
|
9
|
+
export declare function FilterFacets({ label, searchLabel, searchPlaceholder, className, cancelVariant, }: FilterViewProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonVariant } from '../../../../actions/button/button.js';
|
|
1
2
|
/**
|
|
2
3
|
* `apply="staged"`: Reset drops the panel's edits, Apply hands them to the
|
|
3
4
|
* page at once; the focus stays on the button, and the live region tells
|
|
@@ -5,4 +6,6 @@
|
|
|
5
6
|
* focusable, and dimmed) while nothing changed; once something did,
|
|
6
7
|
* "Changes not applied" starts their row and describes Apply.
|
|
7
8
|
*/
|
|
8
|
-
export declare function FilterFacetsFooter(
|
|
9
|
+
export declare function FilterFacetsFooter({ cancelVariant, }: {
|
|
10
|
+
cancelVariant?: ButtonVariant;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FilterModelField } from '@nxgt/material-core/filter';
|
|
2
|
+
import { ButtonVariant } from '../../../../actions/button/button.js';
|
|
2
3
|
/**
|
|
3
4
|
* The wide panel, from 768px: its title and "Clear all", the page's locked
|
|
4
5
|
* filters, a removable chip for each condition on a field it has no section
|
|
@@ -6,6 +7,7 @@ import { FilterModelField } from '@nxgt/material-core/filter';
|
|
|
6
7
|
* section per field (the sheet's, in its order), and with `apply="staged"`
|
|
7
8
|
* Reset and Apply.
|
|
8
9
|
*/
|
|
9
|
-
export declare function FilterFacetsPanel({ sections, }: {
|
|
10
|
+
export declare function FilterFacetsPanel({ sections, cancelVariant, }: {
|
|
10
11
|
sections: readonly FilterModelField[];
|
|
12
|
+
cancelVariant?: ButtonVariant;
|
|
11
13
|
}): import("react").JSX.Element;
|
|
@@ -5,4 +5,4 @@ import { FilterPresetsProps } from './types.js';
|
|
|
5
5
|
* @deprecated Saved views are planned as `ViewTabs` over the filter bar (see
|
|
6
6
|
* the roadmap). Will be removed in a future major.
|
|
7
7
|
*/
|
|
8
|
-
export declare function FilterPresets({ presets, currentPresetId, onLoad, onSave, onDelete, onSetDefault, maxPresets, disabled, className, }: FilterPresetsProps): import("react").JSX.Element;
|
|
8
|
+
export declare function FilterPresets({ presets, currentPresetId, onLoad, onSave, onDelete, onSetDefault, maxPresets, disabled, className, cancelVariant, }: FilterPresetsProps): import("react").JSX.Element;
|
|
@@ -15,3 +15,4 @@ export { FILTER_BAND_COMPACT_CLASS, FILTER_BAND_SURFACE_COMPACT_CLASS, } from '.
|
|
|
15
15
|
export { FilterFormError } from './sections/filter-form-error.js';
|
|
16
16
|
export { FILTER_GAP_CLASS } from './sections/filter-sections-classes.js';
|
|
17
17
|
export { FilterSheetScope } from './sections/sheet/filter-sheet-scope.js';
|
|
18
|
+
export { FilterSheetTrigger } from './sections/sheet/filter-sheet-trigger.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FilterApply, FilterCountsOption, FilterDefaults, FilterFieldErrors, FilterLockedCondition, FilterModel, FilterPreviewCount, FilterQuery, FilterSearchApplyMode, FilterShortcutsOption } from '@nxgt/material-core/filter';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { ButtonVariant } from '../../../actions/button/button.js';
|
|
3
4
|
import { FilterBarFieldProps } from '../editors/custom-types.js';
|
|
4
5
|
/** The bar's spacing: `compact` draws small chips; every target stays 24px or more. */
|
|
5
6
|
export type FilterDensity = 'comfortable' | 'compact';
|
|
@@ -24,6 +25,12 @@ export type FilterViewProps = {
|
|
|
24
25
|
sheetTrigger?: boolean;
|
|
25
26
|
/** `'compact'`: 6px back under the bar; see `FilterQueryProps`. */
|
|
26
27
|
bandDensity?: 'comfortable' | 'compact';
|
|
28
|
+
/**
|
|
29
|
+
* The variant of the secondary button in the sheet's and the staged
|
|
30
|
+
* panel's footer ("Clear all", "Reset"). Default `'tonal'`; `'outlined'`
|
|
31
|
+
* restores the earlier look.
|
|
32
|
+
*/
|
|
33
|
+
cancelVariant?: ButtonVariant;
|
|
27
34
|
};
|
|
28
35
|
/**
|
|
29
36
|
* When the search text reaches the query: `'live'` (the default) as it is
|
|
@@ -141,6 +148,12 @@ export type FilterQueryProps = {
|
|
|
141
148
|
* `variant="bar"` only.
|
|
142
149
|
*/
|
|
143
150
|
bandDensity?: 'comfortable' | 'compact';
|
|
151
|
+
/**
|
|
152
|
+
* The variant of the secondary button in the sheet's and the staged
|
|
153
|
+
* panel's footer ("Clear all", "Reset"). Default `'tonal'`; `'outlined'`
|
|
154
|
+
* restores the earlier look.
|
|
155
|
+
*/
|
|
156
|
+
cancelVariant?: ButtonVariant;
|
|
144
157
|
/**
|
|
145
158
|
* The quick filters' fields, as dashed "+ Field" pills (a switch or a
|
|
146
159
|
* checkbox toggles); default: the fields declared `quick: true`.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonVariant } from '../../../../actions/button/button.js';
|
|
1
2
|
import { FilterSheetModel } from './use-filter-sheet.js';
|
|
2
3
|
/**
|
|
3
4
|
* The sheet's footer: "Clear all" (the conditions only, the locked ones and
|
|
@@ -5,6 +6,7 @@ import { FilterSheetModel } from './use-filter-sheet.js';
|
|
|
5
6
|
* "Show N results", busy while the count is on its way, the focus left where
|
|
6
7
|
* it is.
|
|
7
8
|
*/
|
|
8
|
-
export declare function FilterSheetFooter({ sheet }: {
|
|
9
|
+
export declare function FilterSheetFooter({ sheet, cancelVariant, }: {
|
|
9
10
|
sheet: FilterSheetModel;
|
|
11
|
+
cancelVariant?: ButtonVariant;
|
|
10
12
|
}): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonVariant } from '../../../../actions/button/button.js';
|
|
1
2
|
import { FilterSheetModel } from './use-filter-sheet.js';
|
|
2
3
|
/**
|
|
3
4
|
* The phone sheet, a bottom Drawer named "Filters", mounted below 768px
|
|
@@ -5,6 +6,7 @@ import { FilterSheetModel } from './use-filter-sheet.js';
|
|
|
5
6
|
* on its first section (or the field asked); Close, Escape, a swipe, a click
|
|
6
7
|
* outside or Back dismiss it, and the focus returns to the "Filters (N)" that opened it.
|
|
7
8
|
*/
|
|
8
|
-
export declare function FilterSheet({ sheet }: {
|
|
9
|
+
export declare function FilterSheet({ sheet, cancelVariant, }: {
|
|
9
10
|
sheet: FilterSheetModel;
|
|
11
|
+
cancelVariant?: ButtonVariant;
|
|
10
12
|
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
2
3
|
import { FilterPersistenceConfig, FilterPreset, FilterPresetConfig } from './types-persistence.js';
|
|
3
4
|
import { FilterSchema } from './types-schema.js';
|
|
4
5
|
import { FilterValues } from './types-values.js';
|
|
@@ -61,4 +62,6 @@ export type FilterPresetsProps = {
|
|
|
61
62
|
maxPresets?: number;
|
|
62
63
|
disabled?: boolean;
|
|
63
64
|
className?: string;
|
|
65
|
+
/** The save dialog's Cancel button variant. Default `'tonal'`. */
|
|
66
|
+
cancelVariant?: ButtonVariant;
|
|
64
67
|
};
|
package/dist/lib/components/ui/collections/server-table/partials/server-table-band-classes.d.ts
CHANGED
|
@@ -12,3 +12,13 @@ export { FILTER_BAND_COMPACT_CLASS as SERVER_TABLE_BAND_COMPACT_CLASS, FILTER_BA
|
|
|
12
12
|
* title that has a row of its own. An action wider than that wraps under the
|
|
13
13
|
* search, as the stacked default puts it above. */
|
|
14
14
|
export declare const SERVER_TABLE_SEARCH_INLINE_CLASS = "max-md:order-none max-md:basis-[calc(100%-3.5rem)]";
|
|
15
|
+
/** Below 768px with a list in cards or tiles (#1719): the band's second row,
|
|
16
|
+
* after the search's (both are `order-last`, the DOM order breaks the tie):
|
|
17
|
+
* the list bar's start group (the room left), then the sort, "Filters (N)"
|
|
18
|
+
* and the page's actions. */
|
|
19
|
+
export declare const SERVER_TABLE_PHONE_ROW_CLASS = "order-last flex min-w-0 basis-full items-center gap-1 md:hidden";
|
|
20
|
+
/** The row's start slot: "Select all", or the count and "Clear selection". */
|
|
21
|
+
export declare const SERVER_TABLE_PHONE_ROW_START_CLASS = "min-w-0 flex-1";
|
|
22
|
+
/** The row's end: the sort slot (`contents`, its child is the item), then
|
|
23
|
+
* "Filters (N)" and the actions. */
|
|
24
|
+
export declare const SERVER_TABLE_PHONE_ROW_END_CLASS = "flex shrink-0 items-center gap-1";
|
|
@@ -9,19 +9,30 @@ type BandProps = {
|
|
|
9
9
|
search?: ReactNode;
|
|
10
10
|
/** `'compact'`: half the room under the band (the surface's top is in the root). */
|
|
11
11
|
density?: 'comfortable' | 'compact';
|
|
12
|
+
/** Below 768px with a list in cards or tiles: the band's second row (the
|
|
13
|
+
* `actions` go into it, after the list's sort and "Filters (N)"). */
|
|
14
|
+
phoneRow?: {
|
|
15
|
+
trigger: boolean;
|
|
16
|
+
setStart: (element: HTMLElement | null) => void;
|
|
17
|
+
setSort: (element: HTMLElement | null) => void;
|
|
18
|
+
/** The selection bar's bulk actions, while rows are selected. */
|
|
19
|
+
bulk: ReactNode;
|
|
20
|
+
};
|
|
12
21
|
};
|
|
13
22
|
/** The top band: the title, then the search landmark, then the page's actions. A string title is an `<h2>`. */
|
|
14
|
-
export declare function ServerTableBand({ title, description, actions, search, density, }: BandProps): import("react").JSX.Element | null;
|
|
23
|
+
export declare function ServerTableBand({ title, description, actions, search, density, phoneRow, }: BandProps): import("react").JSX.Element | null;
|
|
15
24
|
/**
|
|
16
25
|
* One `search` landmark: the bar (the search, the quick filters, "Add
|
|
17
26
|
* filter", and "Filters (N)" on a phone), then from 768px the active filters
|
|
18
27
|
* and "Clear all" in a row under it. While the empty page lists the user's
|
|
19
28
|
* filters itself, the row keeps the locked ones only.
|
|
20
29
|
*/
|
|
21
|
-
export declare function ServerTableSearch({ filter, emptyShown, inline, }: {
|
|
30
|
+
export declare function ServerTableSearch({ filter, emptyShown, inline, phoneRow, }: {
|
|
22
31
|
filter: ServerTableFilter;
|
|
23
32
|
emptyShown: boolean;
|
|
24
33
|
/** `bandActions: 'inline'`: the landmark shares a phone's row with the actions. */
|
|
25
34
|
inline?: boolean;
|
|
35
|
+
/** The band has a second row on a phone: "Filters (N)" is in it. */
|
|
36
|
+
phoneRow?: boolean;
|
|
26
37
|
}): import("react").JSX.Element;
|
|
27
38
|
export {};
|
package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { ServerTableSelection } from '../types.js';
|
|
|
9
9
|
* rows it applies to only, tested on the rows kept for the selection (see
|
|
10
10
|
* `syncSelectedRows`), so the counts hold across pages.
|
|
11
11
|
*/
|
|
12
|
-
export declare function ServerTableBulkButtons<T extends RowData>({ actions, ids, selectedRows, selection, onFocusLost, }: {
|
|
12
|
+
export declare function ServerTableBulkButtons<T extends RowData>({ actions, ids, selectedRows, selection, onFocusLost, phone, }: {
|
|
13
13
|
actions: readonly ServerTableBulkAction<T>[];
|
|
14
14
|
/** The selected ids, of every page. */
|
|
15
15
|
ids: string[];
|
|
@@ -19,4 +19,8 @@ export declare function ServerTableBulkButtons<T extends RowData>({ actions, ids
|
|
|
19
19
|
/** Where the focus goes when the focused button disappears and no other
|
|
20
20
|
* bulk button is left (the table's select-all, else the table). */
|
|
21
21
|
onFocusLost?: () => void;
|
|
22
|
-
|
|
22
|
+
/** The phone's selection bar: the first three actions keep their icon,
|
|
23
|
+
* label and count (and wrap onto a second line when they do not fit); the
|
|
24
|
+
* others go into a "More" menu, each with its count. */
|
|
25
|
+
phone?: boolean;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { ServerTableProps } from '../types.js';
|
|
3
|
+
import { useServerTable } from '../use-server-table.js';
|
|
4
|
+
/** What `bulkActions` renders for the selected rows: the function's node, or
|
|
5
|
+
* the declarative list's buttons (on the phone's bar: three buttons, the rest in a More menu). In the table's toolbar, or in the phone's selection bar. */
|
|
6
|
+
export declare function ServerTableBulk<T extends RowData>({ props, state, phone, }: {
|
|
7
|
+
props: ServerTableProps<T>;
|
|
8
|
+
state: ReturnType<typeof useServerTable<T>>;
|
|
9
|
+
phone?: boolean;
|
|
10
|
+
}): 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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The band's second row on a phone (#1719), below the search: the list bar's
|
|
4
|
+
* start group and sort come into the two slots (`DataTableListSlots`), then
|
|
5
|
+
* "Filters (N)" (the bar's own trigger is not drawn) and the page's
|
|
6
|
+
* `actions`, whose icon buttons lose their label to its name and tooltip.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ServerTablePhoneRow({ actions, trigger, setStart, setSort, bulk, }: {
|
|
9
|
+
actions: ReactNode;
|
|
10
|
+
/** The Filters trigger: not with `filter.sheetTrigger: false`, where the app places its own. */
|
|
11
|
+
trigger: boolean;
|
|
12
|
+
setStart: (element: HTMLElement | null) => void;
|
|
13
|
+
setSort: (element: HTMLElement | null) => void;
|
|
14
|
+
/** While rows are selected: the bulk actions, which take the place of the
|
|
15
|
+
* sort, "Filters (N)" and the actions (hidden, not unmounted). */
|
|
16
|
+
bulk: ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
1
2
|
export interface ConfirmDialogProps {
|
|
2
3
|
open: boolean;
|
|
3
4
|
onOpenChange: (open: boolean) => void;
|
|
@@ -5,6 +6,11 @@ export interface ConfirmDialogProps {
|
|
|
5
6
|
description: string;
|
|
6
7
|
confirmLabel?: string;
|
|
7
8
|
cancelLabel?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The variant of the Cancel button. Default `'tonal'`; `'outlined'` or
|
|
11
|
+
* `'ghost'` restores the earlier look.
|
|
12
|
+
*/
|
|
13
|
+
cancelVariant?: ButtonVariant;
|
|
8
14
|
/**
|
|
9
15
|
* Runs when the user confirms. The dialog stays open, with its buttons
|
|
10
16
|
* disabled, until the returned promise settles. It closes on success; on
|
|
@@ -23,4 +29,4 @@ export interface ConfirmDialogProps {
|
|
|
23
29
|
*/
|
|
24
30
|
lockOnRefusal?: boolean;
|
|
25
31
|
}
|
|
26
|
-
export declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, variant, loading, confirmDisabled, lockOnRefusal, }: ConfirmDialogProps): import("react").JSX.Element;
|
|
32
|
+
export declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, cancelVariant, onConfirm, variant, loading, confirmDisabled, lockOnRefusal, }: ConfirmDialogProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DefaultValues, UseFormReturn } from 'react-hook-form';
|
|
3
3
|
import { default as z } from 'zod';
|
|
4
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
4
5
|
import { IconButtonProps } from '../../actions/icon-button/icon-button.js';
|
|
5
6
|
import { CustomDialogProps } from '../custom-dialog/custom-dialog.js';
|
|
6
7
|
/**
|
|
@@ -9,6 +10,11 @@ import { CustomDialogProps } from '../custom-dialog/custom-dialog.js';
|
|
|
9
10
|
*/
|
|
10
11
|
export type ConfirmationDialogProps<T> = {
|
|
11
12
|
cancelText?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The variant of the Cancel button. Default `'tonal'`; `'outlined'` or
|
|
15
|
+
* `'ghost'` restores the earlier look.
|
|
16
|
+
*/
|
|
17
|
+
cancelVariant?: ButtonVariant;
|
|
12
18
|
confirmText?: ReactNode;
|
|
13
19
|
/** Called with the schema's parsed output, only once the form is valid. */
|
|
14
20
|
onConfirm?: T extends z.ZodObject<any> ? (values: z.infer<T>) => void : () => void;
|
|
@@ -19,4 +25,4 @@ export type ConfirmationDialogProps<T> = {
|
|
|
19
25
|
} : never;
|
|
20
26
|
iconProps?: IconButtonProps;
|
|
21
27
|
} & Omit<CustomDialogProps, 'footer'> & Pick<IconButtonProps, 'variant' | 'color'>;
|
|
22
|
-
export declare function ConfirmationDialog<T>({ children, formOptions, open, defaultOpen, onOpenChange, cancelText, confirmText, onConfirm, variant, color, iconProps, icon, ...props }: ConfirmationDialogProps<T>): import("react").JSX.Element;
|
|
28
|
+
export declare function ConfirmationDialog<T>({ children, formOptions, open, defaultOpen, onOpenChange, cancelText, cancelVariant, confirmText, onConfirm, variant, color, iconProps, icon, ...props }: ConfirmationDialogProps<T>): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
1
2
|
import { Attribute } from './models/attribute.js';
|
|
2
3
|
export type AttributeDialogProps = {
|
|
3
4
|
open: boolean;
|
|
@@ -6,7 +7,9 @@ export type AttributeDialogProps = {
|
|
|
6
7
|
onSave: (attribute: Attribute) => void;
|
|
7
8
|
onDelete?: () => void;
|
|
8
9
|
disabled?: boolean;
|
|
10
|
+
/** The Cancel button's variant. Default `'tonal'`; `'outlined'` restores the earlier look. */
|
|
11
|
+
cancelVariant?: ButtonVariant;
|
|
9
12
|
/** The other attributes' names; the form refuses to save one of them. */
|
|
10
13
|
otherNames?: string[];
|
|
11
14
|
};
|
|
12
|
-
export declare function AttributeDialog({ open, onOpenChange, attribute, onSave, onDelete, disabled, otherNames, }: AttributeDialogProps): import("react").JSX.Element;
|
|
15
|
+
export declare function AttributeDialog({ open, onOpenChange, attribute, onSave, onDelete, disabled, otherNames, cancelVariant, }: AttributeDialogProps): import("react").JSX.Element;
|
package/dist/lib/components/ui/fields/attributes/attributes-field/attributes-dialog-field.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { ButtonVariant } from '../../../actions/button/button.js';
|
|
2
3
|
import { Attribute } from '../models/attribute.js';
|
|
3
4
|
export type AttributesDialogFieldProps = {
|
|
4
5
|
attributes?: Attribute[];
|
|
@@ -9,6 +10,8 @@ export type AttributesDialogFieldProps = {
|
|
|
9
10
|
/** Shows `helperText` as an error. */
|
|
10
11
|
error?: boolean;
|
|
11
12
|
helperText?: ReactNode;
|
|
13
|
+
/** The dialog's Cancel button variant. Default `'tonal'`; `'outlined'` restores the earlier look. */
|
|
14
|
+
cancelVariant?: ButtonVariant;
|
|
12
15
|
} & ComponentProps<'div'>;
|
|
13
16
|
/** The attributes as a list, and one dialog that edits one of them at a time. */
|
|
14
|
-
export declare function AttributesDialogField({ attributes, onChange, readonly, disabled, label, error, helperText, className, ...props }: AttributesDialogFieldProps): import("react").JSX.Element;
|
|
17
|
+
export declare function AttributesDialogField({ attributes, onChange, readonly, disabled, label, error, helperText, className, cancelVariant, ...props }: AttributesDialogFieldProps): import("react").JSX.Element;
|
package/dist/lib/components/ui/fields/attributes/attributes-field/attributes-inline-field.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ import { AttributesDialogFieldProps } from './attributes-dialog-field.js';
|
|
|
5
5
|
* changes from outside (a form `reset`), without echoing it back. A new array
|
|
6
6
|
* with the same content is not a change.
|
|
7
7
|
*/
|
|
8
|
-
export declare function AttributesInlineField({ attributes, onChange, disabled, label, error, helperText, className, readonly: _readonly, ...props }: AttributesDialogFieldProps): import("react").JSX.Element;
|
|
8
|
+
export declare function AttributesInlineField({ attributes, onChange, disabled, label, error, helperText, className, readonly: _readonly, cancelVariant: _cancelVariant, ...props }: AttributesDialogFieldProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
1
2
|
import { Contact } from './models.js';
|
|
2
3
|
export type ContactDialogProps = {
|
|
3
4
|
open: boolean;
|
|
@@ -6,5 +7,7 @@ export type ContactDialogProps = {
|
|
|
6
7
|
onSave: (contact: Contact) => void;
|
|
7
8
|
onDelete?: () => void;
|
|
8
9
|
disabled?: boolean;
|
|
10
|
+
/** The Cancel button's variant. Default `'tonal'`; `'outlined'` restores the earlier look. */
|
|
11
|
+
cancelVariant?: ButtonVariant;
|
|
9
12
|
};
|
|
10
|
-
export declare function ContactDialog({ open, onOpenChange, contact, onSave, onDelete, disabled, }: ContactDialogProps): import("react").JSX.Element;
|
|
13
|
+
export declare function ContactDialog({ open, onOpenChange, contact, onSave, onDelete, disabled, cancelVariant, }: ContactDialogProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { UseControllerProps } from 'react-hook-form';
|
|
3
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
3
4
|
export type ContactsDialogFieldProps<T extends Record<string, any>> = Pick<UseControllerProps<T>, 'control' | 'name'> & {
|
|
4
5
|
className?: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
label?: string;
|
|
8
|
+
/** The dialog's Cancel button variant. Default `'tonal'`; `'outlined'` restores the earlier look. */
|
|
9
|
+
cancelVariant?: ButtonVariant;
|
|
7
10
|
} & Omit<ComponentProps<'div'>, 'name'>;
|
|
8
11
|
/** `ContactsFormField` with `editing="dialog"`: a list, and a dialog per contact. */
|
|
9
|
-
export declare function ContactsDialogField<T extends Record<string, any>>({ control, name, className, disabled, label, ...props }: ContactsDialogFieldProps<T>): import("react").JSX.Element;
|
|
12
|
+
export declare function ContactsDialogField<T extends Record<string, any>>({ control, name, className, disabled, label, cancelVariant, ...props }: ContactsDialogFieldProps<T>): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { UseControllerProps } from 'react-hook-form';
|
|
3
|
+
import { ButtonVariant } from '../../actions/button/button.js';
|
|
3
4
|
export type ContactsFormFieldProps<T extends Record<string, any>> = Pick<UseControllerProps<T>, 'control' | 'name'> & {
|
|
4
5
|
className?: string;
|
|
5
6
|
disabled?: boolean;
|
|
@@ -12,10 +13,12 @@ export type ContactsFormFieldProps<T extends Record<string, any>> = Pick<UseCont
|
|
|
12
13
|
editing?: 'inline' | 'dialog';
|
|
13
14
|
/** `editing="inline"` only: `'list'` (default) or `'cards'`. */
|
|
14
15
|
variant?: 'list' | 'cards';
|
|
16
|
+
/** `editing="dialog"` only: the dialog's Cancel button variant. Default `'tonal'`. */
|
|
17
|
+
cancelVariant?: ButtonVariant;
|
|
15
18
|
} & Omit<ComponentProps<'div'>, 'name'>;
|
|
16
19
|
/**
|
|
17
20
|
* Contacts in a React Hook Form field (an array of `{ type, value, label?,
|
|
18
21
|
* primary? }`). Inline by default; `editing="dialog"` is today's list and
|
|
19
22
|
* dialog.
|
|
20
23
|
*/
|
|
21
|
-
export declare function ContactsFormField<T extends Record<string, any>>({ editing, variant, ...props }: ContactsFormFieldProps<T>): import("react").JSX.Element;
|
|
24
|
+
export declare function ContactsFormField<T extends Record<string, any>>({ editing, variant, cancelVariant, ...props }: ContactsFormFieldProps<T>): import("react").JSX.Element;
|