@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,576 @@
1
+ {
2
+ "meta": {
3
+ "id": "Components-PasswordInput",
4
+ "title": "Password input",
5
+ "exportName": "PasswordInput",
6
+ "description": "A password input is a text field that hides entered characters for secure password entry.",
7
+ "lifecycleState": "Stable",
8
+ "order": 999,
9
+ "repoPath": "packages/nimbus/src/components/password-input/password-input.mdx",
10
+ "menu": [
11
+ "Components",
12
+ "Inputs",
13
+ "Password input"
14
+ ],
15
+ "route": "components/inputs/password-input",
16
+ "tags": [
17
+ "component",
18
+ "forms",
19
+ "password",
20
+ "input",
21
+ "secure"
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": "Visual options",
57
+ "href": "#visual-options",
58
+ "depth": 3,
59
+ "numbering": [
60
+ 1,
61
+ 2,
62
+ 1
63
+ ],
64
+ "parent": "root"
65
+ },
66
+ {
67
+ "value": "Medium",
68
+ "href": "#medium",
69
+ "depth": 4,
70
+ "numbering": [
71
+ 1,
72
+ 2,
73
+ 1,
74
+ 1
75
+ ],
76
+ "parent": "root"
77
+ },
78
+ {
79
+ "value": "Small",
80
+ "href": "#small",
81
+ "depth": 4,
82
+ "numbering": [
83
+ 1,
84
+ 2,
85
+ 1,
86
+ 2
87
+ ],
88
+ "parent": "root"
89
+ }
90
+ ],
91
+ "layout": "app-frame",
92
+ "tabs": [
93
+ {
94
+ "key": "overview",
95
+ "title": "Overview",
96
+ "order": 0
97
+ },
98
+ {
99
+ "key": "guidelines",
100
+ "title": "Guidelines",
101
+ "order": 2
102
+ },
103
+ {
104
+ "key": "dev",
105
+ "title": "Implementation",
106
+ "order": 3
107
+ },
108
+ {
109
+ "key": "a11y",
110
+ "title": "Accessibility",
111
+ "order": 4
112
+ }
113
+ ]
114
+ },
115
+ "mdx": "\n## Overview\n\nPassword input guidelines focus on creating secure and user-friendly fields for\nentering sensitive credentials, emphasizing visual obscuring of input, clear\nlabeling and validation, accessibility considerations, and best practices for\npassword visibility toggles and error handling.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=3982-23613&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Visual options\n\n#### Medium\n\n```jsx live\nconst App = () => <PasswordInput placeholder=\"Enter a password\" />\n```\n\n#### Small\n\n```jsx live\nconst App = () => <PasswordInput placeholder=\"Enter a password\" size=\"sm\" />\n```\n",
116
+ "views": {
117
+ "overview": {
118
+ "mdx": "\n## Overview\n\nPassword input guidelines focus on creating secure and user-friendly fields for\nentering sensitive credentials, emphasizing visual obscuring of input, clear\nlabeling and validation, accessibility considerations, and best practices for\npassword visibility toggles and error handling.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=3982-23613&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Visual options\n\n#### Medium\n\n```jsx live\nconst App = () => <PasswordInput placeholder=\"Enter a password\" />\n```\n\n#### Small\n\n```jsx live\nconst App = () => <PasswordInput placeholder=\"Enter a password\" size=\"sm\" />\n```\n",
119
+ "toc": [
120
+ {
121
+ "value": "Overview",
122
+ "href": "#overview",
123
+ "depth": 2,
124
+ "numbering": [
125
+ 1,
126
+ 1
127
+ ],
128
+ "parent": "root"
129
+ },
130
+ {
131
+ "value": "Resources",
132
+ "href": "#resources",
133
+ "depth": 3,
134
+ "numbering": [
135
+ 1,
136
+ 1,
137
+ 1
138
+ ],
139
+ "parent": "root"
140
+ },
141
+ {
142
+ "value": "Variables",
143
+ "href": "#variables",
144
+ "depth": 2,
145
+ "numbering": [
146
+ 1,
147
+ 2
148
+ ],
149
+ "parent": "root"
150
+ },
151
+ {
152
+ "value": "Visual options",
153
+ "href": "#visual-options",
154
+ "depth": 3,
155
+ "numbering": [
156
+ 1,
157
+ 2,
158
+ 1
159
+ ],
160
+ "parent": "root"
161
+ },
162
+ {
163
+ "value": "Medium",
164
+ "href": "#medium",
165
+ "depth": 4,
166
+ "numbering": [
167
+ 1,
168
+ 2,
169
+ 1,
170
+ 1
171
+ ],
172
+ "parent": "root"
173
+ },
174
+ {
175
+ "value": "Small",
176
+ "href": "#small",
177
+ "depth": 4,
178
+ "numbering": [
179
+ 1,
180
+ 2,
181
+ 1,
182
+ 2
183
+ ],
184
+ "parent": "root"
185
+ }
186
+ ]
187
+ },
188
+ "a11y": {
189
+ "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 <PasswordInput\n placeholder=\"Enter a password\"\n autoComplete=\"current-password\"\n aria-label=\"Password\"\n />\n);\n```\n\n### Accessibility standards\n\n- Always provide a visible label for the input.\n- Clearly associate the label with the input using the for attribute on the\n `<label>` and a matching id on the `<input type=\"password\">`.\n- Ensure sufficient color contrast for all elements (text, borders, icons, focus\n indicators).\n- Clearly indicate the focused state.\n- Support keyboard navigation:\n - Use Tab to navigate to and from the input.\n - Allow users to copy, cut, and paste using standard keyboard shortcuts\n (Ctrl/Cmd + C, Ctrl/Cmd + X, Ctrl/Cmd + V).\n- Communicate errors clearly, using both visual cues (e.g., color) and\n descriptive error messages.\n- Provide a toggle to show/hide password characters. Ensure this toggle is\n keyboard accessible and clearly labeled (e.g., \"Show password\" / \"Hide\n password\").\n- Use autocomplete=\"current-password\" or autocomplete=\"new-password\" as\n appropriate to allow browsers and password managers to offer autofill.\n- Avoid automatically masking pasted content.\n- Do not disable the paste functionality.\n\n## Resources\n\n- [Adobe Spectrum Design System](https://spectrum.adobe.com/page/text-field/)\n- [React Spectrum](https://react-spectrum.adobe.com/react-spectrum/TextField.html)\n- [W3C ARIA Authoring Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/)\n",
190
+ "toc": [
191
+ {
192
+ "value": "Accessibility",
193
+ "href": "#accessibility",
194
+ "depth": 2,
195
+ "numbering": [
196
+ 1,
197
+ 1
198
+ ],
199
+ "parent": "root"
200
+ },
201
+ {
202
+ "value": "Accessibility standards",
203
+ "href": "#accessibility-standards",
204
+ "depth": 3,
205
+ "numbering": [
206
+ 1,
207
+ 1,
208
+ 1
209
+ ],
210
+ "parent": "root"
211
+ },
212
+ {
213
+ "value": "Resources",
214
+ "href": "#resources",
215
+ "depth": 2,
216
+ "numbering": [
217
+ 1,
218
+ 2
219
+ ],
220
+ "parent": "root"
221
+ }
222
+ ]
223
+ },
224
+ "dev": {
225
+ "mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { PasswordInput, type PasswordInputProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation uses uncontrolled mode:\n\n```jsx live-dev\nconst App = () => (\n <PasswordInput placeholder=\"Enter your password\" />\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 <PasswordInput size=\"sm\" placeholder=\"Small password input\" />\n <PasswordInput size=\"md\" placeholder=\"Medium password 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 <PasswordInput variant=\"solid\" placeholder=\"Solid variant (default)\" />\n <PasswordInput variant=\"ghost\" placeholder=\"Ghost variant\" />\n </Stack>\n)\n```\n\n### With leading element\n\nAdd an icon or other element at the start of the input:\n\n```jsx live-dev\nconst App = () => {\n const { Lock } = Icons;\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <PasswordInput\n size=\"sm\"\n leadingElement={<Icon as={Lock} />}\n placeholder=\"Small with icon\"\n />\n <PasswordInput\n size=\"md\"\n leadingElement={<Icon as={Lock} />}\n placeholder=\"Medium with icon\"\n />\n </Stack>\n );\n}\n```\n\n**Behavioral notes:**\n- Leading element automatically respects text direction (LTR/RTL)\n- Icon sizing automatically adjusts based on the `size` prop\n- The visibility toggle button always appears at the end of the input\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 <PasswordInput placeholder=\"Enabled input\" />\n <PasswordInput placeholder=\"Disabled input\" isDisabled />\n <PasswordInput\n value=\"SecretPassword123\"\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 <PasswordInput\n placeholder=\"Valid password\"\n value=\"StrongPass123!\"\n onChange={() => {}}\n />\n <PasswordInput\n placeholder=\"Invalid password\"\n value=\"weak\"\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 <PasswordInput\n value=\"EditablePassword123\"\n onChange={() => {}}\n placeholder=\"Editable password\"\n />\n <PasswordInput\n value=\"ReadOnlyPassword456\"\n isReadOnly\n onChange={() => {}}\n placeholder=\"Read-only password\"\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 <PasswordInput\n placeholder=\"Type your password...\"\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 password value without managing state yourself.\n\n**Note:** PasswordInput's `onChange` receives the string value directly, not an event object.\n\n### Controlled mode\n\nFor scenarios requiring programmatic control or validation, 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 <PasswordInput\n value={value}\n onChange={(value) => setValue(value)}\n placeholder=\"Controlled password\"\n />\n <Text fontSize=\"sm\">\n {value ? `You typed: ${value}` : 'Start typing...'}\n </Text>\n <Button onClick={() => setValue('')} size=\"xs\">\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 password strength in real-time\n- Clear or programmatically set the value\n- Coordinate with other form fields\n\n## Component requirements\n\n## Accessibility\n\nThe PasswordInput handles most accessibility requirements internally, including the show/hide password button with internationalized labels. However, you must always associate an internationalized label with the component. Visual labels are preferable, and can be set by using the [`PasswordInputField`](patterns/fields/passwordinputfield) pattern component.\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<PasswordInput aria-label={msg.format(passwordMessage)} />\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 = \"example-password-input\";\n\nexport const Example = () => (\n <PasswordInput id={PERSISTENT_ID} aria-label=\"Password\" />\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n- `Tab` / `Shift+Tab`: Move focus to/from the input field and visibility toggle button\n- `Enter` / `Space`: When the visibility toggle button is focused, toggles password visibility\n- Standard text input editing: All standard keyboard shortcuts for text editing work in the input field\n\n## API reference\n\n<PropsTable id=\"PasswordInput\" />\n\n## Common patterns\n\n### Password confirmation\n\nA common pattern for password entry with confirmation:\n\n```jsx live-dev\nconst App = () => {\n const [password, setPassword] = useState<string>('');\n const [confirmPassword, setConfirmPassword] = useState<string>('');\n\n const passwordsMatch = password === confirmPassword && password !== \"\";\n const showMismatch = confirmPassword !== \"\" && !passwordsMatch;\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <PasswordInput\n value={password}\n onChange={setPassword}\n placeholder=\"Enter password\"\n />\n <PasswordInput\n value={confirmPassword}\n onChange={setConfirmPassword}\n isInvalid={showMismatch}\n placeholder=\"Confirm password\"\n />\n {showMismatch && (\n <Text fontSize=\"sm\" color=\"critical.11\">\n Passwords do not match\n </Text>\n )}\n {passwordsMatch && (\n <Text fontSize=\"sm\" color=\"positive.11\">\n Passwords match\n </Text>\n )}\n </Stack>\n );\n}\n```\n\n### Password strength indicator\n\nIntegrate with password strength validation:\n\n```jsx live-dev\nconst App = () => {\n const [password, setPassword] = useState<string>('');\n\n const getStrength = (pass: string) => {\n if (!pass) return { label: \"No password\", color: \"neutral.11\" };\n if (pass.length < 6) return { label: \"Weak\", color: \"critical.11\" };\n if (pass.length < 10) return { label: \"Medium\", color: \"warning.11\" };\n return { label: \"Strong\", color: \"positive.11\" };\n };\n\n const strength = getStrength(password);\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <PasswordInput\n value={password}\n onChange={setPassword}\n placeholder=\"Enter password\"\n />\n <Text fontSize=\"sm\" color={strength.color}>\n Strength: {strength.label}\n </Text>\n <Text fontSize=\"xs\" color=\"neutral.11\">\n Use at least 10 characters for a strong password\n </Text>\n </Stack>\n );\n}\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using PasswordInput 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 { PasswordInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"PasswordInput - Basic rendering\", () => {\n it(\"renders password input field\", () => {\n render(\n <NimbusProvider>\n <PasswordInput aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n // Verify input is present with password type\n const input = screen.getByLabelText(\"Password\");\n expect(input).toBeInTheDocument();\n expect(input).toHaveAttribute(\"type\", \"password\");\n });\n\n it(\"renders visibility toggle button\", () => {\n render(\n <NimbusProvider>\n <PasswordInput aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n // Verify toggle button is present\n const toggleButton = screen.getByRole(\"button\");\n expect(toggleButton).toBeInTheDocument();\n });\n\n it(\"renders with placeholder text\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n aria-label=\"Password\"\n placeholder=\"Enter your password\"\n />\n </NimbusProvider>\n );\n\n expect(\n screen.getByPlaceholderText(\"Enter your password\")\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 { PasswordInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"PasswordInput - Interactions\", () => {\n it(\"toggles password visibility when button is clicked\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <PasswordInput aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n const toggleButton = screen.getByRole(\"button\");\n\n // Initially type is password\n expect(input).toHaveAttribute(\"type\", \"password\");\n\n // Click to show password\n await user.click(toggleButton);\n expect(input).toHaveAttribute(\"type\", \"text\");\n\n // Click again to hide password\n await user.click(toggleButton);\n expect(input).toHaveAttribute(\"type\", \"password\");\n });\n\n it(\"calls onChange with entered value\", async () => {\n const user = userEvent.setup();\n const handleChange = vi.fn();\n render(\n <NimbusProvider>\n <PasswordInput aria-label=\"Password\" onChange={handleChange} />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n await user.type(input, \"Secret123\");\n\n expect(handleChange).toHaveBeenCalled();\n expect(input).toHaveValue(\"Secret123\");\n });\n\n it(\"updates value when user types\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <PasswordInput placeholder=\"Type password\" aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n await user.type(input, \"MyPassword123\");\n\n expect(input).toHaveValue(\"MyPassword123\");\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 { PasswordInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"PasswordInput - Controlled mode\", () => {\n it(\"displays controlled value\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n value=\"controlled value\"\n onChange={() => {}}\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n expect(input).toHaveValue(\"controlled value\");\n });\n\n it(\"updates when controlled value changes\", () => {\n const { rerender } = render(\n <NimbusProvider>\n <PasswordInput\n value=\"first value\"\n onChange={() => {}}\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n expect(screen.getByLabelText(\"Password\")).toHaveValue(\"first value\");\n\n rerender(\n <NimbusProvider>\n <PasswordInput\n value=\"second value\"\n onChange={() => {}}\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n expect(screen.getByLabelText(\"Password\")).toHaveValue(\"second value\");\n });\n\n it(\"clears controlled value\", async () => {\n const user = userEvent.setup();\n let currentValue = \"Test\";\n\n const { rerender } = render(\n <NimbusProvider>\n <PasswordInput\n value={currentValue}\n onChange={(value: string) => {\n currentValue = value;\n }}\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n expect(input).toHaveValue(\"Test\");\n\n await user.clear(input);\n\n // Rerender with cleared value\n rerender(\n <NimbusProvider>\n <PasswordInput\n value=\"\"\n onChange={(value: string) => {\n currentValue = value;\n }}\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n expect(input).toHaveValue(\"\");\n });\n});\n```\n\n### Testing Leading Element\n\nTest custom leading element rendering\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 { PasswordInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"PasswordInput - Leading element\", () => {\n it(\"renders leading element\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n aria-label=\"Password\"\n leadingElement={<span data-testid=\"lock-icon\">🔒</span>}\n placeholder=\"Password\"\n />\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"lock-icon\")).toBeInTheDocument();\n });\n\n it(\"renders input with leading element\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n leadingElement={<span data-testid=\"icon\">Icon</span>}\n aria-label=\"Password with icon\"\n />\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"icon\")).toBeInTheDocument();\n expect(screen.getByLabelText(/password with icon/i)).toBeInTheDocument();\n });\n});\n```\n\n### Testing Keyboard Navigation\n\nTest keyboard interactions\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 { PasswordInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"PasswordInput - Keyboard navigation\", () => {\n it(\"toggles visibility with Enter key\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <PasswordInput aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n const toggleButton = screen.getByRole(\"button\");\n\n // Use userEvent.tab() to focus elements (avoids act() warnings)\n // First tab focuses the input, second tab focuses the toggle button\n await user.tab();\n await user.tab();\n expect(toggleButton).toHaveFocus();\n\n // Press Enter to toggle\n await user.keyboard(\"{Enter}\");\n expect(input).toHaveAttribute(\"type\", \"text\");\n\n // Press Space to toggle back\n await user.keyboard(\" \");\n expect(input).toHaveAttribute(\"type\", \"password\");\n });\n\n it(\"moves focus between input and button with Tab\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <PasswordInput aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n const toggleButton = screen.getByRole(\"button\");\n\n // Tab to input\n await user.tab();\n expect(input).toHaveFocus();\n\n // Tab to toggle button\n await user.tab();\n expect(toggleButton).toHaveFocus();\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 { PasswordInput, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"PasswordInput - Validation states\", () => {\n it(\"renders disabled state\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n isDisabled\n placeholder=\"Disabled\"\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n expect(input).toBeDisabled();\n });\n\n it(\"renders invalid state\", () => {\n render(\n <NimbusProvider>\n <PasswordInput isInvalid placeholder=\"Invalid\" aria-label=\"Password\" />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n expect(input).toHaveAttribute(\"aria-invalid\", \"true\");\n });\n\n it(\"renders read-only state\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n isReadOnly\n value=\"Read-only password\"\n onChange={() => {}}\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\n expect(input).toHaveAttribute(\"readonly\");\n });\n\n it(\"renders required state\", () => {\n render(\n <NimbusProvider>\n <PasswordInput\n isRequired\n placeholder=\"Required\"\n aria-label=\"Password\"\n />\n </NimbusProvider>\n );\n\n const input = screen.getByLabelText(\"Password\");\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-passwordinput--docs)\n- [PasswordInputField Pattern](/patterns/fields/passwordinputfield)\n- [TextInput Component](/components/inputs/textinput)\n- [React Aria TextField](https://react-spectrum.adobe.com/react-aria/TextField.html)\n",
226
+ "toc": [
227
+ {
228
+ "value": "Getting started",
229
+ "href": "#getting-started",
230
+ "depth": 2,
231
+ "numbering": [
232
+ 1,
233
+ 1
234
+ ],
235
+ "parent": "root"
236
+ },
237
+ {
238
+ "value": "Import",
239
+ "href": "#import",
240
+ "depth": 3,
241
+ "numbering": [
242
+ 1,
243
+ 1,
244
+ 1
245
+ ],
246
+ "parent": "root"
247
+ },
248
+ {
249
+ "value": "Basic usage",
250
+ "href": "#basic-usage",
251
+ "depth": 3,
252
+ "numbering": [
253
+ 1,
254
+ 1,
255
+ 2
256
+ ],
257
+ "parent": "root"
258
+ },
259
+ {
260
+ "value": "Usage examples",
261
+ "href": "#usage-examples",
262
+ "depth": 2,
263
+ "numbering": [
264
+ 1,
265
+ 2
266
+ ],
267
+ "parent": "root"
268
+ },
269
+ {
270
+ "value": "Size options",
271
+ "href": "#size-options",
272
+ "depth": 3,
273
+ "numbering": [
274
+ 1,
275
+ 2,
276
+ 1
277
+ ],
278
+ "parent": "root"
279
+ },
280
+ {
281
+ "value": "Visual variants",
282
+ "href": "#visual-variants",
283
+ "depth": 3,
284
+ "numbering": [
285
+ 1,
286
+ 2,
287
+ 2
288
+ ],
289
+ "parent": "root"
290
+ },
291
+ {
292
+ "value": "With leading element",
293
+ "href": "#with-leading-element",
294
+ "depth": 3,
295
+ "numbering": [
296
+ 1,
297
+ 2,
298
+ 3
299
+ ],
300
+ "parent": "root"
301
+ },
302
+ {
303
+ "value": "Disabled state",
304
+ "href": "#disabled-state",
305
+ "depth": 3,
306
+ "numbering": [
307
+ 1,
308
+ 2,
309
+ 4
310
+ ],
311
+ "parent": "root"
312
+ },
313
+ {
314
+ "value": "Invalid state",
315
+ "href": "#invalid-state",
316
+ "depth": 3,
317
+ "numbering": [
318
+ 1,
319
+ 2,
320
+ 5
321
+ ],
322
+ "parent": "root"
323
+ },
324
+ {
325
+ "value": "Read-only state",
326
+ "href": "#read-only-state",
327
+ "depth": 3,
328
+ "numbering": [
329
+ 1,
330
+ 2,
331
+ 6
332
+ ],
333
+ "parent": "root"
334
+ },
335
+ {
336
+ "value": "Uncontrolled mode",
337
+ "href": "#uncontrolled-mode",
338
+ "depth": 3,
339
+ "numbering": [
340
+ 1,
341
+ 2,
342
+ 7
343
+ ],
344
+ "parent": "root"
345
+ },
346
+ {
347
+ "value": "Controlled mode",
348
+ "href": "#controlled-mode",
349
+ "depth": 3,
350
+ "numbering": [
351
+ 1,
352
+ 2,
353
+ 8
354
+ ],
355
+ "parent": "root"
356
+ },
357
+ {
358
+ "value": "Component requirements",
359
+ "href": "#component-requirements",
360
+ "depth": 2,
361
+ "numbering": [
362
+ 1,
363
+ 3
364
+ ],
365
+ "parent": "root"
366
+ },
367
+ {
368
+ "value": "Accessibility",
369
+ "href": "#accessibility",
370
+ "depth": 2,
371
+ "numbering": [
372
+ 1,
373
+ 4
374
+ ],
375
+ "parent": "root"
376
+ },
377
+ {
378
+ "value": "Keyboard navigation",
379
+ "href": "#keyboard-navigation",
380
+ "depth": 4,
381
+ "numbering": [
382
+ 1,
383
+ 4,
384
+ 1,
385
+ 1
386
+ ],
387
+ "parent": "root"
388
+ },
389
+ {
390
+ "value": "API reference",
391
+ "href": "#api-reference",
392
+ "depth": 2,
393
+ "numbering": [
394
+ 1,
395
+ 5
396
+ ],
397
+ "parent": "root"
398
+ },
399
+ {
400
+ "value": "Common patterns",
401
+ "href": "#common-patterns",
402
+ "depth": 2,
403
+ "numbering": [
404
+ 1,
405
+ 6
406
+ ],
407
+ "parent": "root"
408
+ },
409
+ {
410
+ "value": "Password confirmation",
411
+ "href": "#password-confirmation",
412
+ "depth": 3,
413
+ "numbering": [
414
+ 1,
415
+ 6,
416
+ 1
417
+ ],
418
+ "parent": "root"
419
+ },
420
+ {
421
+ "value": "Password strength indicator",
422
+ "href": "#password-strength-indicator",
423
+ "depth": 3,
424
+ "numbering": [
425
+ 1,
426
+ 6,
427
+ 2
428
+ ],
429
+ "parent": "root"
430
+ },
431
+ {
432
+ "value": "Testing your implementation",
433
+ "href": "#testing-your-implementation",
434
+ "depth": 2,
435
+ "numbering": [
436
+ 1,
437
+ 7
438
+ ],
439
+ "parent": "root"
440
+ },
441
+ {
442
+ "value": "Basic Rendering Tests",
443
+ "href": "#basic-rendering-tests",
444
+ "depth": 3,
445
+ "numbering": [
446
+ 1,
447
+ 7,
448
+ 1
449
+ ],
450
+ "parent": "root"
451
+ },
452
+ {
453
+ "value": "Interaction Tests",
454
+ "href": "#interaction-tests",
455
+ "depth": 3,
456
+ "numbering": [
457
+ 1,
458
+ 7,
459
+ 2
460
+ ],
461
+ "parent": "root"
462
+ },
463
+ {
464
+ "value": "Testing Controlled Mode",
465
+ "href": "#testing-controlled-mode",
466
+ "depth": 3,
467
+ "numbering": [
468
+ 1,
469
+ 7,
470
+ 3
471
+ ],
472
+ "parent": "root"
473
+ },
474
+ {
475
+ "value": "Testing Leading Element",
476
+ "href": "#testing-leading-element",
477
+ "depth": 3,
478
+ "numbering": [
479
+ 1,
480
+ 7,
481
+ 4
482
+ ],
483
+ "parent": "root"
484
+ },
485
+ {
486
+ "value": "Testing Keyboard Navigation",
487
+ "href": "#testing-keyboard-navigation",
488
+ "depth": 3,
489
+ "numbering": [
490
+ 1,
491
+ 7,
492
+ 5
493
+ ],
494
+ "parent": "root"
495
+ },
496
+ {
497
+ "value": "Testing Validation States",
498
+ "href": "#testing-validation-states",
499
+ "depth": 3,
500
+ "numbering": [
501
+ 1,
502
+ 7,
503
+ 6
504
+ ],
505
+ "parent": "root"
506
+ },
507
+ {
508
+ "value": "Resources",
509
+ "href": "#resources",
510
+ "depth": 2,
511
+ "numbering": [
512
+ 1,
513
+ 8
514
+ ],
515
+ "parent": "root"
516
+ }
517
+ ]
518
+ },
519
+ "guidelines": {
520
+ "mdx": "\n## Guidelines\n\nPassword field guidelines provide designers with best practices for creating\nsecure and usable password entry, covering visual obscuring, clear labeling and\nvalidation, accessibility, and optional features like password visibility\ntoggles.\n\n### Best practices\n\n- **Clear labeling:** Always use a visible and descriptive label (e.g.,\n \"Password\") placed outside the input field. Avoid using placeholder text as\n the sole label.\n- **Visual obscuring:** Ensure entered characters are masked by default for\n security.\n- **Password visibility toggle:** Provide a clear and easily accessible button\n to allow users to temporarily view the password they've typed. This helps\n prevent errors.\n- **Contextual help:** Display this requirement clearly upfront if there are\n particular details that users need to be mindful of such as length or\n inclusion of special characters.\n- **Inline validation:** When applicable, offer real-time feedback as users\n type, indicating whether they meet the password requirements.\n- **Clear error handling:** If the entered password is incorrect, provide a\n clear and helpful error message that doesn't reveal too much information about\n why it's wrong.\n- **Password reset link:** Make the \"Forgot Password\" link easily discoverable\n near the password input field.\n- **Allow pasting:** Generally, allow users to paste passwords from password\n managers.\n- **Accessibility:** Ensure the password field and its associated elements\n (label, toggle, error messages) are accessible to users with disabilities,\n including screen reader compatibility and keyboard navigation.\n\n## Usage\n\nA password field provides a secure text input for users to enter confidential\ncredentials, visually obscuring the typed characters to protect them from being\nseen by others.\n\n> [!TIP]\\\n> When to use\n\n- **Authentication:** For securely entering credentials when logging into\n accounts or accessing protected information.\n- **Account creation:** When users are setting up new accounts and need to\n define a secret password.\n- **Sensitive data entry:** In situations where users need to input confidential\n information that should not be visible to others.\n- **Confirmation of sensitive actions:** Occasionally used to re-authenticate\n users before performing critical actions.\n\n> [!CAUTION]\\\n> When not to use\n\n- **Non-sensitive text entry:** For regular text input where privacy is not a\n concern (e.g., usernames, search queries, messages). Use a standard text input\n field instead.\n- **Displaying existing passwords:** Never use a password input to show a user\n their currently saved password by default (unless using the \"Show password\"\n toggle).\n- **Forced complexity rules without explanation:** Avoid requiring complex\n passwords in a password input without clearly explaining the rules before the\n user types.\n\n## Password labeling and messaging\n\nBest practices for password input labeling involve using clear, persistent\nlabels and providing concise, helpful error messages that guide users to meet\npassword requirements without revealing security vulnerabilities.\n\n> [!TIP]\\\n> **Do**\n>\n> - Do use clear and visible labels outside the input field.\n> - Do use inline validation to give immediate feedback.\n> - Do make the \"Forgot Password\" link easily accessible.\n\n```jsx live\nconst App = () => (\n <FormField.Root>\n <FormField.Label>Password</FormField.Label>\n <FormField.Input>\n <PasswordInput placeholder=\"P@33w0rd\" />\n </FormField.Input>\n <FormField.Description>Use at least 8 characters, including a number and a symbol.</FormField.Description>\n </FormField.Root>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't use placeholder text as the sole label.\n> - Don't provide overly specific error messages that could reveal security\n> information (e.g., \"Your password needs a special character\").\n\n```jsx live\nconst App = () => (\n <FormField.Root isInvalid w=\"1/2\">\n <FormField.Input>\n <PasswordInput value=\"password123\" />\n </FormField.Input>\n <FormField.Error>\n You are missing a capital letter in your password\n </FormField.Error>\n </FormField.Root>\n);\n```\n\n## Password requirements and view\n\nPassword requirements clearly communicate the rules for creating a secure\npassword, while password viewing provides a temporary way for users to check\ntheir input for accuracy.\n\n> [!TIP]\\\n> **Do**\n>\n> - Do enforce a reasonable minimum password length.\n> - Do provide clear, upfront feedback on password requirements.\n> - If possible include real time validation for the requirements for password\n> creation.\n> - Do mask the entered characters by default (e.g., with asterisks or dots).\n> - Do provide a \"Show Password\" toggle for users to verify their input.\n\n```jsx live\nconst App = () => (\n <FormField.Root w=\"1/2\">\n <FormField.Label>Password</FormField.Label>\n <FormField.Input>\n <PasswordInput />\n </FormField.Input>\n <FormField.Description>\n Include 8-15 characters, at least one special character, and one uppercase\n and lowercase letter.\n </FormField.Description>\n </FormField.Root>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't enforce overly complex password rules without clear explanation.\n> - Don't use password fields for non-sensitive information.\n> - Don't auto-submit the form when the password field is filled.\n> - Don't reveal the password by default.\n> - Don't make the \"Show Password\" toggle difficult to find or use.\n\n![](/images/password-input/password-input-requirements-dont.png)\n",
521
+ "toc": [
522
+ {
523
+ "value": "Guidelines",
524
+ "href": "#guidelines",
525
+ "depth": 2,
526
+ "numbering": [
527
+ 1,
528
+ 1
529
+ ],
530
+ "parent": "root"
531
+ },
532
+ {
533
+ "value": "Best practices",
534
+ "href": "#best-practices",
535
+ "depth": 3,
536
+ "numbering": [
537
+ 1,
538
+ 1,
539
+ 1
540
+ ],
541
+ "parent": "root"
542
+ },
543
+ {
544
+ "value": "Usage",
545
+ "href": "#usage",
546
+ "depth": 2,
547
+ "numbering": [
548
+ 1,
549
+ 2
550
+ ],
551
+ "parent": "root"
552
+ },
553
+ {
554
+ "value": "Password labeling and messaging",
555
+ "href": "#password-labeling-and-messaging",
556
+ "depth": 2,
557
+ "numbering": [
558
+ 1,
559
+ 3
560
+ ],
561
+ "parent": "root"
562
+ },
563
+ {
564
+ "value": "Password requirements and view",
565
+ "href": "#password-requirements-and-view",
566
+ "depth": 2,
567
+ "numbering": [
568
+ 1,
569
+ 4
570
+ ],
571
+ "parent": "root"
572
+ }
573
+ ]
574
+ }
575
+ }
576
+ }