@veevarts/design-system 1.11.0 → 1.12.0-alpha.2

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.
Files changed (88) hide show
  1. package/dist/components/Select/Select.d.ts +11 -0
  2. package/dist/components/Select/index.d.ts +2 -0
  3. package/dist/components/index.d.ts +2 -0
  4. package/dist/index.cjs +36 -11
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.js +9138 -5480
  7. package/dist/patterns/CashTenderForm/CashTenderForm.d.ts +4 -0
  8. package/dist/patterns/CashTenderForm/index.d.ts +9 -0
  9. package/dist/patterns/CashTenderForm/types.d.ts +95 -0
  10. package/dist/patterns/CheckTenderForm/CheckTenderForm.d.ts +4 -0
  11. package/dist/patterns/CheckTenderForm/index.d.ts +9 -0
  12. package/dist/patterns/CheckTenderForm/types.d.ts +62 -0
  13. package/dist/patterns/CommitmentDetails/CommitmentDetails.d.ts +16 -0
  14. package/dist/patterns/CommitmentDetails/index.d.ts +2 -0
  15. package/dist/patterns/ConfirmDialog/ConfirmDialog.d.ts +21 -0
  16. package/dist/patterns/ConfirmDialog/index.d.ts +2 -0
  17. package/dist/patterns/ConfirmationModal/ConfirmationModal.d.ts +18 -0
  18. package/dist/patterns/ConfirmationModal/index.d.ts +2 -0
  19. package/dist/patterns/EventDetails/EventDetails.d.ts +3 -1
  20. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +3 -0
  21. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignmentSkeleton.d.ts +2 -0
  22. package/dist/patterns/InstallmentFundAssignment/index.d.ts +3 -0
  23. package/dist/patterns/InstallmentFundAssignment/types.d.ts +67 -0
  24. package/dist/patterns/InstallmentSchedule/InstallmentSchedule.d.ts +3 -0
  25. package/dist/patterns/InstallmentSchedule/InstallmentScheduleSkeleton.d.ts +2 -0
  26. package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +3 -0
  27. package/dist/patterns/InstallmentSchedule/index.d.ts +5 -0
  28. package/dist/patterns/InstallmentSchedule/types.d.ts +93 -0
  29. package/dist/patterns/InstallmentSchedule/utils.d.ts +2 -0
  30. package/dist/patterns/LoadingOverlay/LoadingOverlay.d.ts +18 -0
  31. package/dist/patterns/LoadingOverlay/index.d.ts +2 -0
  32. package/dist/patterns/MembershipSelectCards/types.d.ts +2 -0
  33. package/dist/patterns/ModalShell/ModalShell.d.ts +40 -0
  34. package/dist/patterns/ModalShell/index.d.ts +2 -0
  35. package/dist/patterns/OtherTenderForm/OtherTenderForm.d.ts +4 -0
  36. package/dist/patterns/OtherTenderForm/index.d.ts +8 -0
  37. package/dist/patterns/OtherTenderForm/types.d.ts +53 -0
  38. package/dist/patterns/PaymentCashChangeBanner/PaymentCashChangeBanner.d.ts +35 -0
  39. package/dist/patterns/PaymentCashChangeBanner/index.d.ts +2 -0
  40. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +55 -0
  41. package/dist/patterns/PaymentSubAmountInput/index.d.ts +2 -0
  42. package/dist/patterns/PaymentSuccessView/PaymentSuccessView.d.ts +30 -0
  43. package/dist/patterns/PaymentSuccessView/index.d.ts +2 -0
  44. package/dist/patterns/PaymentTotalBanner/PaymentTotalBanner.d.ts +15 -0
  45. package/dist/patterns/PaymentTotalBanner/index.d.ts +2 -0
  46. package/dist/patterns/SplitPaymentSummary/SplitPaymentSummary.d.ts +4 -0
  47. package/dist/patterns/SplitPaymentSummary/index.d.ts +9 -0
  48. package/dist/patterns/SplitPaymentSummary/types.d.ts +61 -0
  49. package/dist/patterns/Summary/Summary.d.ts +4 -0
  50. package/dist/patterns/Summary/components/ActionBar.d.ts +17 -0
  51. package/dist/patterns/Summary/components/CartButton.d.ts +11 -0
  52. package/dist/patterns/Summary/components/CollapseHeader.d.ts +19 -0
  53. package/dist/patterns/Summary/components/GrandTotalRow.d.ts +11 -0
  54. package/dist/patterns/Summary/components/ItemRow.d.ts +9 -0
  55. package/dist/patterns/Summary/components/PrimaryCta.d.ts +11 -0
  56. package/dist/patterns/Summary/components/ServiceFeeRow.d.ts +8 -0
  57. package/dist/patterns/Summary/components/SummaryBody.d.ts +15 -0
  58. package/dist/patterns/Summary/components/TotalsLineRow.d.ts +8 -0
  59. package/dist/patterns/Summary/drag.d.ts +55 -0
  60. package/dist/patterns/Summary/fmt.d.ts +2 -0
  61. package/dist/patterns/Summary/index.d.ts +7 -0
  62. package/dist/patterns/Summary/types.d.ts +147 -0
  63. package/dist/patterns/TicketSelection/types.d.ts +3 -0
  64. package/dist/patterns/TileSelect/TileSelect.d.ts +39 -0
  65. package/dist/patterns/TileSelect/index.d.ts +2 -0
  66. package/dist/patterns/index.d.ts +34 -0
  67. package/dist/tailwind/index.d.ts +13 -0
  68. package/dist/tailwind/index.js +13 -0
  69. package/dist/tokens/colors.d.ts +13 -0
  70. package/dist/utils/index.d.ts +7 -0
  71. package/dist/utils/money.d.ts +55 -0
  72. package/package.json +2 -1
  73. package/dist/components/Button/Button.test.d.ts +0 -1
  74. package/dist/patterns/DonationAmounts/__test__/DonationAmounts.test.d.ts +0 -4
  75. package/dist/patterns/EventDetails/__test__/EventDetails.test.d.ts +0 -1
  76. package/dist/patterns/ExpireCartTimer/__test__/ExpireCartTimer.test.d.ts +0 -4
  77. package/dist/patterns/Footer/__test__/Footer.test.d.ts +0 -1
  78. package/dist/patterns/ItemCard/__test__/ItemCard.test.d.ts +0 -4
  79. package/dist/patterns/MembershipSelectCards/__test__/MembershipSelectCards.test.d.ts +0 -4
  80. package/dist/patterns/Multiselect/__test__/Multiselect.test.d.ts +0 -4
  81. package/dist/patterns/Navbar/__test__/Navbar.test.d.ts +0 -1
  82. package/dist/patterns/OfferCard/__test__/OfferCard.test.d.ts +0 -1
  83. package/dist/patterns/RevenueDistribution/__test__/RevenueDistributionCard.test.d.ts +0 -1
  84. package/dist/patterns/RichText/RichText.test.d.ts +0 -1
  85. package/dist/patterns/RichText/core/TipTapEditor.test.d.ts +0 -1
  86. package/dist/patterns/Stepper/Stepper.test.d.ts +0 -4
  87. package/dist/patterns/TicketSelection/__test__/TicketSelection.test.d.ts +0 -4
  88. package/dist/patterns/Toggle/__test__/Toggle.test.d.ts +0 -4
@@ -0,0 +1,35 @@
1
+ import { default as React } from 'react';
2
+ import { Money } from '../../utils/money';
3
+ export interface PaymentCashChangeBannerProps {
4
+ /** Amount of cash to give back. Banner only renders when > 0. */
5
+ cashChange: Money;
6
+ /** Heading above the amount. Translatable. Default `'Cash to return'`. */
7
+ label?: string;
8
+ /**
9
+ * Optional secondary line below the amount. Use in mid-split flows
10
+ * to disambiguate WHICH sub-payment the change refers to (e.g.
11
+ * `'From Payment #1'`).
12
+ */
13
+ secondaryLine?: string;
14
+ /** Locale forwarded to `formatMoney`. Default `'en-US'`. */
15
+ locale?: string;
16
+ /**
17
+ * Dismiss button — when set, renders an X button that fires this
18
+ * callback. Omit to render the banner non-dismissible (used inside
19
+ * `<PaymentSuccessView>` where the entire view replaces on Close).
20
+ */
21
+ onDismiss?: () => void;
22
+ /** Accessible label for the dismiss button. Default `'Dismiss'`. */
23
+ dismissAriaLabel?: string;
24
+ /**
25
+ * Horizontal alignment of the inner content (icon + text block).
26
+ * Default `'left'` — used mid-split where the banner sits inline
27
+ * with left-aligned form sections.
28
+ * `'center'` — used inside `<PaymentSuccessView>` so the banner
29
+ * lines up under the centered success badge + title.
30
+ */
31
+ align?: 'left' | 'center';
32
+ className?: string;
33
+ 'data-testid'?: string;
34
+ }
35
+ export declare const PaymentCashChangeBanner: React.FC<PaymentCashChangeBannerProps>;
@@ -0,0 +1,2 @@
1
+ export { PaymentCashChangeBanner } from './PaymentCashChangeBanner';
2
+ export type { PaymentCashChangeBannerProps } from './PaymentCashChangeBanner';
@@ -0,0 +1,55 @@
1
+ import { default as React } from 'react';
2
+ export interface PaymentSubAmountInputProps {
3
+ /** Section heading text (e.g. "Payment #3"). */
4
+ heading: string;
5
+ /** Input label rendered above the field. */
6
+ amountLabel: string;
7
+ /** Controlled value. Use together with `onChange`. */
8
+ value?: string;
9
+ /** Uncontrolled default. */
10
+ defaultValue?: string;
11
+ /** Fires on every keystroke with the raw string. */
12
+ onChange?: (next: string) => void;
13
+ /** Placeholder shown when value is empty (e.g. "$150.00"). */
14
+ placeholder?: string;
15
+ isDisabled?: boolean;
16
+ /**
17
+ * Validation flag — drives the red border + error message UI.
18
+ * The host computes WHY (e.g. amount > remaining); this primitive
19
+ * only renders the visual error state.
20
+ */
21
+ isInvalid?: boolean;
22
+ /**
23
+ * Error message rendered below the field when `isInvalid === true`.
24
+ * Translatable. Already-formatted (the host substitutes currency
25
+ * + locale).
26
+ */
27
+ errorMessage?: string;
28
+ /**
29
+ * Auto-focus the amount field when this component mounts. Pair
30
+ * with `key={...}` from the host to re-trigger focus on every
31
+ * sub-payment (the input re-mounts each time and `autoFocus`
32
+ * fires again). The built-in `onFocus` already selects the
33
+ * value, so a cashier landing here can overwrite the placeholder
34
+ * with a single keystroke.
35
+ *
36
+ * Default `false` — the input is unfocused at mount. Hosts opt in
37
+ * when their flow guarantees the cashier just navigated TO this
38
+ * step (e.g. opening Split, advancing to Payment #N).
39
+ */
40
+ autoFocus?: boolean;
41
+ /**
42
+ * Hard upper bound for the typed amount, in the same MAJOR-unit scale
43
+ * the host parses the emitted string with. A keystroke that would push
44
+ * the parsed value above this is REJECTED (the controlled `value` is
45
+ * left unchanged, so the input reverts the offending character). Keeps
46
+ * the cashier from entering an amount that overflows the PSP integer
47
+ * range downstream. A character `maxLength` can't enforce this (e.g.
48
+ * `99999999` is only 8 chars yet far over a $999,999.99 cap), so the
49
+ * guard is value-based. Omit for no cap.
50
+ */
51
+ maxAmount?: number;
52
+ 'data-testid'?: string;
53
+ className?: string;
54
+ }
55
+ export declare const PaymentSubAmountInput: React.FC<PaymentSubAmountInputProps>;
@@ -0,0 +1,2 @@
1
+ export { PaymentSubAmountInput } from './PaymentSubAmountInput';
2
+ export type { PaymentSubAmountInputProps } from './PaymentSubAmountInput';
@@ -0,0 +1,30 @@
1
+ import { default as React } from 'react';
2
+ import { Money } from '../../utils/money';
3
+ export interface PaymentSuccessViewProps {
4
+ title: string;
5
+ subtitle: string;
6
+ /** Optional email confirmation line ("Client will receive a confirmation email at …"). */
7
+ emailLine?: string;
8
+ /** Email address to render in bold under `emailLine`. Required if `emailLine` is set. */
9
+ confirmationEmail?: string;
10
+ /**
11
+ * Total cash change to return to the customer. Renders as a
12
+ * prominent warning banner with the formatted amount; omit (or
13
+ * pass `value: 0`) when there is no change to give back (any
14
+ * non-cash tender, or cash paid exact).
15
+ */
16
+ cashChange?: Money;
17
+ /** Label rendered above the cash-change amount. Default: "Cash to return". */
18
+ cashChangeLabel?: string;
19
+ /**
20
+ * Locale used to format `cashChange`. Default `'en-US'`. Ignored
21
+ * when no cashChange is passed.
22
+ */
23
+ locale?: string;
24
+ /** Close button label. Omit `onClose` to hide the button entirely. */
25
+ closeLabel?: string;
26
+ onClose?: () => void;
27
+ className?: string;
28
+ 'data-testid'?: string;
29
+ }
30
+ export declare const PaymentSuccessView: React.FC<PaymentSuccessViewProps>;
@@ -0,0 +1,2 @@
1
+ export { PaymentSuccessView } from './PaymentSuccessView';
2
+ export type { PaymentSuccessViewProps } from './PaymentSuccessView';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { Money } from '../../utils/money';
3
+ export interface PaymentTotalBannerProps {
4
+ /** Amount to render. */
5
+ total: Money;
6
+ /** Label rendered above the amount (e.g. "Total Due:", "Remaining:", "Complete"). */
7
+ label: string;
8
+ /** Locale for currency formatting. Default `'en-US'`. */
9
+ locale?: string;
10
+ /** Visual variant for emphasis. Default `'subtle'`. */
11
+ variant?: 'subtle' | 'success';
12
+ className?: string;
13
+ 'data-testid'?: string;
14
+ }
15
+ export declare const PaymentTotalBanner: React.FC<PaymentTotalBannerProps>;
@@ -0,0 +1,2 @@
1
+ export { PaymentTotalBanner } from './PaymentTotalBanner';
2
+ export type { PaymentTotalBannerProps } from './PaymentTotalBanner';
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { SplitPaymentSummaryProps } from './types';
3
+ export declare const SplitPaymentSummary: React.FC<SplitPaymentSummaryProps>;
4
+ export default SplitPaymentSummary;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SplitPaymentSummary Pattern
3
+ *
4
+ * Pure-UI primitive showing the running list of tenders + remaining balance
5
+ * for multi-tender split payments. Used by `@veevarts/payments-drop-in`'s
6
+ * `<PaymentsDropIn>` orchestrator.
7
+ */
8
+ export { SplitPaymentSummary } from './SplitPaymentSummary';
9
+ export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, TenderRow, TenderRowStatus, TenderRowType, Money, } from './types';
@@ -0,0 +1,61 @@
1
+ import { Money } from '../../utils/money';
2
+ export type { Money } from '../../utils/money';
3
+ export type TenderRowType = 'card' | 'cash' | 'check' | 'other';
4
+ export type TenderRowStatus = 'pending' | 'recorded' | 'failed';
5
+ export interface TenderRow {
6
+ /** Stable identifier (idempotency key, server-side payment id, etc.). */
7
+ id: string;
8
+ /** Canonical category used to pick the row icon. */
9
+ type: TenderRowType;
10
+ /** Tender amount in the host's currency. */
11
+ amount: number;
12
+ /**
13
+ * One-line description shown next to the icon. Examples:
14
+ * - `'Credit Card **5555'`
15
+ * - `'Cash'`
16
+ * - `'Check #102934'`
17
+ * - `'ACH'`
18
+ */
19
+ label: string;
20
+ /**
21
+ * Lifecycle status. `pending` and `recorded` ARE present in the running
22
+ * balance; `failed` is rendered for context but NOT counted toward
23
+ * `collected`.
24
+ */
25
+ status: TenderRowStatus;
26
+ /**
27
+ * Optional failure message shown inline when `status === 'failed'`.
28
+ */
29
+ failureReason?: string;
30
+ }
31
+ export interface SplitPaymentSummaryLabels {
32
+ collectedHeading?: string;
33
+ remainingLabel?: string;
34
+ completeLabel?: string;
35
+ removeAriaLabel?: string;
36
+ removeTooltipForRecorded?: string;
37
+ statusPending?: string;
38
+ statusRecorded?: string;
39
+ statusFailed?: string;
40
+ }
41
+ export interface SplitPaymentSummaryProps {
42
+ /** Total amount the host is collecting (sum target). */
43
+ total: Money;
44
+ /**
45
+ * All tenders entered so far — pending, recorded, or failed. Failed
46
+ * tenders are shown but excluded from the running balance.
47
+ */
48
+ tenders: TenderRow[];
49
+ /**
50
+ * Invoked when the user clicks the remove button on a tender row. Only
51
+ * fires when removal is allowed (i.e. status === 'pending' or 'failed').
52
+ * Omit to hide remove buttons entirely.
53
+ */
54
+ onRemove?: (id: string) => void;
55
+ locale?: string;
56
+ labels?: SplitPaymentSummaryLabels;
57
+ /** Hide the collected list (just the remaining banner). */
58
+ hideCollectedList?: boolean;
59
+ 'data-testid'?: string;
60
+ className?: string;
61
+ }
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryProps } from './types';
3
+ export declare const Summary: React.FC<SummaryProps>;
4
+ export default Summary;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryClassNames, SummaryPrimaryAction, SummaryProps } from '../types';
3
+ export interface ActionBarProps {
4
+ open: boolean;
5
+ /** Open progress 0→1; drives the cross-fade opacity. */
6
+ progress: number;
7
+ /** True while a drag is in progress (disables the eased transition). */
8
+ dragging: boolean;
9
+ primaryAction?: SummaryPrimaryAction;
10
+ isLoading: boolean;
11
+ cart?: SummaryProps['cart'];
12
+ cartAriaLabel: string;
13
+ /** Expand the summary — the closed-bar cart button opens it on click. */
14
+ onToggleOpen?: () => void;
15
+ classNames: SummaryClassNames;
16
+ }
17
+ export declare const ActionBar: React.FC<ActionBarProps>;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryProps } from '../types';
3
+ export interface CartButtonProps {
4
+ cart: NonNullable<SummaryProps['cart']>;
5
+ ariaLabel: string;
6
+ /** Click handler — wired by the action bar to open the summary (and still
7
+ * fire the consumer's `cart.onPress` if provided). */
8
+ onPress: () => void;
9
+ className?: string;
10
+ }
11
+ export declare const CartButton: React.FC<CartButtonProps>;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { Money, SummaryClassNames } from '../types';
3
+ export interface CollapseHeaderProps {
4
+ title: React.ReactNode;
5
+ total: {
6
+ label?: React.ReactNode;
7
+ amount: Money;
8
+ };
9
+ locale: string;
10
+ open: boolean;
11
+ /** Open progress 0→1; drives the cross-fade opacity. */
12
+ progress: number;
13
+ /** True while a drag is in progress (disables the eased transition). */
14
+ dragging: boolean;
15
+ toggleAriaLabel: string;
16
+ onToggleOpen?: () => void;
17
+ classNames: SummaryClassNames;
18
+ }
19
+ export declare const CollapseHeader: React.FC<CollapseHeaderProps>;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { Money } from '../types';
3
+ export interface GrandTotalRowProps {
4
+ total: {
5
+ label?: React.ReactNode;
6
+ amount: Money;
7
+ };
8
+ locale: string;
9
+ className?: string;
10
+ }
11
+ export declare const GrandTotalRow: React.FC<GrandTotalRowProps>;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryLineItem } from '../types';
3
+ export interface ItemRowProps {
4
+ item: SummaryLineItem;
5
+ locale: string;
6
+ onRemove?: (id: string) => void;
7
+ removeAriaLabel: string;
8
+ }
9
+ export declare const ItemRow: React.FC<ItemRowProps>;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryProps } from '../types';
3
+ export interface PrimaryCtaProps {
4
+ action: NonNullable<SummaryProps['primaryAction']>;
5
+ disabledByLoading: boolean;
6
+ className?: string;
7
+ /** Disambiguates the two cross-fade CTA layers. Default `summary-cta` (the
8
+ * open / desktop instance); the closed compact layer passes `summary-cta-compact`. */
9
+ testId?: string;
10
+ }
11
+ export declare const PrimaryCta: React.FC<PrimaryCtaProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryServiceFee } from '../types';
3
+ export interface ServiceFeeRowProps {
4
+ fee: SummaryServiceFee;
5
+ locale: string;
6
+ className?: string;
7
+ }
8
+ export declare const ServiceFeeRow: React.FC<ServiceFeeRowProps>;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryClassNames, SummaryLineItem, SummaryServiceFee, SummaryTotalRow } from '../types';
3
+ export interface SummaryBodyProps {
4
+ pricesInLabel: React.ReactNode;
5
+ currency?: React.ReactNode;
6
+ items?: SummaryLineItem[];
7
+ serviceFee?: SummaryServiceFee;
8
+ rows?: SummaryTotalRow[];
9
+ locale: string;
10
+ onRemoveItem?: (id: string) => void;
11
+ removeAriaLabel: string;
12
+ emptyState?: React.ReactNode;
13
+ classNames: SummaryClassNames;
14
+ }
15
+ export declare const SummaryBody: React.FC<SummaryBodyProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { SummaryTotalRow } from '../types';
3
+ export interface TotalsLineRowProps {
4
+ row: SummaryTotalRow;
5
+ locale: string;
6
+ emphasized: boolean;
7
+ }
8
+ export declare const TotalsLineRow: React.FC<TotalsLineRowProps>;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Drag/reveal gesture helpers for the collapsible `<Summary>`.
3
+ *
4
+ * Kept in their own module (not in `Summary.tsx`) so the component file only
5
+ * exports a component — the Design-System fast-refresh convention — and so the
6
+ * gesture math is pure and fully unit-tested (framer's drag `info` never fires
7
+ * under the test mock).
8
+ */
9
+ /**
10
+ * Minimum vertical drag distance (px) past which a collapsible summary toggles.
11
+ * Exported so the gesture threshold is testable and tunable.
12
+ */
13
+ export declare const DRAG_TOGGLE_THRESHOLD = 60;
14
+ /**
15
+ * Pure decision for the drag-to-toggle gesture: drag **up** (negative offset)
16
+ * while closed opens; drag **down** (positive offset) while open closes. A drag
17
+ * shorter than `threshold`, or in the wrong direction for the current state,
18
+ * does nothing.
19
+ */
20
+ export declare const shouldToggleOnDrag: (offsetY: number, open: boolean, threshold?: number) => boolean;
21
+ /** Clamp a proposed reveal height into `[0, fullHeight]`. */
22
+ export declare const clampRevealHeight: (proposed: number, fullHeight: number) => number;
23
+ /**
24
+ * Live reveal height while dragging: dragging **up** (negative `offsetY`) grows
25
+ * the panel from its `baseHeight`; dragging **down** shrinks it. Clamped to the
26
+ * panel's natural `fullHeight` so it tracks the finger 1:1 without overshooting.
27
+ */
28
+ export declare const revealHeightFromDrag: (baseHeight: number, offsetY: number, fullHeight: number) => number;
29
+ /**
30
+ * Resolve the reveal panel's current height. While dragging (`dragHeight` set)
31
+ * the finger drives it; otherwise it rests fully open (`fullHeight`) or fully
32
+ * collapsed (`0`).
33
+ */
34
+ export declare const currentRevealHeight: (dragHeight: number | null, open: boolean, fullHeight: number) => number;
35
+ /**
36
+ * The reveal panel animates its height smoothly at rest, but tracks the finger
37
+ * with no transition while dragging (so the drag feels 1:1, not laggy).
38
+ */
39
+ export declare const revealTransitionClass: (dragging: boolean) => string;
40
+ export interface DragInfo {
41
+ offset?: {
42
+ y?: number;
43
+ };
44
+ }
45
+ export interface DragHandlerDeps {
46
+ open: boolean;
47
+ fullHeight: number;
48
+ setDragHeight: (height: number | null) => void;
49
+ onToggleOpen?: () => void;
50
+ }
51
+ export interface DragHandlers {
52
+ onDrag: (event: unknown, info?: DragInfo) => void;
53
+ onDragEnd: (event: unknown, info?: DragInfo) => void;
54
+ }
55
+ export declare const createDragHandlers: (deps: DragHandlerDeps) => DragHandlers;
@@ -0,0 +1,2 @@
1
+ import { Money } from '../../utils/money';
2
+ export declare const fmt: (m: Money, locale: string) => string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Summary Pattern — pure-UI order summary (Figma node 12127-11831):
3
+ * header, flexible line items, service-fee toggle, totals, collapsible
4
+ * Total + CTA, and a compact mobile bottom-bar.
5
+ */
6
+ export { Summary } from './Summary';
7
+ export type { SummaryProps, SummaryLineItem, SummaryServiceFee, SummaryTotalRow, SummaryPrimaryAction, SummaryLabels, Money, } from './types';
@@ -0,0 +1,147 @@
1
+ import { ReactNode } from 'react';
2
+ import { Money } from '../../utils/money';
3
+ export type { Money } from '../../utils/money';
4
+ /**
5
+ * A single, flexible line item. The four Figma "types" (Ticket, Event,
6
+ * Membership, Donation) are compositions of this one shape — not rigid
7
+ * variants — honouring "grouping, but flexible".
8
+ */
9
+ export interface SummaryLineItem {
10
+ /** Stable id (keys, remove handler, and `data-testid`). */
11
+ id: string;
12
+ /** Display name (Ticket / Event title / Membership / Donation). */
13
+ name: ReactNode;
14
+ /** Quantity; renders a `{qty} x` prefix (Ticket / Adult / Children). */
15
+ quantity?: number;
16
+ /** Right-aligned price. Omit on an Event header that only groups children. */
17
+ amount?: Money;
18
+ /** Render the name in a heavier weight (Event / Membership / Donation titles). */
19
+ emphasis?: boolean;
20
+ /** Leading icon node (e.g. `lucide:ticket` for Event, `lucide:star` for Membership). */
21
+ leadingIcon?: ReactNode;
22
+ /** Calendar row, e.g. "March 26th, 2026 - 9:45 am - 09:45 pm" (Event). */
23
+ dateLabel?: ReactNode;
24
+ /** Date-range row joined by an arrow (Membership), e.g. Jan 26, 2026 → Jan 26, 2027. */
25
+ dateRange?: {
26
+ from: ReactNode;
27
+ to: ReactNode;
28
+ };
29
+ /** Nested rows, indented (Event's Adult / Children). */
30
+ children?: SummaryLineItem[];
31
+ }
32
+ /** The "Pay Service fee" radio-toggle row. */
33
+ export interface SummaryServiceFee {
34
+ label: ReactNode;
35
+ amount: Money;
36
+ /** Selected (filled radio) state. */
37
+ isSelected?: boolean;
38
+ /** Fires when the row/radio is toggled. */
39
+ onToggle?: () => void;
40
+ }
41
+ /** A plain totals row (Subtotal, Taxes). */
42
+ export interface SummaryTotalRow {
43
+ /** Stable key for `data-testid` (e.g. 'subtotal', 'taxes'). */
44
+ key: string;
45
+ label: ReactNode;
46
+ amount: Money;
47
+ }
48
+ /** The primary call-to-action (orange pill + arrow). */
49
+ export interface SummaryPrimaryAction {
50
+ label: ReactNode;
51
+ onPress: () => void;
52
+ isLoading?: boolean;
53
+ isDisabled?: boolean;
54
+ }
55
+ /** Overridable copy. */
56
+ export interface SummaryLabels {
57
+ /** Aria label for the per-item remove control. Default "Remove item". */
58
+ removeAriaLabel?: string;
59
+ /** Aria label for the collapse/expand press target. Default "Toggle summary". */
60
+ toggleAriaLabel?: string;
61
+ /** Aria label for the mobile cart button. Default "View cart". */
62
+ cartAriaLabel?: string;
63
+ }
64
+ /**
65
+ * Per-slot class overrides — the Design-System `classNames` convention (HeroUI
66
+ * `SlotsToClasses`). Each key targets one visual region and is merged AFTER the
67
+ * component's own classes via `cn`, so any Tailwind utility you pass wins. The
68
+ * root also accepts the plain `className`.
69
+ */
70
+ export interface SummaryClassNames {
71
+ /** Root `<section>` (applied alongside `className`). */
72
+ base?: string;
73
+ /** Header row (title + `×`). */
74
+ header?: string;
75
+ /** Title text. */
76
+ title?: string;
77
+ /** The header collapse/close (`×`) control. */
78
+ closeButton?: string;
79
+ /** "Prices are in / currency" row. */
80
+ prices?: string;
81
+ /** Line-items container. */
82
+ items?: string;
83
+ /** Service-fee row. */
84
+ serviceFee?: string;
85
+ /** Totals-rows container (Subtotal / Taxes). */
86
+ totalsRows?: string;
87
+ /** The Total row. */
88
+ total?: string;
89
+ /** Primary CTA button. */
90
+ cta?: string;
91
+ /** Mobile compact bottom-bar. */
92
+ mobileBar?: string;
93
+ /** Mobile cart button. */
94
+ cart?: string;
95
+ }
96
+ export interface SummaryProps {
97
+ /** Header title. Default "Summary". */
98
+ title?: ReactNode;
99
+ /** Left text of the prices row. Default "Prices are in". */
100
+ pricesInLabel?: ReactNode;
101
+ /** Right text of the prices row (currency code), e.g. "USD". */
102
+ currency?: ReactNode;
103
+ /** BCP-47 locale for money formatting. Default 'en-US'. */
104
+ locale?: string;
105
+ /** Flexible line items (flat or grouped via `children`). */
106
+ items?: SummaryLineItem[];
107
+ /** Optional "Pay Service fee" radio-toggle row. */
108
+ serviceFee?: SummaryServiceFee;
109
+ /** Plain totals rows rendered above the Total (Subtotal, Taxes). */
110
+ rows?: SummaryTotalRow[];
111
+ /** The emphasized Total row (label default "Total"). */
112
+ total: {
113
+ label?: ReactNode;
114
+ amount: Money;
115
+ };
116
+ /**
117
+ * Whether the summary can collapse — the header shows a `×` and the whole
118
+ * header toggles Open/Closed. Defaults to `variant === 'mobile'` (mobile
119
+ * collapses, desktop does not). Pass explicitly to override the automatic
120
+ * behaviour.
121
+ */
122
+ collapsible?: boolean;
123
+ /** Controlled open/closed state (default open). */
124
+ isOpen?: boolean;
125
+ /** Fires when the header (open) — or the closed bar's Total (closed) — is activated to toggle. */
126
+ onToggleOpen?: () => void;
127
+ /** The primary CTA. */
128
+ primaryAction?: SummaryPrimaryAction;
129
+ /** When provided, item rows show a red trash remove control. */
130
+ onRemoveItem?: (id: string) => void;
131
+ /** Layout: full card ('main') or compact bottom-bar ('mobile'). Default 'main'. */
132
+ variant?: 'main' | 'mobile';
133
+ /** Mobile bottom-bar cart button + badge count. */
134
+ cart?: {
135
+ count?: number;
136
+ onPress?: () => void;
137
+ };
138
+ /** Disables the CTA and signals recalculation. */
139
+ isLoading?: boolean;
140
+ /** Rendered when there are no items. */
141
+ emptyState?: ReactNode;
142
+ labels?: SummaryLabels;
143
+ 'data-testid'?: string;
144
+ className?: string;
145
+ /** Per-slot class overrides (Design-System `classNames` convention). */
146
+ classNames?: SummaryClassNames;
147
+ }
@@ -12,6 +12,9 @@ export type TicketSelectionLabels = {
12
12
  export type TicketData = {
13
13
  id: string;
14
14
  name: string;
15
+ membershipName?: string;
16
+ membershipAlert?: string;
17
+ purchasedQuantity?: number;
15
18
  price: number;
16
19
  originalPrice: number;
17
20
  max: number;
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+ export interface TileSelectOption {
3
+ /** Stable identifier returned via `onSelect`. */
4
+ key: string;
5
+ /** Visible label rendered under the icon. */
6
+ label: string;
7
+ /**
8
+ * Icon: iconify name (`'lucide:credit-card'`) or a `ReactNode` for
9
+ * fully-custom SVGs.
10
+ */
11
+ icon: string | React.ReactNode;
12
+ /** Disable the tile (greyed out, no click). */
13
+ isDisabled?: boolean;
14
+ /** Override per-tile test id; defaults to `${dataTestId}-${key}`. */
15
+ 'data-testid'?: string;
16
+ }
17
+ export interface TileSelectProps {
18
+ /** Options to render in order. */
19
+ options: readonly TileSelectOption[];
20
+ /** Currently selected option `key`. `null` = no selection. */
21
+ selectedKey: string | null;
22
+ /** Fires when a tile is selected. */
23
+ onSelect: (key: string) => void;
24
+ /** Optional heading rendered above the grid. */
25
+ heading?: string;
26
+ /**
27
+ * `aria-label` for the wrapping group when `heading` is omitted.
28
+ * Translatable. Default `'Select an option'`. When `heading` is
29
+ * provided this prop is ignored — the grid is labelled by the
30
+ * heading element.
31
+ */
32
+ ariaLabel?: string;
33
+ /** Grid columns on >= sm. Default `3`. Mobile collapses to 2. */
34
+ columnsDesktop?: 2 | 3 | 4;
35
+ columnsMobile?: 1 | 2;
36
+ className?: string;
37
+ 'data-testid'?: string;
38
+ }
39
+ export declare const TileSelect: React.FC<TileSelectProps>;
@@ -0,0 +1,2 @@
1
+ export { TileSelect } from './TileSelect';
2
+ export type { TileSelectProps, TileSelectOption } from './TileSelect';