@commercetools/nimbus-mcp 0.1.0 → 2.11.0

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 (453) hide show
  1. package/README.md +63 -14
  2. package/data/docs/route-manifest.json +10998 -0
  3. package/data/docs/routes/components-accessibility-visually-hidden.json +388 -0
  4. package/data/docs/routes/components-accessibility.json +34 -0
  5. package/data/docs/routes/components-buttons-button.json +715 -0
  6. package/data/docs/routes/components-buttons-icon-button.json +852 -0
  7. package/data/docs/routes/components-buttons-icon-toggle-button.json +594 -0
  8. package/data/docs/routes/components-buttons-split-button.json +670 -0
  9. package/data/docs/routes/components-buttons-toggle-button-group.json +722 -0
  10. package/data/docs/routes/components-buttons-toggle-button.json +689 -0
  11. package/data/docs/routes/components-buttons.json +36 -0
  12. package/data/docs/routes/components-data-display-badge.json +555 -0
  13. package/data/docs/routes/components-data-display-card.json +338 -0
  14. package/data/docs/routes/components-data-display-data-table.json +855 -0
  15. package/data/docs/routes/components-data-display-draggable-list.json +596 -0
  16. package/data/docs/routes/components-data-display-table.json +472 -0
  17. package/data/docs/routes/components-data-display-tag-group.json +535 -0
  18. package/data/docs/routes/components-data-display.json +34 -0
  19. package/data/docs/routes/components-feedback-alert.json +696 -0
  20. package/data/docs/routes/components-feedback-dialog.json +682 -0
  21. package/data/docs/routes/components-feedback-drawer.json +600 -0
  22. package/data/docs/routes/components-feedback-loading-spinner.json +415 -0
  23. package/data/docs/routes/components-feedback-progress-bar.json +661 -0
  24. package/data/docs/routes/components-feedback-toast.json +1040 -0
  25. package/data/docs/routes/components-feedback-tooltip.json +510 -0
  26. package/data/docs/routes/components-feedback.json +34 -0
  27. package/data/docs/routes/components-forms-field-errors.json +557 -0
  28. package/data/docs/routes/components-forms-form-field.json +848 -0
  29. package/data/docs/routes/components-forms-group.json +427 -0
  30. package/data/docs/routes/components-forms-localized-field.json +770 -0
  31. package/data/docs/routes/components-forms.json +37 -0
  32. package/data/docs/routes/components-inputs-calendar.json +611 -0
  33. package/data/docs/routes/components-inputs-checkbox.json +774 -0
  34. package/data/docs/routes/components-inputs-combo-box.json +761 -0
  35. package/data/docs/routes/components-inputs-date-input.json +628 -0
  36. package/data/docs/routes/components-inputs-date-picker.json +709 -0
  37. package/data/docs/routes/components-inputs-date-range-picker.json +599 -0
  38. package/data/docs/routes/components-inputs-money-input.json +721 -0
  39. package/data/docs/routes/components-inputs-multiline-text-input.json +611 -0
  40. package/data/docs/routes/components-inputs-number-input.json +647 -0
  41. package/data/docs/routes/components-inputs-password-input.json +576 -0
  42. package/data/docs/routes/components-inputs-radio-input.json +583 -0
  43. package/data/docs/routes/components-inputs-range-calendar.json +607 -0
  44. package/data/docs/routes/components-inputs-rich-text-input.json +599 -0
  45. package/data/docs/routes/components-inputs-scoped-search-input.json +570 -0
  46. package/data/docs/routes/components-inputs-search-input.json +588 -0
  47. package/data/docs/routes/components-inputs-select-input.json +960 -0
  48. package/data/docs/routes/components-inputs-switch.json +720 -0
  49. package/data/docs/routes/components-inputs-text-input.json +566 -0
  50. package/data/docs/routes/components-inputs-time-input.json +775 -0
  51. package/data/docs/routes/components-inputs.json +34 -0
  52. package/data/docs/routes/components-layout-box.json +501 -0
  53. package/data/docs/routes/components-layout-defaultpage.json +748 -0
  54. package/data/docs/routes/components-layout-flex.json +587 -0
  55. package/data/docs/routes/components-layout-grid.json +393 -0
  56. package/data/docs/routes/components-layout-modalpage.json +716 -0
  57. package/data/docs/routes/components-layout-pagecontent.json +673 -0
  58. package/data/docs/routes/components-layout-scrollarea.json +428 -0
  59. package/data/docs/routes/components-layout-separator.json +461 -0
  60. package/data/docs/routes/components-layout-simple-grid.json +519 -0
  61. package/data/docs/routes/components-layout-spacer.json +573 -0
  62. package/data/docs/routes/components-layout-stack.json +481 -0
  63. package/data/docs/routes/components-layout.json +34 -0
  64. package/data/docs/routes/components-media-avatar.json +427 -0
  65. package/data/docs/routes/components-media-icon.json +663 -0
  66. package/data/docs/routes/components-media-image.json +511 -0
  67. package/data/docs/routes/components-media-inline-svg.json +586 -0
  68. package/data/docs/routes/components-media.json +34 -0
  69. package/data/docs/routes/components-navigation-accordion.json +643 -0
  70. package/data/docs/routes/components-navigation-collapsible-motion.json +628 -0
  71. package/data/docs/routes/components-navigation-link.json +554 -0
  72. package/data/docs/routes/components-navigation-menu.json +546 -0
  73. package/data/docs/routes/components-navigation-pagination.json +502 -0
  74. package/data/docs/routes/components-navigation-steps.json +629 -0
  75. package/data/docs/routes/components-navigation-tabnav.json +546 -0
  76. package/data/docs/routes/components-navigation-tabs.json +635 -0
  77. package/data/docs/routes/components-navigation-toolbar.json +549 -0
  78. package/data/docs/routes/components-navigation.json +34 -0
  79. package/data/docs/routes/components-typography-code.json +39 -0
  80. package/data/docs/routes/components-typography-heading.json +402 -0
  81. package/data/docs/routes/components-typography-kbd.json +399 -0
  82. package/data/docs/routes/components-typography-list.json +593 -0
  83. package/data/docs/routes/components-typography-text.json +444 -0
  84. package/data/docs/routes/components-typography.json +34 -0
  85. package/data/docs/routes/components-utilities-nimbus-i18n-provider.json +295 -0
  86. package/data/docs/routes/components-utilities-nimbus-provider.json +663 -0
  87. package/data/docs/routes/components-utilities.json +34 -0
  88. package/data/docs/routes/components.json +33 -0
  89. package/data/docs/routes/home-contribute-adrs-adr0001-consumer-component-apis.json +314 -0
  90. package/data/docs/routes/home-contribute-adrs-adr0002-compound-component-extraction.json +160 -0
  91. package/data/docs/routes/home-contribute-adrs-adr0003-component-lifecycle-states.json +460 -0
  92. package/data/docs/routes/home-contribute-adrs.json +205 -0
  93. package/data/docs/routes/home-contribute-development-setup.json +213 -0
  94. package/data/docs/routes/home-contribute-stats.json +36 -0
  95. package/data/docs/routes/home-contribute.json +36 -0
  96. package/data/docs/routes/home-design-tokens-aspect-ratios.json +36 -0
  97. package/data/docs/routes/home-design-tokens-borders.json +35 -0
  98. package/data/docs/routes/home-design-tokens-colors.json +157 -0
  99. package/data/docs/routes/home-design-tokens-other-animations.json +119 -0
  100. package/data/docs/routes/home-design-tokens-other-blurs.json +36 -0
  101. package/data/docs/routes/home-design-tokens-other-breakpoints.json +61 -0
  102. package/data/docs/routes/home-design-tokens-other-cursors.json +36 -0
  103. package/data/docs/routes/home-design-tokens-other-z-indices.json +39 -0
  104. package/data/docs/routes/home-design-tokens-other.json +35 -0
  105. package/data/docs/routes/home-design-tokens-radii.json +59 -0
  106. package/data/docs/routes/home-design-tokens-shadows.json +57 -0
  107. package/data/docs/routes/home-design-tokens-sizes.json +137 -0
  108. package/data/docs/routes/home-design-tokens-spacing.json +36 -0
  109. package/data/docs/routes/home-design-tokens-typography.json +184 -0
  110. package/data/docs/routes/home-design-tokens.json +34 -0
  111. package/data/docs/routes/home-getting-started-core-concepts.json +301 -0
  112. package/data/docs/routes/home-getting-started-installation.json +621 -0
  113. package/data/docs/routes/home-getting-started-mcp-server-overview.json +139 -0
  114. package/data/docs/routes/home-getting-started-mcp-server-setup.json +316 -0
  115. package/data/docs/routes/home-getting-started-release-process.json +294 -0
  116. package/data/docs/routes/home-getting-started-testing-setup.json +296 -0
  117. package/data/docs/routes/home-playground-markdown.json +638 -0
  118. package/data/docs/routes/home-playground-toc.json +169 -0
  119. package/data/docs/routes/home-playground.json +34 -0
  120. package/data/docs/routes/home-style-props-background.json +236 -0
  121. package/data/docs/routes/home-style-props-border.json +310 -0
  122. package/data/docs/routes/home-style-props-display.json +120 -0
  123. package/data/docs/routes/home-style-props-effects.json +116 -0
  124. package/data/docs/routes/home-style-props-filters.json +396 -0
  125. package/data/docs/routes/home-style-props-flex-and-grid.json +496 -0
  126. package/data/docs/routes/home-style-props-interactivity.json +356 -0
  127. package/data/docs/routes/home-style-props-layout.json +422 -0
  128. package/data/docs/routes/home-style-props-list.json +116 -0
  129. package/data/docs/routes/home-style-props-sizing.json +244 -0
  130. package/data/docs/routes/home-style-props-spacing.json +228 -0
  131. package/data/docs/routes/home-style-props-svg.json +96 -0
  132. package/data/docs/routes/home-style-props-tables.json +116 -0
  133. package/data/docs/routes/home-style-props-transforms.json +216 -0
  134. package/data/docs/routes/home-style-props-transitions.json +216 -0
  135. package/data/docs/routes/home-style-props-typography.json +536 -0
  136. package/data/docs/routes/home-style-props.json +33 -0
  137. package/data/docs/routes/home.json +32 -0
  138. package/data/docs/routes/hooks-usecopytoclipboard.json +76 -0
  139. package/data/docs/routes/hooks-usehotkeys.json +117 -0
  140. package/data/docs/routes/hooks.json +33 -0
  141. package/data/docs/routes/icons.json +32 -0
  142. package/data/docs/routes/patterns-fields-date-range-picker-field.json +393 -0
  143. package/data/docs/routes/patterns-fields-money-input-field.json +415 -0
  144. package/data/docs/routes/patterns-fields-multiline-text-input-field.json +404 -0
  145. package/data/docs/routes/patterns-fields-number-input-field.json +470 -0
  146. package/data/docs/routes/patterns-fields-password-input-field.json +319 -0
  147. package/data/docs/routes/patterns-fields-search-input-field.json +382 -0
  148. package/data/docs/routes/patterns-fields-text-input-field.json +404 -0
  149. package/data/docs/routes/patterns-fields.json +78 -0
  150. package/data/docs/routes/patterns.json +34 -0
  151. package/data/docs/search-index.json +1 -0
  152. package/data/docs/types/Accordion.json +12 -0
  153. package/data/docs/types/AccordionContent.json +286 -0
  154. package/data/docs/types/AccordionHeader.json +891 -0
  155. package/data/docs/types/AccordionHeaderRightContent.json +27 -0
  156. package/data/docs/types/AccordionItem.json +242 -0
  157. package/data/docs/types/AccordionRoot.json +162 -0
  158. package/data/docs/types/Alert.json +12 -0
  159. package/data/docs/types/AlertActions.json +11 -0
  160. package/data/docs/types/AlertDescription.json +118 -0
  161. package/data/docs/types/AlertDismissButton.json +937 -0
  162. package/data/docs/types/AlertRoot.json +42 -0
  163. package/data/docs/types/AlertTitle.json +118 -0
  164. package/data/docs/types/Avatar.json +125 -0
  165. package/data/docs/types/Badge.json +64 -0
  166. package/data/docs/types/Body.json +67 -0
  167. package/data/docs/types/Box.json +85 -0
  168. package/data/docs/types/Button.json +1015 -0
  169. package/data/docs/types/Calendar.json +565 -0
  170. package/data/docs/types/Caption.json +67 -0
  171. package/data/docs/types/Card.json +12 -0
  172. package/data/docs/types/CardContent.json +27 -0
  173. package/data/docs/types/CardHeader.json +27 -0
  174. package/data/docs/types/CardRoot.json +106 -0
  175. package/data/docs/types/Cell.json +227 -0
  176. package/data/docs/types/Checkbox.json +897 -0
  177. package/data/docs/types/Code.json +112 -0
  178. package/data/docs/types/CollapsibleMotionContent.json +35 -0
  179. package/data/docs/types/CollapsibleMotionRoot.json +99 -0
  180. package/data/docs/types/CollapsibleMotionTrigger.json +71 -0
  181. package/data/docs/types/Column.json +101 -0
  182. package/data/docs/types/ColumnGroup.json +101 -0
  183. package/data/docs/types/ColumnHeader.json +193 -0
  184. package/data/docs/types/ComboBoxListBox.json +751 -0
  185. package/data/docs/types/ComboBoxOption.json +672 -0
  186. package/data/docs/types/ComboBoxPopover.json +786 -0
  187. package/data/docs/types/ComboBoxRoot.json +747 -0
  188. package/data/docs/types/ComboBoxSection.json +277 -0
  189. package/data/docs/types/ComboBoxTrigger.json +70 -0
  190. package/data/docs/types/Content.json +33 -0
  191. package/data/docs/types/DataTable.json +596 -0
  192. package/data/docs/types/DataTableBody.json +223 -0
  193. package/data/docs/types/DataTableFooter.json +27 -0
  194. package/data/docs/types/DataTableHeader.json +269 -0
  195. package/data/docs/types/DataTableManager.json +11 -0
  196. package/data/docs/types/DataTableRoot.json +590 -0
  197. package/data/docs/types/DataTableTable.json +271 -0
  198. package/data/docs/types/DateInput.json +792 -0
  199. package/data/docs/types/DatePicker.json +700 -0
  200. package/data/docs/types/DateRangePicker.json +936 -0
  201. package/data/docs/types/DateRangePickerField.json +1047 -0
  202. package/data/docs/types/DefaultPage.json +12 -0
  203. package/data/docs/types/DefaultPageActions.json +27 -0
  204. package/data/docs/types/DefaultPageBackLink.json +213 -0
  205. package/data/docs/types/DefaultPageContent.json +27 -0
  206. package/data/docs/types/DefaultPageFooter.json +27 -0
  207. package/data/docs/types/DefaultPageHeader.json +27 -0
  208. package/data/docs/types/DefaultPageRoot.json +106 -0
  209. package/data/docs/types/DefaultPageSubtitle.json +27 -0
  210. package/data/docs/types/DefaultPageTabNav.json +28 -0
  211. package/data/docs/types/DefaultPageTitle.json +27 -0
  212. package/data/docs/types/DialogBody.json +27 -0
  213. package/data/docs/types/DialogCloseTrigger.json +939 -0
  214. package/data/docs/types/DialogContent.json +27 -0
  215. package/data/docs/types/DialogFooter.json +27 -0
  216. package/data/docs/types/DialogHeader.json +27 -0
  217. package/data/docs/types/DialogRoot.json +138 -0
  218. package/data/docs/types/DialogTitle.json +27 -0
  219. package/data/docs/types/DialogTrigger.json +80 -0
  220. package/data/docs/types/DraggableList.json +12 -0
  221. package/data/docs/types/DraggableListField.json +894 -0
  222. package/data/docs/types/DraggableListItem.json +574 -0
  223. package/data/docs/types/DraggableListRoot.json +745 -0
  224. package/data/docs/types/Drawer.json +12 -0
  225. package/data/docs/types/DrawerBody.json +27 -0
  226. package/data/docs/types/DrawerCloseTrigger.json +939 -0
  227. package/data/docs/types/DrawerContent.json +27 -0
  228. package/data/docs/types/DrawerFooter.json +27 -0
  229. package/data/docs/types/DrawerHeader.json +27 -0
  230. package/data/docs/types/DrawerRoot.json +142 -0
  231. package/data/docs/types/DrawerTitle.json +27 -0
  232. package/data/docs/types/DrawerTrigger.json +80 -0
  233. package/data/docs/types/FieldErrors.getBuiltInMessage.json +11 -0
  234. package/data/docs/types/FieldErrors.getCustomMessage.json +9 -0
  235. package/data/docs/types/FieldErrors.json +109 -0
  236. package/data/docs/types/Flex.json +238 -0
  237. package/data/docs/types/Footer.json +67 -0
  238. package/data/docs/types/FormFieldDescription.json +11 -0
  239. package/data/docs/types/FormFieldError.json +11 -0
  240. package/data/docs/types/FormFieldInfoBox.json +27 -0
  241. package/data/docs/types/FormFieldInput.json +11 -0
  242. package/data/docs/types/FormFieldLabel.json +11 -0
  243. package/data/docs/types/FormFieldRoot.json +148 -0
  244. package/data/docs/types/Grid.json +253 -0
  245. package/data/docs/types/GridProps.json +11 -0
  246. package/data/docs/types/Group.json +143 -0
  247. package/data/docs/types/Header.json +67 -0
  248. package/data/docs/types/Heading.json +109 -0
  249. package/data/docs/types/Icon.json +112 -0
  250. package/data/docs/types/IconButton.json +1019 -0
  251. package/data/docs/types/IconToggleButton.json +787 -0
  252. package/data/docs/types/Image.json +373 -0
  253. package/data/docs/types/Indicator.json +67 -0
  254. package/data/docs/types/InlineSvg.json +98 -0
  255. package/data/docs/types/Item.json +67 -0
  256. package/data/docs/types/Kbd.json +118 -0
  257. package/data/docs/types/Link.json +380 -0
  258. package/data/docs/types/List.json +12 -0
  259. package/data/docs/types/ListIndicator.json +70 -0
  260. package/data/docs/types/ListItem.json +70 -0
  261. package/data/docs/types/ListRoot.json +124 -0
  262. package/data/docs/types/LoadingSpinner.json +87 -0
  263. package/data/docs/types/LocalizedField.json +460 -0
  264. package/data/docs/types/LocalizedStringFormatter.json +9 -0
  265. package/data/docs/types/MakeElementFocusable.json +196 -0
  266. package/data/docs/types/MenuContent.json +111 -0
  267. package/data/docs/types/MenuItem.json +671 -0
  268. package/data/docs/types/MenuRoot.json +670 -0
  269. package/data/docs/types/MenuSection.json +364 -0
  270. package/data/docs/types/MenuSubmenu.json +111 -0
  271. package/data/docs/types/MenuSubmenuTrigger.json +67 -0
  272. package/data/docs/types/MenuTrigger.json +906 -0
  273. package/data/docs/types/ModalPage.json +12 -0
  274. package/data/docs/types/ModalPageActions.json +27 -0
  275. package/data/docs/types/ModalPageContent.json +27 -0
  276. package/data/docs/types/ModalPageFooter.json +27 -0
  277. package/data/docs/types/ModalPageHeader.json +27 -0
  278. package/data/docs/types/ModalPageRoot.json +87 -0
  279. package/data/docs/types/ModalPageSubtitle.json +27 -0
  280. package/data/docs/types/ModalPageTabNav.json +28 -0
  281. package/data/docs/types/ModalPageTitle.json +27 -0
  282. package/data/docs/types/ModalPageTopBar.json +57 -0
  283. package/data/docs/types/MoneyInput.isEmpty.json +40 -0
  284. package/data/docs/types/MoneyInput.json +282 -0
  285. package/data/docs/types/MoneyInputField.json +379 -0
  286. package/data/docs/types/MoneyInputFieldProps.json +9 -0
  287. package/data/docs/types/MultilineTextInput.json +1194 -0
  288. package/data/docs/types/MultilineTextInputField.json +1269 -0
  289. package/data/docs/types/MultilineTextInputFieldProps.json +9 -0
  290. package/data/docs/types/NimbusI18nProvider.json +42 -0
  291. package/data/docs/types/NimbusI18nProviderProps.json +9 -0
  292. package/data/docs/types/NimbusProvider.json +270 -0
  293. package/data/docs/types/NumberInput.json +952 -0
  294. package/data/docs/types/NumberInputField.json +1004 -0
  295. package/data/docs/types/NumberInputFieldProps.json +9 -0
  296. package/data/docs/types/PageContent.json +11 -0
  297. package/data/docs/types/PageContentColumn.json +99 -0
  298. package/data/docs/types/PageContentRoot.json +114 -0
  299. package/data/docs/types/Pagination.json +159 -0
  300. package/data/docs/types/PasswordInput.json +1120 -0
  301. package/data/docs/types/PasswordInputField.json +1216 -0
  302. package/data/docs/types/PasswordInputFieldProps.json +9 -0
  303. package/data/docs/types/ProgressBar.json +280 -0
  304. package/data/docs/types/RadioInputOption.json +550 -0
  305. package/data/docs/types/RadioInputRoot.json +514 -0
  306. package/data/docs/types/RangeCalendar.json +618 -0
  307. package/data/docs/types/RichTextInput.json +134 -0
  308. package/data/docs/types/Root.json +122 -0
  309. package/data/docs/types/Row.json +67 -0
  310. package/data/docs/types/ScopedSearchInput.isEmpty.json +40 -0
  311. package/data/docs/types/ScopedSearchInput.json +253 -0
  312. package/data/docs/types/ScrollArea.json +179 -0
  313. package/data/docs/types/ScrollAreaElementIds.json +9 -0
  314. package/data/docs/types/ScrollAreaProps.json +9 -0
  315. package/data/docs/types/SearchInput.json +1165 -0
  316. package/data/docs/types/SearchInputField.json +1240 -0
  317. package/data/docs/types/Select.json +12 -0
  318. package/data/docs/types/SelectOption.json +572 -0
  319. package/data/docs/types/SelectOptionGroup.json +215 -0
  320. package/data/docs/types/SelectOptions.json +693 -0
  321. package/data/docs/types/SelectRoot.json +926 -0
  322. package/data/docs/types/Separator.json +65 -0
  323. package/data/docs/types/SimpleGrid.json +291 -0
  324. package/data/docs/types/Spacer.json +27 -0
  325. package/data/docs/types/SpacerProps.json +9 -0
  326. package/data/docs/types/SplitButton.json +203 -0
  327. package/data/docs/types/Stack.json +144 -0
  328. package/data/docs/types/Steps.json +12 -0
  329. package/data/docs/types/StepsChangeDetails.json +9 -0
  330. package/data/docs/types/StepsCompletedContent.json +28 -0
  331. package/data/docs/types/StepsCompletedContentProps.json +9 -0
  332. package/data/docs/types/StepsContent.json +43 -0
  333. package/data/docs/types/StepsContentProps.json +9 -0
  334. package/data/docs/types/StepsDescription.json +28 -0
  335. package/data/docs/types/StepsDescriptionProps.json +9 -0
  336. package/data/docs/types/StepsIndicator.json +28 -0
  337. package/data/docs/types/StepsIndicatorProps.json +9 -0
  338. package/data/docs/types/StepsItem.json +43 -0
  339. package/data/docs/types/StepsItemProps.json +9 -0
  340. package/data/docs/types/StepsList.json +28 -0
  341. package/data/docs/types/StepsListProps.json +9 -0
  342. package/data/docs/types/StepsNextTrigger.json +62 -0
  343. package/data/docs/types/StepsNextTriggerProps.json +9 -0
  344. package/data/docs/types/StepsNumber.json +28 -0
  345. package/data/docs/types/StepsNumberProps.json +9 -0
  346. package/data/docs/types/StepsPrevTrigger.json +62 -0
  347. package/data/docs/types/StepsPrevTriggerProps.json +9 -0
  348. package/data/docs/types/StepsRoot.json +183 -0
  349. package/data/docs/types/StepsRootProps.json +11 -0
  350. package/data/docs/types/StepsSeparator.json +28 -0
  351. package/data/docs/types/StepsSeparatorProps.json +9 -0
  352. package/data/docs/types/StepsStatus.json +57 -0
  353. package/data/docs/types/StepsStatusProps.json +9 -0
  354. package/data/docs/types/StepsTitle.json +28 -0
  355. package/data/docs/types/StepsTitleProps.json +9 -0
  356. package/data/docs/types/StepsTrigger.json +47 -0
  357. package/data/docs/types/StepsTriggerProps.json +9 -0
  358. package/data/docs/types/Switch.json +371 -0
  359. package/data/docs/types/TabListProps.json +9 -0
  360. package/data/docs/types/TabNav.json +12 -0
  361. package/data/docs/types/TabNavItem.json +300 -0
  362. package/data/docs/types/TabNavItemProps.json +9 -0
  363. package/data/docs/types/TabNavProps.json +9 -0
  364. package/data/docs/types/TabNavRoot.json +80 -0
  365. package/data/docs/types/TabPanelProps.json +9 -0
  366. package/data/docs/types/TabPanelsProps.json +9 -0
  367. package/data/docs/types/TabProps.json +9 -0
  368. package/data/docs/types/Table.json +9 -0
  369. package/data/docs/types/TableBody.json +67 -0
  370. package/data/docs/types/TableBodyProps.json +9 -0
  371. package/data/docs/types/TableCaption.json +67 -0
  372. package/data/docs/types/TableCaptionProps.json +9 -0
  373. package/data/docs/types/TableCell.json +227 -0
  374. package/data/docs/types/TableCellProps.json +9 -0
  375. package/data/docs/types/TableColumn.json +101 -0
  376. package/data/docs/types/TableColumnGroup.json +101 -0
  377. package/data/docs/types/TableColumnGroupProps.json +9 -0
  378. package/data/docs/types/TableColumnHeader.json +193 -0
  379. package/data/docs/types/TableColumnHeaderProps.json +9 -0
  380. package/data/docs/types/TableColumnProps.json +9 -0
  381. package/data/docs/types/TableFooter.json +67 -0
  382. package/data/docs/types/TableFooterProps.json +9 -0
  383. package/data/docs/types/TableHeader.json +67 -0
  384. package/data/docs/types/TableHeaderProps.json +9 -0
  385. package/data/docs/types/TableRoot.json +365 -0
  386. package/data/docs/types/TableRootProps.json +12 -0
  387. package/data/docs/types/TableRow.json +67 -0
  388. package/data/docs/types/TableRowProps.json +9 -0
  389. package/data/docs/types/TableScrollArea.json +82 -0
  390. package/data/docs/types/TableScrollAreaProps.json +9 -0
  391. package/data/docs/types/Tabs.json +12 -0
  392. package/data/docs/types/TabsList.json +110 -0
  393. package/data/docs/types/TabsPanel.json +112 -0
  394. package/data/docs/types/TabsPanels.json +108 -0
  395. package/data/docs/types/TabsRoot.json +211 -0
  396. package/data/docs/types/TabsTab.json +174 -0
  397. package/data/docs/types/TagGroup.json +12 -0
  398. package/data/docs/types/TagGroupRoot.json +306 -0
  399. package/data/docs/types/TagGroupTag.json +595 -0
  400. package/data/docs/types/TagGroupTagList.json +166 -0
  401. package/data/docs/types/Text.json +119 -0
  402. package/data/docs/types/TextInput.json +1156 -0
  403. package/data/docs/types/TextInputField.json +1263 -0
  404. package/data/docs/types/TimeInput.json +752 -0
  405. package/data/docs/types/ToastAction.json +9 -0
  406. package/data/docs/types/ToastManagerApi.json +9 -0
  407. package/data/docs/types/ToastOptions.json +9 -0
  408. package/data/docs/types/ToastOutlet.json +12 -0
  409. package/data/docs/types/ToastPlacement.json +9 -0
  410. package/data/docs/types/ToastPromiseOptions.json +9 -0
  411. package/data/docs/types/ToastType.json +9 -0
  412. package/data/docs/types/ToastVariant.json +9 -0
  413. package/data/docs/types/ToggleButton.json +789 -0
  414. package/data/docs/types/ToggleButtonGroup.json +9 -0
  415. package/data/docs/types/ToggleButtonGroupButton.json +331 -0
  416. package/data/docs/types/ToggleButtonGroupRoot.json +269 -0
  417. package/data/docs/types/Toolbar.json +176 -0
  418. package/data/docs/types/Tooltip.json +12 -0
  419. package/data/docs/types/TooltipContent.json +372 -0
  420. package/data/docs/types/TooltipRoot.json +179 -0
  421. package/data/docs/types/Trigger.json +69 -0
  422. package/data/docs/types/VisuallyHidden.json +93 -0
  423. package/data/docs/types/__object.json +12 -0
  424. package/data/docs/types/filters.json +11 -0
  425. package/data/docs/types/manifest.json +280 -0
  426. package/data/docs/types/toast.json +234 -0
  427. package/data/docs/types/useColorMode.json +13 -0
  428. package/data/docs/types/useColorModeValue.json +13 -0
  429. package/data/docs/types/useColorScheme.json +12 -0
  430. package/data/docs/types/useLocalizedStringFormatter.json +14 -0
  431. package/data/icons.json +21940 -0
  432. package/data/tokens.json +40061 -0
  433. package/dist/index.js +2516 -17
  434. package/package.json +25 -6
  435. package/dist/data-loader.d.ts +0 -102
  436. package/dist/data-loader.js +0 -104
  437. package/dist/index.d.ts +0 -13
  438. package/dist/server.d.ts +0 -9
  439. package/dist/server.js +0 -22
  440. package/dist/server.spec.d.ts +0 -1
  441. package/dist/server.spec.js +0 -69
  442. package/dist/tools/list-components.d.ts +0 -9
  443. package/dist/tools/list-components.js +0 -42
  444. package/dist/types.d.ts +0 -28
  445. package/dist/types.js +0 -4
  446. package/src/data-loader.ts +0 -226
  447. package/src/index.ts +0 -29
  448. package/src/server.spec.ts +0 -86
  449. package/src/server.ts +0 -28
  450. package/src/tools/list-components.ts +0 -49
  451. package/src/types.ts +0 -31
  452. package/tsconfig.json +0 -14
  453. package/vitest.config.ts +0 -9
@@ -0,0 +1,721 @@
1
+ {
2
+ "meta": {
3
+ "id": "Components-MoneyInput",
4
+ "title": "Money input",
5
+ "exportName": "MoneyInput",
6
+ "description": "A controlled input for money values that combines currency selection with amount input, supporting both standard and high-precision monetary values.",
7
+ "lifecycleState": "Stable",
8
+ "order": 999,
9
+ "repoPath": "packages/nimbus/src/components/money-input/money-input.mdx",
10
+ "menu": [
11
+ "Components",
12
+ "Inputs",
13
+ "Money input"
14
+ ],
15
+ "route": "components/inputs/money-input",
16
+ "tags": [
17
+ "component",
18
+ "input",
19
+ "currency",
20
+ "money"
21
+ ],
22
+ "toc": [
23
+ {
24
+ "value": "Overview",
25
+ "href": "#overview",
26
+ "depth": 2,
27
+ "numbering": [
28
+ 1,
29
+ 1
30
+ ],
31
+ "parent": "root"
32
+ },
33
+ {
34
+ "value": "Resources",
35
+ "href": "#resources",
36
+ "depth": 3,
37
+ "numbering": [
38
+ 1,
39
+ 1,
40
+ 1
41
+ ],
42
+ "parent": "root"
43
+ },
44
+ {
45
+ "value": "Variables",
46
+ "href": "#variables",
47
+ "depth": 2,
48
+ "numbering": [
49
+ 1,
50
+ 2
51
+ ],
52
+ "parent": "root"
53
+ },
54
+ {
55
+ "value": "Anatomy",
56
+ "href": "#anatomy",
57
+ "depth": 3,
58
+ "numbering": [
59
+ 1,
60
+ 2,
61
+ 1
62
+ ],
63
+ "parent": "root"
64
+ },
65
+ {
66
+ "value": "Multi-part functions",
67
+ "href": "#multi-part-functions",
68
+ "depth": 4,
69
+ "numbering": [
70
+ 1,
71
+ 2,
72
+ 1,
73
+ 1
74
+ ],
75
+ "parent": "root"
76
+ },
77
+ {
78
+ "value": "High-precision pricing",
79
+ "href": "#high-precision-pricing",
80
+ "depth": 4,
81
+ "numbering": [
82
+ 1,
83
+ 2,
84
+ 1,
85
+ 2
86
+ ],
87
+ "parent": "root"
88
+ },
89
+ {
90
+ "value": "Size",
91
+ "href": "#size",
92
+ "depth": 3,
93
+ "numbering": [
94
+ 1,
95
+ 2,
96
+ 2
97
+ ],
98
+ "parent": "root"
99
+ },
100
+ {
101
+ "value": "Medium",
102
+ "href": "#medium",
103
+ "depth": 4,
104
+ "numbering": [
105
+ 1,
106
+ 2,
107
+ 2,
108
+ 1
109
+ ],
110
+ "parent": "root"
111
+ },
112
+ {
113
+ "value": "Small",
114
+ "href": "#small",
115
+ "depth": 4,
116
+ "numbering": [
117
+ 1,
118
+ 2,
119
+ 2,
120
+ 2
121
+ ],
122
+ "parent": "root"
123
+ }
124
+ ],
125
+ "figmaLink": "https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=8463-23501&m=dev",
126
+ "layout": "app-frame",
127
+ "tabs": [
128
+ {
129
+ "key": "overview",
130
+ "title": "Overview",
131
+ "order": 0
132
+ },
133
+ {
134
+ "key": "guidelines",
135
+ "title": "Guidelines",
136
+ "order": 2
137
+ },
138
+ {
139
+ "key": "dev",
140
+ "title": "Implementation",
141
+ "order": 3
142
+ },
143
+ {
144
+ "key": "a11y",
145
+ "title": "Accessibility",
146
+ "order": 4
147
+ }
148
+ ]
149
+ },
150
+ "mdx": "\n## Overview\n\nThe money input component combines a currency selector (a dropdown menu) and a\nnumerical input field into a single, cohesive unit, offering robust states like\ndefault, invalid, and disabled, alongside specialized handling for focused and\nhovered interactions.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[React Aria Docs](https://react-spectrum.adobe.com/react-aria/NumberField.html)\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=8463-23501&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Anatomy\n\n#### Multi-part functions\n\nIn each localized money input, there is a dropdown to select the correct\ncurrency, a field that lets a user type in directly, and a stepper to allow for\nincremental numerical changes to the price shown within.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\", \"JPY\"]}\n />\n );\n}\n```\n\n#### High-precision pricing\n\nThis mode is essential for maintaining financial accuracy in large-scale or\ncomplex commercial systems.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.12345\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n hasHighPrecisionBadge\n />\n );\n}\n```\n\n### Size\n\n#### Medium\n\nDefault size common with other inputs.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n size=\"md\"\n />\n );\n}\n```\n\n#### Small\n\nCompact size for more condensed areas.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n size=\"sm\"\n />\n );\n}\n```\n",
151
+ "views": {
152
+ "overview": {
153
+ "mdx": "\n## Overview\n\nThe money input component combines a currency selector (a dropdown menu) and a\nnumerical input field into a single, cohesive unit, offering robust states like\ndefault, invalid, and disabled, alongside specialized handling for focused and\nhovered interactions.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[React Aria Docs](https://react-spectrum.adobe.com/react-aria/NumberField.html)\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=8463-23501&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Anatomy\n\n#### Multi-part functions\n\nIn each localized money input, there is a dropdown to select the correct\ncurrency, a field that lets a user type in directly, and a stepper to allow for\nincremental numerical changes to the price shown within.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\", \"JPY\"]}\n />\n );\n}\n```\n\n#### High-precision pricing\n\nThis mode is essential for maintaining financial accuracy in large-scale or\ncomplex commercial systems.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.12345\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n hasHighPrecisionBadge\n />\n );\n}\n```\n\n### Size\n\n#### Medium\n\nDefault size common with other inputs.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n size=\"md\"\n />\n );\n}\n```\n\n#### Small\n\nCompact size for more condensed areas.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n size=\"sm\"\n />\n );\n}\n```\n",
154
+ "toc": [
155
+ {
156
+ "value": "Overview",
157
+ "href": "#overview",
158
+ "depth": 2,
159
+ "numbering": [
160
+ 1,
161
+ 1
162
+ ],
163
+ "parent": "root"
164
+ },
165
+ {
166
+ "value": "Resources",
167
+ "href": "#resources",
168
+ "depth": 3,
169
+ "numbering": [
170
+ 1,
171
+ 1,
172
+ 1
173
+ ],
174
+ "parent": "root"
175
+ },
176
+ {
177
+ "value": "Variables",
178
+ "href": "#variables",
179
+ "depth": 2,
180
+ "numbering": [
181
+ 1,
182
+ 2
183
+ ],
184
+ "parent": "root"
185
+ },
186
+ {
187
+ "value": "Anatomy",
188
+ "href": "#anatomy",
189
+ "depth": 3,
190
+ "numbering": [
191
+ 1,
192
+ 2,
193
+ 1
194
+ ],
195
+ "parent": "root"
196
+ },
197
+ {
198
+ "value": "Multi-part functions",
199
+ "href": "#multi-part-functions",
200
+ "depth": 4,
201
+ "numbering": [
202
+ 1,
203
+ 2,
204
+ 1,
205
+ 1
206
+ ],
207
+ "parent": "root"
208
+ },
209
+ {
210
+ "value": "High-precision pricing",
211
+ "href": "#high-precision-pricing",
212
+ "depth": 4,
213
+ "numbering": [
214
+ 1,
215
+ 2,
216
+ 1,
217
+ 2
218
+ ],
219
+ "parent": "root"
220
+ },
221
+ {
222
+ "value": "Size",
223
+ "href": "#size",
224
+ "depth": 3,
225
+ "numbering": [
226
+ 1,
227
+ 2,
228
+ 2
229
+ ],
230
+ "parent": "root"
231
+ },
232
+ {
233
+ "value": "Medium",
234
+ "href": "#medium",
235
+ "depth": 4,
236
+ "numbering": [
237
+ 1,
238
+ 2,
239
+ 2,
240
+ 1
241
+ ],
242
+ "parent": "root"
243
+ },
244
+ {
245
+ "value": "Small",
246
+ "href": "#small",
247
+ "depth": 4,
248
+ "numbering": [
249
+ 1,
250
+ 2,
251
+ 2,
252
+ 2
253
+ ],
254
+ "parent": "root"
255
+ }
256
+ ]
257
+ },
258
+ "a11y": {
259
+ "mdx": "\n## Accessibility\n\nAccessibility ensures that digital content and functionality are usable by\neveryone, including people with disabilities, by addressing visual, auditory,\ncognitive, and physical limitations.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n />\n );\n}\n```\n\n### Accessibility standards\n\n- **Keyboard operability:** Ensure the user can navigate seamlessly between the\n currency selector and the number input using the tab key.\n- **ARIA roles:** The currency selector should function as an accessible\n dropdown/select menu, while the number input should use the appropriate number\n input type.\n- **Error communication:** Validation errors must be announced to screen\n readers. The invalid state should use `aria-invalid=\"true\"` on the input field\n and link to the error message via `aria-describedby`.\n- **Contrast:** Ensure sufficient color contrast for all text, borders, and\n icons, especially in the `invalid` and `disabled` states.\n- **Focus indication:** Maintain a strong, clear focus ring around both the\n currency menu and the number input when active.\n",
260
+ "toc": [
261
+ {
262
+ "value": "Accessibility",
263
+ "href": "#accessibility",
264
+ "depth": 2,
265
+ "numbering": [
266
+ 1,
267
+ 1
268
+ ],
269
+ "parent": "root"
270
+ },
271
+ {
272
+ "value": "Accessibility standards",
273
+ "href": "#accessibility-standards",
274
+ "depth": 3,
275
+ "numbering": [
276
+ 1,
277
+ 1,
278
+ 1
279
+ ],
280
+ "parent": "root"
281
+ }
282
+ ]
283
+ },
284
+ "dev": {
285
+ "mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { MoneyInput, type MoneyInputProps, type MoneyInputValue } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe `MoneyInput` is a controlled component that manages both an amount and a currency code. It requires a `value` object and an `onValueChange` handler.\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<MoneyInputValue>({\n amount: \"\",\n currencyCode: \"USD\"\n });\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n onValueChange={setValue}\n />\n <Text fontSize=\"sm\">\n Value: {value.amount} {value.currencyCode}\n </Text>\n </Stack>\n );\n}\n```\n\n## Usage examples\n\n### Size options\n\nThe `sm` and `md` size variants are available to match your interface density:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<MoneyInputValue>({\n amount: \"123.45\",\n currencyCode: \"USD\"\n });\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <MoneyInput\n size=\"sm\"\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n onValueChange={setValue}\n />\n <MoneyInput\n size=\"md\"\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n onValueChange={setValue}\n />\n </Stack>\n );\n}\n```\n\n### Currency configuration\n\nThe `currencies` prop controls the available options in the dropdown. If no currencies are provided (or an empty array is passed), the component renders a static label for the currency code instead of a dropdown.\n\n```jsx live-dev\nconst App = () => {\n const [value1, setValue1] = useState<MoneyInputValue>({\n amount: \"100.00\",\n currencyCode: \"USD\"\n });\n\n const [value2, setValue2] = useState<MoneyInputValue>({\n amount: \"50.00\",\n currencyCode: \"EUR\"\n });\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Text fontWeight=\"bold\">Multiple currencies (Dropdown)</Text>\n <MoneyInput\n value={value1}\n currencies={[\"USD\", \"EUR\", \"GBP\", \"JPY\"]}\n onValueChange={setValue1}\n />\n\n <Text fontWeight=\"bold\">No currencies list (Static Label)</Text>\n <MoneyInput\n value={value2}\n currencies={[]}\n onValueChange={setValue2}\n />\n </Stack>\n );\n}\n```\n\n### High precision support\n\nThe `MoneyInput` automatically detects high precision values (more decimal places than standard for the currency) and displays a \"High Precision\" badge. This feature can be toggled with `hasHighPrecisionBadge`.\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<MoneyInputValue>({\n amount: \"123.4567\",\n currencyCode: \"USD\"\n });\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Text fontSize=\"sm\">\n Try entering more than 2 decimal places for USD (e.g., 123.4567)\n </Text>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n onValueChange={setValue}\n hasHighPrecisionBadge={true}\n />\n </Stack>\n );\n}\n```\n\n### State variations\n\nThe component supports standard interactive states including disabled, read-only, and invalid.\n\n```jsx live-dev\nconst App = () => {\n const value = { amount: \"123.45\", currencyCode: \"USD\" };\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <MoneyInput\n aria-label=\"Disabled\"\n value={value}\n currencies={[\"USD\"]}\n isDisabled\n />\n <MoneyInput\n aria-label=\"Read-only\"\n value={value}\n currencies={[\"USD\"]}\n isReadOnly\n />\n <MoneyInput\n aria-label=\"Invalid\"\n value={value}\n currencies={[\"USD\"]}\n isInvalid\n />\n </Stack>\n );\n}\n```\n\n### Currency input control\n\nUse `isCurrencyInputDisabled` to disable only the currency selector while keeping the amount input editable. This is useful when the currency is predetermined but the amount should still be modifiable.\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<MoneyInputValue>({\n amount: \"123.45\",\n currencyCode: \"USD\"\n });\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Text fontWeight=\"bold\">Currency selector enabled</Text>\n <MoneyInput\n aria-label=\"Price with currency selection\"\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n onValueChange={setValue}\n />\n\n <Text fontWeight=\"bold\">Currency selector disabled</Text>\n <MoneyInput\n aria-label=\"Price with fixed currency\"\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n onValueChange={setValue}\n isCurrencyInputDisabled\n />\n\n <Text fontSize=\"sm\">\n Current value: {value.amount} {value.currencyCode}\n </Text>\n </Stack>\n );\n}\n```\n\n### Event handlers\n\nThe component provides granular event handlers for modern integration patterns:\n- `onValueChange`: Called when either amount or currency changes (recommended)\n- `onAmountChange`: Called when only the amount changes\n- `onCurrencyChange`: Called when only the currency changes\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<MoneyInputValue>({\n amount: \"\",\n currencyCode: \"USD\"\n });\n const [lastAmountChange, setLastAmountChange] = useState<string>(\"-\");\n const [lastCurrencyChange, setLastCurrencyChange] = useState<string>(\"-\");\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n onValueChange={(newValue) => {\n setValue(newValue);\n }}\n onAmountChange={(amount) => setLastAmountChange(amount || \"(empty)\")}\n onCurrencyChange={(code) => setLastCurrencyChange(code)}\n />\n <Stack direction=\"column\" gap=\"200\">\n <Text fontSize=\"sm\">Current value: {value.amount} {value.currencyCode}</Text>\n <Text fontSize=\"sm\">Last amount change: {lastAmountChange}</Text>\n <Text fontSize=\"sm\">Last currency change: {lastCurrencyChange}</Text>\n </Stack>\n </Stack>\n );\n}\n```\n\n## Component requirements\n\n### Value type requirements\n\nThe `value` prop must be an object matching the `MoneyInputValue` interface:\n\n```tsx\ntype MoneyInputValue = {\n amount: string;\n currencyCode: string;\n};\n```\n\nNote that `amount` is a string to preserve precision and avoid floating-point errors.\n\n## Accessibility\n\nThe `MoneyInput` handles accessibility requirements for its internal input and select components. However, you must always associate a label with the component.\n\nUsing `aria-label`:\n\n```tsx\n<MoneyInput\n aria-label=\"Product Price\"\n value={value}\n // ...\n/>\n```\n\nUsing `aria-labelledby`:\n\n```tsx\n<label id=\"price-label\">Product Price</label>\n<MoneyInput\n aria-labelledby=\"price-label\"\n value={value}\n // ...\n/>\n```\n\nIf your use case requires tracking and analytics for this component, it is good practice to add a **persistent**, **unique** id to the component:\n\n```tsx\nconst PERSISTENT_ID = \"product-price-input\";\n\nexport const Example = () => (\n <MoneyInput id={PERSISTENT_ID} value={value} />\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n- `Tab`: Moves focus between the currency dropdown and the amount input.\n- `Arrow Keys` (in Dropdown): Navigates between currency options.\n- `Enter` / `Space` (in Dropdown): Selects the currency.\n- `Arrow Keys` (in Input): Adjusts the cursor position.\n\n## API reference\n\n<PropsTable id=\"MoneyInput\" />\n\n## Common patterns\n\n### Working with locales\n\nThe `MoneyInput` uses the application's locale (via `NimbusI18nProvider`) to format numbers appropriately (e.g., using commas for decimals in German).\n\n```jsx live-dev\nconst App = () => {\n // Note: In a real app, NimbusI18nProvider would wrap the entire app\n // This example simulates different locales\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Text fontWeight=\"bold\">German Locale (de-DE)</Text>\n <NimbusI18nProvider locale=\"de-DE\">\n <MoneyInput\n value={{ amount: \"1234.56\", currencyCode: \"EUR\" }}\n currencies={[\"EUR\"]}\n isReadOnly\n />\n </NimbusI18nProvider>\n\n <Text fontWeight=\"bold\">US Locale (en-US)</Text>\n <NimbusI18nProvider locale=\"en-US\">\n <MoneyInput\n value={{ amount: \"1234.56\", currencyCode: \"USD\" }}\n currencies={[\"USD\"]}\n isReadOnly\n />\n </NimbusI18nProvider>\n </Stack>\n );\n}\n```\n\n## Static utility methods\n\nThe MoneyInput component provides static utility methods for advanced use cases like testing, API integration, and form validation. These methods are particularly useful for compatibility and working with backend data formats.\n\n### ID helper methods\n\nThese methods generate element IDs for DOM access and testing:\n\n#### getAmountInputId\n\nReturns the ID of the amount input element within a MoneyInput.\n\n```tsx\n// Usage in testing or DOM manipulation\nconst amountInputId = MoneyInput.getAmountInputId(\"product-price\");\n// Returns: \"product-price.amount\"\n\n// Example: Focus the amount input programmatically\nconst amountInput = document.getElementById(amountInputId);\namountInput?.focus();\n```\n\n#### getCurrencyDropdownId\n\nReturns the ID of the currency dropdown element within a MoneyInput.\n\n```tsx\n// Usage in testing or DOM manipulation\nconst currencyDropdownId = MoneyInput.getCurrencyDropdownId(\"product-price\");\n// Returns: \"product-price.currencyCode\"\n\n// Example: Access the currency dropdown in tests\nconst currencyDropdown = document.getElementById(currencyDropdownId);\n```\n\n**Use case:** These methods are helpful when writing integration tests or when you need to programmatically interact with specific parts of the MoneyInput component.\n\n### Data transformation methods\n\nThese methods convert between UI format (`MoneyInputValue`) and API format (`MoneyValue`):\n\n#### convertToMoneyValue\n\nConverts a MoneyInputValue (UI format with string amount) to MoneyValue (API format with centAmount).\n\n```tsx\nimport { MoneyInput, type MoneyInputValue, type MoneyValue } from '@commercetools/nimbus';\n\n// Convert UI value to API format before submission\nconst uiValue: MoneyInputValue = {\n amount: \"123.45\",\n currencyCode: \"USD\"\n};\n\nconst apiValue: MoneyValue = MoneyInput.convertToMoneyValue(uiValue, \"en-US\");\n// Returns: {\n// type: \"centPrecision\",\n// currencyCode: \"USD\",\n// centAmount: 12345,\n// fractionDigits: 2\n// }\n\n// For high precision values\nconst highPrecisionValue: MoneyInputValue = {\n amount: \"123.4567\",\n currencyCode: \"USD\"\n};\n\nconst apiHighPrecision: MoneyValue = MoneyInput.convertToMoneyValue(\n highPrecisionValue,\n \"en-US\"\n);\n// Returns: {\n// type: \"highPrecision\",\n// currencyCode: \"USD\",\n// centAmount: 12346, // Rounded to standard precision\n// preciseAmount: 1234567,\n// fractionDigits: 4\n// }\n```\n\n#### parseMoneyValue\n\nConverts a MoneyValue (API format) to MoneyInputValue (UI format) for display in the component.\n\n```tsx\nimport { MoneyInput, type MoneyValue, type MoneyInputValue } from '@commercetools/nimbus';\n\n// Convert API data to UI format when loading\nconst apiValue: MoneyValue = {\n type: \"centPrecision\",\n currencyCode: \"EUR\",\n centAmount: 9999,\n fractionDigits: 2\n};\n\nconst uiValue: MoneyInputValue = MoneyInput.parseMoneyValue(apiValue, \"en-US\");\n// Returns: {\n// amount: \"99.99\",\n// currencyCode: \"EUR\"\n// }\n\n// Example: Loading data from API\nconst ProductPriceEditor = ({ productId }: { productId: string }) => {\n const [value, setValue] = useState<MoneyInputValue>({ amount: \"\", currencyCode: \"USD\" });\n\n useEffect(() => {\n async function loadProduct() {\n const product = await fetchProduct(productId);\n // Convert API MoneyValue to UI format\n const uiValue = MoneyInput.parseMoneyValue(product.price, navigator.language);\n setValue(uiValue);\n }\n loadProduct();\n }, [productId]);\n\n return (\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n onValueChange={setValue}\n aria-label=\"Product Price\"\n />\n );\n};\n```\n\n**Use case:** These methods enable seamless integration with commercetools APIs and other backends that use the MoneyValue format with `centAmount` and `preciseAmount` fields.\n\n### Validation methods\n\nThese methods validate MoneyInputValue data:\n\n#### isEmpty\n\nChecks if a MoneyInputValue is empty (missing amount or currency).\n\n```tsx\nimport { MoneyInput, type MoneyInputValue } from '@commercetools/nimbus';\n\n// Check before form submission\nconst handleSubmit = (value: MoneyInputValue) => {\n if (MoneyInput.isEmpty(value)) {\n alert(\"Please enter a price\");\n return;\n }\n\n // Proceed with submission\n submitPrice(value);\n};\n\n// Example values\nMoneyInput.isEmpty({ amount: \"\", currencyCode: \"USD\" }); // true\nMoneyInput.isEmpty({ amount: \"100\", currencyCode: \"\" }); // true\nMoneyInput.isEmpty({ amount: \"100\", currencyCode: \"USD\" }); // false\n```\n\n#### isHighPrecision\n\nChecks if a MoneyInputValue exceeds the standard precision for its currency.\n\n```tsx\nimport { MoneyInput, type MoneyInputValue } from '@commercetools/nimbus';\n\n// Check if value needs high precision handling\nconst value: MoneyInputValue = {\n amount: \"123.4567\",\n currencyCode: \"USD\" // USD standard precision is 2\n};\n\nconst needsHighPrecision = MoneyInput.isHighPrecision(value, \"en-US\");\n// Returns: true (4 decimals > 2 standard for USD)\n\n// Example: Warn users about precision\nconst PriceInput = () => {\n const [value, setValue] = useState<MoneyInputValue>({\n amount: \"\",\n currencyCode: \"USD\"\n });\n\n const showPrecisionWarning = MoneyInput.isHighPrecision(value, navigator.language);\n\n return (\n <Stack direction=\"column\" gap=\"200\">\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n onValueChange={setValue}\n aria-label=\"Price\"\n />\n {showPrecisionWarning && (\n <Text color=\"warning\" fontSize=\"sm\">\n This price uses high precision formatting\n </Text>\n )}\n </Stack>\n );\n};\n```\n\n**Use case:** These methods help validate form data before submission and provide appropriate user feedback.\n\n### Type definitions\n\nWhen using static methods, you'll need these type imports:\n\n```tsx\nimport {\n MoneyInput,\n type MoneyInputValue, // UI format: { amount: string, currencyCode: string }\n type MoneyValue, // API format: { centAmount: number, currencyCode, ... }\n type CurrencyCode, // Valid currency codes\n} from '@commercetools/nimbus';\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using MoneyInput within your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic Rendering Tests\n\nVerify the component renders with expected elements\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor, within } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { MoneyInput, NimbusProvider } from \"@commercetools/nimbus\";\nimport type { MoneyInputValue } from \"./money-input.types\";\n\ndescribe(\"MoneyInput - Basic rendering\", () => {\n it(\"renders with initial value\", () => {\n const value: MoneyInputValue = { amount: \"100.00\", currencyCode: \"USD\" };\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n // NumberInput displays formatted numeric values\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveValue(\"100.00\");\n\n // Currency button should be visible\n expect(\n screen.getByRole(\"button\", { name: /USD.*Currency/i })\n ).toBeInTheDocument();\n });\n\n it(\"renders with multiple currencies in dropdown\", () => {\n const value: MoneyInputValue = { amount: \"50.00\", currencyCode: \"EUR\" };\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n // Currency button should be visible\n expect(\n screen.getByRole(\"button\", { name: /EUR.*Currency/i })\n ).toBeInTheDocument();\n\n // Amount input should be present\n const input = screen.getByRole(\"textbox\");\n expect(input).toBeInTheDocument();\n });\n\n it(\"renders static currency label when no currencies provided\", () => {\n const value: MoneyInputValue = { amount: \"100.00\", currencyCode: \"USD\" };\n render(\n <NimbusProvider>\n <MoneyInput value={value} currencies={[]} aria-label=\"Price\" />\n </NimbusProvider>\n );\n\n // Should show static label text\n expect(screen.getByText(\"USD\")).toBeInTheDocument();\n\n // No currency button should exist\n expect(\n screen.queryByRole(\"button\", { name: /Currency/i })\n ).not.toBeInTheDocument();\n\n // Amount input should be present\n const input = screen.getByRole(\"textbox\");\n expect(input).toBeInTheDocument();\n });\n});\n```\n\n### Interaction Tests\n\nTest user interactions with amount input and currency selector\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor, within } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { MoneyInput, NimbusProvider } from \"@commercetools/nimbus\";\nimport type { MoneyInputValue } from \"./money-input.types\";\n\ndescribe(\"MoneyInput - Interactions\", () => {\n it(\"updates amount when user types\", async () => {\n const user = userEvent.setup();\n const handleChange = vi.fn();\n const value: MoneyInputValue = { amount: \"\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n onValueChange={handleChange}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n await user.clear(input);\n await user.type(input, \"50.00\");\n await user.tab(); // Blur the input to trigger final change\n\n // onValueChange should be called with updated amount\n expect(handleChange).toHaveBeenCalled();\n expect(handleChange).toHaveBeenCalledWith(\n expect.objectContaining({\n amount: expect.stringContaining(\"50\"),\n currencyCode: \"USD\",\n })\n );\n });\n\n it(\"updates currency when user selects from dropdown\", async () => {\n const user = userEvent.setup();\n const handleChange = vi.fn();\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n onValueChange={handleChange}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n // Click on the currency button to open dropdown\n const trigger = screen.getByRole(\"button\", { name: /USD.*Currency/i });\n await user.click(trigger);\n\n // Wait for dropdown to appear and select EUR\n await waitFor(() => {\n const listbox = within(document.body).getByRole(\"listbox\");\n expect(listbox).toBeInTheDocument();\n });\n\n const eurOption = within(document.body).getByRole(\"option\", {\n name: \"EUR\",\n });\n await user.click(eurOption);\n\n // Verify currency change handler was called\n expect(handleChange).toHaveBeenCalledWith(\n expect.objectContaining({\n amount: \"100\",\n currencyCode: \"EUR\",\n })\n );\n });\n\n it(\"calls onAmountChange when amount changes\", async () => {\n const user = userEvent.setup();\n const handleAmountChange = vi.fn();\n const value: MoneyInputValue = { amount: \"\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n onAmountChange={handleAmountChange}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n await user.clear(input);\n await user.type(input, \"123\");\n await user.tab(); // Blur the input to trigger change\n\n expect(handleAmountChange).toHaveBeenCalled();\n });\n\n it(\"calls onCurrencyChange when currency changes\", async () => {\n const user = userEvent.setup();\n const handleCurrencyChange = vi.fn();\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n onCurrencyChange={handleCurrencyChange}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n // Open dropdown and select EUR\n await user.click(screen.getByRole(\"button\", { name: /USD.*Currency/i }));\n\n await waitFor(() => {\n const listbox = within(document.body).getByRole(\"listbox\");\n expect(listbox).toBeInTheDocument();\n });\n\n const eurOption = within(document.body).getByRole(\"option\", {\n name: \"EUR\",\n });\n await user.click(eurOption);\n\n expect(handleCurrencyChange).toHaveBeenCalledWith(\"EUR\");\n });\n});\n```\n\n### Testing High Precision Support\n\nTest high precision badge display and behavior\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor, within } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { MoneyInput, NimbusProvider } from \"@commercetools/nimbus\";\nimport type { MoneyInputValue } from \"./money-input.types\";\n\ndescribe(\"MoneyInput - High precision\", () => {\n it(\"shows high precision badge for values exceeding standard precision\", () => {\n // USD typically has 2 decimal places, 4 decimals is high precision\n const value: MoneyInputValue = {\n amount: \"100.1234\",\n currencyCode: \"USD\",\n };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n hasHighPrecisionBadge={true}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const badge = screen.getByLabelText(/High precision/i);\n expect(badge).toBeInTheDocument();\n });\n\n it(\"does not show badge for standard precision\", () => {\n // USD with standard 2 decimal places\n const value: MoneyInputValue = { amount: \"100.12\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n hasHighPrecisionBadge={true}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const badge = screen.queryByLabelText(/High precision/i);\n expect(badge).not.toBeInTheDocument();\n });\n\n it(\"hides badge when hasHighPrecisionBadge is false\", () => {\n const value: MoneyInputValue = {\n amount: \"100.1234\",\n currencyCode: \"USD\",\n };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n hasHighPrecisionBadge={false}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const badge = screen.queryByLabelText(/High precision/i);\n expect(badge).not.toBeInTheDocument();\n });\n});\n```\n\n### Testing Validation States\n\nTest disabled, read-only, invalid, and required states\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor, within } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { MoneyInput, NimbusProvider } from \"@commercetools/nimbus\";\nimport type { MoneyInputValue } from \"./money-input.types\";\n\ndescribe(\"MoneyInput - Validation states\", () => {\n it(\"renders disabled state\", () => {\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n isDisabled\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toBeDisabled();\n\n // Currency button should also be disabled\n const currencyButton = screen.getByRole(\"button\", {\n name: /USD.*Currency/i,\n });\n expect(currencyButton).toBeDisabled();\n });\n\n it(\"renders read-only state\", () => {\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n isReadOnly\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveAttribute(\"readonly\");\n });\n\n it(\"renders invalid state\", () => {\n const value: MoneyInputValue = { amount: \"invalid\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n isInvalid\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveAttribute(\"aria-invalid\", \"true\");\n });\n\n it(\"renders required state\", () => {\n const value: MoneyInputValue = { amount: \"\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\"]}\n isRequired\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveAttribute(\"aria-required\", \"true\");\n });\n\n it(\"disables only currency selector with isCurrencyInputDisabled\", () => {\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\"]}\n isCurrencyInputDisabled\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n // Amount input should be enabled\n const input = screen.getByRole(\"textbox\");\n expect(input).not.toBeDisabled();\n\n // Currency button should be disabled\n const currencyButton = screen.getByRole(\"button\", {\n name: /USD.*Currency/i,\n });\n expect(currencyButton).toBeDisabled();\n });\n});\n```\n\n### Testing Currency Configuration\n\nTest different currency list configurations\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor, within } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { MoneyInput, NimbusProvider } from \"@commercetools/nimbus\";\nimport type { MoneyInputValue } from \"./money-input.types\";\n\ndescribe(\"MoneyInput - Currency configuration\", () => {\n it(\"renders dropdown when multiple currencies provided\", () => {\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"USD\" };\n\n render(\n <NimbusProvider>\n <MoneyInput\n value={value}\n currencies={[\"USD\", \"EUR\", \"GBP\"]}\n aria-label=\"Price\"\n />\n </NimbusProvider>\n );\n\n // Verify currency button is displayed\n expect(\n screen.getByRole(\"button\", { name: /USD.*Currency/i })\n ).toBeInTheDocument();\n });\n\n it(\"renders static label when empty currencies array\", () => {\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"EUR\" };\n\n render(\n <NimbusProvider>\n <MoneyInput value={value} currencies={[]} aria-label=\"Price\" />\n </NimbusProvider>\n );\n\n // Static label present\n expect(screen.getByText(\"EUR\")).toBeInTheDocument();\n });\n\n it(\"renders static label when currencies prop omitted\", () => {\n const value: MoneyInputValue = { amount: \"100\", currencyCode: \"JPY\" };\n\n render(\n <NimbusProvider>\n <MoneyInput value={value} aria-label=\"Price\" />\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"JPY\")).toBeInTheDocument();\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-moneyinput--docs)\n- [React Aria NumberField](https://react-spectrum.adobe.com/react-aria/NumberField.html)\n- [React Aria Select](https://react-spectrum.adobe.com/react-aria/Select.html)\n",
286
+ "toc": [
287
+ {
288
+ "value": "Getting started",
289
+ "href": "#getting-started",
290
+ "depth": 2,
291
+ "numbering": [
292
+ 1,
293
+ 1
294
+ ],
295
+ "parent": "root"
296
+ },
297
+ {
298
+ "value": "Import",
299
+ "href": "#import",
300
+ "depth": 3,
301
+ "numbering": [
302
+ 1,
303
+ 1,
304
+ 1
305
+ ],
306
+ "parent": "root"
307
+ },
308
+ {
309
+ "value": "Basic usage",
310
+ "href": "#basic-usage",
311
+ "depth": 3,
312
+ "numbering": [
313
+ 1,
314
+ 1,
315
+ 2
316
+ ],
317
+ "parent": "root"
318
+ },
319
+ {
320
+ "value": "Usage examples",
321
+ "href": "#usage-examples",
322
+ "depth": 2,
323
+ "numbering": [
324
+ 1,
325
+ 2
326
+ ],
327
+ "parent": "root"
328
+ },
329
+ {
330
+ "value": "Size options",
331
+ "href": "#size-options",
332
+ "depth": 3,
333
+ "numbering": [
334
+ 1,
335
+ 2,
336
+ 1
337
+ ],
338
+ "parent": "root"
339
+ },
340
+ {
341
+ "value": "Currency configuration",
342
+ "href": "#currency-configuration",
343
+ "depth": 3,
344
+ "numbering": [
345
+ 1,
346
+ 2,
347
+ 2
348
+ ],
349
+ "parent": "root"
350
+ },
351
+ {
352
+ "value": "High precision support",
353
+ "href": "#high-precision-support",
354
+ "depth": 3,
355
+ "numbering": [
356
+ 1,
357
+ 2,
358
+ 3
359
+ ],
360
+ "parent": "root"
361
+ },
362
+ {
363
+ "value": "State variations",
364
+ "href": "#state-variations",
365
+ "depth": 3,
366
+ "numbering": [
367
+ 1,
368
+ 2,
369
+ 4
370
+ ],
371
+ "parent": "root"
372
+ },
373
+ {
374
+ "value": "Currency input control",
375
+ "href": "#currency-input-control",
376
+ "depth": 3,
377
+ "numbering": [
378
+ 1,
379
+ 2,
380
+ 5
381
+ ],
382
+ "parent": "root"
383
+ },
384
+ {
385
+ "value": "Event handlers",
386
+ "href": "#event-handlers",
387
+ "depth": 3,
388
+ "numbering": [
389
+ 1,
390
+ 2,
391
+ 6
392
+ ],
393
+ "parent": "root"
394
+ },
395
+ {
396
+ "value": "Component requirements",
397
+ "href": "#component-requirements",
398
+ "depth": 2,
399
+ "numbering": [
400
+ 1,
401
+ 3
402
+ ],
403
+ "parent": "root"
404
+ },
405
+ {
406
+ "value": "Value type requirements",
407
+ "href": "#value-type-requirements",
408
+ "depth": 3,
409
+ "numbering": [
410
+ 1,
411
+ 3,
412
+ 1
413
+ ],
414
+ "parent": "root"
415
+ },
416
+ {
417
+ "value": "Accessibility",
418
+ "href": "#accessibility",
419
+ "depth": 2,
420
+ "numbering": [
421
+ 1,
422
+ 4
423
+ ],
424
+ "parent": "root"
425
+ },
426
+ {
427
+ "value": "Keyboard navigation",
428
+ "href": "#keyboard-navigation",
429
+ "depth": 4,
430
+ "numbering": [
431
+ 1,
432
+ 4,
433
+ 1,
434
+ 1
435
+ ],
436
+ "parent": "root"
437
+ },
438
+ {
439
+ "value": "API reference",
440
+ "href": "#api-reference",
441
+ "depth": 2,
442
+ "numbering": [
443
+ 1,
444
+ 5
445
+ ],
446
+ "parent": "root"
447
+ },
448
+ {
449
+ "value": "Common patterns",
450
+ "href": "#common-patterns",
451
+ "depth": 2,
452
+ "numbering": [
453
+ 1,
454
+ 6
455
+ ],
456
+ "parent": "root"
457
+ },
458
+ {
459
+ "value": "Working with locales",
460
+ "href": "#working-with-locales",
461
+ "depth": 3,
462
+ "numbering": [
463
+ 1,
464
+ 6,
465
+ 1
466
+ ],
467
+ "parent": "root"
468
+ },
469
+ {
470
+ "value": "Static utility methods",
471
+ "href": "#static-utility-methods",
472
+ "depth": 2,
473
+ "numbering": [
474
+ 1,
475
+ 7
476
+ ],
477
+ "parent": "root"
478
+ },
479
+ {
480
+ "value": "ID helper methods",
481
+ "href": "#id-helper-methods",
482
+ "depth": 3,
483
+ "numbering": [
484
+ 1,
485
+ 7,
486
+ 1
487
+ ],
488
+ "parent": "root"
489
+ },
490
+ {
491
+ "value": "getAmountInputId",
492
+ "href": "#getamountinputid",
493
+ "depth": 4,
494
+ "numbering": [
495
+ 1,
496
+ 7,
497
+ 1,
498
+ 1
499
+ ],
500
+ "parent": "root"
501
+ },
502
+ {
503
+ "value": "getCurrencyDropdownId",
504
+ "href": "#getcurrencydropdownid",
505
+ "depth": 4,
506
+ "numbering": [
507
+ 1,
508
+ 7,
509
+ 1,
510
+ 2
511
+ ],
512
+ "parent": "root"
513
+ },
514
+ {
515
+ "value": "Data transformation methods",
516
+ "href": "#data-transformation-methods",
517
+ "depth": 3,
518
+ "numbering": [
519
+ 1,
520
+ 7,
521
+ 2
522
+ ],
523
+ "parent": "root"
524
+ },
525
+ {
526
+ "value": "convertToMoneyValue",
527
+ "href": "#converttomoneyvalue",
528
+ "depth": 4,
529
+ "numbering": [
530
+ 1,
531
+ 7,
532
+ 2,
533
+ 1
534
+ ],
535
+ "parent": "root"
536
+ },
537
+ {
538
+ "value": "parseMoneyValue",
539
+ "href": "#parsemoneyvalue",
540
+ "depth": 4,
541
+ "numbering": [
542
+ 1,
543
+ 7,
544
+ 2,
545
+ 2
546
+ ],
547
+ "parent": "root"
548
+ },
549
+ {
550
+ "value": "Validation methods",
551
+ "href": "#validation-methods",
552
+ "depth": 3,
553
+ "numbering": [
554
+ 1,
555
+ 7,
556
+ 3
557
+ ],
558
+ "parent": "root"
559
+ },
560
+ {
561
+ "value": "isEmpty",
562
+ "href": "#isempty",
563
+ "depth": 4,
564
+ "numbering": [
565
+ 1,
566
+ 7,
567
+ 3,
568
+ 1
569
+ ],
570
+ "parent": "root"
571
+ },
572
+ {
573
+ "value": "isHighPrecision",
574
+ "href": "#ishighprecision",
575
+ "depth": 4,
576
+ "numbering": [
577
+ 1,
578
+ 7,
579
+ 3,
580
+ 2
581
+ ],
582
+ "parent": "root"
583
+ },
584
+ {
585
+ "value": "Type definitions",
586
+ "href": "#type-definitions",
587
+ "depth": 3,
588
+ "numbering": [
589
+ 1,
590
+ 7,
591
+ 4
592
+ ],
593
+ "parent": "root"
594
+ },
595
+ {
596
+ "value": "Testing your implementation",
597
+ "href": "#testing-your-implementation",
598
+ "depth": 2,
599
+ "numbering": [
600
+ 1,
601
+ 8
602
+ ],
603
+ "parent": "root"
604
+ },
605
+ {
606
+ "value": "Basic Rendering Tests",
607
+ "href": "#basic-rendering-tests",
608
+ "depth": 3,
609
+ "numbering": [
610
+ 1,
611
+ 8,
612
+ 1
613
+ ],
614
+ "parent": "root"
615
+ },
616
+ {
617
+ "value": "Interaction Tests",
618
+ "href": "#interaction-tests",
619
+ "depth": 3,
620
+ "numbering": [
621
+ 1,
622
+ 8,
623
+ 2
624
+ ],
625
+ "parent": "root"
626
+ },
627
+ {
628
+ "value": "Testing High Precision Support",
629
+ "href": "#testing-high-precision-support",
630
+ "depth": 3,
631
+ "numbering": [
632
+ 1,
633
+ 8,
634
+ 3
635
+ ],
636
+ "parent": "root"
637
+ },
638
+ {
639
+ "value": "Testing Validation States",
640
+ "href": "#testing-validation-states",
641
+ "depth": 3,
642
+ "numbering": [
643
+ 1,
644
+ 8,
645
+ 4
646
+ ],
647
+ "parent": "root"
648
+ },
649
+ {
650
+ "value": "Testing Currency Configuration",
651
+ "href": "#testing-currency-configuration",
652
+ "depth": 3,
653
+ "numbering": [
654
+ 1,
655
+ 8,
656
+ 5
657
+ ],
658
+ "parent": "root"
659
+ },
660
+ {
661
+ "value": "Resources",
662
+ "href": "#resources",
663
+ "depth": 2,
664
+ "numbering": [
665
+ 1,
666
+ 9
667
+ ],
668
+ "parent": "root"
669
+ }
670
+ ]
671
+ },
672
+ "guidelines": {
673
+ "mdx": "\n## Guidelines\n\nMoney input guidelines offer best practice and usage guides to keep user\nexperience accessible and familiar, ensuring consistency and high ease of use.\n\n### Best practices\n\n- **Default currency:** Pre-select the most common or local currency for the\n user based on location or historical data to minimize input effort.\n- **Clear labeling:** Always use a persistent, descriptive label (e.g., \"Product\n price,\" \"Shipping cost\") and ensure the currency field and numerical input are\n visually grouped as one component.\n- **Validation feedback:** Provide immediate, clear, and action-oriented error\n messages and visual cues when validation fails (e.g., input is non-numeric, or\n violates range constraints).\n- **Precision guidance:** Utilize the \"High precision price\" tooltip or similar\n mechanisms to explain special input requirements for decimal places or\n specific pricing rules.\n- **Logical currency ordering:** Order the currency dropdown options logically,\n typically placing the most common currencies first, followed by an\n alphabetical list.\n\n### Usage\n\nUtilizing money input should be consistent, and relevant for the data needed.\n\n> [!TIP]\\\n> When to use\n\n- **Currency flexibility:** When the user must select the currency alongside the\n value. Recording multiple prices that are specific to currency.\n- **Price configuration:** For setting product prices, discounts, taxes, or\n inventory costs in a back-office system.\n- **Transactional input:** When capturing any customer-facing input that\n involves currency and payment (e.g., donation amount).\n\n> [!CAUTION]\\\n> When not to use\n\n- **Simple currency display:** Do not use the full input component just to\n display a currency value. Use formatted text instead.\n- **Pure numerical data:** If the input is only a number and does not involve\n money, use a standard number input.\n- **Fixed currency:** If the currency is guaranteed to be fixed (e.g., always\n USD) and selection is not required, use a standard text input with a fixed\n currency symbol/label appended.\n\n### Money input in use\n\n> [!TIP]\\\n> **Do**\n>\n> - Do make both the currency selector and the number input easily accessible.\n> - Do provide helper text or tooltips (like the \"High precision price\" tooltip)\n> for complex constraints.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20.12345\",\n currencyCode: \"EUR\"\n });\n\n return (\n <FormField.Root>\n <FormField.Label>Product Price</FormField.Label>\n <FormField.Input>\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\", \"USD\", \"GBP\"]}\n hasHighPrecisionBadge\n />\n </FormField.Input>\n <FormField.Description>\n High precision pricing available for detailed financial accuracy\n </FormField.Description>\n </FormField.Root>\n );\n}\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't hide the currency selector if the currency is not fixed.\n> - Don't use a money input if there is a default single currency or if the\n> number does not represent a currency.\n> - Don't allow users to submit the form with an invalid or incorrectly\n> formatted currency or number.\n> - Don't use lengthy error messages; keep them concise and focus on the\n> solution.\n\n```jsx live\nconst App = () => {\n const [value, setValue] = React.useState({\n amount: \"20\",\n currencyCode: \"EUR\"\n });\n\n return (\n <FormField.Root isInvalid>\n <FormField.Label>Product Price</FormField.Label>\n <FormField.Input>\n <MoneyInput\n value={value}\n onValueChange={setValue}\n currencies={[\"EUR\"]}\n isInvalid\n width=\"100%\"\n />\n </FormField.Input>\n <FormField.Error>\n FATAL CLIENT-SIDE VALIDATION FAILURE: The input string for the Product Price field did not pass the REGEX matching criteria for the accepted numeric float and currency locale object structure. Data integrity requires a value greater than the currently defined minimum threshold, which is configured for 30.00 base units, and must contain two trailing decimal places, regardless of whether the final calculated value is a whole integer.\n </FormField.Error>\n </FormField.Root>\n );\n}\n```\n",
674
+ "toc": [
675
+ {
676
+ "value": "Guidelines",
677
+ "href": "#guidelines",
678
+ "depth": 2,
679
+ "numbering": [
680
+ 1,
681
+ 1
682
+ ],
683
+ "parent": "root"
684
+ },
685
+ {
686
+ "value": "Best practices",
687
+ "href": "#best-practices",
688
+ "depth": 3,
689
+ "numbering": [
690
+ 1,
691
+ 1,
692
+ 1
693
+ ],
694
+ "parent": "root"
695
+ },
696
+ {
697
+ "value": "Usage",
698
+ "href": "#usage",
699
+ "depth": 3,
700
+ "numbering": [
701
+ 1,
702
+ 1,
703
+ 2
704
+ ],
705
+ "parent": "root"
706
+ },
707
+ {
708
+ "value": "Money input in use",
709
+ "href": "#money-input-in-use",
710
+ "depth": 3,
711
+ "numbering": [
712
+ 1,
713
+ 1,
714
+ 3
715
+ ],
716
+ "parent": "root"
717
+ }
718
+ ]
719
+ }
720
+ }
721
+ }