@veevarts/design-system 1.12.7 → 1.13.0-alpha.1

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 (75) hide show
  1. package/dist/index.cjs +5 -14
  2. package/dist/index.js +8416 -10779
  3. package/dist/patterns/CashTenderForm/types.d.ts +10 -0
  4. package/dist/patterns/CatalogItemCard/CatalogItemCard.d.ts +7 -0
  5. package/dist/patterns/CatalogItemCard/index.d.ts +2 -0
  6. package/dist/patterns/CatalogItemCard/type.d.ts +82 -0
  7. package/dist/patterns/CheckTenderForm/types.d.ts +10 -0
  8. package/dist/patterns/CommitmentDetails/CommitmentDetails.d.ts +16 -0
  9. package/dist/patterns/CommitmentDetails/index.d.ts +2 -0
  10. package/dist/patterns/ConfirmationModal/ConfirmationModal.d.ts +22 -0
  11. package/dist/patterns/ConfirmationModal/index.d.ts +2 -0
  12. package/dist/patterns/EventDetails/EventDetails.d.ts +3 -1
  13. package/dist/patterns/FeedbackState/FeedbackState.d.ts +23 -0
  14. package/dist/patterns/FeedbackState/index.d.ts +2 -0
  15. package/dist/patterns/FeedbackState/type.d.ts +40 -0
  16. package/dist/patterns/FilterPopover/FilterPopover.d.ts +6 -0
  17. package/dist/patterns/FilterPopover/index.d.ts +2 -0
  18. package/dist/patterns/FilterPopover/type.d.ts +85 -0
  19. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +3 -0
  20. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignmentSkeleton.d.ts +2 -0
  21. package/dist/patterns/InstallmentFundAssignment/index.d.ts +3 -0
  22. package/dist/patterns/InstallmentFundAssignment/types.d.ts +67 -0
  23. package/dist/patterns/InstallmentFundAssignment/utils.d.ts +12 -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 +100 -0
  29. package/dist/patterns/InstallmentSchedule/utils.d.ts +3 -0
  30. package/dist/patterns/ItemCard/type.d.ts +52 -0
  31. package/dist/patterns/OfferCard/OfferCard.d.ts +1 -1
  32. package/dist/patterns/OfferCard/types.d.ts +93 -2
  33. package/dist/patterns/OfferCard/variants/OfferCardList.d.ts +2 -2
  34. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +11 -0
  35. package/dist/patterns/SessionTimeline/SessionTimeline.d.ts +7 -0
  36. package/dist/patterns/SessionTimeline/index.d.ts +2 -0
  37. package/dist/patterns/SessionTimeline/type.d.ts +76 -0
  38. package/dist/patterns/Summary/Summary.d.ts +4 -0
  39. package/dist/patterns/Summary/components/ActionBar.d.ts +17 -0
  40. package/dist/patterns/Summary/components/CartButton.d.ts +11 -0
  41. package/dist/patterns/Summary/components/CollapseHeader.d.ts +19 -0
  42. package/dist/patterns/Summary/components/GrandTotalRow.d.ts +11 -0
  43. package/dist/patterns/Summary/components/ItemRow.d.ts +9 -0
  44. package/dist/patterns/Summary/components/PrimaryCta.d.ts +11 -0
  45. package/dist/patterns/Summary/components/ServiceFeeRow.d.ts +8 -0
  46. package/dist/patterns/Summary/components/SummaryBody.d.ts +15 -0
  47. package/dist/patterns/Summary/components/TotalsLineRow.d.ts +8 -0
  48. package/dist/patterns/Summary/drag.d.ts +55 -0
  49. package/dist/patterns/Summary/fmt.d.ts +2 -0
  50. package/dist/patterns/Summary/index.d.ts +7 -0
  51. package/dist/patterns/Summary/types.d.ts +154 -0
  52. package/dist/patterns/Summary/useIsMobile.d.ts +17 -0
  53. package/dist/patterns/index.d.ts +18 -0
  54. package/package.json +2 -1
  55. package/dist/components/Button/Button.test.d.ts +0 -1
  56. package/dist/components/Select/Select.test.d.ts +0 -1
  57. package/dist/patterns/CashTenderForm/__test__/CashTenderForm.test.d.ts +0 -4
  58. package/dist/patterns/CheckTenderForm/__test__/CheckTenderForm.test.d.ts +0 -4
  59. package/dist/patterns/DonationAmounts/__test__/DonationAmounts.test.d.ts +0 -4
  60. package/dist/patterns/EventDetails/__test__/EventDetails.test.d.ts +0 -1
  61. package/dist/patterns/ExpireCartTimer/__test__/ExpireCartTimer.test.d.ts +0 -4
  62. package/dist/patterns/Footer/__test__/Footer.test.d.ts +0 -1
  63. package/dist/patterns/ItemCard/__test__/ItemCard.test.d.ts +0 -4
  64. package/dist/patterns/MembershipSelectCards/__test__/MembershipSelectCards.test.d.ts +0 -4
  65. package/dist/patterns/Multiselect/__test__/Multiselect.test.d.ts +0 -4
  66. package/dist/patterns/Navbar/__test__/Navbar.test.d.ts +0 -1
  67. package/dist/patterns/OfferCard/__test__/OfferCard.test.d.ts +0 -1
  68. package/dist/patterns/OtherTenderForm/__test__/OtherTenderForm.test.d.ts +0 -4
  69. package/dist/patterns/RevenueDistribution/__test__/RevenueDistributionCard.test.d.ts +0 -1
  70. package/dist/patterns/RichText/RichText.test.d.ts +0 -1
  71. package/dist/patterns/RichText/core/TipTapEditor.test.d.ts +0 -1
  72. package/dist/patterns/SplitPaymentSummary/__test__/SplitPaymentSummary.test.d.ts +0 -4
  73. package/dist/patterns/Stepper/Stepper.test.d.ts +0 -4
  74. package/dist/patterns/TicketSelection/__test__/TicketSelection.test.d.ts +0 -4
  75. package/dist/patterns/Toggle/__test__/Toggle.test.d.ts +0 -4
@@ -60,6 +60,16 @@ export interface CashTenderFormProps {
60
60
  * Disable interactions (e.g. while submitting).
61
61
  */
62
62
  isDisabled?: boolean;
63
+ /**
64
+ * Hard upper bound for the received amount, in MAJOR units (same unit
65
+ * as `dueAmount.value`). A keystroke that would push the parsed value
66
+ * above this is REJECTED (the field keeps its prior value) — so a
67
+ * cashier can't enter a pathological amount that overflows the PSP
68
+ * integer range downstream. A character `maxLength` can't enforce this
69
+ * (e.g. `99999999` is only 8 chars yet far over a $999,999.99 cap), so
70
+ * the guard is value-based. Omit for no cap.
71
+ */
72
+ maxAmount?: number;
63
73
  /**
64
74
  * Auto-focus the Cash Received field when this component mounts.
65
75
  * Pair with `key={...}` from the host to re-trigger focus on every
@@ -0,0 +1,7 @@
1
+ import { JSX } from 'react';
2
+ import { CatalogItemCardProps } from './type';
3
+ export declare const CatalogItemCard: {
4
+ ({ id, title, media, imageUrl, imageAlt, imageClassName, imageAspect, meta, price, action, footer, onPress, isPressable, isDisabled, compact, className, bodyClassName, footerClassName, dataTestId, }: CatalogItemCardProps): JSX.Element;
5
+ displayName: string;
6
+ };
7
+ export default CatalogItemCard;
@@ -0,0 +1,2 @@
1
+ export { default as CatalogItemCard } from './CatalogItemCard';
2
+ export type * from './type';
@@ -0,0 +1,82 @@
1
+ import { ButtonProps } from '../../components';
2
+ /**
3
+ * Metadata row displayed under the card title.
4
+ */
5
+ export interface CatalogItemCardMetaItem {
6
+ /** Iconify icon name for the metadata row. */
7
+ icon: string;
8
+ /** Human-readable metadata value. */
9
+ label: string;
10
+ }
11
+ /**
12
+ * Optional price block shown in the card footer.
13
+ */
14
+ export interface CatalogItemCardPrice {
15
+ /** Optional prefix before the value, typically `From` or `Starts at`. */
16
+ label: string;
17
+ /** Fully formatted amount to render. */
18
+ value: string;
19
+ }
20
+ /**
21
+ * Optional action shown in the card footer.
22
+ */
23
+ export interface CatalogItemCardAction {
24
+ /** Action label for the button. */
25
+ label: string;
26
+ /** Iconify icon name. */
27
+ icon?: string;
28
+ /** Click handler for the action button. */
29
+ onPress?: () => void;
30
+ /** HeroUI button variant. */
31
+ variant?: ButtonProps['variant'];
32
+ /** HeroUI button color. */
33
+ color?: ButtonProps['color'];
34
+ /** HeroUI button size. */
35
+ size?: ButtonProps['size'];
36
+ /** Additional classes for action button. */
37
+ className?: string;
38
+ /** Disabled state for action button. */
39
+ isDisabled?: boolean;
40
+ /** Optional aria label override for action button. */
41
+ ariaLabel?: string;
42
+ }
43
+ export interface CatalogItemCardProps {
44
+ /** Optional card identifier used for data-testid and DOM debugging. */
45
+ id?: string;
46
+ /** Card title. */
47
+ title: string;
48
+ /** Optional custom media node. If not provided, `imageUrl` is used. */
49
+ media?: React.ReactNode;
50
+ /** Optional image URL used when `media` is not set. */
51
+ imageUrl?: string;
52
+ /** Optional image alt text used when `media` is not set. */
53
+ imageAlt?: string;
54
+ /** Optional className for the image wrapper. */
55
+ imageClassName?: string;
56
+ /** Optional aspect ratio class for media wrapper. */
57
+ imageAspect?: string;
58
+ /** Optional list of metadata rows. */
59
+ meta?: CatalogItemCardMetaItem[];
60
+ /** Optional price block. */
61
+ price?: CatalogItemCardPrice;
62
+ /** Optional root action button. */
63
+ action?: CatalogItemCardAction;
64
+ /** Optional custom footer content. If provided, `price` and `action` still render above it. */
65
+ footer?: React.ReactNode;
66
+ /** Set a press handler on the card root. */
67
+ onPress?: () => void;
68
+ /** Enables pressable visual behavior when combined with `onPress`. */
69
+ isPressable?: boolean;
70
+ /** Disable all card interactions. */
71
+ isDisabled?: boolean;
72
+ /** Compact layout mode. */
73
+ compact?: boolean;
74
+ /** Root className for the component. */
75
+ className?: string;
76
+ /** Root className for card body. */
77
+ bodyClassName?: string;
78
+ /** Footer container className. */
79
+ footerClassName?: string;
80
+ /** Optional root test id for QA. */
81
+ dataTestId?: string;
82
+ }
@@ -37,6 +37,16 @@ export interface CheckTenderFormProps {
37
37
  /** Hide the bank name field when the host doesn't care. */
38
38
  hideBankName?: boolean;
39
39
  isDisabled?: boolean;
40
+ /**
41
+ * Character cap for the Check Number field. Guards against pathological
42
+ * paste / extreme input. Default `34` (the length of the longest IBAN,
43
+ * a generous ceiling for any cheque / international reference).
44
+ */
45
+ checkNumberMaxLength?: number;
46
+ /**
47
+ * Character cap for the Bank Name field. Default `100`.
48
+ */
49
+ bankNameMaxLength?: number;
40
50
  /**
41
51
  * Auto-focus the Check Number field when this component mounts.
42
52
  * Pair with `key={...}` from the host to re-trigger focus on every
@@ -0,0 +1,16 @@
1
+ import { JSX } from 'react';
2
+ export type CommitmentDetailsLabels = {
3
+ totalAmount?: string;
4
+ remainingBalance?: string;
5
+ amountReceived?: string;
6
+ };
7
+ export type CommitmentDetailsProps = {
8
+ totalAmount: number;
9
+ remainingBalance: number;
10
+ amountReceived: number;
11
+ currency?: string;
12
+ locale?: string;
13
+ labels?: CommitmentDetailsLabels;
14
+ className?: string;
15
+ };
16
+ export declare function CommitmentDetails({ totalAmount, remainingBalance, amountReceived, currency, locale, labels: customLabels, className, }: CommitmentDetailsProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { CommitmentDetails } from './CommitmentDetails';
2
+ export type { CommitmentDetailsLabels, CommitmentDetailsProps } from './CommitmentDetails';
@@ -0,0 +1,22 @@
1
+ import { JSX, ReactNode } from 'react';
2
+ import { ModalProps } from '../../components';
3
+ export type ConfirmationModalLabels = {
4
+ title: string;
5
+ description: ReactNode;
6
+ cancel: string;
7
+ confirm: string;
8
+ };
9
+ export type ConfirmationModalProps = {
10
+ isOpen: boolean;
11
+ labels: ConfirmationModalLabels;
12
+ icon?: ReactNode;
13
+ isConfirming?: boolean;
14
+ confirmColor?: 'primary' | 'danger';
15
+ iconTone?: 'danger' | 'warning';
16
+ portalContainer?: Element;
17
+ shouldBlockScroll?: boolean;
18
+ classNames?: ModalProps['classNames'];
19
+ onClose: () => void;
20
+ onConfirm: () => void;
21
+ };
22
+ export declare function ConfirmationModal({ isOpen, labels, icon, isConfirming, confirmColor, iconTone, portalContainer, shouldBlockScroll, classNames, onClose, onConfirm, }: ConfirmationModalProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ConfirmationModal } from './ConfirmationModal';
2
+ export type { ConfirmationModalLabels, ConfirmationModalProps } from './ConfirmationModal';
@@ -18,6 +18,8 @@ export interface EventDetailsProps {
18
18
  description?: string;
19
19
  /** @property {string} [classes] - Optional Tailwind CSS utility classes for custom styling. */
20
20
  classes?: string;
21
+ /** @property {boolean} [compact] - Dense spacing mode for compact side layouts. */
22
+ compact?: boolean;
21
23
  /** @property {boolean} [showImage] - Optional flag to show or hide the event image. Defaults to true. */
22
24
  showImage?: boolean;
23
25
  /** @property {'lazy' | 'eager'} [imageLoading] - Optional loading strategy for the event image. Use `'lazy'` for off-screen placements (long lists, below-the-fold). Defaults to `'eager'` since the banner is typically above-the-fold. */
@@ -35,5 +37,5 @@ export interface EventDetailsProps {
35
37
  * @function EventDetails
36
38
  * @description Displays a card with event information such as name, image, date, time, location, and description.
37
39
  */
38
- export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
40
+ export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, compact, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
39
41
  export default EventDetails;
@@ -0,0 +1,23 @@
1
+ import { JSX } from 'react';
2
+ import { EmptyStateProps, ErrorStateProps, FeedbackStateProps, LoadingStateProps, SuccessStateProps } from './type';
3
+ export declare function FeedbackState({ variant, title, titleAs: TitleElement, description, icon, actions, role, ariaLive, iconSize, className, classNames, 'data-testid': dataTestId, }: FeedbackStateProps): JSX.Element;
4
+ export declare namespace FeedbackState {
5
+ var displayName: string;
6
+ }
7
+ export declare function EmptyState(props: EmptyStateProps): JSX.Element;
8
+ export declare namespace EmptyState {
9
+ var displayName: string;
10
+ }
11
+ export declare function ErrorState(props: ErrorStateProps): JSX.Element;
12
+ export declare namespace ErrorState {
13
+ var displayName: string;
14
+ }
15
+ export declare function LoadingState(props: LoadingStateProps): JSX.Element;
16
+ export declare namespace LoadingState {
17
+ var displayName: string;
18
+ }
19
+ export declare function SuccessState(props: SuccessStateProps): JSX.Element;
20
+ export declare namespace SuccessState {
21
+ var displayName: string;
22
+ }
23
+ export default FeedbackState;
@@ -0,0 +1,2 @@
1
+ export { FeedbackState, EmptyState, ErrorState, LoadingState, SuccessState } from './FeedbackState';
2
+ export type * from './type';
@@ -0,0 +1,40 @@
1
+ import { AriaRole, ReactNode } from 'react';
2
+ export type FeedbackStateVariant = 'empty' | 'error' | 'success' | 'loading';
3
+ export interface FeedbackStateClassNames {
4
+ base?: string;
5
+ iconWrapper?: string;
6
+ icon?: string;
7
+ spinner?: string;
8
+ title?: string;
9
+ description?: string;
10
+ actions?: string;
11
+ }
12
+ export interface FeedbackStateProps {
13
+ /** Visual tone and default accessibility role. */
14
+ variant?: FeedbackStateVariant;
15
+ /** Main state message. */
16
+ title: ReactNode;
17
+ /** Semantic element used for the title. Defaults to a paragraph for inline states. */
18
+ titleAs?: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'div';
19
+ /** Supporting copy rendered under the title. */
20
+ description?: ReactNode;
21
+ /** Iconify name, custom React node, or false to hide the icon. Loading defaults to a spinner. */
22
+ icon?: string | ReactNode | false;
23
+ /** Optional CTA area; pass buttons, links, or any custom action group. */
24
+ actions?: ReactNode;
25
+ /** Overrides the default role: error => alert, otherwise status. */
26
+ role?: AriaRole;
27
+ /** Overrides the default live-region politeness. */
28
+ ariaLive?: 'off' | 'polite' | 'assertive';
29
+ /** Icon size in pixels when icon is an Iconify name. */
30
+ iconSize?: number;
31
+ /** Root className shortcut. */
32
+ className?: string;
33
+ /** Slot-level className overrides. */
34
+ classNames?: FeedbackStateClassNames;
35
+ 'data-testid'?: string;
36
+ }
37
+ export type EmptyStateProps = Omit<FeedbackStateProps, 'variant'>;
38
+ export type ErrorStateProps = Omit<FeedbackStateProps, 'variant'>;
39
+ export type LoadingStateProps = Omit<FeedbackStateProps, 'variant'>;
40
+ export type SuccessStateProps = Omit<FeedbackStateProps, 'variant'>;
@@ -0,0 +1,6 @@
1
+ import { FilterPopoverProps } from './type';
2
+ export declare const FilterPopover: {
3
+ ({ triggerLabel, triggerAriaLabel, triggerIcon, triggerVariant, triggerColor, triggerSize, triggerClassName, popoverClassName, className, sections, onConfirm, onClear, appliedCount, countAriaLabel, countDisplay, confirmLabel, clearLabel, isOpen, defaultOpen, onOpenChange, isDisabled, closeOnConfirm, keepOpenAfterClear, }: FilterPopoverProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default FilterPopover;
@@ -0,0 +1,2 @@
1
+ export { default as FilterPopover } from './FilterPopover';
2
+ export type * from './type';
@@ -0,0 +1,85 @@
1
+ import { ButtonProps } from '../../components';
2
+ export interface FilterOption {
3
+ /** Option value used in payload. */
4
+ value: string;
5
+ /** Label for the option. */
6
+ label: string;
7
+ /** Option disabled state. */
8
+ isDisabled?: boolean;
9
+ }
10
+ export interface FilterSectionBase {
11
+ /** Unique identifier for this filter section. */
12
+ id: string;
13
+ /** Section label above its options. */
14
+ label: string;
15
+ }
16
+ export interface CheckboxFilterSection extends FilterSectionBase {
17
+ /** Render options as multi-select checkboxes. */
18
+ type: 'checkbox';
19
+ /** Currently selected values for this section. */
20
+ selectedValues: readonly string[];
21
+ /** Checkbox section options. */
22
+ options: readonly FilterOption[];
23
+ }
24
+ export interface RadioFilterSection extends FilterSectionBase {
25
+ /** Render options as mutually exclusive radio buttons. */
26
+ type: 'radio';
27
+ /** Currently selected value; empty when no option selected. */
28
+ selectedValue: string | null;
29
+ /** Radio section options. */
30
+ options: readonly FilterOption[];
31
+ }
32
+ export type FilterSection = CheckboxFilterSection | RadioFilterSection;
33
+ export type AppliedFilterValues = Record<string, string | string[] | null>;
34
+ export type DraftFilterValues = Record<string, string[]>;
35
+ export interface FilterPopoverProps {
36
+ /** Label for popover trigger button. */
37
+ triggerLabel: string;
38
+ /** Optional accessible label for the popover trigger. */
39
+ triggerAriaLabel?: string;
40
+ /** Optional icon for trigger button. */
41
+ triggerIcon?: string;
42
+ /** Text for confirmation button. */
43
+ confirmLabel?: string;
44
+ /** Text for clear button. */
45
+ clearLabel?: string;
46
+ /** Count badge accessibility label. */
47
+ countAriaLabel?: (count: number) => string;
48
+ /**
49
+ * How to render the applied filter count on the trigger.
50
+ * Defaults to compact badge rendering for buyer-flow toolbar usage.
51
+ */
52
+ countDisplay?: 'summary' | 'badge';
53
+ /** Applied sections to initialize draft state. */
54
+ sections: readonly FilterSection[];
55
+ /** Called with normalized values when user clicks Confirm. */
56
+ onConfirm: (values: AppliedFilterValues) => void | Promise<void>;
57
+ /** Clears all filters. */
58
+ onClear: () => void | Promise<void>;
59
+ /** Optional external count override. */
60
+ appliedCount?: number;
61
+ /** Control popover open state. */
62
+ isOpen?: boolean;
63
+ /** Uncontrolled initial open state. */
64
+ defaultOpen?: boolean;
65
+ /** Controlled open-state change handler. */
66
+ onOpenChange?: (isOpen: boolean) => void;
67
+ /** Trigger variant. */
68
+ triggerVariant?: ButtonProps['variant'];
69
+ /** Trigger color. */
70
+ triggerColor?: ButtonProps['color'];
71
+ /** Trigger size. */
72
+ triggerSize?: ButtonProps['size'];
73
+ /** Trigger button className. */
74
+ triggerClassName?: string;
75
+ /** Popover content className. */
76
+ popoverClassName?: string;
77
+ /** Container className. */
78
+ className?: string;
79
+ /** Disable entire control. */
80
+ isDisabled?: boolean;
81
+ /** Close popover when confirm is clicked. */
82
+ closeOnConfirm?: boolean;
83
+ /** Keep popover open after clearing. */
84
+ keepOpenAfterClear?: boolean;
85
+ }
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'react';
2
+ import { InstallmentFundAssignmentProps } from './types';
3
+ export declare function InstallmentFundAssignment({ assignments, funds, labels: customLabels, classNames, isSaving, hasSavedAssignments, isFundPickerOpen, activeAssignmentId, footer, onAssignmentsChange, onOpenFundPicker, onCloseFundPicker, onCollapseChange, onSave, }: InstallmentFundAssignmentProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { JSX } from 'react';
2
+ export declare function InstallmentFundAssignmentSkeleton(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { InstallmentFundAssignment } from './InstallmentFundAssignment';
2
+ export { InstallmentFundAssignmentSkeleton } from './InstallmentFundAssignmentSkeleton';
3
+ export type { InstallmentFundAssignmentClassNames, InstallmentFundAssignmentLabels, InstallmentFundAssignmentMode, InstallmentFundAssignmentProps, InstallmentFund, InstallmentFundAssignmentEntry, } from './types';
@@ -0,0 +1,67 @@
1
+ import { ReactNode } from 'react';
2
+ export type InstallmentFundAssignmentMode = 'single' | 'split';
3
+ export type InstallmentFund = {
4
+ id: string;
5
+ glCode: string;
6
+ accountName: string;
7
+ type: string;
8
+ };
9
+ export type InstallmentFundAssignmentEntry = {
10
+ id: string;
11
+ fund: InstallmentFund | null;
12
+ percentage: number;
13
+ sortOrder?: number;
14
+ };
15
+ export type InstallmentFundAssignmentLabels = {
16
+ title?: string;
17
+ singleFund?: string;
18
+ splitFunds?: string;
19
+ saveAssignment?: string;
20
+ assignSpecificFund?: string;
21
+ addFund?: string;
22
+ emptySingle?: string;
23
+ emptySplit?: string;
24
+ selectedFund?: string;
25
+ percentage?: string;
26
+ total?: string;
27
+ totalError?: string;
28
+ removeFund?: string;
29
+ modalTitle?: string;
30
+ searchPlaceholder?: string;
31
+ glCode?: string;
32
+ accountName?: string;
33
+ type?: string;
34
+ actions?: string;
35
+ select?: string;
36
+ noFunds?: string;
37
+ modifyAssignedFundsTitle?: string;
38
+ modifyAssignedFundsDescription?: string;
39
+ modifyAssignedFundsWarning?: string;
40
+ modifyAssignedFundsCancel?: string;
41
+ modifyAssignedFundsConfirm?: string;
42
+ };
43
+ export type InstallmentFundAssignmentClassNames = {
44
+ root?: string;
45
+ panel?: string;
46
+ header?: string;
47
+ tabs?: string;
48
+ content?: string;
49
+ };
50
+ export type InstallmentFundAssignmentProps = {
51
+ mode?: InstallmentFundAssignmentMode;
52
+ assignments: InstallmentFundAssignmentEntry[];
53
+ funds: InstallmentFund[];
54
+ labels?: InstallmentFundAssignmentLabels;
55
+ classNames?: InstallmentFundAssignmentClassNames;
56
+ isSaving?: boolean;
57
+ hasSavedAssignments?: boolean;
58
+ isFundPickerOpen?: boolean;
59
+ activeAssignmentId?: string | null;
60
+ footer?: ReactNode;
61
+ onModeChange?: (mode: InstallmentFundAssignmentMode) => void;
62
+ onAssignmentsChange: (assignments: InstallmentFundAssignmentEntry[]) => void;
63
+ onOpenFundPicker: (assignmentId?: string) => void;
64
+ onCloseFundPicker: () => void;
65
+ onCollapseChange?: (isCollapsed: boolean) => void;
66
+ onSave: () => void;
67
+ };
@@ -0,0 +1,12 @@
1
+ import { InstallmentFundAssignmentEntry, InstallmentFundAssignmentMode } from './types';
2
+ export declare const createEmptyAssignment: () => InstallmentFundAssignmentEntry;
3
+ export declare function getAssignmentsForModeChange({ nextMode, assignments, previousSingleAssignments, previousSplitAssignments, }: {
4
+ nextMode: InstallmentFundAssignmentMode;
5
+ assignments: InstallmentFundAssignmentEntry[];
6
+ previousSingleAssignments: InstallmentFundAssignmentEntry[];
7
+ previousSplitAssignments: InstallmentFundAssignmentEntry[];
8
+ }): InstallmentFundAssignmentEntry[];
9
+ export declare function isAssignmentSaveValid({ mode, assignments, }: {
10
+ mode: InstallmentFundAssignmentMode;
11
+ assignments: InstallmentFundAssignmentEntry[];
12
+ }): boolean;
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'react';
2
+ import { InstallmentScheduleProps } from './types';
3
+ export declare function InstallmentSchedule({ mode, donationAmount, currency, locale, installments, automaticSettings, labels: customLabels, classNames, isSaving, isModeSwitchDisabled, onModeChange, onAutomaticSettingsChange, onInstallmentsChange, onSave, }: InstallmentScheduleProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { JSX } from 'react';
2
+ export declare function InstallmentScheduleSkeleton(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { JSX } from 'react';
2
+ import { InstallmentTableProps } from './types';
3
+ export declare function InstallmentTable({ installments, currency, locale, labels: customLabels, isSaving, onEditInstallments, onPayInstallment, onDeleteInstallment, }: InstallmentTableProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { InstallmentSchedule } from './InstallmentSchedule';
2
+ export { InstallmentScheduleSkeleton } from './InstallmentScheduleSkeleton';
3
+ export { InstallmentTable } from './InstallmentTable';
4
+ export { generateAutomaticInstallments } from './utils';
5
+ export type { AutomaticScheduleSettings, InstallmentFrequency, InstallmentTableLabels, InstallmentTableProps, InstallmentScheduleClassNames, InstallmentScheduleLabels, InstallmentScheduleMode, InstallmentScheduleProps, ScheduledInstallment, } from './types';
@@ -0,0 +1,100 @@
1
+ import { ReactNode } from 'react';
2
+ export type InstallmentScheduleMode = 'automatic' | 'manual';
3
+ export type InstallmentFrequency = 'monthly' | 'quarterly' | 'annual';
4
+ export type ScheduledInstallment = {
5
+ id: string;
6
+ dueDate: string;
7
+ amount: number;
8
+ status?: 'scheduled' | 'fulfilled' | 'failed' | 'cancelled' | 'refunded' | 'paid';
9
+ };
10
+ export type AutomaticScheduleSettings = {
11
+ numberOfInstallments: number;
12
+ frequency: InstallmentFrequency;
13
+ firstInstallmentDate: string;
14
+ };
15
+ export type InstallmentScheduleLabels = {
16
+ title?: string;
17
+ automaticMode?: string;
18
+ manualMode?: string;
19
+ createInstallments?: string;
20
+ generateSchedule?: string;
21
+ saveInstallments?: string;
22
+ addInstallment?: string;
23
+ emptyAutomatic?: string;
24
+ emptyManual?: string;
25
+ numberOfInstallments?: string;
26
+ frequency?: string;
27
+ firstInstallmentDate?: string;
28
+ installment?: string;
29
+ dueDate?: string;
30
+ amount?: string;
31
+ total?: string;
32
+ remaining?: string;
33
+ deleteInstallment?: string;
34
+ monthly?: string;
35
+ quarterly?: string;
36
+ annual?: string;
37
+ totalError?: string;
38
+ totalIncreaseWarning?: string;
39
+ totalIncreaseConfirmationTitle?: string;
40
+ totalIncreaseConfirmationDescription?: string;
41
+ totalIncreaseConfirmationCancel?: string;
42
+ totalIncreaseConfirmationConfirm?: string;
43
+ dateOrderError?: string;
44
+ amountGreaterThanZeroError?: string;
45
+ };
46
+ export type InstallmentScheduleClassNames = {
47
+ root?: string;
48
+ panel?: string;
49
+ header?: string;
50
+ tabs?: string;
51
+ content?: string;
52
+ };
53
+ export type InstallmentScheduleProps = {
54
+ mode: InstallmentScheduleMode;
55
+ donationAmount: number;
56
+ currency?: string;
57
+ locale?: string;
58
+ installments: ScheduledInstallment[];
59
+ automaticSettings: AutomaticScheduleSettings;
60
+ labels?: InstallmentScheduleLabels;
61
+ classNames?: InstallmentScheduleClassNames;
62
+ isSaving?: boolean;
63
+ isModeSwitchDisabled?: boolean;
64
+ onModeChange: (mode: InstallmentScheduleMode) => void;
65
+ onAutomaticSettingsChange: (settings: AutomaticScheduleSettings) => void;
66
+ onInstallmentsChange: (installments: ScheduledInstallment[]) => void;
67
+ onSave: () => void;
68
+ };
69
+ export type InstallmentTableLabels = {
70
+ title?: string;
71
+ searchLabel?: string;
72
+ searchPlaceholder?: string;
73
+ editInstallments?: string;
74
+ installmentId?: string;
75
+ amount?: string;
76
+ scheduledDate?: string;
77
+ status?: string;
78
+ actions?: string;
79
+ payNow?: string;
80
+ sendLink?: string;
81
+ sendLinkDescription?: string;
82
+ dangerZone?: string;
83
+ deleteInstallment?: string;
84
+ deleteInstallmentDescription?: string;
85
+ deleteInstallmentConfirmationTitle?: string;
86
+ deleteInstallmentConfirmationDescription?: ReactNode;
87
+ deleteInstallmentConfirmationCancel?: string;
88
+ deleteInstallmentConfirmationConfirm?: string;
89
+ noInstallmentsFound?: string;
90
+ };
91
+ export type InstallmentTableProps = {
92
+ installments: ScheduledInstallment[];
93
+ currency: string;
94
+ locale?: string;
95
+ labels?: InstallmentTableLabels;
96
+ isSaving?: boolean;
97
+ onEditInstallments: () => void;
98
+ onPayInstallment?: (installment: ScheduledInstallment) => void;
99
+ onDeleteInstallment: (installmentId: string) => void;
100
+ };
@@ -0,0 +1,3 @@
1
+ import { AutomaticScheduleSettings, ScheduledInstallment } from './types';
2
+ export declare function generateAutomaticInstallments(donationAmount: number, settings: AutomaticScheduleSettings): ScheduledInstallment[];
3
+ export declare function getInvalidDateRowIds(installments: ScheduledInstallment[]): Set<string>;
@@ -3,12 +3,64 @@ export interface ItemCardProps {
3
3
  * Selection key. Pass as `itemKey` in JSX (React reserves `key` and does not forward it).
4
4
  */
5
5
  itemKey: string;
6
+ /**
7
+ * Display name
8
+ */
6
9
  name: string;
10
+ /**
11
+ * Raw price value
12
+ */
7
13
  price: number;
14
+ /**
15
+ * Whether to render the price column.
16
+ * Useful for buyer-flow selection cards where the value is represented by a status badge.
17
+ * @default true
18
+ */
19
+ showPrice?: boolean;
20
+ /**
21
+ * Locale for price formatting
22
+ */
8
23
  locale?: string;
24
+ /**
25
+ * Currency code
26
+ */
9
27
  currency?: string;
28
+ /**
29
+ * Optional type label
30
+ */
10
31
  type?: string;
32
+ /**
33
+ * Whether this item is selected
34
+ */
11
35
  isSelected?: boolean;
36
+ /**
37
+ * Compact rendering mode
38
+ * @default false
39
+ */
40
+ compact?: boolean;
41
+ /**
42
+ * Whether card actions are disabled
43
+ * @default false
44
+ */
45
+ isDisabled?: boolean;
46
+ /**
47
+ * Optional label describing disabled reason
48
+ */
49
+ disabledReason?: string;
50
+ /**
51
+ * Optional status label used in compact/badged states
52
+ */
53
+ statusLabel?: string;
54
+ /**
55
+ * Status tone for disabled state
56
+ */
57
+ statusTone?: 'default' | 'success' | 'warning' | 'danger';
58
+ /**
59
+ * Selection handler, turns card pressable
60
+ */
12
61
  onSelect?: (key: string) => void;
62
+ /**
63
+ * Optional custom class
64
+ */
13
65
  className?: string;
14
66
  }
@@ -6,7 +6,7 @@ import { OfferCardProps } from './types';
6
6
  * Supports slot-based customization for all rendered elements.
7
7
  */
8
8
  export declare const OfferCard: {
9
- ({ offer, quantity: quantityProp, defaultQuantity, onQuantityChange, currency, locale, labels: customLabels, slots, isDisabled, buttonVariant, buttonColor, showCard, showDescription, showPeopleCount, showPrice, classNames, "data-testid": dataTestId, selectedColor, }: OfferCardProps): JSX.Element;
9
+ ({ offer, quantity: quantityProp, defaultQuantity, onQuantityChange, currency, locale, labels: customLabels, slots, isDisabled, buttonVariant, buttonColor, showCard, showDescription, showPeopleCount, showPrice, classNames, "data-testid": dataTestId, selectedColor, compact, isSoldOut: isSoldOutProp, isMaxReached: isMaxReachedProp, isRuleBlocked: isRuleBlockedProp, statusTone: statusToneProp, statusLabel, disabledReason, disabled, }: OfferCardProps): JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  export default OfferCard;