@veevarts/design-system 2.0.0-beta.7 → 2.0.0-csm.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 (256) hide show
  1. package/README.md +36 -0
  2. package/dist/components/Drawer/Drawer.d.ts +17 -0
  3. package/dist/components/Drawer/index.d.ts +2 -0
  4. package/dist/components/Modal/CloseButton.d.ts +18 -0
  5. package/dist/components/Modal/Modal.d.ts +15 -0
  6. package/dist/components/Modal/index.d.ts +2 -0
  7. package/dist/components/Modal/useLabelledCloseButton.d.ts +13 -0
  8. package/dist/components/Select/Select.d.ts +10 -0
  9. package/dist/components/Table/Table.d.ts +7 -0
  10. package/dist/components/Table/index.d.ts +2 -0
  11. package/dist/components/index.d.ts +6 -0
  12. package/dist/index.cjs +10 -9
  13. package/dist/index.d.ts +4 -0
  14. package/dist/index.js +11290 -5926
  15. package/dist/patterns/ActivityTimeline/ActivityTimeline.d.ts +3 -0
  16. package/dist/patterns/ActivityTimeline/index.d.ts +2 -0
  17. package/dist/patterns/ActivityTimeline/styles.d.ts +15 -0
  18. package/dist/patterns/ActivityTimeline/types.d.ts +15 -0
  19. package/dist/patterns/AdminTable/AdminTable.d.ts +1 -0
  20. package/dist/patterns/AdminTable/styles.d.ts +6 -0
  21. package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +13 -2
  22. package/dist/patterns/AdminToolbar/index.d.ts +1 -0
  23. package/dist/patterns/AdminToolbar/styles.d.ts +49 -0
  24. package/dist/patterns/AdminToolbar/types.d.ts +2 -0
  25. package/dist/patterns/AmountList/AmountList.d.ts +3 -0
  26. package/dist/patterns/AmountList/index.d.ts +2 -0
  27. package/dist/patterns/AmountList/styles.d.ts +23 -0
  28. package/dist/patterns/AmountList/types.d.ts +26 -0
  29. package/dist/patterns/ArtifactCard/ArtifactCard.d.ts +19 -0
  30. package/dist/patterns/ArtifactCard/index.d.ts +2 -0
  31. package/dist/patterns/ArtifactCard/styles.d.ts +31 -0
  32. package/dist/patterns/ArtifactCard/types.d.ts +34 -0
  33. package/dist/patterns/AssistantActivity/AssistantActivity.d.ts +15 -0
  34. package/dist/patterns/AssistantActivity/formatAssistantDuration.d.ts +10 -0
  35. package/dist/patterns/AssistantActivity/index.d.ts +3 -0
  36. package/dist/patterns/AssistantActivity/styles.d.ts +31 -0
  37. package/dist/patterns/AssistantActivity/types.d.ts +37 -0
  38. package/dist/patterns/AssistantComposer/AssistantComposer.d.ts +15 -0
  39. package/dist/patterns/AssistantComposer/index.d.ts +2 -0
  40. package/dist/patterns/AssistantComposer/styles.d.ts +27 -0
  41. package/dist/patterns/AssistantComposer/types.d.ts +48 -0
  42. package/dist/patterns/AssistantMarkdown/AssistantMarkdown.d.ts +17 -0
  43. package/dist/patterns/AssistantMarkdown/index.d.ts +3 -0
  44. package/dist/patterns/AssistantMarkdown/parser.d.ts +37 -0
  45. package/dist/patterns/AssistantMarkdown/styles.d.ts +35 -0
  46. package/dist/patterns/AssistantMarkdown/types.d.ts +37 -0
  47. package/dist/patterns/AssistantMessage/AssistantMessage.d.ts +17 -0
  48. package/dist/patterns/AssistantMessage/index.d.ts +2 -0
  49. package/dist/patterns/AssistantMessage/styles.d.ts +45 -0
  50. package/dist/patterns/AssistantMessage/types.d.ts +73 -0
  51. package/dist/patterns/AssistantNotice/AssistantNotice.d.ts +17 -0
  52. package/dist/patterns/AssistantNotice/index.d.ts +2 -0
  53. package/dist/patterns/AssistantNotice/styles.d.ts +36 -0
  54. package/dist/patterns/AssistantNotice/types.d.ts +46 -0
  55. package/dist/patterns/CardList/CardList.d.ts +3 -0
  56. package/dist/patterns/CardList/index.d.ts +2 -0
  57. package/dist/patterns/CardList/styles.d.ts +20 -0
  58. package/dist/patterns/CardList/types.d.ts +20 -0
  59. package/dist/patterns/CardStack/CardStack.d.ts +7 -0
  60. package/dist/patterns/CardStack/index.d.ts +2 -0
  61. package/dist/patterns/CardStack/styles.d.ts +2 -0
  62. package/dist/patterns/CashTenderForm/types.d.ts +6 -0
  63. package/dist/patterns/CellText/CellText.d.ts +16 -0
  64. package/dist/patterns/CellText/index.d.ts +2 -0
  65. package/dist/patterns/CellText/styles.d.ts +7 -0
  66. package/dist/patterns/CitationMarker/CitationMarker.d.ts +16 -0
  67. package/dist/patterns/CitationMarker/index.d.ts +2 -0
  68. package/dist/patterns/CitationMarker/styles.d.ts +19 -0
  69. package/dist/patterns/CitationMarker/types.d.ts +12 -0
  70. package/dist/patterns/DiscardGuard/DiscardGuard.d.ts +23 -0
  71. package/dist/patterns/DiscardGuard/context.d.ts +25 -0
  72. package/dist/patterns/DiscardGuard/index.d.ts +6 -0
  73. package/dist/patterns/DiscardGuard/useDiscardGuard.d.ts +38 -0
  74. package/dist/patterns/DonationAmounts/index.d.ts +1 -1
  75. package/dist/patterns/DonationAmounts/styles.d.ts +32 -0
  76. package/dist/patterns/DonationAmounts/types.d.ts +55 -1
  77. package/dist/patterns/DonationAmounts/utils/currency.d.ts +7 -3
  78. package/dist/patterns/EntityRow/EntityList.d.ts +9 -0
  79. package/dist/patterns/EntityRow/EntityRow.d.ts +3 -0
  80. package/dist/patterns/EntityRow/context.d.ts +2 -0
  81. package/dist/patterns/EntityRow/icons.d.ts +3 -0
  82. package/dist/patterns/EntityRow/index.d.ts +3 -0
  83. package/dist/patterns/EntityRow/initials.d.ts +6 -0
  84. package/dist/patterns/EntityRow/styles.d.ts +59 -0
  85. package/dist/patterns/EntityRow/types.d.ts +118 -0
  86. package/dist/patterns/FilterSelect/FilterSelect.d.ts +3 -0
  87. package/dist/patterns/FilterSelect/FilterSelectGroup.d.ts +3 -0
  88. package/dist/patterns/FilterSelect/index.d.ts +3 -0
  89. package/dist/patterns/FilterSelect/styles.d.ts +17 -0
  90. package/dist/patterns/FilterSelect/types.d.ts +19 -0
  91. package/dist/patterns/InlineConfirm/InlineConfirm.d.ts +38 -0
  92. package/dist/patterns/InlineConfirm/index.d.ts +2 -0
  93. package/dist/patterns/InlineConfirm/styles.d.ts +16 -0
  94. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +1 -1
  95. package/dist/patterns/InstallmentFundAssignment/types.d.ts +3 -0
  96. package/dist/patterns/InstallmentSchedule/InstallmentSchedule.d.ts +1 -1
  97. package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +1 -1
  98. package/dist/patterns/InstallmentSchedule/types.d.ts +46 -3
  99. package/dist/patterns/InstallmentSchedule/utils.d.ts +21 -0
  100. package/dist/patterns/KeyValueChip/KeyValueChip.d.ts +1 -0
  101. package/dist/patterns/KeyValueRows/KeyValueRows.d.ts +13 -0
  102. package/dist/patterns/KeyValueRows/index.d.ts +2 -0
  103. package/dist/patterns/KeyValueRows/styles.d.ts +8 -0
  104. package/dist/patterns/LineItemRows/LineItemRows.d.ts +17 -0
  105. package/dist/patterns/LineItemRows/index.d.ts +2 -0
  106. package/dist/patterns/LineItemRows/styles.d.ts +13 -0
  107. package/dist/patterns/ListPanel/ListPanel.d.ts +2 -0
  108. package/dist/patterns/LoadMoreFooter/LoadMoreFooter.d.ts +3 -0
  109. package/dist/patterns/LoadMoreFooter/index.d.ts +2 -0
  110. package/dist/patterns/LoadMoreFooter/styles.d.ts +7 -0
  111. package/dist/patterns/LoadMoreFooter/types.d.ts +10 -0
  112. package/dist/patterns/MetaCard/types.d.ts +2 -0
  113. package/dist/patterns/ModalPanels/ModalPanels.d.ts +35 -0
  114. package/dist/patterns/ModalPanels/context.d.ts +20 -0
  115. package/dist/patterns/ModalPanels/focus.d.ts +44 -0
  116. package/dist/patterns/ModalPanels/index.d.ts +6 -0
  117. package/dist/patterns/ModalPanels/styles.d.ts +13 -0
  118. package/dist/patterns/ModalPanels/useModalPanels.d.ts +30 -0
  119. package/dist/patterns/OutcomeView/index.d.ts +1 -1
  120. package/dist/patterns/OutcomeView/types.d.ts +110 -3
  121. package/dist/patterns/PageHeader/PageHeader.d.ts +1 -0
  122. package/dist/patterns/PaginationSummary/PaginationSummary.d.ts +12 -0
  123. package/dist/patterns/PaginationSummary/index.d.ts +1 -1
  124. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +2 -0
  125. package/dist/patterns/PillTabs/PillTabs.d.ts +3 -0
  126. package/dist/patterns/PillTabs/ids.d.ts +9 -0
  127. package/dist/patterns/PillTabs/index.d.ts +3 -0
  128. package/dist/patterns/PillTabs/styles.d.ts +20 -0
  129. package/dist/patterns/PillTabs/types.d.ts +21 -0
  130. package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/type.d.ts +1 -1
  131. package/dist/patterns/{EventDetails → Programs/EventDetails}/EventDetails.d.ts +3 -1
  132. package/dist/patterns/{OfferCard → Programs/OfferCard}/OfferCard.d.ts +1 -1
  133. package/dist/patterns/{OfferCard → Programs/OfferCard}/types.d.ts +7 -0
  134. package/dist/patterns/Programs/ProgramListItem/ProgramListItem.d.ts +17 -0
  135. package/dist/patterns/Programs/ProgramListItem/index.d.ts +2 -0
  136. package/dist/patterns/Programs/index.d.ts +5 -0
  137. package/dist/patterns/ReasonSelect/types.d.ts +1 -0
  138. package/dist/patterns/RecordCard/RecordCard.d.ts +3 -0
  139. package/dist/patterns/RecordCard/index.d.ts +2 -0
  140. package/dist/patterns/RecordCard/styles.d.ts +16 -0
  141. package/dist/patterns/RecordCard/types.d.ts +22 -0
  142. package/dist/patterns/RecordHeader/RecordHeader.d.ts +3 -0
  143. package/dist/patterns/RecordHeader/index.d.ts +2 -0
  144. package/dist/patterns/RecordHeader/styles.d.ts +43 -0
  145. package/dist/patterns/RecordHeader/types.d.ts +30 -0
  146. package/dist/patterns/RecordLayout/RecordLayout.d.ts +3 -0
  147. package/dist/patterns/RecordLayout/index.d.ts +2 -0
  148. package/dist/patterns/RecordLayout/styles.d.ts +8 -0
  149. package/dist/patterns/RecordLayout/types.d.ts +6 -0
  150. package/dist/patterns/RecordTotals/RecordTotals.d.ts +19 -0
  151. package/dist/patterns/RecordTotals/index.d.ts +2 -0
  152. package/dist/patterns/RecordTotals/styles.d.ts +19 -0
  153. package/dist/patterns/RefundMethodCards/RefundMethodCards.d.ts +4 -0
  154. package/dist/patterns/RefundMethodCards/index.d.ts +2 -0
  155. package/dist/patterns/RefundMethodCards/styles.d.ts +59 -0
  156. package/dist/patterns/RefundMethodCards/types.d.ts +72 -0
  157. package/dist/patterns/RefundProgressList/RefundProgressList.d.ts +4 -0
  158. package/dist/patterns/RefundProgressList/index.d.ts +2 -0
  159. package/dist/patterns/RefundProgressList/styles.d.ts +44 -0
  160. package/dist/patterns/RefundProgressList/types.d.ts +37 -0
  161. package/dist/patterns/RelatedRecordList/RelatedRecordList.d.ts +3 -0
  162. package/dist/patterns/RelatedRecordList/index.d.ts +2 -0
  163. package/dist/patterns/RelatedRecordList/styles.d.ts +19 -0
  164. package/dist/patterns/RelatedRecordList/types.d.ts +17 -0
  165. package/dist/patterns/ScrollToLatest/ScrollToLatest.d.ts +16 -0
  166. package/dist/patterns/ScrollToLatest/index.d.ts +2 -0
  167. package/dist/patterns/ScrollToLatest/styles.d.ts +11 -0
  168. package/dist/patterns/ScrollToLatest/types.d.ts +27 -0
  169. package/dist/patterns/SessionExpiredCard/SessionExpiredCard.d.ts +14 -0
  170. package/dist/patterns/SessionExpiredCard/index.d.ts +2 -0
  171. package/dist/patterns/SessionExpiredCard/type.d.ts +6 -0
  172. package/dist/patterns/SourceList/SourceList.d.ts +12 -0
  173. package/dist/patterns/SourceList/index.d.ts +2 -0
  174. package/dist/patterns/SourceList/styles.d.ts +20 -0
  175. package/dist/patterns/SourceList/types.d.ts +28 -0
  176. package/dist/patterns/SourcePill/SourcePill.d.ts +13 -0
  177. package/dist/patterns/SourcePill/index.d.ts +2 -0
  178. package/dist/patterns/SourcePill/styles.d.ts +19 -0
  179. package/dist/patterns/SourcePill/types.d.ts +19 -0
  180. package/dist/patterns/SplitPaymentSummary/index.d.ts +1 -1
  181. package/dist/patterns/SplitPaymentSummary/types.d.ts +18 -0
  182. package/dist/patterns/StatTiles/StatTiles.d.ts +3 -0
  183. package/dist/patterns/StatTiles/index.d.ts +2 -0
  184. package/dist/patterns/StatTiles/styles.d.ts +8 -0
  185. package/dist/patterns/StatTiles/types.d.ts +12 -0
  186. package/dist/patterns/StatusChip/StatusChip.d.ts +3 -3
  187. package/dist/patterns/StepProgress/StepProgress.d.ts +4 -0
  188. package/dist/patterns/StepProgress/index.d.ts +2 -0
  189. package/dist/patterns/StepProgress/styles.d.ts +29 -0
  190. package/dist/patterns/StepProgress/types.d.ts +43 -0
  191. package/dist/patterns/Summary/components/ActionBar.d.ts +2 -0
  192. package/dist/patterns/Summary/components/GrandTotalRow.d.ts +1 -0
  193. package/dist/patterns/Summary/components/ItemRow.d.ts +1 -0
  194. package/dist/patterns/Summary/components/SummaryBody.d.ts +4 -1
  195. package/dist/patterns/Summary/components/TotalsLineRow.d.ts +3 -2
  196. package/dist/patterns/Summary/types.d.ts +51 -9
  197. package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
  198. package/dist/patterns/TileSelect/TileSelect.d.ts +80 -2
  199. package/dist/patterns/TileSelect/index.d.ts +1 -1
  200. package/dist/patterns/TileSelect/styles.d.ts +14 -0
  201. package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
  202. package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +20 -1
  203. package/dist/patterns/UnderlineTabs/index.d.ts +1 -1
  204. package/dist/patterns/UnderlineTabs/styles.d.ts +10 -0
  205. package/dist/patterns/WizardShell/index.d.ts +1 -1
  206. package/dist/patterns/WizardShell/types.d.ts +9 -1
  207. package/dist/patterns/grid-columns.d.ts +1 -1
  208. package/dist/patterns/index.d.ts +87 -17
  209. package/dist/patterns/shared/hasContent.d.ts +2 -0
  210. package/dist/patterns/shared/index.d.ts +1 -0
  211. package/dist/patterns/shared/motion.d.ts +6 -0
  212. package/dist/patterns/shared/recordTone.d.ts +9 -0
  213. package/dist/patterns/shared/rem.d.ts +4 -0
  214. package/dist/patterns/shared/useContainerWidth.d.ts +6 -0
  215. package/dist/patterns/shared/useDecimalDraft.d.ts +33 -0
  216. package/dist/patterns/shared/usePrefillEdits.d.ts +7 -0
  217. package/dist/providers/DensityProvider.d.ts +7 -0
  218. package/dist/providers/HeroUIProvider.d.ts +14 -1
  219. package/dist/providers/close-label-context.d.ts +18 -0
  220. package/dist/providers/density.d.ts +17 -0
  221. package/dist/providers/index.d.ts +4 -0
  222. package/dist/tailwind/index.cjs +107 -5
  223. package/dist/tailwind/index.d.ts +61 -0
  224. package/dist/tailwind/index.mjs +104 -5
  225. package/dist/test/ReducedMotion.d.ts +4 -0
  226. package/dist/test/RootFontSize.d.ts +5 -0
  227. package/dist/test/backdrop.d.ts +12 -0
  228. package/dist/test/container-width.d.ts +14 -0
  229. package/dist/test/contrast.d.ts +1 -0
  230. package/dist/test/px-class-names.d.ts +1 -0
  231. package/dist/test/px-classes.d.ts +3 -0
  232. package/dist/test/root-font-size.d.ts +8 -0
  233. package/dist/tokens/assistant-surface.d.ts +66 -0
  234. package/dist/tokens/index.d.ts +2 -0
  235. package/dist/tokens/pos-surface.d.ts +23 -4
  236. package/package.json +5 -2
  237. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/CatalogItemCard.d.ts +0 -0
  238. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/index.d.ts +0 -0
  239. /package/dist/patterns/{EventDetails → Programs/EventDetails}/index.d.ts +0 -0
  240. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/CustomQuantitySelectorExample.d.ts +0 -0
  241. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithEurosCurrencyExample.d.ts +0 -0
  242. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithoutAnimationExample.d.ts +0 -0
  243. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/index.d.ts +0 -0
  244. /package/dist/patterns/{OfferCard → Programs/OfferCard}/index.d.ts +0 -0
  245. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/animations.d.ts +0 -0
  246. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/currency.d.ts +0 -0
  247. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/index.d.ts +0 -0
  248. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/offers.d.ts +0 -0
  249. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardEmpty.d.ts +0 -0
  250. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardError.d.ts +0 -0
  251. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardList.d.ts +0 -0
  252. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardSkeleton.d.ts +0 -0
  253. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/index.d.ts +0 -0
  254. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/SessionTimeline.d.ts +0 -0
  255. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/index.d.ts +0 -0
  256. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/type.d.ts +0 -0
@@ -18,7 +18,27 @@ export interface DonationAmount {
18
18
  * If not provided, the formatted currency will be used
19
19
  */
20
20
  label?: string;
21
+ /**
22
+ * Second line under the amount, e.g. `'+$0.56 donation'` on a round-up
23
+ * offer. Rendered by the `tile` and `pos` variants only; the `pill`
24
+ * variant has no room for it.
25
+ */
26
+ sublabel?: string;
21
27
  }
28
+ /**
29
+ * How the presets and the custom input are drawn.
30
+ *
31
+ * - `pill` (default): HeroUI bordered pill buttons; the selected one fills
32
+ * with the brand colour. The original look, unchanged.
33
+ * - `tile`: the Quick Donation / Quick Membership amount grid. Rectangular
34
+ * 12px tiles on the `pos-field` hairline; the selected tile takes a brand
35
+ * border, a 9% brand tint and brand digits.
36
+ * - `pos`: the register's donation modal and round-up offer. 14px chips on
37
+ * the `pos-line` hairline that auto-fit the row (min 96px), 19px digits
38
+ * that stay ink when selected over a 5% brand tint, an optional sublabel,
39
+ * and a visible label over the custom input.
40
+ */
41
+ export type DonationAmountsVariant = 'pill' | 'tile' | 'pos';
22
42
  /**
23
43
  * Selected donation value (can be preset or custom)
24
44
  */
@@ -57,6 +77,27 @@ export interface DonationLabels {
57
77
  * @default 'Add Donation'
58
78
  */
59
79
  addDonationButton?: string;
80
+ /**
81
+ * Small uppercase heading above the presets ("Round up your total").
82
+ * `tile` and `pos` variants only.
83
+ */
84
+ eyebrow?: string;
85
+ /**
86
+ * Muted line under the eyebrow or title ("Current total $19.44").
87
+ * `tile` and `pos` variants only.
88
+ */
89
+ caption?: string;
90
+ /**
91
+ * Visible label over the custom amount input ("Custom amount"). When set
92
+ * it also names the input, so `customAmountAriaLabel` is not needed.
93
+ * `tile` and `pos` variants only.
94
+ */
95
+ customAmountLabel?: string;
96
+ /**
97
+ * Accessible name of the preset group when no `title` is shown.
98
+ * @default 'Suggested amounts'
99
+ */
100
+ presetsAriaLabel?: string;
60
101
  }
61
102
  /**
62
103
  * Props for DonationAmounts component
@@ -145,10 +186,23 @@ export interface DonationAmountsProps {
145
186
  */
146
187
  inputVariant?: 'flat' | 'bordered' | 'faded' | 'underlined';
147
188
  /**
148
- * Size of the custom amount input and add button
189
+ * Size of the custom amount input and add button. In `tile` and `pos`,
190
+ * `md` is the mockup's field; the presets keep their size in every variant.
149
191
  * @default 'md'
150
192
  */
151
193
  size?: 'sm' | 'md' | 'lg';
194
+ /**
195
+ * Visual variant. See {@link DonationAmountsVariant}.
196
+ * @default 'pill'
197
+ */
198
+ variant?: DonationAmountsVariant;
199
+ /**
200
+ * Marks the title as required with a danger asterisk (`tile` and `pos`
201
+ * variants). The asterisk is decorative; announce the requirement through
202
+ * the form's own validation.
203
+ * @default false
204
+ */
205
+ isRequired?: boolean;
152
206
  /**
153
207
  * Additional CSS classes
154
208
  */
@@ -6,13 +6,17 @@
6
6
  * @param amount - The amount to format
7
7
  * @param locale - The locale to use for formatting (e.g., 'en-US', 'es-ES')
8
8
  * @param currency - The currency code (ISO 4217, e.g., 'USD', 'EUR')
9
+ * @param trimZeroCents - Drop the fraction of a whole amount ("$25" rather than
10
+ * "$25.00"). Default `true`; `false` keeps the currency's own digits, as a
11
+ * register price does.
9
12
  * @returns Formatted currency string
10
13
  *
11
14
  * @example
12
- * formatCurrency(1000, 'en-US', 'USD') // "$1,000.00"
13
- * formatCurrency(1000, 'es-ES', 'EUR') // "1.000,00 €"
15
+ * formatCurrency(1000, 'en-US', 'USD') // "$1,000"
16
+ * formatCurrency(1000.5, 'es-ES', 'EUR') // "1000,5 €"
17
+ * formatCurrency(5, 'en-US', 'USD', false) // "$5.00"
14
18
  */
15
- export declare function formatCurrency(amount: number, locale?: string, currency?: string): string;
19
+ export declare function formatCurrency(amount: number, locale?: string, currency?: string, trimZeroCents?: boolean): string;
16
20
  /**
17
21
  * Parses a currency string to a number
18
22
  * @param value - The currency string to parse
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { EntityListProps, EntityListSkeletonProps } from './types';
3
+ export declare const EntityList: React.FC<EntityListProps>;
4
+ /**
5
+ * The list in skeleton form, at the same row height so nothing shifts when the
6
+ * rows arrive. The placeholder rows are hidden from assistive tech; `label` is
7
+ * announced once through a `role="status"` region instead.
8
+ */
9
+ export declare const EntityListSkeleton: React.FC<EntityListSkeletonProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { EntityRowProps } from './types';
3
+ export declare const EntityRow: React.FC<EntityRowProps>;
@@ -0,0 +1,2 @@
1
+ /** True inside an `EntityList`, so rows default to `li`. */
2
+ export declare const EntityListContext: import('react').Context<boolean>;
@@ -0,0 +1,3 @@
1
+ /** Inline so the defaults render offline and without an icon registry. */
2
+ export declare const ChevronRightIcon: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const MenuDotsIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { EntityRow } from './EntityRow';
2
+ export { EntityList, EntityListSkeleton } from './EntityList';
3
+ export type { EntityRowProps, EntityRowSize, EntityRowVariant, EntityRowTag, EntityRowTagTone, EntityRowLeading, EntityRowAction, EntityListProps, EntityListSkeletonProps, } from './types';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * "Chidi Okafor" → "CO", "Ana María de la Cruz" → "AC", "Cher" → "C".
3
+ * First and last word, so a long name does not spell an acronym the way
4
+ * HeroUI's default (every word's initial) does. Empty → "—".
5
+ */
6
+ export declare function initialsFromName(name: string): string;
@@ -0,0 +1,59 @@
1
+ import { EntityListProps, EntityRowSize, EntityRowTagTone, EntityRowVariant } from './types';
2
+ export declare const entityRowClass: {
3
+ readonly base: "relative flex w-full items-center gap-2 transition-colors";
4
+ readonly content: "flex min-w-0 flex-1 items-center gap-3 text-left";
5
+ /**
6
+ * The press target is a HeroUI `Button` (or `Link`) stretched over the row
7
+ * by its `::after`. Its base classes have to be undone for that to work:
8
+ * `relative` would make the button the overlay's containing block,
9
+ * `transform-gpu` would too, `overflow-hidden` clips the overlay,
10
+ * `min-w-max` and `whitespace-nowrap` defeat truncation, and the focus
11
+ * outline is moved from the button to the overlay so it rings the row.
12
+ */
13
+ readonly pressTarget: string;
14
+ readonly text: "flex min-w-0 flex-col";
15
+ readonly titleLine: "flex min-w-0 items-center gap-2";
16
+ readonly title: "truncate font-medium text-default-900";
17
+ readonly subtitle: "truncate text-default-600";
18
+ readonly tags: "flex shrink-0 items-center gap-1";
19
+ /** Lifted above the stretched overlay so each stays its own control. */
20
+ readonly side: "relative z-10 flex shrink-0 items-center gap-1";
21
+ readonly chevron: "flex shrink-0 text-default-500";
22
+ readonly menuTrigger: "text-default-600";
23
+ readonly avatar: "shrink-0 bg-default-200 text-default-700";
24
+ readonly dangerItem: "text-danger";
25
+ };
26
+ /**
27
+ * Text overrides for flat chips whose HeroUI tone measures under 4.5:1 on the
28
+ * plain row's hover tint (default-100): primary 4.39:1 and warning 4.03:1 at
29
+ * their `-700` text. One step darker clears it; the others already do.
30
+ */
31
+ export declare const entityRowTagToneClass: Record<EntityRowTagTone, string | undefined>;
32
+ export declare const entityRowVariantClass: Record<EntityRowVariant, {
33
+ row: string;
34
+ hover: string;
35
+ overlay: string;
36
+ }>;
37
+ export declare const entityRowSizeClass: Record<EntityRowSize, {
38
+ row: string;
39
+ content: string;
40
+ title: string;
41
+ subtitle: string;
42
+ avatar: 'sm' | 'md';
43
+ control: 'md' | 'lg';
44
+ }>;
45
+ export declare const entityRowMenuItemClass: Record<EntityRowSize, string | undefined>;
46
+ export declare const entityListGapClass: Record<NonNullable<EntityListProps['gap']>, string>;
47
+ export declare const entityListClass = "m-0 flex list-none flex-col p-0";
48
+ export declare const entityListSkeletonClass: {
49
+ readonly row: "flex items-center gap-3 px-2";
50
+ readonly avatar: {
51
+ readonly md: "size-8 shrink-0 rounded-full";
52
+ readonly lg: "size-10 shrink-0 rounded-full";
53
+ };
54
+ readonly lines: "flex flex-col gap-2";
55
+ readonly title: "h-4 rounded-md";
56
+ readonly subtitle: "h-3 w-44 rounded-md";
57
+ /** Varied so the placeholder does not read as a ruled grid. */
58
+ readonly titleWidths: readonly ["w-32", "w-28", "w-36", "w-24", "w-40", "w-28"];
59
+ };
@@ -0,0 +1,118 @@
1
+ import { ElementType, ReactNode } from 'react';
2
+ /** `md` is a desk row (48px), `lg` a touch row (56px). */
3
+ export type EntityRowSize = 'md' | 'lg';
4
+ /** `plain` sits in a list and tints on hover; `bordered` is a standalone hairline card. */
5
+ export type EntityRowVariant = 'plain' | 'bordered';
6
+ export type EntityRowTagTone = 'default' | 'primary' | 'success' | 'warning' | 'danger';
7
+ export interface EntityRowTag {
8
+ key: string;
9
+ label: ReactNode;
10
+ /** Maps to the HeroUI `Chip` color, always `variant="flat"`. */
11
+ tone?: EntityRowTagTone;
12
+ }
13
+ /**
14
+ * What the row leads with. Always decorative (`aria-hidden`): the title is the
15
+ * row's name. Precedence: `src`, then `icon`, then initials (`initials`, else
16
+ * derived from `name`, else from a string `title`).
17
+ */
18
+ export interface EntityRowLeading {
19
+ /** Image URL. */
20
+ src?: string;
21
+ /** An icon tile instead of initials (a household, an organization). */
22
+ icon?: ReactNode;
23
+ /** Explicit initials, used verbatim. */
24
+ initials?: string;
25
+ /** Source for derived initials when the title is not the person's name. */
26
+ name?: string;
27
+ /** `circle` for people (default), `square` for a tile. */
28
+ shape?: 'circle' | 'square';
29
+ }
30
+ export interface EntityRowAction {
31
+ key: string;
32
+ label: string;
33
+ icon?: ReactNode;
34
+ tone?: 'default' | 'danger';
35
+ isDisabled?: boolean;
36
+ onAction: () => void;
37
+ /** Defaults to `<row testid>-menu-<key>`. */
38
+ 'data-testid'?: string;
39
+ }
40
+ /**
41
+ * Actions and their label travel together: an overflow trigger is icon-only,
42
+ * so without a label it is announced as "button" and nothing else.
43
+ */
44
+ type EntityRowActionsProps = {
45
+ actions?: undefined;
46
+ actionsLabel?: undefined;
47
+ } | {
48
+ /** Overflow menu items. An empty array renders no trigger. */
49
+ actions: EntityRowAction[];
50
+ /**
51
+ * Accessible name of the `⋯` trigger and of the menu. Include the
52
+ * subject: "Actions for Chidi Okafor", not "Actions" — a list of
53
+ * these otherwise reads as a column of identical buttons.
54
+ */
55
+ actionsLabel: string;
56
+ };
57
+ interface EntityRowBaseProps {
58
+ /** The row's accessible name. */
59
+ title: ReactNode;
60
+ /** Second line (contact details, a count, "View household"). */
61
+ subtitle?: ReactNode;
62
+ leading?: EntityRowLeading;
63
+ /** Chips beside the title. */
64
+ tags?: EntityRowTag[];
65
+ /**
66
+ * Makes the whole row a button. The press target is stretched over the
67
+ * row; `trailing` and the actions menu stay their own controls.
68
+ */
69
+ onPress?: () => void;
70
+ /** Makes the whole row a link (wins over `onPress` for semantics; both fire). */
71
+ href?: string;
72
+ /** Router link component for `href` (Next.js `Link`, React Router `Link`). */
73
+ linkAs?: ElementType;
74
+ /** e.g. `'dialog'` when the row opens a picker. Only for button rows. */
75
+ 'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | true;
76
+ /** Explicit control between the text and the menu ("Select", "Add"). */
77
+ trailing?: ReactNode;
78
+ /** Trailing chevron: the row leads somewhere. */
79
+ showChevron?: boolean;
80
+ /** Overrides the default chevron glyph. */
81
+ chevronIcon?: ReactNode;
82
+ /** Overrides the default `⋯` glyph. */
83
+ actionsIcon?: ReactNode;
84
+ /** Defaults from `DensityProvider`: `touch` → `lg`, otherwise `md`. */
85
+ size?: EntityRowSize;
86
+ variant?: EntityRowVariant;
87
+ /** Disables the press target and the actions trigger (not `trailing`, which the host owns). */
88
+ isDisabled?: boolean;
89
+ /** Container element. Defaults to `li` inside `EntityList`, `div` elsewhere. */
90
+ as?: 'li' | 'div';
91
+ className?: string;
92
+ /**
93
+ * Row container. Derived: `-trigger` (press target), `-menu-trigger`,
94
+ * `-menu`, `-menu-<key>`.
95
+ */
96
+ 'data-testid'?: string;
97
+ }
98
+ export type EntityRowProps = EntityRowBaseProps & EntityRowActionsProps;
99
+ export interface EntityListProps {
100
+ children: ReactNode;
101
+ /** Name the list: `aria-label` or `aria-labelledby` (one is required by a11y review). */
102
+ 'aria-label'?: string;
103
+ 'aria-labelledby'?: string;
104
+ /** Spacing between rows; `bordered` rows read better apart. */
105
+ gap?: 'none' | 'sm' | 'md';
106
+ className?: string;
107
+ 'data-testid'?: string;
108
+ }
109
+ export interface EntityListSkeletonProps {
110
+ /** Announced to assistive tech while the rows load ("Loading contacts"). */
111
+ label: string;
112
+ rows?: number;
113
+ /** Defaults from `DensityProvider`, like `EntityRow`. */
114
+ size?: EntityRowSize;
115
+ className?: string;
116
+ 'data-testid'?: string;
117
+ }
118
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { FilterSelectProps } from './types';
3
+ export declare const FilterSelect: React.FC<FilterSelectProps>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { FilterSelectGroupProps } from './types';
3
+ export declare const FilterSelectGroup: React.FC<FilterSelectGroupProps>;
@@ -0,0 +1,3 @@
1
+ export { FilterSelect } from './FilterSelect';
2
+ export { FilterSelectGroup } from './FilterSelectGroup';
3
+ export type { FilterSelectProps, FilterSelectOption, FilterSelectGroupProps } from './types';
@@ -0,0 +1,17 @@
1
+ export declare const filterSelectClass: {
2
+ readonly base: "relative inline-grid min-w-[var(--filter-select-min)] max-w-max shrink grow basis-[var(--filter-select-min)] grid-cols-[minmax(0,1fr)] [--filter-select-min:6rem]";
3
+ readonly baseActive: "[--filter-select-min:8rem]";
4
+ readonly cell: "[grid-area:1/1]";
5
+ readonly sizer: "invisible h-0 max-w-[20rem] overflow-hidden whitespace-nowrap border-x-2 border-transparent pl-2 pr-[2.0625rem] text-[0.875rem]";
6
+ readonly sizerActive: "pr-[3.4375rem] font-semibold";
7
+ readonly select: "w-full [contain:inline-size]";
8
+ readonly trigger: "h-[2.375rem] min-h-[2.375rem] rounded-[0.625rem] border-medium border-pos-field bg-white px-2 shadow-none data-[hover=true]:border-default-300 data-[focus=true]:border-primary data-[open=true]:border-primary data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-primary data-[focus-visible=true]:ring-offset-1";
9
+ readonly triggerActive: "!border-acct-rust-border !bg-acct-rust-fill pr-[1.875rem]";
10
+ readonly value: "text-[0.875rem] !text-default-900";
11
+ readonly valueActive: "font-semibold !text-primary-600";
12
+ readonly iconActive: "!text-primary-600";
13
+ readonly clear: "absolute right-[1.875rem] top-1/2 z-20 inline-flex size-[1.25rem] -translate-y-1/2 items-center justify-center rounded-md text-primary-600 outline-none hover:bg-white/70 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary";
14
+ readonly clearIcon: "size-[0.8125rem]";
15
+ readonly optionTitle: "whitespace-normal break-words";
16
+ };
17
+ export declare const filterSelectGroupClass = "grid shrink grow basis-0 grid-flow-col auto-cols-auto gap-2.5 [--filter-select-cap:16rem] max-w-[calc(var(--filter-select-count)*var(--filter-select-cap)+(var(--filter-select-count)-1)*0.625rem)] [&>[data-slot=filter-select]]:max-w-none";
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ export interface FilterSelectOption {
3
+ value: string;
4
+ label: string;
5
+ }
6
+ export interface FilterSelectProps {
7
+ label: string;
8
+ value: string | null;
9
+ options: FilterSelectOption[];
10
+ onChange: (value: string | null) => void;
11
+ clearLabel: string;
12
+ minWidth?: number;
13
+ 'data-testid'?: string;
14
+ }
15
+ export interface FilterSelectGroupProps {
16
+ children: ReactNode;
17
+ className?: string;
18
+ 'data-testid'?: string;
19
+ }
@@ -0,0 +1,38 @@
1
+ import { default as React } from 'react';
2
+ export type InlineConfirmVariant = 'danger' | 'warning';
3
+ export type InlineConfirmSize = 'sm' | 'md' | 'lg';
4
+ export interface InlineConfirmProps {
5
+ /** The question. Also the accessible name of the alertdialog. */
6
+ message: React.ReactNode;
7
+ /** Optional consequences. Becomes `aria-describedby`. */
8
+ description?: React.ReactNode;
9
+ /** Label for the confirm action. Carry the verb ("Remove"), not "OK". */
10
+ confirmLabel: string;
11
+ /** Label for the cancel action. Default `'Cancel'`. */
12
+ cancelLabel?: string;
13
+ onConfirm: () => void;
14
+ /** Fires from the Cancel button and from Escape. */
15
+ onCancel: () => void;
16
+ /** Drives the surface tone and the confirm colour. Default `'danger'`. */
17
+ variant?: InlineConfirmVariant;
18
+ /** Spinner on confirm; Cancel and Escape locked. Default `false`. */
19
+ isPending?: boolean;
20
+ /** Which button receives focus on mount. Default `'cancel'`. */
21
+ initialFocus?: 'cancel' | 'confirm';
22
+ /** Stop Escape from reaching ancestors (e.g. an enclosing Modal). Default `true`. */
23
+ containEscape?: boolean;
24
+ /**
25
+ * Button size: `'sm'` 32px (default), `'md'` 40px, `'lg'` 48px for a touch
26
+ * register.
27
+ */
28
+ size?: InlineConfirmSize;
29
+ /**
30
+ * `'li'` wraps the box in a list item, for swapping it in place of a row of
31
+ * a `ul`/`ol`. Default `'div'`.
32
+ */
33
+ as?: 'li' | 'div';
34
+ className?: string;
35
+ /** Root test id; the buttons get `<id>-confirm` and `<id>-cancel`. */
36
+ 'data-testid'?: string;
37
+ }
38
+ export declare const InlineConfirm: React.FC<InlineConfirmProps>;
@@ -0,0 +1,2 @@
1
+ export { InlineConfirm } from './InlineConfirm';
2
+ export type { InlineConfirmProps, InlineConfirmVariant, InlineConfirmSize } from './InlineConfirm';
@@ -0,0 +1,16 @@
1
+ import { InlineConfirmVariant } from './InlineConfirm';
2
+ export declare const inlineConfirmClass: {
3
+ /** The `li` that keeps list semantics when the box replaces a row. */
4
+ readonly item: "list-none";
5
+ /**
6
+ * The alertdialog itself. It only takes focus programmatically, while pending,
7
+ * and then shows the system focus ring when the user is on the keyboard.
8
+ */
9
+ readonly box: "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus";
10
+ readonly body: "gap-3 px-4 py-3";
11
+ readonly text: "flex min-w-0 flex-col gap-1";
12
+ readonly message: "text-sm text-gray-900 [overflow-wrap:anywhere]";
13
+ readonly description: "text-sm text-gray-600 [overflow-wrap:anywhere]";
14
+ readonly actions: "flex flex-wrap items-center gap-2";
15
+ };
16
+ export declare const inlineConfirmSurface: Record<InlineConfirmVariant, string>;
@@ -1,3 +1,3 @@
1
1
  import { JSX } from 'react';
2
2
  import { InstallmentFundAssignmentProps } from './types';
3
- export declare function InstallmentFundAssignment({ assignments, funds, labels: customLabels, classNames, isSaving, hasSavedAssignments, isFundPickerOpen, activeAssignmentId, modalPortalContainer, footer, onAssignmentsChange, onOpenFundPicker, onCloseFundPicker, onCollapseChange, onSave, }: InstallmentFundAssignmentProps): JSX.Element;
3
+ export declare function InstallmentFundAssignment({ assignments, funds, labels: customLabels, classNames, isSaving, hasSavedAssignments, showSavedIndicator, isCollapsed, isFundPickerOpen, activeAssignmentId, modalPortalContainer, footer, onAssignmentsChange, onOpenFundPicker, onCloseFundPicker, onCollapseChange, onSave, }: InstallmentFundAssignmentProps): JSX.Element;
@@ -14,6 +14,7 @@ export type InstallmentFundAssignmentEntry = {
14
14
  };
15
15
  export type InstallmentFundAssignmentLabels = {
16
16
  title?: string;
17
+ saved?: string;
17
18
  singleFund?: string;
18
19
  splitFunds?: string;
19
20
  saveAssignment?: string;
@@ -55,6 +56,8 @@ export type InstallmentFundAssignmentProps = {
55
56
  classNames?: InstallmentFundAssignmentClassNames;
56
57
  isSaving?: boolean;
57
58
  hasSavedAssignments?: boolean;
59
+ showSavedIndicator?: boolean;
60
+ isCollapsed?: boolean;
58
61
  isFundPickerOpen?: boolean;
59
62
  activeAssignmentId?: string | null;
60
63
  modalPortalContainer?: Element;
@@ -1,3 +1,3 @@
1
1
  import { JSX } from 'react';
2
2
  import { InstallmentScheduleProps } from './types';
3
- export declare function InstallmentSchedule({ mode: controlledMode, donationAmount, currency, locale, installments, automaticSettings, defaultTab, showTitle, showCard, showSavePayment, showTabs, inputs, startDate, firstInstallmentDateOverride, labels: customLabels, classNames, isSaving, isModeSwitchDisabled, onModeChange, onAutomaticSettingsChange, onInstallmentsChange, onSave, }: InstallmentScheduleProps): JSX.Element;
3
+ export declare function InstallmentSchedule({ mode: controlledMode, donationAmount, currency, locale, installments, automaticSettings, defaultTab, showTitle, showCard, showSavePayment, showTabs, inputs, startDate, firstInstallmentDateOverride, labels: customLabels, classNames, isSaving, showSavedIndicator, isModeSwitchDisabled, onModeChange, onAutomaticSettingsChange, onInstallmentsChange, onSave, onCancel, }: InstallmentScheduleProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { JSX } from 'react';
2
2
  import { InstallmentTableProps } from './types';
3
- export declare function InstallmentTable({ installments, currency, locale, showTitle, showCard, showEditPayment, showDelete, payNowHiddenStatuses, labels: customLabels, isSaving, onEditInstallments, onPayInstallment, onDeleteInstallment, }: InstallmentTableProps): JSX.Element;
3
+ export declare function InstallmentTable({ installments, currency, locale, showTitle, showCard, showEditPayment, showDelete, payNowHiddenStatuses, showSavedIndicator, labels: customLabels, isSaving, onEditInstallments, onPayInstallment, onDeleteInstallment, }: InstallmentTableProps): JSX.Element;
@@ -1,12 +1,34 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type InstallmentScheduleMode = 'automatic' | 'manual';
3
3
  export type InstallmentFrequency = 'weekly' | 'monthly' | 'quarterly' | 'annual';
4
- export type InstallmentStatus = 'scheduled' | 'paid' | 'payment_due' | 'overdue' | 'failed' | 'refunded' | 'disputed' | 'canceled' | 'processing' | 'pending_confirmation';
4
+ export type InstallmentStatus = 'scheduled' | 'paid' | 'payment_due' | 'overdue' | 'failed' | 'refunded' | 'partially_refunded' | 'disputed' | 'canceled' | 'processing' | 'pending_confirmation';
5
5
  export type ScheduledInstallment = {
6
6
  id: string;
7
+ name?: string | null;
7
8
  dueDate: string;
8
9
  amount: number;
9
10
  status?: InstallmentStatus | (string & {});
11
+ /**
12
+ * When the installment was actually paid: a calendar date (`YYYY-MM-DD`)
13
+ * or an ISO timestamp (shown in the viewer's timezone). Named after the
14
+ * field the commitments API already returns for this, so installments
15
+ * passed straight through from the API carry it without any mapping.
16
+ * `InstallmentTable` shows it on rows whose payment happened (`paid`,
17
+ * `partially_refunded`, `refunded`) and on no other status; omit it to
18
+ * show none.
19
+ */
20
+ fulfilledAt?: string | null;
21
+ /**
22
+ * FR-1422 — how much of the installment was refunded, in the same units as
23
+ * `amount` (a major-unit number: `50` is $50.00). `InstallmentTable`
24
+ * formats it with its own `currency` and `locale` and shows it as
25
+ * "Refunded $50.00" under the amount of a `partially_refunded` row.
26
+ *
27
+ * Ignored on every other status: a `refunded` row gave the whole amount
28
+ * back, so its amount and badge already say it. Also ignored when missing,
29
+ * zero or negative, so a row never reads "Refunded $0.00".
30
+ */
31
+ refundedAmount?: number | null;
10
32
  };
11
33
  export type AutomaticScheduleSettings = {
12
34
  numberOfInstallments: number;
@@ -16,11 +38,13 @@ export type AutomaticScheduleSettings = {
16
38
  export type InstallmentScheduleInput = keyof AutomaticScheduleSettings | 'dayOfMonth';
17
39
  export type InstallmentScheduleLabels = {
18
40
  title?: string;
41
+ saved?: string;
19
42
  automaticMode?: string;
20
43
  manualMode?: string;
21
44
  createInstallments?: string;
22
45
  generateSchedule?: string;
23
46
  saveInstallments?: string;
47
+ cancelEdit?: string;
24
48
  addInstallment?: string;
25
49
  emptyAutomatic?: string;
26
50
  emptyManual?: string;
@@ -45,6 +69,8 @@ export type InstallmentScheduleLabels = {
45
69
  totalIncreaseConfirmationCancel?: string;
46
70
  totalIncreaseConfirmationConfirm?: string;
47
71
  dateOrderError?: string;
72
+ /** Inline error on a manual row whose payment date was cleared or left incomplete. */
73
+ dueDateRequiredError?: string;
48
74
  amountGreaterThanZeroError?: string;
49
75
  };
50
76
  export type InstallmentScheduleClassNames = {
@@ -90,20 +116,35 @@ export type InstallmentScheduleProps = {
90
116
  labels?: InstallmentScheduleLabels;
91
117
  classNames?: InstallmentScheduleClassNames;
92
118
  isSaving?: boolean;
119
+ showSavedIndicator?: boolean;
93
120
  isModeSwitchDisabled?: boolean;
94
121
  onModeChange?: (mode: InstallmentScheduleMode) => void;
95
122
  onAutomaticSettingsChange: (settings: AutomaticScheduleSettings) => void;
96
123
  onInstallmentsChange: (installments: ScheduledInstallment[]) => void;
97
124
  onSave?: () => void;
125
+ onCancel?: () => void;
98
126
  };
99
127
  export type InstallmentTableLabels = {
100
128
  title?: string;
129
+ saved?: string;
101
130
  searchLabel?: string;
102
131
  searchPlaceholder?: string;
103
132
  editInstallments?: string;
104
133
  installmentId?: string;
105
134
  amount?: string;
106
135
  scheduledDate?: string;
136
+ /**
137
+ * Prefix of the paid date shown under the scheduled date of a row whose
138
+ * payment happened: "Paid on Jun 3, 2026".
139
+ */
140
+ paidOn?: string;
141
+ /** FR-1422 — text of the `partially_refunded` status badge. Defaults to "Partially refunded". */
142
+ partiallyRefunded?: string;
143
+ /**
144
+ * FR-1422 — prefix of the refunded amount shown under the amount of a
145
+ * `partially_refunded` row: "Refunded $50.00". Defaults to "Refunded".
146
+ */
147
+ refundedAmount?: string;
107
148
  status?: string;
108
149
  actions?: string;
109
150
  payNow?: string;
@@ -133,10 +174,12 @@ export type InstallmentTableProps = {
133
174
  /**
134
175
  * FR-1619 — statuses for which the Pay Now button is NOT rendered on a row.
135
176
  * Typed with the `InstallmentStatus` union so consumers get compile-time
136
- * safety on status keys. The pre-existing `paid` disabled guard still
137
- * applies to any Pay Now button that IS rendered. Defaults to `[]`.
177
+ * safety on status keys. A Pay Now button that IS rendered is still
178
+ * disabled on a row whose payment already happened (`paid`,
179
+ * `partially_refunded`, `refunded`). Defaults to `[]`.
138
180
  */
139
181
  payNowHiddenStatuses?: InstallmentStatus[];
182
+ showSavedIndicator?: boolean;
140
183
  labels?: InstallmentTableLabels;
141
184
  isSaving?: boolean;
142
185
  onEditInstallments: () => void;
@@ -1,6 +1,21 @@
1
1
  import { AutomaticScheduleSettings, ScheduledInstallment } from './types';
2
2
  export declare function generateAutomaticInstallments(donationAmount: number, settings: AutomaticScheduleSettings): ScheduledInstallment[];
3
3
  export declare function getInvalidDateRowIds(installments: ScheduledInstallment[]): Set<string>;
4
+ export type ManualRowErrors = {
5
+ /** Rows with no due date: the date picker reports a cleared or incomplete date as `''`. */
6
+ missingDateRows: Set<string>;
7
+ /** Rows dated after the next row. */
8
+ invalidDateRows: Set<string>;
9
+ /** Rows whose amount is not greater than zero. */
10
+ invalidAmountRows: Set<string>;
11
+ };
12
+ /**
13
+ * Every inline error a manual schedule can show, computed once so the rows
14
+ * that render the messages and the Save button that must refuse them can
15
+ * never disagree.
16
+ */
17
+ export declare function getManualRowErrors(installments: ScheduledInstallment[]): ManualRowErrors;
18
+ export declare function hasManualRowErrors(errors: ManualRowErrors): boolean;
4
19
  /**
5
20
  * Re-dates installment #1 without touching the rest of the schedule.
6
21
  *
@@ -13,3 +28,9 @@ export declare function getInvalidDateRowIds(installments: ScheduledInstallment[
13
28
  * where the generator put it.
14
29
  */
15
30
  export declare function applyFirstInstallmentDateOverride(installments: ScheduledInstallment[], firstInstallmentDateOverride?: string): ScheduledInstallment[];
31
+ /**
32
+ * Whether the installment's payment already happened: it was paid, and may
33
+ * since have been refunded in part or in full. Such a row is a record of money
34
+ * that moved, so it cannot be paid again, edited or deleted.
35
+ */
36
+ export declare function isSettledInstallment(status: ScheduledInstallment['status']): boolean;
@@ -6,6 +6,7 @@ export interface KeyValueChipProps {
6
6
  value: React.ReactNode;
7
7
  /** Chip size. `'sm'` (default) for dense tables, `'md'` for detail panels. */
8
8
  size?: 'sm' | 'md';
9
+ variant?: 'default' | 'record';
9
10
  className?: string;
10
11
  'data-testid'?: string;
11
12
  }
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ export interface KeyValueRow {
3
+ id?: string;
4
+ label: React.ReactNode;
5
+ value: React.ReactNode;
6
+ }
7
+ export type KeyValueRowsDensity = 'regular' | 'compact';
8
+ export interface KeyValueRowsProps {
9
+ rows: KeyValueRow[];
10
+ density?: KeyValueRowsDensity;
11
+ 'data-testid'?: string;
12
+ }
13
+ export declare const KeyValueRows: React.FC<KeyValueRowsProps>;
@@ -0,0 +1,2 @@
1
+ export { KeyValueRows } from './KeyValueRows';
2
+ export type { KeyValueRowsProps, KeyValueRow, KeyValueRowsDensity } from './KeyValueRows';