@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,535 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-TagGroup",
|
|
4
|
+
"title": "Tag group",
|
|
5
|
+
"exportName": "TagGroup",
|
|
6
|
+
"description": "A tag group is a compact, interactive element. It categorizes, labels, or adds attributes to objects for quick recognition and filtering.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/tag-group/tag-group.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Data Display",
|
|
13
|
+
"Tag group"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/data-display/tag-group",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"tag",
|
|
19
|
+
"chip",
|
|
20
|
+
"label",
|
|
21
|
+
"removable"
|
|
22
|
+
],
|
|
23
|
+
"toc": [
|
|
24
|
+
{
|
|
25
|
+
"value": "Overview",
|
|
26
|
+
"href": "#overview",
|
|
27
|
+
"depth": 2,
|
|
28
|
+
"numbering": [
|
|
29
|
+
1,
|
|
30
|
+
1
|
|
31
|
+
],
|
|
32
|
+
"parent": "root"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"value": "Resources",
|
|
36
|
+
"href": "#resources",
|
|
37
|
+
"depth": 3,
|
|
38
|
+
"numbering": [
|
|
39
|
+
1,
|
|
40
|
+
1,
|
|
41
|
+
1
|
|
42
|
+
],
|
|
43
|
+
"parent": "root"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"value": "Variables",
|
|
47
|
+
"href": "#variables",
|
|
48
|
+
"depth": 2,
|
|
49
|
+
"numbering": [
|
|
50
|
+
1,
|
|
51
|
+
2
|
|
52
|
+
],
|
|
53
|
+
"parent": "root"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": "Visual options",
|
|
57
|
+
"href": "#visual-options",
|
|
58
|
+
"depth": 3,
|
|
59
|
+
"numbering": [
|
|
60
|
+
1,
|
|
61
|
+
2,
|
|
62
|
+
1
|
|
63
|
+
],
|
|
64
|
+
"parent": "root"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"value": "Size",
|
|
68
|
+
"href": "#size",
|
|
69
|
+
"depth": 4,
|
|
70
|
+
"numbering": [
|
|
71
|
+
1,
|
|
72
|
+
2,
|
|
73
|
+
1,
|
|
74
|
+
1
|
|
75
|
+
],
|
|
76
|
+
"parent": "root"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "Toggle buttons vs clearable tag groups",
|
|
80
|
+
"href": "#toggle-buttons-vs-clearable-tag-groups",
|
|
81
|
+
"depth": 3,
|
|
82
|
+
"numbering": [
|
|
83
|
+
1,
|
|
84
|
+
2,
|
|
85
|
+
2
|
|
86
|
+
],
|
|
87
|
+
"parent": "root"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"figmaLink": "https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=4292-25466",
|
|
91
|
+
"layout": "app-frame",
|
|
92
|
+
"tabs": [
|
|
93
|
+
{
|
|
94
|
+
"key": "overview",
|
|
95
|
+
"title": "Overview",
|
|
96
|
+
"order": 0
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"key": "guidelines",
|
|
100
|
+
"title": "Guidelines",
|
|
101
|
+
"order": 2
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"key": "dev",
|
|
105
|
+
"title": "Implementation",
|
|
106
|
+
"order": 3
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"key": "a11y",
|
|
110
|
+
"title": "Accessibility",
|
|
111
|
+
"order": 4
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"mdx": "\n## Overview\n\nThe tag group organizes a collection of individual tag components, allowing\nusers to efficiently scan and understand multiple pieces of metadata or filter\ncriteria associated with a product, order, or entity in a compact, manageable\nspace.\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=4292-25466)\n[Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-taggroup--docs)\n\n## Variables\n\nGet familiar with the features.\n\n### Visual options\n\n#### Size\n\nThe large size of the tag within tag groups is the default, the small size is\nmeant for more compact uses. The more tags present, consider smaller sizes to\nmake the information more compact and easily read for the user.\n\n```jsx live\nconst App = () => {\n const smallTag = [{ id: \"cherries\", name: \"Cherries\" }];\n const mediumTag = [{ id: \"kiwis\", name: \"Kiwis\" }];\n const largeTag = [{ id: \"apples\", name: \"Apples\" }];\n\n return (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"flex-start\">\n <Box>\n <Text as=\"p\" textStyle=\"sm\" fontWeight=\"bold\" marginBottom=\"200\">Large</Text>\n <TagGroup.Root size=\"lg\" aria-label=\"Large tags\" onRemove={() => {}}>\n <TagGroup.TagList items={largeTag}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n <Box>\n <Text as=\"p\" textStyle=\"sm\" fontWeight=\"bold\" marginBottom=\"200\">Medium</Text>\n <TagGroup.Root size=\"md\" aria-label=\"Medium tags\" onRemove={() => {}}>\n <TagGroup.TagList items={mediumTag}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n <Box>\n <Text as=\"p\" textStyle=\"sm\" fontWeight=\"bold\" marginBottom=\"200\">Small</Text>\n <TagGroup.Root size=\"sm\" aria-label=\"Small tags\" onRemove={() => {}}>\n <TagGroup.TagList items={smallTag}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n </Stack>\n );\n}\n```\n\n### Toggle buttons vs clearable tag groups\n\nAllow users to toggle the active state of a tag, or be able to remove tags by\nadding a \"close\" icon to each tag. Avoid mixing these interactions within the\nsame group.\n\n```jsx live\nconst App = () => {\n const [selectedToggleTags, setSelectedToggleTags] = useState(new Set([\"vegetables\"]));\n\n const removableTags = [\n { id: \"remove1\", name: \"Remove me first\" },\n { id: \"remove2\", name: \"Remove me second\" },\n { id: \"remove3\", name: \"Remove me last\" },\n ];\n\n const toggleTags = [\n { id: \"fruits\", name: \"Fruits\" },\n { id: \"vegetables\", name: \"Vegetables\" },\n { id: \"meat\", name: \"Meat\" },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"600\" alignItems=\"flex-start\">\n <Box>\n <Text as=\"p\" textStyle=\"sm\" marginBottom=\"200\" fontWeight=\"bold\">Removable tag group</Text>\n <TagGroup.Root aria-label=\"Removable tags\" onRemove={() => {}}>\n <TagGroup.TagList items={removableTags}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n\n <Box>\n <Text as=\"p\" textStyle=\"sm\" marginBottom=\"200\" fontWeight=\"bold\">Toggleable tag group</Text>\n <TagGroup.Root\n aria-label=\"Toggle tags\"\n selectionMode=\"multiple\"\n selectedKeys={selectedToggleTags}\n onSelectionChange={setSelectedToggleTags}\n >\n <TagGroup.TagList items={toggleTags}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n </Stack>\n );\n}\n```\n",
|
|
116
|
+
"views": {
|
|
117
|
+
"overview": {
|
|
118
|
+
"mdx": "\n## Overview\n\nThe tag group organizes a collection of individual tag components, allowing\nusers to efficiently scan and understand multiple pieces of metadata or filter\ncriteria associated with a product, order, or entity in a compact, manageable\nspace.\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=4292-25466)\n[Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-taggroup--docs)\n\n## Variables\n\nGet familiar with the features.\n\n### Visual options\n\n#### Size\n\nThe large size of the tag within tag groups is the default, the small size is\nmeant for more compact uses. The more tags present, consider smaller sizes to\nmake the information more compact and easily read for the user.\n\n```jsx live\nconst App = () => {\n const smallTag = [{ id: \"cherries\", name: \"Cherries\" }];\n const mediumTag = [{ id: \"kiwis\", name: \"Kiwis\" }];\n const largeTag = [{ id: \"apples\", name: \"Apples\" }];\n\n return (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"flex-start\">\n <Box>\n <Text as=\"p\" textStyle=\"sm\" fontWeight=\"bold\" marginBottom=\"200\">Large</Text>\n <TagGroup.Root size=\"lg\" aria-label=\"Large tags\" onRemove={() => {}}>\n <TagGroup.TagList items={largeTag}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n <Box>\n <Text as=\"p\" textStyle=\"sm\" fontWeight=\"bold\" marginBottom=\"200\">Medium</Text>\n <TagGroup.Root size=\"md\" aria-label=\"Medium tags\" onRemove={() => {}}>\n <TagGroup.TagList items={mediumTag}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n <Box>\n <Text as=\"p\" textStyle=\"sm\" fontWeight=\"bold\" marginBottom=\"200\">Small</Text>\n <TagGroup.Root size=\"sm\" aria-label=\"Small tags\" onRemove={() => {}}>\n <TagGroup.TagList items={smallTag}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n </Stack>\n );\n}\n```\n\n### Toggle buttons vs clearable tag groups\n\nAllow users to toggle the active state of a tag, or be able to remove tags by\nadding a \"close\" icon to each tag. Avoid mixing these interactions within the\nsame group.\n\n```jsx live\nconst App = () => {\n const [selectedToggleTags, setSelectedToggleTags] = useState(new Set([\"vegetables\"]));\n\n const removableTags = [\n { id: \"remove1\", name: \"Remove me first\" },\n { id: \"remove2\", name: \"Remove me second\" },\n { id: \"remove3\", name: \"Remove me last\" },\n ];\n\n const toggleTags = [\n { id: \"fruits\", name: \"Fruits\" },\n { id: \"vegetables\", name: \"Vegetables\" },\n { id: \"meat\", name: \"Meat\" },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"600\" alignItems=\"flex-start\">\n <Box>\n <Text as=\"p\" textStyle=\"sm\" marginBottom=\"200\" fontWeight=\"bold\">Removable tag group</Text>\n <TagGroup.Root aria-label=\"Removable tags\" onRemove={() => {}}>\n <TagGroup.TagList items={removableTags}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n\n <Box>\n <Text as=\"p\" textStyle=\"sm\" marginBottom=\"200\" fontWeight=\"bold\">Toggleable tag group</Text>\n <TagGroup.Root\n aria-label=\"Toggle tags\"\n selectionMode=\"multiple\"\n selectedKeys={selectedToggleTags}\n onSelectionChange={setSelectedToggleTags}\n >\n <TagGroup.TagList items={toggleTags}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n </Stack>\n );\n}\n```\n",
|
|
119
|
+
"toc": [
|
|
120
|
+
{
|
|
121
|
+
"value": "Overview",
|
|
122
|
+
"href": "#overview",
|
|
123
|
+
"depth": 2,
|
|
124
|
+
"numbering": [
|
|
125
|
+
1,
|
|
126
|
+
1
|
|
127
|
+
],
|
|
128
|
+
"parent": "root"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"value": "Resources",
|
|
132
|
+
"href": "#resources",
|
|
133
|
+
"depth": 3,
|
|
134
|
+
"numbering": [
|
|
135
|
+
1,
|
|
136
|
+
1,
|
|
137
|
+
1
|
|
138
|
+
],
|
|
139
|
+
"parent": "root"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"value": "Variables",
|
|
143
|
+
"href": "#variables",
|
|
144
|
+
"depth": 2,
|
|
145
|
+
"numbering": [
|
|
146
|
+
1,
|
|
147
|
+
2
|
|
148
|
+
],
|
|
149
|
+
"parent": "root"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"value": "Visual options",
|
|
153
|
+
"href": "#visual-options",
|
|
154
|
+
"depth": 3,
|
|
155
|
+
"numbering": [
|
|
156
|
+
1,
|
|
157
|
+
2,
|
|
158
|
+
1
|
|
159
|
+
],
|
|
160
|
+
"parent": "root"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"value": "Size",
|
|
164
|
+
"href": "#size",
|
|
165
|
+
"depth": 4,
|
|
166
|
+
"numbering": [
|
|
167
|
+
1,
|
|
168
|
+
2,
|
|
169
|
+
1,
|
|
170
|
+
1
|
|
171
|
+
],
|
|
172
|
+
"parent": "root"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"value": "Toggle buttons vs clearable tag groups",
|
|
176
|
+
"href": "#toggle-buttons-vs-clearable-tag-groups",
|
|
177
|
+
"depth": 3,
|
|
178
|
+
"numbering": [
|
|
179
|
+
1,
|
|
180
|
+
2,
|
|
181
|
+
2
|
|
182
|
+
],
|
|
183
|
+
"parent": "root"
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"a11y": {
|
|
188
|
+
"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 const vegetableOptions = [\n { id: \"tomato\", name: \"Tomato\" },\n { id: \"zucchini\", name: \"Zucchini\" },\n { id: \"peppers\", name: \"Peppers\" },\n ];\n\n return (\n <TagGroup.Root onRemove={() => {}}>\n <TagGroup.TagList items={vegetableOptions}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n );\n}\n```\n\n### Accessibility standards\n\n- **Keyboard focus:** Ensure the user can navigate to and between individual\n tags (if interactive/removable) using the Tab key.\n- **ARIA labels for removal:** For removable tags, the close button/icon must\n have a clear `aria-label` (e.g., \"Remove filter: [Tag Label]\") to inform\n screen readers exactly what is being dismissed.\n- **Contrast:** Verify that the text contrast ratio against the tag's background\n color meets WCAG AA standards (4.5:1).\n- **Logical reading order:** The order in which the tags are read by a screen\n reader must logically align with the visual order.\n",
|
|
189
|
+
"toc": [
|
|
190
|
+
{
|
|
191
|
+
"value": "Accessibility",
|
|
192
|
+
"href": "#accessibility",
|
|
193
|
+
"depth": 2,
|
|
194
|
+
"numbering": [
|
|
195
|
+
1,
|
|
196
|
+
1
|
|
197
|
+
],
|
|
198
|
+
"parent": "root"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"value": "Accessibility standards",
|
|
202
|
+
"href": "#accessibility-standards",
|
|
203
|
+
"depth": 3,
|
|
204
|
+
"numbering": [
|
|
205
|
+
1,
|
|
206
|
+
1,
|
|
207
|
+
1
|
|
208
|
+
],
|
|
209
|
+
"parent": "root"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"dev": {
|
|
214
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { TagGroup } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe TagGroup component is a compound component that displays a collection of tags. It consists of three parts: `TagGroup.Root`, `TagGroup.TagList`, and `TagGroup.Tag`:\n\n```jsx live-dev\nconst App = () => (\n <TagGroup.Root aria-label=\"Categories\">\n <TagGroup.TagList>\n <TagGroup.Tag>Electronics</TagGroup.Tag>\n <TagGroup.Tag>Clothing</TagGroup.Tag>\n <TagGroup.Tag>Home & Garden</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n)\n```\n\n## Usage examples\n\n### Size options\n\nThe `sm`, `md`, and `lg` size variants are available to match your interface density:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TagGroup.Root size=\"sm\" aria-label=\"Small tags\">\n <TagGroup.TagList>\n <TagGroup.Tag>Small</TagGroup.Tag>\n <TagGroup.Tag>Compact</TagGroup.Tag>\n <TagGroup.Tag>Dense</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n\n <TagGroup.Root size=\"md\" aria-label=\"Medium tags\">\n <TagGroup.TagList>\n <TagGroup.Tag>Medium</TagGroup.Tag>\n <TagGroup.Tag>Standard</TagGroup.Tag>\n <TagGroup.Tag>Default</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n\n <TagGroup.Root size=\"lg\" aria-label=\"Large tags\">\n <TagGroup.TagList>\n <TagGroup.Tag>Large</TagGroup.Tag>\n <TagGroup.Tag>Comfortable</TagGroup.Tag>\n <TagGroup.Tag>Spacious</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </Stack>\n)\n```\n\n### Dynamic collections with items\n\nUse the `items` prop with a render function for dynamic data:\n\n```jsx live-dev\nconst App = () => {\n const categories = [\n { id: 'electronics', name: 'Electronics' },\n { id: 'clothing', name: 'Clothing' },\n { id: 'home', name: 'Home & Garden' },\n { id: 'sports', name: 'Sports & Outdoors' },\n ];\n\n return (\n <TagGroup.Root aria-label=\"Product categories\">\n <TagGroup.TagList items={categories}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n );\n}\n```\n\nThe `items` prop accepts an array of objects, and the render function receives each item as an argument. This pattern is useful when working with dynamic data from APIs or state management.\n\n### Color palette\n\nCustomize tag colors by setting the `colorPalette` prop on individual `TagGroup.Tag` components. This prop accepts semantic colors (primary, info, critical, warning, positive) or system colors (blue, green, red, purple, etc.) to establish the color context for that tag.\n\nNote that the `colorPalette` prop selects which palette to use, but doesn't immediately change the visuals. You must also reference color tokens (e.g. `backgroundColor=\"colorPalette.11\"`, `color=\"colorPalette.6\"`) to actually apply the intended colors.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <TagGroup.Root aria-label=\"Primary tags\">\n <TagGroup.TagList>\n <TagGroup.Tag colorPalette=\"primary\" backgroundColor=\"colorPalette.11\" color=\"colorPalette.contrast\">\n Primary\n </TagGroup.Tag>\n <TagGroup.Tag colorPalette=\"primary\" backgroundColor=\"colorPalette.3\">\n Default\n </TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n\n <TagGroup.Root aria-label=\"Blue tags\">\n <TagGroup.TagList>\n <TagGroup.Tag colorPalette=\"blue\" backgroundColor=\"colorPalette.9\" color=\"colorPalette.contrast\">\n Blue\n </TagGroup.Tag>\n <TagGroup.Tag colorPalette=\"blue\" backgroundColor=\"colorPalette.3\">\n Information\n </TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n\n <TagGroup.Root aria-label=\"Red tags\">\n <TagGroup.TagList>\n <TagGroup.Tag colorPalette=\"red\" backgroundColor=\"colorPalette.9\" color=\"colorPalette.contrast\">\n Red\n </TagGroup.Tag>\n <TagGroup.Tag colorPalette=\"critical\" backgroundColor=\"colorPalette.3\" color=\"colorPalette.11\">\n Error\n </TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n\n <TagGroup.Root aria-label=\"Green tags\">\n <TagGroup.TagList>\n <TagGroup.Tag colorPalette=\"green\" backgroundColor=\"colorPalette.8\" color=\"colorPalette.12\">\n Green\n </TagGroup.Tag>\n <TagGroup.Tag colorPalette=\"green\" backgroundColor=\"colorPalette.4\" color=\"colorPalette.11\">\n Accent\n </TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </Stack>\n)\n\n```\n> [!TIP]\\\n> See the [Colors documentation](/home/design-tokens/colors) for detailed information about color tokens and how to use them effectively.\n\n### Removable tags\n\nEnable tag removal by providing an `onRemove` handler. Users can remove tags by clicking the remove button or pressing Backspace:\n\n```jsx live-dev\nconst App = () => {\n const [tags, setTags] = useState([\n { id: 'react', name: 'React' },\n { id: 'typescript', name: 'TypeScript' },\n { id: 'nodejs', name: 'Node.js' },\n { id: 'graphql', name: 'GraphQL' },\n ]);\n\n const handleRemove = (keys) => {\n setTags(tags.filter(tag => !keys.has(tag.id)));\n };\n\n return (\n <Stack direction=\"column\" gap=\"300\">\n <TagGroup.Root \n aria-label=\"Tech stack\" \n onRemove={handleRemove}\n >\n <TagGroup.TagList items={tags}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n <Text fontSize=\"sm\" color=\"fg.muted\">\n {tags.length} {tags.length === 1 ? 'tag' : 'tags'} remaining\n </Text>\n </Stack>\n );\n}\n```\n\n**Keyboard interaction**: When focused on a tag, press `Backspace` or `Delete` to remove it.\n\n### Single selection\n\nUse `selectionMode=\"single\"` to allow selecting one tag at a time:\n\n```jsx live-dev\nconst App = () => {\n const [selected, setSelected] = useState(new Set());\n\n const priorities = [\n { id: 'low', name: 'Low' },\n { id: 'medium', name: 'Medium' },\n { id: 'high', name: 'High' },\n { id: 'urgent', name: 'Urgent' },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"300\">\n <TagGroup.Root\n aria-label=\"Select priority\"\n selectionMode=\"single\"\n selectedKeys={selected}\n onSelectionChange={setSelected}\n >\n <TagGroup.TagList items={priorities}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n <Text fontSize=\"sm\">\n Selected: {selected.size > 0 ? [...selected][0] : 'None'}\n </Text>\n </Stack>\n );\n}\n```\n\n### Multiple selection\n\nUse `selectionMode=\"multiple\"` to allow selecting multiple tags:\n\n```jsx live-dev\nconst App = () => {\n const [selected, setSelected] = useState(new Set(['electronics']));\n\n const filters = [\n { id: 'electronics', name: 'Electronics' },\n { id: 'clothing', name: 'Clothing' },\n { id: 'home', name: 'Home & Garden' },\n { id: 'sports', name: 'Sports' },\n { id: 'books', name: 'Books' },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"300\">\n <TagGroup.Root\n aria-label=\"Filter categories\"\n selectionMode=\"multiple\"\n selectedKeys={selected}\n onSelectionChange={setSelected}\n >\n <TagGroup.TagList items={filters}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n <Text fontSize=\"sm\">\n {selected.size} {selected.size === 1 ? 'filter' : 'filters'} selected\n </Text>\n </Stack>\n );\n}\n```\n\n**Note**: When using `selectionMode=\"single\"` or `selectionMode=\"multiple\"`, tags cannot be removed. These modes are mutually exclusive with the removal functionality.\n\n### Disabled state\n\nDisable the entire tag group or individual tags:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"column\" gap=\"400\">\n <Stack direction=\"column\" gap=\"200\">\n <Text fontSize=\"sm\" fontWeight=\"semibold\">Disabled group:</Text>\n <TagGroup.Root aria-label=\"Disabled tags\" isDisabled>\n <TagGroup.TagList>\n <TagGroup.Tag>Disabled</TagGroup.Tag>\n <TagGroup.Tag>Not interactive</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </Stack>\n\n <Stack direction=\"column\" gap=\"200\">\n <Text fontSize=\"sm\" fontWeight=\"semibold\">Individual disabled tags:</Text>\n <TagGroup.Root aria-label=\"Mixed tags\" selectionMode=\"multiple\">\n <TagGroup.TagList>\n <TagGroup.Tag>Available</TagGroup.Tag>\n <TagGroup.Tag isDisabled>Disabled</TagGroup.Tag>\n <TagGroup.Tag>Available</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </Stack>\n </Stack>\n)\n```\n\n## Component requirements\n\n## Accessibility\n\nThe TagGroup component is built on React Aria's TagGroup, which provides comprehensive accessibility support. However, you must always provide an accessible label:\n\n**Provide a label** using one of these methods:\n\n- Using a visible label with `aria-labelledby`:\n\n```tsx\n<Text id=\"tag-label\">Categories</Text>\n<TagGroup.Root aria-labelledby=\"tag-label\">\n <TagGroup.TagList>\n <TagGroup.Tag>Electronics</TagGroup.Tag>\n </TagGroup.TagList>\n</TagGroup.Root>\n```\n\n- Using `aria-label` for a non-visible label:\n\n```tsx\n<TagGroup.Root aria-label=\"Product categories\">\n <TagGroup.TagList>\n <TagGroup.Tag>Electronics</TagGroup.Tag>\n </TagGroup.TagList>\n</TagGroup.Root>\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-tag-group\";\n\nexport const Example = () => (\n <TagGroup.Root id={PERSISTENT_ID} aria-label=\"Categories\">\n <TagGroup.TagList>\n <TagGroup.Tag>Electronics</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n);\n```\n\n#### Keyboard navigation\n\nThe component supports full keyboard interaction:\n\n- `Tab`: Moves focus into and out of the tag group\n- `Arrow Left` / `Arrow Right`: Navigates between tags within the group\n- `Enter` / `Space`: Selects the focused tag (when selection mode is enabled)\n- `Backspace` / `Delete`: Removes the focused tag (when `onRemove` is provided)\n- Focus wraps from the last tag to the first and vice versa\n\n## API reference\n\n<PropsTable id=\"TagGroup\" />\n\n## Common patterns\n\n### Filter chips with removal\n\nDisplay active filters that can be removed:\n\n```jsx live-dev\nconst App = () => {\n const [filters, setFilters] = useState([\n { id: 'price-low', name: 'Price: Low to High', category: 'sort' },\n { id: 'instock', name: 'In Stock', category: 'availability' },\n { id: 'brand-apple', name: 'Apple', category: 'brand' },\n ]);\n\n const handleRemove = (keys) => {\n setFilters(filters.filter(f => !keys.has(f.id)));\n };\n\n const handleClearAll = () => {\n setFilters([]);\n };\n\n return (\n <Stack direction=\"column\" gap=\"300\">\n <Stack direction=\"row\" justify=\"space-between\" align=\"center\">\n <Text fontSize=\"sm\" fontWeight=\"semibold\">Active Filters</Text>\n {filters.length > 0 && (\n <Button size=\"sm\" variant=\"ghost\" onPress={handleClearAll}>\n Clear all\n </Button>\n )}\n </Stack>\n {filters.length > 0 ? (\n <TagGroup.Root \n aria-label=\"Active filters\" \n onRemove={handleRemove}\n colorPalette=\"blue\"\n >\n <TagGroup.TagList items={filters}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n ) : (\n <Text fontSize=\"sm\" color=\"fg.muted\">No filters applied</Text>\n )}\n </Stack>\n );\n}\n```\n\n### Category selector\n\nUse single selection for choosing one category:\n\n```jsx live-dev\nconst App = () => {\n const [selected, setSelected] = useState(new Set(['all']));\n const [itemCount, setItemCount] = useState(124);\n\n const categories = [\n { id: 'all', name: 'All Products', count: 124 },\n { id: 'new', name: 'New Arrivals', count: 18 },\n { id: 'sale', name: 'On Sale', count: 32 },\n { id: 'featured', name: 'Featured', count: 12 },\n ];\n\n const handleSelectionChange = (keys) => {\n setSelected(keys);\n const selectedId = [...keys][0];\n const category = categories.find(c => c.id === selectedId);\n setItemCount(category?.count || 0);\n };\n\n return (\n <Stack direction=\"column\" gap=\"300\">\n <TagGroup.Root\n aria-label=\"Product categories\"\n selectionMode=\"single\"\n selectedKeys={selected}\n onSelectionChange={handleSelectionChange}\n >\n <TagGroup.TagList items={categories}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n <Text fontSize=\"sm\" color=\"fg.muted\">\n Showing {itemCount} products\n </Text>\n </Stack>\n );\n}\n```\n\n### Multi-select filter\n\nAllow multiple selections for filtering:\n\n```jsx live-dev\nconst App = () => {\n const [selectedSizes, setSelectedSizes] = useState(new Set());\n const [selectedColors, setSelectedColors] = useState(new Set());\n\n const sizes = [\n { id: 'xs', name: 'XS' },\n { id: 's', name: 'S' },\n { id: 'm', name: 'M' },\n { id: 'l', name: 'L' },\n { id: 'xl', name: 'XL' },\n ];\n\n const colors = [\n { id: 'black', name: 'Black' },\n { id: 'white', name: 'White' },\n { id: 'blue', name: 'Blue' },\n { id: 'red', name: 'Red' },\n ];\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <Stack direction=\"column\" gap=\"200\">\n <Text fontSize=\"sm\" fontWeight=\"semibold\">Size</Text>\n <TagGroup.Root\n aria-label=\"Select sizes\"\n selectionMode=\"multiple\"\n selectedKeys={selectedSizes}\n onSelectionChange={setSelectedSizes}\n size=\"sm\"\n >\n <TagGroup.TagList items={sizes}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Stack>\n\n <Stack direction=\"column\" gap=\"200\">\n <Text fontSize=\"sm\" fontWeight=\"semibold\">Color</Text>\n <TagGroup.Root\n aria-label=\"Select colors\"\n selectionMode=\"multiple\"\n selectedKeys={selectedColors}\n onSelectionChange={setSelectedColors}\n size=\"sm\"\n colorPalette=\"purple\"\n >\n <TagGroup.TagList items={colors}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Stack>\n\n <Text fontSize=\"sm\" color=\"fg.muted\">\n Filters: {selectedSizes.size + selectedColors.size} selected\n </Text>\n </Stack>\n );\n}\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using TagGroup 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 tags\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TagGroup, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TagGroup - Basic rendering\", () => {\n it(\"renders tags with content\", () => {\n render(\n <NimbusProvider>\n <TagGroup.Root aria-label=\"Categories\">\n <TagGroup.TagList>\n <TagGroup.Tag>Electronics</TagGroup.Tag>\n <TagGroup.Tag>Clothing</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Electronics\")).toBeInTheDocument();\n expect(screen.getByText(\"Clothing\")).toBeInTheDocument();\n });\n\n it(\"renders with dynamic items\", () => {\n const items = [\n { id: \"electronics\", name: \"Electronics\" },\n { id: \"clothing\", name: \"Clothing\" },\n ];\n\n render(\n <NimbusProvider>\n <TagGroup.Root aria-label=\"Categories\">\n <TagGroup.TagList items={items}>\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Electronics\")).toBeInTheDocument();\n expect(screen.getByText(\"Clothing\")).toBeInTheDocument();\n });\n});\n```\n\n### Selection Tests\n\nTest single and multiple selection modes\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TagGroup, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TagGroup - Selection\", () => {\n it(\"handles single selection\", async () => {\n const user = userEvent.setup();\n const handleSelectionChange = vi.fn();\n\n render(\n <NimbusProvider>\n <TagGroup.Root\n aria-label=\"Priority\"\n selectionMode=\"single\"\n onSelectionChange={handleSelectionChange}\n >\n <TagGroup.TagList>\n <TagGroup.Tag id=\"low\">Low</TagGroup.Tag>\n <TagGroup.Tag id=\"high\">High</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n const lowTag = screen.getByText(\"Low\");\n await user.click(lowTag);\n\n await waitFor(() => {\n expect(handleSelectionChange).toHaveBeenCalled();\n const selection = handleSelectionChange.mock.calls[0][0];\n expect(selection.has(\"low\")).toBe(true);\n });\n });\n\n it(\"handles multiple selection\", async () => {\n const user = userEvent.setup();\n const handleSelectionChange = vi.fn();\n\n render(\n <NimbusProvider>\n <TagGroup.Root\n aria-label=\"Filters\"\n selectionMode=\"multiple\"\n onSelectionChange={handleSelectionChange}\n >\n <TagGroup.TagList>\n <TagGroup.Tag id=\"tag1\">Tag 1</TagGroup.Tag>\n <TagGroup.Tag id=\"tag2\">Tag 2</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n await user.click(screen.getByText(\"Tag 1\"));\n await user.click(screen.getByText(\"Tag 2\"));\n\n await waitFor(() => {\n expect(handleSelectionChange).toHaveBeenCalledTimes(2);\n });\n });\n});\n```\n\n### Removal Tests\n\nTest tag removal functionality\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TagGroup, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TagGroup - Removal\", () => {\n it(\"calls onRemove when remove button is clicked\", async () => {\n const user = userEvent.setup();\n const handleRemove = vi.fn();\n\n render(\n <NimbusProvider>\n <TagGroup.Root aria-label=\"Tags\" onRemove={handleRemove}>\n <TagGroup.TagList>\n <TagGroup.Tag id=\"tag1\">Tag 1</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n const removeButton = screen.getByLabelText(\"Remove tag\");\n await user.click(removeButton);\n\n await waitFor(() => {\n expect(handleRemove).toHaveBeenCalledWith(\n expect.objectContaining({\n has: expect.any(Function),\n })\n );\n });\n });\n\n it(\"removes tag with keyboard\", async () => {\n const user = userEvent.setup();\n const handleRemove = vi.fn();\n\n render(\n <NimbusProvider>\n <TagGroup.Root aria-label=\"Tags\" onRemove={handleRemove}>\n <TagGroup.TagList>\n <TagGroup.Tag id=\"tag1\">Tag 1</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n const tag = screen.getByText(\"Tag 1\");\n await user.click(tag);\n await user.keyboard(\"{Backspace}\");\n\n await waitFor(() => {\n expect(handleRemove).toHaveBeenCalled();\n });\n });\n});\n```\n\n### Keyboard Navigation Tests\n\nTest keyboard interactions\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport { TagGroup, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"TagGroup - Keyboard navigation\", () => {\n it(\"navigates between tags with arrow keys\", async () => {\n const user = userEvent.setup();\n\n render(\n <NimbusProvider>\n <TagGroup.Root aria-label=\"Tags\">\n <TagGroup.TagList>\n <TagGroup.Tag>First</TagGroup.Tag>\n <TagGroup.Tag>Second</TagGroup.Tag>\n <TagGroup.Tag>Third</TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </NimbusProvider>\n );\n\n // Tab to enter the tag group\n await user.tab();\n expect(document.activeElement?.textContent).toContain(\"First\");\n\n // Arrow right to next tag\n await user.keyboard(\"{ArrowRight}\");\n expect(document.activeElement?.textContent).toContain(\"Second\");\n\n // Arrow left to previous tag\n await user.keyboard(\"{ArrowLeft}\");\n expect(document.activeElement?.textContent).toContain(\"First\");\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-taggroup--docs)\n- [React Aria TagGroup](https://react-spectrum.adobe.com/react-aria/TagGroup.html)\n- [ARIA Tag Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tag/)\n",
|
|
215
|
+
"toc": [
|
|
216
|
+
{
|
|
217
|
+
"value": "Getting started",
|
|
218
|
+
"href": "#getting-started",
|
|
219
|
+
"depth": 2,
|
|
220
|
+
"numbering": [
|
|
221
|
+
1,
|
|
222
|
+
1
|
|
223
|
+
],
|
|
224
|
+
"parent": "root"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"value": "Import",
|
|
228
|
+
"href": "#import",
|
|
229
|
+
"depth": 3,
|
|
230
|
+
"numbering": [
|
|
231
|
+
1,
|
|
232
|
+
1,
|
|
233
|
+
1
|
|
234
|
+
],
|
|
235
|
+
"parent": "root"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"value": "Basic usage",
|
|
239
|
+
"href": "#basic-usage",
|
|
240
|
+
"depth": 3,
|
|
241
|
+
"numbering": [
|
|
242
|
+
1,
|
|
243
|
+
1,
|
|
244
|
+
2
|
|
245
|
+
],
|
|
246
|
+
"parent": "root"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"value": "Usage examples",
|
|
250
|
+
"href": "#usage-examples",
|
|
251
|
+
"depth": 2,
|
|
252
|
+
"numbering": [
|
|
253
|
+
1,
|
|
254
|
+
2
|
|
255
|
+
],
|
|
256
|
+
"parent": "root"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"value": "Size options",
|
|
260
|
+
"href": "#size-options",
|
|
261
|
+
"depth": 3,
|
|
262
|
+
"numbering": [
|
|
263
|
+
1,
|
|
264
|
+
2,
|
|
265
|
+
1
|
|
266
|
+
],
|
|
267
|
+
"parent": "root"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"value": "Dynamic collections with items",
|
|
271
|
+
"href": "#dynamic-collections-with-items",
|
|
272
|
+
"depth": 3,
|
|
273
|
+
"numbering": [
|
|
274
|
+
1,
|
|
275
|
+
2,
|
|
276
|
+
2
|
|
277
|
+
],
|
|
278
|
+
"parent": "root"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"value": "Color palette",
|
|
282
|
+
"href": "#color-palette",
|
|
283
|
+
"depth": 3,
|
|
284
|
+
"numbering": [
|
|
285
|
+
1,
|
|
286
|
+
2,
|
|
287
|
+
3
|
|
288
|
+
],
|
|
289
|
+
"parent": "root"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"value": "Removable tags",
|
|
293
|
+
"href": "#removable-tags",
|
|
294
|
+
"depth": 3,
|
|
295
|
+
"numbering": [
|
|
296
|
+
1,
|
|
297
|
+
2,
|
|
298
|
+
4
|
|
299
|
+
],
|
|
300
|
+
"parent": "root"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"value": "Single selection",
|
|
304
|
+
"href": "#single-selection",
|
|
305
|
+
"depth": 3,
|
|
306
|
+
"numbering": [
|
|
307
|
+
1,
|
|
308
|
+
2,
|
|
309
|
+
5
|
|
310
|
+
],
|
|
311
|
+
"parent": "root"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"value": "Multiple selection",
|
|
315
|
+
"href": "#multiple-selection",
|
|
316
|
+
"depth": 3,
|
|
317
|
+
"numbering": [
|
|
318
|
+
1,
|
|
319
|
+
2,
|
|
320
|
+
6
|
|
321
|
+
],
|
|
322
|
+
"parent": "root"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"value": "Disabled state",
|
|
326
|
+
"href": "#disabled-state",
|
|
327
|
+
"depth": 3,
|
|
328
|
+
"numbering": [
|
|
329
|
+
1,
|
|
330
|
+
2,
|
|
331
|
+
7
|
|
332
|
+
],
|
|
333
|
+
"parent": "root"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"value": "Component requirements",
|
|
337
|
+
"href": "#component-requirements",
|
|
338
|
+
"depth": 2,
|
|
339
|
+
"numbering": [
|
|
340
|
+
1,
|
|
341
|
+
3
|
|
342
|
+
],
|
|
343
|
+
"parent": "root"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"value": "Accessibility",
|
|
347
|
+
"href": "#accessibility",
|
|
348
|
+
"depth": 2,
|
|
349
|
+
"numbering": [
|
|
350
|
+
1,
|
|
351
|
+
4
|
|
352
|
+
],
|
|
353
|
+
"parent": "root"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"value": "Keyboard navigation",
|
|
357
|
+
"href": "#keyboard-navigation",
|
|
358
|
+
"depth": 4,
|
|
359
|
+
"numbering": [
|
|
360
|
+
1,
|
|
361
|
+
4,
|
|
362
|
+
1,
|
|
363
|
+
1
|
|
364
|
+
],
|
|
365
|
+
"parent": "root"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"value": "API reference",
|
|
369
|
+
"href": "#api-reference",
|
|
370
|
+
"depth": 2,
|
|
371
|
+
"numbering": [
|
|
372
|
+
1,
|
|
373
|
+
5
|
|
374
|
+
],
|
|
375
|
+
"parent": "root"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"value": "Common patterns",
|
|
379
|
+
"href": "#common-patterns",
|
|
380
|
+
"depth": 2,
|
|
381
|
+
"numbering": [
|
|
382
|
+
1,
|
|
383
|
+
6
|
|
384
|
+
],
|
|
385
|
+
"parent": "root"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"value": "Filter chips with removal",
|
|
389
|
+
"href": "#filter-chips-with-removal",
|
|
390
|
+
"depth": 3,
|
|
391
|
+
"numbering": [
|
|
392
|
+
1,
|
|
393
|
+
6,
|
|
394
|
+
1
|
|
395
|
+
],
|
|
396
|
+
"parent": "root"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"value": "Category selector",
|
|
400
|
+
"href": "#category-selector",
|
|
401
|
+
"depth": 3,
|
|
402
|
+
"numbering": [
|
|
403
|
+
1,
|
|
404
|
+
6,
|
|
405
|
+
2
|
|
406
|
+
],
|
|
407
|
+
"parent": "root"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"value": "Multi-select filter",
|
|
411
|
+
"href": "#multi-select-filter",
|
|
412
|
+
"depth": 3,
|
|
413
|
+
"numbering": [
|
|
414
|
+
1,
|
|
415
|
+
6,
|
|
416
|
+
3
|
|
417
|
+
],
|
|
418
|
+
"parent": "root"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"value": "Testing your implementation",
|
|
422
|
+
"href": "#testing-your-implementation",
|
|
423
|
+
"depth": 2,
|
|
424
|
+
"numbering": [
|
|
425
|
+
1,
|
|
426
|
+
7
|
|
427
|
+
],
|
|
428
|
+
"parent": "root"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"value": "Basic Rendering Tests",
|
|
432
|
+
"href": "#basic-rendering-tests",
|
|
433
|
+
"depth": 3,
|
|
434
|
+
"numbering": [
|
|
435
|
+
1,
|
|
436
|
+
7,
|
|
437
|
+
1
|
|
438
|
+
],
|
|
439
|
+
"parent": "root"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"value": "Selection Tests",
|
|
443
|
+
"href": "#selection-tests",
|
|
444
|
+
"depth": 3,
|
|
445
|
+
"numbering": [
|
|
446
|
+
1,
|
|
447
|
+
7,
|
|
448
|
+
2
|
|
449
|
+
],
|
|
450
|
+
"parent": "root"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"value": "Removal Tests",
|
|
454
|
+
"href": "#removal-tests",
|
|
455
|
+
"depth": 3,
|
|
456
|
+
"numbering": [
|
|
457
|
+
1,
|
|
458
|
+
7,
|
|
459
|
+
3
|
|
460
|
+
],
|
|
461
|
+
"parent": "root"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"value": "Keyboard Navigation Tests",
|
|
465
|
+
"href": "#keyboard-navigation-tests",
|
|
466
|
+
"depth": 3,
|
|
467
|
+
"numbering": [
|
|
468
|
+
1,
|
|
469
|
+
7,
|
|
470
|
+
4
|
|
471
|
+
],
|
|
472
|
+
"parent": "root"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"value": "Resources",
|
|
476
|
+
"href": "#resources",
|
|
477
|
+
"depth": 2,
|
|
478
|
+
"numbering": [
|
|
479
|
+
1,
|
|
480
|
+
8
|
|
481
|
+
],
|
|
482
|
+
"parent": "root"
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
},
|
|
486
|
+
"guidelines": {
|
|
487
|
+
"mdx": "\n## Guidelines\n\nThese guidelines provide comprehensive direction for designing and developing\ntags within Nimbus.\n\n### Best practices\n\n- **Limit the number of tags:** Avoid overwhelming users with too many tags.\n- **Maintain consistent styling:** Ensure tags look and behave uniformly across\n the product.\n- **Provide clear affordance for removal:** If tags are removable, make the\n close icon visible and interactive.\n- **Do not mix toggle-able and removable tags within the same area:** These are\n different types of selective interactions, avoid mixing to avoid confusion and\n clear use in your interface.\n- **Single context:** Ensure all tags within a single group are relevant to one\n entity or topic (e.g., all tags describe a single product's features, or all\n tags represent filters applied to a list).\n- **Conciseness:** Keep tag labels short and easily readable (ideally one or two\n words). If the text is too long, it should be truncated, and a tooltip should\n reveal the full context.\n- **Logical ordering:** Arrange tags in a predictable, logical sequence, such as\n alphabetically, by date added, or by importance.\n- **Color consistency:** Use color consistently to convey meaning. Define a\n clear palette for status tags (e.g., Green for \"In Stock\") and neutral colors\n for simple categorization.\n- **Handling overflow:** Implement a clear strategy for managing too many tags\n (e.g., collapsing the list and showing a \"+X more\" count or allowing\n horizontal scrolling).\n\n### Usage\n\nTags are used to display keywords. They also help filter data, allowing users to\nnarrow down lists of items, and show selected options, representing choices in\nmulti-select inputs.\n\n> [!TIP]\\\n> When to use\n\n- **Displaying metadata/attributes:** To showcase several non-hierarchical\n attributes of an item (e.g., product size, material, color, collection name).\n- **Filtering statuses (interactive tags):** To show the user which filters are\n currently applied, often allowing them to click an 'x' to remove the filter\n immediately.\n- **Categorization (non-interactive tags):** To quickly label and organize\n content pieces (e.g., \"New,\" \"Beta,\" \"Requires Review\").\n- **Highlighting key status:** To draw attention to critical, secondary status\n information (e.g., \"Out of Stock,\" \"Draft\").\n\n> [!CAUTION]\\\n> When not to use\n\n- **Primary navigation:** Do not use tags to replace main menu links or primary\n navigation structures.\n- **Long sentences/descriptions:** If you need to convey complex sentences or\n lengthy descriptions, use standard body text or a detail panel instead.\n- **Too many options:** If the list of possible tags is extremely long and\n variable (over 10-15 per group), consider using a multi-select dropdown with\n categorization instead.\n- **Destructive actions:** Tags should not be used as the sole trigger for\n complex, destructive, or irreversible actions.\n- **Mixing toggle-able and removable tags:** is not a good use of tooling, it\n creates a very confusing experience for users.\n\n### Tags and tag group in use\n\n> [!TIP]\\\n> **Do**\n>\n> - Do keep tag phrases short and descriptive.\n> - Do keep removable tags easy to remove, and toggle-able tags easy to click.\n> Avoid moving them or shuffling them while a user is interacting with them.\n> Moving targets are harder to click.\n> - Do keep styling and sizing consistent within the same context.\n> - Do limit the amount of tags per context to not overwhelm the UI.\n\n```jsx live\nconst App = () => {\n const [selected, setSelected] = useState(\n new Set([\"pop\", \"jazz\", \"hip-hop\", \"reggae\"])\n );\n\n const musicGenres = [\n { id: \"rock\", name: \"Rock\" },\n { id: \"pop\", name: \"Pop\" },\n { id: \"jazz\", name: \"Jazz\" },\n { id: \"hip-hop\", name: \"Hip Hop\" },\n { id: \"classical\", name: \"Classical\" },\n { id: \"reggae\", name: \"Reggae\" },\n { id: \"electronic\", name: \"Electronic\" },\n { id: \"country\", name: \"Country\" },\n ];\n\n return (\n <Box width=\"9600\">\n <TagGroup.Root\n aria-label=\"Music genres\"\n selectionMode=\"multiple\"\n selectedKeys={selected}\n onSelectionChange={setSelected}\n >\n <TagGroup.TagList items={musicGenres} gap=\"300\">\n {(item) => <TagGroup.Tag>{item.name}</TagGroup.Tag>}\n </TagGroup.TagList>\n </TagGroup.Root>\n </Box>\n );\n};\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don’t use long, multi-word phrases for tags.\n> - Don't mix clearable or toggle status within tag groups. All should have the\n> same functions within the same context.\n> - Don't overload the UI with an excessive number of tags.\n> - Don't use colors that are a misuse of semantic meanings. Use the neutral\n> color options if colors are meant to show variety.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"300\">\n <Text fontWeight=\"700\">Select music categories</Text>\n <Flex gap=\"300\" flexWrap=\"wrap\">\n <TagGroup.Root aria-label=\"non-removable music tags\" selectionMode=\"none\">\n <TagGroup.TagList gap=\"300\">\n <TagGroup.Tag id=\"pop\" colorPalette=\"warning\">\n Pop\n </TagGroup.Tag>\n <TagGroup.Tag id=\"jazz\" colorPalette=\"positive\">\n Jazz\n </TagGroup.Tag>\n <TagGroup.Tag id=\"reggae\" colorPalette=\"warning\">\n Reggae\n </TagGroup.Tag>\n <TagGroup.Tag id=\"electronic\" colorPalette=\"critical\">\n Electronic\n </TagGroup.Tag>\n <TagGroup.Tag id=\"hip-hop\" colorPalette=\"positive\">\n Hip Hop\n </TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n <TagGroup.Root\n aria-label=\"removable music tags\"\n selectionMode=\"none\"\n onRemove={() => {}}\n >\n <TagGroup.TagList gap=\"300\">\n <TagGroup.Tag id=\"rock\" colorPalette=\"critical\">\n Rock\n </TagGroup.Tag>\n <TagGroup.Tag id=\"classical\" colorPalette=\"warning\">\n Classical\n </TagGroup.Tag>\n <TagGroup.Tag id=\"country\" colorPalette=\"critical\">\n Country\n </TagGroup.Tag>\n </TagGroup.TagList>\n </TagGroup.Root>\n </Flex>\n </Stack>\n);\n```\n",
|
|
488
|
+
"toc": [
|
|
489
|
+
{
|
|
490
|
+
"value": "Guidelines",
|
|
491
|
+
"href": "#guidelines",
|
|
492
|
+
"depth": 2,
|
|
493
|
+
"numbering": [
|
|
494
|
+
1,
|
|
495
|
+
1
|
|
496
|
+
],
|
|
497
|
+
"parent": "root"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"value": "Best practices",
|
|
501
|
+
"href": "#best-practices",
|
|
502
|
+
"depth": 3,
|
|
503
|
+
"numbering": [
|
|
504
|
+
1,
|
|
505
|
+
1,
|
|
506
|
+
1
|
|
507
|
+
],
|
|
508
|
+
"parent": "root"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"value": "Usage",
|
|
512
|
+
"href": "#usage",
|
|
513
|
+
"depth": 3,
|
|
514
|
+
"numbering": [
|
|
515
|
+
1,
|
|
516
|
+
1,
|
|
517
|
+
2
|
|
518
|
+
],
|
|
519
|
+
"parent": "root"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"value": "Tags and tag group in use",
|
|
523
|
+
"href": "#tags-and-tag-group-in-use",
|
|
524
|
+
"depth": 3,
|
|
525
|
+
"numbering": [
|
|
526
|
+
1,
|
|
527
|
+
1,
|
|
528
|
+
3
|
|
529
|
+
],
|
|
530
|
+
"parent": "root"
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Data Display",
|
|
4
|
+
"title": "Data Display",
|
|
5
|
+
"description": "Components for presenting data or visual content.",
|
|
6
|
+
"order": 8,
|
|
7
|
+
"repoPath": "packages/nimbus/src/docs/data-display.mdx",
|
|
8
|
+
"menu": [
|
|
9
|
+
"Components",
|
|
10
|
+
"Data Display"
|
|
11
|
+
],
|
|
12
|
+
"route": "components/data-display",
|
|
13
|
+
"tags": [
|
|
14
|
+
"document"
|
|
15
|
+
],
|
|
16
|
+
"toc": [],
|
|
17
|
+
"icon": "TableView",
|
|
18
|
+
"layout": "app-frame",
|
|
19
|
+
"tabs": [
|
|
20
|
+
{
|
|
21
|
+
"key": "overview",
|
|
22
|
+
"title": "Overview",
|
|
23
|
+
"order": 0
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"mdx": "\n# Data Display\n\nComponents for presenting data or visual content.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
28
|
+
"views": {
|
|
29
|
+
"overview": {
|
|
30
|
+
"mdx": "\n# Data Display\n\nComponents for presenting data or visual content.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
31
|
+
"toc": []
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|