@commercetools/nimbus-mcp 0.1.0 → 2.10.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 (450) hide show
  1. package/README.md +63 -14
  2. package/data/docs/route-manifest.json +10913 -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-separator.json +461 -0
  59. package/data/docs/routes/components-layout-simple-grid.json +519 -0
  60. package/data/docs/routes/components-layout-spacer.json +573 -0
  61. package/data/docs/routes/components-layout-stack.json +481 -0
  62. package/data/docs/routes/components-layout.json +34 -0
  63. package/data/docs/routes/components-media-avatar.json +427 -0
  64. package/data/docs/routes/components-media-icon.json +663 -0
  65. package/data/docs/routes/components-media-image.json +511 -0
  66. package/data/docs/routes/components-media-inline-svg.json +586 -0
  67. package/data/docs/routes/components-media.json +34 -0
  68. package/data/docs/routes/components-navigation-accordion.json +643 -0
  69. package/data/docs/routes/components-navigation-collapsible-motion.json +628 -0
  70. package/data/docs/routes/components-navigation-link.json +554 -0
  71. package/data/docs/routes/components-navigation-menu.json +546 -0
  72. package/data/docs/routes/components-navigation-pagination.json +502 -0
  73. package/data/docs/routes/components-navigation-steps.json +629 -0
  74. package/data/docs/routes/components-navigation-tabnav.json +546 -0
  75. package/data/docs/routes/components-navigation-tabs.json +635 -0
  76. package/data/docs/routes/components-navigation-toolbar.json +549 -0
  77. package/data/docs/routes/components-navigation.json +34 -0
  78. package/data/docs/routes/components-typography-code.json +39 -0
  79. package/data/docs/routes/components-typography-heading.json +402 -0
  80. package/data/docs/routes/components-typography-kbd.json +399 -0
  81. package/data/docs/routes/components-typography-list.json +593 -0
  82. package/data/docs/routes/components-typography-text.json +444 -0
  83. package/data/docs/routes/components-typography.json +34 -0
  84. package/data/docs/routes/components-utilities-nimbus-i18n-provider.json +295 -0
  85. package/data/docs/routes/components-utilities-nimbus-provider.json +663 -0
  86. package/data/docs/routes/components-utilities.json +34 -0
  87. package/data/docs/routes/components.json +33 -0
  88. package/data/docs/routes/home-contribute-adrs-adr0001-consumer-component-apis.json +314 -0
  89. package/data/docs/routes/home-contribute-adrs-adr0002-compound-component-extraction.json +160 -0
  90. package/data/docs/routes/home-contribute-adrs-adr0003-component-lifecycle-states.json +460 -0
  91. package/data/docs/routes/home-contribute-adrs.json +205 -0
  92. package/data/docs/routes/home-contribute-development-setup.json +213 -0
  93. package/data/docs/routes/home-contribute-stats.json +36 -0
  94. package/data/docs/routes/home-contribute.json +36 -0
  95. package/data/docs/routes/home-design-tokens-aspect-ratios.json +36 -0
  96. package/data/docs/routes/home-design-tokens-borders.json +35 -0
  97. package/data/docs/routes/home-design-tokens-colors.json +157 -0
  98. package/data/docs/routes/home-design-tokens-other-animations.json +119 -0
  99. package/data/docs/routes/home-design-tokens-other-blurs.json +36 -0
  100. package/data/docs/routes/home-design-tokens-other-breakpoints.json +61 -0
  101. package/data/docs/routes/home-design-tokens-other-cursors.json +36 -0
  102. package/data/docs/routes/home-design-tokens-other-z-indices.json +39 -0
  103. package/data/docs/routes/home-design-tokens-other.json +35 -0
  104. package/data/docs/routes/home-design-tokens-radii.json +59 -0
  105. package/data/docs/routes/home-design-tokens-shadows.json +57 -0
  106. package/data/docs/routes/home-design-tokens-sizes.json +137 -0
  107. package/data/docs/routes/home-design-tokens-spacing.json +36 -0
  108. package/data/docs/routes/home-design-tokens-typography.json +184 -0
  109. package/data/docs/routes/home-design-tokens.json +34 -0
  110. package/data/docs/routes/home-getting-started-core-concepts.json +301 -0
  111. package/data/docs/routes/home-getting-started-installation.json +621 -0
  112. package/data/docs/routes/home-getting-started-mcp-server-overview.json +139 -0
  113. package/data/docs/routes/home-getting-started-mcp-server-setup.json +316 -0
  114. package/data/docs/routes/home-getting-started-release-process.json +294 -0
  115. package/data/docs/routes/home-getting-started-testing-setup.json +296 -0
  116. package/data/docs/routes/home-playground-markdown.json +638 -0
  117. package/data/docs/routes/home-playground-toc.json +169 -0
  118. package/data/docs/routes/home-playground.json +34 -0
  119. package/data/docs/routes/home-style-props-background.json +236 -0
  120. package/data/docs/routes/home-style-props-border.json +310 -0
  121. package/data/docs/routes/home-style-props-display.json +120 -0
  122. package/data/docs/routes/home-style-props-effects.json +116 -0
  123. package/data/docs/routes/home-style-props-filters.json +396 -0
  124. package/data/docs/routes/home-style-props-flex-and-grid.json +496 -0
  125. package/data/docs/routes/home-style-props-interactivity.json +356 -0
  126. package/data/docs/routes/home-style-props-layout.json +422 -0
  127. package/data/docs/routes/home-style-props-list.json +116 -0
  128. package/data/docs/routes/home-style-props-sizing.json +244 -0
  129. package/data/docs/routes/home-style-props-spacing.json +228 -0
  130. package/data/docs/routes/home-style-props-svg.json +96 -0
  131. package/data/docs/routes/home-style-props-tables.json +116 -0
  132. package/data/docs/routes/home-style-props-transforms.json +216 -0
  133. package/data/docs/routes/home-style-props-transitions.json +216 -0
  134. package/data/docs/routes/home-style-props-typography.json +536 -0
  135. package/data/docs/routes/home-style-props.json +33 -0
  136. package/data/docs/routes/home.json +32 -0
  137. package/data/docs/routes/hooks-usecopytoclipboard.json +76 -0
  138. package/data/docs/routes/hooks-usehotkeys.json +117 -0
  139. package/data/docs/routes/hooks.json +33 -0
  140. package/data/docs/routes/icons.json +32 -0
  141. package/data/docs/routes/patterns-fields-date-range-picker-field.json +393 -0
  142. package/data/docs/routes/patterns-fields-money-input-field.json +415 -0
  143. package/data/docs/routes/patterns-fields-multiline-text-input-field.json +404 -0
  144. package/data/docs/routes/patterns-fields-number-input-field.json +470 -0
  145. package/data/docs/routes/patterns-fields-password-input-field.json +319 -0
  146. package/data/docs/routes/patterns-fields-search-input-field.json +382 -0
  147. package/data/docs/routes/patterns-fields-text-input-field.json +404 -0
  148. package/data/docs/routes/patterns-fields.json +78 -0
  149. package/data/docs/routes/patterns.json +34 -0
  150. package/data/docs/search-index.json +1 -0
  151. package/data/docs/types/Accordion.json +12 -0
  152. package/data/docs/types/AccordionContent.json +286 -0
  153. package/data/docs/types/AccordionHeader.json +891 -0
  154. package/data/docs/types/AccordionHeaderRightContent.json +27 -0
  155. package/data/docs/types/AccordionItem.json +242 -0
  156. package/data/docs/types/AccordionRoot.json +162 -0
  157. package/data/docs/types/Alert.json +12 -0
  158. package/data/docs/types/AlertActions.json +11 -0
  159. package/data/docs/types/AlertDescription.json +118 -0
  160. package/data/docs/types/AlertDismissButton.json +937 -0
  161. package/data/docs/types/AlertRoot.json +42 -0
  162. package/data/docs/types/AlertTitle.json +118 -0
  163. package/data/docs/types/Avatar.json +125 -0
  164. package/data/docs/types/Badge.json +64 -0
  165. package/data/docs/types/Body.json +67 -0
  166. package/data/docs/types/Box.json +85 -0
  167. package/data/docs/types/Button.json +1015 -0
  168. package/data/docs/types/Calendar.json +565 -0
  169. package/data/docs/types/Caption.json +67 -0
  170. package/data/docs/types/Card.json +12 -0
  171. package/data/docs/types/CardContent.json +27 -0
  172. package/data/docs/types/CardHeader.json +27 -0
  173. package/data/docs/types/CardRoot.json +106 -0
  174. package/data/docs/types/Cell.json +227 -0
  175. package/data/docs/types/Checkbox.json +897 -0
  176. package/data/docs/types/Code.json +112 -0
  177. package/data/docs/types/CollapsibleMotionContent.json +35 -0
  178. package/data/docs/types/CollapsibleMotionRoot.json +99 -0
  179. package/data/docs/types/CollapsibleMotionTrigger.json +71 -0
  180. package/data/docs/types/Column.json +101 -0
  181. package/data/docs/types/ColumnGroup.json +101 -0
  182. package/data/docs/types/ColumnHeader.json +193 -0
  183. package/data/docs/types/ComboBoxListBox.json +751 -0
  184. package/data/docs/types/ComboBoxOption.json +672 -0
  185. package/data/docs/types/ComboBoxPopover.json +786 -0
  186. package/data/docs/types/ComboBoxRoot.json +747 -0
  187. package/data/docs/types/ComboBoxSection.json +277 -0
  188. package/data/docs/types/ComboBoxTrigger.json +70 -0
  189. package/data/docs/types/Content.json +33 -0
  190. package/data/docs/types/DataTable.json +596 -0
  191. package/data/docs/types/DataTableBody.json +223 -0
  192. package/data/docs/types/DataTableFooter.json +27 -0
  193. package/data/docs/types/DataTableHeader.json +269 -0
  194. package/data/docs/types/DataTableManager.json +11 -0
  195. package/data/docs/types/DataTableRoot.json +590 -0
  196. package/data/docs/types/DataTableTable.json +271 -0
  197. package/data/docs/types/DateInput.json +792 -0
  198. package/data/docs/types/DatePicker.json +700 -0
  199. package/data/docs/types/DateRangePicker.json +936 -0
  200. package/data/docs/types/DateRangePickerField.json +1047 -0
  201. package/data/docs/types/DefaultPage.json +12 -0
  202. package/data/docs/types/DefaultPageActions.json +27 -0
  203. package/data/docs/types/DefaultPageBackLink.json +213 -0
  204. package/data/docs/types/DefaultPageContent.json +27 -0
  205. package/data/docs/types/DefaultPageFooter.json +27 -0
  206. package/data/docs/types/DefaultPageHeader.json +27 -0
  207. package/data/docs/types/DefaultPageRoot.json +106 -0
  208. package/data/docs/types/DefaultPageSubtitle.json +27 -0
  209. package/data/docs/types/DefaultPageTabNav.json +28 -0
  210. package/data/docs/types/DefaultPageTitle.json +27 -0
  211. package/data/docs/types/DialogBody.json +27 -0
  212. package/data/docs/types/DialogCloseTrigger.json +939 -0
  213. package/data/docs/types/DialogContent.json +27 -0
  214. package/data/docs/types/DialogFooter.json +27 -0
  215. package/data/docs/types/DialogHeader.json +27 -0
  216. package/data/docs/types/DialogRoot.json +138 -0
  217. package/data/docs/types/DialogTitle.json +27 -0
  218. package/data/docs/types/DialogTrigger.json +80 -0
  219. package/data/docs/types/DraggableList.json +12 -0
  220. package/data/docs/types/DraggableListField.json +894 -0
  221. package/data/docs/types/DraggableListItem.json +574 -0
  222. package/data/docs/types/DraggableListRoot.json +745 -0
  223. package/data/docs/types/Drawer.json +12 -0
  224. package/data/docs/types/DrawerBody.json +27 -0
  225. package/data/docs/types/DrawerCloseTrigger.json +939 -0
  226. package/data/docs/types/DrawerContent.json +27 -0
  227. package/data/docs/types/DrawerFooter.json +27 -0
  228. package/data/docs/types/DrawerHeader.json +27 -0
  229. package/data/docs/types/DrawerRoot.json +142 -0
  230. package/data/docs/types/DrawerTitle.json +27 -0
  231. package/data/docs/types/DrawerTrigger.json +80 -0
  232. package/data/docs/types/FieldErrors.getBuiltInMessage.json +11 -0
  233. package/data/docs/types/FieldErrors.getCustomMessage.json +9 -0
  234. package/data/docs/types/FieldErrors.json +109 -0
  235. package/data/docs/types/Flex.json +238 -0
  236. package/data/docs/types/Footer.json +67 -0
  237. package/data/docs/types/FormFieldDescription.json +11 -0
  238. package/data/docs/types/FormFieldError.json +11 -0
  239. package/data/docs/types/FormFieldInfoBox.json +27 -0
  240. package/data/docs/types/FormFieldInput.json +11 -0
  241. package/data/docs/types/FormFieldLabel.json +11 -0
  242. package/data/docs/types/FormFieldRoot.json +148 -0
  243. package/data/docs/types/Grid.json +253 -0
  244. package/data/docs/types/GridProps.json +11 -0
  245. package/data/docs/types/Group.json +143 -0
  246. package/data/docs/types/Header.json +67 -0
  247. package/data/docs/types/Heading.json +109 -0
  248. package/data/docs/types/Icon.json +112 -0
  249. package/data/docs/types/IconButton.json +1019 -0
  250. package/data/docs/types/IconToggleButton.json +787 -0
  251. package/data/docs/types/Image.json +373 -0
  252. package/data/docs/types/Indicator.json +67 -0
  253. package/data/docs/types/InlineSvg.json +98 -0
  254. package/data/docs/types/Item.json +67 -0
  255. package/data/docs/types/Kbd.json +118 -0
  256. package/data/docs/types/Link.json +380 -0
  257. package/data/docs/types/List.json +12 -0
  258. package/data/docs/types/ListIndicator.json +70 -0
  259. package/data/docs/types/ListItem.json +70 -0
  260. package/data/docs/types/ListRoot.json +124 -0
  261. package/data/docs/types/LoadingSpinner.json +87 -0
  262. package/data/docs/types/LocalizedField.json +460 -0
  263. package/data/docs/types/LocalizedStringFormatter.json +9 -0
  264. package/data/docs/types/MakeElementFocusable.json +196 -0
  265. package/data/docs/types/MenuContent.json +111 -0
  266. package/data/docs/types/MenuItem.json +671 -0
  267. package/data/docs/types/MenuRoot.json +670 -0
  268. package/data/docs/types/MenuSection.json +364 -0
  269. package/data/docs/types/MenuSubmenu.json +111 -0
  270. package/data/docs/types/MenuSubmenuTrigger.json +67 -0
  271. package/data/docs/types/MenuTrigger.json +906 -0
  272. package/data/docs/types/ModalPage.json +12 -0
  273. package/data/docs/types/ModalPageActions.json +27 -0
  274. package/data/docs/types/ModalPageContent.json +27 -0
  275. package/data/docs/types/ModalPageFooter.json +27 -0
  276. package/data/docs/types/ModalPageHeader.json +27 -0
  277. package/data/docs/types/ModalPageRoot.json +87 -0
  278. package/data/docs/types/ModalPageSubtitle.json +27 -0
  279. package/data/docs/types/ModalPageTabNav.json +28 -0
  280. package/data/docs/types/ModalPageTitle.json +27 -0
  281. package/data/docs/types/ModalPageTopBar.json +57 -0
  282. package/data/docs/types/MoneyInput.isEmpty.json +40 -0
  283. package/data/docs/types/MoneyInput.json +282 -0
  284. package/data/docs/types/MoneyInputField.json +379 -0
  285. package/data/docs/types/MoneyInputFieldProps.json +9 -0
  286. package/data/docs/types/MultilineTextInput.json +1194 -0
  287. package/data/docs/types/MultilineTextInputField.json +1269 -0
  288. package/data/docs/types/MultilineTextInputFieldProps.json +9 -0
  289. package/data/docs/types/NimbusI18nProvider.json +42 -0
  290. package/data/docs/types/NimbusI18nProviderProps.json +9 -0
  291. package/data/docs/types/NimbusProvider.json +270 -0
  292. package/data/docs/types/NumberInput.json +952 -0
  293. package/data/docs/types/NumberInputField.json +1004 -0
  294. package/data/docs/types/NumberInputFieldProps.json +9 -0
  295. package/data/docs/types/PageContent.json +11 -0
  296. package/data/docs/types/PageContentColumn.json +99 -0
  297. package/data/docs/types/PageContentRoot.json +114 -0
  298. package/data/docs/types/Pagination.json +159 -0
  299. package/data/docs/types/PasswordInput.json +1120 -0
  300. package/data/docs/types/PasswordInputField.json +1216 -0
  301. package/data/docs/types/PasswordInputFieldProps.json +9 -0
  302. package/data/docs/types/ProgressBar.json +280 -0
  303. package/data/docs/types/RadioInputOption.json +550 -0
  304. package/data/docs/types/RadioInputRoot.json +514 -0
  305. package/data/docs/types/RangeCalendar.json +618 -0
  306. package/data/docs/types/RichTextInput.json +134 -0
  307. package/data/docs/types/Root.json +122 -0
  308. package/data/docs/types/Row.json +67 -0
  309. package/data/docs/types/ScopedSearchInput.isEmpty.json +40 -0
  310. package/data/docs/types/ScopedSearchInput.json +253 -0
  311. package/data/docs/types/ScrollArea.json +82 -0
  312. package/data/docs/types/SearchInput.json +1165 -0
  313. package/data/docs/types/SearchInputField.json +1240 -0
  314. package/data/docs/types/Select.json +12 -0
  315. package/data/docs/types/SelectOption.json +572 -0
  316. package/data/docs/types/SelectOptionGroup.json +215 -0
  317. package/data/docs/types/SelectOptions.json +693 -0
  318. package/data/docs/types/SelectRoot.json +926 -0
  319. package/data/docs/types/Separator.json +65 -0
  320. package/data/docs/types/SimpleGrid.json +291 -0
  321. package/data/docs/types/Spacer.json +27 -0
  322. package/data/docs/types/SpacerProps.json +9 -0
  323. package/data/docs/types/SplitButton.json +203 -0
  324. package/data/docs/types/Stack.json +144 -0
  325. package/data/docs/types/Steps.json +12 -0
  326. package/data/docs/types/StepsChangeDetails.json +9 -0
  327. package/data/docs/types/StepsCompletedContent.json +28 -0
  328. package/data/docs/types/StepsCompletedContentProps.json +9 -0
  329. package/data/docs/types/StepsContent.json +43 -0
  330. package/data/docs/types/StepsContentProps.json +9 -0
  331. package/data/docs/types/StepsDescription.json +28 -0
  332. package/data/docs/types/StepsDescriptionProps.json +9 -0
  333. package/data/docs/types/StepsIndicator.json +28 -0
  334. package/data/docs/types/StepsIndicatorProps.json +9 -0
  335. package/data/docs/types/StepsItem.json +43 -0
  336. package/data/docs/types/StepsItemProps.json +9 -0
  337. package/data/docs/types/StepsList.json +28 -0
  338. package/data/docs/types/StepsListProps.json +9 -0
  339. package/data/docs/types/StepsNextTrigger.json +62 -0
  340. package/data/docs/types/StepsNextTriggerProps.json +9 -0
  341. package/data/docs/types/StepsNumber.json +28 -0
  342. package/data/docs/types/StepsNumberProps.json +9 -0
  343. package/data/docs/types/StepsPrevTrigger.json +62 -0
  344. package/data/docs/types/StepsPrevTriggerProps.json +9 -0
  345. package/data/docs/types/StepsRoot.json +183 -0
  346. package/data/docs/types/StepsRootProps.json +11 -0
  347. package/data/docs/types/StepsSeparator.json +28 -0
  348. package/data/docs/types/StepsSeparatorProps.json +9 -0
  349. package/data/docs/types/StepsStatus.json +57 -0
  350. package/data/docs/types/StepsStatusProps.json +9 -0
  351. package/data/docs/types/StepsTitle.json +28 -0
  352. package/data/docs/types/StepsTitleProps.json +9 -0
  353. package/data/docs/types/StepsTrigger.json +47 -0
  354. package/data/docs/types/StepsTriggerProps.json +9 -0
  355. package/data/docs/types/Switch.json +371 -0
  356. package/data/docs/types/TabListProps.json +9 -0
  357. package/data/docs/types/TabNav.json +12 -0
  358. package/data/docs/types/TabNavItem.json +300 -0
  359. package/data/docs/types/TabNavItemProps.json +9 -0
  360. package/data/docs/types/TabNavProps.json +9 -0
  361. package/data/docs/types/TabNavRoot.json +80 -0
  362. package/data/docs/types/TabPanelProps.json +9 -0
  363. package/data/docs/types/TabPanelsProps.json +9 -0
  364. package/data/docs/types/TabProps.json +9 -0
  365. package/data/docs/types/Table.json +9 -0
  366. package/data/docs/types/TableBody.json +67 -0
  367. package/data/docs/types/TableBodyProps.json +9 -0
  368. package/data/docs/types/TableCaption.json +67 -0
  369. package/data/docs/types/TableCaptionProps.json +9 -0
  370. package/data/docs/types/TableCell.json +227 -0
  371. package/data/docs/types/TableCellProps.json +9 -0
  372. package/data/docs/types/TableColumn.json +101 -0
  373. package/data/docs/types/TableColumnGroup.json +101 -0
  374. package/data/docs/types/TableColumnGroupProps.json +9 -0
  375. package/data/docs/types/TableColumnHeader.json +193 -0
  376. package/data/docs/types/TableColumnHeaderProps.json +9 -0
  377. package/data/docs/types/TableColumnProps.json +9 -0
  378. package/data/docs/types/TableFooter.json +67 -0
  379. package/data/docs/types/TableFooterProps.json +9 -0
  380. package/data/docs/types/TableHeader.json +67 -0
  381. package/data/docs/types/TableHeaderProps.json +9 -0
  382. package/data/docs/types/TableRoot.json +365 -0
  383. package/data/docs/types/TableRootProps.json +12 -0
  384. package/data/docs/types/TableRow.json +67 -0
  385. package/data/docs/types/TableRowProps.json +9 -0
  386. package/data/docs/types/TableScrollArea.json +82 -0
  387. package/data/docs/types/TableScrollAreaProps.json +9 -0
  388. package/data/docs/types/Tabs.json +12 -0
  389. package/data/docs/types/TabsList.json +110 -0
  390. package/data/docs/types/TabsPanel.json +112 -0
  391. package/data/docs/types/TabsPanels.json +108 -0
  392. package/data/docs/types/TabsRoot.json +211 -0
  393. package/data/docs/types/TabsTab.json +174 -0
  394. package/data/docs/types/TagGroup.json +12 -0
  395. package/data/docs/types/TagGroupRoot.json +306 -0
  396. package/data/docs/types/TagGroupTag.json +595 -0
  397. package/data/docs/types/TagGroupTagList.json +166 -0
  398. package/data/docs/types/Text.json +119 -0
  399. package/data/docs/types/TextInput.json +1156 -0
  400. package/data/docs/types/TextInputField.json +1263 -0
  401. package/data/docs/types/TimeInput.json +752 -0
  402. package/data/docs/types/ToastAction.json +9 -0
  403. package/data/docs/types/ToastManagerApi.json +9 -0
  404. package/data/docs/types/ToastOptions.json +9 -0
  405. package/data/docs/types/ToastOutlet.json +12 -0
  406. package/data/docs/types/ToastPlacement.json +9 -0
  407. package/data/docs/types/ToastPromiseOptions.json +9 -0
  408. package/data/docs/types/ToastType.json +9 -0
  409. package/data/docs/types/ToastVariant.json +9 -0
  410. package/data/docs/types/ToggleButton.json +789 -0
  411. package/data/docs/types/ToggleButtonGroup.json +9 -0
  412. package/data/docs/types/ToggleButtonGroupButton.json +331 -0
  413. package/data/docs/types/ToggleButtonGroupRoot.json +269 -0
  414. package/data/docs/types/Toolbar.json +176 -0
  415. package/data/docs/types/Tooltip.json +12 -0
  416. package/data/docs/types/TooltipContent.json +372 -0
  417. package/data/docs/types/TooltipRoot.json +179 -0
  418. package/data/docs/types/Trigger.json +69 -0
  419. package/data/docs/types/VisuallyHidden.json +93 -0
  420. package/data/docs/types/__object.json +12 -0
  421. package/data/docs/types/filters.json +11 -0
  422. package/data/docs/types/manifest.json +278 -0
  423. package/data/docs/types/toast.json +234 -0
  424. package/data/docs/types/useColorMode.json +13 -0
  425. package/data/docs/types/useColorModeValue.json +13 -0
  426. package/data/docs/types/useColorScheme.json +12 -0
  427. package/data/docs/types/useLocalizedStringFormatter.json +14 -0
  428. package/data/icons.json +21940 -0
  429. package/data/tokens.json +40061 -0
  430. package/dist/index.js +2516 -17
  431. package/package.json +25 -6
  432. package/dist/data-loader.d.ts +0 -102
  433. package/dist/data-loader.js +0 -104
  434. package/dist/index.d.ts +0 -13
  435. package/dist/server.d.ts +0 -9
  436. package/dist/server.js +0 -22
  437. package/dist/server.spec.d.ts +0 -1
  438. package/dist/server.spec.js +0 -69
  439. package/dist/tools/list-components.d.ts +0 -9
  440. package/dist/tools/list-components.js +0 -42
  441. package/dist/types.d.ts +0 -28
  442. package/dist/types.js +0 -4
  443. package/src/data-loader.ts +0 -226
  444. package/src/index.ts +0 -29
  445. package/src/server.spec.ts +0 -86
  446. package/src/server.ts +0 -28
  447. package/src/tools/list-components.ts +0 -49
  448. package/src/types.ts +0 -31
  449. package/tsconfig.json +0 -14
  450. package/vitest.config.ts +0 -9
@@ -0,0 +1,566 @@
1
+ {
2
+ "meta": {
3
+ "id": "Components-TextInput",
4
+ "title": "Text input",
5
+ "exportName": "TextInput",
6
+ "description": "Allows users to enter information like names, addresses, emails, passwords, search queries, or any other text-based data.",
7
+ "lifecycleState": "Stable",
8
+ "order": 999,
9
+ "repoPath": "packages/nimbus/src/components/text-input/text-input.mdx",
10
+ "menu": [
11
+ "Components",
12
+ "Inputs",
13
+ "Text input"
14
+ ],
15
+ "route": "components/inputs/text-input",
16
+ "tags": [
17
+ "component",
18
+ "text",
19
+ "input",
20
+ "field",
21
+ "string"
22
+ ],
23
+ "toc": [
24
+ {
25
+ "value": "Overview",
26
+ "href": "#overview",
27
+ "depth": 2,
28
+ "numbering": [
29
+ 1,
30
+ 1
31
+ ],
32
+ "parent": "root"
33
+ },
34
+ {
35
+ "value": "Resources",
36
+ "href": "#resources",
37
+ "depth": 3,
38
+ "numbering": [
39
+ 1,
40
+ 1,
41
+ 1
42
+ ],
43
+ "parent": "root"
44
+ },
45
+ {
46
+ "value": "Variables",
47
+ "href": "#variables",
48
+ "depth": 2,
49
+ "numbering": [
50
+ 1,
51
+ 2
52
+ ],
53
+ "parent": "root"
54
+ },
55
+ {
56
+ "value": "Size",
57
+ "href": "#size",
58
+ "depth": 3,
59
+ "numbering": [
60
+ 1,
61
+ 2,
62
+ 1
63
+ ],
64
+ "parent": "root"
65
+ },
66
+ {
67
+ "value": "Variant",
68
+ "href": "#variant",
69
+ "depth": 3,
70
+ "numbering": [
71
+ 1,
72
+ 2,
73
+ 2
74
+ ],
75
+ "parent": "root"
76
+ }
77
+ ],
78
+ "layout": "app-frame",
79
+ "tabs": [
80
+ {
81
+ "key": "overview",
82
+ "title": "Overview",
83
+ "order": 0
84
+ },
85
+ {
86
+ "key": "guidelines",
87
+ "title": "Guidelines",
88
+ "order": 2
89
+ },
90
+ {
91
+ "key": "dev",
92
+ "title": "Implementation",
93
+ "order": 3
94
+ },
95
+ {
96
+ "key": "a11y",
97
+ "title": "Accessibility",
98
+ "order": 4
99
+ }
100
+ ]
101
+ },
102
+ "mdx": "\n## Overview\n\nUsers can type, delete, copy, and paste text within the box. Sometimes, there\ncan be additional features like autocomplete or validation to help users enter\ninformation correctly.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/gHbAJGfcrCv7f2bgzUQgHq/NIMBUS-Guidelines?node-id=1696-48973&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n**Placeholder**\n\nThis is the styling for placeholder text. It is a shade lighter than active\ntext.\n\n```jsx live\nconst App = () => <TextInput placeholder=\"input value\"/>\n```\n\n### Size\n\n**Medium**\n\nThis is the default size for text inputs.\n\n```jsx live\nconst App = () => <TextInput size=\"md\" value=\"input value\"/>\n```\n\n**Small**\n\nAvailable for the times a more condensed text input is needed.\n\n```jsx live\nconst App = () => <TextInput size=\"sm\" value=\"input value\"/>\n```\n\n### Variant\n\n**Solid**\n\nThis is the default variant styling for inputs.\n\n```jsx live\nconst App = () => <TextInput variant=\"solid\" value=\"input value\"/>\n```\n\n**Ghost**\n\nThis variant removes the outer border around the input, but preserves hover\nstyling.\n\n```jsx live\nconst App = () => <TextInput variant=\"ghost\" value=\"input value\"/>\n```\n",
103
+ "views": {
104
+ "overview": {
105
+ "mdx": "\n## Overview\n\nUsers can type, delete, copy, and paste text within the box. Sometimes, there\ncan be additional features like autocomplete or validation to help users enter\ninformation correctly.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/gHbAJGfcrCv7f2bgzUQgHq/NIMBUS-Guidelines?node-id=1696-48973&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n**Placeholder**\n\nThis is the styling for placeholder text. It is a shade lighter than active\ntext.\n\n```jsx live\nconst App = () => <TextInput placeholder=\"input value\"/>\n```\n\n### Size\n\n**Medium**\n\nThis is the default size for text inputs.\n\n```jsx live\nconst App = () => <TextInput size=\"md\" value=\"input value\"/>\n```\n\n**Small**\n\nAvailable for the times a more condensed text input is needed.\n\n```jsx live\nconst App = () => <TextInput size=\"sm\" value=\"input value\"/>\n```\n\n### Variant\n\n**Solid**\n\nThis is the default variant styling for inputs.\n\n```jsx live\nconst App = () => <TextInput variant=\"solid\" value=\"input value\"/>\n```\n\n**Ghost**\n\nThis variant removes the outer border around the input, but preserves hover\nstyling.\n\n```jsx live\nconst App = () => <TextInput variant=\"ghost\" value=\"input value\"/>\n```\n",
106
+ "toc": [
107
+ {
108
+ "value": "Overview",
109
+ "href": "#overview",
110
+ "depth": 2,
111
+ "numbering": [
112
+ 1,
113
+ 1
114
+ ],
115
+ "parent": "root"
116
+ },
117
+ {
118
+ "value": "Resources",
119
+ "href": "#resources",
120
+ "depth": 3,
121
+ "numbering": [
122
+ 1,
123
+ 1,
124
+ 1
125
+ ],
126
+ "parent": "root"
127
+ },
128
+ {
129
+ "value": "Variables",
130
+ "href": "#variables",
131
+ "depth": 2,
132
+ "numbering": [
133
+ 1,
134
+ 2
135
+ ],
136
+ "parent": "root"
137
+ },
138
+ {
139
+ "value": "Size",
140
+ "href": "#size",
141
+ "depth": 3,
142
+ "numbering": [
143
+ 1,
144
+ 2,
145
+ 1
146
+ ],
147
+ "parent": "root"
148
+ },
149
+ {
150
+ "value": "Variant",
151
+ "href": "#variant",
152
+ "depth": 3,
153
+ "numbering": [
154
+ 1,
155
+ 2,
156
+ 2
157
+ ],
158
+ "parent": "root"
159
+ }
160
+ ]
161
+ },
162
+ "a11y": {
163
+ "mdx": "\n## Accessibility\n\nThe component uses onPress\\* props to handle all user interactions—mouse clicks,\ntouch taps, and keyboard presses—consistently. These props (onPress,\nonPressStart, onPressEnd, etc.) ensure a smooth and accessible experience\nregardless of the user's input method or device.\n\n```jsx live\nconst App = () => <TextInput placeholder=\"XX/XX/XXXX\" />\n```\n\n### Accessibility standards\n\n- **Info and relationships:** Use proper HTML (`<label>`, `aria-labelledby`,\n etc.) to connect labels with their inputs. This helps assistive technologies\n (like screen readers) understand the connection and convey the information\n correctly.\n- **Color contrast:** Ensure sufficient color contrast between the input field,\n its label, and the surrounding background. This makes it easier to read for\n people with low vision. The minimum contrast ratio is 4.5:1 for normal text\n and 3:1 for large text.\n- **Keyboard accessibility:** Text inputs must be fully operable using only a\n keyboard (no mouse required). This includes navigating to the input,\n interacting with it, and submitting the form.\n- **Headings and labels:** Labels should be clear, concise, and descriptive,\n accurately reflecting the purpose of the input field.\n- **Labels or instructions:** Provide clear labels or instructions to help users\n understand what type of information is expected in the input field.\n- **Name, role, value:** Ensure the input field's name (label), role (type of\n input), and current value are programmatically available to assistive\n technologies.\n- **Error messages:** When input errors occur, provide clear and specific error\n messages that are easy to understand and locate. Use ARIA attributes\n (`aria-invalid`, `aria-describedby`) to associate error messages with the\n input field.\n- **Placeholder text:** While placeholder text can be helpful, it can also\n create accessibility issues. Avoid using it as a replacement for labels, and\n ensure sufficient color contrast if you do use it.\n- **Autocomplete:** Autocomplete can improve usability, but make sure it doesn't\n interfere with accessibility. Users should be able to easily review and\n override suggestions.\n",
164
+ "toc": [
165
+ {
166
+ "value": "Accessibility",
167
+ "href": "#accessibility",
168
+ "depth": 2,
169
+ "numbering": [
170
+ 1,
171
+ 1
172
+ ],
173
+ "parent": "root"
174
+ },
175
+ {
176
+ "value": "Accessibility standards",
177
+ "href": "#accessibility-standards",
178
+ "depth": 3,
179
+ "numbering": [
180
+ 1,
181
+ 1,
182
+ 1
183
+ ],
184
+ "parent": "root"
185
+ }
186
+ ]
187
+ },
188
+ "dev": {
189
+ "mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { TextInput, type TextInputProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation uses uncontrolled mode:\n\n```jsx live-dev\nconst App = () => (\n <TextInput placeholder=\"Enter your name\" />\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 <Stack direction=\"column\" gap=\"400\">\n <TextInput size=\"sm\" placeholder=\"Small input\" />\n <TextInput size=\"md\" placeholder=\"Medium input (default)\" />\n </Stack>\n)\n```\n\n### Visual variants\n\nChoose between `solid` and `ghost` variants to match your design context:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput variant=\"solid\" placeholder=\"Solid variant (default)\" />\n <TextInput variant=\"ghost\" placeholder=\"Ghost variant\" />\n </Stack>\n)\n```\n\n### Leading and trailing elements\n\nAdd icons, buttons, or other elements before or after the input using `leadingElement` and `trailingElement` props:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n placeholder=\"Search...\"\n leadingElement={<Icons.Search />}\n />\n <TextInput\n placeholder=\"Email address\"\n leadingElement={<Icons.Email />}\n trailingElement={<Icons.CheckCircle />}\n />\n </Stack>\n)\n```\n\n**Behavioral notes:**\n- Elements automatically respect text direction (LTR/RTL)\n- Leading element appears at the start (left in LTR, right in RTL)\n- Trailing element appears at the end (right in LTR, left in RTL)\n- Icon sizing automatically adjusts based on the `size` prop\n\n### Placeholder text\n\nUse placeholder text to provide hints about expected input format:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput placeholder=\"Enter your email\" />\n <TextInput placeholder=\"john.doe@example.com\" />\n <TextInput placeholder=\"Search products...\" />\n </Stack>\n)\n```\n\n### Disabled state\n\nDisable input interaction with the `isDisabled` prop:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput placeholder=\"Enabled input\" />\n <TextInput placeholder=\"Disabled input\" isDisabled />\n <TextInput\n value=\"Disabled with value\"\n isDisabled\n onChange={() => {}}\n />\n </Stack>\n)\n```\n\n### Invalid state\n\nMark inputs as invalid for validation feedback:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n placeholder=\"Valid input\"\n value=\"valid@example.com\"\n onChange={() => {}}\n />\n <TextInput\n placeholder=\"Invalid input\"\n value=\"invalid-email\"\n isInvalid\n onChange={() => {}}\n />\n </Stack>\n)\n```\n\n### Read-only state\n\nUse `isReadOnly` to display values without allowing editing:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n value=\"Editable value\"\n onChange={() => {}}\n />\n <TextInput\n value=\"Read-only value\"\n isReadOnly\n onChange={() => {}}\n />\n </Stack>\n)\n```\n\n### Uncontrolled mode\n\nFor simpler use cases, use uncontrolled mode with `defaultValue` and `onChange`:\n\n```jsx live-dev\nconst App = () => {\n const [displayValue, setDisplayValue] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n placeholder=\"Type something...\"\n defaultValue=\"\"\n onChange={(value) => {\n setDisplayValue(value);\n }}\n />\n <Text fontSize=\"sm\">Current value: {displayValue || '(empty)'}</Text>\n </Stack>\n );\n}\n```\n\nUse uncontrolled mode when you need to capture the input value without managing state yourself.\n\n**Note:** TextInput's `onChange` receives the string value directly, not an event object.\n\n### Controlled mode\n\nFor scenarios requiring programmatic control or coordination with other components, use controlled mode:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n value={value}\n onChange={(value) => setValue(value)}\n placeholder=\"Controlled input\"\n />\n <Text fontSize=\"sm\">\n {value ? `You typed: ${value}` : 'Start typing...'}\n </Text>\n <Button onClick={() => setValue('')} size=\"sm\">\n Clear\n </Button>\n </Stack>\n );\n}\n```\n\nUse controlled mode when you need to:\n- Synchronize the value with external state\n- Validate or transform input values\n- Clear or programmatically set the value\n- React to changes in real-time\n\n### Required field\n\nMark inputs as required using the `isRequired` prop:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n placeholder=\"Optional field\"\n />\n <TextInput\n placeholder=\"Required field\"\n isRequired\n />\n </Stack>\n)\n```\n\n## Component requirements\n\n## Accessibility\n\nThe TextInput handles most accessibility requirements internally. However, you must always associate an internationalized label with the component. Visual labels are preferable, and can be set by:\n\n- Using the `TextInputField` pattern component (recommended)\n- Associating a `<label>` element with the `TextInput` using `aria-labelledby`:\n\n```tsx\n<label id=\"email-label\">\n {msg.format(emailMessage)}\n</label>\n<TextInput aria-labelledby=\"email-label\" />\n```\n\n- Associating a `<label>` element with the `TextInput` using `htmlFor`:\n\n```tsx\n<label htmlFor=\"email-input\">\n {msg.format(emailMessage)}\n</label>\n<TextInput id=\"email-input\" />\n```\n\nIf your design requires that the label should not be visible, the label should be set using the `aria-label` prop:\n\n```tsx\n<TextInput aria-label={msg.format(emailMessage)} />\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 = \"user-email-input\";\n\nexport const EmailField = () => (\n <TextInput id={PERSISTENT_ID} placeholder=\"Email\" />\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n- `Tab` / `Shift+Tab`: Navigate to/from the input field\n- `Arrow keys`: Move cursor within the text (Left/Right), no vertical navigation\n- `Home` / `End`: Move cursor to start/end of text\n- `Ctrl+A` / `Cmd+A`: Select all text\n- Standard text editing shortcuts: Cut, Copy, Paste, Undo, Redo\n\n#### Click-to-focus behavior\n\nClicking anywhere within the input container (including leading/trailing elements area) will focus the input field, providing a larger interactive target for better usability.\n\n## API reference\n\n<PropsTable id=\"TextInput\" />\n\n## Common patterns\n\n### Input with icon\n\nDisplay an icon to indicate the input's purpose:\n\n```jsx live-dev\nconst App = () => {\n const [email, setEmail] = useState<string>('');\n const [password, setPassword] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n value={email}\n onChange={(value) => setEmail(value)}\n placeholder=\"Email address\"\n leadingElement={<Icons.Email />}\n />\n <TextInput\n value={password}\n onChange={(value) => setPassword(value)}\n placeholder=\"Password\"\n type=\"password\"\n leadingElement={<Icons.Lock />}\n />\n </Stack>\n );\n}\n```\n\n### Search input pattern\n\nCreate a search input with appropriate icons:\n\n```jsx live-dev\nconst App = () => {\n const [searchQuery, setSearchQuery] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInput\n value={searchQuery}\n onChange={(value) => setSearchQuery(value)}\n placeholder=\"Search products...\"\n leadingElement={<Icons.Search />}\n />\n {searchQuery && (\n <Text fontSize=\"sm\">Searching for: {searchQuery}</Text>\n )}\n </Stack>\n );\n}\n```\n\n### Input with clear button\n\nAdd a button to quickly clear the input value:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n\n return (\n <TextInput\n value={value}\n onChange={(value) => setValue(value)}\n placeholder=\"Type something...\"\n leadingElement={<Icons.Search />}\n trailingElement={\n value ? (\n <IconButton\n onClick={() => setValue('')}\n size=\"sm\"\n variant=\"ghost\"\n aria-label=\"Clear input\"\n >\n <Icons.Close />\n </IconButton>\n ) : null\n }\n />\n );\n}\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using TextInput 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 } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TextInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TextInput - Basic rendering\", () => {\n it(\"renders input element\", () => {\n render(\n <NimbusProvider>\n <TextInput aria-label=\"Text input\" placeholder=\"Enter text\" />\n </NimbusProvider>\n );\n\n // Verify input is present\n expect(screen.getByRole(\"textbox\")).toBeInTheDocument();\n });\n\n it(\"renders with placeholder text\", () => {\n render(\n <NimbusProvider>\n <TextInput aria-label=\"Email\" placeholder=\"Email address\" />\n </NimbusProvider>\n );\n\n expect(screen.getByPlaceholderText(\"Email address\")).toBeInTheDocument();\n });\n\n it(\"renders with aria-label\", () => {\n render(\n <NimbusProvider>\n <TextInput aria-label=\"User email\" />\n </NimbusProvider>\n );\n\n expect(\n screen.getByRole(\"textbox\", { name: /user email/i })\n ).toBeInTheDocument();\n });\n});\n```\n\n### Interaction Tests\n\nTest user interactions with the component\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TextInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TextInput - Interactions\", () => {\n it(\"updates value when user types\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <TextInput aria-label=\"Text input\" placeholder=\"Type here\" />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n await user.type(input, \"Hello World\");\n\n expect(input).toHaveValue(\"Hello World\");\n });\n\n it(\"calls onChange callback with string value\", async () => {\n const user = userEvent.setup();\n const handleChange = vi.fn();\n render(\n <NimbusProvider>\n <TextInput aria-label=\"Text input\" onChange={handleChange} />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n await user.type(input, \"test\");\n\n expect(handleChange).toHaveBeenCalled();\n expect(typeof handleChange.mock.calls[0][0]).toBe(\"string\");\n });\n});\n```\n\n### Testing Controlled Mode\n\nTest controlled component behavior\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TextInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TextInput - Controlled mode\", () => {\n it(\"displays controlled value\", () => {\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Text input\"\n value=\"controlled value\"\n onChange={() => {}}\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveValue(\"controlled value\");\n });\n\n it(\"updates when controlled value changes\", () => {\n const { rerender } = render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Text input\"\n value=\"first value\"\n onChange={() => {}}\n />\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"textbox\")).toHaveValue(\"first value\");\n\n rerender(\n <NimbusProvider>\n <TextInput\n aria-label=\"Text input\"\n value=\"second value\"\n onChange={() => {}}\n />\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"textbox\")).toHaveValue(\"second value\");\n });\n});\n```\n\n### Testing Leading and Trailing Elements\n\nTest custom elements within the input\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TextInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TextInput - Elements\", () => {\n it(\"renders leading element\", () => {\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Search input\"\n leadingElement={<span data-testid=\"icon\">🔍</span>}\n placeholder=\"Search\"\n />\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"icon\")).toBeInTheDocument();\n });\n\n it(\"renders trailing element\", () => {\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Text input\"\n trailingElement={<button data-testid=\"clear\">Clear</button>}\n placeholder=\"Input\"\n />\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"clear\")).toBeInTheDocument();\n });\n\n it(\"trailing button is interactive\", async () => {\n const user = userEvent.setup();\n const handleClick = vi.fn();\n\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Text input\"\n trailingElement={<button onClick={handleClick}>Action</button>}\n />\n </NimbusProvider>\n );\n\n await user.click(screen.getByText(\"Action\"));\n\n expect(handleClick).toHaveBeenCalled();\n });\n});\n```\n\n### Testing Validation States\n\nTest different validation states\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TextInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TextInput - Validation states\", () => {\n it(\"renders disabled state\", () => {\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Disabled input\"\n isDisabled\n placeholder=\"Disabled\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toBeDisabled();\n });\n\n it(\"renders invalid state\", () => {\n render(\n <NimbusProvider>\n <TextInput aria-label=\"Invalid input\" isInvalid placeholder=\"Invalid\" />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveAttribute(\"aria-invalid\", \"true\");\n });\n\n it(\"renders read-only state\", () => {\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Read-only input\"\n isReadOnly\n value=\"Read-only\"\n onChange={() => {}}\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveAttribute(\"readonly\");\n });\n\n it(\"renders required state\", () => {\n render(\n <NimbusProvider>\n <TextInput\n aria-label=\"Required input\"\n isRequired\n placeholder=\"Required\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByRole(\"textbox\");\n expect(input).toHaveAttribute(\"aria-required\", \"true\");\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-textinput--docs)\n- [React Aria TextField](https://react-spectrum.adobe.com/react-aria/TextField.html)\n- [ARIA Textbox Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/textbox/)\n- [TextInputField Pattern](../patterns/fields/textinputfield)\n",
190
+ "toc": [
191
+ {
192
+ "value": "Getting started",
193
+ "href": "#getting-started",
194
+ "depth": 2,
195
+ "numbering": [
196
+ 1,
197
+ 1
198
+ ],
199
+ "parent": "root"
200
+ },
201
+ {
202
+ "value": "Import",
203
+ "href": "#import",
204
+ "depth": 3,
205
+ "numbering": [
206
+ 1,
207
+ 1,
208
+ 1
209
+ ],
210
+ "parent": "root"
211
+ },
212
+ {
213
+ "value": "Basic usage",
214
+ "href": "#basic-usage",
215
+ "depth": 3,
216
+ "numbering": [
217
+ 1,
218
+ 1,
219
+ 2
220
+ ],
221
+ "parent": "root"
222
+ },
223
+ {
224
+ "value": "Usage examples",
225
+ "href": "#usage-examples",
226
+ "depth": 2,
227
+ "numbering": [
228
+ 1,
229
+ 2
230
+ ],
231
+ "parent": "root"
232
+ },
233
+ {
234
+ "value": "Size options",
235
+ "href": "#size-options",
236
+ "depth": 3,
237
+ "numbering": [
238
+ 1,
239
+ 2,
240
+ 1
241
+ ],
242
+ "parent": "root"
243
+ },
244
+ {
245
+ "value": "Visual variants",
246
+ "href": "#visual-variants",
247
+ "depth": 3,
248
+ "numbering": [
249
+ 1,
250
+ 2,
251
+ 2
252
+ ],
253
+ "parent": "root"
254
+ },
255
+ {
256
+ "value": "Leading and trailing elements",
257
+ "href": "#leading-and-trailing-elements",
258
+ "depth": 3,
259
+ "numbering": [
260
+ 1,
261
+ 2,
262
+ 3
263
+ ],
264
+ "parent": "root"
265
+ },
266
+ {
267
+ "value": "Placeholder text",
268
+ "href": "#placeholder-text",
269
+ "depth": 3,
270
+ "numbering": [
271
+ 1,
272
+ 2,
273
+ 4
274
+ ],
275
+ "parent": "root"
276
+ },
277
+ {
278
+ "value": "Disabled state",
279
+ "href": "#disabled-state",
280
+ "depth": 3,
281
+ "numbering": [
282
+ 1,
283
+ 2,
284
+ 5
285
+ ],
286
+ "parent": "root"
287
+ },
288
+ {
289
+ "value": "Invalid state",
290
+ "href": "#invalid-state",
291
+ "depth": 3,
292
+ "numbering": [
293
+ 1,
294
+ 2,
295
+ 6
296
+ ],
297
+ "parent": "root"
298
+ },
299
+ {
300
+ "value": "Read-only state",
301
+ "href": "#read-only-state",
302
+ "depth": 3,
303
+ "numbering": [
304
+ 1,
305
+ 2,
306
+ 7
307
+ ],
308
+ "parent": "root"
309
+ },
310
+ {
311
+ "value": "Uncontrolled mode",
312
+ "href": "#uncontrolled-mode",
313
+ "depth": 3,
314
+ "numbering": [
315
+ 1,
316
+ 2,
317
+ 8
318
+ ],
319
+ "parent": "root"
320
+ },
321
+ {
322
+ "value": "Controlled mode",
323
+ "href": "#controlled-mode",
324
+ "depth": 3,
325
+ "numbering": [
326
+ 1,
327
+ 2,
328
+ 9
329
+ ],
330
+ "parent": "root"
331
+ },
332
+ {
333
+ "value": "Required field",
334
+ "href": "#required-field",
335
+ "depth": 3,
336
+ "numbering": [
337
+ 1,
338
+ 2,
339
+ 10
340
+ ],
341
+ "parent": "root"
342
+ },
343
+ {
344
+ "value": "Component requirements",
345
+ "href": "#component-requirements",
346
+ "depth": 2,
347
+ "numbering": [
348
+ 1,
349
+ 3
350
+ ],
351
+ "parent": "root"
352
+ },
353
+ {
354
+ "value": "Accessibility",
355
+ "href": "#accessibility",
356
+ "depth": 2,
357
+ "numbering": [
358
+ 1,
359
+ 4
360
+ ],
361
+ "parent": "root"
362
+ },
363
+ {
364
+ "value": "Keyboard navigation",
365
+ "href": "#keyboard-navigation",
366
+ "depth": 4,
367
+ "numbering": [
368
+ 1,
369
+ 4,
370
+ 1,
371
+ 1
372
+ ],
373
+ "parent": "root"
374
+ },
375
+ {
376
+ "value": "Click-to-focus behavior",
377
+ "href": "#click-to-focus-behavior",
378
+ "depth": 4,
379
+ "numbering": [
380
+ 1,
381
+ 4,
382
+ 1,
383
+ 2
384
+ ],
385
+ "parent": "root"
386
+ },
387
+ {
388
+ "value": "API reference",
389
+ "href": "#api-reference",
390
+ "depth": 2,
391
+ "numbering": [
392
+ 1,
393
+ 5
394
+ ],
395
+ "parent": "root"
396
+ },
397
+ {
398
+ "value": "Common patterns",
399
+ "href": "#common-patterns",
400
+ "depth": 2,
401
+ "numbering": [
402
+ 1,
403
+ 6
404
+ ],
405
+ "parent": "root"
406
+ },
407
+ {
408
+ "value": "Input with icon",
409
+ "href": "#input-with-icon",
410
+ "depth": 3,
411
+ "numbering": [
412
+ 1,
413
+ 6,
414
+ 1
415
+ ],
416
+ "parent": "root"
417
+ },
418
+ {
419
+ "value": "Search input pattern",
420
+ "href": "#search-input-pattern",
421
+ "depth": 3,
422
+ "numbering": [
423
+ 1,
424
+ 6,
425
+ 2
426
+ ],
427
+ "parent": "root"
428
+ },
429
+ {
430
+ "value": "Input with clear button",
431
+ "href": "#input-with-clear-button",
432
+ "depth": 3,
433
+ "numbering": [
434
+ 1,
435
+ 6,
436
+ 3
437
+ ],
438
+ "parent": "root"
439
+ },
440
+ {
441
+ "value": "Testing your implementation",
442
+ "href": "#testing-your-implementation",
443
+ "depth": 2,
444
+ "numbering": [
445
+ 1,
446
+ 7
447
+ ],
448
+ "parent": "root"
449
+ },
450
+ {
451
+ "value": "Basic Rendering Tests",
452
+ "href": "#basic-rendering-tests",
453
+ "depth": 3,
454
+ "numbering": [
455
+ 1,
456
+ 7,
457
+ 1
458
+ ],
459
+ "parent": "root"
460
+ },
461
+ {
462
+ "value": "Interaction Tests",
463
+ "href": "#interaction-tests",
464
+ "depth": 3,
465
+ "numbering": [
466
+ 1,
467
+ 7,
468
+ 2
469
+ ],
470
+ "parent": "root"
471
+ },
472
+ {
473
+ "value": "Testing Controlled Mode",
474
+ "href": "#testing-controlled-mode",
475
+ "depth": 3,
476
+ "numbering": [
477
+ 1,
478
+ 7,
479
+ 3
480
+ ],
481
+ "parent": "root"
482
+ },
483
+ {
484
+ "value": "Testing Leading and Trailing Elements",
485
+ "href": "#testing-leading-and-trailing-elements",
486
+ "depth": 3,
487
+ "numbering": [
488
+ 1,
489
+ 7,
490
+ 4
491
+ ],
492
+ "parent": "root"
493
+ },
494
+ {
495
+ "value": "Testing Validation States",
496
+ "href": "#testing-validation-states",
497
+ "depth": 3,
498
+ "numbering": [
499
+ 1,
500
+ 7,
501
+ 5
502
+ ],
503
+ "parent": "root"
504
+ },
505
+ {
506
+ "value": "Resources",
507
+ "href": "#resources",
508
+ "depth": 2,
509
+ "numbering": [
510
+ 1,
511
+ 8
512
+ ],
513
+ "parent": "root"
514
+ }
515
+ ]
516
+ },
517
+ "guidelines": {
518
+ "mdx": "\n## Guidelines\n\nText input guidelines focus on creating clear, accessible, and user-friendly\nfields for data entry by emphasizing proper labeling, providing helpful cues and\nvalidation, ensuring keyboard navigation, and offering clear feedback on input\nstatus.\n\n### Best practices\n\n- **Keyboard Navigation:**\n - Ensure that text inputs are fully keyboard accessible (using the Tab key to\n navigate).\n- **Error Handling:**\n - Provide clear and specific error messages when invalid input is entered.\n - Display error messages close to the input field.\n- **Placeholder text:**\n - Avoid relying solely on placeholder text, as it disappears when the user\n starts typing.\n - Make use of clear labels and helper text if clarifying information is\n needed.\n\n### Placeholder text\n\nGood placeholder text informs the user what to expect and can easily understand\nthe difference between placeholder and pre-filled content.\n\n> [!TIP]\\\n> When to use\n\n- **Provide hints:** Use placeholder text to give users a brief hint or example\n of the expected input format.\n- **Keep it concise:** Placeholder text should be short and to the point. Avoid\n long sentences or paragraphs.\n- **Use a subtle visual style:** Visually differentiate placeholder text from\n actual input text by using the placeholder text styling. This helps users\n understand that it's a suggestion, not a pre-filled value.  \n\n> [!CAUTION]\\\n> When not to use\n\n- **Don't use as labels:** Placeholder text should never replace proper labels.\n Labels provide persistent context, while placeholder text disappears when the\n user starts typing.  \n- **Don't include critical information:** Avoid putting essential instructions\n or information solely in the placeholder, as it will be hidden once the user\n interacts with the field.  \n- **Don't overuse:** Too much placeholder text can clutter the interface and\n make it harder for users to focus.\n\n> [!TIP]\\\n> **Do**\n>\n> - Give the user a hint on what is expected, in a concise way.\n> - If this information is important to always keep visible, use helper text\n> instead.\n\n```jsx live\nconst App = () => <TextInput placeholder=\"MM/DD/YYYY\"/>\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - This placeholder text looks like it has been prefilled for the user which is\n> more likely to confuse the user.\n\n```jsx live\nconst App = () => <TextInput placeholder=\"01/21/1970\"/>\n```\n\n### Size\n\nAllow for enough width for the user to read and add in their information. Avoid\ntruncation if possible especially if the user will be referring back or needing\nto make sure there isn’t inaccurate information.\n\n> [!TIP]\\\n> When to use\n>\n> - There is enough space that the user can easily consume and correct this\n> information if needed.\n\n```jsx live\nconst App = () => <TextInput placeholder=\"01/21/1970\" value=\"805 St Cloud Road\"/>\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - The user’s information is too long for this field to be able to read the\n> details completely.\n\n```jsx live\nconst App = () => <TextInput value=\"805 St Cloud Road, Bel Air, Los Angeles, CA\" />\n```\n",
519
+ "toc": [
520
+ {
521
+ "value": "Guidelines",
522
+ "href": "#guidelines",
523
+ "depth": 2,
524
+ "numbering": [
525
+ 1,
526
+ 1
527
+ ],
528
+ "parent": "root"
529
+ },
530
+ {
531
+ "value": "Best practices",
532
+ "href": "#best-practices",
533
+ "depth": 3,
534
+ "numbering": [
535
+ 1,
536
+ 1,
537
+ 1
538
+ ],
539
+ "parent": "root"
540
+ },
541
+ {
542
+ "value": "Placeholder text",
543
+ "href": "#placeholder-text",
544
+ "depth": 3,
545
+ "numbering": [
546
+ 1,
547
+ 1,
548
+ 2
549
+ ],
550
+ "parent": "root"
551
+ },
552
+ {
553
+ "value": "Size",
554
+ "href": "#size",
555
+ "depth": 3,
556
+ "numbering": [
557
+ 1,
558
+ 1,
559
+ 3
560
+ ],
561
+ "parent": "root"
562
+ }
563
+ ]
564
+ }
565
+ }
566
+ }