@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,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Buttons",
|
|
4
|
+
"title": "Buttons",
|
|
5
|
+
"description": "Components for triggering actions, submitting forms, and navigation.",
|
|
6
|
+
"order": 3,
|
|
7
|
+
"repoPath": "packages/nimbus/src/docs/buttons.mdx",
|
|
8
|
+
"menu": [
|
|
9
|
+
"Components",
|
|
10
|
+
"Buttons"
|
|
11
|
+
],
|
|
12
|
+
"route": "components/buttons",
|
|
13
|
+
"tags": [
|
|
14
|
+
"buttons",
|
|
15
|
+
"actions",
|
|
16
|
+
"interactions"
|
|
17
|
+
],
|
|
18
|
+
"toc": [],
|
|
19
|
+
"icon": "SmartButton",
|
|
20
|
+
"layout": "app-frame",
|
|
21
|
+
"tabs": [
|
|
22
|
+
{
|
|
23
|
+
"key": "overview",
|
|
24
|
+
"title": "Overview",
|
|
25
|
+
"order": 0
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"mdx": " \n\n# Buttons \n\nComponents for triggering actions, submitting forms, and navigation.\n\n<CategoryOverview variant=\"list\" />",
|
|
30
|
+
"views": {
|
|
31
|
+
"overview": {
|
|
32
|
+
"mdx": " \n\n# Buttons \n\nComponents for triggering actions, submitting forms, and navigation.\n\n<CategoryOverview variant=\"list\" />",
|
|
33
|
+
"toc": []
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Badge",
|
|
4
|
+
"title": "Badge",
|
|
5
|
+
"exportName": "Badge",
|
|
6
|
+
"description": "Briefly highlights or categorizes associated UI elements with concise visual cues for status or metadata.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/badge/badge.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Data Display",
|
|
13
|
+
"Badge"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/data-display/badge",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"badge",
|
|
19
|
+
"label",
|
|
20
|
+
"status",
|
|
21
|
+
"indicator"
|
|
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": "Size",
|
|
57
|
+
"href": "#size",
|
|
58
|
+
"depth": 3,
|
|
59
|
+
"numbering": [
|
|
60
|
+
1,
|
|
61
|
+
2,
|
|
62
|
+
1
|
|
63
|
+
],
|
|
64
|
+
"parent": "root"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"value": "Medium",
|
|
68
|
+
"href": "#medium",
|
|
69
|
+
"depth": 4,
|
|
70
|
+
"numbering": [
|
|
71
|
+
1,
|
|
72
|
+
2,
|
|
73
|
+
1,
|
|
74
|
+
1
|
|
75
|
+
],
|
|
76
|
+
"parent": "root"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "X-small",
|
|
80
|
+
"href": "#x-small",
|
|
81
|
+
"depth": 4,
|
|
82
|
+
"numbering": [
|
|
83
|
+
1,
|
|
84
|
+
2,
|
|
85
|
+
1,
|
|
86
|
+
2
|
|
87
|
+
],
|
|
88
|
+
"parent": "root"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"value": "2X-small",
|
|
92
|
+
"href": "#2x-small",
|
|
93
|
+
"depth": 4,
|
|
94
|
+
"numbering": [
|
|
95
|
+
1,
|
|
96
|
+
2,
|
|
97
|
+
1,
|
|
98
|
+
3
|
|
99
|
+
],
|
|
100
|
+
"parent": "root"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"value": "Visual options",
|
|
104
|
+
"href": "#visual-options",
|
|
105
|
+
"depth": 3,
|
|
106
|
+
"numbering": [
|
|
107
|
+
1,
|
|
108
|
+
2,
|
|
109
|
+
2
|
|
110
|
+
],
|
|
111
|
+
"parent": "root"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"value": "Semantic colors",
|
|
115
|
+
"href": "#semantic-colors",
|
|
116
|
+
"depth": 4,
|
|
117
|
+
"numbering": [
|
|
118
|
+
1,
|
|
119
|
+
2,
|
|
120
|
+
2,
|
|
121
|
+
1
|
|
122
|
+
],
|
|
123
|
+
"parent": "root"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"value": "Custom colors",
|
|
127
|
+
"href": "#custom-colors",
|
|
128
|
+
"depth": 4,
|
|
129
|
+
"numbering": [
|
|
130
|
+
1,
|
|
131
|
+
2,
|
|
132
|
+
2,
|
|
133
|
+
2
|
|
134
|
+
],
|
|
135
|
+
"parent": "root"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"layout": "app-frame",
|
|
139
|
+
"tabs": [
|
|
140
|
+
{
|
|
141
|
+
"key": "overview",
|
|
142
|
+
"title": "Overview",
|
|
143
|
+
"order": 0
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"key": "guidelines",
|
|
147
|
+
"title": "Guidelines",
|
|
148
|
+
"order": 2
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"key": "dev",
|
|
152
|
+
"title": "Implementation",
|
|
153
|
+
"order": 3
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"key": "a11y",
|
|
157
|
+
"title": "Accessibility",
|
|
158
|
+
"order": 4
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"mdx": "\n## Overview\n\nBadges are small, visually distinct labels used to highlight status, category,\nor counts associated with other UI elements. They feature concise text and\ncustomizable styling for clear communication without overwhelming the primary\ncontent.\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=2656-4636&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Size\n\n#### Medium\n\nThis is the default size.\n\n```jsx live\nconst App = () => (\n <Badge colorPalette=\"primary\" size=\"md\">\n <Icons.SentimentSatisfied />\n Badge\n <Icons.SentimentSatisfied />\n </Badge>\n)\n```\n\n#### X-small\n\nFor uses where several badges will be shown at one time.\n\n```jsx live\nconst App = () => (\n <Badge colorPalette=\"primary\" size=\"xs\">\n <Icons.SentimentSatisfied />\n Badge\n <Icons.SentimentSatisfied />\n </Badge>\n)\n```\n\n#### 2X-small\n\nUse these when there are a more than a few badges at one time, or to be less\ndistracting to let the user focus on other parts of the surrounding page.\n\n```jsx live\nconst App = () => (\n <Badge colorPalette=\"primary\" size=\"2xs\">\n <Icons.SentimentSatisfied />\n Badge\n <Icons.SentimentSatisfied />\n </Badge>\n)\n```\n\n### Visual options\n\nBadges can be set to use either the semantic color palette or any other radix\ncolor. When pairing new radix colors, the formula uses the 3rd color shade for\nthe background and the 11th for text to maintain text accessibility.\n\n#### Semantic colors\n\nWhen a badge is supposed to convey a specific and consistent meaning, use these\npredefined color options.\n\n```jsx live\nconst App = () => {\n const semanticColors = ['info', 'primary', 'positive', 'critical', 'warning', 'neutral'];\n\n return (\n <Stack direction=\"horizontal\" gap=\"400\" alignItems=\"center\" flexWrap=\"wrap\">\n {semanticColors.map(color => (\n <Badge key={color} colorPalette={color}>{color}</Badge>\n ))}\n </Stack>\n )\n}\n```\n\n#### Custom colors\n\nWhen the color of the badge serves a purely aesthetic purpose, or the semantic\ncolor palette does not offer enough options, use any of these available options\nfrom our color palette.\n\n```jsx live\nconst App = () => {\n const customColors = ['teal', 'pink', 'mint'];\n\n return (\n <Stack direction=\"horizontal\" gap=\"400\" alignItems=\"center\" flexWrap=\"wrap\">\n {customColors.map(color => (\n <Badge key={color} colorPalette={color}>{color}</Badge>\n ))}\n </Stack>\n )\n}\n```\n",
|
|
163
|
+
"views": {
|
|
164
|
+
"overview": {
|
|
165
|
+
"mdx": "\n## Overview\n\nBadges are small, visually distinct labels used to highlight status, category,\nor counts associated with other UI elements. They feature concise text and\ncustomizable styling for clear communication without overwhelming the primary\ncontent.\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=2656-4636&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Size\n\n#### Medium\n\nThis is the default size.\n\n```jsx live\nconst App = () => (\n <Badge colorPalette=\"primary\" size=\"md\">\n <Icons.SentimentSatisfied />\n Badge\n <Icons.SentimentSatisfied />\n </Badge>\n)\n```\n\n#### X-small\n\nFor uses where several badges will be shown at one time.\n\n```jsx live\nconst App = () => (\n <Badge colorPalette=\"primary\" size=\"xs\">\n <Icons.SentimentSatisfied />\n Badge\n <Icons.SentimentSatisfied />\n </Badge>\n)\n```\n\n#### 2X-small\n\nUse these when there are a more than a few badges at one time, or to be less\ndistracting to let the user focus on other parts of the surrounding page.\n\n```jsx live\nconst App = () => (\n <Badge colorPalette=\"primary\" size=\"2xs\">\n <Icons.SentimentSatisfied />\n Badge\n <Icons.SentimentSatisfied />\n </Badge>\n)\n```\n\n### Visual options\n\nBadges can be set to use either the semantic color palette or any other radix\ncolor. When pairing new radix colors, the formula uses the 3rd color shade for\nthe background and the 11th for text to maintain text accessibility.\n\n#### Semantic colors\n\nWhen a badge is supposed to convey a specific and consistent meaning, use these\npredefined color options.\n\n```jsx live\nconst App = () => {\n const semanticColors = ['info', 'primary', 'positive', 'critical', 'warning', 'neutral'];\n\n return (\n <Stack direction=\"horizontal\" gap=\"400\" alignItems=\"center\" flexWrap=\"wrap\">\n {semanticColors.map(color => (\n <Badge key={color} colorPalette={color}>{color}</Badge>\n ))}\n </Stack>\n )\n}\n```\n\n#### Custom colors\n\nWhen the color of the badge serves a purely aesthetic purpose, or the semantic\ncolor palette does not offer enough options, use any of these available options\nfrom our color palette.\n\n```jsx live\nconst App = () => {\n const customColors = ['teal', 'pink', 'mint'];\n\n return (\n <Stack direction=\"horizontal\" gap=\"400\" alignItems=\"center\" flexWrap=\"wrap\">\n {customColors.map(color => (\n <Badge key={color} colorPalette={color}>{color}</Badge>\n ))}\n </Stack>\n )\n}\n```\n",
|
|
166
|
+
"toc": [
|
|
167
|
+
{
|
|
168
|
+
"value": "Overview",
|
|
169
|
+
"href": "#overview",
|
|
170
|
+
"depth": 2,
|
|
171
|
+
"numbering": [
|
|
172
|
+
1,
|
|
173
|
+
1
|
|
174
|
+
],
|
|
175
|
+
"parent": "root"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"value": "Resources",
|
|
179
|
+
"href": "#resources",
|
|
180
|
+
"depth": 3,
|
|
181
|
+
"numbering": [
|
|
182
|
+
1,
|
|
183
|
+
1,
|
|
184
|
+
1
|
|
185
|
+
],
|
|
186
|
+
"parent": "root"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"value": "Variables",
|
|
190
|
+
"href": "#variables",
|
|
191
|
+
"depth": 2,
|
|
192
|
+
"numbering": [
|
|
193
|
+
1,
|
|
194
|
+
2
|
|
195
|
+
],
|
|
196
|
+
"parent": "root"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"value": "Size",
|
|
200
|
+
"href": "#size",
|
|
201
|
+
"depth": 3,
|
|
202
|
+
"numbering": [
|
|
203
|
+
1,
|
|
204
|
+
2,
|
|
205
|
+
1
|
|
206
|
+
],
|
|
207
|
+
"parent": "root"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"value": "Medium",
|
|
211
|
+
"href": "#medium",
|
|
212
|
+
"depth": 4,
|
|
213
|
+
"numbering": [
|
|
214
|
+
1,
|
|
215
|
+
2,
|
|
216
|
+
1,
|
|
217
|
+
1
|
|
218
|
+
],
|
|
219
|
+
"parent": "root"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"value": "X-small",
|
|
223
|
+
"href": "#x-small",
|
|
224
|
+
"depth": 4,
|
|
225
|
+
"numbering": [
|
|
226
|
+
1,
|
|
227
|
+
2,
|
|
228
|
+
1,
|
|
229
|
+
2
|
|
230
|
+
],
|
|
231
|
+
"parent": "root"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"value": "2X-small",
|
|
235
|
+
"href": "#2x-small",
|
|
236
|
+
"depth": 4,
|
|
237
|
+
"numbering": [
|
|
238
|
+
1,
|
|
239
|
+
2,
|
|
240
|
+
1,
|
|
241
|
+
3
|
|
242
|
+
],
|
|
243
|
+
"parent": "root"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"value": "Visual options",
|
|
247
|
+
"href": "#visual-options",
|
|
248
|
+
"depth": 3,
|
|
249
|
+
"numbering": [
|
|
250
|
+
1,
|
|
251
|
+
2,
|
|
252
|
+
2
|
|
253
|
+
],
|
|
254
|
+
"parent": "root"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"value": "Semantic colors",
|
|
258
|
+
"href": "#semantic-colors",
|
|
259
|
+
"depth": 4,
|
|
260
|
+
"numbering": [
|
|
261
|
+
1,
|
|
262
|
+
2,
|
|
263
|
+
2,
|
|
264
|
+
1
|
|
265
|
+
],
|
|
266
|
+
"parent": "root"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"value": "Custom colors",
|
|
270
|
+
"href": "#custom-colors",
|
|
271
|
+
"depth": 4,
|
|
272
|
+
"numbering": [
|
|
273
|
+
1,
|
|
274
|
+
2,
|
|
275
|
+
2,
|
|
276
|
+
2
|
|
277
|
+
],
|
|
278
|
+
"parent": "root"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
"a11y": {
|
|
283
|
+
"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 <Badge\n data-testid=\"status-badge\"\n aria-label=\"Status: Active\"\n colorPalette=\"primary\"\n >\n <Icons.StarOutline />\n I am a badge\n </Badge>\n)\n```\n\n### Accessibility standards\n\n- Always provide a meaningful label. If a visible label is not used, provide an\n aria-label for screen readers.\n- Ensure sufficient color contrast for all elements (text and background).\n- Avoid relying on color alone to convey information.\n- Clearly indicate keyboard focus when interactive.\n- Support keyboard navigation (e.g., `Tab`, `Space`, `Enter`).\n- Manage text overflow (wrap text or truncate with a tooltip).\n- Use descriptive `aria-describedby` if attached to an interactive element.\n- Include a tooltip for icon-only badges.\n\n### Resources\n\n- [Adobe Spectrum Design System](https://spectrum.adobe.com/page/badge/)\n- [React Spectrum](https://react-spectrum.adobe.com/react-aria/useBadge.html)\n- [W3C ARIA Authoring Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/patterns/badge/)\n (Search for \"Badge\" patterns or general guidance on status indicators)\n",
|
|
284
|
+
"toc": [
|
|
285
|
+
{
|
|
286
|
+
"value": "Accessibility",
|
|
287
|
+
"href": "#accessibility",
|
|
288
|
+
"depth": 2,
|
|
289
|
+
"numbering": [
|
|
290
|
+
1,
|
|
291
|
+
1
|
|
292
|
+
],
|
|
293
|
+
"parent": "root"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"value": "Accessibility standards",
|
|
297
|
+
"href": "#accessibility-standards",
|
|
298
|
+
"depth": 3,
|
|
299
|
+
"numbering": [
|
|
300
|
+
1,
|
|
301
|
+
1,
|
|
302
|
+
1
|
|
303
|
+
],
|
|
304
|
+
"parent": "root"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"value": "Resources",
|
|
308
|
+
"href": "#resources",
|
|
309
|
+
"depth": 3,
|
|
310
|
+
"numbering": [
|
|
311
|
+
1,
|
|
312
|
+
1,
|
|
313
|
+
2
|
|
314
|
+
],
|
|
315
|
+
"parent": "root"
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
"dev": {
|
|
320
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { Badge, type BadgeProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation uses the default size and color:\n\n```jsx live-dev\nconst App = () => (\n <Badge>Default Badge</Badge>\n)\n```\n\n## Usage examples\n\n### Size options\n\nThe `2xs`, `xs`, and `md` size variants are available to match your interface density:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Badge size=\"2xs\">2xs Badge</Badge>\n <Badge size=\"xs\">xs Badge</Badge>\n <Badge size=\"md\">md Badge</Badge>\n </Stack>\n)\n```\n\n### Visual variants\n\nBadges support color palettes to convey semantic meaning or match a theme:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <Badge colorPalette=\"primary\">Primary</Badge>\n <Badge colorPalette=\"positive\">Positive</Badge>\n <Badge colorPalette=\"info\">Info</Badge>\n <Badge colorPalette=\"critical\">Critical</Badge>\n <Badge colorPalette=\"cyan\">Cyan</Badge>\n </Stack>\n)\n```\n\n### With icons\n\nBadges can contain icons alongside text for enhanced visual communication:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <Badge>\n <Icons.SentimentSatisfied />\n Verified\n </Badge>\n <Badge colorPalette=\"critical\">\n <Icons.Error />\n Error\n </Badge>\n </Stack>\n)\n```\n\n## Component requirements\n\n## Accessibility\n\nThe Badge component handles most accessibility requirements internally. However, you should ensure that the badge content is accessible.\n\n- **Color Contrast**: The default color mappings (shade 3 for background, shade 11 for text) are designed to meet WCAG contrast requirements.\n- **Screen Readers**: The badge text is read normally by screen readers. If the badge conveys status (like \"Error\"), ensure the text or a visually hidden label clarifies this context if it's not obvious from the surrounding content.\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-badge\";\n\nexport const Example = () => (\n <Badge id={PERSISTENT_ID}>Status</Badge>\n);\n```\n\n#### Keyboard navigation\n\nBadges are non-interactive elements and do not receive focus or support keyboard interaction.\n\n## API reference\n\n<PropsTable id=\"Badge\" />\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using Badge 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 } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { Badge, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Badge - Basic rendering\", () => {\n it(\"renders content correctly\", () => {\n render(\n <NimbusProvider>\n <Badge>Status: Active</Badge>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Status: Active\")).toBeInTheDocument();\n });\n\n it(\"renders with icon and text\", () => {\n render(\n <NimbusProvider>\n <Badge>Verified</Badge>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Verified\")).toBeInTheDocument();\n });\n});\n```\n\n### Variant Rendering Tests\n\nTest rendering with different sizes and color palettes\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { Badge, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"Badge - Variants\", () => {\n it(\"renders with specific size\", () => {\n render(\n <NimbusProvider>\n <Badge size=\"xs\">Small Badge</Badge>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Small Badge\")).toBeInTheDocument();\n });\n\n it(\"renders with specific color palette\", () => {\n render(\n <NimbusProvider>\n <Badge colorPalette=\"critical\">Error</Badge>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Error\")).toBeInTheDocument();\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-badge--docs)\n\n",
|
|
321
|
+
"toc": [
|
|
322
|
+
{
|
|
323
|
+
"value": "Getting started",
|
|
324
|
+
"href": "#getting-started",
|
|
325
|
+
"depth": 2,
|
|
326
|
+
"numbering": [
|
|
327
|
+
1,
|
|
328
|
+
1
|
|
329
|
+
],
|
|
330
|
+
"parent": "root"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"value": "Import",
|
|
334
|
+
"href": "#import",
|
|
335
|
+
"depth": 3,
|
|
336
|
+
"numbering": [
|
|
337
|
+
1,
|
|
338
|
+
1,
|
|
339
|
+
1
|
|
340
|
+
],
|
|
341
|
+
"parent": "root"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"value": "Basic usage",
|
|
345
|
+
"href": "#basic-usage",
|
|
346
|
+
"depth": 3,
|
|
347
|
+
"numbering": [
|
|
348
|
+
1,
|
|
349
|
+
1,
|
|
350
|
+
2
|
|
351
|
+
],
|
|
352
|
+
"parent": "root"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"value": "Usage examples",
|
|
356
|
+
"href": "#usage-examples",
|
|
357
|
+
"depth": 2,
|
|
358
|
+
"numbering": [
|
|
359
|
+
1,
|
|
360
|
+
2
|
|
361
|
+
],
|
|
362
|
+
"parent": "root"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"value": "Size options",
|
|
366
|
+
"href": "#size-options",
|
|
367
|
+
"depth": 3,
|
|
368
|
+
"numbering": [
|
|
369
|
+
1,
|
|
370
|
+
2,
|
|
371
|
+
1
|
|
372
|
+
],
|
|
373
|
+
"parent": "root"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"value": "Visual variants",
|
|
377
|
+
"href": "#visual-variants",
|
|
378
|
+
"depth": 3,
|
|
379
|
+
"numbering": [
|
|
380
|
+
1,
|
|
381
|
+
2,
|
|
382
|
+
2
|
|
383
|
+
],
|
|
384
|
+
"parent": "root"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"value": "With icons",
|
|
388
|
+
"href": "#with-icons",
|
|
389
|
+
"depth": 3,
|
|
390
|
+
"numbering": [
|
|
391
|
+
1,
|
|
392
|
+
2,
|
|
393
|
+
3
|
|
394
|
+
],
|
|
395
|
+
"parent": "root"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"value": "Component requirements",
|
|
399
|
+
"href": "#component-requirements",
|
|
400
|
+
"depth": 2,
|
|
401
|
+
"numbering": [
|
|
402
|
+
1,
|
|
403
|
+
3
|
|
404
|
+
],
|
|
405
|
+
"parent": "root"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"value": "Accessibility",
|
|
409
|
+
"href": "#accessibility",
|
|
410
|
+
"depth": 2,
|
|
411
|
+
"numbering": [
|
|
412
|
+
1,
|
|
413
|
+
4
|
|
414
|
+
],
|
|
415
|
+
"parent": "root"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"value": "Keyboard navigation",
|
|
419
|
+
"href": "#keyboard-navigation",
|
|
420
|
+
"depth": 4,
|
|
421
|
+
"numbering": [
|
|
422
|
+
1,
|
|
423
|
+
4,
|
|
424
|
+
1,
|
|
425
|
+
1
|
|
426
|
+
],
|
|
427
|
+
"parent": "root"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"value": "API reference",
|
|
431
|
+
"href": "#api-reference",
|
|
432
|
+
"depth": 2,
|
|
433
|
+
"numbering": [
|
|
434
|
+
1,
|
|
435
|
+
5
|
|
436
|
+
],
|
|
437
|
+
"parent": "root"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"value": "Testing your implementation",
|
|
441
|
+
"href": "#testing-your-implementation",
|
|
442
|
+
"depth": 2,
|
|
443
|
+
"numbering": [
|
|
444
|
+
1,
|
|
445
|
+
6
|
|
446
|
+
],
|
|
447
|
+
"parent": "root"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"value": "Basic Rendering Tests",
|
|
451
|
+
"href": "#basic-rendering-tests",
|
|
452
|
+
"depth": 3,
|
|
453
|
+
"numbering": [
|
|
454
|
+
1,
|
|
455
|
+
6,
|
|
456
|
+
1
|
|
457
|
+
],
|
|
458
|
+
"parent": "root"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"value": "Variant Rendering Tests",
|
|
462
|
+
"href": "#variant-rendering-tests",
|
|
463
|
+
"depth": 3,
|
|
464
|
+
"numbering": [
|
|
465
|
+
1,
|
|
466
|
+
6,
|
|
467
|
+
2
|
|
468
|
+
],
|
|
469
|
+
"parent": "root"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"value": "Resources",
|
|
473
|
+
"href": "#resources",
|
|
474
|
+
"depth": 2,
|
|
475
|
+
"numbering": [
|
|
476
|
+
1,
|
|
477
|
+
7
|
|
478
|
+
],
|
|
479
|
+
"parent": "root"
|
|
480
|
+
}
|
|
481
|
+
]
|
|
482
|
+
},
|
|
483
|
+
"guidelines": {
|
|
484
|
+
"mdx": "\n## Guidelines\n\nBadge guidelines ensure small, clear visual cues that highlight status or\nmetadata without overwhelming UI.\n\n### Best practices\n\n- **Be concise**: Keep badge labels short and to the point (ideally 1-2 words or\n a small number).\n- **Use purposefully**: Only use badges to highlight truly important information\n or status; avoid overusing them.\n- **Maintain visual hierarchy**: Ensure badges are visually less prominent than\n the elements they annotate.\n- **Employ semantic colors**: Use established color palettes to consistently\n indicate meaning (e.g., green for success, red for error).\n- **Place strategically**: Position badges consistently in relation to their\n associated elements for easy recognition.\n- **Provide context**: If an icon-only badge is used, ensure a tooltip or\n surrounding context clarifies its meaning.\n\n### Usage\n\nBadges are small labels that highlight relevant metadata without overwhelming\nthe primary content, often using color and short text or icons to quickly convey\nmeaning. They are commonly found attached to navigation items, buttons, lists,\nand avatars to draw attention to updates, counts, or specific attributes.\n\n#### Should I use badges or tags?\n\n- **Tags** display items of the same category, or basically a list of things\n just styled more aesthetically (e.g., countries). An item can display more\n than one tag at once as a group.\n- **Badges** highlight the differences between the listed items (e.g., status:\n Published, Modified, Rejected) and benefit from semantic color ways to convey\n process or status. An item should only show one badge; if you want to show\n more than one, use a tag instead.\n\n> [!TIP]\\\n> When to use\n\n- **Use for concise information:** Keep badge text short (1-2 words) for quick\n readability.\n- **Indicate status or category:** Clearly signal the state or classification of\n an associated element.\n- **Maintain visual hierarchy:** Ensure badges are visually subordinate to the\n elements they modify.\n- **Use color thoughtfully:** Employ color consistently to convey meaning (e.g.,\n green for positive, red for negative).\n- **Ensure accessibility:** Provide sufficient color contrast meeting at least\n AA requirements, and use ARIA attributes for screen readers.\n\n> [!CAUTION]\\\n> When not to use\n\n- **Don't overuse badges:** Reserve them for important highlights to avoid\n visual clutter.\n- **Don't use as headers:** Employ proper typography for establishing hierarchy.\n- **Don't use for lengthy feedback:** Use other UI elements for detailed\n messages.\n- **Don't rely solely on color:** Supplement color with text or icons for\n accessibility.\n- **Don't place them obstructively:** Ensure badges don't cover or interfere\n with primary content or interactions.\n\n### Semantic colors\n\nUse the established color palettes to consistently indicate meaning (if\napplicable) when using badges.\n\n> [!TIP]\\\n> **Do**\n>\n> - When communicating a success or positive state, use grass (green). For a\n> negative or critical state use tomato (red). If you need a warning state,\n> use yellow (amber). For default or neutral color options, use grey (slate),\n> blue, or purple (primary).\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\">\n <Badge colorPalette=\"positive\">Published</Badge>\n <Badge colorPalette=\"critical\">Expired</Badge>\n <Badge colorPalette=\"warning\">Modified</Badge>\n <Badge colorPalette=\"info\">Trial version</Badge>\n <Badge colorPalette=\"primary\">Premium</Badge>\n <Badge colorPalette=\"neutral\">Disabled</Badge>\n </Stack>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't trick your users when the common pattern will be to have the meaning\n> and color together.\n> - Do not use icons without label unless used with a tooltip label so users can\n> best understand the meaning of the badge.\n> - Don't rely solely on color to relate a state. Pairing colors with an icon\n> and short descriptive label will be the best experience for accessibility\n> standards.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\">\n <Badge colorPalette=\"positive\">Unpublish</Badge>\n <Badge colorPalette=\"critical\">Publish</Badge>\n <Badge colorPalette=\"warning\">\n <Icons.Campaign />\n </Badge>\n <Badge colorPalette=\"info\">Expired</Badge>\n <Badge colorPalette=\"primary\">\n <Icons.Delete /> Delete\n </Badge>\n <Badge colorPalette=\"neutral\">\n <Icons.FiberNew /> Updated\n </Badge>\n </Stack>\n);\n```\n\n### Purposeful uses\n\nTaking care not to overuse badges is important, they are great tools to help\nusers group or understand statuses, but overuse can be confusing and\noverwhelming.\n\n> [!TIP]\\\n> **Do**\n>\n> - Do use short and concise labels for badges, making sure not to overuse and\n> clutter the space for the user.\n> - If using icons, pair the icon with a label or a tooltip so the user can\n> understand the meaning.\n\n```jsx live\nconst App = () => (\n <Select.Root aria-label=\"Select...\" data-testid=\"select\" w=\"1/2\">\n <Select.Options>\n <Select.OptionGroup label=\"Projects\">\n <Select.Option>\n <Flex alignItems=\"center\" justifyContent=\"space-between\">\n <Text>Trial project</Text>\n <Badge colorPalette=\"critical\" size=\"xs\">\n Expired\n </Badge>\n </Flex>\n </Select.Option>\n <Select.Option>\n <Flex alignItems=\"center\" justifyContent=\"space-between\">\n <Text>Main project</Text>\n <Badge colorPalette=\"positive\" size=\"xs\">\n Production\n </Badge>\n </Flex>\n </Select.Option>\n </Select.OptionGroup>\n </Select.Options>\n </Select.Root>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Do not overuse badges.\n> - Do not be overly descriptive with labels. Keep language as short as\n> possible.\n\n```jsx live\nconst App = () => (\n <Select.Root aria-label=\"Select...\" data-testid=\"select\" w=\"1/2\">\n <Select.Options>\n <Select.OptionGroup label=\"Projects\">\n <Select.Option>\n <Flex alignItems=\"start\" justifyContent=\"space-between\">\n <Text>Trial project</Text>\n <Stack direction=\"column\" gap=\"100\" alignItems=\"end\">\n <Badge colorPalette=\"critical\" size=\"xs\">\n Expired\n </Badge>\n <Badge colorPalette=\"critical\" size=\"xs\">\n Suspended\n </Badge>\n <Badge colorPalette=\"critical\" size=\"xs\">\n Will be deleted soon, in 24 days\n </Badge>\n </Stack>\n </Flex>\n </Select.Option>\n <Select.Option>\n <Flex alignItems=\"start\" justifyContent=\"space-between\">\n <Text>Main project</Text>\n <Stack direction=\"column\" gap=\"100\" alignItems=\"end\">\n <Badge colorPalette=\"positive\" size=\"xs\">\n Production\n </Badge>\n <Badge colorPalette=\"warning\" size=\"xs\">\n Modified, needs updating\n </Badge>\n </Stack>\n </Flex>\n </Select.Option>\n </Select.OptionGroup>\n </Select.Options>\n </Select.Root>\n);\n```\n",
|
|
485
|
+
"toc": [
|
|
486
|
+
{
|
|
487
|
+
"value": "Guidelines",
|
|
488
|
+
"href": "#guidelines",
|
|
489
|
+
"depth": 2,
|
|
490
|
+
"numbering": [
|
|
491
|
+
1,
|
|
492
|
+
1
|
|
493
|
+
],
|
|
494
|
+
"parent": "root"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"value": "Best practices",
|
|
498
|
+
"href": "#best-practices",
|
|
499
|
+
"depth": 3,
|
|
500
|
+
"numbering": [
|
|
501
|
+
1,
|
|
502
|
+
1,
|
|
503
|
+
1
|
|
504
|
+
],
|
|
505
|
+
"parent": "root"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"value": "Usage",
|
|
509
|
+
"href": "#usage",
|
|
510
|
+
"depth": 3,
|
|
511
|
+
"numbering": [
|
|
512
|
+
1,
|
|
513
|
+
1,
|
|
514
|
+
2
|
|
515
|
+
],
|
|
516
|
+
"parent": "root"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"value": "Should I use badges or tags?",
|
|
520
|
+
"href": "#should-i-use-badges-or-tags",
|
|
521
|
+
"depth": 4,
|
|
522
|
+
"numbering": [
|
|
523
|
+
1,
|
|
524
|
+
1,
|
|
525
|
+
2,
|
|
526
|
+
1
|
|
527
|
+
],
|
|
528
|
+
"parent": "root"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"value": "Semantic colors",
|
|
532
|
+
"href": "#semantic-colors",
|
|
533
|
+
"depth": 3,
|
|
534
|
+
"numbering": [
|
|
535
|
+
1,
|
|
536
|
+
1,
|
|
537
|
+
3
|
|
538
|
+
],
|
|
539
|
+
"parent": "root"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"value": "Purposeful uses",
|
|
543
|
+
"href": "#purposeful-uses",
|
|
544
|
+
"depth": 3,
|
|
545
|
+
"numbering": [
|
|
546
|
+
1,
|
|
547
|
+
1,
|
|
548
|
+
4
|
|
549
|
+
],
|
|
550
|
+
"parent": "root"
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|