@veevarts/design-system 2.0.0-alpha.6 → 2.0.0-alpha.60

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 (277) hide show
  1. package/README.md +82 -0
  2. package/dist/assistant.cjs +1 -0
  3. package/dist/assistant.d.ts +10 -0
  4. package/dist/assistant.js +790 -0
  5. package/dist/components/DatePicker/DatePicker.d.ts +9 -2
  6. package/dist/components/DatePicker/defaults.d.ts +28 -0
  7. package/dist/components/DatePicker/index.d.ts +1 -0
  8. package/dist/components/Drawer/Drawer.d.ts +17 -0
  9. package/dist/components/Drawer/index.d.ts +2 -0
  10. package/dist/components/Modal/CloseButton.d.ts +18 -0
  11. package/dist/components/Modal/Modal.d.ts +15 -0
  12. package/dist/components/Modal/index.d.ts +2 -0
  13. package/dist/components/Modal/useLabelledCloseButton.d.ts +13 -0
  14. package/dist/components/Select/Select.d.ts +10 -0
  15. package/dist/components/Skeleton/Skeleton.d.ts +37 -0
  16. package/dist/components/Skeleton/index.d.ts +2 -0
  17. package/dist/components/Table/Table.d.ts +7 -0
  18. package/dist/components/Table/index.d.ts +2 -0
  19. package/dist/components/index.d.ts +9 -1
  20. package/dist/hasContent-BCRxiry-.js +1200 -0
  21. package/dist/hasContent-JfCtoDIu.cjs +1 -0
  22. package/dist/index.cjs +9 -9
  23. package/dist/index.d.ts +6 -0
  24. package/dist/index.js +10761 -6895
  25. package/dist/patterns/ActivityTimeline/ActivityTimeline.d.ts +3 -0
  26. package/dist/patterns/ActivityTimeline/index.d.ts +2 -0
  27. package/dist/patterns/ActivityTimeline/styles.d.ts +15 -0
  28. package/dist/patterns/ActivityTimeline/types.d.ts +15 -0
  29. package/dist/patterns/AdminTable/AdminTable.d.ts +1 -0
  30. package/dist/patterns/AdminTable/styles.d.ts +8 -1
  31. package/dist/patterns/AdminTextField/AdminTextField.d.ts +4 -44
  32. package/dist/patterns/AdminTextField/index.d.ts +2 -2
  33. package/dist/patterns/AdminTextField/styles.d.ts +29 -0
  34. package/dist/patterns/AdminTextField/types.d.ts +78 -0
  35. package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +13 -2
  36. package/dist/patterns/AdminToolbar/index.d.ts +1 -0
  37. package/dist/patterns/AdminToolbar/styles.d.ts +49 -0
  38. package/dist/patterns/AdminToolbar/types.d.ts +2 -0
  39. package/dist/patterns/AmountList/AmountList.d.ts +3 -0
  40. package/dist/patterns/AmountList/index.d.ts +2 -0
  41. package/dist/patterns/AmountList/styles.d.ts +23 -0
  42. package/dist/patterns/AmountList/types.d.ts +26 -0
  43. package/dist/patterns/AssistantActivity/AssistantActivity.d.ts +15 -0
  44. package/dist/patterns/AssistantActivity/formatAssistantDuration.d.ts +10 -0
  45. package/dist/patterns/AssistantActivity/index.d.ts +3 -0
  46. package/dist/patterns/AssistantActivity/styles.d.ts +31 -0
  47. package/dist/patterns/AssistantActivity/types.d.ts +42 -0
  48. package/dist/patterns/AssistantComposer/AssistantComposer.d.ts +15 -0
  49. package/dist/patterns/AssistantComposer/index.d.ts +2 -0
  50. package/dist/patterns/AssistantComposer/styles.d.ts +33 -0
  51. package/dist/patterns/AssistantComposer/types.d.ts +62 -0
  52. package/dist/patterns/AssistantMessage/AssistantMessage.d.ts +17 -0
  53. package/dist/patterns/AssistantMessage/index.d.ts +2 -0
  54. package/dist/patterns/AssistantMessage/styles.d.ts +45 -0
  55. package/dist/patterns/AssistantMessage/types.d.ts +84 -0
  56. package/dist/patterns/AssistantNotice/AssistantNotice.d.ts +18 -0
  57. package/dist/patterns/AssistantNotice/index.d.ts +2 -0
  58. package/dist/patterns/AssistantNotice/styles.d.ts +49 -0
  59. package/dist/patterns/AssistantNotice/types.d.ts +58 -0
  60. package/dist/patterns/CardList/CardList.d.ts +3 -0
  61. package/dist/patterns/CardList/index.d.ts +2 -0
  62. package/dist/patterns/CardList/styles.d.ts +20 -0
  63. package/dist/patterns/CardList/types.d.ts +20 -0
  64. package/dist/patterns/CardStack/CardStack.d.ts +7 -0
  65. package/dist/patterns/CardStack/index.d.ts +2 -0
  66. package/dist/patterns/CardStack/styles.d.ts +2 -0
  67. package/dist/patterns/CashTenderForm/types.d.ts +6 -0
  68. package/dist/patterns/CellText/CellText.d.ts +16 -0
  69. package/dist/patterns/CellText/index.d.ts +2 -0
  70. package/dist/patterns/CellText/styles.d.ts +7 -0
  71. package/dist/patterns/DiscardGuard/DiscardGuard.d.ts +23 -0
  72. package/dist/patterns/DiscardGuard/context.d.ts +25 -0
  73. package/dist/patterns/DiscardGuard/index.d.ts +6 -0
  74. package/dist/patterns/DiscardGuard/useDiscardGuard.d.ts +38 -0
  75. package/dist/patterns/DonationAmounts/index.d.ts +1 -1
  76. package/dist/patterns/DonationAmounts/styles.d.ts +51 -0
  77. package/dist/patterns/DonationAmounts/types.d.ts +79 -1
  78. package/dist/patterns/DonationAmounts/utils/currency.d.ts +23 -3
  79. package/dist/patterns/EntityRow/EntityList.d.ts +15 -0
  80. package/dist/patterns/EntityRow/EntityRow.d.ts +3 -0
  81. package/dist/patterns/EntityRow/context.d.ts +2 -0
  82. package/dist/patterns/EntityRow/icons.d.ts +3 -0
  83. package/dist/patterns/EntityRow/index.d.ts +3 -0
  84. package/dist/patterns/EntityRow/initials.d.ts +6 -0
  85. package/dist/patterns/EntityRow/styles.d.ts +74 -0
  86. package/dist/patterns/EntityRow/types.d.ts +125 -0
  87. package/dist/patterns/ExpandableTable/ExpandableTable.d.ts +6 -0
  88. package/dist/patterns/ExpandableTable/index.d.ts +2 -0
  89. package/dist/patterns/ExpandableTable/styles.d.ts +43 -0
  90. package/dist/patterns/ExpandableTable/types.d.ts +99 -0
  91. package/dist/patterns/FeedbackState/FeedbackState.d.ts +1 -1
  92. package/dist/patterns/FeedbackState/type.d.ts +11 -1
  93. package/dist/patterns/FilterSelect/FilterSelect.d.ts +3 -0
  94. package/dist/patterns/FilterSelect/FilterSelectGroup.d.ts +3 -0
  95. package/dist/patterns/FilterSelect/index.d.ts +3 -0
  96. package/dist/patterns/FilterSelect/styles.d.ts +17 -0
  97. package/dist/patterns/FilterSelect/types.d.ts +19 -0
  98. package/dist/patterns/InlineConfirm/InlineConfirm.d.ts +38 -0
  99. package/dist/patterns/InlineConfirm/index.d.ts +2 -0
  100. package/dist/patterns/InlineConfirm/styles.d.ts +16 -0
  101. package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +1 -1
  102. package/dist/patterns/InstallmentFundAssignment/types.d.ts +3 -0
  103. package/dist/patterns/InstallmentSchedule/InstallmentSchedule.d.ts +1 -1
  104. package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +1 -1
  105. package/dist/patterns/InstallmentSchedule/index.d.ts +1 -1
  106. package/dist/patterns/InstallmentSchedule/types.d.ts +62 -3
  107. package/dist/patterns/InstallmentSchedule/utils.d.ts +33 -0
  108. package/dist/patterns/KeyValueChip/KeyValueChip.d.ts +1 -0
  109. package/dist/patterns/KeyValueRows/KeyValueRows.d.ts +13 -0
  110. package/dist/patterns/KeyValueRows/index.d.ts +2 -0
  111. package/dist/patterns/KeyValueRows/styles.d.ts +8 -0
  112. package/dist/patterns/LineItemRows/LineItemRows.d.ts +17 -0
  113. package/dist/patterns/LineItemRows/index.d.ts +2 -0
  114. package/dist/patterns/LineItemRows/styles.d.ts +13 -0
  115. package/dist/patterns/ListPanel/ListPanel.d.ts +2 -0
  116. package/dist/patterns/LoadMoreFooter/LoadMoreFooter.d.ts +3 -0
  117. package/dist/patterns/LoadMoreFooter/index.d.ts +2 -0
  118. package/dist/patterns/LoadMoreFooter/styles.d.ts +7 -0
  119. package/dist/patterns/LoadMoreFooter/types.d.ts +10 -0
  120. package/dist/patterns/MetaCard/types.d.ts +2 -0
  121. package/dist/patterns/ModalPanels/ModalPanels.d.ts +35 -0
  122. package/dist/patterns/ModalPanels/context.d.ts +20 -0
  123. package/dist/patterns/ModalPanels/focus.d.ts +44 -0
  124. package/dist/patterns/ModalPanels/index.d.ts +6 -0
  125. package/dist/patterns/ModalPanels/styles.d.ts +13 -0
  126. package/dist/patterns/ModalPanels/useModalPanels.d.ts +30 -0
  127. package/dist/patterns/NeedsFixDot/NeedsFixDot.d.ts +16 -0
  128. package/dist/patterns/NeedsFixDot/firstNeedsFixKey.d.ts +18 -0
  129. package/dist/patterns/NeedsFixDot/index.d.ts +4 -0
  130. package/dist/patterns/NeedsFixDot/styles.d.ts +20 -0
  131. package/dist/patterns/Notice/Notice.d.ts +16 -0
  132. package/dist/patterns/Notice/index.d.ts +2 -0
  133. package/dist/patterns/Notice/styles.d.ts +35 -0
  134. package/dist/patterns/Notice/type.d.ts +39 -0
  135. package/dist/patterns/OutcomeView/index.d.ts +1 -1
  136. package/dist/patterns/OutcomeView/types.d.ts +110 -3
  137. package/dist/patterns/PageHeader/PageHeader.d.ts +1 -0
  138. package/dist/patterns/PaginationSummary/PaginationSummary.d.ts +12 -0
  139. package/dist/patterns/PaginationSummary/index.d.ts +1 -1
  140. package/dist/patterns/PaymentSubAmountInput/PaymentSubAmountInput.d.ts +2 -0
  141. package/dist/patterns/PillTabs/PillTabs.d.ts +3 -0
  142. package/dist/patterns/PillTabs/ids.d.ts +9 -0
  143. package/dist/patterns/PillTabs/index.d.ts +3 -0
  144. package/dist/patterns/PillTabs/styles.d.ts +20 -0
  145. package/dist/patterns/PillTabs/types.d.ts +21 -0
  146. package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/type.d.ts +1 -1
  147. package/dist/patterns/{EventDetails → Programs/EventDetails}/EventDetails.d.ts +3 -1
  148. package/dist/patterns/{OfferCard → Programs/OfferCard}/OfferCard.d.ts +1 -1
  149. package/dist/patterns/{OfferCard → Programs/OfferCard}/types.d.ts +7 -0
  150. package/dist/patterns/Programs/ProgramListItem/ProgramListItem.d.ts +17 -0
  151. package/dist/patterns/Programs/ProgramListItem/index.d.ts +2 -0
  152. package/dist/patterns/Programs/index.d.ts +5 -0
  153. package/dist/patterns/ReasonSelect/types.d.ts +1 -0
  154. package/dist/patterns/RecordCard/RecordCard.d.ts +3 -0
  155. package/dist/patterns/RecordCard/index.d.ts +2 -0
  156. package/dist/patterns/RecordCard/styles.d.ts +16 -0
  157. package/dist/patterns/RecordCard/types.d.ts +22 -0
  158. package/dist/patterns/RecordHeader/RecordHeader.d.ts +3 -0
  159. package/dist/patterns/RecordHeader/index.d.ts +2 -0
  160. package/dist/patterns/RecordHeader/styles.d.ts +43 -0
  161. package/dist/patterns/RecordHeader/types.d.ts +30 -0
  162. package/dist/patterns/RecordLayout/RecordLayout.d.ts +3 -0
  163. package/dist/patterns/RecordLayout/index.d.ts +2 -0
  164. package/dist/patterns/RecordLayout/styles.d.ts +8 -0
  165. package/dist/patterns/RecordLayout/types.d.ts +6 -0
  166. package/dist/patterns/RecordTotals/RecordTotals.d.ts +19 -0
  167. package/dist/patterns/RecordTotals/index.d.ts +2 -0
  168. package/dist/patterns/RecordTotals/styles.d.ts +19 -0
  169. package/dist/patterns/RefundMethodCards/RefundMethodCards.d.ts +4 -0
  170. package/dist/patterns/RefundMethodCards/index.d.ts +2 -0
  171. package/dist/patterns/RefundMethodCards/styles.d.ts +59 -0
  172. package/dist/patterns/RefundMethodCards/types.d.ts +72 -0
  173. package/dist/patterns/RefundProgressList/RefundProgressList.d.ts +4 -0
  174. package/dist/patterns/RefundProgressList/index.d.ts +2 -0
  175. package/dist/patterns/RefundProgressList/styles.d.ts +44 -0
  176. package/dist/patterns/RefundProgressList/types.d.ts +37 -0
  177. package/dist/patterns/RelatedRecordList/RelatedRecordList.d.ts +3 -0
  178. package/dist/patterns/RelatedRecordList/index.d.ts +2 -0
  179. package/dist/patterns/RelatedRecordList/styles.d.ts +19 -0
  180. package/dist/patterns/RelatedRecordList/types.d.ts +17 -0
  181. package/dist/patterns/ScrollToLatest/ScrollToLatest.d.ts +18 -0
  182. package/dist/patterns/ScrollToLatest/index.d.ts +2 -0
  183. package/dist/patterns/ScrollToLatest/styles.d.ts +11 -0
  184. package/dist/patterns/ScrollToLatest/types.d.ts +36 -0
  185. package/dist/patterns/SessionExpiredCard/SessionExpiredCard.d.ts +14 -0
  186. package/dist/patterns/SessionExpiredCard/index.d.ts +2 -0
  187. package/dist/patterns/SessionExpiredCard/type.d.ts +6 -0
  188. package/dist/patterns/SplitPaymentSummary/index.d.ts +1 -1
  189. package/dist/patterns/SplitPaymentSummary/types.d.ts +18 -0
  190. package/dist/patterns/StatTiles/StatTiles.d.ts +3 -0
  191. package/dist/patterns/StatTiles/index.d.ts +2 -0
  192. package/dist/patterns/StatTiles/styles.d.ts +8 -0
  193. package/dist/patterns/StatTiles/types.d.ts +12 -0
  194. package/dist/patterns/StatusChip/StatusChip.d.ts +3 -3
  195. package/dist/patterns/StepProgress/StepProgress.d.ts +4 -0
  196. package/dist/patterns/StepProgress/index.d.ts +2 -0
  197. package/dist/patterns/StepProgress/styles.d.ts +29 -0
  198. package/dist/patterns/StepProgress/types.d.ts +43 -0
  199. package/dist/patterns/Summary/components/ActionBar.d.ts +2 -0
  200. package/dist/patterns/Summary/components/GrandTotalRow.d.ts +1 -0
  201. package/dist/patterns/Summary/components/ItemRow.d.ts +1 -0
  202. package/dist/patterns/Summary/components/SummaryBody.d.ts +4 -1
  203. package/dist/patterns/Summary/components/TotalsLineRow.d.ts +3 -2
  204. package/dist/patterns/Summary/types.d.ts +51 -9
  205. package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +1 -0
  206. package/dist/patterns/TileSelect/TileSelect.d.ts +2 -37
  207. package/dist/patterns/TileSelect/index.d.ts +1 -1
  208. package/dist/patterns/TileSelect/styles.d.ts +56 -0
  209. package/dist/patterns/TileSelect/types.d.ts +140 -0
  210. package/dist/patterns/TimeField/TimeField.d.ts +6 -0
  211. package/dist/patterns/TimeField/index.d.ts +3 -0
  212. package/dist/patterns/TimeField/time.d.ts +40 -0
  213. package/dist/patterns/TimeField/types.d.ts +77 -0
  214. package/dist/patterns/ToolbarButton/ToolbarButton.d.ts +2 -0
  215. package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +40 -1
  216. package/dist/patterns/UnderlineTabs/index.d.ts +1 -1
  217. package/dist/patterns/UnderlineTabs/styles.d.ts +21 -0
  218. package/dist/patterns/VerticalSteps/StepPager.d.ts +6 -0
  219. package/dist/patterns/VerticalSteps/StepsReadiness.d.ts +15 -0
  220. package/dist/patterns/VerticalSteps/VerticalSteps.d.ts +6 -0
  221. package/dist/patterns/VerticalSteps/index.d.ts +4 -0
  222. package/dist/patterns/VerticalSteps/styles.d.ts +54 -0
  223. package/dist/patterns/VerticalSteps/types.d.ts +100 -0
  224. package/dist/patterns/WizardShell/index.d.ts +1 -1
  225. package/dist/patterns/WizardShell/types.d.ts +9 -1
  226. package/dist/patterns/grid-columns.d.ts +1 -1
  227. package/dist/patterns/index.d.ts +79 -19
  228. package/dist/patterns/shared/hasContent.d.ts +2 -0
  229. package/dist/patterns/shared/index.d.ts +1 -0
  230. package/dist/patterns/shared/motion.d.ts +6 -0
  231. package/dist/patterns/shared/recordTone.d.ts +9 -0
  232. package/dist/patterns/shared/rem.d.ts +4 -0
  233. package/dist/patterns/shared/useContainerWidth.d.ts +6 -0
  234. package/dist/patterns/shared/useDecimalDraft.d.ts +33 -0
  235. package/dist/patterns/shared/usePrefillEdits.d.ts +7 -0
  236. package/dist/providers/DensityProvider.d.ts +7 -0
  237. package/dist/providers/HeroUIProvider.d.ts +20 -1
  238. package/dist/providers/ToastProvider.d.ts +21 -0
  239. package/dist/providers/close-label-context.d.ts +18 -0
  240. package/dist/providers/density.d.ts +17 -0
  241. package/dist/providers/index.d.ts +6 -0
  242. package/dist/tailwind/index.cjs +107 -5
  243. package/dist/tailwind/index.d.ts +61 -0
  244. package/dist/tailwind/index.mjs +104 -5
  245. package/dist/test/ReducedMotion.d.ts +4 -0
  246. package/dist/test/RootFontSize.d.ts +5 -0
  247. package/dist/test/backdrop.d.ts +12 -0
  248. package/dist/test/container-width.d.ts +14 -0
  249. package/dist/test/contrast.d.ts +1 -0
  250. package/dist/test/px-class-names.d.ts +1 -0
  251. package/dist/test/px-classes.d.ts +3 -0
  252. package/dist/test/reducedMotionCss.d.ts +40 -0
  253. package/dist/test/root-font-size.d.ts +8 -0
  254. package/dist/tokens/assistant-surface.d.ts +66 -0
  255. package/dist/tokens/index.d.ts +2 -0
  256. package/dist/tokens/pos-surface.d.ts +23 -4
  257. package/package.json +22 -3
  258. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/CatalogItemCard.d.ts +0 -0
  259. /package/dist/patterns/{CatalogItemCard → Programs/CatalogItemCard}/index.d.ts +0 -0
  260. /package/dist/patterns/{EventDetails → Programs/EventDetails}/index.d.ts +0 -0
  261. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/CustomQuantitySelectorExample.d.ts +0 -0
  262. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithEurosCurrencyExample.d.ts +0 -0
  263. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/ListWithoutAnimationExample.d.ts +0 -0
  264. /package/dist/patterns/{OfferCard → Programs/OfferCard}/examples/index.d.ts +0 -0
  265. /package/dist/patterns/{OfferCard → Programs/OfferCard}/index.d.ts +0 -0
  266. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/animations.d.ts +0 -0
  267. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/currency.d.ts +0 -0
  268. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/index.d.ts +0 -0
  269. /package/dist/patterns/{OfferCard → Programs/OfferCard}/utils/offers.d.ts +0 -0
  270. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardEmpty.d.ts +0 -0
  271. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardError.d.ts +0 -0
  272. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardList.d.ts +0 -0
  273. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/OfferCardSkeleton.d.ts +0 -0
  274. /package/dist/patterns/{OfferCard → Programs/OfferCard}/variants/index.d.ts +0 -0
  275. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/SessionTimeline.d.ts +0 -0
  276. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/index.d.ts +0 -0
  277. /package/dist/patterns/{SessionTimeline → Programs/SessionTimeline}/type.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ActivityTimelineProps } from './types';
3
+ export declare const ActivityTimeline: React.FC<ActivityTimelineProps>;
@@ -0,0 +1,2 @@
1
+ export { ActivityTimeline } from './ActivityTimeline';
2
+ export type { ActivityTimelineProps, ActivityTimelineEvent } from './types';
@@ -0,0 +1,15 @@
1
+ export declare const activityTimelineClass: {
2
+ readonly list: "m-0 list-none p-0 pl-0.5";
3
+ readonly event: "flex gap-3.5";
4
+ readonly eventSpaced: "pb-4";
5
+ readonly rail: "flex flex-none flex-col items-center";
6
+ readonly dot: "mt-[0.3125rem] size-2.5 rounded-full";
7
+ readonly connector: "mt-1 w-[1.5px] flex-1 bg-pos-hair";
8
+ readonly body: "min-w-0 flex-1 pb-0.5";
9
+ readonly head: "flex min-w-0 flex-wrap items-baseline gap-x-3";
10
+ readonly title: "min-w-0 text-[0.90625rem] font-semibold text-default-900 [overflow-wrap:anywhere]";
11
+ readonly timestamp: "ml-auto min-w-0 max-w-full text-[0.8125rem] tabular-nums text-default-500 [overflow-wrap:anywhere]";
12
+ readonly detail: "mt-[0.1875rem] min-w-0 text-[0.84375rem] leading-[1.5] text-default-500 [overflow-wrap:anywhere]";
13
+ readonly actor: "mt-[0.1875rem] min-w-0 text-[0.78125rem] text-default-500 [overflow-wrap:anywhere]";
14
+ readonly empty: "text-[0.875rem] text-default-500";
15
+ };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { RecordTone } from '../shared/recordTone';
3
+ export interface ActivityTimelineEvent {
4
+ id: string;
5
+ tone: RecordTone;
6
+ title: ReactNode;
7
+ timestamp: ReactNode;
8
+ detail?: ReactNode;
9
+ actor?: ReactNode;
10
+ }
11
+ export interface ActivityTimelineProps {
12
+ events: ActivityTimelineEvent[];
13
+ emptyContent?: ReactNode;
14
+ 'data-testid'?: string;
15
+ }
@@ -35,6 +35,7 @@ export interface AdminTableProps {
35
35
  footer?: React.ReactNode;
36
36
  /** Accessible name. Required: a table with no name is unnavigable by screen reader. */
37
37
  ariaLabel: string;
38
+ variant?: 'default' | 'framed';
38
39
  className?: string;
39
40
  classNames?: AdminTableClassNames;
40
41
  'data-testid'?: string;
@@ -10,7 +10,8 @@
10
10
  *
11
11
  * They are exported for the one screen that cannot use `AdminTable`: react-aria's
12
12
  * collection API rejects an interleaved `<tr>`, so a table that expands a row
13
- * into a full-width panel renders its own `<table>` and dresses it with these.
13
+ * into a full-width panel renders its own `<table>` and dresses it with these
14
+ * (`ExpandableTable` does, and so does the accounting ledger).
14
15
  *
15
16
  * The arbitrary values (`text-[11px]`, `tracking-[.04em]`) are the mockups'
16
17
  * measurements, pinned rather than rounded to the nearest scale step: these
@@ -42,3 +43,9 @@ export declare const adminRowClass = "border-t border-acct-hair transition-color
42
43
  export declare const adminTableClass = "w-full";
43
44
  /** The strip under the table where a pager sits. */
44
45
  export declare const adminTableFooterClass = "border-t border-acct-border px-5 py-3.5";
46
+ export declare const adminTableFramedClass: {
47
+ readonly base: "overflow-x-auto";
48
+ readonly th: "h-auto whitespace-nowrap border-b border-pos-hair bg-transparent px-4 py-[0.875rem] text-left text-[0.6875rem] font-semibold uppercase leading-[1.5] tracking-[.055em] text-default-500 first:rounded-none last:rounded-none last:pr-3";
49
+ readonly tr: "border-t border-pos-hair transition-colors duration-[120ms] first:border-t-0 data-[focus-visible=true]:outline-offset-[-2px] [tbody>&]:hover:bg-default-50 [tbody>&]:data-[hover=true]:bg-default-50 motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
50
+ readonly td: "h-[3.875rem] px-4 data-[focus-visible=true]:outline-offset-[-2px] py-[0.625rem] align-middle text-[0.875rem] text-default-900 last:pr-3";
51
+ };
@@ -1,53 +1,13 @@
1
1
  import { default as React } from 'react';
2
+ import { AdminFieldLabelProps, AdminTextFieldProps } from './types';
2
3
  /**
3
4
  * The uppercase field label, standalone — for a control this component does
4
5
  * not cover (a checkbox group, a read-only preview) that should still be
5
6
  * captioned like every other admin field. `suffix` is the lighter tail:
6
7
  * "· optional", "· auto-generated, immutable".
7
- */
8
- export declare const AdminFieldLabel: React.FC<{
9
- children: React.ReactNode;
10
- suffix?: React.ReactNode;
11
- className?: string;
12
- 'data-testid'?: string;
13
- }>;
14
- interface AdminTextFieldBase {
15
- /** Uppercase label above the control. Omit only when an adjacent element already names it. */
16
- label?: React.ReactNode;
17
- /** Lighter annotation after the label (e.g. `· optional`). Ignored without a label. */
18
- labelSuffix?: React.ReactNode;
19
- value: string;
20
- placeholder?: string;
21
- disabled?: boolean;
22
- /** Monospace face without the read-only treatment, for codes the user types. */
23
- mono?: boolean;
24
- /** Claim initial focus. Only for the first field of a dialog, never on a page. */
25
- autoFocus?: boolean;
26
- /** Small helper or error text under the control. */
27
- hint?: React.ReactNode;
28
- /** Renders the hint as an error and marks the control invalid. */
29
- invalid?: boolean;
30
- className?: string;
31
- 'data-testid'?: string;
32
- }
33
- /**
34
- * `onChange` is REQUIRED unless the field is read-only.
35
- *
36
- * This is a controlled input: given a `value` and no handler, React pins it and
37
- * typing does nothing — a field that looks editable, accepts focus, and silently
38
- * discards every keystroke. That is indistinguishable from a bug at a glance,
39
- * and it is what happens by accident when someone renders one to show a value.
40
8
  *
41
- * Showing a value without accepting edits is a real case, so it stays possible;
42
- * it just has to be said, with `readOnly`, which also renders it as system-owned
43
- * and announces it correctly.
9
+ * `isRequired` adds a visible `*` and the screen-reader `requiredLabel`;
10
+ * `help` adds an ⓘ that opens it in a popover, kept outside the label text.
44
11
  */
45
- export type AdminTextFieldProps = AdminTextFieldBase & ({
46
- readOnly: true;
47
- onChange?: never;
48
- } | {
49
- readOnly?: false;
50
- onChange: (value: string) => void;
51
- });
12
+ export declare const AdminFieldLabel: React.FC<AdminFieldLabelProps>;
52
13
  export declare const AdminTextField: React.FC<AdminTextFieldProps>;
53
- export {};
@@ -1,3 +1,3 @@
1
1
  export { AdminFieldLabel, AdminTextField } from './AdminTextField';
2
- export type { AdminTextFieldProps } from './AdminTextField';
3
- export { adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelSuffixClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './styles';
2
+ export type { AdminTextFieldProps, AdminFieldLabelProps, AdminFieldRequiredProps, AdminFieldHelpProps } from './types';
3
+ export { adminFieldErrorClass, adminFieldHelpButtonClass, adminFieldHelpContentClass, adminFieldHelpIconClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelNoAutoMarkClass, adminFieldLabelRowClass, adminFieldLabelSuffixClass, adminFieldRequiredClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './styles';
@@ -22,6 +22,35 @@ export declare const adminFieldLabelClass = "text-[11px] font-semibold uppercase
22
22
  * aside, not as part of the field's name.
23
23
  */
24
24
  export declare const adminFieldLabelSuffixClass = "font-normal normal-case tracking-normal";
25
+ /**
26
+ * The visible `*` of a required field. `after:content-none` switches off the
27
+ * `*` HeroUI's own `isRequired` paints into its label slot, so there is one
28
+ * mark, the one carrying the screen-reader word.
29
+ */
30
+ export declare const adminFieldRequiredClass = "ms-0.5 text-acct-danger";
31
+ /**
32
+ * The label row a field with `help` draws itself, in place of HeroUI's.
33
+ * HeroUI pushes its box down by `font-size-small + 10px` (24px) to make room
34
+ * for its outside label; this row takes the same height from the same
35
+ * variable, so a field with help and one without line up in a form row.
36
+ * `min-h` rather than `h`, so a label that wraps grows the row instead of
37
+ * running into the box.
38
+ *
39
+ * `text-foreground` because that is the color HeroUI's label actually renders
40
+ * in above the box (`group-data-[filled-within=true]:text-foreground` beats
41
+ * the `text-acct-muted` it is given), measured at `rgb(17, 24, 28)`.
42
+ */
43
+ export declare const adminFieldLabelRowClass = "mb-0 min-h-[calc(var(--heroui-font-size-small)_+_10px)] text-foreground";
44
+ /** Added to HeroUI's `label` slot so its `isRequired` mark does not double ours. */
45
+ export declare const adminFieldLabelNoAutoMarkClass = "after:content-none";
46
+ /**
47
+ * The ⓘ that opens a field's help: a 24px round hit target (WCAG 2.5.8) whose
48
+ * negative margin keeps the 11px label row from growing to fit it.
49
+ */
50
+ export declare const adminFieldHelpButtonClass = "ms-0.5 -my-1.5 size-6 min-w-6 align-middle text-acct-sub data-[hover=true]:bg-acct-page data-[hover=true]:text-acct-ink";
51
+ export declare const adminFieldHelpIconClass = "size-4";
52
+ /** The popover the ⓘ opens. Body copy, so sentence case and ink. */
53
+ export declare const adminFieldHelpContentClass = "max-w-xs rounded-xl px-3 py-2 text-xs leading-normal text-acct-ink2";
25
54
  /**
26
55
  * The 38px box — HeroUI's `inputWrapper` slot, which carries the border and
27
56
  * background (the `input` slot is the bare field).
@@ -0,0 +1,78 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * The required mark. Plain optional props rather than a union that forces
4
+ * `requiredLabel` with `isRequired`: a union collapses under
5
+ * `Omit<AdminTextFieldProps, …>`, so every wrapper that forwards props would
6
+ * stop compiling.
7
+ */
8
+ export interface AdminFieldRequiredProps {
9
+ /** Adds a visible `*` after the label (and its suffix). */
10
+ isRequired?: boolean;
11
+ /**
12
+ * The word screen readers hear for the `*` ("required", "obligatoire").
13
+ * Pass it with `isRequired`: the `*` itself is hidden from them.
14
+ */
15
+ requiredLabel?: string;
16
+ }
17
+ /** Help on demand: an ⓘ button after the label that opens it in a popover. */
18
+ export interface AdminFieldHelpProps {
19
+ help?: React.ReactNode;
20
+ /** Accessible name of the ⓘ ("About timezone"). Without it the ⓘ is named by the label text. */
21
+ helpLabel?: string;
22
+ }
23
+ export interface AdminFieldLabelProps extends AdminFieldRequiredProps, AdminFieldHelpProps {
24
+ children: React.ReactNode;
25
+ /** The lighter tail: "· optional", "· auto-generated, immutable". */
26
+ suffix?: React.ReactNode;
27
+ /**
28
+ * `id` of the control this captions. The text then renders as a real
29
+ * `<label>`, so clicking it focuses the control. The ⓘ stays outside it.
30
+ */
31
+ htmlFor?: string;
32
+ /** `id` of the text element, for a group to point `aria-labelledby` at. */
33
+ id?: string;
34
+ className?: string;
35
+ 'data-testid'?: string;
36
+ }
37
+ export interface AdminTextFieldBase extends AdminFieldRequiredProps, AdminFieldHelpProps {
38
+ /** Uppercase label above the control. Omit only when an adjacent element already names it. */
39
+ label?: React.ReactNode;
40
+ /** Lighter annotation after the label (e.g. `· optional`). Ignored without a label. */
41
+ labelSuffix?: React.ReactNode;
42
+ value: string;
43
+ placeholder?: string;
44
+ disabled?: boolean;
45
+ /** Monospace face without the read-only treatment, for codes the user types. */
46
+ mono?: boolean;
47
+ /** Claim initial focus. Only for the first field of a dialog, never on a page. */
48
+ autoFocus?: boolean;
49
+ /** Small helper or error text under the control. */
50
+ hint?: React.ReactNode;
51
+ /** Renders the hint as an error and marks the control invalid. */
52
+ invalid?: boolean;
53
+ className?: string;
54
+ 'data-testid'?: string;
55
+ }
56
+ /**
57
+ * `onChange` is REQUIRED unless the field is read-only.
58
+ *
59
+ * This is a controlled input: given a `value` and no handler, React pins it and
60
+ * typing does nothing — a field that looks editable, accepts focus, and silently
61
+ * discards every keystroke. That is indistinguishable from a bug at a glance,
62
+ * and it is what happens by accident when someone renders one to show a value.
63
+ *
64
+ * Showing a value without accepting edits is a real case, so it stays possible;
65
+ * it just has to be said, with `readOnly`, which also renders it as system-owned
66
+ * and announces it correctly.
67
+ *
68
+ * `isRequired` / `help` behave as on {@link AdminFieldLabelProps}, and are
69
+ * ignored without a `label`. `isRequired` also marks the input
70
+ * `aria-required`, without the browser's own `required` validation.
71
+ */
72
+ export type AdminTextFieldProps = AdminTextFieldBase & ({
73
+ readOnly: true;
74
+ onChange?: never;
75
+ } | {
76
+ readOnly?: false;
77
+ onChange: (value: string) => void;
78
+ });
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { AdminToolbarSearchWidth, AdminToolbarSize } from './types';
2
3
  export interface AdminToolbarProps {
3
4
  searchValue: string;
4
5
  onSearchChange: (value: string) => void;
@@ -8,12 +9,22 @@ export interface AdminToolbarProps {
8
9
  searchPlaceholder?: string;
9
10
  /** Leading glyph inside the search box. */
10
11
  searchIcon?: React.ReactNode;
12
+ /** Shows a clear button inside the search box while it holds text. Off by default. */
13
+ searchClearable?: boolean;
14
+ /** The clear button's accessible name. `'Clear search'` by default; pass a translation. */
15
+ clearLabel?: string;
11
16
  /** Filters, sort pickers, a toggle — laid out after the search box. */
12
17
  children?: React.ReactNode;
13
18
  /** Pushed to the far right, for a primary action. */
14
19
  trailing?: React.ReactNode;
15
- /** Search box width. `'md'` (280px) by default, `'lg'` (360px) for wide tables. */
16
- searchWidth?: 'md' | 'lg';
20
+ /**
21
+ * Search box width. `'md'` (280px; 250px framed) by default, `'lg'` (360px)
22
+ * for wide tables, `'fill'` to grow into the space the row leaves.
23
+ */
24
+ searchWidth?: AdminToolbarSearchWidth;
25
+ /** `'lg'` is the 48px touch field with 16px text; `'md'` (default) keeps each variant's own height. */
26
+ size?: AdminToolbarSize;
27
+ variant?: 'default' | 'framed';
17
28
  className?: string;
18
29
  'data-testid'?: string;
19
30
  }
@@ -1,2 +1,3 @@
1
1
  export { AdminToolbar } from './AdminToolbar';
2
2
  export type { AdminToolbarProps } from './AdminToolbar';
3
+ export type { AdminToolbarSearchWidth, AdminToolbarSize } from './types';
@@ -0,0 +1,49 @@
1
+ import { AdminToolbarSearchWidth, AdminToolbarSize } from './types';
2
+ /** The default variant: a pixel-port of the accounting mockups, so its values stay in px. */
3
+ export declare const DEFAULT_CLASS: {
4
+ readonly base: "flex flex-wrap items-center gap-3 mb-4";
5
+ readonly trailing: "ml-auto";
6
+ readonly icon: "flex text-acct-muted";
7
+ readonly inputWrapper: string;
8
+ readonly input: "text-[13.5px] text-acct-ink";
9
+ };
10
+ export declare const DEFAULT_SEARCH_WIDTH: Record<AdminToolbarSearchWidth, string>;
11
+ export declare const FRAMED_WIDE_REM = 48;
12
+ export declare const FRAMED_CLASS: {
13
+ readonly base: "flex flex-wrap items-center gap-2.5 border-b border-pos-hair px-4 py-[0.875rem]";
14
+ readonly narrow: "[&_[data-slot=filter-select-group]]:flex [&_[data-slot=filter-select-group]]:flex-wrap [&_[data-slot=filter-select-group]]:!max-w-none [&_[data-slot=filter-select]]:!max-w-none [&_[data-slot=filter-select]]:!min-w-[calc(50%-0.3125rem)] [&_[data-slot=filter-select]]:grow [&_[data-slot=filter-select]]:basis-[calc(50%-0.3125rem)]";
15
+ readonly searchWide: "ml-auto";
16
+ /** Fill wins over the narrow rule: it already takes the row, and keeps a trailing action beside it until 12.5rem. */
17
+ readonly searchFill: "min-w-[12.5rem] flex-1";
18
+ readonly searchNarrow: "basis-full";
19
+ readonly inputBaseNarrow: "w-full";
20
+ readonly inputWrapper: "h-[2.375rem] min-h-[2.375rem] !h-[2.375rem] rounded-[0.625rem] border border-pos-field bg-white pl-3 pr-3 shadow-none data-[hover=true]:border-pos-field group-data-[focus=true]:border-primary";
21
+ readonly innerWrapper: "gap-[0.3125rem]";
22
+ readonly input: "text-ellipsis text-[0.875rem] text-default-900 data-[has-start-content=true]:ps-0.5";
23
+ readonly icon: "flex text-default-400 [&_svg]:size-4";
24
+ };
25
+ export declare const FRAMED_SEARCH_WIDTH: Record<AdminToolbarSearchWidth, string>;
26
+ /**
27
+ * `lg` is the POS register's touch row: a 48px field with 16px text and a 20px
28
+ * glyph, in rem so the text-size setting scales it. Merged after either
29
+ * variant's own classes, so it overrides their height and type only.
30
+ */
31
+ export declare const LG_CLASS: {
32
+ readonly inputWrapper: "h-12 min-h-12 !h-12";
33
+ readonly input: "text-base";
34
+ readonly icon: "[&_svg]:size-5";
35
+ };
36
+ /**
37
+ * The clear control: a DS `Button`, so it is in the tab order and takes a
38
+ * translated name, unlike HeroUI's `isClearable` (tabIndex -1, English label).
39
+ * 32px inside the 38–40px fields, 44px inside the 48px one.
40
+ */
41
+ export declare const CLEAR_CLASS: {
42
+ readonly button: "shrink-0 text-default-500";
43
+ /** The browser's own search "x" would sit beside ours. */
44
+ readonly input: "[&::-webkit-search-cancel-button]:appearance-none";
45
+ };
46
+ export declare const CLEAR_SIZE_CLASS: Record<AdminToolbarSize, {
47
+ button: string;
48
+ icon: string;
49
+ }>;
@@ -0,0 +1,2 @@
1
+ export type AdminToolbarSearchWidth = 'md' | 'lg' | 'fill';
2
+ export type AdminToolbarSize = 'md' | 'lg';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { AmountListProps } from './types';
3
+ export declare const AmountList: React.FC<AmountListProps>;
@@ -0,0 +1,2 @@
1
+ export { AmountList } from './AmountList';
2
+ export type { AmountListProps, AmountListRow } from './types';
@@ -0,0 +1,23 @@
1
+ export declare const amountListClass: {
2
+ readonly base: "w-full";
3
+ readonly list: "m-0 list-none p-0";
4
+ readonly item: "border-t border-pos-hair";
5
+ readonly row: "flex w-full items-start gap-3 px-5 py-3 text-left";
6
+ readonly rowInteractive: "cursor-pointer outline-none transition-colors hover:bg-default-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none [html[data-pos-reduce-motion=true]_&]:transition-none";
7
+ readonly dot: "mt-[0.4375rem] size-[0.4375rem] shrink-0 rounded-full";
8
+ readonly body: "flex min-w-0 flex-1 flex-col";
9
+ readonly title: "text-[0.875rem] font-semibold text-default-900 [overflow-wrap:anywhere] [text-wrap:pretty]";
10
+ readonly meta: "mt-1 flex min-w-0 flex-wrap items-center gap-[0.4375rem] text-[0.78125rem] text-default-500";
11
+ readonly reference: "min-w-0 font-normal text-primary [overflow-wrap:anywhere]";
12
+ readonly separator: "text-default-400";
13
+ readonly timestamp: "tabular-nums";
14
+ readonly detail: "mt-[0.1875rem] text-[0.78125rem] text-default-500 [overflow-wrap:anywhere] [text-wrap:pretty]";
15
+ readonly trailing: "max-w-[45%] min-w-min shrink-0 text-right text-[0.90625rem]";
16
+ readonly amount: "whitespace-nowrap text-[0.90625rem] font-bold tabular-nums text-default-900";
17
+ readonly note: "text-[0.78125rem] italic text-default-500 [overflow-wrap:anywhere]";
18
+ readonly footer: "flex items-baseline gap-3 border-t border-pos-line bg-pos-page px-5 py-[0.8125rem]";
19
+ readonly footerLabel: "min-w-0 text-[0.875rem] font-bold text-default-900 [overflow-wrap:anywhere]";
20
+ readonly footerAmount: "ml-auto whitespace-nowrap text-[1rem] font-bold tabular-nums text-default-900";
21
+ readonly footerNote: "border-t border-pos-hair px-5 py-[0.8125rem] text-[0.78125rem] leading-[1.6] text-default-500";
22
+ readonly empty: "px-5 pb-5 pt-[0.875rem] text-[0.875rem] text-default-500";
23
+ };
@@ -0,0 +1,26 @@
1
+ import { ReactNode } from 'react';
2
+ import { RecordTone } from '../shared/recordTone';
3
+ export interface AmountListRow {
4
+ id: string;
5
+ tone: RecordTone;
6
+ title: ReactNode;
7
+ reference?: ReactNode;
8
+ timestamp?: ReactNode;
9
+ detail?: ReactNode;
10
+ amount?: ReactNode;
11
+ amountTone?: 'positive' | 'negative' | 'neutral';
12
+ note?: ReactNode;
13
+ noteTone?: 'muted' | 'warn';
14
+ }
15
+ export interface AmountListProps {
16
+ rows: AmountListRow[];
17
+ footer?: {
18
+ label: ReactNode;
19
+ amount: ReactNode;
20
+ amountTone?: 'positive' | 'negative' | 'neutral';
21
+ note?: ReactNode;
22
+ };
23
+ emptyContent?: ReactNode;
24
+ onSelect?: (id: string) => void;
25
+ 'data-testid'?: string;
26
+ }
@@ -0,0 +1,15 @@
1
+ import { JSX } from 'react';
2
+ import { AssistantActivityProps } from './types';
3
+ /**
4
+ * The steps an assistant took for one turn, one row per finished step: done
5
+ * or failed, with how long it took. A HeroUI `Accordion` with a single item,
6
+ * so the group collapses under its title. Animation is off when the person
7
+ * prefers reduced motion.
8
+ *
9
+ * Renders nothing when `items` is empty.
10
+ */
11
+ export declare function AssistantActivity({ items, title, titleText, isExpanded, defaultExpanded, onExpandedChange, stateLabels, formatDuration, className, 'data-testid': dataTestId, }: AssistantActivityProps): JSX.Element | null;
12
+ export declare namespace AssistantActivity {
13
+ var displayName: string;
14
+ }
15
+ export default AssistantActivity;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A short, unit-suffixed duration for activity rows and running clocks:
3
+ * `320 ms`, `1.2 s`, `12 s`, `2 min 05 s`.
4
+ *
5
+ * Unit words are SI symbols (`ms`, `s`) and the SI-accepted `min`, so there is
6
+ * nothing to translate; pass your own formatter where a locale needs a
7
+ * different decimal mark. Every step truncates, so a value never shows as the
8
+ * next unit up before it gets there (999.6 ms is `999 ms`, not `1000 ms`).
9
+ */
10
+ export declare function formatAssistantDuration(ms: number): string;
@@ -0,0 +1,3 @@
1
+ export { AssistantActivity } from './AssistantActivity';
2
+ export { formatAssistantDuration } from './formatAssistantDuration';
3
+ export type { AssistantActivityItem, AssistantActivityProps, AssistantActivityState } from './types';
@@ -0,0 +1,31 @@
1
+ import { AssistantActivityState } from './types';
2
+ /**
3
+ * Every slot class of `AssistantActivity`. Semantic HeroUI colours only, so
4
+ * the group flips under `.dark` with no dark values of its own.
5
+ */
6
+ export declare const assistantActivityClass: {
7
+ readonly base: "w-full px-0";
8
+ readonly item: "shadow-none";
9
+ readonly trigger: "gap-2 py-1.5";
10
+ readonly title: "text-sm font-medium text-default-700";
11
+ readonly indicator: "text-default-500";
12
+ readonly content: "pb-2 pt-0";
13
+ readonly list: "m-0 flex list-none flex-col gap-1.5 p-0";
14
+ readonly row: "flex min-w-0 items-start gap-2 text-sm";
15
+ readonly icon: "mt-0.5 flex-none";
16
+ readonly label: "min-w-0 flex-1 text-foreground [overflow-wrap:anywhere]";
17
+ /**
18
+ * HeroUI's flat danger chip is `text-danger-600 dark:text-danger-500`,
19
+ * which measures 4.25:1 on its own fill in dark. The 700 step clears AA in
20
+ * both themes (HeroUI's dark scale is reversed, so it is a light tint
21
+ * there); the `dark:` repeat is what overrides HeroUI's `dark:` class.
22
+ */
23
+ readonly failed: "flex-none text-danger-700 dark:text-danger-700";
24
+ readonly duration: "mt-px flex-none text-xs tabular-nums text-default-500";
25
+ /** "Done:" before a done row, for screen readers only. */
26
+ readonly stateLabel: "sr-only";
27
+ };
28
+ export declare const assistantActivityStateIcon: Record<AssistantActivityState, {
29
+ icon: string;
30
+ className: string;
31
+ }>;
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * How a step ended. There is no running state on purpose: a step is listed
4
+ * once it has finished, and the panel's own "working" notice carries the wait.
5
+ */
6
+ export type AssistantActivityState = 'done' | 'failed';
7
+ export interface AssistantActivityItem {
8
+ /** Stable key; also the row's `data-testid` suffix. */
9
+ id: string;
10
+ /** What the step did, in plain words ("Searched emails · last 60 days"). */
11
+ label: ReactNode;
12
+ /** How the step ended. */
13
+ state: AssistantActivityState;
14
+ /** How long it took. Omitted, no duration is shown. */
15
+ durationMs?: number;
16
+ }
17
+ export interface AssistantActivityProps {
18
+ /** The finished steps, in the order to show. Empty, nothing renders. */
19
+ items: AssistantActivityItem[];
20
+ /** The group's heading and toggle text, e.g. "Read 4 sources". */
21
+ title: ReactNode;
22
+ /**
23
+ * Plain-text `title`, for type-to-select and assistive tech. Needed when
24
+ * `title` is not a string (React Aria warns otherwise); a string `title` is
25
+ * used as is.
26
+ */
27
+ titleText?: string;
28
+ /** Controlled open state. */
29
+ isExpanded?: boolean;
30
+ /** Uncontrolled initial state. Defaults to open. */
31
+ defaultExpanded?: boolean;
32
+ /** Called when the group opens or closes. */
33
+ onExpandedChange?: (isExpanded: boolean) => void;
34
+ /** Words for each state. `done` is read by screen readers only; `failed` is shown. Default "Done" / "Failed". */
35
+ stateLabels?: Partial<Record<AssistantActivityState, string>>;
36
+ /** Formats `durationMs`. Defaults to `formatAssistantDuration`. */
37
+ formatDuration?: (ms: number) => string;
38
+ /** Classes on the accordion. */
39
+ className?: string;
40
+ /** Test id of the root; its parts add suffixes (see Test ids in the docs). Defaults to `assistant-activity`. */
41
+ 'data-testid'?: string;
42
+ }
@@ -0,0 +1,15 @@
1
+ import { JSX } from 'react';
2
+ import { AssistantComposerProps } from './types';
3
+ /**
4
+ * Where a person types to an assistant: an autosizing field, a Send button
5
+ * that turns into Stop while a turn runs, and optional suggestion pills that
6
+ * fill the field without sending.
7
+ *
8
+ * Enter sends; Shift+Enter adds a line. Enter that confirms an IME
9
+ * composition (Japanese, Chinese, Korean input) is left to the IME.
10
+ */
11
+ export declare function AssistantComposer({ value, onValueChange, onSubmit, onStop, isRunning, isStopDisabled, isDisabled, label, placeholder, description, sendLabel, stopLabel, suggestions, suggestionsLabel, onSuggestionSelect, maxLength, minRows, maxRows, className, 'data-testid': dataTestId, }: AssistantComposerProps): JSX.Element;
12
+ export declare namespace AssistantComposer {
13
+ var displayName: string;
14
+ }
15
+ export default AssistantComposer;
@@ -0,0 +1,2 @@
1
+ export { AssistantComposer } from './AssistantComposer';
2
+ export type { AssistantComposerProps, AssistantComposerSuggestion } from './types';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Every slot class of `AssistantComposer`. HeroUI semantic colours plus
3
+ * `ai-focus` for the field's focus border, so it works under `.dark`.
4
+ */
5
+ export declare const assistantComposerClass: {
6
+ readonly base: "flex w-full min-w-0 flex-col gap-2";
7
+ readonly suggestions: "flex flex-wrap gap-2";
8
+ /**
9
+ * Pill tones are set here rather than taken from HeroUI's flat variant,
10
+ * whose text tone differs between HeroUI versions and read dim on a dark
11
+ * card in an app on HeroUI 2.7. Measured in both themes in the stories.
12
+ */
13
+ readonly suggestion: "h-auto min-h-8 max-w-full whitespace-normal bg-default-100 py-1.5 text-left text-foreground data-[hover=true]:bg-default-200";
14
+ readonly row: "flex min-w-0 items-end gap-2";
15
+ readonly field: "min-w-0 flex-1";
16
+ /**
17
+ * The focus border is `ai-focus` with the pointer over the field too:
18
+ * HeroUI's bordered variant has its own focused-and-hovered rule
19
+ * (`border-default-foreground`, black in light and white in dark), more
20
+ * specific than the focus one, so it is replaced here by name.
21
+ */
22
+ readonly inputWrapper: "border-default-200 bg-content1 data-[hover=true]:border-default-300 group-data-[focus=true]:border-ai-focus group-data-[focus=true]:data-[hover=true]:border-ai-focus";
23
+ readonly input: "text-sm text-foreground placeholder:text-default-500";
24
+ /**
25
+ * The hint sits under the whole row, not inside the field's column: inside
26
+ * it, a long hint pushed the bottom-aligned button down beside the hint.
27
+ * Our own element, so its tone is ours too: `default-500` clears 4.5:1 in
28
+ * both themes (HeroUI's description slot is `foreground-400`, 2.56:1).
29
+ */
30
+ readonly helper: "m-0 flex w-full justify-between gap-2 text-xs text-default-500";
31
+ readonly count: "ms-auto flex-none tabular-nums";
32
+ readonly button: "flex-none";
33
+ };
@@ -0,0 +1,62 @@
1
+ import { ReactNode } from 'react';
2
+ /** A ready-made question shown as a pill above the field. */
3
+ export interface AssistantComposerSuggestion {
4
+ /** Stable key; also the pill's `data-testid` suffix. */
5
+ key: string;
6
+ /** What the pill says. */
7
+ label: string;
8
+ /** What it puts in the field. Defaults to `label`. Cut to `maxLength` when the composer has one. */
9
+ prompt?: string;
10
+ }
11
+ export interface AssistantComposerProps {
12
+ /** The field's text. Controlled: pair it with `onValueChange`. */
13
+ value: string;
14
+ /** Called with the new text on every change, and when a suggestion fills the field. */
15
+ onValueChange: (value: string) => void;
16
+ /**
17
+ * Enter or the send button, while not running or disabled, with the text
18
+ * trimmed. It does not fire when the trimmed text is empty or the value is
19
+ * longer than `maxLength`.
20
+ */
21
+ onSubmit: (value: string) => void;
22
+ /** Shown as a Stop button in place of Send while `isRunning`. Omitted, Send is just disabled. */
23
+ onStop?: () => void;
24
+ /** A turn is running: Enter does nothing and Send becomes Stop. The field stays editable. */
25
+ isRunning?: boolean;
26
+ /**
27
+ * Keeps Stop in place but disabled, e.g. while a stop the person asked for
28
+ * is being carried out. A disabled Stop fires no `onStop`.
29
+ */
30
+ isStopDisabled?: boolean;
31
+ /** Disables the field, the pills and Send together. */
32
+ isDisabled?: boolean;
33
+ /** The field's accessible name. Required, and distinct from `placeholder`. */
34
+ label: string;
35
+ /** Example text inside the empty field, e.g. "Ask about this account". Not a substitute for `label`. */
36
+ placeholder?: string;
37
+ /** A hint under the field, e.g. how Enter and Shift+Enter behave. */
38
+ description?: ReactNode;
39
+ /** Name of the send button. Defaults to "Send". */
40
+ sendLabel?: string;
41
+ /** Name of the stop button. Defaults to "Stop". */
42
+ stopLabel?: string;
43
+ /** Pills that fill the field when picked. They never send. */
44
+ suggestions?: AssistantComposerSuggestion[];
45
+ /** Name of the suggestions group. Defaults to "Suggestions". */
46
+ suggestionsLabel?: string;
47
+ /** Called after a pill has filled the field. */
48
+ onSuggestionSelect?: (suggestion: AssistantComposerSuggestion) => void;
49
+ /**
50
+ * Caps the field and shows a `n/max` count under it. A longer suggestion is
51
+ * cut to it, and Send stays disabled while a controlled `value` is over it.
52
+ */
53
+ maxLength?: number;
54
+ /** Autosize lower bound, in rows. Defaults to 2. */
55
+ minRows?: number;
56
+ /** Autosize upper bound, in rows; past it the field scrolls. Defaults to 8. */
57
+ maxRows?: number;
58
+ /** Classes on the root `<form>`. */
59
+ className?: string;
60
+ /** Test id of the root; its parts add suffixes (see Test ids in the docs). Defaults to `assistant-composer`. */
61
+ 'data-testid'?: string;
62
+ }