@veevarts/design-system 1.17.0-beta.5 → 1.17.0-beta.6

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.
@@ -7,16 +7,20 @@ export interface StatusChipProps {
7
7
  status: StatusChipStatus;
8
8
  /** Visible label. Caller-supplied so no domain copy lives here. */
9
9
  label: React.ReactNode;
10
- /** HeroUI chip variant. Default `'flat'` (soft pill). */
11
- variant?: ChipProps['variant'];
12
- /** Chip size. Default `'sm'`. */
10
+ /**
11
+ * Visual style. HeroUI chip variants (default `'flat'`), plus the DS
12
+ * `'dot'` variant: a soft, radius-full pill with a leading tone dot,
13
+ * 12px / weight-600 text, tuned for dense admin lifecycle tables.
14
+ */
15
+ variant?: ChipProps['variant'] | 'dot';
16
+ /** Chip size. Default `'sm'`. Ignored by `variant="dot"`. */
13
17
  size?: ChipProps['size'];
14
18
  /**
15
19
  * Override the colour derived from `status`. Escape hatch for the
16
- * rare state not covered by `StatusChipStatus`.
20
+ * rare state not covered by `StatusChipStatus`. Ignored by `variant="dot"`.
17
21
  */
18
22
  color?: ChipProps['color'];
19
- /** Optional leading element (dot, icon). */
23
+ /** Optional leading element (dot, icon). Ignored by `variant="dot"`. */
20
24
  startContent?: React.ReactNode;
21
25
  className?: string;
22
26
  'data-testid'?: string;
@@ -1,8 +1,12 @@
1
1
  import { default as React } from 'react';
2
- import { SummaryTotalRow } from '../types';
2
+ import { SummaryPostTotalRow } from '../types';
3
3
  export interface TotalsLineRowProps {
4
- row: SummaryTotalRow;
4
+ row: SummaryPostTotalRow;
5
5
  locale: string;
6
6
  emphasized: boolean;
7
+ onRemove?: (id: string) => void;
8
+ removeAriaLabel?: string;
9
+ /** Show the per-row remove control. Defaults to `true`. */
10
+ showRemoveButton?: boolean;
7
11
  }
8
12
  export declare const TotalsLineRow: React.FC<TotalsLineRowProps>;
@@ -4,4 +4,4 @@
4
4
  * Total + CTA, and a compact mobile bottom-bar.
5
5
  */
6
6
  export { Summary } from './Summary';
7
- export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPrimaryAction, SummaryLabels, Money, } from './types';
7
+ export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPostTotalRow, SummaryPrimaryAction, SummaryLabels, Money, } from './types';
@@ -73,6 +73,16 @@ export interface SummaryTotalRow {
73
73
  label: ReactNode;
74
74
  amount: Money;
75
75
  }
76
+ /**
77
+ * A post-total row — the same flat shape as {@link SummaryTotalRow}, plus an
78
+ * optional `id` that (together with `onRemovePostTotalRow`) enables the same
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.
81
+ */
82
+ export interface SummaryPostTotalRow extends SummaryTotalRow {
83
+ /** Stable id; when set and `onRemovePostTotalRow` exists, the row shows the remove control. */
84
+ id?: string;
85
+ }
76
86
  /** The primary call-to-action (orange pill + arrow). */
77
87
  export interface SummaryPrimaryAction {
78
88
  label: ReactNode;
@@ -84,6 +94,8 @@ export interface SummaryPrimaryAction {
84
94
  export interface SummaryLabels {
85
95
  /** Aria label for the per-item remove control. Default "Remove item". */
86
96
  removeAriaLabel?: string;
97
+ /** Aria label for the per-post-total-row remove control. Default "Remove applied code". */
98
+ removePostTotalRowAriaLabel?: string;
87
99
  /** Aria label for the collapse/expand press target. Default "Toggle summary". */
88
100
  toggleAriaLabel?: string;
89
101
  /** Aria label for the mobile cart button. Default "View cart". */
@@ -146,9 +158,19 @@ export interface SummaryProps {
146
158
  amount: Money;
147
159
  };
148
160
  /**
149
- * An optional secondary total rendered right under the Total, in the primary
150
- * color (e.g. "Due Today"). Purely presentational — the host supplies both
151
- * the label and the already-computed amount.
161
+ * Optional flat rows rendered BETWEEN the Total and the secondary total —
162
+ * e.g. applied gift cards as tenders ("Gift Card · …XWDG −$50.00"). Same
163
+ * shape and flat style as `rows`; negative amounts are passed as data,
164
+ * exactly like a Discounts line. The Total itself is never affected. Rows
165
+ * with an `id` show the trash remove control when `onRemovePostTotalRow`
166
+ * is provided (same gating as the item remove, incl. `showRemoveButton`).
167
+ */
168
+ postTotalRows?: SummaryPostTotalRow[];
169
+ /**
170
+ * An optional secondary total rendered under the Total (after any
171
+ * `postTotalRows`), in the primary color (e.g. "Due Today"). Purely
172
+ * presentational — the host supplies both the label and the
173
+ * already-computed amount.
152
174
  */
153
175
  secondaryTotal?: {
154
176
  label: ReactNode;
@@ -160,9 +182,10 @@ export interface SummaryProps {
160
182
  */
161
183
  ctaCaption?: ReactNode;
162
184
  /**
163
- * Whether the per-item remove (trash) control is shown. Defaults to `true`;
164
- * pass `false` to hide it even when `onRemoveItem` is wired. Independent of
165
- * `onRemoveItem` so a host can keep the handler but suppress the control.
185
+ * Whether the remove (trash) controls are shown — per-item and
186
+ * per-post-total-row alike. Defaults to `true`; pass `false` to hide them
187
+ * even when `onRemoveItem` / `onRemovePostTotalRow` are wired. Independent
188
+ * of the handlers so a host can keep them but suppress the controls.
166
189
  */
167
190
  showRemoveButton?: boolean;
168
191
  /**
@@ -190,6 +213,8 @@ export interface SummaryProps {
190
213
  primaryAction?: SummaryPrimaryAction;
191
214
  /** When provided, item rows show a red trash remove control. */
192
215
  onRemoveItem?: (id: string) => void;
216
+ /** When provided, post-total rows with an `id` show the same red trash remove control. */
217
+ onRemovePostTotalRow?: (id: string) => void;
193
218
  /**
194
219
  * Layout: full card (`'main'`) or the bottom-sheet / compact bar (`'mobile'`).
195
220
  * When OMITTED the layout is auto-detected from the viewport (below `md`
@@ -76,4 +76,4 @@ export type { PaymentSubAmountInputProps } from './PaymentSubAmountInput';
76
76
  export { ConfirmDialog } from './ConfirmDialog';
77
77
  export type { ConfirmDialogProps, ConfirmDialogVariant } from './ConfirmDialog';
78
78
  export { Summary } from './Summary';
79
- export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPrimaryAction, SummaryLabels, } from './Summary';
79
+ export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPostTotalRow, SummaryPrimaryAction, SummaryLabels, } from './Summary';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "1.17.0-beta.5",
4
+ "version": "1.17.0-beta.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",