@veevarts/design-system 2.1.0-beta.1 → 2.1.0-beta.10

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 (134) hide show
  1. package/dist/index.cjs +8 -8
  2. package/dist/index.js +7043 -5258
  3. package/dist/patterns/ActivityTimeline/ActivityTimeline.d.ts +3 -0
  4. package/dist/patterns/ActivityTimeline/index.d.ts +2 -0
  5. package/dist/patterns/ActivityTimeline/styles.d.ts +15 -0
  6. package/dist/patterns/ActivityTimeline/types.d.ts +15 -0
  7. package/dist/patterns/AdminTable/AdminTable.d.ts +1 -0
  8. package/dist/patterns/AdminTable/styles.d.ts +6 -0
  9. package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +1 -0
  10. package/dist/patterns/AmountList/AmountList.d.ts +3 -0
  11. package/dist/patterns/AmountList/index.d.ts +2 -0
  12. package/dist/patterns/AmountList/styles.d.ts +23 -0
  13. package/dist/patterns/AmountList/types.d.ts +26 -0
  14. package/dist/patterns/CardList/CardList.d.ts +3 -0
  15. package/dist/patterns/CardList/index.d.ts +2 -0
  16. package/dist/patterns/CardList/styles.d.ts +16 -0
  17. package/dist/patterns/CardList/types.d.ts +19 -0
  18. package/dist/patterns/CardStack/CardStack.d.ts +7 -0
  19. package/dist/patterns/CardStack/index.d.ts +2 -0
  20. package/dist/patterns/CardStack/styles.d.ts +2 -0
  21. package/dist/patterns/CellText/CellText.d.ts +16 -0
  22. package/dist/patterns/CellText/index.d.ts +2 -0
  23. package/dist/patterns/CellText/styles.d.ts +7 -0
  24. package/dist/patterns/FilterSelect/FilterSelect.d.ts +3 -0
  25. package/dist/patterns/FilterSelect/index.d.ts +2 -0
  26. package/dist/patterns/FilterSelect/styles.d.ts +14 -0
  27. package/dist/patterns/FilterSelect/types.d.ts +13 -0
  28. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +1 -1
  29. package/dist/patterns/InstallmentFundAssignment/types.d.ts +3 -0
  30. package/dist/patterns/InstallmentSchedule/InstallmentSchedule.d.ts +1 -1
  31. package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +1 -1
  32. package/dist/patterns/InstallmentSchedule/types.d.ts +46 -3
  33. package/dist/patterns/InstallmentSchedule/utils.d.ts +21 -0
  34. package/dist/patterns/KeyValueChip/KeyValueChip.d.ts +1 -0
  35. package/dist/patterns/KeyValueRows/KeyValueRows.d.ts +13 -0
  36. package/dist/patterns/KeyValueRows/index.d.ts +2 -0
  37. package/dist/patterns/KeyValueRows/styles.d.ts +8 -0
  38. package/dist/patterns/LineItemRows/LineItemRows.d.ts +17 -0
  39. package/dist/patterns/LineItemRows/index.d.ts +2 -0
  40. package/dist/patterns/LineItemRows/styles.d.ts +13 -0
  41. package/dist/patterns/ListPanel/ListPanel.d.ts +2 -0
  42. package/dist/patterns/LoadMoreFooter/LoadMoreFooter.d.ts +3 -0
  43. package/dist/patterns/LoadMoreFooter/index.d.ts +2 -0
  44. package/dist/patterns/LoadMoreFooter/styles.d.ts +7 -0
  45. package/dist/patterns/LoadMoreFooter/types.d.ts +10 -0
  46. package/dist/patterns/PageHeader/PageHeader.d.ts +1 -0
  47. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +2 -0
  48. package/dist/patterns/PillTabs/PillTabs.d.ts +3 -0
  49. package/dist/patterns/PillTabs/ids.d.ts +9 -0
  50. package/dist/patterns/PillTabs/index.d.ts +3 -0
  51. package/dist/patterns/PillTabs/styles.d.ts +10 -0
  52. package/dist/patterns/PillTabs/types.d.ts +13 -0
  53. package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/type.d.ts +1 -1
  54. package/dist/patterns/{EventDetails → Programs/EventDetails}/EventDetails.d.ts +3 -1
  55. package/dist/patterns/{OfferCard → Programs/OfferCard}/OfferCard.d.ts +1 -1
  56. package/dist/patterns/{OfferCard → Programs/OfferCard}/types.d.ts +7 -0
  57. package/dist/patterns/Programs/ProgramListItem/ProgramListItem.d.ts +17 -0
  58. package/dist/patterns/Programs/ProgramListItem/index.d.ts +2 -0
  59. package/dist/patterns/Programs/index.d.ts +5 -0
  60. package/dist/patterns/RecordCard/RecordCard.d.ts +3 -0
  61. package/dist/patterns/RecordCard/index.d.ts +2 -0
  62. package/dist/patterns/RecordCard/styles.d.ts +15 -0
  63. package/dist/patterns/RecordCard/types.d.ts +17 -0
  64. package/dist/patterns/RecordHeader/RecordHeader.d.ts +3 -0
  65. package/dist/patterns/RecordHeader/index.d.ts +2 -0
  66. package/dist/patterns/RecordHeader/styles.d.ts +43 -0
  67. package/dist/patterns/RecordHeader/types.d.ts +30 -0
  68. package/dist/patterns/RecordLayout/RecordLayout.d.ts +3 -0
  69. package/dist/patterns/RecordLayout/index.d.ts +2 -0
  70. package/dist/patterns/RecordLayout/styles.d.ts +8 -0
  71. package/dist/patterns/RecordLayout/types.d.ts +6 -0
  72. package/dist/patterns/RecordTotals/RecordTotals.d.ts +19 -0
  73. package/dist/patterns/RecordTotals/index.d.ts +2 -0
  74. package/dist/patterns/RecordTotals/styles.d.ts +19 -0
  75. package/dist/patterns/RelatedRecordList/RelatedRecordList.d.ts +3 -0
  76. package/dist/patterns/RelatedRecordList/index.d.ts +2 -0
  77. package/dist/patterns/RelatedRecordList/styles.d.ts +19 -0
  78. package/dist/patterns/RelatedRecordList/types.d.ts +17 -0
  79. package/dist/patterns/SplitPaymentSummary/index.d.ts +1 -1
  80. package/dist/patterns/SplitPaymentSummary/types.d.ts +18 -0
  81. package/dist/patterns/StatTiles/StatTiles.d.ts +3 -0
  82. package/dist/patterns/StatTiles/index.d.ts +2 -0
  83. package/dist/patterns/StatTiles/styles.d.ts +8 -0
  84. package/dist/patterns/StatTiles/types.d.ts +12 -0
  85. package/dist/patterns/StatusChip/StatusChip.d.ts +3 -3
  86. package/dist/patterns/Summary/components/ActionBar.d.ts +2 -0
  87. package/dist/patterns/Summary/components/GrandTotalRow.d.ts +1 -0
  88. package/dist/patterns/Summary/components/ItemRow.d.ts +1 -0
  89. package/dist/patterns/Summary/components/SummaryBody.d.ts +4 -1
  90. package/dist/patterns/Summary/components/TotalsLineRow.d.ts +3 -2
  91. package/dist/patterns/Summary/types.d.ts +40 -9
  92. package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
  93. package/dist/patterns/TileSelect/TileSelect.d.ts +65 -1
  94. package/dist/patterns/TileSelect/index.d.ts +1 -1
  95. package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
  96. package/dist/patterns/index.d.ts +45 -11
  97. package/dist/patterns/shared/hasContent.d.ts +2 -0
  98. package/dist/patterns/shared/index.d.ts +1 -0
  99. package/dist/patterns/shared/motion.d.ts +6 -0
  100. package/dist/patterns/shared/recordTone.d.ts +9 -0
  101. package/dist/patterns/shared/rem.d.ts +4 -0
  102. package/dist/patterns/shared/useContainerWidth.d.ts +6 -0
  103. package/dist/patterns/shared/useDecimalDraft.d.ts +33 -0
  104. package/dist/tailwind/index.cjs +17 -1
  105. package/dist/tailwind/index.d.ts +39 -0
  106. package/dist/tailwind/index.mjs +17 -1
  107. package/dist/test/ReducedMotion.d.ts +4 -0
  108. package/dist/test/RootFontSize.d.ts +5 -0
  109. package/dist/test/container-width.d.ts +14 -0
  110. package/dist/test/contrast.d.ts +1 -0
  111. package/dist/test/px-classes.d.ts +2 -0
  112. package/dist/test/root-font-size.d.ts +8 -0
  113. package/dist/tokens/pos-surface.d.ts +7 -0
  114. package/package.json +1 -1
  115. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/CatalogItemCard.d.ts +0 -0
  116. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/index.d.ts +0 -0
  117. /package/dist/patterns/{EventDetails → Programs/EventDetails}/index.d.ts +0 -0
  118. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/CustomQuantitySelectorExample.d.ts +0 -0
  119. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithEurosCurrencyExample.d.ts +0 -0
  120. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithoutAnimationExample.d.ts +0 -0
  121. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/index.d.ts +0 -0
  122. /package/dist/patterns/{OfferCard → Programs/OfferCard}/index.d.ts +0 -0
  123. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/animations.d.ts +0 -0
  124. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/currency.d.ts +0 -0
  125. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/index.d.ts +0 -0
  126. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/offers.d.ts +0 -0
  127. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardEmpty.d.ts +0 -0
  128. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardError.d.ts +0 -0
  129. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardList.d.ts +0 -0
  130. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardSkeleton.d.ts +0 -0
  131. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/index.d.ts +0 -0
  132. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/SessionTimeline.d.ts +0 -0
  133. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/index.d.ts +0 -0
  134. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/type.d.ts +0 -0
@@ -11,9 +11,47 @@ export interface TileSelectOption {
11
11
  icon: string | React.ReactNode;
12
12
  /** Disable the tile (greyed out, no click). */
13
13
  isDisabled?: boolean;
14
+ /**
15
+ * One line of supporting copy. Rendered only by `variant="compact"`,
16
+ * for an option that ended up in the "More" menu, where the label
17
+ * alone ("Other") rarely says enough.
18
+ */
19
+ description?: string;
20
+ /**
21
+ * `variant="compact"` only: keep this option in the "More" menu at
22
+ * every width, however much room the track has. For an action that is
23
+ * secondary by decision rather than by measurement — a payments picker
24
+ * that wants "Other" one click away so the methods people actually
25
+ * reach for own the row.
26
+ *
27
+ * The menu is rendered whenever an option asks for it, so this also
28
+ * overrides the rule that suppresses a menu holding a single option.
29
+ */
30
+ alwaysInMenu?: boolean;
31
+ /**
32
+ * `variant="compact"` only: what this option is worth keeping on the
33
+ * track. When the pill runs out of room the LOWEST priority folds into
34
+ * the menu first; equal priorities fold from the end of the list.
35
+ * Default `0`.
36
+ *
37
+ * Display order is untouched — this decides what survives a squeeze,
38
+ * not where anything sits. A payments picker can list "Other" before
39
+ * "Split payment" and still lose "Other" first, because splitting a
40
+ * payment is the rarer, weightier thing to reach for.
41
+ */
42
+ priority?: number;
14
43
  /** Override per-tile test id; defaults to `${dataTestId}-${key}`. */
15
44
  'data-testid'?: string;
16
45
  }
46
+ /**
47
+ * `'tiles'` — the icon-over-label grid, with a `<Select>` dropdown under
48
+ * `md`. The picker is the subject of the step.
49
+ *
50
+ * `'compact'` — a segmented pill of label-only toggles at every width,
51
+ * keeping every option the track can hold and folding the rest into a
52
+ * "More" menu rather than scrolling. The picker is a control among others.
53
+ */
54
+ export type TileSelectVariant = 'tiles' | 'compact';
17
55
  export interface TileSelectProps {
18
56
  /** Options to render in order. */
19
57
  options: readonly TileSelectOption[];
@@ -30,7 +68,33 @@ export interface TileSelectProps {
30
68
  * heading element.
31
69
  */
32
70
  ariaLabel?: string;
33
- /** Grid columns on >= sm. Default `3`. Mobile collapses to 2. */
71
+ /**
72
+ * How the options render. Default `'tiles'`.
73
+ * See {@link TileSelectVariant}.
74
+ */
75
+ variant?: TileSelectVariant;
76
+ /**
77
+ * `variant="compact"` only: a CAP on how many options stay on the pill.
78
+ * Unset by default, and normally best left that way — the pill already
79
+ * measures the track and keeps every option that fits, folding only
80
+ * what is left over. Set it when a surface wants a shorter row than
81
+ * its width allows.
82
+ *
83
+ * The cap gives way in one case: when honouring it would leave a single
84
+ * option in the menu that the track had room for. A "More" button is
85
+ * wider than most labels, so that fold costs space and buys a click.
86
+ */
87
+ maxVisible?: number;
88
+ /**
89
+ * `variant="compact"` only: label for the overflow trigger. Shown
90
+ * until an option inside the menu is selected, after which the
91
+ * trigger carries that option's label. Translatable. Default `'More'`.
92
+ */
93
+ moreLabel?: string;
94
+ /**
95
+ * Grid columns on >= sm. Default `3`. Mobile collapses to 2.
96
+ * Ignored by `variant="compact"`, which is a single strip.
97
+ */
34
98
  columnsDesktop?: 2 | 3 | 4;
35
99
  columnsMobile?: 1 | 2;
36
100
  className?: string;
@@ -1,2 +1,2 @@
1
1
  export { TileSelect } from './TileSelect';
2
- export type { TileSelectProps, TileSelectOption } from './TileSelect';
2
+ export type { TileSelectProps, TileSelectOption, TileSelectVariant } from './TileSelect';
@@ -10,6 +10,7 @@ export type ToolbarButtonProps = Omit<ComponentPropsWithoutRef<typeof Button>, '
10
10
  * count straight through without guarding it.
11
11
  */
12
12
  count?: number;
13
+ appearance?: 'pill' | 'outline';
13
14
  /** Forwarded as `data-testid`. */
14
15
  testId?: string;
15
16
  };
@@ -23,6 +24,7 @@ export declare const ToolbarButton: React.ForwardRefExoticComponent<Omit<Omit<Om
23
24
  * count straight through without guarding it.
24
25
  */
25
26
  count?: number;
27
+ appearance?: "pill" | "outline";
26
28
  /** Forwarded as `data-testid`. */
27
29
  testId?: string;
28
30
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -13,10 +13,10 @@ export { DonationAmounts } from './DonationAmounts';
13
13
  export type { DonationAmountsProps, DonationAmount, SelectedDonation, DonationLabels } from './DonationAmounts';
14
14
  export { ExpireCartTimer } from './ExpireCartTimer';
15
15
  export type { ExpireCartTimerProps } from './ExpireCartTimer';
16
- export { EventDetails } from './EventDetails';
17
- export type { EventDetailsProps } from './EventDetails';
18
- export { OfferCard, OfferCardList, OfferCardSkeleton, OfferCardError, OfferCardEmpty, offerListVariants, offerCardVariants, formatCurrency as formatOfferCurrency, parseCurrency as parseOfferCurrency, } from './OfferCard';
19
- export type { Offer, OfferSelection, OfferCardLabels, OfferCardErrorLabels, OfferCardClassNames, OfferCardListClassNames, OfferCardSkeletonClassNames, OfferCardErrorClassNames, OfferCardEmptyClassNames, OfferCardSlots, OfferCardProps, OfferCardListProps, OfferCardSkeletonProps, OfferCardErrorProps, OfferCardEmptyProps, } from './OfferCard';
16
+ export { EventDetails } from './Programs/EventDetails';
17
+ export type { EventDetailsProps } from './Programs/EventDetails';
18
+ export { OfferCard, OfferCardList, OfferCardSkeleton, OfferCardError, OfferCardEmpty, offerListVariants, offerCardVariants, formatCurrency as formatOfferCurrency, parseCurrency as parseOfferCurrency, } from './Programs/OfferCard';
19
+ export type { Offer, OfferSelection, OfferCardLabels, OfferCardErrorLabels, OfferCardClassNames, OfferCardListClassNames, OfferCardSkeletonClassNames, OfferCardErrorClassNames, OfferCardEmptyClassNames, OfferCardSlots, OfferCardProps, OfferCardListProps, OfferCardSkeletonProps, OfferCardErrorProps, OfferCardEmptyProps, } from './Programs/OfferCard';
20
20
  export { RevenueDistributionCard, RevenueDistributionSkeleton, RevenueDistributionError, RevenueDistributionEmpty, formatAmount as formatRevenueAmount, formatCurrency as formatRevenueCurrency, getCurrencySymbol, parseCurrency as parseRevenueCurrency, calculateAllocationDifference, generateDistributionId, } from './RevenueDistribution';
21
21
  export type { GlAccount, Distribution, RevenueDistributionLabels, RevenueDistributionErrorLabels, RevenueDistributionEmptyLabels, RevenueDistributionCardClassNames, RevenueDistributionSkeletonClassNames, RevenueDistributionErrorClassNames, RevenueDistributionEmptyClassNames, RevenueDistributionCardProps, RevenueDistributionSkeletonProps, RevenueDistributionErrorProps, RevenueDistributionEmptyProps, } from './RevenueDistribution';
22
22
  export { InstallmentFundAssignment, InstallmentFundAssignmentSkeleton } from './InstallmentFundAssignment';
@@ -31,8 +31,10 @@ export { MembershipSelectCards } from './MembershipSelectCards';
31
31
  export type * from './MembershipSelectCards';
32
32
  export { ItemCard } from './ItemCard';
33
33
  export type * from './ItemCard';
34
- export { CatalogItemCard } from './CatalogItemCard';
35
- export type * from './CatalogItemCard';
34
+ export { CatalogItemCard } from './Programs/CatalogItemCard';
35
+ export type * from './Programs/CatalogItemCard';
36
+ export { ProgramListItem } from './Programs/ProgramListItem';
37
+ export type * from './Programs/ProgramListItem';
36
38
  export { FeedbackState, EmptyState, ErrorState, LoadingState, SuccessState } from './FeedbackState';
37
39
  export type * from './FeedbackState';
38
40
  export { Toggle } from './Toggle';
@@ -41,8 +43,8 @@ export { TicketSelection } from './TicketSelection';
41
43
  export type * from './TicketSelection';
42
44
  export { FilterPopover } from './FilterPopover';
43
45
  export type * from './FilterPopover';
44
- export { SessionTimeline } from './SessionTimeline';
45
- export type * from './SessionTimeline';
46
+ export { SessionTimeline } from './Programs/SessionTimeline';
47
+ export type * from './Programs/SessionTimeline';
46
48
  export { PageHeader } from './PageHeader';
47
49
  export type { PageHeaderProps, PageHeaderClassNames } from './PageHeader';
48
50
  export { StatusChip } from './StatusChip';
@@ -78,11 +80,11 @@ export type { CheckTenderFormProps, CheckTenderValue, CheckTenderLabels } from '
78
80
  export { OtherTenderForm } from './OtherTenderForm';
79
81
  export type { OtherTenderFormProps, OtherTenderValue, OtherTenderLabels, OtherTenderMethodOption, } from './OtherTenderForm';
80
82
  export { SplitPaymentSummary } from './SplitPaymentSummary';
81
- export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, TenderRow, TenderRowStatus, TenderRowType, } from './SplitPaymentSummary';
83
+ export type { SplitPaymentSummaryProps, SplitPaymentSummaryLabels, SplitPaymentSummaryVariant, TenderRow, TenderRowStatus, TenderRowType, } from './SplitPaymentSummary';
82
84
  export { ModalShell, ModalShellHeader, ModalShellFooter } from './ModalShell';
83
85
  export type { ModalShellProps, ModalShellHeaderProps, ModalShellFooterProps } from './ModalShell';
84
86
  export { TileSelect } from './TileSelect';
85
- export type { TileSelectProps, TileSelectOption } from './TileSelect';
87
+ export type { TileSelectProps, TileSelectOption, TileSelectVariant } from './TileSelect';
86
88
  export { PaymentTotalBanner } from './PaymentTotalBanner';
87
89
  export type { PaymentTotalBannerProps } from './PaymentTotalBanner';
88
90
  export { LoadingOverlay } from './LoadingOverlay';
@@ -99,7 +101,7 @@ export { Summary } from './Summary';
99
101
  export type { SummaryProps, SummaryLineItem, SummaryItemDetail, SummaryServiceFee, SummaryTotalRow, SummaryPostTotalRow, SummaryPrimaryAction, SummaryLabels, } from './Summary';
100
102
  export { WizardShell } from './WizardShell';
101
103
  export type { WizardShellProps, WizardStep, WizardStepState, WizardShellPrimaryAction, WizardShellSecondaryAction, WizardShellTotalRow, WizardShellLabels, } from './WizardShell';
102
- export type { TenderError, DestinationLine, DestinationStatus } from './shared';
104
+ export type { TenderError, DestinationLine, DestinationStatus, RecordTone } from './shared';
103
105
  export { LineItemList } from './LineItemList';
104
106
  export type { LineItemListProps, LineItemView, ItemSelection, LineItemState, LineItemRestockView, ItemDisposition, AmountOnlyView, LineItemListLabels, } from './LineItemList';
105
107
  export { MetaCard } from './MetaCard';
@@ -120,3 +122,35 @@ export { PinField } from './PinField';
120
122
  export type { PinFieldProps, PinFieldLabels } from './PinField';
121
123
  export { OutcomeView } from './OutcomeView';
122
124
  export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel } from './OutcomeView';
125
+ export { FilterSelect } from './FilterSelect';
126
+ export type { FilterSelectProps, FilterSelectOption } from './FilterSelect';
127
+ export { LoadMoreFooter } from './LoadMoreFooter';
128
+ export type { LoadMoreFooterProps, LoadMoreStatus } from './LoadMoreFooter';
129
+ export { CardList } from './CardList';
130
+ export type { CardListProps, CardListItem } from './CardList';
131
+ export { RecordHeader } from './RecordHeader';
132
+ export type { RecordHeaderProps, RecordHeaderStat } from './RecordHeader';
133
+ export { RecordLayout } from './RecordLayout';
134
+ export type { RecordLayoutProps } from './RecordLayout';
135
+ export { StatTiles } from './StatTiles';
136
+ export type { StatTilesProps, StatTileItem } from './StatTiles';
137
+ export { PillTabs, pillTabId, pillTabPanelId, pillTabPanelProps } from './PillTabs';
138
+ export type { PillTabsProps, PillTabItem } from './PillTabs';
139
+ export { AmountList } from './AmountList';
140
+ export type { AmountListProps, AmountListRow } from './AmountList';
141
+ export { ActivityTimeline } from './ActivityTimeline';
142
+ export type { ActivityTimelineProps, ActivityTimelineEvent } from './ActivityTimeline';
143
+ export { RelatedRecordList } from './RelatedRecordList';
144
+ export type { RelatedRecordListProps, RelatedRecordRow } from './RelatedRecordList';
145
+ export { RecordCard } from './RecordCard';
146
+ export type { RecordCardProps, RecordCardVariant, RecordCardBody } from './RecordCard';
147
+ export { CardStack } from './CardStack';
148
+ export type { CardStackProps, CardStackLayout } from './CardStack';
149
+ export { KeyValueRows } from './KeyValueRows';
150
+ export type { KeyValueRowsProps, KeyValueRow, KeyValueRowsDensity } from './KeyValueRows';
151
+ export { LineItemRows } from './LineItemRows';
152
+ export type { LineItemRowsProps, LineItemRow } from './LineItemRows';
153
+ export { RecordTotals } from './RecordTotals';
154
+ export type { RecordTotalsProps, RecordTotalsRow } from './RecordTotals';
155
+ export { CellText, ChipStack } from './CellText';
156
+ export type { CellTextProps, CellTextVariant, ChipStackProps } from './CellText';
@@ -0,0 +1,2 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function hasContent(node: ReactNode): boolean;
@@ -1 +1,2 @@
1
1
  export type { TenderError, DestinationLine, DestinationStatus } from './types';
2
+ export type { RecordTone } from './recordTone';
@@ -0,0 +1,6 @@
1
+ export declare const POS_REDUCE_MOTION_ATTRIBUTE = "data-pos-reduce-motion";
2
+ export declare const stillTransitionClass = "motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
3
+ export declare const stillAnimationClass = "motion-reduce:animate-none [html[data-pos-reduce-motion=true]_&]:animate-none";
4
+ export declare const shimmerClass = "rounded-[0.375rem] bg-[linear-gradient(90deg,#F0F0F1_0,#F9F9FA_12.5rem,#F0F0F1_25rem)] bg-[length:50rem_100%] animate-record-shimmer motion-reduce:animate-none [html[data-pos-reduce-motion=true]_&]:animate-none";
5
+ export declare function prefersReducedMotion(): boolean;
6
+ export declare function useReducedMotion(): boolean;
@@ -0,0 +1,9 @@
1
+ import { CSSProperties } from 'react';
2
+ export type RecordTone = 'ok' | 'warn' | 'danger' | 'info' | 'violet' | 'neutral';
3
+ export interface RecordTonePair {
4
+ fg: string;
5
+ bg: string;
6
+ }
7
+ export declare const RECORD_TONE: Record<RecordTone, RecordTonePair>;
8
+ export type SignedAmountTone = 'positive' | 'negative' | 'neutral';
9
+ export declare function amountToneStyle(tone: SignedAmountTone | undefined): CSSProperties | undefined;
@@ -0,0 +1,4 @@
1
+ export declare const ROOT_FONT_PX = 16;
2
+ export declare const rem: (px: number) => string;
3
+ export declare function rootFontSizePx(): number;
4
+ export declare const atLeastRem: (widthPx: number, rems: number) => boolean;
@@ -0,0 +1,6 @@
1
+ export declare const CONTAINER_MEDIUM = 768;
2
+ export declare const CONTAINER_WIDE = 1120;
3
+ export declare function useContainerWidth<T extends HTMLElement>(): {
4
+ ref: import('react').RefObject<T | null>;
5
+ width: number;
6
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Keeps the text a cashier typed into a money input separate from the number
3
+ * the host holds.
4
+ *
5
+ * A money input whose display is `String(value)` loses what the cashier is
6
+ * mid-way through typing: `'40.'` parses to `40` and is re-rendered as `'40'`,
7
+ * so the next `0` produces `'400'` and `'40.00'` ends up read as 4000. The hook
8
+ * keeps the typed string and shows it while it still parses to `value` (the
9
+ * echo of the cashier's own keystroke). When the host holds a number the draft
10
+ * does not represent (a reset, a prefill, a host that ignores the keystroke),
11
+ * the input shows `format(value)` instead, so the host stays in control.
12
+ */
13
+ /**
14
+ * Whether `text` is one amount, possibly partial, in a currency with
15
+ * `fractionDigits` minor digits: digits, then at most one `.` or `,` followed
16
+ * by at most `fractionDigits` digits (`''`, `'40'`, `'40.'`, `'40,5'`, `'.5'`).
17
+ * Anything else would show one amount while emitting another, because
18
+ * `parseFloat` reads only a prefix and `,` is the decimal separator: `'40.5.9'`
19
+ * and `'4a'` would emit 40.5 and 4, and `'1,000'` would emit 1. Callers reject
20
+ * such a keystroke instead of storing it, so the input keeps what it showed.
21
+ */
22
+ export declare const isDecimalDraft: (text: string, fractionDigits: number) => boolean;
23
+ /** Parses a typed amount (`'40.5'`, `'40,5'`, `'40.'`); `null` when there is no number yet (`''`, `'.'`, `','`). */
24
+ export declare const parseDecimalDraft: (draft: string) => number | null;
25
+ export interface DecimalDraft {
26
+ /** The text to show in the input. */
27
+ draft: string;
28
+ /** Stores the text the cashier typed. */
29
+ setDraft: (next: string) => void;
30
+ /** Rewrites the draft in its canonical form (`'40.'` → `'40'`) without changing its value. */
31
+ normalize: () => void;
32
+ }
33
+ export declare const useDecimalDraft: (value: number | null | undefined, format: (value: number | null | undefined) => string) => DecimalDraft;
@@ -274,6 +274,9 @@ var posSurfaceTokens = {
274
274
  line: "#E7E7E9",
275
275
  /** `--line2`: the lighter hairline under list rows and above the role bar. */
276
276
  "line-2": "#F1F1F3",
277
+ hair: "#F0F0F1",
278
+ page: "#FBFBFB",
279
+ field: "#E5E5E5",
277
280
  /** `--okb` / `--okf` */
278
281
  "ok-fill": "#EAF3DE",
279
282
  ok: "#3B6D11",
@@ -288,6 +291,10 @@ var posSurfaceTokens = {
288
291
  /** `--ib` / `--if` */
289
292
  "info-fill": "#EAF1FC",
290
293
  info: "#1D4FA8",
294
+ "violet-fill": "#F1ECFB",
295
+ violet: "#6D28D9",
296
+ "neutral-fill": "#F4F4F5",
297
+ neutral: "#52525B",
291
298
  /** `.btn-dstr` — the fill behind an irreversible confirmation. */
292
299
  destructive: "#A32D2D"
293
300
  };
@@ -314,7 +321,16 @@ var tailwindTheme = {
314
321
  spacing,
315
322
  fontSize: typography.fontSize,
316
323
  fontWeight: typography.fontWeight,
317
- lineHeight: typography.lineHeight
324
+ lineHeight: typography.lineHeight,
325
+ keyframes: {
326
+ "record-shimmer": {
327
+ "0%": { backgroundPosition: "-25rem 0" },
328
+ "100%": { backgroundPosition: "25rem 0" }
329
+ }
330
+ },
331
+ animation: {
332
+ "record-shimmer": "record-shimmer 1.3s linear infinite"
333
+ }
318
334
  };
319
335
  function deepMerge(target, source) {
320
336
  if (!source || typeof source !== "object") {
@@ -120,6 +120,19 @@ export declare const tailwindTheme: {
120
120
  readonly normal: "1.5";
121
121
  readonly relaxed: "1.75";
122
122
  };
123
+ keyframes: {
124
+ 'record-shimmer': {
125
+ '0%': {
126
+ backgroundPosition: string;
127
+ };
128
+ '100%': {
129
+ backgroundPosition: string;
130
+ };
131
+ };
132
+ };
133
+ animation: {
134
+ 'record-shimmer': string;
135
+ };
123
136
  };
124
137
  /**
125
138
  * Deep merge utility for objects
@@ -322,6 +335,19 @@ export declare const veevartPreset: {
322
335
  readonly normal: "1.5";
323
336
  readonly relaxed: "1.75";
324
337
  };
338
+ keyframes: {
339
+ 'record-shimmer': {
340
+ '0%': {
341
+ backgroundPosition: string;
342
+ };
343
+ '100%': {
344
+ backgroundPosition: string;
345
+ };
346
+ };
347
+ };
348
+ animation: {
349
+ 'record-shimmer': string;
350
+ };
325
351
  };
326
352
  };
327
353
  darkMode: "class";
@@ -554,5 +580,18 @@ export declare const tokens: {
554
580
  readonly normal: "1.5";
555
581
  readonly relaxed: "1.75";
556
582
  };
583
+ keyframes: {
584
+ 'record-shimmer': {
585
+ '0%': {
586
+ backgroundPosition: string;
587
+ };
588
+ '100%': {
589
+ backgroundPosition: string;
590
+ };
591
+ };
592
+ };
593
+ animation: {
594
+ 'record-shimmer': string;
595
+ };
557
596
  };
558
597
  };
@@ -235,6 +235,9 @@ var posSurfaceTokens = {
235
235
  line: "#E7E7E9",
236
236
  /** `--line2`: the lighter hairline under list rows and above the role bar. */
237
237
  "line-2": "#F1F1F3",
238
+ hair: "#F0F0F1",
239
+ page: "#FBFBFB",
240
+ field: "#E5E5E5",
238
241
  /** `--okb` / `--okf` */
239
242
  "ok-fill": "#EAF3DE",
240
243
  ok: "#3B6D11",
@@ -249,6 +252,10 @@ var posSurfaceTokens = {
249
252
  /** `--ib` / `--if` */
250
253
  "info-fill": "#EAF1FC",
251
254
  info: "#1D4FA8",
255
+ "violet-fill": "#F1ECFB",
256
+ violet: "#6D28D9",
257
+ "neutral-fill": "#F4F4F5",
258
+ neutral: "#52525B",
252
259
  /** `.btn-dstr` — the fill behind an irreversible confirmation. */
253
260
  destructive: "#A32D2D"
254
261
  };
@@ -275,7 +282,16 @@ var tailwindTheme = {
275
282
  spacing,
276
283
  fontSize: typography.fontSize,
277
284
  fontWeight: typography.fontWeight,
278
- lineHeight: typography.lineHeight
285
+ lineHeight: typography.lineHeight,
286
+ keyframes: {
287
+ "record-shimmer": {
288
+ "0%": { backgroundPosition: "-25rem 0" },
289
+ "100%": { backgroundPosition: "25rem 0" }
290
+ }
291
+ },
292
+ animation: {
293
+ "record-shimmer": "record-shimmer 1.3s linear infinite"
294
+ }
279
295
  };
280
296
  function deepMerge(target, source) {
281
297
  if (!source || typeof source !== "object") {
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function ReducedMotion({ children }: {
3
+ children?: ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function RootFontSize({ size, children }: {
3
+ size: string;
4
+ children?: ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export declare class FakeResizeObserver {
2
+ static width: number;
3
+ static instances: FakeResizeObserver[];
4
+ disconnected: boolean;
5
+ private readonly callback;
6
+ private readonly targets;
7
+ constructor(callback: ResizeObserverCallback);
8
+ observe(target: Element): void;
9
+ unobserve(): void;
10
+ disconnect(): void;
11
+ emit(width: number): void;
12
+ }
13
+ export declare function stubContainerWidth(width: number): void;
14
+ export declare function resizeContainers(width: number): void;
@@ -0,0 +1 @@
1
+ export declare function contrastRatio(a: string, b: string): number;
@@ -0,0 +1,2 @@
1
+ export declare const pxClasses: (root: Element) => string[];
2
+ export declare const expectNoPxClasses: (root: Element) => void;
@@ -0,0 +1,8 @@
1
+ import { ComponentType } from 'react';
2
+ export declare const LARGE_TEXT_ROOT = "137.5%";
3
+ export declare const LARGE_TEXT_SCALE = 1.375;
4
+ export declare const withRootFontSize: (size: string) => (Story: ComponentType) => import('react').FunctionComponentElement<{
5
+ size: string;
6
+ children?: import('react').ReactNode;
7
+ }>;
8
+ export declare const fontSizePx: (element: Element) => number;
@@ -25,6 +25,9 @@ export declare const posSurfaceTokens: {
25
25
  readonly line: "#E7E7E9";
26
26
  /** `--line2`: the lighter hairline under list rows and above the role bar. */
27
27
  readonly 'line-2': "#F1F1F3";
28
+ readonly hair: "#F0F0F1";
29
+ readonly page: "#FBFBFB";
30
+ readonly field: "#E5E5E5";
28
31
  /** `--okb` / `--okf` */
29
32
  readonly 'ok-fill': "#EAF3DE";
30
33
  readonly ok: "#3B6D11";
@@ -39,6 +42,10 @@ export declare const posSurfaceTokens: {
39
42
  /** `--ib` / `--if` */
40
43
  readonly 'info-fill': "#EAF1FC";
41
44
  readonly info: "#1D4FA8";
45
+ readonly 'violet-fill': "#F1ECFB";
46
+ readonly violet: "#6D28D9";
47
+ readonly 'neutral-fill': "#F4F4F5";
48
+ readonly neutral: "#52525B";
42
49
  /** `.btn-dstr` — the fill behind an irreversible confirmation. */
43
50
  readonly destructive: "#A32D2D";
44
51
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "2.1.0-beta.1",
4
+ "version": "2.1.0-beta.10",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",