@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.
- package/README.md +63 -14
- package/data/docs/route-manifest.json +10913 -0
- package/data/docs/routes/components-accessibility-visually-hidden.json +388 -0
- package/data/docs/routes/components-accessibility.json +34 -0
- package/data/docs/routes/components-buttons-button.json +715 -0
- package/data/docs/routes/components-buttons-icon-button.json +852 -0
- package/data/docs/routes/components-buttons-icon-toggle-button.json +594 -0
- package/data/docs/routes/components-buttons-split-button.json +670 -0
- package/data/docs/routes/components-buttons-toggle-button-group.json +722 -0
- package/data/docs/routes/components-buttons-toggle-button.json +689 -0
- package/data/docs/routes/components-buttons.json +36 -0
- package/data/docs/routes/components-data-display-badge.json +555 -0
- package/data/docs/routes/components-data-display-card.json +338 -0
- package/data/docs/routes/components-data-display-data-table.json +855 -0
- package/data/docs/routes/components-data-display-draggable-list.json +596 -0
- package/data/docs/routes/components-data-display-table.json +472 -0
- package/data/docs/routes/components-data-display-tag-group.json +535 -0
- package/data/docs/routes/components-data-display.json +34 -0
- package/data/docs/routes/components-feedback-alert.json +696 -0
- package/data/docs/routes/components-feedback-dialog.json +682 -0
- package/data/docs/routes/components-feedback-drawer.json +600 -0
- package/data/docs/routes/components-feedback-loading-spinner.json +415 -0
- package/data/docs/routes/components-feedback-progress-bar.json +661 -0
- package/data/docs/routes/components-feedback-toast.json +1040 -0
- package/data/docs/routes/components-feedback-tooltip.json +510 -0
- package/data/docs/routes/components-feedback.json +34 -0
- package/data/docs/routes/components-forms-field-errors.json +557 -0
- package/data/docs/routes/components-forms-form-field.json +848 -0
- package/data/docs/routes/components-forms-group.json +427 -0
- package/data/docs/routes/components-forms-localized-field.json +770 -0
- package/data/docs/routes/components-forms.json +37 -0
- package/data/docs/routes/components-inputs-calendar.json +611 -0
- package/data/docs/routes/components-inputs-checkbox.json +774 -0
- package/data/docs/routes/components-inputs-combo-box.json +761 -0
- package/data/docs/routes/components-inputs-date-input.json +628 -0
- package/data/docs/routes/components-inputs-date-picker.json +709 -0
- package/data/docs/routes/components-inputs-date-range-picker.json +599 -0
- package/data/docs/routes/components-inputs-money-input.json +721 -0
- package/data/docs/routes/components-inputs-multiline-text-input.json +611 -0
- package/data/docs/routes/components-inputs-number-input.json +647 -0
- package/data/docs/routes/components-inputs-password-input.json +576 -0
- package/data/docs/routes/components-inputs-radio-input.json +583 -0
- package/data/docs/routes/components-inputs-range-calendar.json +607 -0
- package/data/docs/routes/components-inputs-rich-text-input.json +599 -0
- package/data/docs/routes/components-inputs-scoped-search-input.json +570 -0
- package/data/docs/routes/components-inputs-search-input.json +588 -0
- package/data/docs/routes/components-inputs-select-input.json +960 -0
- package/data/docs/routes/components-inputs-switch.json +720 -0
- package/data/docs/routes/components-inputs-text-input.json +566 -0
- package/data/docs/routes/components-inputs-time-input.json +775 -0
- package/data/docs/routes/components-inputs.json +34 -0
- package/data/docs/routes/components-layout-box.json +501 -0
- package/data/docs/routes/components-layout-defaultpage.json +748 -0
- package/data/docs/routes/components-layout-flex.json +587 -0
- package/data/docs/routes/components-layout-grid.json +393 -0
- package/data/docs/routes/components-layout-modalpage.json +716 -0
- package/data/docs/routes/components-layout-pagecontent.json +673 -0
- package/data/docs/routes/components-layout-separator.json +461 -0
- package/data/docs/routes/components-layout-simple-grid.json +519 -0
- package/data/docs/routes/components-layout-spacer.json +573 -0
- package/data/docs/routes/components-layout-stack.json +481 -0
- package/data/docs/routes/components-layout.json +34 -0
- package/data/docs/routes/components-media-avatar.json +427 -0
- package/data/docs/routes/components-media-icon.json +663 -0
- package/data/docs/routes/components-media-image.json +511 -0
- package/data/docs/routes/components-media-inline-svg.json +586 -0
- package/data/docs/routes/components-media.json +34 -0
- package/data/docs/routes/components-navigation-accordion.json +643 -0
- package/data/docs/routes/components-navigation-collapsible-motion.json +628 -0
- package/data/docs/routes/components-navigation-link.json +554 -0
- package/data/docs/routes/components-navigation-menu.json +546 -0
- package/data/docs/routes/components-navigation-pagination.json +502 -0
- package/data/docs/routes/components-navigation-steps.json +629 -0
- package/data/docs/routes/components-navigation-tabnav.json +546 -0
- package/data/docs/routes/components-navigation-tabs.json +635 -0
- package/data/docs/routes/components-navigation-toolbar.json +549 -0
- package/data/docs/routes/components-navigation.json +34 -0
- package/data/docs/routes/components-typography-code.json +39 -0
- package/data/docs/routes/components-typography-heading.json +402 -0
- package/data/docs/routes/components-typography-kbd.json +399 -0
- package/data/docs/routes/components-typography-list.json +593 -0
- package/data/docs/routes/components-typography-text.json +444 -0
- package/data/docs/routes/components-typography.json +34 -0
- package/data/docs/routes/components-utilities-nimbus-i18n-provider.json +295 -0
- package/data/docs/routes/components-utilities-nimbus-provider.json +663 -0
- package/data/docs/routes/components-utilities.json +34 -0
- package/data/docs/routes/components.json +33 -0
- package/data/docs/routes/home-contribute-adrs-adr0001-consumer-component-apis.json +314 -0
- package/data/docs/routes/home-contribute-adrs-adr0002-compound-component-extraction.json +160 -0
- package/data/docs/routes/home-contribute-adrs-adr0003-component-lifecycle-states.json +460 -0
- package/data/docs/routes/home-contribute-adrs.json +205 -0
- package/data/docs/routes/home-contribute-development-setup.json +213 -0
- package/data/docs/routes/home-contribute-stats.json +36 -0
- package/data/docs/routes/home-contribute.json +36 -0
- package/data/docs/routes/home-design-tokens-aspect-ratios.json +36 -0
- package/data/docs/routes/home-design-tokens-borders.json +35 -0
- package/data/docs/routes/home-design-tokens-colors.json +157 -0
- package/data/docs/routes/home-design-tokens-other-animations.json +119 -0
- package/data/docs/routes/home-design-tokens-other-blurs.json +36 -0
- package/data/docs/routes/home-design-tokens-other-breakpoints.json +61 -0
- package/data/docs/routes/home-design-tokens-other-cursors.json +36 -0
- package/data/docs/routes/home-design-tokens-other-z-indices.json +39 -0
- package/data/docs/routes/home-design-tokens-other.json +35 -0
- package/data/docs/routes/home-design-tokens-radii.json +59 -0
- package/data/docs/routes/home-design-tokens-shadows.json +57 -0
- package/data/docs/routes/home-design-tokens-sizes.json +137 -0
- package/data/docs/routes/home-design-tokens-spacing.json +36 -0
- package/data/docs/routes/home-design-tokens-typography.json +184 -0
- package/data/docs/routes/home-design-tokens.json +34 -0
- package/data/docs/routes/home-getting-started-core-concepts.json +301 -0
- package/data/docs/routes/home-getting-started-installation.json +621 -0
- package/data/docs/routes/home-getting-started-mcp-server-overview.json +139 -0
- package/data/docs/routes/home-getting-started-mcp-server-setup.json +316 -0
- package/data/docs/routes/home-getting-started-release-process.json +294 -0
- package/data/docs/routes/home-getting-started-testing-setup.json +296 -0
- package/data/docs/routes/home-playground-markdown.json +638 -0
- package/data/docs/routes/home-playground-toc.json +169 -0
- package/data/docs/routes/home-playground.json +34 -0
- package/data/docs/routes/home-style-props-background.json +236 -0
- package/data/docs/routes/home-style-props-border.json +310 -0
- package/data/docs/routes/home-style-props-display.json +120 -0
- package/data/docs/routes/home-style-props-effects.json +116 -0
- package/data/docs/routes/home-style-props-filters.json +396 -0
- package/data/docs/routes/home-style-props-flex-and-grid.json +496 -0
- package/data/docs/routes/home-style-props-interactivity.json +356 -0
- package/data/docs/routes/home-style-props-layout.json +422 -0
- package/data/docs/routes/home-style-props-list.json +116 -0
- package/data/docs/routes/home-style-props-sizing.json +244 -0
- package/data/docs/routes/home-style-props-spacing.json +228 -0
- package/data/docs/routes/home-style-props-svg.json +96 -0
- package/data/docs/routes/home-style-props-tables.json +116 -0
- package/data/docs/routes/home-style-props-transforms.json +216 -0
- package/data/docs/routes/home-style-props-transitions.json +216 -0
- package/data/docs/routes/home-style-props-typography.json +536 -0
- package/data/docs/routes/home-style-props.json +33 -0
- package/data/docs/routes/home.json +32 -0
- package/data/docs/routes/hooks-usecopytoclipboard.json +76 -0
- package/data/docs/routes/hooks-usehotkeys.json +117 -0
- package/data/docs/routes/hooks.json +33 -0
- package/data/docs/routes/icons.json +32 -0
- package/data/docs/routes/patterns-fields-date-range-picker-field.json +393 -0
- package/data/docs/routes/patterns-fields-money-input-field.json +415 -0
- package/data/docs/routes/patterns-fields-multiline-text-input-field.json +404 -0
- package/data/docs/routes/patterns-fields-number-input-field.json +470 -0
- package/data/docs/routes/patterns-fields-password-input-field.json +319 -0
- package/data/docs/routes/patterns-fields-search-input-field.json +382 -0
- package/data/docs/routes/patterns-fields-text-input-field.json +404 -0
- package/data/docs/routes/patterns-fields.json +78 -0
- package/data/docs/routes/patterns.json +34 -0
- package/data/docs/search-index.json +1 -0
- package/data/docs/types/Accordion.json +12 -0
- package/data/docs/types/AccordionContent.json +286 -0
- package/data/docs/types/AccordionHeader.json +891 -0
- package/data/docs/types/AccordionHeaderRightContent.json +27 -0
- package/data/docs/types/AccordionItem.json +242 -0
- package/data/docs/types/AccordionRoot.json +162 -0
- package/data/docs/types/Alert.json +12 -0
- package/data/docs/types/AlertActions.json +11 -0
- package/data/docs/types/AlertDescription.json +118 -0
- package/data/docs/types/AlertDismissButton.json +937 -0
- package/data/docs/types/AlertRoot.json +42 -0
- package/data/docs/types/AlertTitle.json +118 -0
- package/data/docs/types/Avatar.json +125 -0
- package/data/docs/types/Badge.json +64 -0
- package/data/docs/types/Body.json +67 -0
- package/data/docs/types/Box.json +85 -0
- package/data/docs/types/Button.json +1015 -0
- package/data/docs/types/Calendar.json +565 -0
- package/data/docs/types/Caption.json +67 -0
- package/data/docs/types/Card.json +12 -0
- package/data/docs/types/CardContent.json +27 -0
- package/data/docs/types/CardHeader.json +27 -0
- package/data/docs/types/CardRoot.json +106 -0
- package/data/docs/types/Cell.json +227 -0
- package/data/docs/types/Checkbox.json +897 -0
- package/data/docs/types/Code.json +112 -0
- package/data/docs/types/CollapsibleMotionContent.json +35 -0
- package/data/docs/types/CollapsibleMotionRoot.json +99 -0
- package/data/docs/types/CollapsibleMotionTrigger.json +71 -0
- package/data/docs/types/Column.json +101 -0
- package/data/docs/types/ColumnGroup.json +101 -0
- package/data/docs/types/ColumnHeader.json +193 -0
- package/data/docs/types/ComboBoxListBox.json +751 -0
- package/data/docs/types/ComboBoxOption.json +672 -0
- package/data/docs/types/ComboBoxPopover.json +786 -0
- package/data/docs/types/ComboBoxRoot.json +747 -0
- package/data/docs/types/ComboBoxSection.json +277 -0
- package/data/docs/types/ComboBoxTrigger.json +70 -0
- package/data/docs/types/Content.json +33 -0
- package/data/docs/types/DataTable.json +596 -0
- package/data/docs/types/DataTableBody.json +223 -0
- package/data/docs/types/DataTableFooter.json +27 -0
- package/data/docs/types/DataTableHeader.json +269 -0
- package/data/docs/types/DataTableManager.json +11 -0
- package/data/docs/types/DataTableRoot.json +590 -0
- package/data/docs/types/DataTableTable.json +271 -0
- package/data/docs/types/DateInput.json +792 -0
- package/data/docs/types/DatePicker.json +700 -0
- package/data/docs/types/DateRangePicker.json +936 -0
- package/data/docs/types/DateRangePickerField.json +1047 -0
- package/data/docs/types/DefaultPage.json +12 -0
- package/data/docs/types/DefaultPageActions.json +27 -0
- package/data/docs/types/DefaultPageBackLink.json +213 -0
- package/data/docs/types/DefaultPageContent.json +27 -0
- package/data/docs/types/DefaultPageFooter.json +27 -0
- package/data/docs/types/DefaultPageHeader.json +27 -0
- package/data/docs/types/DefaultPageRoot.json +106 -0
- package/data/docs/types/DefaultPageSubtitle.json +27 -0
- package/data/docs/types/DefaultPageTabNav.json +28 -0
- package/data/docs/types/DefaultPageTitle.json +27 -0
- package/data/docs/types/DialogBody.json +27 -0
- package/data/docs/types/DialogCloseTrigger.json +939 -0
- package/data/docs/types/DialogContent.json +27 -0
- package/data/docs/types/DialogFooter.json +27 -0
- package/data/docs/types/DialogHeader.json +27 -0
- package/data/docs/types/DialogRoot.json +138 -0
- package/data/docs/types/DialogTitle.json +27 -0
- package/data/docs/types/DialogTrigger.json +80 -0
- package/data/docs/types/DraggableList.json +12 -0
- package/data/docs/types/DraggableListField.json +894 -0
- package/data/docs/types/DraggableListItem.json +574 -0
- package/data/docs/types/DraggableListRoot.json +745 -0
- package/data/docs/types/Drawer.json +12 -0
- package/data/docs/types/DrawerBody.json +27 -0
- package/data/docs/types/DrawerCloseTrigger.json +939 -0
- package/data/docs/types/DrawerContent.json +27 -0
- package/data/docs/types/DrawerFooter.json +27 -0
- package/data/docs/types/DrawerHeader.json +27 -0
- package/data/docs/types/DrawerRoot.json +142 -0
- package/data/docs/types/DrawerTitle.json +27 -0
- package/data/docs/types/DrawerTrigger.json +80 -0
- package/data/docs/types/FieldErrors.getBuiltInMessage.json +11 -0
- package/data/docs/types/FieldErrors.getCustomMessage.json +9 -0
- package/data/docs/types/FieldErrors.json +109 -0
- package/data/docs/types/Flex.json +238 -0
- package/data/docs/types/Footer.json +67 -0
- package/data/docs/types/FormFieldDescription.json +11 -0
- package/data/docs/types/FormFieldError.json +11 -0
- package/data/docs/types/FormFieldInfoBox.json +27 -0
- package/data/docs/types/FormFieldInput.json +11 -0
- package/data/docs/types/FormFieldLabel.json +11 -0
- package/data/docs/types/FormFieldRoot.json +148 -0
- package/data/docs/types/Grid.json +253 -0
- package/data/docs/types/GridProps.json +11 -0
- package/data/docs/types/Group.json +143 -0
- package/data/docs/types/Header.json +67 -0
- package/data/docs/types/Heading.json +109 -0
- package/data/docs/types/Icon.json +112 -0
- package/data/docs/types/IconButton.json +1019 -0
- package/data/docs/types/IconToggleButton.json +787 -0
- package/data/docs/types/Image.json +373 -0
- package/data/docs/types/Indicator.json +67 -0
- package/data/docs/types/InlineSvg.json +98 -0
- package/data/docs/types/Item.json +67 -0
- package/data/docs/types/Kbd.json +118 -0
- package/data/docs/types/Link.json +380 -0
- package/data/docs/types/List.json +12 -0
- package/data/docs/types/ListIndicator.json +70 -0
- package/data/docs/types/ListItem.json +70 -0
- package/data/docs/types/ListRoot.json +124 -0
- package/data/docs/types/LoadingSpinner.json +87 -0
- package/data/docs/types/LocalizedField.json +460 -0
- package/data/docs/types/LocalizedStringFormatter.json +9 -0
- package/data/docs/types/MakeElementFocusable.json +196 -0
- package/data/docs/types/MenuContent.json +111 -0
- package/data/docs/types/MenuItem.json +671 -0
- package/data/docs/types/MenuRoot.json +670 -0
- package/data/docs/types/MenuSection.json +364 -0
- package/data/docs/types/MenuSubmenu.json +111 -0
- package/data/docs/types/MenuSubmenuTrigger.json +67 -0
- package/data/docs/types/MenuTrigger.json +906 -0
- package/data/docs/types/ModalPage.json +12 -0
- package/data/docs/types/ModalPageActions.json +27 -0
- package/data/docs/types/ModalPageContent.json +27 -0
- package/data/docs/types/ModalPageFooter.json +27 -0
- package/data/docs/types/ModalPageHeader.json +27 -0
- package/data/docs/types/ModalPageRoot.json +87 -0
- package/data/docs/types/ModalPageSubtitle.json +27 -0
- package/data/docs/types/ModalPageTabNav.json +28 -0
- package/data/docs/types/ModalPageTitle.json +27 -0
- package/data/docs/types/ModalPageTopBar.json +57 -0
- package/data/docs/types/MoneyInput.isEmpty.json +40 -0
- package/data/docs/types/MoneyInput.json +282 -0
- package/data/docs/types/MoneyInputField.json +379 -0
- package/data/docs/types/MoneyInputFieldProps.json +9 -0
- package/data/docs/types/MultilineTextInput.json +1194 -0
- package/data/docs/types/MultilineTextInputField.json +1269 -0
- package/data/docs/types/MultilineTextInputFieldProps.json +9 -0
- package/data/docs/types/NimbusI18nProvider.json +42 -0
- package/data/docs/types/NimbusI18nProviderProps.json +9 -0
- package/data/docs/types/NimbusProvider.json +270 -0
- package/data/docs/types/NumberInput.json +952 -0
- package/data/docs/types/NumberInputField.json +1004 -0
- package/data/docs/types/NumberInputFieldProps.json +9 -0
- package/data/docs/types/PageContent.json +11 -0
- package/data/docs/types/PageContentColumn.json +99 -0
- package/data/docs/types/PageContentRoot.json +114 -0
- package/data/docs/types/Pagination.json +159 -0
- package/data/docs/types/PasswordInput.json +1120 -0
- package/data/docs/types/PasswordInputField.json +1216 -0
- package/data/docs/types/PasswordInputFieldProps.json +9 -0
- package/data/docs/types/ProgressBar.json +280 -0
- package/data/docs/types/RadioInputOption.json +550 -0
- package/data/docs/types/RadioInputRoot.json +514 -0
- package/data/docs/types/RangeCalendar.json +618 -0
- package/data/docs/types/RichTextInput.json +134 -0
- package/data/docs/types/Root.json +122 -0
- package/data/docs/types/Row.json +67 -0
- package/data/docs/types/ScopedSearchInput.isEmpty.json +40 -0
- package/data/docs/types/ScopedSearchInput.json +253 -0
- package/data/docs/types/ScrollArea.json +82 -0
- package/data/docs/types/SearchInput.json +1165 -0
- package/data/docs/types/SearchInputField.json +1240 -0
- package/data/docs/types/Select.json +12 -0
- package/data/docs/types/SelectOption.json +572 -0
- package/data/docs/types/SelectOptionGroup.json +215 -0
- package/data/docs/types/SelectOptions.json +693 -0
- package/data/docs/types/SelectRoot.json +926 -0
- package/data/docs/types/Separator.json +65 -0
- package/data/docs/types/SimpleGrid.json +291 -0
- package/data/docs/types/Spacer.json +27 -0
- package/data/docs/types/SpacerProps.json +9 -0
- package/data/docs/types/SplitButton.json +203 -0
- package/data/docs/types/Stack.json +144 -0
- package/data/docs/types/Steps.json +12 -0
- package/data/docs/types/StepsChangeDetails.json +9 -0
- package/data/docs/types/StepsCompletedContent.json +28 -0
- package/data/docs/types/StepsCompletedContentProps.json +9 -0
- package/data/docs/types/StepsContent.json +43 -0
- package/data/docs/types/StepsContentProps.json +9 -0
- package/data/docs/types/StepsDescription.json +28 -0
- package/data/docs/types/StepsDescriptionProps.json +9 -0
- package/data/docs/types/StepsIndicator.json +28 -0
- package/data/docs/types/StepsIndicatorProps.json +9 -0
- package/data/docs/types/StepsItem.json +43 -0
- package/data/docs/types/StepsItemProps.json +9 -0
- package/data/docs/types/StepsList.json +28 -0
- package/data/docs/types/StepsListProps.json +9 -0
- package/data/docs/types/StepsNextTrigger.json +62 -0
- package/data/docs/types/StepsNextTriggerProps.json +9 -0
- package/data/docs/types/StepsNumber.json +28 -0
- package/data/docs/types/StepsNumberProps.json +9 -0
- package/data/docs/types/StepsPrevTrigger.json +62 -0
- package/data/docs/types/StepsPrevTriggerProps.json +9 -0
- package/data/docs/types/StepsRoot.json +183 -0
- package/data/docs/types/StepsRootProps.json +11 -0
- package/data/docs/types/StepsSeparator.json +28 -0
- package/data/docs/types/StepsSeparatorProps.json +9 -0
- package/data/docs/types/StepsStatus.json +57 -0
- package/data/docs/types/StepsStatusProps.json +9 -0
- package/data/docs/types/StepsTitle.json +28 -0
- package/data/docs/types/StepsTitleProps.json +9 -0
- package/data/docs/types/StepsTrigger.json +47 -0
- package/data/docs/types/StepsTriggerProps.json +9 -0
- package/data/docs/types/Switch.json +371 -0
- package/data/docs/types/TabListProps.json +9 -0
- package/data/docs/types/TabNav.json +12 -0
- package/data/docs/types/TabNavItem.json +300 -0
- package/data/docs/types/TabNavItemProps.json +9 -0
- package/data/docs/types/TabNavProps.json +9 -0
- package/data/docs/types/TabNavRoot.json +80 -0
- package/data/docs/types/TabPanelProps.json +9 -0
- package/data/docs/types/TabPanelsProps.json +9 -0
- package/data/docs/types/TabProps.json +9 -0
- package/data/docs/types/Table.json +9 -0
- package/data/docs/types/TableBody.json +67 -0
- package/data/docs/types/TableBodyProps.json +9 -0
- package/data/docs/types/TableCaption.json +67 -0
- package/data/docs/types/TableCaptionProps.json +9 -0
- package/data/docs/types/TableCell.json +227 -0
- package/data/docs/types/TableCellProps.json +9 -0
- package/data/docs/types/TableColumn.json +101 -0
- package/data/docs/types/TableColumnGroup.json +101 -0
- package/data/docs/types/TableColumnGroupProps.json +9 -0
- package/data/docs/types/TableColumnHeader.json +193 -0
- package/data/docs/types/TableColumnHeaderProps.json +9 -0
- package/data/docs/types/TableColumnProps.json +9 -0
- package/data/docs/types/TableFooter.json +67 -0
- package/data/docs/types/TableFooterProps.json +9 -0
- package/data/docs/types/TableHeader.json +67 -0
- package/data/docs/types/TableHeaderProps.json +9 -0
- package/data/docs/types/TableRoot.json +365 -0
- package/data/docs/types/TableRootProps.json +12 -0
- package/data/docs/types/TableRow.json +67 -0
- package/data/docs/types/TableRowProps.json +9 -0
- package/data/docs/types/TableScrollArea.json +82 -0
- package/data/docs/types/TableScrollAreaProps.json +9 -0
- package/data/docs/types/Tabs.json +12 -0
- package/data/docs/types/TabsList.json +110 -0
- package/data/docs/types/TabsPanel.json +112 -0
- package/data/docs/types/TabsPanels.json +108 -0
- package/data/docs/types/TabsRoot.json +211 -0
- package/data/docs/types/TabsTab.json +174 -0
- package/data/docs/types/TagGroup.json +12 -0
- package/data/docs/types/TagGroupRoot.json +306 -0
- package/data/docs/types/TagGroupTag.json +595 -0
- package/data/docs/types/TagGroupTagList.json +166 -0
- package/data/docs/types/Text.json +119 -0
- package/data/docs/types/TextInput.json +1156 -0
- package/data/docs/types/TextInputField.json +1263 -0
- package/data/docs/types/TimeInput.json +752 -0
- package/data/docs/types/ToastAction.json +9 -0
- package/data/docs/types/ToastManagerApi.json +9 -0
- package/data/docs/types/ToastOptions.json +9 -0
- package/data/docs/types/ToastOutlet.json +12 -0
- package/data/docs/types/ToastPlacement.json +9 -0
- package/data/docs/types/ToastPromiseOptions.json +9 -0
- package/data/docs/types/ToastType.json +9 -0
- package/data/docs/types/ToastVariant.json +9 -0
- package/data/docs/types/ToggleButton.json +789 -0
- package/data/docs/types/ToggleButtonGroup.json +9 -0
- package/data/docs/types/ToggleButtonGroupButton.json +331 -0
- package/data/docs/types/ToggleButtonGroupRoot.json +269 -0
- package/data/docs/types/Toolbar.json +176 -0
- package/data/docs/types/Tooltip.json +12 -0
- package/data/docs/types/TooltipContent.json +372 -0
- package/data/docs/types/TooltipRoot.json +179 -0
- package/data/docs/types/Trigger.json +69 -0
- package/data/docs/types/VisuallyHidden.json +93 -0
- package/data/docs/types/__object.json +12 -0
- package/data/docs/types/filters.json +11 -0
- package/data/docs/types/manifest.json +278 -0
- package/data/docs/types/toast.json +234 -0
- package/data/docs/types/useColorMode.json +13 -0
- package/data/docs/types/useColorModeValue.json +13 -0
- package/data/docs/types/useColorScheme.json +12 -0
- package/data/docs/types/useLocalizedStringFormatter.json +14 -0
- package/data/icons.json +21940 -0
- package/data/tokens.json +40061 -0
- package/dist/index.js +2516 -17
- package/package.json +25 -6
- package/dist/data-loader.d.ts +0 -102
- package/dist/data-loader.js +0 -104
- package/dist/index.d.ts +0 -13
- package/dist/server.d.ts +0 -9
- package/dist/server.js +0 -22
- package/dist/server.spec.d.ts +0 -1
- package/dist/server.spec.js +0 -69
- package/dist/tools/list-components.d.ts +0 -9
- package/dist/tools/list-components.js +0 -42
- package/dist/types.d.ts +0 -28
- package/dist/types.js +0 -4
- package/src/data-loader.ts +0 -226
- package/src/index.ts +0 -29
- package/src/server.spec.ts +0 -86
- package/src/server.ts +0 -28
- package/src/tools/list-components.ts +0 -49
- package/src/types.ts +0 -31
- package/tsconfig.json +0 -14
- package/vitest.config.ts +0 -9
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Toolbar",
|
|
4
|
+
"title": "Toolbar",
|
|
5
|
+
"exportName": "Toolbar",
|
|
6
|
+
"description": "Toolbars organize related actions and controls in a compact bar for easy access. They provide consistent placement for common or contextual tasks within an application.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/toolbar/toolbar.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Navigation",
|
|
13
|
+
"Toolbar"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/navigation/toolbar",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"toolbar",
|
|
19
|
+
"actions",
|
|
20
|
+
"controls"
|
|
21
|
+
],
|
|
22
|
+
"toc": [
|
|
23
|
+
{
|
|
24
|
+
"value": "Overview",
|
|
25
|
+
"href": "#overview",
|
|
26
|
+
"depth": 2,
|
|
27
|
+
"numbering": [
|
|
28
|
+
1,
|
|
29
|
+
1
|
|
30
|
+
],
|
|
31
|
+
"parent": "root"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"value": "Resources",
|
|
35
|
+
"href": "#resources",
|
|
36
|
+
"depth": 3,
|
|
37
|
+
"numbering": [
|
|
38
|
+
1,
|
|
39
|
+
1,
|
|
40
|
+
1
|
|
41
|
+
],
|
|
42
|
+
"parent": "root"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"value": "Variables",
|
|
46
|
+
"href": "#variables",
|
|
47
|
+
"depth": 2,
|
|
48
|
+
"numbering": [
|
|
49
|
+
1,
|
|
50
|
+
2
|
|
51
|
+
],
|
|
52
|
+
"parent": "root"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "Visual options",
|
|
56
|
+
"href": "#visual-options",
|
|
57
|
+
"depth": 3,
|
|
58
|
+
"numbering": [
|
|
59
|
+
1,
|
|
60
|
+
2,
|
|
61
|
+
1
|
|
62
|
+
],
|
|
63
|
+
"parent": "root"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "Horizontal",
|
|
67
|
+
"href": "#horizontal",
|
|
68
|
+
"depth": 4,
|
|
69
|
+
"numbering": [
|
|
70
|
+
1,
|
|
71
|
+
2,
|
|
72
|
+
1,
|
|
73
|
+
1
|
|
74
|
+
],
|
|
75
|
+
"parent": "root"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"value": "Vertical",
|
|
79
|
+
"href": "#vertical",
|
|
80
|
+
"depth": 4,
|
|
81
|
+
"numbering": [
|
|
82
|
+
1,
|
|
83
|
+
2,
|
|
84
|
+
1,
|
|
85
|
+
2
|
|
86
|
+
],
|
|
87
|
+
"parent": "root"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"value": "Plain and outline",
|
|
91
|
+
"href": "#plain-and-outline",
|
|
92
|
+
"depth": 4,
|
|
93
|
+
"numbering": [
|
|
94
|
+
1,
|
|
95
|
+
2,
|
|
96
|
+
1,
|
|
97
|
+
3
|
|
98
|
+
],
|
|
99
|
+
"parent": "root"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"value": "Groups",
|
|
103
|
+
"href": "#groups",
|
|
104
|
+
"depth": 3,
|
|
105
|
+
"numbering": [
|
|
106
|
+
1,
|
|
107
|
+
2,
|
|
108
|
+
2
|
|
109
|
+
],
|
|
110
|
+
"parent": "root"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"figmaLink": "https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=5733-23105&m=dev",
|
|
114
|
+
"layout": "app-frame",
|
|
115
|
+
"tabs": [
|
|
116
|
+
{
|
|
117
|
+
"key": "overview",
|
|
118
|
+
"title": "Overview",
|
|
119
|
+
"order": 0
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"key": "guidelines",
|
|
123
|
+
"title": "Guidelines",
|
|
124
|
+
"order": 2
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"key": "dev",
|
|
128
|
+
"title": "Implementation",
|
|
129
|
+
"order": 3
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"key": "a11y",
|
|
133
|
+
"title": "Accessibility",
|
|
134
|
+
"order": 4
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"mdx": "\n## Overview\n\nA toolbar is a handy container that organizes a group of related buttons and\ntools, using both horizontal and vertical layouts to fit the screen;\nessentially, it gives users quick access to the most common actions they need\nright now.\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=5733-23105&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Visual options\n\n#### Horizontal\n\nMost commonly used, horizontal toolbars should sit above the content meant to be\naltered.\n\n```jsx live\nconst App = () => (\n <Toolbar orientation=\"horizontal\">\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListBulleted />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListNumbered />\n </IconButton>\n </Group>\n </Toolbar>\n)\n```\n\n#### Vertical\n\nVertical toolbars are less common, but in the right interface it can be more\nhelpful than a horizontal placement.\n\n```jsx live\nconst App = () => (\n <Toolbar orientation=\"vertical\">\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Toolbar>\n)\n```\n\n#### Plain and outline\n\nTwo versions are available, a plain version that has a slight shadow to lift,\nand an outlined version that has more contrast from elements around it. The\nplain version without an outline is most common.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"600\" alignItems=\"center\">\n <Toolbar variant=\"plain\" size=\"xs\">\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Toolbar>\n\n <Toolbar variant=\"outline\" size=\"xs\">\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Toolbar>\n </Stack>\n)\n```\n\n### Groups\n\nGrouping similar tools is a common best practice within all toolbars. Please\ncombine similar tools in groups to make it easier for users to make choices\nquickly. If there are a lot of tools within a group, fold them under a menu\nbutton and leave 2-3 out that are the most popular choices.\n\n```jsx live\nconst App = () => (\n <Toolbar size=\"xs\">\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListBulleted />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListNumbered />\n </IconButton>\n </Group>\n </Toolbar>\n)\n```\n",
|
|
139
|
+
"views": {
|
|
140
|
+
"overview": {
|
|
141
|
+
"mdx": "\n## Overview\n\nA toolbar is a handy container that organizes a group of related buttons and\ntools, using both horizontal and vertical layouts to fit the screen;\nessentially, it gives users quick access to the most common actions they need\nright now.\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=5733-23105&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Visual options\n\n#### Horizontal\n\nMost commonly used, horizontal toolbars should sit above the content meant to be\naltered.\n\n```jsx live\nconst App = () => (\n <Toolbar orientation=\"horizontal\">\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListBulleted />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListNumbered />\n </IconButton>\n </Group>\n </Toolbar>\n)\n```\n\n#### Vertical\n\nVertical toolbars are less common, but in the right interface it can be more\nhelpful than a horizontal placement.\n\n```jsx live\nconst App = () => (\n <Toolbar orientation=\"vertical\">\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Toolbar>\n)\n```\n\n#### Plain and outline\n\nTwo versions are available, a plain version that has a slight shadow to lift,\nand an outlined version that has more contrast from elements around it. The\nplain version without an outline is most common.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"600\" alignItems=\"center\">\n <Toolbar variant=\"plain\" size=\"xs\">\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Toolbar>\n\n <Toolbar variant=\"outline\" size=\"xs\">\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Toolbar>\n </Stack>\n)\n```\n\n### Groups\n\nGrouping similar tools is a common best practice within all toolbars. Please\ncombine similar tools in groups to make it easier for users to make choices\nquickly. If there are a lot of tools within a group, fold them under a menu\nbutton and leave 2-3 out that are the most popular choices.\n\n```jsx live\nconst App = () => (\n <Toolbar size=\"xs\">\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListBulleted />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListNumbered />\n </IconButton>\n </Group>\n </Toolbar>\n)\n```\n",
|
|
142
|
+
"toc": [
|
|
143
|
+
{
|
|
144
|
+
"value": "Overview",
|
|
145
|
+
"href": "#overview",
|
|
146
|
+
"depth": 2,
|
|
147
|
+
"numbering": [
|
|
148
|
+
1,
|
|
149
|
+
1
|
|
150
|
+
],
|
|
151
|
+
"parent": "root"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"value": "Resources",
|
|
155
|
+
"href": "#resources",
|
|
156
|
+
"depth": 3,
|
|
157
|
+
"numbering": [
|
|
158
|
+
1,
|
|
159
|
+
1,
|
|
160
|
+
1
|
|
161
|
+
],
|
|
162
|
+
"parent": "root"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"value": "Variables",
|
|
166
|
+
"href": "#variables",
|
|
167
|
+
"depth": 2,
|
|
168
|
+
"numbering": [
|
|
169
|
+
1,
|
|
170
|
+
2
|
|
171
|
+
],
|
|
172
|
+
"parent": "root"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"value": "Visual options",
|
|
176
|
+
"href": "#visual-options",
|
|
177
|
+
"depth": 3,
|
|
178
|
+
"numbering": [
|
|
179
|
+
1,
|
|
180
|
+
2,
|
|
181
|
+
1
|
|
182
|
+
],
|
|
183
|
+
"parent": "root"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"value": "Horizontal",
|
|
187
|
+
"href": "#horizontal",
|
|
188
|
+
"depth": 4,
|
|
189
|
+
"numbering": [
|
|
190
|
+
1,
|
|
191
|
+
2,
|
|
192
|
+
1,
|
|
193
|
+
1
|
|
194
|
+
],
|
|
195
|
+
"parent": "root"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"value": "Vertical",
|
|
199
|
+
"href": "#vertical",
|
|
200
|
+
"depth": 4,
|
|
201
|
+
"numbering": [
|
|
202
|
+
1,
|
|
203
|
+
2,
|
|
204
|
+
1,
|
|
205
|
+
2
|
|
206
|
+
],
|
|
207
|
+
"parent": "root"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"value": "Plain and outline",
|
|
211
|
+
"href": "#plain-and-outline",
|
|
212
|
+
"depth": 4,
|
|
213
|
+
"numbering": [
|
|
214
|
+
1,
|
|
215
|
+
2,
|
|
216
|
+
1,
|
|
217
|
+
3
|
|
218
|
+
],
|
|
219
|
+
"parent": "root"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"value": "Groups",
|
|
223
|
+
"href": "#groups",
|
|
224
|
+
"depth": 3,
|
|
225
|
+
"numbering": [
|
|
226
|
+
1,
|
|
227
|
+
2,
|
|
228
|
+
2
|
|
229
|
+
],
|
|
230
|
+
"parent": "root"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"a11y": {
|
|
235
|
+
"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 <Toolbar orientation=\"horizontal\">\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatBold />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatItalic />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatUnderlined />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.MoreHoriz />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListBulleted />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\">\n <Icons.FormatListNumbered />\n </IconButton>\n </Group>\n </Toolbar>\n)\n```\n\n### Accessibility standards\n\n- **Keyboard Navigation:** Ensure all interactive elements within the toolbar\n are navigable using the tab key in a logical order, following the order of\n items.\n- **ARIA Roles:** Apply the ARIA role toolbar to the container element.\n- **Labeling:** Provide descriptive, concise aria-labels for the toolbar\n container and for all icon buttons to ensure screen reader users understand\n the component's purpose and the action it performs.\n- **Provide clear status:**\n - Use the disabled state for actions that are temporarily unavailable. Do not\n hide actions that are simply disabled, as this can cause shifting layouts\n and confuse users.\n - Clearly communicate the reason an action is disabled via tooltips or other\n contextual help.\n",
|
|
236
|
+
"toc": [
|
|
237
|
+
{
|
|
238
|
+
"value": "Accessibility",
|
|
239
|
+
"href": "#accessibility",
|
|
240
|
+
"depth": 2,
|
|
241
|
+
"numbering": [
|
|
242
|
+
1,
|
|
243
|
+
1
|
|
244
|
+
],
|
|
245
|
+
"parent": "root"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"value": "Accessibility standards",
|
|
249
|
+
"href": "#accessibility-standards",
|
|
250
|
+
"depth": 3,
|
|
251
|
+
"numbering": [
|
|
252
|
+
1,
|
|
253
|
+
1,
|
|
254
|
+
1
|
|
255
|
+
],
|
|
256
|
+
"parent": "root"
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"dev": {
|
|
261
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { Toolbar, type ToolbarProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation creates a horizontal toolbar with default styling:\n\n```jsx live-dev\nconst App = () => (\n <Toolbar>\n <Button variant=\"ghost\">File</Button>\n <Button variant=\"ghost\">Edit</Button>\n <Button variant=\"ghost\">View</Button>\n </Toolbar>\n)\n```\n\n## Usage examples\n\n### Size options\n\nThe `xs` and `md` size variants are available to match your interface density:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <Box>\n <Text textStyle=\"sm\" mb=\"200\" color=\"neutral.11\">Size: xs</Text>\n <Toolbar size=\"xs\">\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"New\">\n <Icons.Add />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Save\">\n <Icons.Save />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Print\">\n <Icons.Print />\n </IconButton>\n </Toolbar>\n </Box>\n <Box>\n <Text textStyle=\"sm\" mb=\"200\" color=\"neutral.11\">Size: md</Text>\n <Toolbar size=\"md\">\n <IconButton size=\"md\" variant=\"ghost\" aria-label=\"New\">\n <Icons.Add />\n </IconButton>\n <IconButton size=\"md\" variant=\"ghost\" aria-label=\"Save\">\n <Icons.Save />\n </IconButton>\n <IconButton size=\"md\" variant=\"ghost\" aria-label=\"Print\">\n <Icons.Print />\n </IconButton>\n </Toolbar>\n </Box>\n </Stack>\n)\n```\n\n### Visual variants\n\nChoose between `plain` and `outline` variants to match your design context:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <Box>\n <Text textStyle=\"sm\" mb=\"200\" color=\"neutral.11\">Variant: plain</Text>\n <Toolbar variant=\"plain\">\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Undo\">\n <Icons.Undo />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Redo\">\n <Icons.Redo />\n </IconButton>\n </Toolbar>\n </Box>\n <Box>\n <Text textStyle=\"sm\" mb=\"200\" color=\"neutral.11\">Variant: outline</Text>\n <Toolbar variant=\"outline\">\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Undo\">\n <Icons.Undo />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Redo\">\n <Icons.Redo />\n </IconButton>\n </Toolbar>\n </Box>\n </Stack>\n)\n```\n\n### Orientation\n\nThe `orientation` prop controls the layout direction and keyboard navigation:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"600\" alignItems=\"flex-start\">\n <Box>\n <Text textStyle=\"sm\" mb=\"200\" color=\"neutral.11\">Horizontal (default)</Text>\n <Toolbar orientation=\"horizontal\">\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Home\">\n <Icons.Home />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Search\">\n <Icons.Search />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Settings\">\n <Icons.Settings />\n </IconButton>\n </Toolbar>\n </Box>\n <Box>\n <Text textStyle=\"sm\" mb=\"200\" color=\"neutral.11\">Vertical</Text>\n <Toolbar orientation=\"vertical\">\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Home\">\n <Icons.Home />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Search\">\n <Icons.Search />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Settings\">\n <Icons.Settings />\n </IconButton>\n </Toolbar>\n </Box>\n </Stack>\n)\n```\n\n**Behavioral differences:**\n- `orientation=\"horizontal\"`: Arrow Left/Right keys navigate between controls\n- `orientation=\"vertical\"`: Arrow Up/Down keys navigate between controls\n\n### With Groups and Separators\n\nOrganize toolbar controls using `Group` and `Separator` components:\n\n```jsx live-dev\nconst App = () => (\n <Toolbar>\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"New\">\n <Icons.Add />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Open\">\n <Icons.FolderOpen />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Save\">\n <Icons.Save />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Print\">\n <Icons.Print />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Undo\">\n <Icons.Undo />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Redo\">\n <Icons.Redo />\n </IconButton>\n </Group>\n </Toolbar>\n)\n```\n\n### With ToggleButtonGroup\n\nIntegrate toggle button groups for stateful toolbar controls:\n\n```jsx live-dev\nconst App = () => (\n <Toolbar variant=\"outline\">\n <ToggleButtonGroup.Root\n selectionMode=\"multiple\"\n defaultSelectedKeys={[\"bold\"]}\n >\n <IconToggleButton\n id=\"bold\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Bold\"\n >\n <Icons.FormatBold />\n </IconToggleButton>\n <IconToggleButton\n id=\"italic\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Italic\"\n >\n <Icons.FormatItalic />\n </IconToggleButton>\n <IconToggleButton\n id=\"underline\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Underline\"\n >\n <Icons.FormatUnderlined />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n <Separator orientation=\"vertical\" />\n <ToggleButtonGroup.Root\n selectionMode=\"single\"\n defaultSelectedKeys={[\"left\"]}\n >\n <IconToggleButton\n id=\"left\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Align Left\"\n >\n <Icons.FormatAlignLeft />\n </IconToggleButton>\n <IconToggleButton\n id=\"center\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Align Center\"\n >\n <Icons.FormatAlignCenter />\n </IconToggleButton>\n <IconToggleButton\n id=\"right\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Align Right\"\n >\n <Icons.FormatAlignRight />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n </Toolbar>\n)\n```\n\n## Component requirements\n\n## Accessibility\n\nThe Toolbar component handles most accessibility requirements internally, including:\n- Setting the `role=\"toolbar\"` attribute\n- Managing keyboard navigation with arrow keys\n- Setting proper `aria-orientation` based on the `orientation` prop\n\nHowever, you should always provide an accessible label for the toolbar. This can be done by:\n\n- Using `aria-label` for a direct label:\n\n```tsx\n<Toolbar aria-label=\"Text formatting controls\">\n {/* toolbar controls */}\n</Toolbar>\n```\n\n- Using `aria-labelledby` to reference a visible label:\n\n```tsx\n<Text id=\"toolbar-label\">Text Formatting</Text>\n<Toolbar aria-labelledby=\"toolbar-label\">\n {/* toolbar controls */}\n</Toolbar>\n```\n\nIf your use case requires tracking and analytics for this component, it is good practice to add a **persistent**, **unique** id to the component:\n\n```tsx\nconst PERSISTENT_ID = \"example-toolbar\";\n\nexport const Example = () => (\n <Toolbar id={PERSISTENT_ID} aria-label=\"Main toolbar\">\n {/* toolbar controls */}\n </Toolbar>\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n- `Tab` / `Shift+Tab`: Move focus into and out of the toolbar\n- `Arrow Left` / `Arrow Right`: Navigate between controls in horizontal toolbars\n- `Arrow Up` / `Arrow Down`: Navigate between controls in vertical toolbars\n- `Home`: Focus first control in the toolbar\n- `End`: Focus last control in the toolbar\n\n## API reference\n\n<PropsTable id=\"Toolbar\" />\n\n## Common patterns\n\n### Text editor toolbar\n\nCreate a comprehensive text formatting toolbar with multiple control groups:\n\n```jsx live-dev\nconst App = () => {\n const [textStyle, setTextStyle] = useState(\"p\");\n\n const textStyles = [\n { id: \"h1\", label: \"Heading 1\" },\n { id: \"h2\", label: \"Heading 2\" },\n { id: \"p\", label: \"Paragraph\" },\n ];\n\n const selectedTextStyle = textStyles.find((v) => v.id === textStyle);\n\n return (\n <Toolbar size=\"md\" variant=\"outline\" aria-label=\"Text formatting\">\n <Group>\n <Menu.Root onAction={(v) => setTextStyle(String(v))}>\n <Menu.Trigger\n borderRadius=\"200\"\n border=\"1px solid\"\n borderColor=\"neutral.6\"\n width=\"3500\"\n aria-label=\"Text style\"\n >\n <Box display=\"flex\" alignItems=\"center\" gap=\"200\" px=\"200\">\n <Text>{selectedTextStyle?.label}</Text>\n <Icons.KeyboardArrowDown />\n </Box>\n </Menu.Trigger>\n <Menu.Content>\n {textStyles.map((style) => (\n <Menu.Item key={style.id} id={style.id}>\n {style.label}\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n </Group>\n <Separator orientation=\"vertical\" />\n <ToggleButtonGroup.Root\n selectionMode=\"multiple\"\n defaultSelectedKeys={[\"bold\"]}\n aria-label=\"Text formatting\"\n >\n <IconToggleButton id=\"bold\" size=\"xs\" variant=\"ghost\" aria-label=\"Bold\">\n <Icons.FormatBold />\n </IconToggleButton>\n <IconToggleButton id=\"italic\" size=\"xs\" variant=\"ghost\" aria-label=\"Italic\">\n <Icons.FormatItalic />\n </IconToggleButton>\n <IconToggleButton id=\"underline\" size=\"xs\" variant=\"ghost\" aria-label=\"Underline\">\n <Icons.FormatUnderlined />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n <Separator orientation=\"vertical\" />\n <ToggleButtonGroup.Root\n selectionMode=\"single\"\n defaultSelectedKeys={[\"left\"]}\n aria-label=\"Text alignment\"\n >\n <IconToggleButton id=\"left\" size=\"xs\" variant=\"ghost\" aria-label=\"Align Left\">\n <Icons.FormatAlignLeft />\n </IconToggleButton>\n <IconToggleButton id=\"center\" size=\"xs\" variant=\"ghost\" aria-label=\"Align Center\">\n <Icons.FormatAlignCenter />\n </IconToggleButton>\n <IconToggleButton id=\"right\" size=\"xs\" variant=\"ghost\" aria-label=\"Align Right\">\n <Icons.FormatAlignRight />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n </Toolbar>\n );\n}\n```\n\n### Navigation toolbar\n\nBuild a vertical navigation toolbar for sidebar layouts:\n\n```jsx live-dev\nconst App = () => (\n <Toolbar\n orientation=\"vertical\"\n variant=\"outline\"\n aria-label=\"Navigation\"\n >\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Home\">\n <Icons.Home />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Search\">\n <Icons.Search />\n </IconButton>\n <Separator orientation=\"horizontal\" />\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Settings\">\n <Icons.Settings />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Profile\">\n <Icons.Person />\n </IconButton>\n <Separator orientation=\"horizontal\" />\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Logout\">\n <Icons.Logout />\n </IconButton>\n </Toolbar>\n)\n```\n\n### Action toolbar\n\nCreate a simple action toolbar with primary controls:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\" width=\"full\">\n <Toolbar aria-label=\"Document actions\">\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"New document\">\n <Icons.Add />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Open document\">\n <Icons.FolderOpen />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Save document\">\n <Icons.Save />\n </IconButton>\n </Group>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Undo\">\n <Icons.Undo />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Redo\" isDisabled>\n <Icons.Redo />\n </IconButton>\n </Group>\n </Toolbar>\n <Box\n p=\"600\"\n borderRadius=\"200\"\n borderWidth=\"1px\"\n borderColor=\"neutral.6\"\n minHeight=\"6000\"\n >\n <Text color=\"neutral.11\">Document content area</Text>\n </Box>\n </Stack>\n)\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using Toolbar within your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic Rendering Tests\n\nVerify the component renders with expected elements\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { Toolbar, Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Toolbar - Basic rendering\", () => {\n it(\"renders toolbar with role attribute\", () => {\n render(\n <NimbusProvider>\n <Toolbar aria-label=\"Main toolbar\">\n <Button size=\"xs\">File</Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n // Verify toolbar is rendered with correct role\n expect(\n screen.getByRole(\"toolbar\", { name: /main toolbar/i })\n ).toBeInTheDocument();\n });\n\n it(\"renders with horizontal orientation by default\", () => {\n render(\n <NimbusProvider>\n <Toolbar aria-label=\"Test toolbar\">\n <Button size=\"xs\">File</Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n const toolbar = screen.getByRole(\"toolbar\");\n expect(toolbar).toHaveAttribute(\"aria-orientation\", \"horizontal\");\n });\n\n it(\"renders with vertical orientation when specified\", () => {\n render(\n <NimbusProvider>\n <Toolbar orientation=\"vertical\" aria-label=\"Test toolbar\">\n <Button size=\"xs\">File</Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n const toolbar = screen.getByRole(\"toolbar\");\n expect(toolbar).toHaveAttribute(\"aria-orientation\", \"vertical\");\n });\n});\n```\n\n### Keyboard Navigation Tests\n\nTest keyboard navigation with the toolbar\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 { Toolbar, Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Toolbar - Keyboard navigation\", () => {\n it(\"navigates between controls with arrow keys in horizontal toolbar\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <Toolbar aria-label=\"Test toolbar\">\n <Button size=\"xs\" data-testid=\"btn-1\">\n File\n </Button>\n <Button size=\"xs\" data-testid=\"btn-2\">\n Edit\n </Button>\n <Button size=\"xs\" data-testid=\"btn-3\">\n View\n </Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n const btn1 = screen.getByTestId(\"btn-1\");\n const btn2 = screen.getByTestId(\"btn-2\");\n const btn3 = screen.getByTestId(\"btn-3\");\n\n // Focus first button\n await user.click(btn1);\n expect(btn1).toHaveFocus();\n\n // Navigate with Arrow Right\n await user.keyboard(\"{ArrowRight}\");\n expect(btn2).toHaveFocus();\n\n await user.keyboard(\"{ArrowRight}\");\n expect(btn3).toHaveFocus();\n\n // Navigate backwards with Arrow Left\n await user.keyboard(\"{ArrowLeft}\");\n expect(btn2).toHaveFocus();\n });\n\n it(\"navigates between controls with arrow keys in vertical toolbar\", async () => {\n const user = userEvent.setup();\n render(\n <NimbusProvider>\n <Toolbar orientation=\"vertical\" aria-label=\"Test toolbar\">\n <Button size=\"xs\" data-testid=\"btn-1\">\n Home\n </Button>\n <Button size=\"xs\" data-testid=\"btn-2\">\n Search\n </Button>\n <Button size=\"xs\" data-testid=\"btn-3\">\n Settings\n </Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n const btn1 = screen.getByTestId(\"btn-1\");\n const btn2 = screen.getByTestId(\"btn-2\");\n const btn3 = screen.getByTestId(\"btn-3\");\n\n // Focus first button\n await user.click(btn1);\n expect(btn1).toHaveFocus();\n\n // Navigate with Arrow Down\n await user.keyboard(\"{ArrowDown}\");\n expect(btn2).toHaveFocus();\n\n await user.keyboard(\"{ArrowDown}\");\n expect(btn3).toHaveFocus();\n\n // Navigate backwards with Arrow Up\n await user.keyboard(\"{ArrowUp}\");\n expect(btn2).toHaveFocus();\n });\n});\n```\n\n### Testing Toolbar Children\n\nTest that toolbar properly contains and manages child elements\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { Toolbar, Button, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Toolbar - Children\", () => {\n it(\"renders multiple child buttons\", () => {\n render(\n <NimbusProvider>\n <Toolbar aria-label=\"Test toolbar\">\n <Button size=\"xs\">File</Button>\n <Button size=\"xs\">Edit</Button>\n <Button size=\"xs\">View</Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"button\", { name: /file/i })).toBeInTheDocument();\n expect(screen.getByRole(\"button\", { name: /edit/i })).toBeInTheDocument();\n expect(screen.getByRole(\"button\", { name: /view/i })).toBeInTheDocument();\n });\n\n it(\"maintains button functionality within toolbar\", async () => {\n const user = userEvent.setup();\n const handleClick = vi.fn();\n\n render(\n <NimbusProvider>\n <Toolbar aria-label=\"Test toolbar\">\n <Button size=\"xs\" onClick={handleClick} data-testid=\"clickable-btn\">\n Click me\n </Button>\n </Toolbar>\n </NimbusProvider>\n );\n\n const button = screen.getByTestId(\"clickable-btn\");\n await user.click(button);\n\n // Verify the click handler was called (may be called multiple times due to event bubbling)\n expect(handleClick).toHaveBeenCalled();\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-toolbar--docs)\n- [React Aria Toolbar](https://react-spectrum.adobe.com/react-aria/Toolbar.html)\n- [ARIA Toolbar Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/)\n",
|
|
262
|
+
"toc": [
|
|
263
|
+
{
|
|
264
|
+
"value": "Getting started",
|
|
265
|
+
"href": "#getting-started",
|
|
266
|
+
"depth": 2,
|
|
267
|
+
"numbering": [
|
|
268
|
+
1,
|
|
269
|
+
1
|
|
270
|
+
],
|
|
271
|
+
"parent": "root"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"value": "Import",
|
|
275
|
+
"href": "#import",
|
|
276
|
+
"depth": 3,
|
|
277
|
+
"numbering": [
|
|
278
|
+
1,
|
|
279
|
+
1,
|
|
280
|
+
1
|
|
281
|
+
],
|
|
282
|
+
"parent": "root"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"value": "Basic usage",
|
|
286
|
+
"href": "#basic-usage",
|
|
287
|
+
"depth": 3,
|
|
288
|
+
"numbering": [
|
|
289
|
+
1,
|
|
290
|
+
1,
|
|
291
|
+
2
|
|
292
|
+
],
|
|
293
|
+
"parent": "root"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"value": "Usage examples",
|
|
297
|
+
"href": "#usage-examples",
|
|
298
|
+
"depth": 2,
|
|
299
|
+
"numbering": [
|
|
300
|
+
1,
|
|
301
|
+
2
|
|
302
|
+
],
|
|
303
|
+
"parent": "root"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"value": "Size options",
|
|
307
|
+
"href": "#size-options",
|
|
308
|
+
"depth": 3,
|
|
309
|
+
"numbering": [
|
|
310
|
+
1,
|
|
311
|
+
2,
|
|
312
|
+
1
|
|
313
|
+
],
|
|
314
|
+
"parent": "root"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"value": "Visual variants",
|
|
318
|
+
"href": "#visual-variants",
|
|
319
|
+
"depth": 3,
|
|
320
|
+
"numbering": [
|
|
321
|
+
1,
|
|
322
|
+
2,
|
|
323
|
+
2
|
|
324
|
+
],
|
|
325
|
+
"parent": "root"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"value": "Orientation",
|
|
329
|
+
"href": "#orientation",
|
|
330
|
+
"depth": 3,
|
|
331
|
+
"numbering": [
|
|
332
|
+
1,
|
|
333
|
+
2,
|
|
334
|
+
3
|
|
335
|
+
],
|
|
336
|
+
"parent": "root"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"value": "With Groups and Separators",
|
|
340
|
+
"href": "#with-groups-and-separators",
|
|
341
|
+
"depth": 3,
|
|
342
|
+
"numbering": [
|
|
343
|
+
1,
|
|
344
|
+
2,
|
|
345
|
+
4
|
|
346
|
+
],
|
|
347
|
+
"parent": "root"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"value": "With ToggleButtonGroup",
|
|
351
|
+
"href": "#with-togglebuttongroup",
|
|
352
|
+
"depth": 3,
|
|
353
|
+
"numbering": [
|
|
354
|
+
1,
|
|
355
|
+
2,
|
|
356
|
+
5
|
|
357
|
+
],
|
|
358
|
+
"parent": "root"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"value": "Component requirements",
|
|
362
|
+
"href": "#component-requirements",
|
|
363
|
+
"depth": 2,
|
|
364
|
+
"numbering": [
|
|
365
|
+
1,
|
|
366
|
+
3
|
|
367
|
+
],
|
|
368
|
+
"parent": "root"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"value": "Accessibility",
|
|
372
|
+
"href": "#accessibility",
|
|
373
|
+
"depth": 2,
|
|
374
|
+
"numbering": [
|
|
375
|
+
1,
|
|
376
|
+
4
|
|
377
|
+
],
|
|
378
|
+
"parent": "root"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"value": "Keyboard navigation",
|
|
382
|
+
"href": "#keyboard-navigation",
|
|
383
|
+
"depth": 4,
|
|
384
|
+
"numbering": [
|
|
385
|
+
1,
|
|
386
|
+
4,
|
|
387
|
+
1,
|
|
388
|
+
1
|
|
389
|
+
],
|
|
390
|
+
"parent": "root"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"value": "API reference",
|
|
394
|
+
"href": "#api-reference",
|
|
395
|
+
"depth": 2,
|
|
396
|
+
"numbering": [
|
|
397
|
+
1,
|
|
398
|
+
5
|
|
399
|
+
],
|
|
400
|
+
"parent": "root"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"value": "Common patterns",
|
|
404
|
+
"href": "#common-patterns",
|
|
405
|
+
"depth": 2,
|
|
406
|
+
"numbering": [
|
|
407
|
+
1,
|
|
408
|
+
6
|
|
409
|
+
],
|
|
410
|
+
"parent": "root"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"value": "Text editor toolbar",
|
|
414
|
+
"href": "#text-editor-toolbar",
|
|
415
|
+
"depth": 3,
|
|
416
|
+
"numbering": [
|
|
417
|
+
1,
|
|
418
|
+
6,
|
|
419
|
+
1
|
|
420
|
+
],
|
|
421
|
+
"parent": "root"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"value": "Navigation toolbar",
|
|
425
|
+
"href": "#navigation-toolbar",
|
|
426
|
+
"depth": 3,
|
|
427
|
+
"numbering": [
|
|
428
|
+
1,
|
|
429
|
+
6,
|
|
430
|
+
2
|
|
431
|
+
],
|
|
432
|
+
"parent": "root"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"value": "Action toolbar",
|
|
436
|
+
"href": "#action-toolbar",
|
|
437
|
+
"depth": 3,
|
|
438
|
+
"numbering": [
|
|
439
|
+
1,
|
|
440
|
+
6,
|
|
441
|
+
3
|
|
442
|
+
],
|
|
443
|
+
"parent": "root"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"value": "Testing your implementation",
|
|
447
|
+
"href": "#testing-your-implementation",
|
|
448
|
+
"depth": 2,
|
|
449
|
+
"numbering": [
|
|
450
|
+
1,
|
|
451
|
+
7
|
|
452
|
+
],
|
|
453
|
+
"parent": "root"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"value": "Basic Rendering Tests",
|
|
457
|
+
"href": "#basic-rendering-tests",
|
|
458
|
+
"depth": 3,
|
|
459
|
+
"numbering": [
|
|
460
|
+
1,
|
|
461
|
+
7,
|
|
462
|
+
1
|
|
463
|
+
],
|
|
464
|
+
"parent": "root"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"value": "Keyboard Navigation Tests",
|
|
468
|
+
"href": "#keyboard-navigation-tests",
|
|
469
|
+
"depth": 3,
|
|
470
|
+
"numbering": [
|
|
471
|
+
1,
|
|
472
|
+
7,
|
|
473
|
+
2
|
|
474
|
+
],
|
|
475
|
+
"parent": "root"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"value": "Testing Toolbar Children",
|
|
479
|
+
"href": "#testing-toolbar-children",
|
|
480
|
+
"depth": 3,
|
|
481
|
+
"numbering": [
|
|
482
|
+
1,
|
|
483
|
+
7,
|
|
484
|
+
3
|
|
485
|
+
],
|
|
486
|
+
"parent": "root"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"value": "Resources",
|
|
490
|
+
"href": "#resources",
|
|
491
|
+
"depth": 2,
|
|
492
|
+
"numbering": [
|
|
493
|
+
1,
|
|
494
|
+
8
|
|
495
|
+
],
|
|
496
|
+
"parent": "root"
|
|
497
|
+
}
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
"guidelines": {
|
|
501
|
+
"mdx": "\n## Guidelines\n\nThese guidelines provide comprehensive direction for designing and developing\ntoolbars within Nimbus.\n\n### Best practices\n\n- **Contextual placement:** Place the toolbar directly above the content it\n controls (e.g., above a text editor, above a data table). This ensures an\n immediate, clear connection between the tools and the content being modified.\n- **Logical grouping:** Group related actions visually using small separators\n (like vertical lines or subtle spacing) to aid readability. For example, group\n text alignment controls together, and export actions together.\n- **Hierarchical order:** Arrange items based on usage frequency and logical\n flow, placing the most common or primary actions prominently on the left (in\n LTR languages).\n- **Minimize clutter:** Avoid overcrowding the toolbar. If there are too many\n items, use secondary controls like overflow menus to hide less frequently used\n actions.\n\n### Usage\n\nA toolbar's use is to provide a dedicated, contextual area for a set of related,\nfrequently used actions and controls to manage the content directly below it.\n\n> [!TIP]\\\n> When to use\n\n- **Group related actions and controls** in a compact, container.\n- **Offer contextual actions** relevant to the content being viewed or edited\n (e.g., formatting options in a text editor, or bulk actions for a list or\n table).\n- **Maintain screen space** by consolidating many items into a single, compact\n bar.\n\n> [!CAUTION]\\\n> When not to use\n\n- **The primary purpose is navigation** between different pages or application\n views; use a navigation component or tabs instead.\n- **Actions are rarely used or require complex input;** use a menu or modal\n dialog to house these actions to simplify.\n- **The area needs to display a large amount of primary content** without being\n obscured.\n- **Only one or two actions are needed** for a view; consider placing these\n directly or within a relevant component, like a card.\n\n### Toolbar in use\n\n> [!TIP]\\\n> **Do**\n>\n> - Do group related actions and controls in a compact container.\n> - Offer contextual actions relevant to the content being viewed or edited\n> (e.g., formatting options in a text editor, or bulk actions for a list).\n> - Maintain screen space by consolidating many items into a single, compact\n> bar.\n\n```jsx live\nconst App = () => (\n <Toolbar aria-label=\"Text formatting\">\n <Select.Root\n size=\"sm\"\n defaultSelectedKey=\"paragraph\"\n aria-label=\"Text style\"\n isClearable={false}\n >\n <Select.Options>\n <Select.Option id=\"heading1\">Heading 1</Select.Option>\n <Select.Option id=\"heading2\">Heading 2</Select.Option>\n <Select.Option id=\"paragraph\">Paragraph</Select.Option>\n </Select.Options>\n </Select.Root>\n <Separator orientation=\"vertical\" />\n <ToggleButtonGroup.Root\n selectionMode=\"multiple\"\n defaultSelectedKeys={[\"bold\"]}\n >\n <IconToggleButton id=\"bold\" size=\"xs\" variant=\"ghost\" aria-label=\"Bold\">\n <Icons.FormatBold />\n </IconToggleButton>\n <IconToggleButton\n id=\"italic\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Italic\"\n >\n <Icons.FormatItalic />\n </IconToggleButton>\n <IconToggleButton\n id=\"underline\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Underline\"\n >\n <Icons.FormatUnderlined />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"More formatting options\">\n <Icons.MoreHoriz />\n </IconButton>\n <Separator orientation=\"vertical\" />\n <ToggleButtonGroup.Root selectionMode=\"single\" defaultSelectedKeys={[]}>\n <IconToggleButton\n id=\"bulleted\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Bulleted list\"\n >\n <Icons.FormatListBulleted />\n </IconToggleButton>\n <IconToggleButton\n id=\"numbered\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Numbered list\"\n >\n <Icons.FormatListNumbered />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n <Separator orientation=\"vertical\" />\n <Group>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Undo\" isDisabled>\n <Icons.Undo />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Redo\">\n <Icons.Redo />\n </IconButton>\n </Group>\n </Toolbar>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't overcrowd the toolbar with too many items; use an overflow menu\n> instead.\n> - Don't place unrelated actions next to each other without visual separation\n> to group similar functions.\n> - Don't use a standard text button with a label when an icon button is\n> sufficient and space is limited.\n> - Don't assume the user understands an icon without a descriptive tooltip.\n> - Don't hide actions that are temporarily disabled, as this causes shifting\n> elements and breaks muscle memory.\n\n```jsx live\nconst App = () => (\n <Toolbar aria-label=\"Text formatting\">\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"View\">\n <Icons.Apps />\n </IconButton>\n <ToggleButtonGroup.Root\n selectionMode=\"multiple\"\n defaultSelectedKeys={[\"bold\"]}\n >\n <IconToggleButton id=\"bold\" size=\"xs\" variant=\"ghost\" aria-label=\"Bold\">\n <Icons.FormatBold />\n </IconToggleButton>\n <IconToggleButton\n id=\"italic\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Italic\"\n >\n <Icons.FormatItalic />\n </IconToggleButton>\n <IconToggleButton\n id=\"underline\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Underline\"\n >\n <Icons.FormatUnderlined />\n </IconToggleButton>\n <IconToggleButton\n id=\"strikethrough\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Strikethrough\"\n >\n <Icons.FormatStrikethrough />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Format size\">\n <Icons.FormatSize />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Insert link\">\n <Icons.InsertLink />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Brightness\">\n <Icons.Brightness6 />\n </IconButton>\n <ToggleButtonGroup.Root selectionMode=\"single\" defaultSelectedKeys={[]}>\n <IconToggleButton\n id=\"bulleted\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Bulleted list\"\n >\n <Icons.FormatListBulleted />\n </IconToggleButton>\n <IconToggleButton\n id=\"numbered\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Numbered list\"\n >\n <Icons.FormatListNumbered />\n </IconToggleButton>\n </ToggleButtonGroup.Root>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Delete\">\n <Icons.Delete />\n </IconButton>\n <IconButton size=\"xs\" variant=\"ghost\" aria-label=\"Upload\">\n <Icons.CloudUpload />\n </IconButton>\n </Toolbar>\n);\n```\n",
|
|
502
|
+
"toc": [
|
|
503
|
+
{
|
|
504
|
+
"value": "Guidelines",
|
|
505
|
+
"href": "#guidelines",
|
|
506
|
+
"depth": 2,
|
|
507
|
+
"numbering": [
|
|
508
|
+
1,
|
|
509
|
+
1
|
|
510
|
+
],
|
|
511
|
+
"parent": "root"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"value": "Best practices",
|
|
515
|
+
"href": "#best-practices",
|
|
516
|
+
"depth": 3,
|
|
517
|
+
"numbering": [
|
|
518
|
+
1,
|
|
519
|
+
1,
|
|
520
|
+
1
|
|
521
|
+
],
|
|
522
|
+
"parent": "root"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"value": "Usage",
|
|
526
|
+
"href": "#usage",
|
|
527
|
+
"depth": 3,
|
|
528
|
+
"numbering": [
|
|
529
|
+
1,
|
|
530
|
+
1,
|
|
531
|
+
2
|
|
532
|
+
],
|
|
533
|
+
"parent": "root"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"value": "Toolbar in use",
|
|
537
|
+
"href": "#toolbar-in-use",
|
|
538
|
+
"depth": 3,
|
|
539
|
+
"numbering": [
|
|
540
|
+
1,
|
|
541
|
+
1,
|
|
542
|
+
3
|
|
543
|
+
],
|
|
544
|
+
"parent": "root"
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Naivgation",
|
|
4
|
+
"title": "Navigation",
|
|
5
|
+
"description": "Components for moving through an application.",
|
|
6
|
+
"order": 2,
|
|
7
|
+
"repoPath": "packages/nimbus/src/docs/naivgation.mdx",
|
|
8
|
+
"menu": [
|
|
9
|
+
"Components",
|
|
10
|
+
"Navigation"
|
|
11
|
+
],
|
|
12
|
+
"route": "components/navigation",
|
|
13
|
+
"tags": [
|
|
14
|
+
"document"
|
|
15
|
+
],
|
|
16
|
+
"toc": [],
|
|
17
|
+
"icon": "Explore",
|
|
18
|
+
"layout": "app-frame",
|
|
19
|
+
"tabs": [
|
|
20
|
+
{
|
|
21
|
+
"key": "overview",
|
|
22
|
+
"title": "Overview",
|
|
23
|
+
"order": 0
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"mdx": "\n# Navigation\n\nComponents for navigating through an application.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
28
|
+
"views": {
|
|
29
|
+
"overview": {
|
|
30
|
+
"mdx": "\n# Navigation\n\nComponents for navigating through an application.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
31
|
+
"toc": []
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|