@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.
@@ -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;
@@ -6,6 +6,7 @@ export interface GrandTotalRowProps {
6
6
  amount: Money;
7
7
  };
8
8
  locale: string;
9
+ compact?: boolean;
9
10
  className?: string;
10
11
  }
11
12
  export declare const GrandTotalRow: React.FC<GrandTotalRowProps>;
@@ -7,5 +7,6 @@ export interface ItemRowProps {
7
7
  removeAriaLabel: string;
8
8
  /** Show the per-item remove control. Defaults to `true`. */
9
9
  showRemoveButton?: boolean;
10
+ compact?: boolean;
10
11
  }
11
12
  export declare const ItemRow: React.FC<ItemRowProps>;
@@ -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>;
@@ -8,5 +8,6 @@ export interface TotalsLineRowProps {
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>;
@@ -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). */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "2.7.0",
4
+ "version": "2.8.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",