@commercetools/nimbus-mcp 0.1.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/README.md +63 -14
  2. package/data/docs/route-manifest.json +10913 -0
  3. package/data/docs/routes/components-accessibility-visually-hidden.json +388 -0
  4. package/data/docs/routes/components-accessibility.json +34 -0
  5. package/data/docs/routes/components-buttons-button.json +715 -0
  6. package/data/docs/routes/components-buttons-icon-button.json +852 -0
  7. package/data/docs/routes/components-buttons-icon-toggle-button.json +594 -0
  8. package/data/docs/routes/components-buttons-split-button.json +670 -0
  9. package/data/docs/routes/components-buttons-toggle-button-group.json +722 -0
  10. package/data/docs/routes/components-buttons-toggle-button.json +689 -0
  11. package/data/docs/routes/components-buttons.json +36 -0
  12. package/data/docs/routes/components-data-display-badge.json +555 -0
  13. package/data/docs/routes/components-data-display-card.json +338 -0
  14. package/data/docs/routes/components-data-display-data-table.json +855 -0
  15. package/data/docs/routes/components-data-display-draggable-list.json +596 -0
  16. package/data/docs/routes/components-data-display-table.json +472 -0
  17. package/data/docs/routes/components-data-display-tag-group.json +535 -0
  18. package/data/docs/routes/components-data-display.json +34 -0
  19. package/data/docs/routes/components-feedback-alert.json +696 -0
  20. package/data/docs/routes/components-feedback-dialog.json +682 -0
  21. package/data/docs/routes/components-feedback-drawer.json +600 -0
  22. package/data/docs/routes/components-feedback-loading-spinner.json +415 -0
  23. package/data/docs/routes/components-feedback-progress-bar.json +661 -0
  24. package/data/docs/routes/components-feedback-toast.json +1040 -0
  25. package/data/docs/routes/components-feedback-tooltip.json +510 -0
  26. package/data/docs/routes/components-feedback.json +34 -0
  27. package/data/docs/routes/components-forms-field-errors.json +557 -0
  28. package/data/docs/routes/components-forms-form-field.json +848 -0
  29. package/data/docs/routes/components-forms-group.json +427 -0
  30. package/data/docs/routes/components-forms-localized-field.json +770 -0
  31. package/data/docs/routes/components-forms.json +37 -0
  32. package/data/docs/routes/components-inputs-calendar.json +611 -0
  33. package/data/docs/routes/components-inputs-checkbox.json +774 -0
  34. package/data/docs/routes/components-inputs-combo-box.json +761 -0
  35. package/data/docs/routes/components-inputs-date-input.json +628 -0
  36. package/data/docs/routes/components-inputs-date-picker.json +709 -0
  37. package/data/docs/routes/components-inputs-date-range-picker.json +599 -0
  38. package/data/docs/routes/components-inputs-money-input.json +721 -0
  39. package/data/docs/routes/components-inputs-multiline-text-input.json +611 -0
  40. package/data/docs/routes/components-inputs-number-input.json +647 -0
  41. package/data/docs/routes/components-inputs-password-input.json +576 -0
  42. package/data/docs/routes/components-inputs-radio-input.json +583 -0
  43. package/data/docs/routes/components-inputs-range-calendar.json +607 -0
  44. package/data/docs/routes/components-inputs-rich-text-input.json +599 -0
  45. package/data/docs/routes/components-inputs-scoped-search-input.json +570 -0
  46. package/data/docs/routes/components-inputs-search-input.json +588 -0
  47. package/data/docs/routes/components-inputs-select-input.json +960 -0
  48. package/data/docs/routes/components-inputs-switch.json +720 -0
  49. package/data/docs/routes/components-inputs-text-input.json +566 -0
  50. package/data/docs/routes/components-inputs-time-input.json +775 -0
  51. package/data/docs/routes/components-inputs.json +34 -0
  52. package/data/docs/routes/components-layout-box.json +501 -0
  53. package/data/docs/routes/components-layout-defaultpage.json +748 -0
  54. package/data/docs/routes/components-layout-flex.json +587 -0
  55. package/data/docs/routes/components-layout-grid.json +393 -0
  56. package/data/docs/routes/components-layout-modalpage.json +716 -0
  57. package/data/docs/routes/components-layout-pagecontent.json +673 -0
  58. package/data/docs/routes/components-layout-separator.json +461 -0
  59. package/data/docs/routes/components-layout-simple-grid.json +519 -0
  60. package/data/docs/routes/components-layout-spacer.json +573 -0
  61. package/data/docs/routes/components-layout-stack.json +481 -0
  62. package/data/docs/routes/components-layout.json +34 -0
  63. package/data/docs/routes/components-media-avatar.json +427 -0
  64. package/data/docs/routes/components-media-icon.json +663 -0
  65. package/data/docs/routes/components-media-image.json +511 -0
  66. package/data/docs/routes/components-media-inline-svg.json +586 -0
  67. package/data/docs/routes/components-media.json +34 -0
  68. package/data/docs/routes/components-navigation-accordion.json +643 -0
  69. package/data/docs/routes/components-navigation-collapsible-motion.json +628 -0
  70. package/data/docs/routes/components-navigation-link.json +554 -0
  71. package/data/docs/routes/components-navigation-menu.json +546 -0
  72. package/data/docs/routes/components-navigation-pagination.json +502 -0
  73. package/data/docs/routes/components-navigation-steps.json +629 -0
  74. package/data/docs/routes/components-navigation-tabnav.json +546 -0
  75. package/data/docs/routes/components-navigation-tabs.json +635 -0
  76. package/data/docs/routes/components-navigation-toolbar.json +549 -0
  77. package/data/docs/routes/components-navigation.json +34 -0
  78. package/data/docs/routes/components-typography-code.json +39 -0
  79. package/data/docs/routes/components-typography-heading.json +402 -0
  80. package/data/docs/routes/components-typography-kbd.json +399 -0
  81. package/data/docs/routes/components-typography-list.json +593 -0
  82. package/data/docs/routes/components-typography-text.json +444 -0
  83. package/data/docs/routes/components-typography.json +34 -0
  84. package/data/docs/routes/components-utilities-nimbus-i18n-provider.json +295 -0
  85. package/data/docs/routes/components-utilities-nimbus-provider.json +663 -0
  86. package/data/docs/routes/components-utilities.json +34 -0
  87. package/data/docs/routes/components.json +33 -0
  88. package/data/docs/routes/home-contribute-adrs-adr0001-consumer-component-apis.json +314 -0
  89. package/data/docs/routes/home-contribute-adrs-adr0002-compound-component-extraction.json +160 -0
  90. package/data/docs/routes/home-contribute-adrs-adr0003-component-lifecycle-states.json +460 -0
  91. package/data/docs/routes/home-contribute-adrs.json +205 -0
  92. package/data/docs/routes/home-contribute-development-setup.json +213 -0
  93. package/data/docs/routes/home-contribute-stats.json +36 -0
  94. package/data/docs/routes/home-contribute.json +36 -0
  95. package/data/docs/routes/home-design-tokens-aspect-ratios.json +36 -0
  96. package/data/docs/routes/home-design-tokens-borders.json +35 -0
  97. package/data/docs/routes/home-design-tokens-colors.json +157 -0
  98. package/data/docs/routes/home-design-tokens-other-animations.json +119 -0
  99. package/data/docs/routes/home-design-tokens-other-blurs.json +36 -0
  100. package/data/docs/routes/home-design-tokens-other-breakpoints.json +61 -0
  101. package/data/docs/routes/home-design-tokens-other-cursors.json +36 -0
  102. package/data/docs/routes/home-design-tokens-other-z-indices.json +39 -0
  103. package/data/docs/routes/home-design-tokens-other.json +35 -0
  104. package/data/docs/routes/home-design-tokens-radii.json +59 -0
  105. package/data/docs/routes/home-design-tokens-shadows.json +57 -0
  106. package/data/docs/routes/home-design-tokens-sizes.json +137 -0
  107. package/data/docs/routes/home-design-tokens-spacing.json +36 -0
  108. package/data/docs/routes/home-design-tokens-typography.json +184 -0
  109. package/data/docs/routes/home-design-tokens.json +34 -0
  110. package/data/docs/routes/home-getting-started-core-concepts.json +301 -0
  111. package/data/docs/routes/home-getting-started-installation.json +621 -0
  112. package/data/docs/routes/home-getting-started-mcp-server-overview.json +139 -0
  113. package/data/docs/routes/home-getting-started-mcp-server-setup.json +316 -0
  114. package/data/docs/routes/home-getting-started-release-process.json +294 -0
  115. package/data/docs/routes/home-getting-started-testing-setup.json +296 -0
  116. package/data/docs/routes/home-playground-markdown.json +638 -0
  117. package/data/docs/routes/home-playground-toc.json +169 -0
  118. package/data/docs/routes/home-playground.json +34 -0
  119. package/data/docs/routes/home-style-props-background.json +236 -0
  120. package/data/docs/routes/home-style-props-border.json +310 -0
  121. package/data/docs/routes/home-style-props-display.json +120 -0
  122. package/data/docs/routes/home-style-props-effects.json +116 -0
  123. package/data/docs/routes/home-style-props-filters.json +396 -0
  124. package/data/docs/routes/home-style-props-flex-and-grid.json +496 -0
  125. package/data/docs/routes/home-style-props-interactivity.json +356 -0
  126. package/data/docs/routes/home-style-props-layout.json +422 -0
  127. package/data/docs/routes/home-style-props-list.json +116 -0
  128. package/data/docs/routes/home-style-props-sizing.json +244 -0
  129. package/data/docs/routes/home-style-props-spacing.json +228 -0
  130. package/data/docs/routes/home-style-props-svg.json +96 -0
  131. package/data/docs/routes/home-style-props-tables.json +116 -0
  132. package/data/docs/routes/home-style-props-transforms.json +216 -0
  133. package/data/docs/routes/home-style-props-transitions.json +216 -0
  134. package/data/docs/routes/home-style-props-typography.json +536 -0
  135. package/data/docs/routes/home-style-props.json +33 -0
  136. package/data/docs/routes/home.json +32 -0
  137. package/data/docs/routes/hooks-usecopytoclipboard.json +76 -0
  138. package/data/docs/routes/hooks-usehotkeys.json +117 -0
  139. package/data/docs/routes/hooks.json +33 -0
  140. package/data/docs/routes/icons.json +32 -0
  141. package/data/docs/routes/patterns-fields-date-range-picker-field.json +393 -0
  142. package/data/docs/routes/patterns-fields-money-input-field.json +415 -0
  143. package/data/docs/routes/patterns-fields-multiline-text-input-field.json +404 -0
  144. package/data/docs/routes/patterns-fields-number-input-field.json +470 -0
  145. package/data/docs/routes/patterns-fields-password-input-field.json +319 -0
  146. package/data/docs/routes/patterns-fields-search-input-field.json +382 -0
  147. package/data/docs/routes/patterns-fields-text-input-field.json +404 -0
  148. package/data/docs/routes/patterns-fields.json +78 -0
  149. package/data/docs/routes/patterns.json +34 -0
  150. package/data/docs/search-index.json +1 -0
  151. package/data/docs/types/Accordion.json +12 -0
  152. package/data/docs/types/AccordionContent.json +286 -0
  153. package/data/docs/types/AccordionHeader.json +891 -0
  154. package/data/docs/types/AccordionHeaderRightContent.json +27 -0
  155. package/data/docs/types/AccordionItem.json +242 -0
  156. package/data/docs/types/AccordionRoot.json +162 -0
  157. package/data/docs/types/Alert.json +12 -0
  158. package/data/docs/types/AlertActions.json +11 -0
  159. package/data/docs/types/AlertDescription.json +118 -0
  160. package/data/docs/types/AlertDismissButton.json +937 -0
  161. package/data/docs/types/AlertRoot.json +42 -0
  162. package/data/docs/types/AlertTitle.json +118 -0
  163. package/data/docs/types/Avatar.json +125 -0
  164. package/data/docs/types/Badge.json +64 -0
  165. package/data/docs/types/Body.json +67 -0
  166. package/data/docs/types/Box.json +85 -0
  167. package/data/docs/types/Button.json +1015 -0
  168. package/data/docs/types/Calendar.json +565 -0
  169. package/data/docs/types/Caption.json +67 -0
  170. package/data/docs/types/Card.json +12 -0
  171. package/data/docs/types/CardContent.json +27 -0
  172. package/data/docs/types/CardHeader.json +27 -0
  173. package/data/docs/types/CardRoot.json +106 -0
  174. package/data/docs/types/Cell.json +227 -0
  175. package/data/docs/types/Checkbox.json +897 -0
  176. package/data/docs/types/Code.json +112 -0
  177. package/data/docs/types/CollapsibleMotionContent.json +35 -0
  178. package/data/docs/types/CollapsibleMotionRoot.json +99 -0
  179. package/data/docs/types/CollapsibleMotionTrigger.json +71 -0
  180. package/data/docs/types/Column.json +101 -0
  181. package/data/docs/types/ColumnGroup.json +101 -0
  182. package/data/docs/types/ColumnHeader.json +193 -0
  183. package/data/docs/types/ComboBoxListBox.json +751 -0
  184. package/data/docs/types/ComboBoxOption.json +672 -0
  185. package/data/docs/types/ComboBoxPopover.json +786 -0
  186. package/data/docs/types/ComboBoxRoot.json +747 -0
  187. package/data/docs/types/ComboBoxSection.json +277 -0
  188. package/data/docs/types/ComboBoxTrigger.json +70 -0
  189. package/data/docs/types/Content.json +33 -0
  190. package/data/docs/types/DataTable.json +596 -0
  191. package/data/docs/types/DataTableBody.json +223 -0
  192. package/data/docs/types/DataTableFooter.json +27 -0
  193. package/data/docs/types/DataTableHeader.json +269 -0
  194. package/data/docs/types/DataTableManager.json +11 -0
  195. package/data/docs/types/DataTableRoot.json +590 -0
  196. package/data/docs/types/DataTableTable.json +271 -0
  197. package/data/docs/types/DateInput.json +792 -0
  198. package/data/docs/types/DatePicker.json +700 -0
  199. package/data/docs/types/DateRangePicker.json +936 -0
  200. package/data/docs/types/DateRangePickerField.json +1047 -0
  201. package/data/docs/types/DefaultPage.json +12 -0
  202. package/data/docs/types/DefaultPageActions.json +27 -0
  203. package/data/docs/types/DefaultPageBackLink.json +213 -0
  204. package/data/docs/types/DefaultPageContent.json +27 -0
  205. package/data/docs/types/DefaultPageFooter.json +27 -0
  206. package/data/docs/types/DefaultPageHeader.json +27 -0
  207. package/data/docs/types/DefaultPageRoot.json +106 -0
  208. package/data/docs/types/DefaultPageSubtitle.json +27 -0
  209. package/data/docs/types/DefaultPageTabNav.json +28 -0
  210. package/data/docs/types/DefaultPageTitle.json +27 -0
  211. package/data/docs/types/DialogBody.json +27 -0
  212. package/data/docs/types/DialogCloseTrigger.json +939 -0
  213. package/data/docs/types/DialogContent.json +27 -0
  214. package/data/docs/types/DialogFooter.json +27 -0
  215. package/data/docs/types/DialogHeader.json +27 -0
  216. package/data/docs/types/DialogRoot.json +138 -0
  217. package/data/docs/types/DialogTitle.json +27 -0
  218. package/data/docs/types/DialogTrigger.json +80 -0
  219. package/data/docs/types/DraggableList.json +12 -0
  220. package/data/docs/types/DraggableListField.json +894 -0
  221. package/data/docs/types/DraggableListItem.json +574 -0
  222. package/data/docs/types/DraggableListRoot.json +745 -0
  223. package/data/docs/types/Drawer.json +12 -0
  224. package/data/docs/types/DrawerBody.json +27 -0
  225. package/data/docs/types/DrawerCloseTrigger.json +939 -0
  226. package/data/docs/types/DrawerContent.json +27 -0
  227. package/data/docs/types/DrawerFooter.json +27 -0
  228. package/data/docs/types/DrawerHeader.json +27 -0
  229. package/data/docs/types/DrawerRoot.json +142 -0
  230. package/data/docs/types/DrawerTitle.json +27 -0
  231. package/data/docs/types/DrawerTrigger.json +80 -0
  232. package/data/docs/types/FieldErrors.getBuiltInMessage.json +11 -0
  233. package/data/docs/types/FieldErrors.getCustomMessage.json +9 -0
  234. package/data/docs/types/FieldErrors.json +109 -0
  235. package/data/docs/types/Flex.json +238 -0
  236. package/data/docs/types/Footer.json +67 -0
  237. package/data/docs/types/FormFieldDescription.json +11 -0
  238. package/data/docs/types/FormFieldError.json +11 -0
  239. package/data/docs/types/FormFieldInfoBox.json +27 -0
  240. package/data/docs/types/FormFieldInput.json +11 -0
  241. package/data/docs/types/FormFieldLabel.json +11 -0
  242. package/data/docs/types/FormFieldRoot.json +148 -0
  243. package/data/docs/types/Grid.json +253 -0
  244. package/data/docs/types/GridProps.json +11 -0
  245. package/data/docs/types/Group.json +143 -0
  246. package/data/docs/types/Header.json +67 -0
  247. package/data/docs/types/Heading.json +109 -0
  248. package/data/docs/types/Icon.json +112 -0
  249. package/data/docs/types/IconButton.json +1019 -0
  250. package/data/docs/types/IconToggleButton.json +787 -0
  251. package/data/docs/types/Image.json +373 -0
  252. package/data/docs/types/Indicator.json +67 -0
  253. package/data/docs/types/InlineSvg.json +98 -0
  254. package/data/docs/types/Item.json +67 -0
  255. package/data/docs/types/Kbd.json +118 -0
  256. package/data/docs/types/Link.json +380 -0
  257. package/data/docs/types/List.json +12 -0
  258. package/data/docs/types/ListIndicator.json +70 -0
  259. package/data/docs/types/ListItem.json +70 -0
  260. package/data/docs/types/ListRoot.json +124 -0
  261. package/data/docs/types/LoadingSpinner.json +87 -0
  262. package/data/docs/types/LocalizedField.json +460 -0
  263. package/data/docs/types/LocalizedStringFormatter.json +9 -0
  264. package/data/docs/types/MakeElementFocusable.json +196 -0
  265. package/data/docs/types/MenuContent.json +111 -0
  266. package/data/docs/types/MenuItem.json +671 -0
  267. package/data/docs/types/MenuRoot.json +670 -0
  268. package/data/docs/types/MenuSection.json +364 -0
  269. package/data/docs/types/MenuSubmenu.json +111 -0
  270. package/data/docs/types/MenuSubmenuTrigger.json +67 -0
  271. package/data/docs/types/MenuTrigger.json +906 -0
  272. package/data/docs/types/ModalPage.json +12 -0
  273. package/data/docs/types/ModalPageActions.json +27 -0
  274. package/data/docs/types/ModalPageContent.json +27 -0
  275. package/data/docs/types/ModalPageFooter.json +27 -0
  276. package/data/docs/types/ModalPageHeader.json +27 -0
  277. package/data/docs/types/ModalPageRoot.json +87 -0
  278. package/data/docs/types/ModalPageSubtitle.json +27 -0
  279. package/data/docs/types/ModalPageTabNav.json +28 -0
  280. package/data/docs/types/ModalPageTitle.json +27 -0
  281. package/data/docs/types/ModalPageTopBar.json +57 -0
  282. package/data/docs/types/MoneyInput.isEmpty.json +40 -0
  283. package/data/docs/types/MoneyInput.json +282 -0
  284. package/data/docs/types/MoneyInputField.json +379 -0
  285. package/data/docs/types/MoneyInputFieldProps.json +9 -0
  286. package/data/docs/types/MultilineTextInput.json +1194 -0
  287. package/data/docs/types/MultilineTextInputField.json +1269 -0
  288. package/data/docs/types/MultilineTextInputFieldProps.json +9 -0
  289. package/data/docs/types/NimbusI18nProvider.json +42 -0
  290. package/data/docs/types/NimbusI18nProviderProps.json +9 -0
  291. package/data/docs/types/NimbusProvider.json +270 -0
  292. package/data/docs/types/NumberInput.json +952 -0
  293. package/data/docs/types/NumberInputField.json +1004 -0
  294. package/data/docs/types/NumberInputFieldProps.json +9 -0
  295. package/data/docs/types/PageContent.json +11 -0
  296. package/data/docs/types/PageContentColumn.json +99 -0
  297. package/data/docs/types/PageContentRoot.json +114 -0
  298. package/data/docs/types/Pagination.json +159 -0
  299. package/data/docs/types/PasswordInput.json +1120 -0
  300. package/data/docs/types/PasswordInputField.json +1216 -0
  301. package/data/docs/types/PasswordInputFieldProps.json +9 -0
  302. package/data/docs/types/ProgressBar.json +280 -0
  303. package/data/docs/types/RadioInputOption.json +550 -0
  304. package/data/docs/types/RadioInputRoot.json +514 -0
  305. package/data/docs/types/RangeCalendar.json +618 -0
  306. package/data/docs/types/RichTextInput.json +134 -0
  307. package/data/docs/types/Root.json +122 -0
  308. package/data/docs/types/Row.json +67 -0
  309. package/data/docs/types/ScopedSearchInput.isEmpty.json +40 -0
  310. package/data/docs/types/ScopedSearchInput.json +253 -0
  311. package/data/docs/types/ScrollArea.json +82 -0
  312. package/data/docs/types/SearchInput.json +1165 -0
  313. package/data/docs/types/SearchInputField.json +1240 -0
  314. package/data/docs/types/Select.json +12 -0
  315. package/data/docs/types/SelectOption.json +572 -0
  316. package/data/docs/types/SelectOptionGroup.json +215 -0
  317. package/data/docs/types/SelectOptions.json +693 -0
  318. package/data/docs/types/SelectRoot.json +926 -0
  319. package/data/docs/types/Separator.json +65 -0
  320. package/data/docs/types/SimpleGrid.json +291 -0
  321. package/data/docs/types/Spacer.json +27 -0
  322. package/data/docs/types/SpacerProps.json +9 -0
  323. package/data/docs/types/SplitButton.json +203 -0
  324. package/data/docs/types/Stack.json +144 -0
  325. package/data/docs/types/Steps.json +12 -0
  326. package/data/docs/types/StepsChangeDetails.json +9 -0
  327. package/data/docs/types/StepsCompletedContent.json +28 -0
  328. package/data/docs/types/StepsCompletedContentProps.json +9 -0
  329. package/data/docs/types/StepsContent.json +43 -0
  330. package/data/docs/types/StepsContentProps.json +9 -0
  331. package/data/docs/types/StepsDescription.json +28 -0
  332. package/data/docs/types/StepsDescriptionProps.json +9 -0
  333. package/data/docs/types/StepsIndicator.json +28 -0
  334. package/data/docs/types/StepsIndicatorProps.json +9 -0
  335. package/data/docs/types/StepsItem.json +43 -0
  336. package/data/docs/types/StepsItemProps.json +9 -0
  337. package/data/docs/types/StepsList.json +28 -0
  338. package/data/docs/types/StepsListProps.json +9 -0
  339. package/data/docs/types/StepsNextTrigger.json +62 -0
  340. package/data/docs/types/StepsNextTriggerProps.json +9 -0
  341. package/data/docs/types/StepsNumber.json +28 -0
  342. package/data/docs/types/StepsNumberProps.json +9 -0
  343. package/data/docs/types/StepsPrevTrigger.json +62 -0
  344. package/data/docs/types/StepsPrevTriggerProps.json +9 -0
  345. package/data/docs/types/StepsRoot.json +183 -0
  346. package/data/docs/types/StepsRootProps.json +11 -0
  347. package/data/docs/types/StepsSeparator.json +28 -0
  348. package/data/docs/types/StepsSeparatorProps.json +9 -0
  349. package/data/docs/types/StepsStatus.json +57 -0
  350. package/data/docs/types/StepsStatusProps.json +9 -0
  351. package/data/docs/types/StepsTitle.json +28 -0
  352. package/data/docs/types/StepsTitleProps.json +9 -0
  353. package/data/docs/types/StepsTrigger.json +47 -0
  354. package/data/docs/types/StepsTriggerProps.json +9 -0
  355. package/data/docs/types/Switch.json +371 -0
  356. package/data/docs/types/TabListProps.json +9 -0
  357. package/data/docs/types/TabNav.json +12 -0
  358. package/data/docs/types/TabNavItem.json +300 -0
  359. package/data/docs/types/TabNavItemProps.json +9 -0
  360. package/data/docs/types/TabNavProps.json +9 -0
  361. package/data/docs/types/TabNavRoot.json +80 -0
  362. package/data/docs/types/TabPanelProps.json +9 -0
  363. package/data/docs/types/TabPanelsProps.json +9 -0
  364. package/data/docs/types/TabProps.json +9 -0
  365. package/data/docs/types/Table.json +9 -0
  366. package/data/docs/types/TableBody.json +67 -0
  367. package/data/docs/types/TableBodyProps.json +9 -0
  368. package/data/docs/types/TableCaption.json +67 -0
  369. package/data/docs/types/TableCaptionProps.json +9 -0
  370. package/data/docs/types/TableCell.json +227 -0
  371. package/data/docs/types/TableCellProps.json +9 -0
  372. package/data/docs/types/TableColumn.json +101 -0
  373. package/data/docs/types/TableColumnGroup.json +101 -0
  374. package/data/docs/types/TableColumnGroupProps.json +9 -0
  375. package/data/docs/types/TableColumnHeader.json +193 -0
  376. package/data/docs/types/TableColumnHeaderProps.json +9 -0
  377. package/data/docs/types/TableColumnProps.json +9 -0
  378. package/data/docs/types/TableFooter.json +67 -0
  379. package/data/docs/types/TableFooterProps.json +9 -0
  380. package/data/docs/types/TableHeader.json +67 -0
  381. package/data/docs/types/TableHeaderProps.json +9 -0
  382. package/data/docs/types/TableRoot.json +365 -0
  383. package/data/docs/types/TableRootProps.json +12 -0
  384. package/data/docs/types/TableRow.json +67 -0
  385. package/data/docs/types/TableRowProps.json +9 -0
  386. package/data/docs/types/TableScrollArea.json +82 -0
  387. package/data/docs/types/TableScrollAreaProps.json +9 -0
  388. package/data/docs/types/Tabs.json +12 -0
  389. package/data/docs/types/TabsList.json +110 -0
  390. package/data/docs/types/TabsPanel.json +112 -0
  391. package/data/docs/types/TabsPanels.json +108 -0
  392. package/data/docs/types/TabsRoot.json +211 -0
  393. package/data/docs/types/TabsTab.json +174 -0
  394. package/data/docs/types/TagGroup.json +12 -0
  395. package/data/docs/types/TagGroupRoot.json +306 -0
  396. package/data/docs/types/TagGroupTag.json +595 -0
  397. package/data/docs/types/TagGroupTagList.json +166 -0
  398. package/data/docs/types/Text.json +119 -0
  399. package/data/docs/types/TextInput.json +1156 -0
  400. package/data/docs/types/TextInputField.json +1263 -0
  401. package/data/docs/types/TimeInput.json +752 -0
  402. package/data/docs/types/ToastAction.json +9 -0
  403. package/data/docs/types/ToastManagerApi.json +9 -0
  404. package/data/docs/types/ToastOptions.json +9 -0
  405. package/data/docs/types/ToastOutlet.json +12 -0
  406. package/data/docs/types/ToastPlacement.json +9 -0
  407. package/data/docs/types/ToastPromiseOptions.json +9 -0
  408. package/data/docs/types/ToastType.json +9 -0
  409. package/data/docs/types/ToastVariant.json +9 -0
  410. package/data/docs/types/ToggleButton.json +789 -0
  411. package/data/docs/types/ToggleButtonGroup.json +9 -0
  412. package/data/docs/types/ToggleButtonGroupButton.json +331 -0
  413. package/data/docs/types/ToggleButtonGroupRoot.json +269 -0
  414. package/data/docs/types/Toolbar.json +176 -0
  415. package/data/docs/types/Tooltip.json +12 -0
  416. package/data/docs/types/TooltipContent.json +372 -0
  417. package/data/docs/types/TooltipRoot.json +179 -0
  418. package/data/docs/types/Trigger.json +69 -0
  419. package/data/docs/types/VisuallyHidden.json +93 -0
  420. package/data/docs/types/__object.json +12 -0
  421. package/data/docs/types/filters.json +11 -0
  422. package/data/docs/types/manifest.json +278 -0
  423. package/data/docs/types/toast.json +234 -0
  424. package/data/docs/types/useColorMode.json +13 -0
  425. package/data/docs/types/useColorModeValue.json +13 -0
  426. package/data/docs/types/useColorScheme.json +12 -0
  427. package/data/docs/types/useLocalizedStringFormatter.json +14 -0
  428. package/data/icons.json +21940 -0
  429. package/data/tokens.json +40061 -0
  430. package/dist/index.js +2516 -17
  431. package/package.json +25 -6
  432. package/dist/data-loader.d.ts +0 -102
  433. package/dist/data-loader.js +0 -104
  434. package/dist/index.d.ts +0 -13
  435. package/dist/server.d.ts +0 -9
  436. package/dist/server.js +0 -22
  437. package/dist/server.spec.d.ts +0 -1
  438. package/dist/server.spec.js +0 -69
  439. package/dist/tools/list-components.d.ts +0 -9
  440. package/dist/tools/list-components.js +0 -42
  441. package/dist/types.d.ts +0 -28
  442. package/dist/types.js +0 -4
  443. package/src/data-loader.ts +0 -226
  444. package/src/index.ts +0 -29
  445. package/src/server.spec.ts +0 -86
  446. package/src/server.ts +0 -28
  447. package/src/tools/list-components.ts +0 -49
  448. package/src/types.ts +0 -31
  449. package/tsconfig.json +0 -14
  450. package/vitest.config.ts +0 -9
@@ -0,0 +1,715 @@
1
+ {
2
+ "meta": {
3
+ "id": "Components-Button",
4
+ "title": "Button",
5
+ "exportName": "Button",
6
+ "description": "A button serves as a standardized, reusable component for triggering actions and navigating.",
7
+ "lifecycleState": "Stable",
8
+ "order": 999,
9
+ "repoPath": "packages/nimbus/src/components/button/button.mdx",
10
+ "menu": [
11
+ "Components",
12
+ "Buttons",
13
+ "Button"
14
+ ],
15
+ "route": "components/buttons/button",
16
+ "tags": [
17
+ "component",
18
+ "buttons",
19
+ "forms"
20
+ ],
21
+ "toc": [
22
+ {
23
+ "value": "Overview",
24
+ "href": "#overview",
25
+ "depth": 2,
26
+ "numbering": [
27
+ 1,
28
+ 1
29
+ ],
30
+ "parent": "root"
31
+ },
32
+ {
33
+ "value": "Resources",
34
+ "href": "#resources",
35
+ "depth": 3,
36
+ "numbering": [
37
+ 1,
38
+ 1,
39
+ 1
40
+ ],
41
+ "parent": "root"
42
+ },
43
+ {
44
+ "value": "Hierarchy",
45
+ "href": "#hierarchy",
46
+ "depth": 3,
47
+ "numbering": [
48
+ 1,
49
+ 1,
50
+ 2
51
+ ],
52
+ "parent": "root"
53
+ },
54
+ {
55
+ "value": "Primary actions",
56
+ "href": "#primary-actions",
57
+ "depth": 4,
58
+ "numbering": [
59
+ 1,
60
+ 1,
61
+ 2,
62
+ 1
63
+ ],
64
+ "parent": "root"
65
+ },
66
+ {
67
+ "value": "Secondary actions",
68
+ "href": "#secondary-actions",
69
+ "depth": 4,
70
+ "numbering": [
71
+ 1,
72
+ 1,
73
+ 2,
74
+ 2
75
+ ],
76
+ "parent": "root"
77
+ },
78
+ {
79
+ "value": "Tertiary actions",
80
+ "href": "#tertiary-actions",
81
+ "depth": 4,
82
+ "numbering": [
83
+ 1,
84
+ 1,
85
+ 2,
86
+ 3
87
+ ],
88
+ "parent": "root"
89
+ },
90
+ {
91
+ "value": "Variables",
92
+ "href": "#variables",
93
+ "depth": 3,
94
+ "numbering": [
95
+ 1,
96
+ 1,
97
+ 3
98
+ ],
99
+ "parent": "root"
100
+ },
101
+ {
102
+ "value": "Icons in buttons",
103
+ "href": "#icons-in-buttons",
104
+ "depth": 3,
105
+ "numbering": [
106
+ 1,
107
+ 1,
108
+ 4
109
+ ],
110
+ "parent": "root"
111
+ },
112
+ {
113
+ "value": "Icons before or after in buttons",
114
+ "href": "#icons-before-or-after-in-buttons",
115
+ "depth": 4,
116
+ "numbering": [
117
+ 1,
118
+ 1,
119
+ 4,
120
+ 1
121
+ ],
122
+ "parent": "root"
123
+ },
124
+ {
125
+ "value": "Size",
126
+ "href": "#size",
127
+ "depth": 3,
128
+ "numbering": [
129
+ 1,
130
+ 1,
131
+ 5
132
+ ],
133
+ "parent": "root"
134
+ },
135
+ {
136
+ "value": "Color palette",
137
+ "href": "#color-palette",
138
+ "depth": 3,
139
+ "numbering": [
140
+ 1,
141
+ 1,
142
+ 6
143
+ ],
144
+ "parent": "root"
145
+ },
146
+ {
147
+ "value": "Primary",
148
+ "href": "#primary",
149
+ "depth": 4,
150
+ "numbering": [
151
+ 1,
152
+ 1,
153
+ 6,
154
+ 1
155
+ ],
156
+ "parent": "root"
157
+ },
158
+ {
159
+ "value": "Critical",
160
+ "href": "#critical",
161
+ "depth": 4,
162
+ "numbering": [
163
+ 1,
164
+ 1,
165
+ 6,
166
+ 2
167
+ ],
168
+ "parent": "root"
169
+ }
170
+ ],
171
+ "figmaLink": "https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=346-2569",
172
+ "layout": "app-frame",
173
+ "tabs": [
174
+ {
175
+ "key": "overview",
176
+ "title": "Overview",
177
+ "order": 0
178
+ },
179
+ {
180
+ "key": "guidelines",
181
+ "title": "Guidelines",
182
+ "order": 2
183
+ },
184
+ {
185
+ "key": "dev",
186
+ "title": "Implementation",
187
+ "order": 3
188
+ },
189
+ {
190
+ "key": "a11y",
191
+ "title": "Accessibility",
192
+ "order": 4
193
+ }
194
+ ]
195
+ },
196
+ "mdx": "## Overview\n\nButtons are clickable elements that initiate actions. They're how we encourage\nusers to take action and explore different parts of our interface.\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=346-2569)\n\n### Hierarchy\n\n#### Primary actions\n\nPrimary colorPalette, filled style, medium size. For the principal call to action on the\npage. Primary buttons should only appear once per screen.\n\n- **A solid button** should be used as a primary action on a page used to\n highlight the most important or most common action a user is likely to take in\n that context. It serves to guide the user towards the desired path and make\n the key interaction clear and prominent.\n\n```jsx live\nconst App = () => (\n <Button colorPalette=\"primary\" size=\"md\" variant=\"solid\">\n <Icons.Add />\n Primary action\n </Button>\n)\n```\n\n#### Secondary actions\n\nPrimary color palette, outline style, medium size. Represents a less important or\nalternative action compared to the primary button.\n\n- **An outlined button** should be used as for secondary actions that are less\n important or less frequent than the primary action. They provide users with\n alternative options without distracting from the main call to action.\n\n```jsx live\nconst App = () => (\n <Button colorPalette=\"primary\" variant=\"outline\" size=\"md\">\n <Icons.Replay />\n Secondary action\n </Button>\n)\n```\n\n#### Tertiary actions\n\nPrimary color palette, link styled, xsmall size. For lesser-performed actions or a\ncollection of actions — those that users are unlikely to perform.\n\n- **Ghost buttons** are used when you want a button to be visible but less\n visually prominent than a primary or secondary button. These can apply to\n tertiary actions such as drop downs and contextual actions.\n- **Link buttons** can be used when the focus should be on the content rather\n than the UI controls themselves. They are less visually distracting and allow\n the content to take center stage. This is common in content-heavy applications\n or dashboards. Link and Ghost styled buttons are most used in tertiary\n actions, and are styled in X-small or 2X-small sizes.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" alignItems=\"center\">\n <Button size=\"md\" variant=\"ghost\">\n Filter\n </Button>\n <Button size=\"xs\" variant=\"link\">\n Expand options\n <Icons.KeyboardArrowDown />\n </Button>\n </Stack>\n)\n```\n\n### Variables\n\nGet familiar with the features.\n\n### Icons in buttons\n\n#### Icons before or after in buttons\n\nThe default position of icons in primary and secondary buttons are to the left\nof the text, but we allow for icons to follow for special uses such as drop\ndowns, steppers, and expansion links. For icon placement best practices refer to\nour guidelines.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" variant=\"solid\">\n <Icons.SentimentSatisfied />\n Solid\n <Icons.SentimentSatisfied />\n </Button>\n <Button size=\"md\" variant=\"outline\">\n <Icons.SentimentSatisfied />\n Outline\n <Icons.SentimentSatisfied />\n </Button>\n <Button size=\"md\" variant=\"ghost\">\n <Icons.SentimentSatisfied />\n Ghost\n <Icons.SentimentSatisfied />\n </Button>\n <Button size=\"md\" variant=\"link\">\n <Icons.SentimentSatisfied />\n Link\n <Icons.SentimentSatisfied />\n </Button>\n </Stack>\n)\n```\n\n### Size\n\n**Medium** (40px)\n\nThis is the default and preferred size for buttons.\n\n```jsx live\nconst App = () => (\n <Button size=\"md\" variant=\"solid\">\n Save\n </Button>\n)\n```\n\n**X-Small** (32px)\n\nIf there is a space constraint, use these buttons. Ideally will be used\nsparingly.\n\n```jsx live\nconst App = () => (\n <Button size=\"xs\" variant=\"solid\">\n Apply filters\n </Button>\n)\n```\n\n**2x-Small** (24px)\n\nUsed mainly for Ghost and Link buttons, these buttons can be seen in filters\nwhere the size constraint is tightest.\n\n```jsx live\nconst App = () => (\n <Button size=\"2xs\" variant=\"ghost\">\n <Icons.Edit />\n Edit Filters\n </Button>\n)\n```\n\n### Color palette\n\n#### Primary\n\nThis is the default `colorPalette` for the primary button. This styling should be used\nmost commonly for all actions.\n\n```jsx live\nconst App = () => (\n <Button size=\"md\" variant=\"solid\">\n <Icons.SentimentSatisfied />\n Button\n <Icons.SentimentSatisfied />\n </Button>\n)\n```\n\n#### Critical\n\nUse this button when the user is approaching a permanent destructive action.\n\n```jsx live\nconst App = () => (\n <Button colorPalette=\"critical\" size=\"md\" variant=\"solid\">\n <Icons.SentimentSatisfied />\n Button\n <Icons.SentimentSatisfied />\n </Button>\n)\n```\n",
197
+ "views": {
198
+ "overview": {
199
+ "mdx": "## Overview\n\nButtons are clickable elements that initiate actions. They're how we encourage\nusers to take action and explore different parts of our interface.\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=346-2569)\n\n### Hierarchy\n\n#### Primary actions\n\nPrimary colorPalette, filled style, medium size. For the principal call to action on the\npage. Primary buttons should only appear once per screen.\n\n- **A solid button** should be used as a primary action on a page used to\n highlight the most important or most common action a user is likely to take in\n that context. It serves to guide the user towards the desired path and make\n the key interaction clear and prominent.\n\n```jsx live\nconst App = () => (\n <Button colorPalette=\"primary\" size=\"md\" variant=\"solid\">\n <Icons.Add />\n Primary action\n </Button>\n)\n```\n\n#### Secondary actions\n\nPrimary color palette, outline style, medium size. Represents a less important or\nalternative action compared to the primary button.\n\n- **An outlined button** should be used as for secondary actions that are less\n important or less frequent than the primary action. They provide users with\n alternative options without distracting from the main call to action.\n\n```jsx live\nconst App = () => (\n <Button colorPalette=\"primary\" variant=\"outline\" size=\"md\">\n <Icons.Replay />\n Secondary action\n </Button>\n)\n```\n\n#### Tertiary actions\n\nPrimary color palette, link styled, xsmall size. For lesser-performed actions or a\ncollection of actions — those that users are unlikely to perform.\n\n- **Ghost buttons** are used when you want a button to be visible but less\n visually prominent than a primary or secondary button. These can apply to\n tertiary actions such as drop downs and contextual actions.\n- **Link buttons** can be used when the focus should be on the content rather\n than the UI controls themselves. They are less visually distracting and allow\n the content to take center stage. This is common in content-heavy applications\n or dashboards. Link and Ghost styled buttons are most used in tertiary\n actions, and are styled in X-small or 2X-small sizes.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" alignItems=\"center\">\n <Button size=\"md\" variant=\"ghost\">\n Filter\n </Button>\n <Button size=\"xs\" variant=\"link\">\n Expand options\n <Icons.KeyboardArrowDown />\n </Button>\n </Stack>\n)\n```\n\n### Variables\n\nGet familiar with the features.\n\n### Icons in buttons\n\n#### Icons before or after in buttons\n\nThe default position of icons in primary and secondary buttons are to the left\nof the text, but we allow for icons to follow for special uses such as drop\ndowns, steppers, and expansion links. For icon placement best practices refer to\nour guidelines.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" variant=\"solid\">\n <Icons.SentimentSatisfied />\n Solid\n <Icons.SentimentSatisfied />\n </Button>\n <Button size=\"md\" variant=\"outline\">\n <Icons.SentimentSatisfied />\n Outline\n <Icons.SentimentSatisfied />\n </Button>\n <Button size=\"md\" variant=\"ghost\">\n <Icons.SentimentSatisfied />\n Ghost\n <Icons.SentimentSatisfied />\n </Button>\n <Button size=\"md\" variant=\"link\">\n <Icons.SentimentSatisfied />\n Link\n <Icons.SentimentSatisfied />\n </Button>\n </Stack>\n)\n```\n\n### Size\n\n**Medium** (40px)\n\nThis is the default and preferred size for buttons.\n\n```jsx live\nconst App = () => (\n <Button size=\"md\" variant=\"solid\">\n Save\n </Button>\n)\n```\n\n**X-Small** (32px)\n\nIf there is a space constraint, use these buttons. Ideally will be used\nsparingly.\n\n```jsx live\nconst App = () => (\n <Button size=\"xs\" variant=\"solid\">\n Apply filters\n </Button>\n)\n```\n\n**2x-Small** (24px)\n\nUsed mainly for Ghost and Link buttons, these buttons can be seen in filters\nwhere the size constraint is tightest.\n\n```jsx live\nconst App = () => (\n <Button size=\"2xs\" variant=\"ghost\">\n <Icons.Edit />\n Edit Filters\n </Button>\n)\n```\n\n### Color palette\n\n#### Primary\n\nThis is the default `colorPalette` for the primary button. This styling should be used\nmost commonly for all actions.\n\n```jsx live\nconst App = () => (\n <Button size=\"md\" variant=\"solid\">\n <Icons.SentimentSatisfied />\n Button\n <Icons.SentimentSatisfied />\n </Button>\n)\n```\n\n#### Critical\n\nUse this button when the user is approaching a permanent destructive action.\n\n```jsx live\nconst App = () => (\n <Button colorPalette=\"critical\" size=\"md\" variant=\"solid\">\n <Icons.SentimentSatisfied />\n Button\n <Icons.SentimentSatisfied />\n </Button>\n)\n```\n",
200
+ "toc": [
201
+ {
202
+ "value": "Overview",
203
+ "href": "#overview",
204
+ "depth": 2,
205
+ "numbering": [
206
+ 1,
207
+ 1
208
+ ],
209
+ "parent": "root"
210
+ },
211
+ {
212
+ "value": "Resources",
213
+ "href": "#resources",
214
+ "depth": 3,
215
+ "numbering": [
216
+ 1,
217
+ 1,
218
+ 1
219
+ ],
220
+ "parent": "root"
221
+ },
222
+ {
223
+ "value": "Hierarchy",
224
+ "href": "#hierarchy",
225
+ "depth": 3,
226
+ "numbering": [
227
+ 1,
228
+ 1,
229
+ 2
230
+ ],
231
+ "parent": "root"
232
+ },
233
+ {
234
+ "value": "Primary actions",
235
+ "href": "#primary-actions",
236
+ "depth": 4,
237
+ "numbering": [
238
+ 1,
239
+ 1,
240
+ 2,
241
+ 1
242
+ ],
243
+ "parent": "root"
244
+ },
245
+ {
246
+ "value": "Secondary actions",
247
+ "href": "#secondary-actions",
248
+ "depth": 4,
249
+ "numbering": [
250
+ 1,
251
+ 1,
252
+ 2,
253
+ 2
254
+ ],
255
+ "parent": "root"
256
+ },
257
+ {
258
+ "value": "Tertiary actions",
259
+ "href": "#tertiary-actions",
260
+ "depth": 4,
261
+ "numbering": [
262
+ 1,
263
+ 1,
264
+ 2,
265
+ 3
266
+ ],
267
+ "parent": "root"
268
+ },
269
+ {
270
+ "value": "Variables",
271
+ "href": "#variables",
272
+ "depth": 3,
273
+ "numbering": [
274
+ 1,
275
+ 1,
276
+ 3
277
+ ],
278
+ "parent": "root"
279
+ },
280
+ {
281
+ "value": "Icons in buttons",
282
+ "href": "#icons-in-buttons",
283
+ "depth": 3,
284
+ "numbering": [
285
+ 1,
286
+ 1,
287
+ 4
288
+ ],
289
+ "parent": "root"
290
+ },
291
+ {
292
+ "value": "Icons before or after in buttons",
293
+ "href": "#icons-before-or-after-in-buttons",
294
+ "depth": 4,
295
+ "numbering": [
296
+ 1,
297
+ 1,
298
+ 4,
299
+ 1
300
+ ],
301
+ "parent": "root"
302
+ },
303
+ {
304
+ "value": "Size",
305
+ "href": "#size",
306
+ "depth": 3,
307
+ "numbering": [
308
+ 1,
309
+ 1,
310
+ 5
311
+ ],
312
+ "parent": "root"
313
+ },
314
+ {
315
+ "value": "Color palette",
316
+ "href": "#color-palette",
317
+ "depth": 3,
318
+ "numbering": [
319
+ 1,
320
+ 1,
321
+ 6
322
+ ],
323
+ "parent": "root"
324
+ },
325
+ {
326
+ "value": "Primary",
327
+ "href": "#primary",
328
+ "depth": 4,
329
+ "numbering": [
330
+ 1,
331
+ 1,
332
+ 6,
333
+ 1
334
+ ],
335
+ "parent": "root"
336
+ },
337
+ {
338
+ "value": "Critical",
339
+ "href": "#critical",
340
+ "depth": 4,
341
+ "numbering": [
342
+ 1,
343
+ 1,
344
+ 6,
345
+ 2
346
+ ],
347
+ "parent": "root"
348
+ }
349
+ ]
350
+ },
351
+ "a11y": {
352
+ "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\nThe Button component uses `onPress\\*` props to handle all user\ninteractions—mouse clicks, touch taps, and keyboard presses—consistently. These\nprops (`onPress`, `onPressStart`, `onPressEnd`, etc.) ensure a smooth and\naccessible experience regardless of the user's input method or device.\n\n```jsx live\nconst App = () => (\n <Button size=\"md\" variant=\"solid\" onPress={() => alert(\"clicked!\")}>\n Click me... with your keyboard\n </Button>\n)\n```\n\n### Accessibility standards\n\n- **Color contrast for text:** The contrast ratio between the button text and\n the button background should be at least 4.5:1 for normal text and 3:1 for\n large text.\n- **Color contrast for button:** The contrast ratio between the button's\n background color and the surrounding page background should be at least 3:1.\n- **Visual cues:** Don't rely solely on color to convey information. Use\n additional visual cues like shapes, patterns, or text labels to ensure the\n button's meaning is clear to everyone, including people with color blindness.\n- **Focus indicator:** Provide a clear visual indicator when the button receives\n keyboard focus. This helps users understand which element is currently active.\n The focus indicator must not be hidden by other content on the page and must\n meet certain visibility requirements to be easily seen.\n- **Keyboard accessibility:** Buttons must be operable using a keyboard. Users\n should be able to navigate to the button using the Tab key and activate it\n using the Enter or Space key.\n- **Target size:** Ensure that the button is large enough to be easily\n clickable, especially on touchscreens. WCAG recommends a minimum target size\n of 24x24 CSS pixels.\n- **Dragging movements:** If a button's function relies on dragging, an\n alternative method should be provided that doesn't require dragging.\n- **Clear labels:** The button's text label should clearly describe its\n function.\n- **Consistent design:** Use buttons consistently throughout your website. This\n helps users learn the meaning of each button and makes it easier for them to\n navigate your site.\n- **Findable help:** If users might need help understanding how to use a button\n or what it does, provide clear and easily findable help resources.\n- **Assistive technology compatibility:** Ensure that buttons are compatible\n with assistive technologies like screen readers. This often involves using\n proper HTML markup and ARIA attributes to provide semantic information about\n the button.\n",
353
+ "toc": [
354
+ {
355
+ "value": "Accessibility",
356
+ "href": "#accessibility",
357
+ "depth": 2,
358
+ "numbering": [
359
+ 1,
360
+ 1
361
+ ],
362
+ "parent": "root"
363
+ },
364
+ {
365
+ "value": "Accessibility standards",
366
+ "href": "#accessibility-standards",
367
+ "depth": 3,
368
+ "numbering": [
369
+ 1,
370
+ 1,
371
+ 1
372
+ ],
373
+ "parent": "root"
374
+ }
375
+ ]
376
+ },
377
+ "dev": {
378
+ "mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { Button, type ButtonProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe Button component wraps React Aria's `useButton` hook to provide accessible, interactive elements.\n\n```jsx live-dev\nconst App = () => (\n <Button onPress={() => alert('Button pressed')}>\n Action\n </Button>\n)\n```\n\n## Usage examples\n\n### Size options\n\nButton supports three size variants to match different interface densities. The `md` size is the default.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Button size=\"2xs\">2XS Button</Button>\n <Button size=\"xs\">XS Button</Button>\n <Button size=\"sm\">SM Button</Button>\n <Button size=\"md\">MD Button (Default)</Button>\n </Stack>\n)\n```\n\n### Visual variants\n\nChoose between five visual variants to match your design context. The `subtle` variant is the default.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" wrap=\"wrap\">\n <Button variant=\"solid\">Solid</Button>\n <Button variant=\"subtle\">Subtle (Default)</Button>\n <Button variant=\"outline\">Outline</Button>\n <Button variant=\"ghost\">Ghost</Button>\n <Button variant=\"link\">Link</Button>\n </Stack>\n)\n```\n\n### Color palette options\n\nThe Button component supports all semantic color palettes to convey meaning and hierarchy. The `primary` color palette is the default.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <Stack direction=\"row\" gap=\"400\" wrap=\"wrap\">\n <Button colorPalette=\"primary\">Primary (Default)</Button>\n <Button colorPalette=\"neutral\">Neutral</Button>\n <Button colorPalette=\"info\">Info</Button>\n </Stack>\n <Stack direction=\"row\" gap=\"400\" wrap=\"wrap\">\n <Button colorPalette=\"positive\">Positive</Button>\n <Button colorPalette=\"warning\">Warning</Button>\n <Button colorPalette=\"critical\">Critical</Button>\n </Stack>\n </Stack>\n)\n```\n\nYou can also override the color palette using Chakra UI style props for one-off customizations:\n\n```jsx live-dev\nconst App = () => (\n <Button backgroundColor=\"purple.9\" color=\"purple.contrast\" _hover={{ backgroundColor: \"purple.10\" }}>\n Custom Purple Button\n </Button>\n)\n```\n\n### With icons\n\nButtons automatically handle spacing between icons and text. You can place icons before or after the text.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <Button>\n <Icons.Add />\n Add Item\n </Button>\n <Button variant=\"outline\">\n Next\n <Icons.ArrowForward />\n </Button>\n </Stack>\n)\n```\n\n### As link\n\nUse the `as` prop to render the button as an anchor tag while maintaining button styling. This is useful for navigation links that need to look like actions.\n\n```jsx live-dev\nconst App = () => (\n <Button as=\"a\" href=\"#\" variant=\"link\">\n Go to Home\n </Button>\n)\n```\n\n### Disabled state\n\nUse the `isDisabled` prop to prevent interaction. This visualizes the button as disabled and removes it from the tab order.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <Button isDisabled variant=\"solid\">Disabled Solid</Button>\n <Button isDisabled variant=\"outline\">Disabled Outline</Button>\n </Stack>\n)\n```\n\n### Event handling\n\nUse `onPress` instead of `onClick` for consistent behavior across mouse, touch, and keyboard interactions.\n\n```jsx live-dev\nconst App = () => {\n const [count, setCount] = useState(0);\n\n return (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Button onPress={() => setCount(c => c + 1)}>\n Increment\n </Button>\n <Text>Count: {count}</Text>\n </Stack>\n );\n}\n```\n\n## Component requirements\n\n## Accessibility\n\nThe Button component handles most accessibility requirements internally via React Aria.\n\n- **Labeling**: Ensure the button has a visible label (children) or an `aria-label` if it contains only an icon.\n- **Role**: Renders as `button` by default, or `link` (a tag) when using `as=\"a\"`.\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 = \"submit-order-button\";\n\nexport const Example = () => (\n <Button id={PERSISTENT_ID}>Submit</Button>\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n- `Tab`: Focuses the button.\n- `Enter` or `Space`: Activates the button (triggers `onPress`).\n\n## API reference\n\n<PropsTable id=\"Button\" />\n\n## Common patterns\n\n### Loading state\n\nWhile the Button component doesn't have a built-in `isLoading` prop yet, you can implement a loading state by disabling the button and showing a spinner.\n\n```jsx live-dev\nconst App = () => {\n const [isLoading, setIsLoading] = useState(false);\n\n const handleClick = () => {\n setIsLoading(true);\n // Simulate async action\n setTimeout(() => setIsLoading(false), 2000);\n };\n\n return (\n <Button \n isDisabled={isLoading} \n onPress={handleClick}\n >\n {isLoading ? 'Loading...' : 'Save Changes'}\n </Button>\n );\n}\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using Button in 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 Button renders with expected content and attributes\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 { Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Button - Basic rendering\", () => {\n it(\"renders with correct text\", () => {\n render(\n <NimbusProvider>\n <Button>Click me</Button>\n </NimbusProvider>\n );\n\n expect(\n screen.getByRole(\"button\", { name: /click me/i })\n ).toBeInTheDocument();\n });\n\n it(\"renders with custom data attributes\", () => {\n render(\n <NimbusProvider>\n <Button data-testid=\"my-button\">Action</Button>\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"my-button\")).toBeInTheDocument();\n });\n\n it(\"renders as an anchor element when using the as prop\", () => {\n render(\n <NimbusProvider>\n <Button as=\"a\" href=\"/home\" data-testid=\"link-button\">\n Go Home\n </Button>\n </NimbusProvider>\n );\n\n const element = screen.getByTestId(\"link-button\");\n expect(element.tagName).toBe(\"A\");\n expect(element).toHaveAttribute(\"href\", \"/home\");\n });\n});\n```\n\n### Interaction Tests\n\nTest user interactions with the Button\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 { Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Button - Interactions\", () => {\n it(\"calls onPress when clicked\", async () => {\n const user = userEvent.setup();\n const handlePress = vi.fn();\n\n render(\n <NimbusProvider>\n <Button onPress={handlePress}>Action</Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /action/i });\n await user.click(button);\n\n expect(handlePress).toHaveBeenCalledTimes(1);\n });\n\n it(\"does not call onPress when disabled\", async () => {\n const user = userEvent.setup();\n const handlePress = vi.fn();\n\n render(\n <NimbusProvider>\n <Button isDisabled onPress={handlePress}>\n Action\n </Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /action/i });\n await user.click(button);\n\n expect(handlePress).not.toHaveBeenCalled();\n });\n});\n```\n\n### Keyboard Navigation Tests\n\nTest keyboard interactions with the Button\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 { Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Button - Keyboard navigation\", () => {\n it(\"is focusable with Tab key\", async () => {\n const user = userEvent.setup();\n\n render(\n <NimbusProvider>\n <Button>Focus me</Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /focus me/i });\n await user.tab();\n\n expect(button).toHaveFocus();\n });\n\n it(\"can be activated with Enter key\", async () => {\n const user = userEvent.setup();\n const handlePress = vi.fn();\n\n render(\n <NimbusProvider>\n <Button onPress={handlePress}>Press me</Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /press me/i });\n button.focus();\n\n await user.keyboard(\"{Enter}\");\n\n expect(handlePress).toHaveBeenCalledTimes(1);\n });\n\n it(\"can be activated with Space key\", async () => {\n const user = userEvent.setup();\n const handlePress = vi.fn();\n\n render(\n <NimbusProvider>\n <Button onPress={handlePress}>Press me</Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /press me/i });\n button.focus();\n\n await user.keyboard(\" \");\n\n expect(handlePress).toHaveBeenCalledTimes(1);\n });\n});\n```\n\n### State Tests\n\nTest different states of the Button\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 { Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Button - States\", () => {\n it(\"applies disabled state on native button\", () => {\n render(\n <NimbusProvider>\n <Button isDisabled>Disabled</Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /disabled/i });\n expect(button).toBeDisabled();\n });\n\n it(\"is not focusable when disabled\", async () => {\n const user = userEvent.setup();\n\n render(\n <NimbusProvider>\n <Button isDisabled>Cannot focus</Button>\n </NimbusProvider>\n );\n\n const button = screen.getByRole(\"button\", { name: /cannot focus/i });\n await user.tab();\n\n expect(button).not.toHaveFocus();\n });\n});\n```\n\n### Visual Variant Tests\n\nTest rendering with different visual variants and sizes\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 { Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Button - Visual variants\", () => {\n it(\"renders with different size variants\", () => {\n const { rerender } = render(\n <NimbusProvider>\n <Button size=\"sm\">Small</Button>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"button\")).toBeInTheDocument();\n\n rerender(\n <NimbusProvider>\n <Button size=\"md\">Medium</Button>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"button\")).toBeInTheDocument();\n });\n\n it(\"renders with different visual variants\", () => {\n const { rerender } = render(\n <NimbusProvider>\n <Button variant=\"solid\">Solid</Button>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"button\")).toBeInTheDocument();\n\n rerender(\n <NimbusProvider>\n <Button variant=\"outline\">Outline</Button>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"button\")).toBeInTheDocument();\n });\n\n it(\"renders with color palettes\", () => {\n render(\n <NimbusProvider>\n <Button colorPalette=\"primary\" variant=\"solid\">\n Primary\n </Button>\n </NimbusProvider>\n );\n\n expect(\n screen.getByRole(\"button\", { name: /primary/i })\n ).toBeInTheDocument();\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-buttons-button--docs)\n- [React Aria Button](https://react-spectrum.adobe.com/react-aria/Button.html)\n\n",
379
+ "toc": [
380
+ {
381
+ "value": "Getting started",
382
+ "href": "#getting-started",
383
+ "depth": 2,
384
+ "numbering": [
385
+ 1,
386
+ 1
387
+ ],
388
+ "parent": "root"
389
+ },
390
+ {
391
+ "value": "Import",
392
+ "href": "#import",
393
+ "depth": 3,
394
+ "numbering": [
395
+ 1,
396
+ 1,
397
+ 1
398
+ ],
399
+ "parent": "root"
400
+ },
401
+ {
402
+ "value": "Basic usage",
403
+ "href": "#basic-usage",
404
+ "depth": 3,
405
+ "numbering": [
406
+ 1,
407
+ 1,
408
+ 2
409
+ ],
410
+ "parent": "root"
411
+ },
412
+ {
413
+ "value": "Usage examples",
414
+ "href": "#usage-examples",
415
+ "depth": 2,
416
+ "numbering": [
417
+ 1,
418
+ 2
419
+ ],
420
+ "parent": "root"
421
+ },
422
+ {
423
+ "value": "Size options",
424
+ "href": "#size-options",
425
+ "depth": 3,
426
+ "numbering": [
427
+ 1,
428
+ 2,
429
+ 1
430
+ ],
431
+ "parent": "root"
432
+ },
433
+ {
434
+ "value": "Visual variants",
435
+ "href": "#visual-variants",
436
+ "depth": 3,
437
+ "numbering": [
438
+ 1,
439
+ 2,
440
+ 2
441
+ ],
442
+ "parent": "root"
443
+ },
444
+ {
445
+ "value": "Color palette options",
446
+ "href": "#color-palette-options",
447
+ "depth": 3,
448
+ "numbering": [
449
+ 1,
450
+ 2,
451
+ 3
452
+ ],
453
+ "parent": "root"
454
+ },
455
+ {
456
+ "value": "With icons",
457
+ "href": "#with-icons",
458
+ "depth": 3,
459
+ "numbering": [
460
+ 1,
461
+ 2,
462
+ 4
463
+ ],
464
+ "parent": "root"
465
+ },
466
+ {
467
+ "value": "As link",
468
+ "href": "#as-link",
469
+ "depth": 3,
470
+ "numbering": [
471
+ 1,
472
+ 2,
473
+ 5
474
+ ],
475
+ "parent": "root"
476
+ },
477
+ {
478
+ "value": "Disabled state",
479
+ "href": "#disabled-state",
480
+ "depth": 3,
481
+ "numbering": [
482
+ 1,
483
+ 2,
484
+ 6
485
+ ],
486
+ "parent": "root"
487
+ },
488
+ {
489
+ "value": "Event handling",
490
+ "href": "#event-handling",
491
+ "depth": 3,
492
+ "numbering": [
493
+ 1,
494
+ 2,
495
+ 7
496
+ ],
497
+ "parent": "root"
498
+ },
499
+ {
500
+ "value": "Component requirements",
501
+ "href": "#component-requirements",
502
+ "depth": 2,
503
+ "numbering": [
504
+ 1,
505
+ 3
506
+ ],
507
+ "parent": "root"
508
+ },
509
+ {
510
+ "value": "Accessibility",
511
+ "href": "#accessibility",
512
+ "depth": 2,
513
+ "numbering": [
514
+ 1,
515
+ 4
516
+ ],
517
+ "parent": "root"
518
+ },
519
+ {
520
+ "value": "Keyboard navigation",
521
+ "href": "#keyboard-navigation",
522
+ "depth": 4,
523
+ "numbering": [
524
+ 1,
525
+ 4,
526
+ 1,
527
+ 1
528
+ ],
529
+ "parent": "root"
530
+ },
531
+ {
532
+ "value": "API reference",
533
+ "href": "#api-reference",
534
+ "depth": 2,
535
+ "numbering": [
536
+ 1,
537
+ 5
538
+ ],
539
+ "parent": "root"
540
+ },
541
+ {
542
+ "value": "Common patterns",
543
+ "href": "#common-patterns",
544
+ "depth": 2,
545
+ "numbering": [
546
+ 1,
547
+ 6
548
+ ],
549
+ "parent": "root"
550
+ },
551
+ {
552
+ "value": "Loading state",
553
+ "href": "#loading-state",
554
+ "depth": 3,
555
+ "numbering": [
556
+ 1,
557
+ 6,
558
+ 1
559
+ ],
560
+ "parent": "root"
561
+ },
562
+ {
563
+ "value": "Testing your implementation",
564
+ "href": "#testing-your-implementation",
565
+ "depth": 2,
566
+ "numbering": [
567
+ 1,
568
+ 7
569
+ ],
570
+ "parent": "root"
571
+ },
572
+ {
573
+ "value": "Basic Rendering Tests",
574
+ "href": "#basic-rendering-tests",
575
+ "depth": 3,
576
+ "numbering": [
577
+ 1,
578
+ 7,
579
+ 1
580
+ ],
581
+ "parent": "root"
582
+ },
583
+ {
584
+ "value": "Interaction Tests",
585
+ "href": "#interaction-tests",
586
+ "depth": 3,
587
+ "numbering": [
588
+ 1,
589
+ 7,
590
+ 2
591
+ ],
592
+ "parent": "root"
593
+ },
594
+ {
595
+ "value": "Keyboard Navigation Tests",
596
+ "href": "#keyboard-navigation-tests",
597
+ "depth": 3,
598
+ "numbering": [
599
+ 1,
600
+ 7,
601
+ 3
602
+ ],
603
+ "parent": "root"
604
+ },
605
+ {
606
+ "value": "State Tests",
607
+ "href": "#state-tests",
608
+ "depth": 3,
609
+ "numbering": [
610
+ 1,
611
+ 7,
612
+ 4
613
+ ],
614
+ "parent": "root"
615
+ },
616
+ {
617
+ "value": "Visual Variant Tests",
618
+ "href": "#visual-variant-tests",
619
+ "depth": 3,
620
+ "numbering": [
621
+ 1,
622
+ 7,
623
+ 5
624
+ ],
625
+ "parent": "root"
626
+ },
627
+ {
628
+ "value": "Resources",
629
+ "href": "#resources",
630
+ "depth": 2,
631
+ "numbering": [
632
+ 1,
633
+ 8
634
+ ],
635
+ "parent": "root"
636
+ }
637
+ ]
638
+ },
639
+ "guidelines": {
640
+ "mdx": "# Button Guidelines\n\nButtons are essential interactive elements that empower users to trigger actions\nand navigate within your product. They serve as clear calls to action, guiding\nusers through key flows and enabling them to interact with content in meaningful\nways. These guidelines ensure consistent styling and behavior for all buttons,\ncontributing to a cohesive and predictable user experience.\n\n## Writing guidelines\n\n- A good button label tells you exactly what will happen when you click it,\n making the whole experience more intuitive and enjoyable.\n- Use concise and clear action based language for all buttons.\n- Use sentence case, capitalize the first word and use lowercase for the rest.\n- Be aware that with localization/translation character count will add on\n average 20% more length.\n\n## Preferred words\n\n| **Text** | **Description** |\n| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Save** | Carries out pending changes, commits to saving the information. |\n| **Back** | This term typically implies a return to a previous state or location in a non-linear or less structured flow. It's often used for:<ul style={{listStyle: \"disc\", marginLeft: \"20px\"}}><li>Navigating browser history</li><li>Exiting a screen or section</li></ul> |\n| **Previous** | This term is more common in linear, sequential flows, such as: <ul style={{listStyle: \"disc\", marginLeft: \"20px\"}}><li>Stepping through a list of items</li><li>Moving between pages in a paginated view</li><li>Progressing through a multi-step process</li></ul> <br />Pair \"Previous\" with \"Next\" button language. |\n| **Add new (noun)** | Establishes a new object from scratch. Always followed by an object. For example \"add product\" \"add category\".<br/><br/>Can also be used in areas that establishes a new relationship. Example \"add products to a category\".<br/><br/>Do not use \"add new\" as it does not give full context. |\n| **Revert changes** | \"Revert\" stops an action without saving pending changes. When paired with a form it should return the information to the previously saved state. Never make Revert changes red, it is not a destructive action. |\n| **Cancel** | \"Cancel\" stops an action without saving pending changes. Never make Cancel red, it is not a destructive action. Cancel should be outline, ghost or link button. |\n| **Delete or Delete (X nouns)** | Deletes a data so a user can no longer retrieve it. This is different from Remove. |\n| **Remove** | Removes a relationship, but does not permanently delete data. |\n| **Expand/Collapse Show more/Show less** | Expands or collapses further details and information. No capitalization is needed for these placements. |\n\n## Avoid these words\n\n| **Text** | **Use this instead** |\n| ----------------------------- | -------------------------------------------------------------------------------- |\n| **New** | Be more specific about what the user is creating. |\n| **Continue** | Use \"Next\" instead of \"Continue\" instead to maintain consistency. |\n| **Create new (noun)** | Use \"Add (noun)\" instead of \"create\" in button language to maintain consistency. |\n| **OK, Sure, Fine, Yes, No** | Use words that explain the action. |\n| **Wow! Yes? DELETE NOW! No?** | Avoid full capitalization and punctuation. |\n\n## Usage\n\n**A primary filled button** highlights the most important action a user can\ntake. For example, it might be used to save changes, submit a form, or emphasize\na key action like adding a discount.\n\n**Secondary and tertiary** (primary color palette with outline and linked styling) buttons\nare used when there's already a primary action on the page. They're for less\nprominent actions, like canceling changes, supporting the primary action, going\nback in a process, or expanding/collapsing information.\n\n**Buttons with 'critical' color palette** are reserved for destructive actions, such as\ndeleting something or removing a connection.\n\n> [!TIP]\\\n> When to use\n\n- **Trigger an action:** Anything that happens (save, delete, submit, download,\n etc.).\n- **Control a process:** Start, stop, pause, resume, undo, redo.\n- **Confirm a choice:** \"Yes,\" \"Save changes,\" Confirm.\n- **Open something:** Modal, popover, dialog.\n- **Select an option:** Especially complex or visual choices.\n <br />\n\n> [!CAUTION]\\\n> When not to use\n\n- **Navigation:** Use links, not buttons, for page/section navigation.\n- **Too many:** Avoid button overload; group actions or use menus.\n- **Simple actions:** Icons suffice for basic actions (e.g., close, play/pause).\n- **Non-interactive:** Don't make non-clickable elements look like buttons.\n- **Accessibility:** Misusing buttons confuses assistive tech.\n- **Visual clutter:** Too many button styles dilute meaning.\n- **Progressive disclosure:** Reveal options gradually for complex tasks.\n- **Data display:** Use labels, not buttons, for showing info.\n- **Simpler controls:** Use checkboxes, radios, toggles when appropriate.\n- **Too much text:** Truncate text if translation is too long, but look for\n better solutions or different wording.\n\n## Icons in buttons\n\nIcons that are on the left are the best placement. Icons are used to lead the\nuser to the right action quickly by scanning. Ok ways to break this rule are\nwith drop downs and right pointing arrows.\n\n<br />\n\n> [!TIP]\\\n> **Do**\n>\n> - Use the correct and consistently patterned icon for the action that a user\n> will be selecting.\n> - Ok ways to break this rule are with drop downs and right pointing arrows.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" variant=\"solid\">\n <Icons.Undo />\n Revert\n </Button>\n <Button size=\"md\" variant=\"solid\">\n <Icons.FileUpload />\n Upload\n </Button>\n <Button size=\"md\" variant=\"solid\">\n <Icons.Add />\n Add product\n </Button>\n <Button size=\"md\" variant=\"outline\">\n <Icons.ArrowBack />\n Previous\n </Button>\n <Button size=\"md\" variant=\"solid\">\n Next\n <Icons.ArrowForward />\n </Button>\n </Stack>\n)\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Icons should represent the action the user will be taking.\n> - Don't use two icons to represent an action. One icon will do.\n> - Left icons are the default unless there is directional reason.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" variant=\"solid\">\n <Icons.Upload />\n Delete\n <Icons.Upload />\n </Button>\n <Button colorPalette=\"critical\" size=\"md\" variant=\"solid\">\n <Icons.Clear />\n Add discount\n <Icons.Clear />\n </Button>\n <Button size=\"md\" variant=\"solid\">\n Revert\n <Icons.Undo />\n </Button>\n </Stack>\n)\n```\n\n> [!TIP]\\\n> **Do**\n>\n> - Use right icons to build a drop down component with the Popover component.\n> - Icons are on the left unless there is a directional reason to use a right\n> icon placement.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\">\n <Stack>\n <Button size=\"md\" variant=\"outline\">\n Save changes\n <Icons.KeyboardArrowDown />\n </Button>\n <Card.Root elevation=\"elevated\" cardPadding=\"md\">\n <Card.Content>\n <div style={{fontSize: \"16px\", fontWeight: \"400\"}}>\n <p>Save</p>\n <p>Save and publish</p>\n <p>Save and open next</p>\n </div>\n </Card.Content>\n </Card.Root>\n </Stack>\n <Stack>\n <Button size=\"md\" variant=\"solid\">\n <Icons.FileUpload />\n Export categories\n <Icons.KeyboardArrowDown />\n </Button>\n <Card.Root elevation=\"elevated\" cardPadding=\"md\">\n <Card.Content>\n <div style={{fontSize: \"16px\", fontWeight: \"400\"}}>\n <p>Export as csv</p>\n <p>Download to drive</p>\n </div>\n </Card.Content>\n </Card.Root>\n </Stack>\n </Stack>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Dropdown icons should always be on the right side.\n> - Don't place action describing icons on the right if a drop down is wanted.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\">\n <Stack>\n {['2xs','xs','md'].map((size) => (\n <Stack key={size} direction=\"horizontal\">\n <Button size={size} colorPalette=\"positive\" variant=\"solid\" startIcon={<Icons.Check />}>\n <Icons.Check />\n Yes\n </Button>\n <Button size={size} colorPalette=\"critical\" variant=\"solid\" startIcon={<Icons.X />}>\n <Icons.Close />\n No\n </Button>\n <Button size={size} colorPalette=\"neutral\" variant=\"ghost\" endIcon={<Box animation=\"spin\" asChild><Icons.Loader/></Box>}>\n Maybe\n <Icons.HelpOutline />\n </Button>\n </Stack>\n ))}\n </Stack>\n <Stack>\n <Button size=\"md\" variant=\"solid\">\n <Icons.KeyboardArrowDown />\n Export categories\n <Icons.FileUpload />\n </Button>\n <Card.Root elevation=\"elevated\" cardPadding=\"md\">\n <Card.Content>\n <div style={{fontSize: \"16px\", fontWeight: \"400\"}}>\n <p>Export as csv</p>\n <p>Download to drive</p>\n </div>\n </Card.Content>\n </Card.Root>\n </Stack>\n </Stack>\n);\n```\n\n## Button groupings\n\nButton groups are UI elements that organize multiple buttons together, often\nvisually as a single unit. They serve to present users with a set of related\nchoices or actions in a compact and organized way.\n\n> [!TIP]\\\n> **Do**\n>\n> - This is the correct hierarchy of button groupings. From right to left,\n> Primary, Outlined, and Link button.\n\n```jsx live\n const App = () => (\n <Stack direction=\"horizontal\">\n <Button as=\"a\" size=\"md\" variant=\"link\">\n Cancel and close\n </Button>\n <Button size=\"md\" variant=\"outline\">\n <Icons.Undo />\n Revert\n </Button>\n <Button size=\"md\" variant=\"solid\">\n Save changes\n </Button>\n </Stack>\n)\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Avoid stacking actions.\n> - Don't use two buttons with the primary color palette in the same area.\n\n```jsx live\n const App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" colorPalette=\"primary\" variant=\"solid\">\n Save changes\n </Button>\n <Button size=\"md\" colorPalette=\"primary\" variant=\"solid\">\n <Icons.Undo />\n Revert\n </Button>\n <Button size=\"md\" colorPalette=\"primary\" variant=\"ghost\">\n Cancel and close\n </Button>\n </Stack>\n)\n```\n\n> [!TIP]\\\n> **Do**\n>\n> - Place the filled primary button to the right. This should represent the\n> action most likely taken by a user.\n> - Outlined secondary button to the left of the primary action.\n> - Icon is on the left of the button.\n\n```jsx live\n const App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" variant=\"outline\">\n <Icons.Undo />\n Revert\n </Button>\n <Button size=\"md\" variant=\"solid\">\n Save\n </Button>\n </Stack>\n)\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Do not place the filled primary button to the left of another option.\n> - Do not have two primary filled buttons near each other.\n> - Do not include punctuation in buttons.\n\n```jsx live\n const App = () => (\n <Stack direction=\"horizontal\">\n <Button size=\"md\" variant=\"solid\">\n Cancel!\n </Button>\n <Button size=\"md\" variant=\"solid\">\n Save.\n </Button>\n <Button as=\"a\" size=\"sm\" variant=\"link\">\n External link\n <Icons.Launch />\n </Button>\n </Stack>\n)\n```\n\n## Button links\n\nThese actions are likely seen when an action is optional to have more or less\ninformation shown.\n\n> [!TIP]\\\n> **Do**\n>\n> - Expand actions should be placed at the lower center or left hand side of the\n> element that will expand/collapse.\n> - Link button is using the correct size, 2x-small.\n\n```jsx live\n const App = () => (\n <>\n <div style={{\n width: \"300px\",\n height: \"40px\",\n backgroundColor: \"#f0f8ff\",\n border: \"1px dashed #60a5fa\",\n borderRadius: \"12px\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n position: \"relative\",\n }}>\n <span style={{\n fontSize: \"10px\",\n color: \"#3b82f6\",\n letterSpacing: \"1px\",\n }}>Trigger</span>\n </div>\n <Button as=\"a\" size=\"2xs\" variant=\"link\" marginLeft=\"220px\">\n <Icons.KeyboardArrowDown />\n expand\n </Button>\n</>\n)\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - The button is too large for this placement\n> - Expansion icons should be placed to the left side of the label to allow for\n> easier scanning by a user.\n\n```jsx live\n const App = () => (\n <>\n <div style={{\n width: \"300px\",\n height: \"40px\",\n backgroundColor: \"#f0f8ff\",\n border: \"1px dashed #60a5fa\",\n borderRadius: \"12px\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n position: \"relative\",\n }}>\n <span style={{\n fontSize: \"10px\",\n color: \"#3b82f6\",\n letterSpacing: \"1px\",\n }}>Trigger</span>\n </div>\n <Button as=\"a\" size=\"md\" variant=\"link\" marginLeft=\"200px\">\n expand\n <Icons.KeyboardArrowDown />\n </Button>\n</>\n)\n```\n",
641
+ "toc": [
642
+ {
643
+ "value": "Writing guidelines",
644
+ "href": "#writing-guidelines",
645
+ "depth": 2,
646
+ "numbering": [
647
+ 1,
648
+ 1
649
+ ],
650
+ "parent": "root"
651
+ },
652
+ {
653
+ "value": "Preferred words",
654
+ "href": "#preferred-words",
655
+ "depth": 2,
656
+ "numbering": [
657
+ 1,
658
+ 2
659
+ ],
660
+ "parent": "root"
661
+ },
662
+ {
663
+ "value": "Avoid these words",
664
+ "href": "#avoid-these-words",
665
+ "depth": 2,
666
+ "numbering": [
667
+ 1,
668
+ 3
669
+ ],
670
+ "parent": "root"
671
+ },
672
+ {
673
+ "value": "Usage",
674
+ "href": "#usage",
675
+ "depth": 2,
676
+ "numbering": [
677
+ 1,
678
+ 4
679
+ ],
680
+ "parent": "root"
681
+ },
682
+ {
683
+ "value": "Icons in buttons",
684
+ "href": "#icons-in-buttons",
685
+ "depth": 2,
686
+ "numbering": [
687
+ 1,
688
+ 5
689
+ ],
690
+ "parent": "root"
691
+ },
692
+ {
693
+ "value": "Button groupings",
694
+ "href": "#button-groupings",
695
+ "depth": 2,
696
+ "numbering": [
697
+ 1,
698
+ 6
699
+ ],
700
+ "parent": "root"
701
+ },
702
+ {
703
+ "value": "Button links",
704
+ "href": "#button-links",
705
+ "depth": 2,
706
+ "numbering": [
707
+ 1,
708
+ 7
709
+ ],
710
+ "parent": "root"
711
+ }
712
+ ]
713
+ }
714
+ }
715
+ }