@veevarts/design-system 2.1.0-beta.16 → 2.1.0-beta.18
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 +22 -0
- package/dist/components/Drawer/Drawer.d.ts +17 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Modal/CloseButton.d.ts +18 -0
- package/dist/components/Modal/Modal.d.ts +15 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/useLabelledCloseButton.d.ts +13 -0
- package/dist/components/Table/Table.d.ts +7 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +6243 -5008
- package/dist/patterns/AdminToolbar/styles.d.ts +1 -1
- package/dist/patterns/CashTenderForm/types.d.ts +6 -0
- package/dist/patterns/DonationAmounts/index.d.ts +1 -1
- package/dist/patterns/DonationAmounts/styles.d.ts +32 -0
- package/dist/patterns/DonationAmounts/types.d.ts +55 -1
- package/dist/patterns/DonationAmounts/utils/currency.d.ts +7 -3
- package/dist/patterns/FilterSelect/FilterSelectGroup.d.ts +3 -0
- package/dist/patterns/FilterSelect/index.d.ts +2 -1
- package/dist/patterns/FilterSelect/styles.d.ts +2 -0
- package/dist/patterns/FilterSelect/types.d.ts +6 -0
- package/dist/patterns/MetaCard/types.d.ts +2 -0
- package/dist/patterns/OutcomeView/index.d.ts +1 -1
- package/dist/patterns/OutcomeView/types.d.ts +110 -3
- package/dist/patterns/ReasonSelect/types.d.ts +1 -0
- package/dist/patterns/RefundMethodCards/RefundMethodCards.d.ts +4 -0
- package/dist/patterns/RefundMethodCards/index.d.ts +2 -0
- package/dist/patterns/RefundMethodCards/styles.d.ts +59 -0
- package/dist/patterns/RefundMethodCards/types.d.ts +72 -0
- package/dist/patterns/RefundProgressList/RefundProgressList.d.ts +4 -0
- package/dist/patterns/RefundProgressList/index.d.ts +2 -0
- package/dist/patterns/RefundProgressList/styles.d.ts +44 -0
- package/dist/patterns/RefundProgressList/types.d.ts +37 -0
- package/dist/patterns/SessionExpiredCard/SessionExpiredCard.d.ts +14 -0
- package/dist/patterns/SessionExpiredCard/index.d.ts +2 -0
- package/dist/patterns/SessionExpiredCard/type.d.ts +6 -0
- package/dist/patterns/StepProgress/StepProgress.d.ts +4 -0
- package/dist/patterns/StepProgress/index.d.ts +2 -0
- package/dist/patterns/StepProgress/styles.d.ts +29 -0
- package/dist/patterns/StepProgress/types.d.ts +43 -0
- package/dist/patterns/Summary/types.d.ts +11 -0
- package/dist/patterns/TileSelect/TileSelect.d.ts +13 -0
- package/dist/patterns/TileSelect/index.d.ts +1 -1
- package/dist/patterns/TileSelect/styles.d.ts +14 -0
- package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +20 -1
- package/dist/patterns/UnderlineTabs/index.d.ts +1 -1
- package/dist/patterns/UnderlineTabs/styles.d.ts +10 -0
- package/dist/patterns/WizardShell/index.d.ts +1 -1
- package/dist/patterns/WizardShell/types.d.ts +9 -1
- package/dist/patterns/index.d.ts +15 -7
- package/dist/patterns/shared/usePrefillEdits.d.ts +7 -0
- package/dist/providers/HeroUIProvider.d.ts +14 -1
- package/dist/providers/close-label-context.d.ts +18 -0
- package/dist/tailwind/index.cjs +8 -0
- package/dist/tailwind/index.mjs +8 -0
- package/dist/test/px-class-names.d.ts +1 -0
- package/dist/test/px-classes.d.ts +2 -1
- package/dist/tokens/pos-surface.d.ts +16 -4
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slot classes for `StepProgress`, measured off `veevart-2-pos-latest`
|
|
3
|
+
* (`.stepbar` and `.exprog`, read with `getComputedStyle` on 2026-10-21).
|
|
4
|
+
*
|
|
5
|
+
* Segment colours are the screen's own: done is `pos-ok` (#3B6D11), active the
|
|
6
|
+
* brand, upcoming the `pos-line` hairline. Names are 12px/600 on an 18px line:
|
|
7
|
+
* upcoming in `pos-muted`, active in `pos-ink`, done in `pos-ok` behind a 13px
|
|
8
|
+
* filled check with a 5px gap. DS tokens only, no stock HeroUI colours.
|
|
9
|
+
*
|
|
10
|
+
* Every size is rem (the 4px segment is `h-1`), so the POS "Text size"
|
|
11
|
+
* setting, which scales the root font size, scales the bar with the screen.
|
|
12
|
+
* Nothing here animates, so reduced motion has nothing to turn off.
|
|
13
|
+
*/
|
|
14
|
+
export declare const stepProgressClass: {
|
|
15
|
+
/** `.stepbar`: bare segments, 6px apart. */
|
|
16
|
+
readonly bare: "flex gap-1.5";
|
|
17
|
+
/** `.exprog`: labelled steps, 16px apart. */
|
|
18
|
+
readonly list: "m-0 flex list-none gap-4 p-0";
|
|
19
|
+
readonly item: "flex min-w-0 flex-1 flex-col";
|
|
20
|
+
readonly step: "flex min-w-0 flex-1 flex-col items-stretch gap-1.5 text-left";
|
|
21
|
+
readonly button: "cursor-pointer rounded-md border-none bg-transparent p-0 font-[inherit] outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[0.1875rem] focus-visible:outline-primary disabled:cursor-default";
|
|
22
|
+
readonly segment: "block h-1 rounded-full";
|
|
23
|
+
readonly name: "flex min-w-0 items-center gap-[0.3125rem] truncate text-xs font-semibold leading-[1.125rem]";
|
|
24
|
+
/** The 13px filled check in front of a finished step's name. */
|
|
25
|
+
readonly check: "flex h-[0.8125rem] w-[0.8125rem] shrink-0";
|
|
26
|
+
};
|
|
27
|
+
export type StepTone = 'done' | 'active' | 'upcoming';
|
|
28
|
+
export declare const segmentToneClass: Record<StepTone, string>;
|
|
29
|
+
export declare const nameToneClass: Record<StepTone, string>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WizardStepState } from '../WizardShell/types';
|
|
2
|
+
export interface StepProgressStep {
|
|
3
|
+
id: string;
|
|
4
|
+
/** Step name, printed under its segment when `showLabels` is on. */
|
|
5
|
+
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* Only `'skipped'` is read: a skipped step gets no segment. Every other
|
|
8
|
+
* state is derived from the step's position against `activeStepId`, so a
|
|
9
|
+
* `WizardStep[]` can be passed as is.
|
|
10
|
+
*/
|
|
11
|
+
state?: WizardStepState;
|
|
12
|
+
}
|
|
13
|
+
export interface StepProgressLabels {
|
|
14
|
+
/** Accessible name of the step list. Default `'Progress'`. */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/** Screen-reader suffix on a finished step. Default `'completed'`. */
|
|
17
|
+
completed?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface StepProgressProps {
|
|
20
|
+
steps: readonly StepProgressStep[];
|
|
21
|
+
/** The step the host is on. Steps before it read as done, steps after it as upcoming. */
|
|
22
|
+
activeStepId: string;
|
|
23
|
+
/**
|
|
24
|
+
* `true` (default) prints each step's name under its segment, with a check
|
|
25
|
+
* on finished steps: the POS "Sell a membership" bar (`.exprog`).
|
|
26
|
+
* `false` draws the bare segments only, as `WizardShell` does (`.stepbar`).
|
|
27
|
+
*/
|
|
28
|
+
showLabels?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the labelled steps buttons. Fires with the step's `id` when a
|
|
31
|
+
* reachable step is pressed. Without it the bar is display-only.
|
|
32
|
+
*/
|
|
33
|
+
onStepPress?: (stepId: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Which steps `onStepPress` may go to. Default: the finished ones (before
|
|
36
|
+
* the active step). Unreachable steps render as disabled buttons.
|
|
37
|
+
*/
|
|
38
|
+
isStepReachable?: (stepId: string, index: number) => boolean;
|
|
39
|
+
labels?: StepProgressLabels;
|
|
40
|
+
/** Padding and placement belong to the host: the bar draws none of its own. */
|
|
41
|
+
className?: string;
|
|
42
|
+
'data-testid'?: string;
|
|
43
|
+
}
|
|
@@ -63,6 +63,15 @@ export interface SummaryLineItem {
|
|
|
63
63
|
trailing?: ReactNode;
|
|
64
64
|
/** Tints the whole row with the tone's fill. */
|
|
65
65
|
tone?: RecordTone;
|
|
66
|
+
/** Dims the price while it is being recalculated (e.g. a quantity change not yet confirmed). */
|
|
67
|
+
pending?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* `false` hides this row's remove (trash) control even when `onRemoveItem`
|
|
70
|
+
* is wired and `showRemoveButton` is on — for a line the host changes
|
|
71
|
+
* through another flow (the register's own membership line goes through
|
|
72
|
+
* "Change membership"). Applies to nested rows one by one. Default `true`.
|
|
73
|
+
*/
|
|
74
|
+
removable?: boolean;
|
|
66
75
|
}
|
|
67
76
|
/** The "Pay Service fee" radio-toggle row. */
|
|
68
77
|
export interface SummaryServiceFee {
|
|
@@ -81,6 +90,8 @@ export interface SummaryTotalRow {
|
|
|
81
90
|
amount: Money;
|
|
82
91
|
/** Stable id; when set and `onRemoveTotalRow` exists, the row shows the remove control (e.g. one row per removable discount). */
|
|
83
92
|
id?: string;
|
|
93
|
+
/** Tone of the amount: `'success'` paints it in the success color (e.g. a discount); default inherits the row tone. */
|
|
94
|
+
amountTone?: 'default' | 'success';
|
|
84
95
|
}
|
|
85
96
|
/**
|
|
86
97
|
* A post-total row — the same flat shape as {@link SummaryTotalRow}; rows with
|
|
@@ -52,6 +52,17 @@ export interface TileSelectOption {
|
|
|
52
52
|
* "More" menu rather than scrolling. The picker is a control among others.
|
|
53
53
|
*/
|
|
54
54
|
export type TileSelectVariant = 'tiles' | 'compact';
|
|
55
|
+
/**
|
|
56
|
+
* Tile size for `variant="tiles"`.
|
|
57
|
+
*
|
|
58
|
+
* `'md'` (default) — the 80px icon-over-label tile of the payments drop-in.
|
|
59
|
+
*
|
|
60
|
+
* `'sm'` — the 58px tender tile of the Quick Donation / Quick Membership
|
|
61
|
+
* mockups (`.tender-tile`): 17px icon over an 11.5px label, 10px/4px padding,
|
|
62
|
+
* 12px radius, 8px between tiles; the picked tile takes a brand border, a 9%
|
|
63
|
+
* brand tint and brand text. DS tokens only, rem only.
|
|
64
|
+
*/
|
|
65
|
+
export type TileSelectSize = 'md' | 'sm';
|
|
55
66
|
export interface TileSelectProps {
|
|
56
67
|
/** Options to render in order. */
|
|
57
68
|
options: readonly TileSelectOption[];
|
|
@@ -98,6 +109,8 @@ export interface TileSelectProps {
|
|
|
98
109
|
*/
|
|
99
110
|
columnsDesktop?: 2 | 3 | 4 | 5 | 6;
|
|
100
111
|
columnsMobile?: 1 | 2;
|
|
112
|
+
/** `variant="tiles"` only. See {@link TileSelectSize}. Default `'md'`. */
|
|
113
|
+
size?: TileSelectSize;
|
|
101
114
|
className?: string;
|
|
102
115
|
'data-testid'?: string;
|
|
103
116
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { TileSelect } from './TileSelect';
|
|
2
|
-
export type { TileSelectProps, TileSelectOption, TileSelectVariant } from './TileSelect';
|
|
2
|
+
export type { TileSelectProps, TileSelectOption, TileSelectVariant, TileSelectSize } from './TileSelect';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `size="sm"` tile classes (`.tender-tile`). rem only: 1px border + `py-2.5` +
|
|
3
|
+
* 17px icon + 5px gap + 14px label line + `py-2.5` + 1px border = the
|
|
4
|
+
* mockup's 58px. Reduced motion (OS or the POS override on `<html>`) drops
|
|
5
|
+
* the colour easing and the press scale.
|
|
6
|
+
*/
|
|
7
|
+
export declare const smallTileClass: {
|
|
8
|
+
readonly grid: "gap-2";
|
|
9
|
+
readonly tile: "flex flex-col items-center justify-center gap-[0.3125rem] h-auto min-h-0 min-w-0 rounded-xl border px-1 py-2.5 transition-colors motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none motion-reduce:data-[pressed=true]:scale-100 [html[data-pos-reduce-motion=true]_&]:data-[pressed=true]:scale-100";
|
|
10
|
+
readonly idle: "border-pos-field bg-white text-pos-ink data-[hover=true]:border-pos-line-strong data-[hover=true]:bg-white";
|
|
11
|
+
readonly active: "border-primary bg-primary/[.09] text-primary data-[hover=true]:bg-primary/[.09]";
|
|
12
|
+
readonly icon: "flex h-[1.0625rem] w-[1.0625rem] items-center justify-center";
|
|
13
|
+
readonly label: "text-[0.71875rem] font-medium leading-[0.875rem]";
|
|
14
|
+
};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export type UnderlineTabsSize = 'md' | 'sm';
|
|
3
|
+
/**
|
|
4
|
+
* `primary`: the page's own tabs; the selected label turns ink.
|
|
5
|
+
* `secondary`: tabs nested inside a section; flush, padded, semibold, the
|
|
6
|
+
* selected label turns brand. Read by `size="sm"` only.
|
|
7
|
+
*/
|
|
8
|
+
export type UnderlineTabsLevel = 'primary' | 'secondary';
|
|
2
9
|
export interface UnderlineTabItem<K extends string = string> {
|
|
3
10
|
key: K;
|
|
4
11
|
label: React.ReactNode;
|
|
@@ -15,6 +22,14 @@ export interface UnderlineTabItem<K extends string = string> {
|
|
|
15
22
|
* the DOM does not contain; passing `content` is the fix.
|
|
16
23
|
*/
|
|
17
24
|
content?: React.ReactNode;
|
|
25
|
+
/** Not selectable: drawn at 40% and skipped by the arrow keys. */
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The browser tooltip on the tab (its `title`), read out as its
|
|
29
|
+
* description: why a disabled tab is out of reach ("Corporate memberships
|
|
30
|
+
* cannot be gifted").
|
|
31
|
+
*/
|
|
32
|
+
hint?: string;
|
|
18
33
|
}
|
|
19
34
|
export interface UnderlineTabsProps<K extends string = string> {
|
|
20
35
|
items: UnderlineTabItem<K>[];
|
|
@@ -22,10 +37,14 @@ export interface UnderlineTabsProps<K extends string = string> {
|
|
|
22
37
|
onChange: (key: K) => void;
|
|
23
38
|
/** Names the tablist. Required — an unnamed tablist gives no context. */
|
|
24
39
|
ariaLabel: string;
|
|
40
|
+
/** `md` (default): the back-office strip. `sm`: the Quick Donation / Quick Membership strip. */
|
|
41
|
+
size?: UnderlineTabsSize;
|
|
42
|
+
/** See {@link UnderlineTabsLevel}. Default `primary`. Read by `size="sm"` only. */
|
|
43
|
+
level?: UnderlineTabsLevel;
|
|
25
44
|
className?: string;
|
|
26
45
|
'data-testid'?: string;
|
|
27
46
|
}
|
|
28
|
-
export declare function UnderlineTabs<K extends string = string>({ items, value, onChange, ariaLabel, className, 'data-testid': dataTestId, }: UnderlineTabsProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function UnderlineTabs<K extends string = string>({ items, value, onChange, ariaLabel, size, level, className, 'data-testid': dataTestId, }: UnderlineTabsProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
29
48
|
export declare namespace UnderlineTabs {
|
|
30
49
|
var displayName: string;
|
|
31
50
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { UnderlineTabs } from './UnderlineTabs';
|
|
2
|
-
export type { UnderlineTabsProps, UnderlineTabItem } from './UnderlineTabs';
|
|
2
|
+
export type { UnderlineTabsProps, UnderlineTabItem, UnderlineTabsSize, UnderlineTabsLevel } from './UnderlineTabs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface UnderlineTabsSlots {
|
|
2
|
+
base: string;
|
|
3
|
+
tabList: string;
|
|
4
|
+
cursor: string;
|
|
5
|
+
tab: string;
|
|
6
|
+
tabContent: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const underlineTabsSlots: Record<'md' | 'sm-primary' | 'sm-secondary', UnderlineTabsSlots>;
|
|
9
|
+
/** Added to the `md` cursor under reduced motion: it jumps instead of sliding. */
|
|
10
|
+
export declare const stillCursorClass = "data-[animated=true]:transition-none";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { WizardShell } from './WizardShell';
|
|
2
|
-
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellLabels, } from './types';
|
|
2
|
+
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellTotalBadge, WizardShellLabels, } from './types';
|
|
@@ -28,10 +28,16 @@ export interface WizardShellSecondaryAction {
|
|
|
28
28
|
* the return covers less than the order, `owes` reads "Customer owes" when the
|
|
29
29
|
* balance runs the other way.
|
|
30
30
|
*/
|
|
31
|
+
export interface WizardShellTotalBadge {
|
|
32
|
+
label: string;
|
|
33
|
+
tone: 'warn' | 'neutral' | 'ok';
|
|
34
|
+
}
|
|
31
35
|
export interface WizardShellTotalRow {
|
|
32
36
|
label: string;
|
|
33
37
|
amount?: Money;
|
|
34
|
-
|
|
38
|
+
/** Renders the amount as a counter against this total: "Assigned $40.00 of $46.00". */
|
|
39
|
+
of?: Money;
|
|
40
|
+
badge?: 'partial' | 'owes' | WizardShellTotalBadge;
|
|
35
41
|
}
|
|
36
42
|
export interface WizardShellLabels {
|
|
37
43
|
back?: string;
|
|
@@ -40,6 +46,8 @@ export interface WizardShellLabels {
|
|
|
40
46
|
cancel?: string;
|
|
41
47
|
partialBadge?: string;
|
|
42
48
|
owesBadge?: string;
|
|
49
|
+
/** The word between `totalRow.amount` and `totalRow.of`. */
|
|
50
|
+
ofSeparator?: string;
|
|
43
51
|
}
|
|
44
52
|
export interface WizardShellProps {
|
|
45
53
|
onClose?: () => void;
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { MultiselectProps } from './Multiselect';
|
|
|
10
10
|
export { RichTextArea, RICH_TEXT_PRESETS } from './RichText';
|
|
11
11
|
export type { RichTextAreaProps } from './RichText';
|
|
12
12
|
export { DonationAmounts } from './DonationAmounts';
|
|
13
|
-
export type { DonationAmountsProps, DonationAmount, SelectedDonation, DonationLabels } from './DonationAmounts';
|
|
13
|
+
export type { DonationAmountsProps, DonationAmount, SelectedDonation, DonationLabels, DonationAmountsVariant, } from './DonationAmounts';
|
|
14
14
|
export { ExpireCartTimer } from './ExpireCartTimer';
|
|
15
15
|
export type { ExpireCartTimerProps } from './ExpireCartTimer';
|
|
16
16
|
export { EventDetails } from './Programs/EventDetails';
|
|
@@ -62,7 +62,7 @@ export type { AdminToolbarProps, AdminToolbarSearchWidth, AdminToolbarSize } fro
|
|
|
62
62
|
export { ToolbarButton } from './ToolbarButton';
|
|
63
63
|
export type { ToolbarButtonProps } from './ToolbarButton';
|
|
64
64
|
export { UnderlineTabs } from './UnderlineTabs';
|
|
65
|
-
export type { UnderlineTabsProps, UnderlineTabItem } from './UnderlineTabs';
|
|
65
|
+
export type { UnderlineTabsProps, UnderlineTabItem, UnderlineTabsSize, UnderlineTabsLevel } from './UnderlineTabs';
|
|
66
66
|
export { AdminFieldLabel, AdminTextField, adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelSuffixClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './AdminTextField';
|
|
67
67
|
export type { AdminTextFieldProps } from './AdminTextField';
|
|
68
68
|
export { RowActions } from './RowActions';
|
|
@@ -86,7 +86,7 @@ export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, SplitPaymentS
|
|
|
86
86
|
export { ModalShell, ModalShellHeader, ModalShellFooter } from './ModalShell';
|
|
87
87
|
export type { ModalShellProps, ModalShellHeaderProps, ModalShellFooterProps } from './ModalShell';
|
|
88
88
|
export { TileSelect } from './TileSelect';
|
|
89
|
-
export type { TileSelectProps, TileSelectOption, TileSelectVariant } from './TileSelect';
|
|
89
|
+
export type { TileSelectProps, TileSelectOption, TileSelectVariant, TileSelectSize } from './TileSelect';
|
|
90
90
|
export { PaymentTotalBanner } from './PaymentTotalBanner';
|
|
91
91
|
export type { PaymentTotalBannerProps } from './PaymentTotalBanner';
|
|
92
92
|
export { LoadingOverlay } from './LoadingOverlay';
|
|
@@ -107,8 +107,10 @@ export { DiscardGuard, useDiscardGuard, useDiscardGuardActions, useReportUnsaved
|
|
|
107
107
|
export type { DiscardGuardProps, DiscardGuardController, DiscardGuardActions } from './DiscardGuard';
|
|
108
108
|
export { Summary } from './Summary';
|
|
109
109
|
export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPostTotalRow, SummaryPrimaryAction, SummaryLabels, } from './Summary';
|
|
110
|
+
export { StepProgress } from './StepProgress';
|
|
111
|
+
export type { StepProgressProps, StepProgressStep, StepProgressLabels } from './StepProgress';
|
|
110
112
|
export { WizardShell } from './WizardShell';
|
|
111
|
-
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellLabels, } from './WizardShell';
|
|
113
|
+
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellTotalBadge, WizardShellLabels, } from './WizardShell';
|
|
112
114
|
export type { TenderError, DestinationLine, DestinationStatus, RecordTone } from './shared';
|
|
113
115
|
export { LineItemList } from './LineItemList';
|
|
114
116
|
export type { LineItemListProps, LineItemView, ItemSelection, LineItemState, LineItemRestockView, ItemDisposition, AmountOnlyView, LineItemListLabels, } from './LineItemList';
|
|
@@ -126,12 +128,16 @@ export { TenderMethods } from './TenderMethods';
|
|
|
126
128
|
export type { TenderMethodsProps, TenderView, TenderKind, TenderMethodsLabels } from './TenderMethods';
|
|
127
129
|
export { SplitTenderPanel } from './SplitTenderPanel';
|
|
128
130
|
export type { SplitTenderPanelProps, SplitPartView, SplitMethodOption, SplitTenderPanelLabels, } from './SplitTenderPanel';
|
|
131
|
+
export { RefundMethodCards } from './RefundMethodCards';
|
|
132
|
+
export type { RefundMethodCardsProps, RefundMethodCardsLabels, RefundMethodCardsError, RefundMethodView, RefundMethodKind, RefundMethodStatus, RefundMethodOption, RefundMethodAnotherMethod, RefundMethodPaidWith, } from './RefundMethodCards';
|
|
133
|
+
export { RefundProgressList } from './RefundProgressList';
|
|
134
|
+
export type { RefundProgressListProps, RefundProgressListLabels, RefundProgressPart, RefundProgressStatus, RefundProgressAction, } from './RefundProgressList';
|
|
129
135
|
export { PinField } from './PinField';
|
|
130
136
|
export type { PinFieldProps, PinFieldLabels } from './PinField';
|
|
131
137
|
export { OutcomeView } from './OutcomeView';
|
|
132
|
-
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel } from './OutcomeView';
|
|
133
|
-
export { FilterSelect } from './FilterSelect';
|
|
134
|
-
export type { FilterSelectProps, FilterSelectOption } from './FilterSelect';
|
|
138
|
+
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel, OutcomeViewKind, OutcomePaidWithLine, OutcomeGroup, OutcomeReceiptAction, OutcomeEmailReceipt, OutcomeChangeDue, } from './OutcomeView';
|
|
139
|
+
export { FilterSelect, FilterSelectGroup } from './FilterSelect';
|
|
140
|
+
export type { FilterSelectProps, FilterSelectOption, FilterSelectGroupProps } from './FilterSelect';
|
|
135
141
|
export { LoadMoreFooter } from './LoadMoreFooter';
|
|
136
142
|
export type { LoadMoreFooterProps, LoadMoreStatus } from './LoadMoreFooter';
|
|
137
143
|
export { CardList } from './CardList';
|
|
@@ -162,3 +168,5 @@ export { RecordTotals } from './RecordTotals';
|
|
|
162
168
|
export type { RecordTotalsProps, RecordTotalsRow } from './RecordTotals';
|
|
163
169
|
export { CellText, ChipStack } from './CellText';
|
|
164
170
|
export type { CellTextProps, CellTextVariant, ChipStackProps } from './CellText';
|
|
171
|
+
export { SessionExpiredCard } from './SessionExpiredCard';
|
|
172
|
+
export type { SessionExpiredCardProps } from './SessionExpiredCard';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface PrefillEdits<T> {
|
|
2
|
+
isUntouched: () => boolean;
|
|
3
|
+
markEdited: (emitted: T) => void;
|
|
4
|
+
markUntouched: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const usePrefillEdits: <T>(source: T, isSame?: (a: T, b: T) => boolean) => PrefillEdits<T>;
|
|
7
|
+
export declare const useReplaceWhileUntouched: (isUntouched: () => boolean, replace: (text: string) => void) => import('react').RefObject<HTMLInputElement | null>;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
interface HeroUIProviderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* App-wide accessible name for the corner close button of every DS `Modal` and `Drawer`, e.g. `"Fermer"`.
|
|
6
|
+
* HeroUI hard-codes `"Close"`, so a localized app sets this once instead of on each overlay.
|
|
7
|
+
*
|
|
8
|
+
* A `closeLabel` on a `Modal` / `Drawer` wins over it. A nested provider without one inherits the
|
|
9
|
+
* outer provider's. With none anywhere, HeroUI's own button is rendered untouched.
|
|
10
|
+
*/
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* BCP 47 locale for the React Aria strings HeroUI renders, e.g. `"fr-FR"`: the hidden "Dismiss"
|
|
14
|
+
* buttons of overlays, date and number formatting. Without it HeroUI uses `"en-US"`.
|
|
15
|
+
*/
|
|
16
|
+
locale?: string;
|
|
4
17
|
}
|
|
5
|
-
export declare function HeroUIProvider({ children }: HeroUIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function HeroUIProvider({ children, closeLabel, locale }: HeroUIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
19
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app-wide default accessible name of an overlay's corner close button.
|
|
3
|
+
*
|
|
4
|
+
* HeroUI renders that button with the literal `aria-label="Close"`, so a French
|
|
5
|
+
* or Spanish screen announces English. `HeroUIProvider` carries a translated
|
|
6
|
+
* label here and the DS `Modal` / `Drawer` read it.
|
|
7
|
+
*
|
|
8
|
+
* A leaf file on purpose: `providers/` and `components/` never import each
|
|
9
|
+
* other. Both import this context, and neither imports the other's barrel.
|
|
10
|
+
* Split from `HeroUIProvider.tsx` so that file exports a component only (fast
|
|
11
|
+
* refresh), as `density.ts` does for the density context.
|
|
12
|
+
*
|
|
13
|
+
* `undefined` means "no app-wide label": the overlay keeps HeroUI's own button
|
|
14
|
+
* and its `"Close"` name untouched.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CloseLabelContext: import('react').Context<string | undefined>;
|
|
17
|
+
/** The label of the nearest `HeroUIProvider` that set `closeLabel`; `undefined` outside one. */
|
|
18
|
+
export declare function useCloseLabel(): string | undefined;
|
package/dist/tailwind/index.cjs
CHANGED
|
@@ -277,6 +277,14 @@ var posSurfaceTokens = {
|
|
|
277
277
|
hair: "#F0F0F1",
|
|
278
278
|
page: "#FBFBFB",
|
|
279
279
|
field: "#E5E5E5",
|
|
280
|
+
/** A hairline under the pointer (`default-300`). */
|
|
281
|
+
"line-strong": "#D4D4D8",
|
|
282
|
+
/** `--ink`: body text (`default-900`). */
|
|
283
|
+
ink: "#18181B",
|
|
284
|
+
/** `--muted`: secondary text and eyebrows, 4.83:1 on white (`default-500`). */
|
|
285
|
+
muted: "#71717A",
|
|
286
|
+
/** Placeholder text (`default-400`). Never for content: 2.56:1 on white. */
|
|
287
|
+
faint: "#A1A1AA",
|
|
280
288
|
/** `--okb` / `--okf` */
|
|
281
289
|
"ok-fill": "#EAF3DE",
|
|
282
290
|
ok: "#3B6D11",
|
package/dist/tailwind/index.mjs
CHANGED
|
@@ -238,6 +238,14 @@ var posSurfaceTokens = {
|
|
|
238
238
|
hair: "#F0F0F1",
|
|
239
239
|
page: "#FBFBFB",
|
|
240
240
|
field: "#E5E5E5",
|
|
241
|
+
/** A hairline under the pointer (`default-300`). */
|
|
242
|
+
"line-strong": "#D4D4D8",
|
|
243
|
+
/** `--ink`: body text (`default-900`). */
|
|
244
|
+
ink: "#18181B",
|
|
245
|
+
/** `--muted`: secondary text and eyebrows, 4.83:1 on white (`default-500`). */
|
|
246
|
+
muted: "#71717A",
|
|
247
|
+
/** Placeholder text (`default-400`). Never for content: 2.56:1 on white. */
|
|
248
|
+
faint: "#A1A1AA",
|
|
241
249
|
/** `--okb` / `--okf` */
|
|
242
250
|
"ok-fill": "#EAF3DE",
|
|
243
251
|
ok: "#3B6D11",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pxClasses: (root: Element) => string[];
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
* The refund wizard is a pixel-signed-off surface: every fill, hairline and
|
|
5
5
|
* status tone in it comes from the Jul-28 POS mockup, and "close enough from
|
|
6
6
|
* the nearest scale step" is not the contract. Most of that mockup already
|
|
7
|
-
* agrees with what we ship — its `--tc` is `primary-500` to the byte
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* agrees with what we ship — its `--tc` is `primary-500` to the byte, so the
|
|
8
|
+
* brand is consumed as `primary` and is deliberately NOT repeated here.
|
|
9
|
+
*
|
|
10
|
+
* Its text tones (`--ink`, `--muted`, the placeholder and hover greys) equal
|
|
11
|
+
* HeroUI's stock `default-900`/`500`/`400`/`300`, but they are kept below as
|
|
12
|
+
* DS tokens: POS and Quick surfaces style text with `pos-*`, never with the
|
|
13
|
+
* stock HeroUI semantic scale (decision of 2026-10-21). `--muted2`/`--sec`
|
|
14
|
+
* were already here as `neutral` / `neutral-fill`.
|
|
11
15
|
*
|
|
12
16
|
* What IS here is the remainder: the two hairlines and the warm status
|
|
13
17
|
* fill/text pairs, none of which have an equivalent in either scale. They are
|
|
@@ -28,6 +32,14 @@ export declare const posSurfaceTokens: {
|
|
|
28
32
|
readonly hair: "#F0F0F1";
|
|
29
33
|
readonly page: "#FBFBFB";
|
|
30
34
|
readonly field: "#E5E5E5";
|
|
35
|
+
/** A hairline under the pointer (`default-300`). */
|
|
36
|
+
readonly 'line-strong': "#D4D4D8";
|
|
37
|
+
/** `--ink`: body text (`default-900`). */
|
|
38
|
+
readonly ink: "#18181B";
|
|
39
|
+
/** `--muted`: secondary text and eyebrows, 4.83:1 on white (`default-500`). */
|
|
40
|
+
readonly muted: "#71717A";
|
|
41
|
+
/** Placeholder text (`default-400`). Never for content: 2.56:1 on white. */
|
|
42
|
+
readonly faint: "#A1A1AA";
|
|
31
43
|
/** `--okb` / `--okf` */
|
|
32
44
|
readonly 'ok-fill': "#EAF3DE";
|
|
33
45
|
readonly ok: "#3B6D11";
|