@veevarts/design-system 2.1.0-beta.7 → 2.1.0-beta.9
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/dist/index.cjs +8 -8
- package/dist/index.js +6630 -5230
- package/dist/patterns/ActivityTimeline/ActivityTimeline.d.ts +3 -0
- package/dist/patterns/ActivityTimeline/index.d.ts +2 -0
- package/dist/patterns/ActivityTimeline/styles.d.ts +15 -0
- package/dist/patterns/ActivityTimeline/types.d.ts +15 -0
- package/dist/patterns/AdminTable/AdminTable.d.ts +1 -0
- package/dist/patterns/AdminTable/styles.d.ts +6 -0
- package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +1 -0
- package/dist/patterns/AmountList/AmountList.d.ts +3 -0
- package/dist/patterns/AmountList/index.d.ts +2 -0
- package/dist/patterns/AmountList/styles.d.ts +23 -0
- package/dist/patterns/AmountList/types.d.ts +26 -0
- package/dist/patterns/CardList/CardList.d.ts +3 -0
- package/dist/patterns/CardList/index.d.ts +2 -0
- package/dist/patterns/CardList/styles.d.ts +16 -0
- package/dist/patterns/CardList/types.d.ts +19 -0
- package/dist/patterns/CardStack/CardStack.d.ts +7 -0
- package/dist/patterns/CardStack/index.d.ts +2 -0
- package/dist/patterns/CardStack/styles.d.ts +2 -0
- package/dist/patterns/CellText/CellText.d.ts +16 -0
- package/dist/patterns/CellText/index.d.ts +2 -0
- package/dist/patterns/CellText/styles.d.ts +7 -0
- package/dist/patterns/FilterSelect/FilterSelect.d.ts +3 -0
- package/dist/patterns/FilterSelect/index.d.ts +2 -0
- package/dist/patterns/FilterSelect/styles.d.ts +14 -0
- package/dist/patterns/FilterSelect/types.d.ts +13 -0
- package/dist/patterns/KeyValueChip/KeyValueChip.d.ts +1 -0
- package/dist/patterns/KeyValueRows/KeyValueRows.d.ts +13 -0
- package/dist/patterns/KeyValueRows/index.d.ts +2 -0
- package/dist/patterns/KeyValueRows/styles.d.ts +8 -0
- package/dist/patterns/LineItemRows/LineItemRows.d.ts +17 -0
- package/dist/patterns/LineItemRows/index.d.ts +2 -0
- package/dist/patterns/LineItemRows/styles.d.ts +13 -0
- package/dist/patterns/ListPanel/ListPanel.d.ts +2 -0
- package/dist/patterns/LoadMoreFooter/LoadMoreFooter.d.ts +3 -0
- package/dist/patterns/LoadMoreFooter/index.d.ts +2 -0
- package/dist/patterns/LoadMoreFooter/styles.d.ts +7 -0
- package/dist/patterns/LoadMoreFooter/types.d.ts +10 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts +1 -0
- package/dist/patterns/PillTabs/PillTabs.d.ts +3 -0
- package/dist/patterns/PillTabs/ids.d.ts +9 -0
- package/dist/patterns/PillTabs/index.d.ts +3 -0
- package/dist/patterns/PillTabs/styles.d.ts +10 -0
- package/dist/patterns/PillTabs/types.d.ts +13 -0
- package/dist/patterns/RecordCard/RecordCard.d.ts +3 -0
- package/dist/patterns/RecordCard/index.d.ts +2 -0
- package/dist/patterns/RecordCard/styles.d.ts +15 -0
- package/dist/patterns/RecordCard/types.d.ts +17 -0
- package/dist/patterns/RecordHeader/RecordHeader.d.ts +3 -0
- package/dist/patterns/RecordHeader/index.d.ts +2 -0
- package/dist/patterns/RecordHeader/styles.d.ts +43 -0
- package/dist/patterns/RecordHeader/types.d.ts +30 -0
- package/dist/patterns/RecordLayout/RecordLayout.d.ts +3 -0
- package/dist/patterns/RecordLayout/index.d.ts +2 -0
- package/dist/patterns/RecordLayout/styles.d.ts +8 -0
- package/dist/patterns/RecordLayout/types.d.ts +6 -0
- package/dist/patterns/RecordTotals/RecordTotals.d.ts +19 -0
- package/dist/patterns/RecordTotals/index.d.ts +2 -0
- package/dist/patterns/RecordTotals/styles.d.ts +19 -0
- package/dist/patterns/RelatedRecordList/RelatedRecordList.d.ts +3 -0
- package/dist/patterns/RelatedRecordList/index.d.ts +2 -0
- package/dist/patterns/RelatedRecordList/styles.d.ts +19 -0
- package/dist/patterns/RelatedRecordList/types.d.ts +17 -0
- package/dist/patterns/StatTiles/StatTiles.d.ts +3 -0
- package/dist/patterns/StatTiles/index.d.ts +2 -0
- package/dist/patterns/StatTiles/styles.d.ts +8 -0
- package/dist/patterns/StatTiles/types.d.ts +12 -0
- package/dist/patterns/StatusChip/StatusChip.d.ts +3 -3
- package/dist/patterns/Summary/components/ActionBar.d.ts +2 -0
- package/dist/patterns/Summary/components/GrandTotalRow.d.ts +1 -0
- package/dist/patterns/Summary/components/ItemRow.d.ts +1 -0
- package/dist/patterns/Summary/components/SummaryBody.d.ts +4 -1
- package/dist/patterns/Summary/components/TotalsLineRow.d.ts +3 -2
- package/dist/patterns/Summary/types.d.ts +40 -9
- package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
- package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
- package/dist/patterns/index.d.ts +33 -1
- package/dist/patterns/shared/hasContent.d.ts +2 -0
- package/dist/patterns/shared/index.d.ts +1 -0
- package/dist/patterns/shared/motion.d.ts +6 -0
- package/dist/patterns/shared/recordTone.d.ts +9 -0
- package/dist/patterns/shared/rem.d.ts +4 -0
- package/dist/patterns/shared/useContainerWidth.d.ts +6 -0
- package/dist/tailwind/index.cjs +17 -1
- package/dist/tailwind/index.d.ts +39 -0
- package/dist/tailwind/index.mjs +17 -1
- package/dist/test/ReducedMotion.d.ts +4 -0
- package/dist/test/RootFontSize.d.ts +5 -0
- package/dist/test/container-width.d.ts +14 -0
- package/dist/test/contrast.d.ts +1 -0
- package/dist/test/px-classes.d.ts +2 -0
- package/dist/test/root-font-size.d.ts +8 -0
- package/dist/tokens/pos-surface.d.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const RECORD_TOTALS_WIDE_REM = 37.5;
|
|
2
|
+
export declare const recordTotalsClass: {
|
|
3
|
+
readonly base: "mx-5 border-t border-pos-hair pb-[1.125rem] pt-2.5";
|
|
4
|
+
readonly rowWide: "flex items-baseline gap-4";
|
|
5
|
+
readonly rowNarrow: "flex flex-wrap items-baseline gap-x-3";
|
|
6
|
+
readonly labelWide: "shrink-0 grow-0 basis-[11.875rem]";
|
|
7
|
+
readonly labelNarrow: "flex-auto";
|
|
8
|
+
readonly noteWide: "min-w-0 flex-1";
|
|
9
|
+
readonly noteNarrow: "order-3 mt-px basis-full";
|
|
10
|
+
readonly row: "py-2";
|
|
11
|
+
readonly label: "text-[0.875rem] text-default-900";
|
|
12
|
+
readonly note: "text-[0.8125rem] text-default-500";
|
|
13
|
+
readonly value: "ml-auto shrink-0 whitespace-nowrap text-right text-[0.875rem] tabular-nums text-default-900";
|
|
14
|
+
readonly totalRule: "mt-1.5 border-t border-pos-line";
|
|
15
|
+
readonly totalRow: "pt-3";
|
|
16
|
+
readonly totalLabel: "text-[0.9375rem] font-bold text-default-900";
|
|
17
|
+
readonly totalValue: "ml-auto shrink-0 whitespace-nowrap text-right text-[1.0625rem] font-bold tabular-nums text-default-900";
|
|
18
|
+
readonly memo: "mt-2 text-[0.78125rem] leading-[1.6] text-default-500";
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const relatedRecordListClass: {
|
|
2
|
+
readonly base: "overflow-hidden rounded-2xl border border-pos-line bg-white shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
3
|
+
readonly header: "flex flex-wrap items-center gap-2 px-5 pt-4";
|
|
4
|
+
readonly title: "m-0 min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
|
|
5
|
+
readonly count: "rounded-full bg-default-100 px-2 py-px text-[0.75rem] font-semibold text-default-600";
|
|
6
|
+
readonly list: "m-0 list-none p-0";
|
|
7
|
+
readonly item: "border-t border-pos-hair";
|
|
8
|
+
readonly itemFirstHeadless: "border-t-0";
|
|
9
|
+
readonly row: "flex w-full items-center gap-2.5 px-5 py-3 text-left";
|
|
10
|
+
readonly rowInteractive: "cursor-pointer outline-none transition-colors hover:bg-default-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
11
|
+
readonly rowBody: "flex min-w-0 flex-1 flex-col";
|
|
12
|
+
readonly rowHead: "flex min-w-0 flex-wrap items-center gap-2";
|
|
13
|
+
readonly primaryLinked: "min-w-0 text-[0.875rem] font-normal text-primary [overflow-wrap:anywhere]";
|
|
14
|
+
readonly primaryPlain: "min-w-0 text-[0.875rem] font-normal text-default-900 [overflow-wrap:anywhere]";
|
|
15
|
+
readonly secondary: "mt-[0.1875rem] block min-w-0 truncate text-[0.8125rem] text-default-500";
|
|
16
|
+
readonly amount: "max-w-[45%] shrink-0 text-right text-[0.875rem] font-semibold tabular-nums text-default-900 [overflow-wrap:anywhere]";
|
|
17
|
+
readonly empty: "min-w-0 px-5 pb-5 pt-[0.875rem] text-[0.875rem] text-default-500 [overflow-wrap:anywhere]";
|
|
18
|
+
readonly emptyHeadless: "pt-5";
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface RelatedRecordRow {
|
|
3
|
+
id: string;
|
|
4
|
+
primary: ReactNode;
|
|
5
|
+
chip?: ReactNode;
|
|
6
|
+
secondary?: ReactNode;
|
|
7
|
+
amount?: ReactNode;
|
|
8
|
+
amountTone?: 'positive' | 'negative' | 'neutral';
|
|
9
|
+
onSelect?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface RelatedRecordListProps {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
count?: number;
|
|
14
|
+
rows: RelatedRecordRow[];
|
|
15
|
+
emptyContent: ReactNode;
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const STAT_TILES_PAIR_MIN = 560;
|
|
2
|
+
export declare const statTilesClass: {
|
|
3
|
+
readonly base: "grid gap-3";
|
|
4
|
+
readonly tile: "min-w-0 rounded-[14px] border border-pos-line bg-white px-[18px] py-4 shadow-[0_1px_4px_rgba(0,0,0,.06),0_4px_12px_rgba(0,0,0,.06)]";
|
|
5
|
+
readonly value: "text-[23px] font-bold leading-[1.2] tracking-[-.02em] tabular-nums text-default-900 [overflow-wrap:anywhere]";
|
|
6
|
+
readonly label: "mt-[5px] text-[13.5px] text-default-500";
|
|
7
|
+
readonly caption: "mt-0.5 text-[12.5px] text-default-500";
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
|
+
export interface StatTileItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
tone?: RecordTone;
|
|
7
|
+
caption?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface StatTilesProps {
|
|
10
|
+
items: StatTileItem[];
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ChipProps } from '../../components';
|
|
3
3
|
/** Domain-agnostic lifecycle states an admin row can be in. */
|
|
4
|
-
export type StatusChipStatus = 'active' | 'archived' | 'inactive' | 'draft' | 'pending' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
4
|
+
export type StatusChipStatus = 'active' | 'archived' | 'inactive' | 'draft' | 'pending' | 'success' | 'warning' | 'danger' | 'neutral' | 'info' | 'violet';
|
|
5
5
|
export interface StatusChipProps {
|
|
6
6
|
/** Lifecycle state — selects the colour/tone only, never the text. */
|
|
7
7
|
status: StatusChipStatus;
|
|
@@ -12,12 +12,12 @@ export interface StatusChipProps {
|
|
|
12
12
|
* `'dot'` variant: a soft, radius-full pill with a leading tone dot,
|
|
13
13
|
* 12px / weight-600 text, tuned for dense admin lifecycle tables.
|
|
14
14
|
*/
|
|
15
|
-
variant?: ChipProps['variant'] | 'dot';
|
|
15
|
+
variant?: ChipProps['variant'] | 'dot' | 'plain';
|
|
16
16
|
/** Chip size. Default `'sm'`. Ignored by `variant="dot"`. */
|
|
17
17
|
size?: ChipProps['size'];
|
|
18
18
|
/**
|
|
19
19
|
* Override the colour derived from `status`. Escape hatch for the
|
|
20
|
-
* rare state not covered by `StatusChipStatus`. Ignored by `variant="dot"`.
|
|
20
|
+
* rare state not covered by `StatusChipStatus`. Ignored by `variant="dot"` and `variant="plain"`.
|
|
21
21
|
*/
|
|
22
22
|
color?: ChipProps['color'];
|
|
23
23
|
/** Optional leading element (dot, icon). Ignored by `variant="dot"`. */
|
|
@@ -12,6 +12,8 @@ export interface ActionBarProps {
|
|
|
12
12
|
cartAriaLabel: string;
|
|
13
13
|
/** Optional caption rendered under the open-layer CTA (e.g. installment breakdown). */
|
|
14
14
|
ctaCaption?: React.ReactNode;
|
|
15
|
+
/** Optional error rendered ABOVE the CTA, so it clears the screen edge and the thumb. */
|
|
16
|
+
ctaError?: React.ReactNode;
|
|
15
17
|
/** Expand the summary — the closed-bar cart button opens it on click. */
|
|
16
18
|
onToggleOpen?: () => void;
|
|
17
19
|
classNames: SummaryClassNames;
|
|
@@ -9,9 +9,12 @@ export interface SummaryBodyProps {
|
|
|
9
9
|
locale: string;
|
|
10
10
|
onRemoveItem?: (id: string) => void;
|
|
11
11
|
removeAriaLabel: string;
|
|
12
|
-
|
|
12
|
+
onRemoveTotalRow?: (id: string) => void;
|
|
13
|
+
removeTotalRowAriaLabel: string;
|
|
14
|
+
/** Show the per-item and per-totals-row remove controls. Defaults to `true`. */
|
|
13
15
|
showRemoveButton?: boolean;
|
|
14
16
|
emptyState?: React.ReactNode;
|
|
17
|
+
compact?: boolean;
|
|
15
18
|
classNames: SummaryClassNames;
|
|
16
19
|
}
|
|
17
20
|
export declare const SummaryBody: React.FC<SummaryBodyProps>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SummaryTotalRow } from '../types';
|
|
3
3
|
export interface TotalsLineRowProps {
|
|
4
|
-
row:
|
|
4
|
+
row: SummaryTotalRow;
|
|
5
5
|
locale: string;
|
|
6
6
|
emphasized: boolean;
|
|
7
7
|
onRemove?: (id: string) => void;
|
|
8
8
|
removeAriaLabel?: string;
|
|
9
9
|
/** Show the per-row remove control. Defaults to `true`. */
|
|
10
10
|
showRemoveButton?: boolean;
|
|
11
|
+
compact?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const TotalsLineRow: React.FC<TotalsLineRowProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Money } from '../../utils/money';
|
|
3
|
+
import { RecordTone } from '../shared/recordTone';
|
|
3
4
|
export type { Money } from '../../utils/money';
|
|
4
5
|
/**
|
|
5
6
|
* A generic, parametrizable detail row rendered under a line item — an icon +
|
|
@@ -56,6 +57,12 @@ export interface SummaryLineItem {
|
|
|
56
57
|
* show an auto-renewal note and a pay-by-installments line.
|
|
57
58
|
*/
|
|
58
59
|
details?: SummaryItemDetail[];
|
|
60
|
+
/** Pre-formatted list price, rendered struck through before `amount`. */
|
|
61
|
+
originalAmount?: string;
|
|
62
|
+
/** Node rendered under the amount, right-aligned (e.g. a `StatusChip`). */
|
|
63
|
+
trailing?: ReactNode;
|
|
64
|
+
/** Tints the whole row with the tone's fill. */
|
|
65
|
+
tone?: RecordTone;
|
|
59
66
|
}
|
|
60
67
|
/** The "Pay Service fee" radio-toggle row. */
|
|
61
68
|
export interface SummaryServiceFee {
|
|
@@ -66,18 +73,18 @@ export interface SummaryServiceFee {
|
|
|
66
73
|
/** Fires when the row/radio is toggled. */
|
|
67
74
|
onToggle?: () => void;
|
|
68
75
|
}
|
|
69
|
-
/** A plain totals row (Subtotal, Taxes). */
|
|
76
|
+
/** A plain totals row (Subtotal, Discounts, Taxes). */
|
|
70
77
|
export interface SummaryTotalRow {
|
|
71
78
|
/** Stable key for `data-testid` (e.g. 'subtotal', 'taxes'). */
|
|
72
79
|
key: string;
|
|
73
80
|
label: ReactNode;
|
|
74
81
|
amount: Money;
|
|
82
|
+
/** Stable id; when set and `onRemoveTotalRow` exists, the row shows the remove control (e.g. one row per removable discount). */
|
|
83
|
+
id?: string;
|
|
75
84
|
}
|
|
76
85
|
/**
|
|
77
|
-
* A post-total row — the same flat shape as {@link SummaryTotalRow}
|
|
78
|
-
*
|
|
79
|
-
* trash remove control the line items use. Kept as its own interface so the
|
|
80
|
-
* pre-total `rows` — where an id/remove has no meaning — stay untouched.
|
|
86
|
+
* A post-total row — the same flat shape as {@link SummaryTotalRow}; rows with
|
|
87
|
+
* an `id` show the trash remove control when `onRemovePostTotalRow` exists.
|
|
81
88
|
*/
|
|
82
89
|
export interface SummaryPostTotalRow extends SummaryTotalRow {
|
|
83
90
|
/** Stable id; when set and `onRemovePostTotalRow` exists, the row shows the remove control. */
|
|
@@ -94,6 +101,8 @@ export interface SummaryPrimaryAction {
|
|
|
94
101
|
export interface SummaryLabels {
|
|
95
102
|
/** Aria label for the per-item remove control. Default "Remove item". */
|
|
96
103
|
removeAriaLabel?: string;
|
|
104
|
+
/** Aria label for the per-totals-row remove control. Default "Remove discount". */
|
|
105
|
+
removeTotalRowAriaLabel?: string;
|
|
97
106
|
/** Aria label for the per-post-total-row remove control. Default "Remove applied code". */
|
|
98
107
|
removePostTotalRowAriaLabel?: string;
|
|
99
108
|
/** Aria label for the collapse/expand press target. Default "Toggle summary". */
|
|
@@ -132,6 +141,8 @@ export interface SummaryClassNames {
|
|
|
132
141
|
cta?: string;
|
|
133
142
|
/** The caption rendered under the CTA. */
|
|
134
143
|
ctaCaption?: string;
|
|
144
|
+
/** The error rendered next to the CTA. */
|
|
145
|
+
ctaError?: string;
|
|
135
146
|
/** Mobile compact bottom-bar. */
|
|
136
147
|
mobileBar?: string;
|
|
137
148
|
/** Mobile cart button. */
|
|
@@ -150,7 +161,11 @@ export interface SummaryProps {
|
|
|
150
161
|
items?: SummaryLineItem[];
|
|
151
162
|
/** Optional "Pay Service fee" radio-toggle row. */
|
|
152
163
|
serviceFee?: SummaryServiceFee;
|
|
153
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* Plain totals rows rendered above the Total (Subtotal, Discounts, Taxes).
|
|
166
|
+
* Rows with an `id` show the trash remove control when `onRemoveTotalRow`
|
|
167
|
+
* is provided (same gating as the item remove, incl. `showRemoveButton`).
|
|
168
|
+
*/
|
|
154
169
|
rows?: SummaryTotalRow[];
|
|
155
170
|
/** The emphasized Total row (label default "Total"). */
|
|
156
171
|
total: {
|
|
@@ -182,9 +197,16 @@ export interface SummaryProps {
|
|
|
182
197
|
*/
|
|
183
198
|
ctaCaption?: ReactNode;
|
|
184
199
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
200
|
+
* An optional error (e.g. a rejected request) shown in danger text next to
|
|
201
|
+
* the CTA: under it in the card layout, ABOVE it in the mobile bottom bar,
|
|
202
|
+
* where the sticky CTA sits at the screen edge and a message under it would
|
|
203
|
+
* hug the edge and sit beneath the thumb. Rendered as `role="alert"`.
|
|
204
|
+
*/
|
|
205
|
+
ctaError?: ReactNode;
|
|
206
|
+
/**
|
|
207
|
+
* Whether the remove (trash) controls are shown — per-item, per-totals-row
|
|
208
|
+
* and per-post-total-row alike. Defaults to `true`; pass `false` to hide them
|
|
209
|
+
* even when `onRemoveItem` / `onRemoveTotalRow` / `onRemovePostTotalRow` are wired. Independent
|
|
188
210
|
* of the handlers so a host can keep them but suppress the controls.
|
|
189
211
|
*/
|
|
190
212
|
showRemoveButton?: boolean;
|
|
@@ -213,6 +235,8 @@ export interface SummaryProps {
|
|
|
213
235
|
primaryAction?: SummaryPrimaryAction;
|
|
214
236
|
/** When provided, item rows show a red trash remove control. */
|
|
215
237
|
onRemoveItem?: (id: string) => void;
|
|
238
|
+
/** When provided, totals rows (above the Total) with an `id` show the same red trash remove control. */
|
|
239
|
+
onRemoveTotalRow?: (id: string) => void;
|
|
216
240
|
/** When provided, post-total rows with an `id` show the same red trash remove control. */
|
|
217
241
|
onRemovePostTotalRow?: (id: string) => void;
|
|
218
242
|
/**
|
|
@@ -231,6 +255,13 @@ export interface SummaryProps {
|
|
|
231
255
|
/** Rendered when there are no items. */
|
|
232
256
|
emptyState?: ReactNode;
|
|
233
257
|
labels?: SummaryLabels;
|
|
258
|
+
/**
|
|
259
|
+
* Visual density. `'compact'` drops the card's title and the prices row, removes the
|
|
260
|
+
* `{qty} x` prefix, separates items with dividers, renders the totals rows
|
|
261
|
+
* small and muted and a smaller Total without a divider above it (e.g. a POS
|
|
262
|
+
* cart panel). Defaults to `'default'`.
|
|
263
|
+
*/
|
|
264
|
+
density?: 'default' | 'compact';
|
|
234
265
|
'data-testid'?: string;
|
|
235
266
|
className?: string;
|
|
236
267
|
/** Per-slot class overrides (Design-System `classNames` convention). */
|
|
@@ -25,6 +25,7 @@ export interface TableSkeletonProps {
|
|
|
25
25
|
barHeight?: number;
|
|
26
26
|
/** Right-aligns the last column's bar, for a trailing numeric or actions column. */
|
|
27
27
|
alignLastRight?: boolean;
|
|
28
|
+
appearance?: 'pulse' | 'shimmer';
|
|
28
29
|
className?: string;
|
|
29
30
|
classNames?: TableSkeletonClassNames;
|
|
30
31
|
'data-testid'?: string;
|
|
@@ -10,6 +10,7 @@ export type ToolbarButtonProps = Omit<ComponentPropsWithoutRef<typeof Button>, '
|
|
|
10
10
|
* count straight through without guarding it.
|
|
11
11
|
*/
|
|
12
12
|
count?: number;
|
|
13
|
+
appearance?: 'pill' | 'outline';
|
|
13
14
|
/** Forwarded as `data-testid`. */
|
|
14
15
|
testId?: string;
|
|
15
16
|
};
|
|
@@ -23,6 +24,7 @@ export declare const ToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<Om
|
|
|
23
24
|
* count straight through without guarding it.
|
|
24
25
|
*/
|
|
25
26
|
count?: number;
|
|
27
|
+
appearance?: "pill" | "outline";
|
|
26
28
|
/** Forwarded as `data-testid`. */
|
|
27
29
|
testId?: string;
|
|
28
30
|
} & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ export { Summary } from './Summary';
|
|
|
99
99
|
export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPostTotalRow, SummaryPrimaryAction, SummaryLabels, } from './Summary';
|
|
100
100
|
export { WizardShell } from './WizardShell';
|
|
101
101
|
export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellLabels, } from './WizardShell';
|
|
102
|
-
export type { TenderError, DestinationLine, DestinationStatus } from './shared';
|
|
102
|
+
export type { TenderError, DestinationLine, DestinationStatus, RecordTone } from './shared';
|
|
103
103
|
export { LineItemList } from './LineItemList';
|
|
104
104
|
export type { LineItemListProps, LineItemView, ItemSelection, LineItemState, LineItemRestockView, ItemDisposition, AmountOnlyView, LineItemListLabels, } from './LineItemList';
|
|
105
105
|
export { MetaCard } from './MetaCard';
|
|
@@ -120,3 +120,35 @@ export { PinField } from './PinField';
|
|
|
120
120
|
export type { PinFieldProps, PinFieldLabels } from './PinField';
|
|
121
121
|
export { OutcomeView } from './OutcomeView';
|
|
122
122
|
export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel } from './OutcomeView';
|
|
123
|
+
export { FilterSelect } from './FilterSelect';
|
|
124
|
+
export type { FilterSelectProps, FilterSelectOption } from './FilterSelect';
|
|
125
|
+
export { LoadMoreFooter } from './LoadMoreFooter';
|
|
126
|
+
export type { LoadMoreFooterProps, LoadMoreStatus } from './LoadMoreFooter';
|
|
127
|
+
export { CardList } from './CardList';
|
|
128
|
+
export type { CardListProps, CardListItem } from './CardList';
|
|
129
|
+
export { RecordHeader } from './RecordHeader';
|
|
130
|
+
export type { RecordHeaderProps, RecordHeaderStat } from './RecordHeader';
|
|
131
|
+
export { RecordLayout } from './RecordLayout';
|
|
132
|
+
export type { RecordLayoutProps } from './RecordLayout';
|
|
133
|
+
export { StatTiles } from './StatTiles';
|
|
134
|
+
export type { StatTilesProps, StatTileItem } from './StatTiles';
|
|
135
|
+
export { PillTabs, pillTabId, pillTabPanelId, pillTabPanelProps } from './PillTabs';
|
|
136
|
+
export type { PillTabsProps, PillTabItem } from './PillTabs';
|
|
137
|
+
export { AmountList } from './AmountList';
|
|
138
|
+
export type { AmountListProps, AmountListRow } from './AmountList';
|
|
139
|
+
export { ActivityTimeline } from './ActivityTimeline';
|
|
140
|
+
export type { ActivityTimelineProps, ActivityTimelineEvent } from './ActivityTimeline';
|
|
141
|
+
export { RelatedRecordList } from './RelatedRecordList';
|
|
142
|
+
export type { RelatedRecordListProps, RelatedRecordRow } from './RelatedRecordList';
|
|
143
|
+
export { RecordCard } from './RecordCard';
|
|
144
|
+
export type { RecordCardProps, RecordCardVariant, RecordCardBody } from './RecordCard';
|
|
145
|
+
export { CardStack } from './CardStack';
|
|
146
|
+
export type { CardStackProps, CardStackLayout } from './CardStack';
|
|
147
|
+
export { KeyValueRows } from './KeyValueRows';
|
|
148
|
+
export type { KeyValueRowsProps, KeyValueRow, KeyValueRowsDensity } from './KeyValueRows';
|
|
149
|
+
export { LineItemRows } from './LineItemRows';
|
|
150
|
+
export type { LineItemRowsProps, LineItemRow } from './LineItemRows';
|
|
151
|
+
export { RecordTotals } from './RecordTotals';
|
|
152
|
+
export type { RecordTotalsProps, RecordTotalsRow } from './RecordTotals';
|
|
153
|
+
export { CellText, ChipStack } from './CellText';
|
|
154
|
+
export type { CellTextProps, CellTextVariant, ChipStackProps } from './CellText';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const POS_REDUCE_MOTION_ATTRIBUTE = "data-pos-reduce-motion";
|
|
2
|
+
export declare const stillTransitionClass = "motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
|
|
3
|
+
export declare const stillAnimationClass = "motion-reduce:animate-none [html[data-pos-reduce-motion=true]_&]:animate-none";
|
|
4
|
+
export declare const shimmerClass = "rounded-[0.375rem] bg-[linear-gradient(90deg,#F0F0F1_0,#F9F9FA_12.5rem,#F0F0F1_25rem)] bg-[length:50rem_100%] animate-record-shimmer motion-reduce:animate-none [html[data-pos-reduce-motion=true]_&]:animate-none";
|
|
5
|
+
export declare function prefersReducedMotion(): boolean;
|
|
6
|
+
export declare function useReducedMotion(): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type RecordTone = 'ok' | 'warn' | 'danger' | 'info' | 'violet' | 'neutral';
|
|
3
|
+
export interface RecordTonePair {
|
|
4
|
+
fg: string;
|
|
5
|
+
bg: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const RECORD_TONE: Record<RecordTone, RecordTonePair>;
|
|
8
|
+
export type SignedAmountTone = 'positive' | 'negative' | 'neutral';
|
|
9
|
+
export declare function amountToneStyle(tone: SignedAmountTone | undefined): CSSProperties | undefined;
|
package/dist/tailwind/index.cjs
CHANGED
|
@@ -274,6 +274,9 @@ var posSurfaceTokens = {
|
|
|
274
274
|
line: "#E7E7E9",
|
|
275
275
|
/** `--line2`: the lighter hairline under list rows and above the role bar. */
|
|
276
276
|
"line-2": "#F1F1F3",
|
|
277
|
+
hair: "#F0F0F1",
|
|
278
|
+
page: "#FBFBFB",
|
|
279
|
+
field: "#E5E5E5",
|
|
277
280
|
/** `--okb` / `--okf` */
|
|
278
281
|
"ok-fill": "#EAF3DE",
|
|
279
282
|
ok: "#3B6D11",
|
|
@@ -288,6 +291,10 @@ var posSurfaceTokens = {
|
|
|
288
291
|
/** `--ib` / `--if` */
|
|
289
292
|
"info-fill": "#EAF1FC",
|
|
290
293
|
info: "#1D4FA8",
|
|
294
|
+
"violet-fill": "#F1ECFB",
|
|
295
|
+
violet: "#6D28D9",
|
|
296
|
+
"neutral-fill": "#F4F4F5",
|
|
297
|
+
neutral: "#52525B",
|
|
291
298
|
/** `.btn-dstr` — the fill behind an irreversible confirmation. */
|
|
292
299
|
destructive: "#A32D2D"
|
|
293
300
|
};
|
|
@@ -314,7 +321,16 @@ var tailwindTheme = {
|
|
|
314
321
|
spacing,
|
|
315
322
|
fontSize: typography.fontSize,
|
|
316
323
|
fontWeight: typography.fontWeight,
|
|
317
|
-
lineHeight: typography.lineHeight
|
|
324
|
+
lineHeight: typography.lineHeight,
|
|
325
|
+
keyframes: {
|
|
326
|
+
"record-shimmer": {
|
|
327
|
+
"0%": { backgroundPosition: "-25rem 0" },
|
|
328
|
+
"100%": { backgroundPosition: "25rem 0" }
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
animation: {
|
|
332
|
+
"record-shimmer": "record-shimmer 1.3s linear infinite"
|
|
333
|
+
}
|
|
318
334
|
};
|
|
319
335
|
function deepMerge(target, source) {
|
|
320
336
|
if (!source || typeof source !== "object") {
|
package/dist/tailwind/index.d.ts
CHANGED
|
@@ -120,6 +120,19 @@ export declare const tailwindTheme: {
|
|
|
120
120
|
readonly normal: "1.5";
|
|
121
121
|
readonly relaxed: "1.75";
|
|
122
122
|
};
|
|
123
|
+
keyframes: {
|
|
124
|
+
'record-shimmer': {
|
|
125
|
+
'0%': {
|
|
126
|
+
backgroundPosition: string;
|
|
127
|
+
};
|
|
128
|
+
'100%': {
|
|
129
|
+
backgroundPosition: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
animation: {
|
|
134
|
+
'record-shimmer': string;
|
|
135
|
+
};
|
|
123
136
|
};
|
|
124
137
|
/**
|
|
125
138
|
* Deep merge utility for objects
|
|
@@ -322,6 +335,19 @@ export declare const veevartPreset: {
|
|
|
322
335
|
readonly normal: "1.5";
|
|
323
336
|
readonly relaxed: "1.75";
|
|
324
337
|
};
|
|
338
|
+
keyframes: {
|
|
339
|
+
'record-shimmer': {
|
|
340
|
+
'0%': {
|
|
341
|
+
backgroundPosition: string;
|
|
342
|
+
};
|
|
343
|
+
'100%': {
|
|
344
|
+
backgroundPosition: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
animation: {
|
|
349
|
+
'record-shimmer': string;
|
|
350
|
+
};
|
|
325
351
|
};
|
|
326
352
|
};
|
|
327
353
|
darkMode: "class";
|
|
@@ -554,5 +580,18 @@ export declare const tokens: {
|
|
|
554
580
|
readonly normal: "1.5";
|
|
555
581
|
readonly relaxed: "1.75";
|
|
556
582
|
};
|
|
583
|
+
keyframes: {
|
|
584
|
+
'record-shimmer': {
|
|
585
|
+
'0%': {
|
|
586
|
+
backgroundPosition: string;
|
|
587
|
+
};
|
|
588
|
+
'100%': {
|
|
589
|
+
backgroundPosition: string;
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
animation: {
|
|
594
|
+
'record-shimmer': string;
|
|
595
|
+
};
|
|
557
596
|
};
|
|
558
597
|
};
|
package/dist/tailwind/index.mjs
CHANGED
|
@@ -235,6 +235,9 @@ var posSurfaceTokens = {
|
|
|
235
235
|
line: "#E7E7E9",
|
|
236
236
|
/** `--line2`: the lighter hairline under list rows and above the role bar. */
|
|
237
237
|
"line-2": "#F1F1F3",
|
|
238
|
+
hair: "#F0F0F1",
|
|
239
|
+
page: "#FBFBFB",
|
|
240
|
+
field: "#E5E5E5",
|
|
238
241
|
/** `--okb` / `--okf` */
|
|
239
242
|
"ok-fill": "#EAF3DE",
|
|
240
243
|
ok: "#3B6D11",
|
|
@@ -249,6 +252,10 @@ var posSurfaceTokens = {
|
|
|
249
252
|
/** `--ib` / `--if` */
|
|
250
253
|
"info-fill": "#EAF1FC",
|
|
251
254
|
info: "#1D4FA8",
|
|
255
|
+
"violet-fill": "#F1ECFB",
|
|
256
|
+
violet: "#6D28D9",
|
|
257
|
+
"neutral-fill": "#F4F4F5",
|
|
258
|
+
neutral: "#52525B",
|
|
252
259
|
/** `.btn-dstr` — the fill behind an irreversible confirmation. */
|
|
253
260
|
destructive: "#A32D2D"
|
|
254
261
|
};
|
|
@@ -275,7 +282,16 @@ var tailwindTheme = {
|
|
|
275
282
|
spacing,
|
|
276
283
|
fontSize: typography.fontSize,
|
|
277
284
|
fontWeight: typography.fontWeight,
|
|
278
|
-
lineHeight: typography.lineHeight
|
|
285
|
+
lineHeight: typography.lineHeight,
|
|
286
|
+
keyframes: {
|
|
287
|
+
"record-shimmer": {
|
|
288
|
+
"0%": { backgroundPosition: "-25rem 0" },
|
|
289
|
+
"100%": { backgroundPosition: "25rem 0" }
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
animation: {
|
|
293
|
+
"record-shimmer": "record-shimmer 1.3s linear infinite"
|
|
294
|
+
}
|
|
279
295
|
};
|
|
280
296
|
function deepMerge(target, source) {
|
|
281
297
|
if (!source || typeof source !== "object") {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class FakeResizeObserver {
|
|
2
|
+
static width: number;
|
|
3
|
+
static instances: FakeResizeObserver[];
|
|
4
|
+
disconnected: boolean;
|
|
5
|
+
private readonly callback;
|
|
6
|
+
private readonly targets;
|
|
7
|
+
constructor(callback: ResizeObserverCallback);
|
|
8
|
+
observe(target: Element): void;
|
|
9
|
+
unobserve(): void;
|
|
10
|
+
disconnect(): void;
|
|
11
|
+
emit(width: number): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function stubContainerWidth(width: number): void;
|
|
14
|
+
export declare function resizeContainers(width: number): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function contrastRatio(a: string, b: string): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
export declare const LARGE_TEXT_ROOT = "137.5%";
|
|
3
|
+
export declare const LARGE_TEXT_SCALE = 1.375;
|
|
4
|
+
export declare const withRootFontSize: (size: string) => (Story: ComponentType) => import('react').FunctionComponentElement<{
|
|
5
|
+
size: string;
|
|
6
|
+
children?: import('react').ReactNode;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const fontSizePx: (element: Element) => number;
|
|
@@ -25,6 +25,9 @@ export declare const posSurfaceTokens: {
|
|
|
25
25
|
readonly line: "#E7E7E9";
|
|
26
26
|
/** `--line2`: the lighter hairline under list rows and above the role bar. */
|
|
27
27
|
readonly 'line-2': "#F1F1F3";
|
|
28
|
+
readonly hair: "#F0F0F1";
|
|
29
|
+
readonly page: "#FBFBFB";
|
|
30
|
+
readonly field: "#E5E5E5";
|
|
28
31
|
/** `--okb` / `--okf` */
|
|
29
32
|
readonly 'ok-fill': "#EAF3DE";
|
|
30
33
|
readonly ok: "#3B6D11";
|
|
@@ -39,6 +42,10 @@ export declare const posSurfaceTokens: {
|
|
|
39
42
|
/** `--ib` / `--if` */
|
|
40
43
|
readonly 'info-fill': "#EAF1FC";
|
|
41
44
|
readonly info: "#1D4FA8";
|
|
45
|
+
readonly 'violet-fill': "#F1ECFB";
|
|
46
|
+
readonly violet: "#6D28D9";
|
|
47
|
+
readonly 'neutral-fill': "#F4F4F5";
|
|
48
|
+
readonly neutral: "#52525B";
|
|
42
49
|
/** `.btn-dstr` — the fill behind an irreversible confirmation. */
|
|
43
50
|
readonly destructive: "#A32D2D";
|
|
44
51
|
};
|