@veevarts/design-system 1.18.0 → 1.19.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.
@@ -0,0 +1,53 @@
1
+ import { default as React } from 'react';
2
+ export interface CheckboxCardOption {
3
+ /** Stable identifier surfaced through `onChange`. */
4
+ key: string;
5
+ /** Visible label. */
6
+ label: string;
7
+ /** Optional secondary line under the label. */
8
+ description?: string;
9
+ /** Iconify name (`'solar:ticket-outline'`) or a custom node. */
10
+ icon?: string | React.ReactNode;
11
+ /** Disable just this card. */
12
+ isDisabled?: boolean;
13
+ /** Override per-card test id; defaults to `${dataTestId}-${key}`. */
14
+ 'data-testid'?: string;
15
+ }
16
+ export interface CheckboxCardGroupClassNames {
17
+ base?: string;
18
+ grid?: string;
19
+ card?: string;
20
+ hint?: string;
21
+ }
22
+ export interface CheckboxCardGroupProps {
23
+ /** Options to render in order. */
24
+ options: readonly CheckboxCardOption[];
25
+ /** Currently selected option keys. */
26
+ selectedKeys: readonly string[];
27
+ /** Fires with the next full selection whenever a card is toggled. Keys are emitted in the original option order (not selection order); any selected key not present in `options` is preserved. */
28
+ onChange: (keys: string[]) => void;
29
+ /** Optional heading rendered above the grid (labels the group). */
30
+ heading?: string;
31
+ /** `aria-label` for the group when `heading` is omitted. Default `'Select options'`. */
32
+ ariaLabel?: string;
33
+ /** Grid columns on >= sm. Default `2`. */
34
+ columnsDesktop?: 2 | 3 | 4;
35
+ /** Grid columns on mobile. Default `1`. */
36
+ columnsMobile?: 1 | 2;
37
+ /**
38
+ * Minimum number of selections. When set, the group auto-derives its
39
+ * invalid state (`selectedKeys.length < minSelected`) and a default hint,
40
+ * unless `isInvalid` / `hint` are explicitly supplied.
41
+ */
42
+ minSelected?: number;
43
+ /** Helper text under the grid. Overrides the `minSelected` default hint. */
44
+ hint?: React.ReactNode;
45
+ /** Error styling + `aria-invalid`. Overrides the `minSelected`-derived state. */
46
+ isInvalid?: boolean;
47
+ /** Disable every card. */
48
+ isDisabled?: boolean;
49
+ className?: string;
50
+ classNames?: CheckboxCardGroupClassNames;
51
+ 'data-testid'?: string;
52
+ }
53
+ export declare const CheckboxCardGroup: React.FC<CheckboxCardGroupProps>;
@@ -0,0 +1,2 @@
1
+ export { CheckboxCardGroup } from './CheckboxCardGroup';
2
+ export type { CheckboxCardGroupProps, CheckboxCardGroupClassNames, CheckboxCardOption, } from './CheckboxCardGroup';
@@ -1,21 +1,34 @@
1
1
  import { default as React } from 'react';
2
+ export type ConfirmDialogVariant = 'danger' | 'warning';
2
3
  export interface ConfirmDialogProps {
3
- /** Whether the dialog is currently open. Controlled by the host. */
4
+ /** Whether the dialog is open. Controlled by the host. */
4
5
  isOpen: boolean;
5
6
  /** Title rendered as the dialog heading. */
6
7
  title: string;
7
- /** Body copy explaining the consequences of confirming. */
8
- body: string;
9
8
  /** Label for the confirm action. */
10
9
  confirmLabel: string;
11
- /** Visual variant of the confirm button. Default `'danger'`. */
12
- confirmVariant?: 'danger' | 'primary';
13
- /** Label for the dismiss action. */
14
- dismissLabel: string;
15
10
  /** Fires when the user confirms. */
16
11
  onConfirm: () => void;
17
- /** Fires when the user dismisses (Cancel button OR Esc / outside click). */
18
- onDismiss: () => void;
12
+ /** HeroUI open-change; fires with `false` on cancel / Esc / outside click. */
13
+ onOpenChange?: (open: boolean) => void;
14
+ /** Rich body content. Overrides `description`. */
15
+ children?: React.ReactNode;
16
+ /** Body copy explaining the consequences of confirming. */
17
+ description?: React.ReactNode;
18
+ /** Label for the cancel action. Default `'Cancel'`. */
19
+ cancelLabel?: string;
20
+ /** Semantic variant driving the icon tile + confirm colour. Default `'danger'`. */
21
+ variant?: ConfirmDialogVariant;
22
+ /** Spinner on confirm + locks every dismissal channel while true. Default `false`. */
23
+ isPending?: boolean;
24
+ /** Override backdrop dismissability. Defaults to `!isPending`. */
25
+ isDismissable?: boolean;
26
+ /** Disable Esc-to-close. Forced on while `isPending`. Default `false`. */
27
+ isKeyboardDismissDisabled?: boolean;
28
+ /** Hide the header icon tile. */
29
+ hideIcon?: boolean;
30
+ /** Override the header icon (iconify name or node). Defaults to the variant icon. */
31
+ icon?: string | React.ReactNode;
19
32
  'data-testid'?: string;
20
33
  }
21
34
  export declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
@@ -1,2 +1,2 @@
1
1
  export { ConfirmDialog } from './ConfirmDialog';
2
- export type { ConfirmDialogProps } from './ConfirmDialog';
2
+ export type { ConfirmDialogProps, ConfirmDialogVariant } from './ConfirmDialog';
@@ -0,0 +1,45 @@
1
+ import { default as React } from 'react';
2
+ export interface ListPanelClassNames {
3
+ base?: string;
4
+ state?: string;
5
+ }
6
+ export interface ListPanelProps {
7
+ /** Show the loading state. Highest precedence (loading > error > empty > children). */
8
+ isLoading?: boolean;
9
+ /** Show the error state. Wins over empty and children. */
10
+ isError?: boolean;
11
+ /** Show the empty state. Wins over children. */
12
+ isEmpty?: boolean;
13
+ /** Loading headline. Default `'Loading…'`. */
14
+ loadingTitle?: React.ReactNode;
15
+ /** Replace the whole loading state. */
16
+ loadingContent?: React.ReactNode;
17
+ /** Error headline. Default `'Something went wrong'`. */
18
+ errorTitle?: React.ReactNode;
19
+ /** Error supporting copy. */
20
+ errorDescription?: React.ReactNode;
21
+ /** Retry button label. Default `'Retry'`. Rendered only when `onRetry` is set. */
22
+ retryLabel?: React.ReactNode;
23
+ /** Retry handler; when set, a Retry button appears in the error state. */
24
+ onRetry?: () => void;
25
+ /** Replace the error state's action area (overrides the Retry button). */
26
+ errorActions?: React.ReactNode;
27
+ /** Replace the whole error state. */
28
+ errorContent?: React.ReactNode;
29
+ /** Empty headline. Default `'Nothing here yet'`. */
30
+ emptyTitle?: React.ReactNode;
31
+ /** Empty supporting copy. */
32
+ emptyDescription?: React.ReactNode;
33
+ /** Iconify name or node for the empty state. */
34
+ emptyIcon?: string | React.ReactNode | false;
35
+ /** Empty-state CTA area. */
36
+ emptyActions?: React.ReactNode;
37
+ /** Replace the whole empty state. */
38
+ emptyContent?: React.ReactNode;
39
+ /** The table/list rendered when none of the async states apply. */
40
+ children?: React.ReactNode;
41
+ className?: string;
42
+ classNames?: ListPanelClassNames;
43
+ 'data-testid'?: string;
44
+ }
45
+ export declare const ListPanel: React.FC<ListPanelProps>;
@@ -0,0 +1,2 @@
1
+ export { ListPanel } from './ListPanel';
2
+ export type { ListPanelProps, ListPanelClassNames } from './ListPanel';
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+ export interface PageHeaderClassNames {
3
+ base?: string;
4
+ iconWrapper?: string;
5
+ eyebrow?: string;
6
+ title?: string;
7
+ subtitle?: string;
8
+ actions?: string;
9
+ }
10
+ export interface PageHeaderProps {
11
+ /** Main heading. */
12
+ title: React.ReactNode;
13
+ /** Supporting copy under the title. */
14
+ subtitle?: React.ReactNode;
15
+ /** Small uppercase label above the title (e.g. a section or category name). */
16
+ eyebrow?: React.ReactNode;
17
+ /** Iconify name (`'solar:tag-outline'`) or a custom node for the tile. */
18
+ icon?: string | React.ReactNode;
19
+ /** Short text rendered in the tile when no `icon` is given (e.g. "DT"). */
20
+ initials?: string;
21
+ /**
22
+ * Right-aligned action area. Compose the primary CTA here, with an
23
+ * optional secondary button alongside it (caller-composed). Style the
24
+ * tile via `classNames.iconWrapper`.
25
+ */
26
+ actions?: React.ReactNode;
27
+ /** Heading level for the title element. Default `'h1'`. */
28
+ titleAs?: 'h1' | 'h2' | 'h3';
29
+ className?: string;
30
+ classNames?: PageHeaderClassNames;
31
+ 'data-testid'?: string;
32
+ }
33
+ export declare const PageHeader: React.FC<PageHeaderProps>;
@@ -0,0 +1,2 @@
1
+ export { PageHeader } from './PageHeader';
2
+ export type { PageHeaderProps, PageHeaderClassNames } from './PageHeader';
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { ChipProps } from '../../components';
3
+ /** Domain-agnostic lifecycle states an admin row can be in. */
4
+ export type StatusChipStatus = 'active' | 'archived' | 'inactive' | 'draft' | 'pending' | 'success' | 'warning' | 'danger' | 'neutral';
5
+ export interface StatusChipProps {
6
+ /** Lifecycle state — selects the colour/tone only, never the text. */
7
+ status: StatusChipStatus;
8
+ /** Visible label. Caller-supplied so no domain copy lives here. */
9
+ label: React.ReactNode;
10
+ /** HeroUI chip variant. Default `'flat'` (soft pill). */
11
+ variant?: ChipProps['variant'];
12
+ /** Chip size. Default `'sm'`. */
13
+ size?: ChipProps['size'];
14
+ /**
15
+ * Override the colour derived from `status`. Escape hatch for the
16
+ * rare state not covered by `StatusChipStatus`.
17
+ */
18
+ color?: ChipProps['color'];
19
+ /** Optional leading element (dot, icon). */
20
+ startContent?: React.ReactNode;
21
+ className?: string;
22
+ 'data-testid'?: string;
23
+ }
24
+ export declare const StatusChip: React.FC<StatusChipProps>;
@@ -0,0 +1,2 @@
1
+ export { StatusChip } from './StatusChip';
2
+ export type { StatusChipProps, StatusChipStatus } from './StatusChip';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shared responsive grid-column class maps for the card-picker patterns
3
+ * (TileSelect single-select, CheckboxCardGroup multi-select). Kept in one
4
+ * place so the two siblings never drift on breakpoints or column counts.
5
+ *
6
+ * The literal Tailwind classes must stay spelled out (not interpolated) so
7
+ * the JIT scanner keeps generating them.
8
+ */
9
+ export declare const GRID_DESKTOP_COLS: Record<2 | 3 | 4, string>;
10
+ export declare const GRID_MOBILE_COLS: Record<1 | 2, string>;
@@ -41,6 +41,14 @@ export { FilterPopover } from './FilterPopover';
41
41
  export type * from './FilterPopover';
42
42
  export { SessionTimeline } from './SessionTimeline';
43
43
  export type * from './SessionTimeline';
44
+ export { PageHeader } from './PageHeader';
45
+ export type { PageHeaderProps, PageHeaderClassNames } from './PageHeader';
46
+ export { StatusChip } from './StatusChip';
47
+ export type { StatusChipProps, StatusChipStatus } from './StatusChip';
48
+ export { CheckboxCardGroup } from './CheckboxCardGroup';
49
+ export type { CheckboxCardGroupProps, CheckboxCardOption } from './CheckboxCardGroup';
50
+ export { ListPanel } from './ListPanel';
51
+ export type { ListPanelProps, ListPanelClassNames } from './ListPanel';
44
52
  export { CashTenderForm } from './CashTenderForm';
45
53
  export type { CashTenderFormProps, CashTenderValue, CashTenderLabels, } from './CashTenderForm';
46
54
  export { CheckTenderForm } from './CheckTenderForm';
@@ -64,6 +72,6 @@ export type { PaymentCashChangeBannerProps } from './PaymentCashChangeBanner';
64
72
  export { PaymentSubAmountInput } from './PaymentSubAmountInput';
65
73
  export type { PaymentSubAmountInputProps } from './PaymentSubAmountInput';
66
74
  export { ConfirmDialog } from './ConfirmDialog';
67
- export type { ConfirmDialogProps } from './ConfirmDialog';
75
+ export type { ConfirmDialogProps, ConfirmDialogVariant } from './ConfirmDialog';
68
76
  export { Summary } from './Summary';
69
77
  export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, 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.18.0",
4
+ "version": "1.19.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",