@nxgt/material 3.47.0 → 3.49.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 -3
- package/dist/{button-yaltbQmC.js → button-DJgaQbBD.js} +49 -49
- package/dist/charts.js +144 -144
- package/dist/{chip-BqWbbr1b.js → chip-DN44R1vW.js} +56 -56
- package/dist/{code-editor-C9qBNoYb.js → code-editor-BJ9ewxSC.js} +307 -307
- package/dist/code-editor.js +46 -46
- package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BJE3VuQg.js} +1 -1
- package/dist/components/components.css +1 -0
- package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
- package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
- package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
- package/dist/components/ui/actions/action-card/action-card.css +33 -3
- package/dist/{components-DFPy96C3.js → components-AtBccCir.js} +15714 -15755
- package/dist/components.js +23 -23
- package/dist/{dialog-CCCcnTIx.js → dialog-ODql4vH7.js} +15 -15
- package/dist/{tooltip-CkttDIab.js → dist-B61_o9Mg.js} +69 -66
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-DRXYP9ta.js} +274 -274
- package/dist/editor.js +1027 -1027
- package/dist/{empty-state-DcF4TBzi.js → empty-state-C9QqvBU1.js} +36 -36
- package/dist/{escape-owner-C4W_sOAU.js → escape-owner-DCrlERLM.js} +1 -1
- package/dist/{field-blur-CJHzVSh9.js → field-blur-DYGyIdfD.js} +1 -1
- package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-B-fSpl1H.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-C0fw2kLK.js → hover-card-EO_CckIx.js} +19 -19
- package/dist/{icon-badge-aJ22mKGh.js → icon-badge-BQYj_LE6.js} +3 -3
- package/dist/{icon-button-CN9r5TNE.js → icon-button-B481L2TP.js} +20 -20
- package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
- package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
- package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
- package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
- package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
- package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/filter-query-context.d.ts +1 -1
- package/dist/lib/components/ui/collections/filter/query/filter-query-model.d.ts +49 -0
- package/dist/lib/components/ui/collections/filter/query/types.d.ts +8 -0
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-options.d.ts +2 -1
- package/dist/lib/components/ui/collections/filter/query/use-filter-query-value.d.ts +1 -0
- package/dist/lib/components/ui/collections/filter/query/use-filter-query.d.ts +3 -47
- package/dist/lib/components/ui/collections/filter/sections/filter-form-error.d.ts +16 -4
- package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
- package/dist/lib/components/ui/collections/server-table/types.d.ts +5 -0
- package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
- package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
- package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/opening-hours/logic/status.d.ts +13 -2
- package/dist/lib/components/ui/fields/opening-hours/opening-hours-summary.d.ts +7 -3
- package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
- package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
- package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
- package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
- package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
- package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
- package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
- package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/main.js +30 -30
- package/dist/map.js +78 -78
- package/dist/material.css +1 -1
- package/dist/nxgt-theme-ivgNca3z.js +37 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/{public-zVb_Nq_D.js → public-CZBz4JVu.js} +70 -70
- package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-597e0_Qm.js} +51 -51
- package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-CK_xAk2H.js} +217 -217
- package/dist/{spinner-C4CgDEYm.js → spinner-BhuZuHK1.js} +1 -1
- package/dist/theme-picker.js +45 -45
- package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
- package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-Dnjn83TJ.js} +15 -15
- package/dist/themes.js +17 -17
- package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
- package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CCwIu7fE.js} +426 -426
- package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-Ot5XUbdn.js} +5138 -4908
- package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
- package/docs/components/buttons-and-actions.md +62 -4
- package/docs/components/data-table-filter-and-lists.md +29 -2
- package/docs/components/form-fields.md +1 -1
- package/docs/guides/cards-and-tiles.md +60 -0
- package/docs/previews/data-table-filter-lists-filter.webp +0 -0
- package/docs/roadmap.md +21 -0
- package/docs/troubleshooting.md +24 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
- package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
- package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
- package/lib/components/ui/actions/action-card/action-card.css +33 -3
- package/package.json +1 -1
- package/dist/lib/components/ui/fields/opening-hours/logic/zoned.d.ts +0 -10
- package/dist/nxgt-theme-ZS945iMP.js +0 -37
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FilterApply, FilterCountsOption, FilterDefaults, FilterEvent, FilterFieldErrors, FilterFocusTarget, FilterMachineState, FilterModel, FilterPreviewCount, FilterQuery } from '@nxgt/material-core/filter';
|
|
2
|
+
import { ReactNode, RefObject } from 'react';
|
|
3
|
+
import { FilterDensity, FilterSearchApply } from './types.js';
|
|
4
|
+
import { FilterBarFields } from './use-filter-bar-fields.js';
|
|
5
|
+
/** What every part of the bar reads (`useFilterQueryContext`). */
|
|
6
|
+
export type FilterQueryModel = FilterBarFields & {
|
|
7
|
+
model: FilterModel;
|
|
8
|
+
machine: FilterMachineState;
|
|
9
|
+
/** The `default: 'page'` fields' values (the `defaults` prop). */
|
|
10
|
+
defaults?: FilterDefaults;
|
|
11
|
+
/** A server's refusal per field id (the `errors` prop). */
|
|
12
|
+
errors?: FilterFieldErrors;
|
|
13
|
+
/** The search box's refusal (the `searchError` prop). */
|
|
14
|
+
searchError?: ReactNode;
|
|
15
|
+
/** A refusal of no field (the `formError` prop). */
|
|
16
|
+
formError?: ReactNode;
|
|
17
|
+
/** Show the field errors' words under the bar (the `errorSummary` prop). */
|
|
18
|
+
errorSummary: boolean;
|
|
19
|
+
applied: FilterQuery;
|
|
20
|
+
editing: string | null;
|
|
21
|
+
/** An edit not carried yet: the count shown is the previous query's. */
|
|
22
|
+
pending: boolean;
|
|
23
|
+
/** The applied query is the one "Clear all" left. */
|
|
24
|
+
cleared: boolean;
|
|
25
|
+
/** The field "Add filter" just added, while the applied query is the one it left. */
|
|
26
|
+
added: string | null;
|
|
27
|
+
/** How many filters Done added, so each is told. */
|
|
28
|
+
addedCount: number;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
resultCount?: number;
|
|
31
|
+
density: FilterDensity;
|
|
32
|
+
apply: FilterApply;
|
|
33
|
+
searchApply: FilterSearchApply;
|
|
34
|
+
searchMinLength: number;
|
|
35
|
+
previewCount?: FilterPreviewCount;
|
|
36
|
+
counts?: FilterCountsOption;
|
|
37
|
+
/** The element around the bar (a `div`): the focus contract finds the chips in it. */
|
|
38
|
+
rootRef: RefObject<HTMLDivElement | null>;
|
|
39
|
+
send: (event: FilterEvent) => void;
|
|
40
|
+
/** Applies `query` at once, without live apply's delay (the sheet's "Show N results"). */
|
|
41
|
+
applyNow: (query: FilterQuery) => void;
|
|
42
|
+
/** Makes the pending edit apply now rather than after `liveDelayMs` (a text field's Enter). */
|
|
43
|
+
applyPending: () => void;
|
|
44
|
+
/** Holds live apply while the phone sheet holds its history entry. */
|
|
45
|
+
suspendLive: (suspended: boolean) => void;
|
|
46
|
+
setEditing: (field: string | null) => void;
|
|
47
|
+
/** Focuses a target of the core's focus contract, once painted. */
|
|
48
|
+
focus: (target: FilterFocusTarget) => void;
|
|
49
|
+
};
|
|
@@ -95,6 +95,14 @@ export type FilterQueryProps = {
|
|
|
95
95
|
* the page when the query changes.
|
|
96
96
|
*/
|
|
97
97
|
formError?: ReactNode;
|
|
98
|
+
/**
|
|
99
|
+
* Show the field errors' words under the bar (default `true`): one error
|
|
100
|
+
* `Alert`, a line per refused field that names it ("Period: choose 366
|
|
101
|
+
* days or fewer."), after `formError` when both are set, so a refused,
|
|
102
|
+
* empty list says what went wrong. It is no live region; the bar's one
|
|
103
|
+
* tells the refusal once. `false` keeps the "Invalid" pills only.
|
|
104
|
+
*/
|
|
105
|
+
errorSummary?: boolean;
|
|
98
106
|
/** How long the live apply waits after an edit (ms, default 200). */
|
|
99
107
|
liveDelayMs?: number;
|
|
100
108
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FilterQueryProps } from './types.js';
|
|
2
2
|
/** The props the model only carries through, with their defaults. */
|
|
3
|
-
export declare function viewOptions({ defaults, errors, searchError, formError, loading, resultCount, density, apply, searchApply, searchMinLength, previewCount, counts, }: FilterQueryProps): {
|
|
3
|
+
export declare function viewOptions({ defaults, errors, searchError, formError, errorSummary, loading, resultCount, density, apply, searchApply, searchMinLength, previewCount, counts, }: FilterQueryProps): {
|
|
4
4
|
defaults: Readonly<Record<string, readonly string[]>> | undefined;
|
|
5
5
|
errors: Readonly<Record<string, string>> | undefined;
|
|
6
6
|
searchError: import('react').ReactNode;
|
|
7
7
|
formError: import('react').ReactNode;
|
|
8
|
+
errorSummary: boolean;
|
|
8
9
|
loading: boolean;
|
|
9
10
|
resultCount: number | undefined;
|
|
10
11
|
density: import('./types.js').FilterDensity;
|
|
@@ -18,6 +18,7 @@ export declare function useFilterQueryValue(props: FilterQueryProps): {
|
|
|
18
18
|
errors?: import('@nxgt/material-core/filter').FilterFieldErrors;
|
|
19
19
|
searchError?: import('react').ReactNode;
|
|
20
20
|
formError?: import('react').ReactNode;
|
|
21
|
+
errorSummary: boolean;
|
|
21
22
|
applied: import('@nxgt/material-core/filter').FilterQuery;
|
|
22
23
|
editing: string | null;
|
|
23
24
|
pending: boolean;
|
|
@@ -1,50 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { FilterBarFields } from './use-filter-bar-fields.js';
|
|
5
|
-
/** What every part of the bar reads (`useFilterQueryContext`). */
|
|
6
|
-
export type FilterQueryModel = FilterBarFields & {
|
|
7
|
-
model: FilterModel;
|
|
8
|
-
machine: FilterMachineState;
|
|
9
|
-
/** The `default: 'page'` fields' values (the `defaults` prop). */
|
|
10
|
-
defaults?: FilterDefaults;
|
|
11
|
-
/** A server's refusal per field id (the `errors` prop). */
|
|
12
|
-
errors?: FilterFieldErrors;
|
|
13
|
-
/** The search box's refusal (the `searchError` prop). */
|
|
14
|
-
searchError?: ReactNode;
|
|
15
|
-
/** A refusal of no field (the `formError` prop). */
|
|
16
|
-
formError?: ReactNode;
|
|
17
|
-
applied: FilterQuery;
|
|
18
|
-
editing: string | null;
|
|
19
|
-
/** An edit not carried yet: the count shown is the previous query's. */
|
|
20
|
-
pending: boolean;
|
|
21
|
-
/** The applied query is the one "Clear all" left. */
|
|
22
|
-
cleared: boolean;
|
|
23
|
-
/** The field "Add filter" just added, while the applied query is the one it left. */
|
|
24
|
-
added: string | null;
|
|
25
|
-
/** How many filters Done added, so each is told. */
|
|
26
|
-
addedCount: number;
|
|
27
|
-
loading: boolean;
|
|
28
|
-
resultCount?: number;
|
|
29
|
-
density: FilterDensity;
|
|
30
|
-
apply: FilterApply;
|
|
31
|
-
searchApply: FilterSearchApply;
|
|
32
|
-
searchMinLength: number;
|
|
33
|
-
previewCount?: FilterPreviewCount;
|
|
34
|
-
counts?: FilterCountsOption;
|
|
35
|
-
/** The element around the bar (a `div`): the focus contract finds the chips in it. */
|
|
36
|
-
rootRef: RefObject<HTMLDivElement | null>;
|
|
37
|
-
send: (event: FilterEvent) => void;
|
|
38
|
-
/** Applies `query` at once, without live apply's delay (the sheet's "Show N results"). */
|
|
39
|
-
applyNow: (query: FilterQuery) => void;
|
|
40
|
-
/** Makes the pending edit apply now rather than after `liveDelayMs` (a text field's Enter). */
|
|
41
|
-
applyPending: () => void;
|
|
42
|
-
/** Holds live apply while the phone sheet holds its history entry. */
|
|
43
|
-
suspendLive: (suspended: boolean) => void;
|
|
44
|
-
setEditing: (field: string | null) => void;
|
|
45
|
-
/** Focuses a target of the core's focus contract, once painted. */
|
|
46
|
-
focus: (target: FilterFocusTarget) => void;
|
|
47
|
-
};
|
|
1
|
+
import { FilterQueryModel } from './filter-query-model.js';
|
|
2
|
+
import { FilterQueryProps } from './types.js';
|
|
3
|
+
export type { FilterQueryModel } from './filter-query-model.js';
|
|
48
4
|
/**
|
|
49
5
|
* The bar's store: the slice over the core machine, the controlled `query`
|
|
50
6
|
* and `locked` mirrored into it (an equal one changes nothing), and live
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* What the bar says in words under itself: one error Alert in place. First
|
|
3
|
+
* the refusal that belongs to no field (the `formError` prop), then a line
|
|
4
|
+
* per refused field that names it, "Period: choose 366 days or fewer." (the
|
|
5
|
+
* `errors` prop; `errorSummary={false}` leaves them to the pills; the facets
|
|
6
|
+
* panel passes a `fieldLines` predicate that keeps a line only for a field
|
|
7
|
+
* with no section on screen: a section shows its message inline, a field
|
|
8
|
+
* without one is a plain chip that reads "Invalid"; on a phone the sections
|
|
9
|
+
* sit in the closed sheet, so every field keeps its line).
|
|
10
|
+
* It is no live region: the bar's one does the telling, once (`FilterResultsStatus`).
|
|
11
|
+
* Nothing without a message.
|
|
5
12
|
*/
|
|
6
|
-
export declare function FilterFormError({ className }: {
|
|
13
|
+
export declare function FilterFormError({ className, fieldLines, }: {
|
|
7
14
|
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* `false`, or a predicate on the field id, where the field's own section
|
|
17
|
+
* already shows its message (the facets panel).
|
|
18
|
+
*/
|
|
19
|
+
fieldLines?: boolean | ((id: string) => boolean);
|
|
8
20
|
}): import("react").JSX.Element | null;
|
|
@@ -33,7 +33,7 @@ export type RowMenuProps = {
|
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* A row's actions menu: `RowMenuTrigger` and a `DropdownMenu` aligned to the
|
|
36
|
-
* end of it.
|
|
36
|
+
* end of it. Every item of its menu, `children` too, is 44px high on a coarse pointer, and the destructive
|
|
37
37
|
* ones come last, after a separator. Focus returns to the trigger when the
|
|
38
38
|
* menu closes, and when a dialog opened from an item closes.
|
|
39
39
|
*/
|
|
@@ -88,6 +88,11 @@ export type ServerTableFilter = {
|
|
|
88
88
|
* once by the same live region. Cleared by the page when the query changes.
|
|
89
89
|
*/
|
|
90
90
|
formError?: ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Show the field errors' words under the bar (default `true`), after
|
|
93
|
+
* `formError`; `false` keeps the "Invalid" pills only.
|
|
94
|
+
*/
|
|
95
|
+
errorSummary?: boolean;
|
|
91
96
|
/**
|
|
92
97
|
* How the page reads and writes the URL, to match the loader's
|
|
93
98
|
* `parseFilterQuery` / `serializeFilterQuery` options exactly:
|
|
@@ -18,10 +18,10 @@ export declare function useDurationBox({ disabled, ...values }: Model): {
|
|
|
18
18
|
labels: {
|
|
19
19
|
hour: string;
|
|
20
20
|
minute: string;
|
|
21
|
+
period: string;
|
|
21
22
|
day: string;
|
|
22
23
|
month: string;
|
|
23
24
|
year: string;
|
|
24
|
-
period: string;
|
|
25
25
|
};
|
|
26
26
|
placeholders: Record<import('../../../primitives/segmented-input/segment-defs.js').SegmentKey, string>;
|
|
27
27
|
periodNames: [string, string];
|
|
@@ -3,7 +3,7 @@ import { ComponentProps, ReactNode } from 'react';
|
|
|
3
3
|
import { IconName } from '../../primitives/icon/icon.js';
|
|
4
4
|
import { Tone } from '../../tones.js';
|
|
5
5
|
declare const badgeVariants: (props?: ({
|
|
6
|
-
variant?: "secondary" | "success" | "info" | "warning" | "error" | "default" | "
|
|
6
|
+
variant?: "secondary" | "success" | "info" | "warning" | "error" | "default" | "soft" | "outlined" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
/** The tone of a `soft` or `outlined` badge: a named tone or one the app declared in `AppTones`. */
|
|
9
9
|
export type BadgeTone = Tone;
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import { DayInput } from './day-label.js';
|
|
4
4
|
declare const daySeparatorVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "line" | "pill" | null | undefined;
|
|
6
6
|
sticky?: boolean | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export type DaySeparatorProps = Omit<ComponentProps<'div'>, 'children'> & VariantProps<typeof daySeparatorVariants> & {
|