@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,628 @@
1
+ {
2
+ "meta": {
3
+ "id": "Components-CollapsibleMotion",
4
+ "title": "Collapsible motion",
5
+ "exportName": "CollapsibleMotion",
6
+ "description": "A modern, accessible implementation of collapsible content with smooth height animations. Built with React Aria for accessibility and Chakra UI for consistent theming.",
7
+ "lifecycleState": "Stable",
8
+ "order": 999,
9
+ "repoPath": "packages/nimbus/src/components/collapsible-motion/collapsible-motion.mdx",
10
+ "menu": [
11
+ "Components",
12
+ "Navigation",
13
+ "Collapsible motion"
14
+ ],
15
+ "route": "components/navigation/collapsible-motion",
16
+ "tags": [
17
+ "component",
18
+ "collapsible",
19
+ "accordion",
20
+ "disclosure",
21
+ "animation",
22
+ "accessibility"
23
+ ],
24
+ "toc": [
25
+ {
26
+ "value": "Overview",
27
+ "href": "#overview",
28
+ "depth": 2,
29
+ "numbering": [
30
+ 1,
31
+ 1
32
+ ],
33
+ "parent": "root"
34
+ },
35
+ {
36
+ "value": "Key features",
37
+ "href": "#key-features",
38
+ "depth": 3,
39
+ "numbering": [
40
+ 1,
41
+ 1,
42
+ 1
43
+ ],
44
+ "parent": "root"
45
+ },
46
+ {
47
+ "value": "Variables",
48
+ "href": "#variables",
49
+ "depth": 2,
50
+ "numbering": [
51
+ 1,
52
+ 2
53
+ ],
54
+ "parent": "root"
55
+ },
56
+ {
57
+ "value": "Basic Usage",
58
+ "href": "#basic-usage",
59
+ "depth": 3,
60
+ "numbering": [
61
+ 1,
62
+ 2,
63
+ 1
64
+ ],
65
+ "parent": "root"
66
+ },
67
+ {
68
+ "value": "Controlled Mode",
69
+ "href": "#controlled-mode",
70
+ "depth": 3,
71
+ "numbering": [
72
+ 1,
73
+ 2,
74
+ 2
75
+ ],
76
+ "parent": "root"
77
+ },
78
+ {
79
+ "value": "Custom Animation Settings",
80
+ "href": "#custom-animation-settings",
81
+ "depth": 3,
82
+ "numbering": [
83
+ 1,
84
+ 2,
85
+ 3
86
+ ],
87
+ "parent": "root"
88
+ },
89
+ {
90
+ "value": "Dynamic Content",
91
+ "href": "#dynamic-content",
92
+ "depth": 3,
93
+ "numbering": [
94
+ 1,
95
+ 2,
96
+ 4
97
+ ],
98
+ "parent": "root"
99
+ },
100
+ {
101
+ "value": "Integration with other components",
102
+ "href": "#integration-with-other-components",
103
+ "depth": 2,
104
+ "numbering": [
105
+ 1,
106
+ 3
107
+ ],
108
+ "parent": "root"
109
+ },
110
+ {
111
+ "value": "Best practices",
112
+ "href": "#best-practices",
113
+ "depth": 2,
114
+ "numbering": [
115
+ 1,
116
+ 4
117
+ ],
118
+ "parent": "root"
119
+ },
120
+ {
121
+ "value": "Performance",
122
+ "href": "#performance",
123
+ "depth": 3,
124
+ "numbering": [
125
+ 1,
126
+ 4,
127
+ 1
128
+ ],
129
+ "parent": "root"
130
+ },
131
+ {
132
+ "value": "Styling",
133
+ "href": "#styling",
134
+ "depth": 3,
135
+ "numbering": [
136
+ 1,
137
+ 4,
138
+ 2
139
+ ],
140
+ "parent": "root"
141
+ },
142
+ {
143
+ "value": "Related Components",
144
+ "href": "#related-components",
145
+ "depth": 2,
146
+ "numbering": [
147
+ 1,
148
+ 5
149
+ ],
150
+ "parent": "root"
151
+ }
152
+ ],
153
+ "layout": "app-frame",
154
+ "tabs": [
155
+ {
156
+ "key": "overview",
157
+ "title": "Overview",
158
+ "order": 0
159
+ },
160
+ {
161
+ "key": "dev",
162
+ "title": "Implementation",
163
+ "order": 3
164
+ },
165
+ {
166
+ "key": "a11y",
167
+ "title": "Accessibility",
168
+ "order": 4
169
+ }
170
+ ]
171
+ },
172
+ "mdx": "\n## Overview\n\nCollapsibleMotion is a compound component that provides smooth, accessible\ncollapsible content with height animations. It combines React Aria's\naccessibility features with Chakra UI's theming system to deliver a robust\nfoundation for disclosure patterns, accordions, and expandable content sections.\n\n### Key features\n\n- **Smooth height animations**: Customizable duration with automatic content\n measurement\n- **Full accessibility support**: Proper ARIA attributes and screen reader\n compatibility\n- **Controlled and uncontrolled modes**: Flexible state management options\n- **Focus management**: Content visibility handled properly for screen readers\n- **Responsive design**: Works seamlessly across all screen sizes\n- **Chakra UI integration**: Consistent theming with the design system\n\n## Variables\n\n### Basic Usage\n\nThe simplest way to use CollapsibleMotion is in uncontrolled mode with default\nsettings:\n\n```jsx live\nconst App = () => {\n return (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <Button mb={4}>Toggle Content</Button>\n <CollapsibleMotion.Content>\n <Box p={4} bg=\"gray.50\" borderRadius=\"md\">\n <Text>\n This content will smoothly expand and collapse when the button is clicked.\n The animation uses the default duration of 200ms.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n );\n};\n```\n\n### Controlled Mode\n\nFor more complex scenarios, you can control the expanded state from a parent\ncomponent:\n\n```jsx live\nconst App = () => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n return (\n <div>\n <Button\n onClick={() => setIsExpanded(!isExpanded)}\n mb={4}\n >\n {isExpanded ? 'Collapse' : 'Expand'} Content\n </Button>\n\n <CollapsibleMotion.Root\n isExpanded={isExpanded}\n onExpandedChange={setIsExpanded}\n >\n <CollapsibleMotion.Content>\n <Box p={4} bg=\"blue.50\" borderRadius=\"md\">\n <Text>\n This content is controlled by the parent component's state.\n The parent can react to changes and implement custom logic.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </div>\n );\n};\n```\n\n### Custom Animation Settings\n\nYou can customize the minimum height and animation duration:\n\n```jsx live\nconst App = () => {\n return (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <Button mb={4}>Toggle Content</Button>\n <CollapsibleMotion.Content\n minHeight={40}\n animationDuration={500}\n >\n <Box p={6} bg=\"green.50\" borderRadius=\"md\" minH=\"150px\">\n <Text mb={4}>\n This content has a minimum height of 40px when collapsed\n and uses a slower animation duration of 500ms.\n </Text>\n <Text>\n The minimum height allows for partial visibility of content\n even when collapsed, which can be useful for previews.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n );\n};\n```\n\n### Dynamic Content\n\nCollapsibleMotion automatically handles content that changes size:\n\n```jsx live\nconst App = () => {\n const [content, setContent] = useState('short');\n\n const contentMap = {\n short: \"Short content\",\n long: \"This is much longer content that demonstrates how the component automatically adjusts to content changes. The component re-measures the content height when it changes and handles the animation smoothly.\"\n };\n\n return (\n <div>\n <Box mb={4}>\n <Button\n onClick={() => setContent('short')}\n mr={2}\n variant={content === 'short' ? 'solid' : 'outline'}\n size=\"sm\"\n >\n Short\n </Button>\n <Button\n onClick={() => setContent('long')}\n variant={content === 'long' ? 'solid' : 'outline'}\n size=\"sm\"\n >\n Long\n </Button>\n </Box>\n\n <CollapsibleMotion.Root defaultExpanded={true}>\n <Button mb={4}>Toggle Dynamic Content</Button>\n <CollapsibleMotion.Content>\n <Box p={4} bg=\"orange.50\" borderRadius=\"md\">\n <Text>{contentMap[content]}</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </div>\n );\n};\n```\n\n## Integration with other components\n\nCollapsibleMotion works well with other Nimbus components to create rich\ninteractive experiences:\n\n```jsx live\nconst App = () => {\n const [expandedSections, setExpandedSections] = useState(new Set());\n\n const toggleSection = (section) => {\n const newSections = new Set(expandedSections);\n if (newSections.has(section)) {\n newSections.delete(section);\n } else {\n newSections.add(section);\n }\n setExpandedSections(newSections);\n };\n\n return (\n <Stack spacing={4}>\n {['personal', 'billing', 'preferences'].map(section => (\n <Box key={section} border=\"1px solid\" borderColor=\"gray.200\" borderRadius=\"md\">\n <CollapsibleMotion.Root\n isExpanded={expandedSections.has(section)}\n onExpandedChange={() => toggleSection(section)}\n >\n <Button\n w=\"full\"\n variant=\"ghost\"\n justifyContent=\"space-between\"\n p={4}\n rightIcon={expandedSections.has(section) ? '−' : '+'}\n >\n {section.charAt(0).toUpperCase() + section.slice(1)} Information\n </Button>\n\n <CollapsibleMotion.Content>\n <Box p={4} borderTop=\"1px solid\" borderColor=\"gray.200\">\n <Text>\n Content for {section} section. This demonstrates how\n CollapsibleMotion can be integrated with other components\n to create accordion-like interfaces.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </Box>\n ))}\n </Stack>\n );\n};\n```\n\n## Best practices\n\n### Performance\n\n- **Content Measurement**: The component automatically measures content height,\n but avoid deeply nested or complex layouts within collapsible content when\n possible\n- **Animation Duration**: Use reasonable animation durations (100-500ms) to\n balance smoothness with perceived performance\n- **Dynamic Content**: The component handles content changes efficiently, but\n minimize frequent content updates during animations\n\n### Styling\n\n- **Consistent Animations**: Use consistent animation durations across your\n application\n- **Visual Feedback**: Provide clear visual feedback for expanded/collapsed\n states\n- **Responsive Design**: Consider how collapsible content behaves on different\n screen sizes\n\n## Related Components\n\n- **Accordion**: For managing multiple collapsible sections\n- **Disclosure**: For simpler show/hide functionality without animations\n- **Modal**: For larger content that should overlay the page\n- **Drawer**: For slide-out content panels\n",
173
+ "views": {
174
+ "overview": {
175
+ "mdx": "\n## Overview\n\nCollapsibleMotion is a compound component that provides smooth, accessible\ncollapsible content with height animations. It combines React Aria's\naccessibility features with Chakra UI's theming system to deliver a robust\nfoundation for disclosure patterns, accordions, and expandable content sections.\n\n### Key features\n\n- **Smooth height animations**: Customizable duration with automatic content\n measurement\n- **Full accessibility support**: Proper ARIA attributes and screen reader\n compatibility\n- **Controlled and uncontrolled modes**: Flexible state management options\n- **Focus management**: Content visibility handled properly for screen readers\n- **Responsive design**: Works seamlessly across all screen sizes\n- **Chakra UI integration**: Consistent theming with the design system\n\n## Variables\n\n### Basic Usage\n\nThe simplest way to use CollapsibleMotion is in uncontrolled mode with default\nsettings:\n\n```jsx live\nconst App = () => {\n return (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <Button mb={4}>Toggle Content</Button>\n <CollapsibleMotion.Content>\n <Box p={4} bg=\"gray.50\" borderRadius=\"md\">\n <Text>\n This content will smoothly expand and collapse when the button is clicked.\n The animation uses the default duration of 200ms.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n );\n};\n```\n\n### Controlled Mode\n\nFor more complex scenarios, you can control the expanded state from a parent\ncomponent:\n\n```jsx live\nconst App = () => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n return (\n <div>\n <Button\n onClick={() => setIsExpanded(!isExpanded)}\n mb={4}\n >\n {isExpanded ? 'Collapse' : 'Expand'} Content\n </Button>\n\n <CollapsibleMotion.Root\n isExpanded={isExpanded}\n onExpandedChange={setIsExpanded}\n >\n <CollapsibleMotion.Content>\n <Box p={4} bg=\"blue.50\" borderRadius=\"md\">\n <Text>\n This content is controlled by the parent component's state.\n The parent can react to changes and implement custom logic.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </div>\n );\n};\n```\n\n### Custom Animation Settings\n\nYou can customize the minimum height and animation duration:\n\n```jsx live\nconst App = () => {\n return (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <Button mb={4}>Toggle Content</Button>\n <CollapsibleMotion.Content\n minHeight={40}\n animationDuration={500}\n >\n <Box p={6} bg=\"green.50\" borderRadius=\"md\" minH=\"150px\">\n <Text mb={4}>\n This content has a minimum height of 40px when collapsed\n and uses a slower animation duration of 500ms.\n </Text>\n <Text>\n The minimum height allows for partial visibility of content\n even when collapsed, which can be useful for previews.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n );\n};\n```\n\n### Dynamic Content\n\nCollapsibleMotion automatically handles content that changes size:\n\n```jsx live\nconst App = () => {\n const [content, setContent] = useState('short');\n\n const contentMap = {\n short: \"Short content\",\n long: \"This is much longer content that demonstrates how the component automatically adjusts to content changes. The component re-measures the content height when it changes and handles the animation smoothly.\"\n };\n\n return (\n <div>\n <Box mb={4}>\n <Button\n onClick={() => setContent('short')}\n mr={2}\n variant={content === 'short' ? 'solid' : 'outline'}\n size=\"sm\"\n >\n Short\n </Button>\n <Button\n onClick={() => setContent('long')}\n variant={content === 'long' ? 'solid' : 'outline'}\n size=\"sm\"\n >\n Long\n </Button>\n </Box>\n\n <CollapsibleMotion.Root defaultExpanded={true}>\n <Button mb={4}>Toggle Dynamic Content</Button>\n <CollapsibleMotion.Content>\n <Box p={4} bg=\"orange.50\" borderRadius=\"md\">\n <Text>{contentMap[content]}</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </div>\n );\n};\n```\n\n## Integration with other components\n\nCollapsibleMotion works well with other Nimbus components to create rich\ninteractive experiences:\n\n```jsx live\nconst App = () => {\n const [expandedSections, setExpandedSections] = useState(new Set());\n\n const toggleSection = (section) => {\n const newSections = new Set(expandedSections);\n if (newSections.has(section)) {\n newSections.delete(section);\n } else {\n newSections.add(section);\n }\n setExpandedSections(newSections);\n };\n\n return (\n <Stack spacing={4}>\n {['personal', 'billing', 'preferences'].map(section => (\n <Box key={section} border=\"1px solid\" borderColor=\"gray.200\" borderRadius=\"md\">\n <CollapsibleMotion.Root\n isExpanded={expandedSections.has(section)}\n onExpandedChange={() => toggleSection(section)}\n >\n <Button\n w=\"full\"\n variant=\"ghost\"\n justifyContent=\"space-between\"\n p={4}\n rightIcon={expandedSections.has(section) ? '−' : '+'}\n >\n {section.charAt(0).toUpperCase() + section.slice(1)} Information\n </Button>\n\n <CollapsibleMotion.Content>\n <Box p={4} borderTop=\"1px solid\" borderColor=\"gray.200\">\n <Text>\n Content for {section} section. This demonstrates how\n CollapsibleMotion can be integrated with other components\n to create accordion-like interfaces.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </Box>\n ))}\n </Stack>\n );\n};\n```\n\n## Best practices\n\n### Performance\n\n- **Content Measurement**: The component automatically measures content height,\n but avoid deeply nested or complex layouts within collapsible content when\n possible\n- **Animation Duration**: Use reasonable animation durations (100-500ms) to\n balance smoothness with perceived performance\n- **Dynamic Content**: The component handles content changes efficiently, but\n minimize frequent content updates during animations\n\n### Styling\n\n- **Consistent Animations**: Use consistent animation durations across your\n application\n- **Visual Feedback**: Provide clear visual feedback for expanded/collapsed\n states\n- **Responsive Design**: Consider how collapsible content behaves on different\n screen sizes\n\n## Related Components\n\n- **Accordion**: For managing multiple collapsible sections\n- **Disclosure**: For simpler show/hide functionality without animations\n- **Modal**: For larger content that should overlay the page\n- **Drawer**: For slide-out content panels\n",
176
+ "toc": [
177
+ {
178
+ "value": "Overview",
179
+ "href": "#overview",
180
+ "depth": 2,
181
+ "numbering": [
182
+ 1,
183
+ 1
184
+ ],
185
+ "parent": "root"
186
+ },
187
+ {
188
+ "value": "Key features",
189
+ "href": "#key-features",
190
+ "depth": 3,
191
+ "numbering": [
192
+ 1,
193
+ 1,
194
+ 1
195
+ ],
196
+ "parent": "root"
197
+ },
198
+ {
199
+ "value": "Variables",
200
+ "href": "#variables",
201
+ "depth": 2,
202
+ "numbering": [
203
+ 1,
204
+ 2
205
+ ],
206
+ "parent": "root"
207
+ },
208
+ {
209
+ "value": "Basic Usage",
210
+ "href": "#basic-usage",
211
+ "depth": 3,
212
+ "numbering": [
213
+ 1,
214
+ 2,
215
+ 1
216
+ ],
217
+ "parent": "root"
218
+ },
219
+ {
220
+ "value": "Controlled Mode",
221
+ "href": "#controlled-mode",
222
+ "depth": 3,
223
+ "numbering": [
224
+ 1,
225
+ 2,
226
+ 2
227
+ ],
228
+ "parent": "root"
229
+ },
230
+ {
231
+ "value": "Custom Animation Settings",
232
+ "href": "#custom-animation-settings",
233
+ "depth": 3,
234
+ "numbering": [
235
+ 1,
236
+ 2,
237
+ 3
238
+ ],
239
+ "parent": "root"
240
+ },
241
+ {
242
+ "value": "Dynamic Content",
243
+ "href": "#dynamic-content",
244
+ "depth": 3,
245
+ "numbering": [
246
+ 1,
247
+ 2,
248
+ 4
249
+ ],
250
+ "parent": "root"
251
+ },
252
+ {
253
+ "value": "Integration with other components",
254
+ "href": "#integration-with-other-components",
255
+ "depth": 2,
256
+ "numbering": [
257
+ 1,
258
+ 3
259
+ ],
260
+ "parent": "root"
261
+ },
262
+ {
263
+ "value": "Best practices",
264
+ "href": "#best-practices",
265
+ "depth": 2,
266
+ "numbering": [
267
+ 1,
268
+ 4
269
+ ],
270
+ "parent": "root"
271
+ },
272
+ {
273
+ "value": "Performance",
274
+ "href": "#performance",
275
+ "depth": 3,
276
+ "numbering": [
277
+ 1,
278
+ 4,
279
+ 1
280
+ ],
281
+ "parent": "root"
282
+ },
283
+ {
284
+ "value": "Styling",
285
+ "href": "#styling",
286
+ "depth": 3,
287
+ "numbering": [
288
+ 1,
289
+ 4,
290
+ 2
291
+ ],
292
+ "parent": "root"
293
+ },
294
+ {
295
+ "value": "Related Components",
296
+ "href": "#related-components",
297
+ "depth": 2,
298
+ "numbering": [
299
+ 1,
300
+ 5
301
+ ],
302
+ "parent": "root"
303
+ }
304
+ ]
305
+ },
306
+ "a11y": {
307
+ "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 <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle Content</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"neutral.2\" borderRadius=\"200\">\n <Text>This content expands and collapses</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n)\n```\n\n### Accessibility standards\n\n- **Clear trigger elements:** Always provide clear, descriptive trigger buttons\n or elements that indicate their purpose.\n- **Semantic HTML structure:** Use semantic HTML within collapsible content to\n ensure proper document structure.\n- **Clear focus indicators:** Ensure trigger elements have clear, visible focus\n indicators for keyboard navigation.\n- **State communication:** Use appropriate ARIA attributes to communicate the\n expanded/collapsed state to screen readers.\n- **Animation considerations:** Animations respect `prefers-reduced-motion` user\n preferences for users with vestibular disorders.\n\n### Resources\n\n- [React ARIA Disclosure Docs](https://react-spectrum.adobe.com/react-aria/useDisclosure.html)\n- [ARIA Disclosure Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/)\n",
308
+ "toc": [
309
+ {
310
+ "value": "Accessibility",
311
+ "href": "#accessibility",
312
+ "depth": 2,
313
+ "numbering": [
314
+ 1,
315
+ 1
316
+ ],
317
+ "parent": "root"
318
+ },
319
+ {
320
+ "value": "Accessibility standards",
321
+ "href": "#accessibility-standards",
322
+ "depth": 3,
323
+ "numbering": [
324
+ 1,
325
+ 1,
326
+ 1
327
+ ],
328
+ "parent": "root"
329
+ },
330
+ {
331
+ "value": "Resources",
332
+ "href": "#resources",
333
+ "depth": 3,
334
+ "numbering": [
335
+ 1,
336
+ 1,
337
+ 2
338
+ ],
339
+ "parent": "root"
340
+ }
341
+ ]
342
+ },
343
+ "dev": {
344
+ "mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { CollapsibleMotion, type CollapsibleMotionRootProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation uses uncontrolled mode with compound component pattern:\n\n```jsx live-dev\nconst App = () => (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle Content</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"neutral.2\" borderRadius=\"200\">\n <Text>This content expands and collapses</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n)\n```\n\n## Usage examples\n\n### Uncontrolled mode\n\nFor simpler use cases, use uncontrolled mode with `defaultExpanded`:\n\n```jsx live-dev\nconst App = () => {\n const [eventLog, setEventLog] = useState<string>('No events yet');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <CollapsibleMotion.Root\n defaultExpanded={false}\n onExpandedChange={(isExpanded) => {\n setEventLog(`Content is now ${isExpanded ? 'expanded' : 'collapsed'}`);\n }}\n >\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle Content</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"blue.2\" borderRadius=\"200\">\n <Text>Collapsible content area</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n <Text fontSize=\"sm\" color=\"neutral.11\">Event: {eventLog}</Text>\n </Stack>\n );\n}\n```\n\nUse uncontrolled mode when you need to capture state changes without managing state yourself.\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 [isExpanded, setIsExpanded] = useState<CollapsibleMotionRootProps[\"isExpanded\"]>(false);\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Button onPress={() => setIsExpanded(!isExpanded)}>\n {isExpanded ? 'Collapse' : 'Expand'} (External Control)\n </Button>\n <CollapsibleMotion.Root\n isExpanded={isExpanded}\n onExpandedChange={setIsExpanded}\n >\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle (Internal Control)</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"green.2\" borderRadius=\"200\">\n <Text>\n This content can be controlled both externally (button above)\n and internally (trigger button). Both stay synchronized.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n <Text fontSize=\"sm\" color=\"neutral.11\">\n Current state: {isExpanded ? 'Expanded' : 'Collapsed'}\n </Text>\n </Stack>\n );\n}\n```\n\nUse controlled mode when you need to:\n- Synchronize the expanded state with external controls\n- Programmatically expand or collapse the content\n- Coordinate multiple collapsible sections\n\n### Disabled state\n\nPrevent interactions by setting `isDisabled`:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <CollapsibleMotion.Root isDisabled={true} defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle Content (Disabled)</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"neutral.3\" borderRadius=\"200\">\n <Text>This content cannot be toggled when disabled</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n <Text fontSize=\"sm\" color=\"neutral.11\">\n The trigger button is disabled and cannot expand the content\n </Text>\n </Stack>\n)\n```\n\n### Custom trigger with asChild\n\nUse the `asChild` prop to render your own custom trigger element:\n\n```jsx live-dev\nconst App = () => (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button variant=\"outline\" colorPalette=\"blue\">\n <Icons.KeyboardArrowDown />\n Custom Styled Trigger\n </Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"purple.2\" borderRadius=\"200\">\n <Text>Content revealed by custom trigger</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n)\n```\n\n### Custom animations\n\nCustomize the expand/collapse animations using Chakra's animation system:\n\n```jsx live-dev\nconst App = () => (\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle with Custom Animation</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content\n animationName={{\n _open: \"slide-from-top, fade-in\",\n _closed: \"slide-to-top, fade-out\",\n }}\n animationDuration=\"slow\"\n >\n <Box p=\"400\" bg=\"orange.2\" borderRadius=\"200\">\n <Text>\n This content uses custom animation timing and effects.\n Notice the slower, more deliberate motion.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n)\n```\n\n### Dynamic content\n\nThe component automatically handles content size changes with ResizeObserver:\n\n```jsx live-dev\nconst App = () => {\n const [contentSize, setContentSize] = useState<'short' | 'medium' | 'long'>('short');\n\n const content = {\n short: 'Short content',\n medium: 'This is medium length content that demonstrates how the component handles different content sizes.',\n long: 'This is very long content that shows how CollapsibleMotion automatically re-measures content height when it changes. The component uses ResizeObserver to detect size changes and animate to the new height, ensuring a polished user experience even with dynamic content.',\n };\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Stack direction=\"row\" gap=\"200\">\n <Button\n onPress={() => setContentSize('short')}\n variant={contentSize === 'short' ? 'solid' : 'outline'}\n size=\"xs\"\n >\n Short\n </Button>\n <Button\n onPress={() => setContentSize('medium')}\n variant={contentSize === 'medium' ? 'solid' : 'outline'}\n size=\"xs\"\n >\n Medium\n </Button>\n <Button\n onPress={() => setContentSize('long')}\n variant={contentSize === 'long' ? 'solid' : 'outline'}\n size=\"xs\"\n >\n Long\n </Button>\n </Stack>\n <CollapsibleMotion.Root defaultExpanded={true}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle Dynamic Content</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"teal.2\" borderRadius=\"200\">\n <Text>{content[contentSize]}</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </Stack>\n );\n}\n```\n\n### Without trigger\n\nFor external-only control, omit the Trigger component:\n\n```jsx live-dev\nconst App = () => {\n const [isExpanded, setIsExpanded] = useState<CollapsibleMotionRootProps[\"isExpanded\"]>(false);\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Button onPress={() => setIsExpanded(!isExpanded)}>\n {isExpanded ? 'Hide' : 'Show'} Details\n </Button>\n <CollapsibleMotion.Root isExpanded={isExpanded}>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"pink.2\" borderRadius=\"200\">\n <Text>\n This content is controlled entirely by the external button above.\n No internal trigger is provided.\n </Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </Stack>\n );\n}\n```\n\n## Component requirements\n\n## Accessibility\n\nThe CollapsibleMotion component handles most accessibility requirements internally through React Aria integration. The component automatically provides:\n\n- Proper ARIA attributes (`aria-expanded`, `aria-controls`, `aria-hidden`)\n- Keyboard navigation support\n- Focus management\n- Screen reader announcements\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-collapsible-motion\";\n\nexport const Example = () => (\n <CollapsibleMotion.Root id={PERSISTENT_ID} defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content here</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n- `Tab` / `Shift+Tab`: Move focus to/from the trigger button\n- `Enter` / `Space`: Toggle the expanded/collapsed state when trigger is focused\n- `Escape`: No default behavior (can be customized in your implementation)\n\n## API reference\n\n<PropsTable id=\"CollapsibleMotion\" />\n\n## Common patterns\n\n### FAQ section\n\nCreate an expandable FAQ section with multiple collapsible items:\n\n```jsx live-dev\nconst App = () => {\n const faqs = [\n {\n question: 'What is CollapsibleMotion?',\n answer: 'CollapsibleMotion is a compound component that provides expand/collapse animations with full accessibility support via React Aria.',\n },\n {\n question: 'When should I use controlled mode?',\n answer: 'Use controlled mode when you need to programmatically control the expanded state, synchronize with external controls, or coordinate multiple collapsible sections.',\n },\n {\n question: 'Can I customize the animations?',\n answer: 'Yes! You can customize animations using Chakra animation names and durations on the Content component.',\n },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n {faqs.map((faq, index) => (\n <CollapsibleMotion.Root key={index} defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button width=\"full\" justifyContent=\"space-between\">\n {faq.question}\n <Icons.KeyboardArrowDown />\n </Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"neutral.2\" borderRadius=\"200\">\n <Text>{faq.answer}</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n ))}\n </Stack>\n );\n}\n```\n\n### Accordion-style navigation\n\nCreate an accordion by coordinating multiple CollapsibleMotion components:\n\n```jsx live-dev\nconst App = () => {\n const [expandedSection, setExpandedSection] = useState<string | null>('section1');\n\n const sections = [\n { id: 'section1', title: 'Getting Started', content: 'Learn the basics of getting started with our platform.' },\n { id: 'section2', title: 'Advanced Features', content: 'Explore advanced features and customization options.' },\n { id: 'section3', title: 'API Reference', content: 'Complete API documentation and examples.' },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"200\">\n {sections.map((section) => (\n <CollapsibleMotion.Root\n key={section.id}\n isExpanded={expandedSection === section.id}\n onExpandedChange={(isExpanded) => {\n setExpandedSection(isExpanded ? section.id : null);\n }}\n >\n <CollapsibleMotion.Trigger asChild>\n <Button\n width=\"full\"\n justifyContent=\"space-between\"\n variant={expandedSection === section.id ? 'solid' : 'outline'}\n >\n {section.title}\n <Icons.KeyboardArrowDown />\n </Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box p=\"400\" bg=\"neutral.2\" borderRadius=\"200\">\n <Text>{section.content}</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n ))}\n </Stack>\n );\n}\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using CollapsibleMotion 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 and initial state\n\n```tsx\nimport React from \"react\";\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n CollapsibleMotion,\n NimbusProvider,\n Button,\n Box,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"CollapsibleMotion - Basic rendering\", () => {\n it(\"renders trigger and content\", () => {\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Collapsible content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"button\", { name: /toggle/i })).toBeInTheDocument();\n expect(screen.getByText(/collapsible content/i)).toBeInTheDocument();\n });\n\n it(\"renders with correct initial expanded state\", () => {\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n });\n\n it(\"renders with defaultExpanded true\", () => {\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={true}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n expect(button).toHaveAttribute(\"aria-expanded\", \"true\");\n });\n});\n```\n\n### Interaction Tests\n\nTest user interactions like clicking the trigger to expand/collapse\n\n```tsx\nimport React from \"react\";\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n CollapsibleMotion,\n NimbusProvider,\n Button,\n Box,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"CollapsibleMotion - Interactions\", () => {\n it(\"toggles expanded state when trigger is clicked\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Box data-testid=\"content\">\n <Text>Collapsible content</Text>\n </Box>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n\n // Initially collapsed\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n\n // Click to expand\n await user.click(button);\n expect(button).toHaveAttribute(\"aria-expanded\", \"true\");\n\n // Click to collapse\n await user.click(button);\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n });\n\n it(\"calls onExpandedChange callback when toggled\", async () => {\n const user = userEvent.setup();\n const handleExpandedChange = vi.fn();\n\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root\n defaultExpanded={false}\n onExpandedChange={handleExpandedChange}\n >\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n await user.click(button);\n\n expect(handleExpandedChange).toHaveBeenCalledWith(true);\n });\n\n it(\"supports keyboard interaction with Enter key\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n button.focus();\n await user.keyboard(\"{Enter}\");\n\n expect(button).toHaveAttribute(\"aria-expanded\", \"true\");\n });\n});\n```\n\n### Controlled Mode Tests\n\nTest controlled state management with isExpanded prop\n\n```tsx\nimport React from \"react\";\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n CollapsibleMotion,\n NimbusProvider,\n Button,\n Box,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"CollapsibleMotion - Controlled mode\", () => {\n it(\"respects controlled isExpanded prop\", async () => {\n const { rerender } = render(\n <NimbusProvider>\n <CollapsibleMotion.Root isExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n\n // Update to expanded - wait for animation state updates\n rerender(\n <NimbusProvider>\n <CollapsibleMotion.Root isExpanded={true}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n await waitFor(() => {\n expect(button).toHaveAttribute(\"aria-expanded\", \"true\");\n });\n });\n\n it(\"calls onExpandedChange in controlled mode\", async () => {\n const user = userEvent.setup();\n const handleExpandedChange = vi.fn();\n\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root\n isExpanded={false}\n onExpandedChange={handleExpandedChange}\n >\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n await user.click(button);\n\n expect(handleExpandedChange).toHaveBeenCalledWith(true);\n });\n});\n```\n\n### Disabled State Tests\n\nVerify disabled state prevents interactions\n\n```tsx\nimport React from \"react\";\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n CollapsibleMotion,\n NimbusProvider,\n Button,\n Box,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"CollapsibleMotion - Disabled state\", () => {\n it(\"renders trigger as disabled when isDisabled is true\", () => {\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root isDisabled={true} defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n expect(button).toBeDisabled();\n });\n\n it(\"does not toggle state when disabled trigger is clicked\", async () => {\n const user = userEvent.setup();\n const handleExpandedChange = vi.fn();\n\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root\n isDisabled={true}\n defaultExpanded={false}\n onExpandedChange={handleExpandedChange}\n >\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n await user.click(button);\n\n // Should not change state or call callback\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n expect(handleExpandedChange).not.toHaveBeenCalled();\n });\n});\n```\n\n### Accessibility Tests\n\nVerify ARIA attributes and accessibility features\n\n```tsx\nimport React from \"react\";\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n CollapsibleMotion,\n NimbusProvider,\n Button,\n Box,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"CollapsibleMotion - Accessibility\", () => {\n it(\"sets correct ARIA attributes on trigger\", () => {\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n expect(button).toHaveAttribute(\"aria-controls\");\n });\n\n it(\"updates aria-expanded when toggled\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\");\n\n // Initially false\n expect(button).toHaveAttribute(\"aria-expanded\", \"false\");\n\n // After click, should be true\n await user.click(button);\n expect(button).toHaveAttribute(\"aria-expanded\", \"true\");\n });\n\n it(\"supports custom id for tracking\", () => {\n const trackingId = \"test-collapsible-motion\";\n render(\n <NimbusProvider>\n <CollapsibleMotion.Root id={trackingId} defaultExpanded={false}>\n <CollapsibleMotion.Trigger asChild>\n <Button>Toggle</Button>\n </CollapsibleMotion.Trigger>\n <CollapsibleMotion.Content>\n <Text>Content</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n\n const root = screen.getByRole(\"button\").closest(\"div\");\n expect(root).toHaveAttribute(\"id\", trackingId);\n });\n});\n```\n\n### External Control Tests\n\nTest using CollapsibleMotion without an internal trigger\n\n```tsx\nimport React from \"react\";\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n CollapsibleMotion,\n NimbusProvider,\n Button,\n Box,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"CollapsibleMotion - Without trigger\", () => {\n it(\"works with external control and no trigger component\", async () => {\n const user = userEvent.setup();\n\n const TestComponent = () => {\n const [isExpanded, setIsExpanded] = React.useState(false);\n\n return (\n <NimbusProvider>\n <Button onPress={() => setIsExpanded(!isExpanded)}>\n External Toggle\n </Button>\n <CollapsibleMotion.Root isExpanded={isExpanded}>\n <CollapsibleMotion.Content>\n <Text>Content controlled externally</Text>\n </CollapsibleMotion.Content>\n </CollapsibleMotion.Root>\n </NimbusProvider>\n );\n };\n\n render(<TestComponent />);\n\n const externalButton = screen.getByRole(\"button\", {\n name: /external toggle/i,\n });\n const content = screen.getByText(/content controlled externally/i);\n\n // Initially collapsed (not visible due to Presence)\n expect(content).toBeInTheDocument();\n\n // Click external button to expand\n await user.click(externalButton);\n\n // Content should be visible after animation\n await waitFor(() => {\n expect(content).toBeVisible();\n });\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-layout-collapsiblemotion--docs)\n- [React Aria useDisclosure](https://react-spectrum.adobe.com/react-aria/useDisclosure.html)\n- [Chakra UI Presence](https://www.chakra-ui.com/docs/components/presence)\n",
345
+ "toc": [
346
+ {
347
+ "value": "Getting started",
348
+ "href": "#getting-started",
349
+ "depth": 2,
350
+ "numbering": [
351
+ 1,
352
+ 1
353
+ ],
354
+ "parent": "root"
355
+ },
356
+ {
357
+ "value": "Import",
358
+ "href": "#import",
359
+ "depth": 3,
360
+ "numbering": [
361
+ 1,
362
+ 1,
363
+ 1
364
+ ],
365
+ "parent": "root"
366
+ },
367
+ {
368
+ "value": "Basic usage",
369
+ "href": "#basic-usage",
370
+ "depth": 3,
371
+ "numbering": [
372
+ 1,
373
+ 1,
374
+ 2
375
+ ],
376
+ "parent": "root"
377
+ },
378
+ {
379
+ "value": "Usage examples",
380
+ "href": "#usage-examples",
381
+ "depth": 2,
382
+ "numbering": [
383
+ 1,
384
+ 2
385
+ ],
386
+ "parent": "root"
387
+ },
388
+ {
389
+ "value": "Uncontrolled mode",
390
+ "href": "#uncontrolled-mode",
391
+ "depth": 3,
392
+ "numbering": [
393
+ 1,
394
+ 2,
395
+ 1
396
+ ],
397
+ "parent": "root"
398
+ },
399
+ {
400
+ "value": "Controlled mode",
401
+ "href": "#controlled-mode",
402
+ "depth": 3,
403
+ "numbering": [
404
+ 1,
405
+ 2,
406
+ 2
407
+ ],
408
+ "parent": "root"
409
+ },
410
+ {
411
+ "value": "Disabled state",
412
+ "href": "#disabled-state",
413
+ "depth": 3,
414
+ "numbering": [
415
+ 1,
416
+ 2,
417
+ 3
418
+ ],
419
+ "parent": "root"
420
+ },
421
+ {
422
+ "value": "Custom trigger with asChild",
423
+ "href": "#custom-trigger-with-aschild",
424
+ "depth": 3,
425
+ "numbering": [
426
+ 1,
427
+ 2,
428
+ 4
429
+ ],
430
+ "parent": "root"
431
+ },
432
+ {
433
+ "value": "Custom animations",
434
+ "href": "#custom-animations",
435
+ "depth": 3,
436
+ "numbering": [
437
+ 1,
438
+ 2,
439
+ 5
440
+ ],
441
+ "parent": "root"
442
+ },
443
+ {
444
+ "value": "Dynamic content",
445
+ "href": "#dynamic-content",
446
+ "depth": 3,
447
+ "numbering": [
448
+ 1,
449
+ 2,
450
+ 6
451
+ ],
452
+ "parent": "root"
453
+ },
454
+ {
455
+ "value": "Without trigger",
456
+ "href": "#without-trigger",
457
+ "depth": 3,
458
+ "numbering": [
459
+ 1,
460
+ 2,
461
+ 7
462
+ ],
463
+ "parent": "root"
464
+ },
465
+ {
466
+ "value": "Component requirements",
467
+ "href": "#component-requirements",
468
+ "depth": 2,
469
+ "numbering": [
470
+ 1,
471
+ 3
472
+ ],
473
+ "parent": "root"
474
+ },
475
+ {
476
+ "value": "Accessibility",
477
+ "href": "#accessibility",
478
+ "depth": 2,
479
+ "numbering": [
480
+ 1,
481
+ 4
482
+ ],
483
+ "parent": "root"
484
+ },
485
+ {
486
+ "value": "Keyboard navigation",
487
+ "href": "#keyboard-navigation",
488
+ "depth": 4,
489
+ "numbering": [
490
+ 1,
491
+ 4,
492
+ 1,
493
+ 1
494
+ ],
495
+ "parent": "root"
496
+ },
497
+ {
498
+ "value": "API reference",
499
+ "href": "#api-reference",
500
+ "depth": 2,
501
+ "numbering": [
502
+ 1,
503
+ 5
504
+ ],
505
+ "parent": "root"
506
+ },
507
+ {
508
+ "value": "Common patterns",
509
+ "href": "#common-patterns",
510
+ "depth": 2,
511
+ "numbering": [
512
+ 1,
513
+ 6
514
+ ],
515
+ "parent": "root"
516
+ },
517
+ {
518
+ "value": "FAQ section",
519
+ "href": "#faq-section",
520
+ "depth": 3,
521
+ "numbering": [
522
+ 1,
523
+ 6,
524
+ 1
525
+ ],
526
+ "parent": "root"
527
+ },
528
+ {
529
+ "value": "Accordion-style navigation",
530
+ "href": "#accordion-style-navigation",
531
+ "depth": 3,
532
+ "numbering": [
533
+ 1,
534
+ 6,
535
+ 2
536
+ ],
537
+ "parent": "root"
538
+ },
539
+ {
540
+ "value": "Testing your implementation",
541
+ "href": "#testing-your-implementation",
542
+ "depth": 2,
543
+ "numbering": [
544
+ 1,
545
+ 7
546
+ ],
547
+ "parent": "root"
548
+ },
549
+ {
550
+ "value": "Basic Rendering Tests",
551
+ "href": "#basic-rendering-tests",
552
+ "depth": 3,
553
+ "numbering": [
554
+ 1,
555
+ 7,
556
+ 1
557
+ ],
558
+ "parent": "root"
559
+ },
560
+ {
561
+ "value": "Interaction Tests",
562
+ "href": "#interaction-tests",
563
+ "depth": 3,
564
+ "numbering": [
565
+ 1,
566
+ 7,
567
+ 2
568
+ ],
569
+ "parent": "root"
570
+ },
571
+ {
572
+ "value": "Controlled Mode Tests",
573
+ "href": "#controlled-mode-tests",
574
+ "depth": 3,
575
+ "numbering": [
576
+ 1,
577
+ 7,
578
+ 3
579
+ ],
580
+ "parent": "root"
581
+ },
582
+ {
583
+ "value": "Disabled State Tests",
584
+ "href": "#disabled-state-tests",
585
+ "depth": 3,
586
+ "numbering": [
587
+ 1,
588
+ 7,
589
+ 4
590
+ ],
591
+ "parent": "root"
592
+ },
593
+ {
594
+ "value": "Accessibility Tests",
595
+ "href": "#accessibility-tests",
596
+ "depth": 3,
597
+ "numbering": [
598
+ 1,
599
+ 7,
600
+ 5
601
+ ],
602
+ "parent": "root"
603
+ },
604
+ {
605
+ "value": "External Control Tests",
606
+ "href": "#external-control-tests",
607
+ "depth": 3,
608
+ "numbering": [
609
+ 1,
610
+ 7,
611
+ 6
612
+ ],
613
+ "parent": "root"
614
+ },
615
+ {
616
+ "value": "Resources",
617
+ "href": "#resources",
618
+ "depth": 2,
619
+ "numbering": [
620
+ 1,
621
+ 8
622
+ ],
623
+ "parent": "root"
624
+ }
625
+ ]
626
+ }
627
+ }
628
+ }