@nxgt/material 3.39.0 → 3.42.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 +18 -0
- package/README.md +4 -4
- package/dist/{async-slice-BtUexP2l.js → async-slice-Dj0tAKRI.js} +2 -2
- package/dist/{button-CCAYSsgh.js → button-CTsT_LqL.js} +1 -1
- package/dist/charts.js +1733 -1364
- package/dist/{chip-Corr637n.js → chip-DP7EyhtT.js} +1 -1
- package/dist/{code-editor-B8_ny_jT.js → code-editor-BWn0AXBf.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-1E5Qmfzb.js → code-language-items-CCRuLYpA.js} +2 -2
- package/dist/components/components.css +1 -0
- package/dist/components/ui/widgets/native-charts/native-charts-reference.css +102 -0
- package/dist/{components-CTKlqX8g.js → components-g8mWYJE8.js} +10896 -10827
- package/dist/components.js +17 -17
- package/dist/{dialog-DGlnqBbX.js → dialog-uQld1gKm.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-B-buMTGc.js → dropdown-menu-BA70o7HC.js} +1 -1
- package/dist/editor.js +529 -529
- package/dist/{empty-state-DKgPt475.js → empty-state-BzwyRX5J.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-Bc7bdIRW.js → i18n-provider-DkeMr5bw.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-BzLsPW3c.js → icon-badge-D_z5BGbc.js} +1 -1
- package/dist/lib/charts/index.d.ts +3 -1
- package/dist/lib/components/ui/collections/server-table/bulk-action-targets.d.ts +18 -0
- package/dist/lib/components/ui/collections/server-table/bulk-action.d.ts +50 -3
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +5 -3
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-focus.d.ts +31 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-more.d.ts +24 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-notice.d.ts +16 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-texts.d.ts +9 -0
- package/dist/lib/components/ui/collections/server-table/server-table.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/selection/autocomplete/autocomplete-form-field.d.ts +5 -2
- package/dist/lib/components/ui/selection/autocomplete/autocomplete-text-rules.d.ts +20 -0
- package/dist/lib/components/ui/selection/autocomplete/autocomplete.d.ts +1 -1
- package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-chip-input.d.ts +13 -0
- package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-chips.d.ts +7 -1
- package/dist/lib/components/ui/selection/autocomplete/partials/autocomplete-text-input.d.ts +15 -0
- package/dist/lib/components/ui/selection/autocomplete/types.d.ts +15 -0
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete-handlers.d.ts +10 -3
- package/dist/lib/components/ui/selection/autocomplete/use-autocomplete.d.ts +6 -1
- package/dist/lib/components/ui/selection/combobox/combobox-input.d.ts +3 -1
- package/dist/lib/components/ui/widgets/native-charts/core/point-tones.d.ts +17 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference-text.d.ts +30 -0
- package/dist/lib/components/ui/widgets/native-charts/core/reference.d.ts +45 -0
- package/dist/lib/components/ui/widgets/native-charts/core/summary.d.ts +3 -0
- package/dist/lib/components/ui/widgets/native-charts/core/table.d.ts +7 -0
- package/dist/lib/components/ui/widgets/native-charts/core/types.d.ts +25 -0
- package/dist/lib/components/ui/widgets/native-charts/hooks/chart-model-types.d.ts +18 -1
- package/dist/lib/components/ui/widgets/native-charts/hooks/model-parts.d.ts +3 -0
- package/dist/lib/components/ui/widgets/native-charts/hooks/model-series.d.ts +3 -0
- package/dist/lib/components/ui/widgets/native-charts/hooks/model-tones.d.ts +19 -0
- package/dist/lib/components/ui/widgets/native-charts/hooks/use-chart-model.d.ts +3 -3
- package/dist/lib/components/ui/widgets/native-charts/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/native-charts/line-chart/line-chart-types.d.ts +26 -1
- package/dist/lib/components/ui/widgets/native-charts/line-chart/line-geometry.d.ts +4 -0
- package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/reference-marks.d.ts +17 -0
- package/dist/lib/components/ui/widgets/native-charts/line-chart/partials/tone-points.d.ts +11 -0
- package/dist/lib/components/ui/widgets/native-charts/partials/chart-tooltip.d.ts +3 -0
- package/dist/lib/i18n/resources/en/en.d.ts +22 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +22 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +22 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +22 -0
- package/dist/lib/i18n/resources/resources.d.ts +44 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +23 -23
- 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-CNlIuQOj.js → public-ib0sK0Hr.js} +6 -6
- package/dist/{rich-code-block-Jo0OLy0J.js → rich-code-block-D_PTTZWQ.js} +4 -4
- package/dist/{sortable-provider-DgIo378H.js → sortable-provider-CrS51nKB.js} +1 -1
- package/dist/{spinner-BTR8rVN9.js → spinner-DLd_IHev.js} +1 -1
- package/dist/{stored-language-Bbwcy-Pv.js → stored-language-B5SMR-W2.js} +44 -0
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-DMZ_3HiG.js → theme-toggle-wJYmnwgu.js} +1 -1
- package/dist/{toolbar-items-D3SPTgXE.js → toolbar-items-BLjrk8uU.js} +2 -2
- package/dist/{translate-material-CRF13PON.js → translate-material-BYRDtSEk.js} +2 -2
- package/dist/{translator-D7AVZCfQ.js → translator-C-_M57ZA.js} +1 -1
- package/dist/{use-chat-composer-D3kvp8Fw.js → use-chat-composer-D_hfO99B.js} +2647 -2474
- package/dist/{use-heading-spy-uyhOQV2O.js → use-heading-spy-wElRpO2G.js} +1 -1
- package/dist/{use-material-translation-kISeB-fY.js → use-material-translation-CFF73jk5.js} +2 -2
- package/docs/README.md +1 -1
- package/docs/components/data-table-filter-and-lists.md +59 -4
- package/docs/components/rich-widgets.md +6 -0
- package/docs/components/selection-and-choice.md +47 -1
- package/docs/guides/charts.md +78 -2
- package/docs/guides/i18n.md +1 -1
- package/docs/roadmap.md +7 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/widgets/native-charts/native-charts-reference.css +102 -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-CFF73jk5.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-DkeMr5bw.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-wElRpO2G.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-B5SMR-W2.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-B5SMR-W2.js";
|
|
3
|
+
import { n as a, r as o, t as s } from "./i18n-provider-DkeMr5bw.js";
|
|
4
|
+
import { i as c, n as l, o as u, r as d, t as f } from "./translator-C-_M57ZA.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-BYRDtSEk.js";
|
|
7
|
+
import { t as g } from "./use-material-translation-CFF73jk5.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-uQld1gKm.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";
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* `LineChart`, `AreaChart`, `BarChart` and `ComboChart` also take `zoom` (a mini
|
|
10
10
|
* overview that picks the rows shown) and `scroll` (a dense plot scrolls
|
|
11
|
-
* sideways on a phone).
|
|
11
|
+
* sideways on a phone). `LineChart` and `AreaChart` also take `bands`,
|
|
12
|
+
* `thresholds` and `pointTone` to read values against a reference. Guide:
|
|
13
|
+
* docs/guides/charts.md.
|
|
12
14
|
*
|
|
13
15
|
* The parts use hooks and the browser: this entry's built files carry no
|
|
14
16
|
* `'use client'` directive, so render the charts from a file of your own
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ServerTableBulkAction } from './bulk-action.js';
|
|
2
3
|
import { SelectedRows } from './selected-rows.js';
|
|
3
4
|
/**
|
|
@@ -10,3 +11,20 @@ export declare function bulkActionTargets<T>(action: Pick<ServerTableBulkAction<
|
|
|
10
11
|
ids: string[];
|
|
11
12
|
rows: T[];
|
|
12
13
|
};
|
|
14
|
+
/** Whether `count` applicable rows is past the action's `max` (no `max`: never). */
|
|
15
|
+
export declare function isOverMax(action: Pick<ServerTableBulkAction<unknown>, 'max'>, count: number): boolean;
|
|
16
|
+
/** The action's accessible name for `count` rows: its `name`, else `fallback`. */
|
|
17
|
+
export declare function bulkActionName(action: Pick<ServerTableBulkAction<unknown>, 'name'>, count: number, fallback: string): string;
|
|
18
|
+
/** What replaces the button past `max`: its `maxNotice` (called with the
|
|
19
|
+
* count and `max` when a function), else `fallback`. */
|
|
20
|
+
export declare function bulkActionNotice(action: Pick<ServerTableBulkAction<unknown>, 'max' | 'maxNotice'>, count: number, fallback: ReactNode): ReactNode;
|
|
21
|
+
/** The actions that apply to at least one selected row, with their targets
|
|
22
|
+
* and whether they are past their `max`. */
|
|
23
|
+
export declare function bulkEntries<T>(actions: readonly ServerTableBulkAction<T>[], ids: readonly string[], selectedRows: SelectedRows<T>): {
|
|
24
|
+
over: boolean;
|
|
25
|
+
action: ServerTableBulkAction<T>;
|
|
26
|
+
target: {
|
|
27
|
+
ids: string[];
|
|
28
|
+
rows: T[];
|
|
29
|
+
};
|
|
30
|
+
}[];
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from '../../actions/button/button.js';
|
|
3
3
|
import { ServerTableSelection } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* What a bulk action's `onClick` gets last, to give the focus back after a
|
|
6
|
+
* step that moved it (a confirm dialog, a menu).
|
|
7
|
+
*/
|
|
8
|
+
export type ServerTableBulkContext = {
|
|
9
|
+
/**
|
|
10
|
+
* The element the action was started from: its button, or the "More"
|
|
11
|
+
* button for an item of the phone's More menu. `null` when it is not on
|
|
12
|
+
* screen.
|
|
13
|
+
*/
|
|
14
|
+
trigger: HTMLElement | null;
|
|
15
|
+
/**
|
|
16
|
+
* Gives the focus back to the trigger, found again at call time, so it
|
|
17
|
+
* works after the button re-rendered. When the action is hidden since
|
|
18
|
+
* (its count fell to 0, or past `max`), the focus goes to the next bulk
|
|
19
|
+
* action, else to "More", else to the table's "Select all" (the table
|
|
20
|
+
* itself without one), never to the body.
|
|
21
|
+
*/
|
|
22
|
+
focusTrigger: () => void;
|
|
23
|
+
};
|
|
4
24
|
/**
|
|
5
25
|
* One declarative bulk action of `ServerTable`'s `bulkActions` list. Its
|
|
6
26
|
* button reads "Label (n)", n being the selected rows it applies to (the
|
|
@@ -21,9 +41,36 @@ export type ServerTableBulkAction<T> = {
|
|
|
21
41
|
* action applies to the whole selection.
|
|
22
42
|
*/
|
|
23
43
|
appliesTo?: (row: T) => boolean;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The button's accessible name and tooltip for `count` rows it applies
|
|
46
|
+
* to, e.g. `(n) => `Archive ${n} people``. Without it the name is
|
|
47
|
+
* "Label n rows" (`material.server-table.bulk-action-name`). Start it
|
|
48
|
+
* with the visible `label` (WCAG 2.5.3, Label in Name): the visible text
|
|
49
|
+
* is "Label (n)", so "Archive 2 people" matches it for speech input.
|
|
50
|
+
* Applies to the toolbar, the phone's bar and the More menu's items.
|
|
51
|
+
*/
|
|
52
|
+
name?: (count: number) => string;
|
|
53
|
+
/**
|
|
54
|
+
* The most rows one call takes. Above it (counted on the rows the action
|
|
55
|
+
* applies to) the button is replaced by `maxNotice`: a muted text on the
|
|
56
|
+
* toolbar and the phone's bar, and a disabled item that shows it as its
|
|
57
|
+
* description in the More menu. Without it there is no limit.
|
|
58
|
+
*/
|
|
59
|
+
max?: number;
|
|
60
|
+
/**
|
|
61
|
+
* What replaces the button past `max`. A function gets the count and
|
|
62
|
+
* `max`. Default `material.server-table.bulk-max-notice`: "Select 100 rows or
|
|
63
|
+
* fewer to archive". It is announced politely once, when the action goes
|
|
64
|
+
* past `max`, not each time the count changes.
|
|
65
|
+
*/
|
|
66
|
+
maxNotice?: ReactNode | ((count: number, max: number) => ReactNode);
|
|
67
|
+
/**
|
|
68
|
+
* Runs with the ids (and the rows kept for them) it applies to, never the
|
|
69
|
+
* whole selection when `appliesTo` is set. `context` is the trigger and
|
|
70
|
+
* `focusTrigger()`: call it when a dialog opened by the step closes.
|
|
71
|
+
* Handlers that take three parameters stay valid.
|
|
72
|
+
*/
|
|
73
|
+
onClick: (ids: string[], selection: ServerTableSelection, rows: T[], context: ServerTableBulkContext) => void;
|
|
27
74
|
/** The button's variant. Default `'tonal'`. */
|
|
28
75
|
variant?: ButtonProps['variant'];
|
|
29
76
|
/** The button's colour, e.g. `'destructive'`. */
|
package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts
CHANGED
|
@@ -5,9 +5,11 @@ import { ServerTableSelection } from '../types.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* The buttons of a declarative `bulkActions` list: "Label (n)", n being the
|
|
7
7
|
* selected rows the action applies to, named "Label n rows" for assistive
|
|
8
|
-
* technology, and not rendered at all when n is
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* technology (or by the action's `name`), and not rendered at all when n is
|
|
9
|
+
* 0. Past the action's `max` its button gives way to its notice. An action
|
|
10
|
+
* runs with the rows it applies to only, tested on the rows kept for the
|
|
11
|
+
* selection (see `syncSelectedRows`), so the counts hold across pages. Its
|
|
12
|
+
* `onClick` also gets the trigger and `focusTrigger()`.
|
|
11
13
|
*/
|
|
12
14
|
export declare function ServerTableBulkButtons<T extends RowData>({ actions, ids, selectedRows, selection, onFocusLost, phone, }: {
|
|
13
15
|
actions: readonly ServerTableBulkAction<T>[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ServerTableBulkContext } from '../bulk-action.js';
|
|
2
|
+
/** The id of the phone's "More" button in the focus bookkeeping. */
|
|
3
|
+
export declare const MORE = "\0more";
|
|
4
|
+
/**
|
|
5
|
+
* Where the focus of a declarative bulk list goes. It remembers the bulk
|
|
6
|
+
* button that has it, and the buttons on screen, so that:
|
|
7
|
+
* - a focused button that disappears (its count fell to 0, or went past
|
|
8
|
+
* `max`) hands the focus to the next bulk button, else "More", else
|
|
9
|
+
* `onFocusLost` (the table's "Select all", else the table);
|
|
10
|
+
* - `focusTrigger()` of an action's context does the same from the action,
|
|
11
|
+
* found again at call time, so it works after the button re-rendered.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useBulkFocus({ order, shown, onFocusLost, }: {
|
|
14
|
+
/** Every action id, in the list's order. */
|
|
15
|
+
order: readonly string[];
|
|
16
|
+
/** The ids of the buttons on screen (More included). */
|
|
17
|
+
shown: readonly string[];
|
|
18
|
+
onFocusLost?: () => void;
|
|
19
|
+
}): {
|
|
20
|
+
track: (id: string) => {
|
|
21
|
+
onFocus: () => void;
|
|
22
|
+
onBlur: () => void;
|
|
23
|
+
};
|
|
24
|
+
ref: (id: string) => (element: HTMLButtonElement | null) => void;
|
|
25
|
+
/** The button of `id`, if it is on screen. */
|
|
26
|
+
button: (id: string) => HTMLButtonElement | null;
|
|
27
|
+
/** Remembers `id` as the focus's place (a menu item blurred it). */
|
|
28
|
+
remember: (id: string) => void;
|
|
29
|
+
/** The context of `actionId`'s `onClick`, started from `triggerId`'s button. */
|
|
30
|
+
context: (actionId: string, triggerId: string) => ServerTableBulkContext;
|
|
31
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ServerTableBulkAction } from '../bulk-action.js';
|
|
3
|
+
import { ServerTableSelection } from '../types.js';
|
|
4
|
+
import { useBulkFocus } from './server-table-bulk-focus.js';
|
|
5
|
+
export type BulkMoreEntry<T> = {
|
|
6
|
+
action: ServerTableBulkAction<T>;
|
|
7
|
+
target: {
|
|
8
|
+
ids: string[];
|
|
9
|
+
rows: T[];
|
|
10
|
+
};
|
|
11
|
+
label: string;
|
|
12
|
+
name: string;
|
|
13
|
+
/** Set past the action's `max`: the item is disabled and shows it. */
|
|
14
|
+
notice: ReactNode | null;
|
|
15
|
+
};
|
|
16
|
+
/** The phone bar's "More" menu: one item per action past the third, each
|
|
17
|
+
* with its count. Past its `max` an item is disabled and its notice is its
|
|
18
|
+
* description (`aria-describedby`), under the label. */
|
|
19
|
+
export declare function BulkMoreMenu<T>({ entries, selection, focus, moreLabel, }: {
|
|
20
|
+
entries: BulkMoreEntry<T>[];
|
|
21
|
+
selection: ServerTableSelection;
|
|
22
|
+
focus: ReturnType<typeof useBulkFocus>;
|
|
23
|
+
moreLabel: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-notice.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** The text that stands for a bulk action past its `max`, muted, in place of its button. */
|
|
3
|
+
export declare function BulkNotice({ action, children, }: {
|
|
4
|
+
action: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Tells the notices politely, once: the live region is always rendered and
|
|
9
|
+
* only its content changes, when an action goes past its `max` (its notice
|
|
10
|
+
* is added), not when the count moves while it stays past it. It empties
|
|
11
|
+
* when no action is past `max`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function BulkNoticeAnnouncer({ notices, }: {
|
|
14
|
+
/** The notice of every action past its `max`, by action id. */
|
|
15
|
+
notices: ReadonlyMap<string, ReactNode>;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ServerTableBulkAction } from '../bulk-action.js';
|
|
3
|
+
/** The visible label, accessible name and max notice of a bulk action, translated. */
|
|
4
|
+
export declare function useBulkTexts<T>(): {
|
|
5
|
+
label: (action: ServerTableBulkAction<T>, count: number) => string;
|
|
6
|
+
name: (action: ServerTableBulkAction<T>, count: number) => string;
|
|
7
|
+
notice: (action: ServerTableBulkAction<T>, count: number) => ReactNode;
|
|
8
|
+
more: string;
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
2
|
import { ServerTableProps } from './types.js';
|
|
3
|
-
export type { ServerTableBulkAction } from './bulk-action.js';
|
|
3
|
+
export type { ServerTableBulkAction, ServerTableBulkContext, } from './bulk-action.js';
|
|
4
4
|
export type { ServerTableEmpty, ServerTableError, ServerTableFilter, ServerTableFilterHandle, ServerTableProps, ServerTableSelection, } from './types.js';
|
|
5
5
|
/**
|
|
6
6
|
* One server page of a list in a `manual` `DataTable`, its state in the URL
|