@veevarts/design-system 2.26.0 → 2.28.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/README.md +17 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4735 -4179
- package/dist/patterns/AdminTextField/AdminTextField.d.ts +4 -44
- package/dist/patterns/AdminTextField/index.d.ts +2 -2
- package/dist/patterns/AdminTextField/styles.d.ts +29 -0
- package/dist/patterns/AdminTextField/types.d.ts +78 -0
- package/dist/patterns/EntityRow/styles.d.ts +15 -0
- package/dist/patterns/EntityRow/types.d.ts +7 -0
- package/dist/patterns/FeedbackState/FeedbackState.d.ts +1 -1
- package/dist/patterns/FeedbackState/type.d.ts +11 -1
- package/dist/patterns/Notice/Notice.d.ts +16 -0
- package/dist/patterns/Notice/index.d.ts +2 -0
- package/dist/patterns/Notice/styles.d.ts +35 -0
- package/dist/patterns/Notice/type.d.ts +39 -0
- package/dist/patterns/TileSelect/TileSelect.d.ts +2 -115
- package/dist/patterns/TileSelect/index.d.ts +1 -1
- package/dist/patterns/TileSelect/styles.d.ts +42 -0
- package/dist/patterns/TileSelect/types.d.ts +140 -0
- package/dist/patterns/VerticalSteps/StepPager.d.ts +6 -0
- package/dist/patterns/VerticalSteps/StepsReadiness.d.ts +15 -0
- package/dist/patterns/VerticalSteps/VerticalSteps.d.ts +6 -0
- package/dist/patterns/VerticalSteps/index.d.ts +4 -0
- package/dist/patterns/VerticalSteps/styles.d.ts +54 -0
- package/dist/patterns/VerticalSteps/types.d.ts +100 -0
- package/dist/patterns/index.d.ts +6 -2
- package/dist/providers/HeroUIProvider.d.ts +7 -1
- package/dist/providers/ToastProvider.d.ts +16 -0
- package/dist/providers/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TileSelectOption {
|
|
3
|
+
/** Stable identifier returned via `onSelect`. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Visible label rendered under the icon. */
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Icon: iconify name (`'lucide:credit-card'`) or a `ReactNode` for
|
|
9
|
+
* fully-custom SVGs.
|
|
10
|
+
*/
|
|
11
|
+
icon: string | React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Disable the tile (greyed out, no click). The tile is `disabled`, so it
|
|
14
|
+
* also leaves the tab order. For an option that exists but cannot be
|
|
15
|
+
* picked yet, use `isLocked`.
|
|
16
|
+
*/
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* One line of supporting copy. `variant="compact"` renders it for an
|
|
20
|
+
* option that ended up in the "More" menu, where the label alone
|
|
21
|
+
* ("Other") rarely says enough. `variant="tiles"` renders it only in a
|
|
22
|
+
* grid opted in to the detailed tile (some option has a `badge` or is
|
|
23
|
+
* `isLocked`): on the `size="md"` tile under the label, and as the item
|
|
24
|
+
* description in the small-viewport `<Select>`. On its own it changes
|
|
25
|
+
* nothing in the tile grid.
|
|
26
|
+
*/
|
|
27
|
+
description?: string;
|
|
28
|
+
/**
|
|
29
|
+
* A short tag on the tile's top row: "Coming soon", "New".
|
|
30
|
+
* `variant="tiles"` at `size="md"`; also the end of its `<Select>` item.
|
|
31
|
+
* Opts the grid in to the detailed tile.
|
|
32
|
+
*/
|
|
33
|
+
badge?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Shown, not pickable: a dashed, muted tile that ignores presses. Unlike
|
|
36
|
+
* `isDisabled` it stays focusable and is `aria-disabled`, so keyboard and
|
|
37
|
+
* screen-reader users reach it and hear `lockedReason`. `variant="compact"`
|
|
38
|
+
* and the small-viewport `<Select>` treat it as disabled. Opts the grid in
|
|
39
|
+
* to the detailed tile.
|
|
40
|
+
*/
|
|
41
|
+
isLocked?: boolean;
|
|
42
|
+
/** What a locked tile announces. Defaults to `badge`. */
|
|
43
|
+
lockedReason?: string;
|
|
44
|
+
/**
|
|
45
|
+
* `variant="compact"` only: keep this option in the "More" menu at
|
|
46
|
+
* every width, however much room the track has. For an action that is
|
|
47
|
+
* secondary by decision rather than by measurement — a payments picker
|
|
48
|
+
* that wants "Other" one click away so the methods people actually
|
|
49
|
+
* reach for own the row.
|
|
50
|
+
*
|
|
51
|
+
* The menu is rendered whenever an option asks for it, so this also
|
|
52
|
+
* overrides the rule that suppresses a menu holding a single option.
|
|
53
|
+
*/
|
|
54
|
+
alwaysInMenu?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* `variant="compact"` only: what this option is worth keeping on the
|
|
57
|
+
* track. When the pill runs out of room the LOWEST priority folds into
|
|
58
|
+
* the menu first; equal priorities fold from the end of the list.
|
|
59
|
+
* Default `0`.
|
|
60
|
+
*
|
|
61
|
+
* Display order is untouched — this decides what survives a squeeze,
|
|
62
|
+
* not where anything sits. A payments picker can list "Other" before
|
|
63
|
+
* "Split payment" and still lose "Other" first, because splitting a
|
|
64
|
+
* payment is the rarer, weightier thing to reach for.
|
|
65
|
+
*/
|
|
66
|
+
priority?: number;
|
|
67
|
+
/** Override per-tile test id; defaults to `${dataTestId}-${key}`. */
|
|
68
|
+
'data-testid'?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* `'tiles'` — the icon-over-label grid, with a `<Select>` dropdown under
|
|
72
|
+
* `md`. The picker is the subject of the step.
|
|
73
|
+
*
|
|
74
|
+
* `'compact'` — a segmented pill of label-only toggles at every width,
|
|
75
|
+
* keeping every option the track can hold and folding the rest into a
|
|
76
|
+
* "More" menu rather than scrolling. The picker is a control among others.
|
|
77
|
+
*/
|
|
78
|
+
export type TileSelectVariant = 'tiles' | 'compact';
|
|
79
|
+
/**
|
|
80
|
+
* Tile size for `variant="tiles"`.
|
|
81
|
+
*
|
|
82
|
+
* `'md'` (default) — the 80px icon-over-label tile of the payments drop-in.
|
|
83
|
+
*
|
|
84
|
+
* `'sm'` — the 58px tender tile of the Quick Donation / Quick Membership
|
|
85
|
+
* mockups (`.tender-tile`): 17px icon over an 11.5px label, 10px/4px padding,
|
|
86
|
+
* 12px radius, 8px between tiles; the picked tile takes a brand border, a 9%
|
|
87
|
+
* brand tint and brand text. DS tokens only, rem only.
|
|
88
|
+
*/
|
|
89
|
+
export type TileSelectSize = 'md' | 'sm';
|
|
90
|
+
export interface TileSelectProps {
|
|
91
|
+
/** Options to render in order. */
|
|
92
|
+
options: readonly TileSelectOption[];
|
|
93
|
+
/** Currently selected option `key`. `null` = no selection. */
|
|
94
|
+
selectedKey: string | null;
|
|
95
|
+
/** Fires when a tile is selected. */
|
|
96
|
+
onSelect: (key: string) => void;
|
|
97
|
+
/** Optional heading rendered above the grid. */
|
|
98
|
+
heading?: string;
|
|
99
|
+
/**
|
|
100
|
+
* `aria-label` for the wrapping group when `heading` is omitted.
|
|
101
|
+
* Translatable. Default `'Select an option'`. When `heading` is
|
|
102
|
+
* provided this prop is ignored — the grid is labelled by the
|
|
103
|
+
* heading element.
|
|
104
|
+
*/
|
|
105
|
+
ariaLabel?: string;
|
|
106
|
+
/**
|
|
107
|
+
* How the options render. Default `'tiles'`.
|
|
108
|
+
* See {@link TileSelectVariant}.
|
|
109
|
+
*/
|
|
110
|
+
variant?: TileSelectVariant;
|
|
111
|
+
/**
|
|
112
|
+
* `variant="compact"` only: a CAP on how many options stay on the pill.
|
|
113
|
+
* Unset by default, and normally best left that way — the pill already
|
|
114
|
+
* measures the track and keeps every option that fits, folding only
|
|
115
|
+
* what is left over. Set it when a surface wants a shorter row than
|
|
116
|
+
* its width allows.
|
|
117
|
+
*
|
|
118
|
+
* The cap gives way in one case: when honouring it would leave a single
|
|
119
|
+
* option in the menu that the track had room for. A "More" button is
|
|
120
|
+
* wider than most labels, so that fold costs space and buys a click.
|
|
121
|
+
*/
|
|
122
|
+
maxVisible?: number;
|
|
123
|
+
/**
|
|
124
|
+
* `variant="compact"` only: label for the overflow trigger. Shown
|
|
125
|
+
* until an option inside the menu is selected, after which the
|
|
126
|
+
* trigger carries that option's label. Translatable. Default `'More'`.
|
|
127
|
+
*/
|
|
128
|
+
moreLabel?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Grid columns on >= sm. Default `3`. Mobile collapses to 2.
|
|
131
|
+
* `5` and `6` keep a full method set on one row on a wide surface.
|
|
132
|
+
* Ignored by `variant="compact"`, which is a single strip.
|
|
133
|
+
*/
|
|
134
|
+
columnsDesktop?: 2 | 3 | 4 | 5 | 6;
|
|
135
|
+
columnsMobile?: 1 | 2;
|
|
136
|
+
/** `variant="tiles"` only. See {@link TileSelectSize}. Default `'md'`. */
|
|
137
|
+
size?: TileSelectSize;
|
|
138
|
+
className?: string;
|
|
139
|
+
'data-testid'?: string;
|
|
140
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { StepPagerProps } from './types';
|
|
3
|
+
export declare function StepPager({ steps, currentStep, onStepChange, progressLabel, nextLabel, previousLabel, finalActionLabel, onFinalAction, isFinalActionDisabled, className, 'data-testid': dataTestId, previousTestId, nextTestId, finalActionTestId, }: StepPagerProps): JSX.Element;
|
|
4
|
+
export declare namespace StepPager {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { StepsReadinessProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* The verdict that sits in `VerticalSteps`' `header`: ready to publish,
|
|
5
|
+
* N things to fix, or already live. Copy comes in as props.
|
|
6
|
+
*
|
|
7
|
+
* `role="status"` on every variant: the count changes while the user edits,
|
|
8
|
+
* and a polite announcement is the right weight for it. `data-ready` is
|
|
9
|
+
* `"true"` for `ready` and `live`, `"false"` for `fix`, so a test can wait on
|
|
10
|
+
* it without reading copy.
|
|
11
|
+
*/
|
|
12
|
+
export declare function StepsReadiness({ variant, title, description, className, 'data-testid': dataTestId, }: StepsReadinessProps): JSX.Element;
|
|
13
|
+
export declare namespace StepsReadiness {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { VerticalStepsProps } from './types';
|
|
3
|
+
export declare function VerticalSteps({ steps, currentStep: currentStepProp, defaultStep, onStepChange, isStepReachable, ariaLabel, statusLabels, header, maxHeight, className, style, 'data-testid': dataTestId, ...rest }: VerticalStepsProps): JSX.Element;
|
|
4
|
+
export declare namespace VerticalSteps {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { VerticalSteps } from './VerticalSteps';
|
|
2
|
+
export { StepsReadiness } from './StepsReadiness';
|
|
3
|
+
export { StepPager } from './StepPager';
|
|
4
|
+
export type { VerticalStep, VerticalStepStatus, VerticalStepsProps, VerticalStepsStatusLabels, StepsReadinessProps, StepsReadinessVariant, StepPagerProps, } from './types';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { StepsReadinessVariant, VerticalStepStatus } from './types';
|
|
2
|
+
/** One glyph per status, so the state reads by shape before color. */
|
|
3
|
+
export declare const STEP_STATUS_ICON: Record<VerticalStepStatus, string>;
|
|
4
|
+
/**
|
|
5
|
+
* `icon` paints the glyph; `meta` the line under the label.
|
|
6
|
+
*
|
|
7
|
+
* The optional ring is `--muted` (gray-400, 2.54:1): it is decorative, the
|
|
8
|
+
* visible word "Optional" carries the state. Every text tone is `--sub`
|
|
9
|
+
* (gray-500, 4.83:1) or darker; `--warn` is warning-700, 5.02:1 on white.
|
|
10
|
+
*/
|
|
11
|
+
export declare const STEP_STATUS_TONE: Record<VerticalStepStatus, {
|
|
12
|
+
icon: string;
|
|
13
|
+
meta: string;
|
|
14
|
+
}>;
|
|
15
|
+
/** Label color for every row. */
|
|
16
|
+
export declare const STEP_LABEL_COLOR: string;
|
|
17
|
+
export declare const READINESS_ICON: Record<StepsReadinessVariant, string>;
|
|
18
|
+
/** Fill plus the one text tone on it. Both pairs are held to 4.5:1 in `admin-surface.test.ts`. */
|
|
19
|
+
export declare const READINESS_TONE: Record<StepsReadinessVariant, {
|
|
20
|
+
fill: string;
|
|
21
|
+
text: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const verticalStepsClass: {
|
|
24
|
+
/** Scrolls inside once `maxHeight` (or the parent) caps it. */
|
|
25
|
+
readonly root: "flex min-h-0 flex-col gap-3 overflow-y-auto overscroll-contain";
|
|
26
|
+
readonly nav: "rounded-2xl border border-acct-border bg-acct-surface p-1.5";
|
|
27
|
+
readonly list: "m-0 flex list-none flex-col gap-0.5 p-0";
|
|
28
|
+
/**
|
|
29
|
+
* The DS Button supplies the hit target, the focus ring and press
|
|
30
|
+
* handling; its centered single-line box is undone so a row can wrap.
|
|
31
|
+
*/
|
|
32
|
+
readonly row: string;
|
|
33
|
+
readonly rowCurrent: "bg-acct-hair data-[hover=true]:bg-acct-hair";
|
|
34
|
+
readonly icon: "mt-px size-5 shrink-0";
|
|
35
|
+
readonly text: "flex min-w-0 flex-1 flex-col gap-0.5";
|
|
36
|
+
readonly label: "text-sm leading-5";
|
|
37
|
+
readonly labelCurrent: "font-semibold";
|
|
38
|
+
readonly meta: "text-xs leading-4 [overflow-wrap:anywhere]";
|
|
39
|
+
};
|
|
40
|
+
export declare const stepsReadinessClass: {
|
|
41
|
+
readonly root: "flex items-start gap-2.5 rounded-2xl px-4 py-3";
|
|
42
|
+
readonly icon: "mt-0.5 size-5 shrink-0";
|
|
43
|
+
readonly text: "flex min-w-0 flex-col";
|
|
44
|
+
readonly title: "text-sm font-semibold leading-5";
|
|
45
|
+
readonly description: "text-xs leading-4";
|
|
46
|
+
};
|
|
47
|
+
export declare const stepPagerClass: {
|
|
48
|
+
readonly root: "flex flex-wrap items-center justify-between gap-3";
|
|
49
|
+
/** Keeps the progress text centered when one side has no button. */
|
|
50
|
+
readonly spacer: "min-w-0 flex-1 basis-0";
|
|
51
|
+
readonly progress: "shrink-0 text-xs text-acct-sub";
|
|
52
|
+
readonly endSlot: "flex min-w-0 flex-1 basis-0 justify-end";
|
|
53
|
+
readonly arrow: "size-4";
|
|
54
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where a step stands. `done` and `optional` need nothing; `needs-fix` is
|
|
4
|
+
* what stops the page from being ready, and carries a `reason`.
|
|
5
|
+
*/
|
|
6
|
+
export type VerticalStepStatus = 'done' | 'needs-fix' | 'optional';
|
|
7
|
+
/** One row of a {@link VerticalSteps} panel, and one page of a {@link StepPager}. */
|
|
8
|
+
export interface VerticalStep {
|
|
9
|
+
/** Stable id. Keys the row and its default test id. */
|
|
10
|
+
key: string;
|
|
11
|
+
/** Step name. The row prefixes its 1-based number; the pager shows it bare. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** One line under the label: "3 tickets", "Nov 1 – Dec 31". */
|
|
14
|
+
summary?: ReactNode;
|
|
15
|
+
status: VerticalStepStatus;
|
|
16
|
+
/** What to fix ("Add the end date"). Shown instead of `summary` while `needs-fix`. */
|
|
17
|
+
reason?: ReactNode;
|
|
18
|
+
/** Override the row's test id; defaults to `${data-testid}-step-${key}`. */
|
|
19
|
+
testId?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The status words, translated by the host. `optional` is visible
|
|
23
|
+
* ("Optional · 2 rules"); `done` and `needsFix` are read out only, before the
|
|
24
|
+
* summary or the reason, so include the punctuation your language wants there
|
|
25
|
+
* (`'Done.'`, `'Needs a fix:'`).
|
|
26
|
+
*/
|
|
27
|
+
export interface VerticalStepsStatusLabels {
|
|
28
|
+
done: string;
|
|
29
|
+
needsFix: string;
|
|
30
|
+
optional: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Same position model as `HorizontalSteps`: an index, controlled or not,
|
|
34
|
+
* with `onStepChange` and an `isStepReachable` gate.
|
|
35
|
+
*/
|
|
36
|
+
export interface VerticalStepsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
37
|
+
steps: VerticalStep[];
|
|
38
|
+
/** Controlled index of the active step. Omit for uncontrolled mode. */
|
|
39
|
+
currentStep?: number;
|
|
40
|
+
/** Starting index in uncontrolled mode. */
|
|
41
|
+
defaultStep?: number;
|
|
42
|
+
onStepChange?: (stepIndex: number) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Steps for which this returns `false` render disabled and cannot be
|
|
45
|
+
* pressed. When omitted every step is reachable, which is the program
|
|
46
|
+
* page's case: no step is locked.
|
|
47
|
+
*/
|
|
48
|
+
isStepReachable?: (stepIndex: number) => boolean;
|
|
49
|
+
/** Accessible name of the `<nav>` that holds the rows ("Program steps"). */
|
|
50
|
+
ariaLabel: string;
|
|
51
|
+
statusLabels: VerticalStepsStatusLabels;
|
|
52
|
+
/** Above the rows: a {@link StepsReadiness}, or anything else. */
|
|
53
|
+
header?: ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Cap on the panel's height; past it the panel scrolls inside. Any CSS
|
|
56
|
+
* length (`'calc(100vh - 7rem)'`) or px number. The panel never sets
|
|
57
|
+
* `position: sticky` itself: the page that places it decides that.
|
|
58
|
+
*/
|
|
59
|
+
maxHeight?: string | number;
|
|
60
|
+
'data-testid'?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* `ready` and `live` are the success tone and mark the panel ready
|
|
64
|
+
* (`data-ready="true"`); `fix` is the warning tone.
|
|
65
|
+
*/
|
|
66
|
+
export type StepsReadinessVariant = 'ready' | 'fix' | 'live';
|
|
67
|
+
export interface StepsReadinessProps {
|
|
68
|
+
variant: StepsReadinessVariant;
|
|
69
|
+
/** "Ready to publish", "2 things to fix", "Live — visitors can buy". */
|
|
70
|
+
title: ReactNode;
|
|
71
|
+
/** The sub-line: "Fix them before you can publish." */
|
|
72
|
+
description?: ReactNode;
|
|
73
|
+
className?: string;
|
|
74
|
+
'data-testid'?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface StepPagerProps {
|
|
77
|
+
steps: VerticalStep[];
|
|
78
|
+
/** Index of the step on screen; the same index `VerticalSteps` uses. */
|
|
79
|
+
currentStep: number;
|
|
80
|
+
onStepChange: (stepIndex: number) => void;
|
|
81
|
+
/** The middle text: `(n, total) => \`Step ${n} of ${total}\``. `n` is 1-based. */
|
|
82
|
+
progressLabel: (stepNumber: number, total: number) => ReactNode;
|
|
83
|
+
/** The forward button: `(step) => \`Next: ${step.label}\``. */
|
|
84
|
+
nextLabel: (step: VerticalStep) => ReactNode;
|
|
85
|
+
/** The back button. Defaults to the previous step's label. */
|
|
86
|
+
previousLabel?: (step: VerticalStep) => ReactNode;
|
|
87
|
+
/**
|
|
88
|
+
* Shown in place of Next on the last step ("Review and publish"). Omit it,
|
|
89
|
+
* or `onFinalAction`, and the last step has no forward button.
|
|
90
|
+
*/
|
|
91
|
+
finalActionLabel?: ReactNode;
|
|
92
|
+
onFinalAction?: () => void;
|
|
93
|
+
isFinalActionDisabled?: boolean;
|
|
94
|
+
className?: string;
|
|
95
|
+
/** Root test id. The buttons' ids default to `${data-testid}-prev` / `-next` / `-final`. */
|
|
96
|
+
'data-testid'?: string;
|
|
97
|
+
previousTestId?: string;
|
|
98
|
+
nextTestId?: string;
|
|
99
|
+
finalActionTestId?: string;
|
|
100
|
+
}
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { Stepper } from './Stepper';
|
|
|
4
4
|
export type { StepperProps } from './Stepper';
|
|
5
5
|
export { HorizontalSteps } from './HorizontalSteps';
|
|
6
6
|
export type { HorizontalStepsProps, HorizontalStepProps } from './HorizontalSteps';
|
|
7
|
+
export { VerticalSteps, StepsReadiness, StepPager } from './VerticalSteps';
|
|
8
|
+
export type { VerticalStep, VerticalStepStatus, VerticalStepsProps, VerticalStepsStatusLabels, StepsReadinessProps, StepsReadinessVariant, StepPagerProps, } from './VerticalSteps';
|
|
7
9
|
export { Footer } from './Footer';
|
|
8
10
|
export { Multiselect } from './Multiselect';
|
|
9
11
|
export type { MultiselectProps } from './Multiselect';
|
|
@@ -63,8 +65,8 @@ export { ToolbarButton } from './ToolbarButton';
|
|
|
63
65
|
export type { ToolbarButtonProps } from './ToolbarButton';
|
|
64
66
|
export { UnderlineTabs } from './UnderlineTabs';
|
|
65
67
|
export type { UnderlineTabsProps, UnderlineTabItem, UnderlineTabsSize, UnderlineTabsLevel } from './UnderlineTabs';
|
|
66
|
-
export { AdminFieldLabel, AdminTextField, adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelSuffixClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './AdminTextField';
|
|
67
|
-
export type { AdminTextFieldProps } from './AdminTextField';
|
|
68
|
+
export { AdminFieldLabel, AdminTextField, adminFieldErrorClass, adminFieldHelpButtonClass, adminFieldHelpContentClass, adminFieldHelpIconClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelNoAutoMarkClass, adminFieldLabelRowClass, adminFieldLabelSuffixClass, adminFieldRequiredClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './AdminTextField';
|
|
69
|
+
export type { AdminTextFieldProps, AdminFieldLabelProps, AdminFieldRequiredProps, AdminFieldHelpProps, } from './AdminTextField';
|
|
68
70
|
export { RowActions } from './RowActions';
|
|
69
71
|
export type { RowActionsProps, RowAction } from './RowActions';
|
|
70
72
|
export { PickerRow } from './PickerRow';
|
|
@@ -170,3 +172,5 @@ export { CellText, ChipStack } from './CellText';
|
|
|
170
172
|
export type { CellTextProps, CellTextVariant, ChipStackProps } from './CellText';
|
|
171
173
|
export { SessionExpiredCard } from './SessionExpiredCard';
|
|
172
174
|
export type { SessionExpiredCardProps } from './SessionExpiredCard';
|
|
175
|
+
export { Notice } from './Notice';
|
|
176
|
+
export type { NoticeProps, NoticeTone, NoticeVariant } from './Notice';
|
|
@@ -14,6 +14,12 @@ interface HeroUIProviderProps {
|
|
|
14
14
|
* buttons of overlays, date and number formatting. Without it HeroUI uses `"en-US"`.
|
|
15
15
|
*/
|
|
16
16
|
locale?: string;
|
|
17
|
+
/**
|
|
18
|
+
* How framer-motion animations (overlays, toasts, tabs) treat the OS "reduce motion" setting.
|
|
19
|
+
* Defaults to `"user"`: follow the OS. HeroUI's own default is `"never"`, which animates regardless.
|
|
20
|
+
* `"always"` drops them everywhere, e.g. for an app-level reduce-motion preference.
|
|
21
|
+
*/
|
|
22
|
+
reducedMotion?: 'user' | 'always' | 'never';
|
|
17
23
|
}
|
|
18
|
-
export declare function HeroUIProvider({ children, closeLabel, locale }: HeroUIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function HeroUIProvider({ children, closeLabel, locale, reducedMotion }: HeroUIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
25
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ToastProvider as BaseToastProvider } from '@heroui/react';
|
|
2
|
+
import { ComponentProps, JSX } from 'react';
|
|
3
|
+
export type ToastProviderProps = ComponentProps<typeof BaseToastProvider>;
|
|
4
|
+
/**
|
|
5
|
+
* Drop-in for HeroUI's `ToastProvider` (same props, same `addToast` queue).
|
|
6
|
+
*
|
|
7
|
+
* - Titles wrap instead of truncating. A `toastProps.classNames.title` you pass
|
|
8
|
+
* is merged after the default, so it can still restyle the title.
|
|
9
|
+
* - Animation is off when the OS or the POS asks for reduced motion, unless
|
|
10
|
+
* `disableAnimation` is passed.
|
|
11
|
+
*
|
|
12
|
+
* HeroUI merges an `addToast({ classNames })` over the provider's `classNames`
|
|
13
|
+
* as a whole object, so a per-toast `classNames` without a `title` key brings
|
|
14
|
+
* the truncation back for that toast.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ToastProvider({ toastProps, disableAnimation, ...props }: ToastProviderProps): JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { HeroUIProvider } from './HeroUIProvider';
|
|
2
|
+
export { ToastProvider } from './ToastProvider';
|
|
3
|
+
export type { ToastProviderProps } from './ToastProvider';
|
|
2
4
|
export { DensityProvider } from './DensityProvider';
|
|
3
5
|
export type { DensityProviderProps } from './DensityProvider';
|
|
4
6
|
export { useDensity, useControlSize } from './density';
|