@veevarts/design-system 2.7.0 → 2.8.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/dist/index.cjs +5 -5
- package/dist/index.js +1982 -1907
- 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 +1 -0
- package/dist/patterns/Summary/components/TotalsLineRow.d.ts +1 -0
- package/dist/patterns/Summary/types.d.ts +16 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -14,6 +14,7 @@ export interface SummaryBodyProps {
|
|
|
14
14
|
/** Show the per-item and per-totals-row remove controls. Defaults to `true`. */
|
|
15
15
|
showRemoveButton?: boolean;
|
|
16
16
|
emptyState?: React.ReactNode;
|
|
17
|
+
compact?: boolean;
|
|
17
18
|
classNames: SummaryClassNames;
|
|
18
19
|
}
|
|
19
20
|
export declare const SummaryBody: React.FC<SummaryBodyProps>;
|
|
@@ -141,6 +141,8 @@ export interface SummaryClassNames {
|
|
|
141
141
|
cta?: string;
|
|
142
142
|
/** The caption rendered under the CTA. */
|
|
143
143
|
ctaCaption?: string;
|
|
144
|
+
/** The error rendered next to the CTA. */
|
|
145
|
+
ctaError?: string;
|
|
144
146
|
/** Mobile compact bottom-bar. */
|
|
145
147
|
mobileBar?: string;
|
|
146
148
|
/** Mobile cart button. */
|
|
@@ -194,6 +196,13 @@ export interface SummaryProps {
|
|
|
194
196
|
* installment breakdown like "$50.75 total · 12 monthly installments…").
|
|
195
197
|
*/
|
|
196
198
|
ctaCaption?: ReactNode;
|
|
199
|
+
/**
|
|
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;
|
|
197
206
|
/**
|
|
198
207
|
* Whether the remove (trash) controls are shown — per-item, per-totals-row
|
|
199
208
|
* and per-post-total-row alike. Defaults to `true`; pass `false` to hide them
|
|
@@ -246,6 +255,13 @@ export interface SummaryProps {
|
|
|
246
255
|
/** Rendered when there are no items. */
|
|
247
256
|
emptyState?: ReactNode;
|
|
248
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';
|
|
249
265
|
'data-testid'?: string;
|
|
250
266
|
className?: string;
|
|
251
267
|
/** Per-slot class overrides (Design-System `classNames` convention). */
|