@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
@@ -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;
@@ -42,3 +42,9 @@ export declare const adminRowClass = "border-t border-acct-hair transition-color
42
42
  export declare const adminTableClass = "w-full";
43
43
  /** The strip under the table where a pager sits. */
44
44
  export declare const adminTableFooterClass = "border-t border-acct-border px-5 py-3.5";
45
+ export declare const adminTableFramedClass: {
46
+ readonly base: "overflow-x-auto";
47
+ 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";
48
+ 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";
49
+ 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";
50
+ };
@@ -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,19 @@
1
+ import { JSX } from 'react';
2
+ import { ArtifactCardProps } from './types';
3
+ /**
4
+ * A saved artifact (a table, a chart, a report) shown in a conversation or a
5
+ * list: kind, title, a preview, its save status in words, and the caller's
6
+ * actions. A HeroUI `Card`.
7
+ *
8
+ * The status line is one polite live region whose role never changes, so
9
+ * "Saving…" turning into "Saved" or "Couldn't save" is announced once, and a
10
+ * card that mounts already failed (a conversation reopened) interrupts no one.
11
+ * An assertive error belongs to `AssistantNotice`, as in the rest of the
12
+ * family. A failed save keeps its preview, so the work stays in view; a
13
+ * deleted one drops it.
14
+ */
15
+ export declare function ArtifactCard({ title, kindLabel, icon, status, statusLabel, meta, badge, children, actions, titleAs: TitleElement, className, 'data-testid': dataTestId, }: ArtifactCardProps): JSX.Element;
16
+ export declare namespace ArtifactCard {
17
+ var displayName: string;
18
+ }
19
+ export default ArtifactCard;
@@ -0,0 +1,2 @@
1
+ export { ArtifactCard } from './ArtifactCard';
2
+ export type { ArtifactCardProps, ArtifactCardStatus } from './types';
@@ -0,0 +1,31 @@
1
+ import { ArtifactCardStatus } from './types';
2
+ /**
3
+ * Every slot class of `ArtifactCard`. HeroUI semantic colours only, so the
4
+ * card works under `.dark`: `content1` card, `divider` edges, `foreground`
5
+ * text, `default-600` secondary text (it also sits on `default-100`, where
6
+ * `default-500` falls under 4.5:1). Status tones use the 700 step, which
7
+ * stays readable in both themes because HeroUI's dark scales are reversed.
8
+ */
9
+ export declare const artifactCardClass: {
10
+ readonly base: "w-full border border-default-200 bg-content1 shadow-none";
11
+ readonly deleted: "border-dashed";
12
+ readonly header: "flex flex-col items-start gap-1 px-4 pb-0 pt-3";
13
+ readonly kindRow: "flex min-w-0 flex-wrap items-center gap-2 text-xs text-default-600";
14
+ readonly kind: "inline-flex items-center gap-1.5 font-medium";
15
+ readonly badge: "inline-flex items-center gap-1 rounded-md border border-default-300 bg-default-100 px-1.5 py-0.5 text-[0.6875rem] font-semibold uppercase tracking-wide text-default-700";
16
+ readonly title: "m-0 min-w-0 text-sm font-semibold text-foreground [overflow-wrap:anywhere]";
17
+ readonly titleDeleted: "text-default-600";
18
+ readonly meta: "text-xs tabular-nums text-default-600 [overflow-wrap:anywhere]";
19
+ readonly body: "min-w-0 px-4 py-3";
20
+ readonly skeleton: "flex flex-col gap-2";
21
+ readonly skeletonLine: "h-3 rounded-md";
22
+ /** Three lines of a preview that has not arrived yet. */
23
+ readonly skeletonWidths: readonly ["w-3/4", "w-full", "w-2/3"];
24
+ readonly footer: "flex flex-wrap items-center justify-between gap-2 border-t border-divider px-4 py-2.5";
25
+ readonly status: "flex min-w-0 items-center gap-1.5 text-xs font-medium [overflow-wrap:anywhere]";
26
+ /** HeroUI's small spinner is 20px; sized to the 14px status icons so the footer keeps its height when the save ends. */
27
+ readonly spinner: "size-3.5";
28
+ readonly actions: "flex flex-wrap items-center gap-1.5";
29
+ };
30
+ export declare const artifactCardStatusClass: Record<ArtifactCardStatus, string>;
31
+ export declare const ARTIFACT_CARD_STATUS_ICON: Record<Exclude<ArtifactCardStatus, 'saving'>, string>;
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Where a saved artifact stands. `saving` while it is written, `saved` once
4
+ * it is kept, `failed` when it could not be saved (too large, an error), and
5
+ * `deleted` once its owner removed it.
6
+ */
7
+ export type ArtifactCardStatus = 'saving' | 'saved' | 'failed' | 'deleted';
8
+ export interface ArtifactCardProps {
9
+ /** The artifact's title, e.g. "Renewals in Q1 with red health". */
10
+ title: string;
11
+ /** What kind of artifact it is, e.g. "Table", "Chart", "Report". */
12
+ kindLabel: string;
13
+ /** Iconify name for the kind. */
14
+ icon?: string;
15
+ /** Defaults to `saved`. */
16
+ status?: ArtifactCardStatus;
17
+ /**
18
+ * The status in words, always shown: "Saved · private to you", "Saving…",
19
+ * "Couldn't save: the report is over the size limit", "Deleted".
20
+ */
21
+ statusLabel: ReactNode;
22
+ /** A short line under the title, e.g. "12 rows · 4 columns". */
23
+ meta?: ReactNode;
24
+ /** A small marker next to the kind, e.g. "Internal". Styled by the card so it reads the same everywhere. */
25
+ badge?: ReactNode;
26
+ /** A preview: the first rows, a small chart, the first lines. Hidden once `deleted`; a skeleton while `saving` without one. */
27
+ children?: ReactNode;
28
+ /** Controls (Open, Download, Delete, a narrower request). Rendered as given. */
29
+ actions?: ReactNode;
30
+ /** The title's element. Defaults to `p`; pick a heading that fits the page's outline. */
31
+ titleAs?: 'h2' | 'h3' | 'h4' | 'p';
32
+ className?: string;
33
+ 'data-testid'?: string;
34
+ }
@@ -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,37 @@
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
+ state: AssistantActivityState;
13
+ /** How long it took. Omitted, no duration is shown. */
14
+ durationMs?: number;
15
+ }
16
+ export interface AssistantActivityProps {
17
+ items: AssistantActivityItem[];
18
+ /** The group's heading and toggle text, e.g. "Read 4 sources". */
19
+ title: ReactNode;
20
+ /**
21
+ * Plain-text `title`, for type-to-select and assistive tech. Needed when
22
+ * `title` is not a string (React Aria warns otherwise); a string `title` is
23
+ * used as is.
24
+ */
25
+ titleText?: string;
26
+ /** Controlled open state. */
27
+ isExpanded?: boolean;
28
+ /** Uncontrolled initial state. Defaults to open. */
29
+ defaultExpanded?: boolean;
30
+ onExpandedChange?: (isExpanded: boolean) => void;
31
+ /** Words for each state. `done` is read by screen readers only; `failed` is shown. Default "Done" / "Failed". */
32
+ stateLabels?: Partial<Record<AssistantActivityState, string>>;
33
+ /** Formats `durationMs`. Defaults to `formatAssistantDuration`. */
34
+ formatDuration?: (ms: number) => string;
35
+ className?: string;
36
+ 'data-testid'?: string;
37
+ }
@@ -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,27 @@
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
+ readonly inputWrapper: "border-default-200 bg-content1 data-[hover=true]:border-default-300 group-data-[focus=true]:border-ai-focus";
17
+ readonly input: "text-sm text-foreground placeholder:text-default-500";
18
+ /**
19
+ * The hint sits under the whole row, not inside the field's column: inside
20
+ * it, a long hint pushed the bottom-aligned button down beside the hint.
21
+ * Our own element, so its tone is ours too: `default-500` clears 4.5:1 in
22
+ * both themes (HeroUI's description slot is `foreground-400`, 2.56:1).
23
+ */
24
+ readonly helper: "m-0 flex w-full justify-between gap-2 text-xs text-default-500";
25
+ readonly count: "ms-auto flex-none tabular-nums";
26
+ readonly button: "flex-none";
27
+ };
@@ -0,0 +1,48 @@
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`. */
9
+ prompt?: string;
10
+ }
11
+ export interface AssistantComposerProps {
12
+ value: string;
13
+ onValueChange: (value: string) => void;
14
+ /** Enter or the send button, with a non-empty value, while not running or disabled. */
15
+ onSubmit: (value: string) => void;
16
+ /** Shown as a Stop button in place of Send while `isRunning`. Omitted, Send is just disabled. */
17
+ onStop?: () => void;
18
+ /** A turn is running: Enter does nothing and Send becomes Stop. The field stays editable. */
19
+ isRunning?: boolean;
20
+ /**
21
+ * Keeps Stop in place but disabled, e.g. while a stop the person asked for
22
+ * is being carried out. A disabled Stop fires no `onStop`.
23
+ */
24
+ isStopDisabled?: boolean;
25
+ isDisabled?: boolean;
26
+ /** The field's accessible name. Required, and distinct from `placeholder`. */
27
+ label: string;
28
+ placeholder?: string;
29
+ /** A hint under the field, e.g. how Enter and Shift+Enter behave. */
30
+ description?: ReactNode;
31
+ /** Name of the send button. Defaults to "Send". */
32
+ sendLabel?: string;
33
+ /** Name of the stop button. Defaults to "Stop". */
34
+ stopLabel?: string;
35
+ /** Pills that fill the field when picked. They never send. */
36
+ suggestions?: AssistantComposerSuggestion[];
37
+ /** Name of the suggestions group. Defaults to "Suggestions". */
38
+ suggestionsLabel?: string;
39
+ /** Called after a pill has filled the field. */
40
+ onSuggestionSelect?: (suggestion: AssistantComposerSuggestion) => void;
41
+ /** Caps the field and shows a `n/max` count under it. */
42
+ maxLength?: number;
43
+ /** Autosize bounds. Default 2 and 8 rows. */
44
+ minRows?: number;
45
+ maxRows?: number;
46
+ className?: string;
47
+ 'data-testid'?: string;
48
+ }
@@ -0,0 +1,17 @@
1
+ import { JSX } from 'react';
2
+ import { AssistantMarkdownProps } from './types';
3
+ /**
4
+ * An assistant's answer, rendered from a safe Markdown subset: headings,
5
+ * paragraphs, lists, bold and italic, inline code, code blocks, tables,
6
+ * blockquotes and links. No raw HTML, no images, no auto-linked URLs; links
7
+ * open in a new tab, show their domain, and pass `linkPolicy` first.
8
+ *
9
+ * markdown-it parses (a peer dependency, shared with `@tiptap/pm`); every
10
+ * token is turned into a React element from an allowlist, and nothing reaches
11
+ * the DOM as HTML.
12
+ */
13
+ export declare function AssistantMarkdown({ source, linkPolicy, headingOffset, renderCitation, newTabLabel, tableLabel, codeLabel, className, 'data-testid': dataTestId, }: AssistantMarkdownProps): JSX.Element;
14
+ export declare namespace AssistantMarkdown {
15
+ var displayName: string;
16
+ }
17
+ export default AssistantMarkdown;
@@ -0,0 +1,3 @@
1
+ export { AssistantMarkdown } from './AssistantMarkdown';
2
+ export { defaultAssistantLinkPolicy } from './parser';
3
+ export type { AssistantMarkdownLinkPolicy, AssistantMarkdownProps } from './types';
@@ -0,0 +1,37 @@
1
+ import { default as MarkdownIt } from 'markdown-it';
2
+ import { AssistantMarkdownLinkPolicy } from './types';
3
+ /** markdown-it's token, without importing a deep path that the bundle would also have to keep external. */
4
+ export type MarkdownToken = ReturnType<MarkdownIt['parse']>[number];
5
+ /** One shared parser: building one is the costly part, and its settings never change. */
6
+ export declare function assistantMarkdownParser(): MarkdownIt;
7
+ /**
8
+ * The href a rendered link may carry, so the domain shown next to it is where
9
+ * it goes. `AssistantMarkdown` applies it to whatever the link policy returns,
10
+ * the default or the caller's.
11
+ * - An `http(s):` href must name its host (`https://…`), and comes back in its
12
+ * canonical form, so the domain shown and the target are read from one
13
+ * string. `https:evil.example` and `https:/evil.example` read as evil.example
14
+ * on their own, but a browser resolves them against the page, as paths on
15
+ * the page's own origin: refused (`null`).
16
+ * - An href with no scheme that names a host (`//evil.example`) leaves the
17
+ * page, but no domain can be shown for it: refused.
18
+ * - Anything else (a `mailto:`, a path on the app) is returned as is.
19
+ */
20
+ export declare function checkedLinkHref(href: string): string | null;
21
+ /**
22
+ * The link policy used when the caller passes none: absolute `http://` and
23
+ * `https://` URLs (through `checkedLinkHref`), and `mailto:`, only.
24
+ * markdown-it has already refused `javascript:`, `vbscript:`, `file:` and
25
+ * non-image `data:` links by then (it lets `data:image/*` through, which this
26
+ * policy refuses); this also refuses relative links, because only the app
27
+ * knows where they would go.
28
+ *
29
+ * A `mailto:` keeps its address only: `?subject=`, `body=`, `cc=` and `bcc=`
30
+ * are dropped, so a link can't open an email already filled in.
31
+ */
32
+ export declare const defaultAssistantLinkPolicy: AssistantMarkdownLinkPolicy;
33
+ /**
34
+ * Where a link goes, shown next to it: the host for `http(s):` (without
35
+ * `www.`), the address for `mailto:`. Empty when it can't be read.
36
+ */
37
+ export declare function linkDestination(href: string): string;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Every slot class of `AssistantMarkdown`. HeroUI semantic colours plus
3
+ * `ai-accent` for links, so the rendered answer works under `.dark`. Text
4
+ * tones: `foreground` for body, `default-600` for quotes, `default-500` only
5
+ * for the link domain on a plain card (4.83:1 light, 6.9:1 dark).
6
+ */
7
+ export declare const assistantMarkdownClass: {
8
+ readonly root: "min-w-0 space-y-3 text-sm leading-relaxed text-foreground [overflow-wrap:anywhere]";
9
+ readonly paragraph: "m-0";
10
+ readonly heading: Record<number, string>;
11
+ readonly bulletList: "m-0 list-disc space-y-1 ps-5";
12
+ readonly orderedList: "m-0 list-decimal space-y-1 ps-5";
13
+ readonly listItem: "ps-1 [&>ol]:mt-1 [&>ul]:mt-1";
14
+ /** Quoted third-party text (an email, a call note): set apart, never styled as the assistant's own words. */
15
+ readonly blockquote: "m-0 space-y-2 border-s-2 border-default-300 ps-3 text-default-600";
16
+ readonly code: "rounded bg-default-100 px-1 py-0.5 font-mono text-[0.8125em]";
17
+ /** The code block's scroll box: named and focusable like the table's, so a long line can be scrolled by keyboard in every browser. */
18
+ readonly codeWrap: "max-w-full overflow-x-auto rounded-md bg-default-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ai-focus";
19
+ readonly pre: "m-0 whitespace-pre p-3 font-mono text-xs [overflow-wrap:normal]";
20
+ readonly rule: "my-3 border-0 border-t border-divider";
21
+ readonly tableWrap: "max-w-full overflow-x-auto rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ai-focus";
22
+ readonly table: "w-full border-collapse text-sm";
23
+ /**
24
+ * Cells break between words only (the root's `overflow-wrap: anywhere`
25
+ * would split them mid-word and squeeze a wide table to fit), and headers
26
+ * stay on one line, so a wide table scrolls inside its box instead.
27
+ */
28
+ readonly headerCell: "whitespace-nowrap border-b border-divider px-2 py-1.5 font-semibold";
29
+ readonly cell: "border-b border-divider px-2 py-1.5 align-top [overflow-wrap:normal]";
30
+ readonly align: Record<string, string>;
31
+ readonly link: "text-ai-accent underline underline-offset-2 hover:no-underline";
32
+ /** `inline-block` keeps the link's underline off the domain. */
33
+ readonly linkDomain: "inline-block text-default-500";
34
+ readonly srOnly: "sr-only";
35
+ };