@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,388 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-VisuallyHidden",
|
|
4
|
+
"title": "Visually hidden",
|
|
5
|
+
"exportName": "VisuallyHidden",
|
|
6
|
+
"description": "Makes content accessible to screen readers but hides it visually.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/visually-hidden/visually-hidden.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Accessibility",
|
|
13
|
+
"Visually hidden"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/accessibility/visually-hidden",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"accessibility",
|
|
19
|
+
"screen reader",
|
|
20
|
+
"hidden",
|
|
21
|
+
"a11y"
|
|
22
|
+
],
|
|
23
|
+
"toc": [
|
|
24
|
+
{
|
|
25
|
+
"value": "Basic usage",
|
|
26
|
+
"href": "#basic-usage",
|
|
27
|
+
"depth": 2,
|
|
28
|
+
"numbering": [
|
|
29
|
+
1,
|
|
30
|
+
1
|
|
31
|
+
],
|
|
32
|
+
"parent": "root"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"value": "Focusable content",
|
|
36
|
+
"href": "#focusable-content",
|
|
37
|
+
"depth": 2,
|
|
38
|
+
"numbering": [
|
|
39
|
+
1,
|
|
40
|
+
2
|
|
41
|
+
],
|
|
42
|
+
"parent": "root"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"value": "Inline content",
|
|
46
|
+
"href": "#inline-content",
|
|
47
|
+
"depth": 2,
|
|
48
|
+
"numbering": [
|
|
49
|
+
1,
|
|
50
|
+
3
|
|
51
|
+
],
|
|
52
|
+
"parent": "root"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"layout": "app-frame",
|
|
56
|
+
"tabs": [
|
|
57
|
+
{
|
|
58
|
+
"key": "overview",
|
|
59
|
+
"title": "Overview",
|
|
60
|
+
"order": 0
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"key": "dev",
|
|
64
|
+
"title": "Implementation",
|
|
65
|
+
"order": 3
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"key": "a11y",
|
|
69
|
+
"title": "Accessibility",
|
|
70
|
+
"order": 4
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"mdx": "\n## Basic usage\n\nJust wrap the content you want to hide visually, but keep accessible to screen\nreaders, with the `VisuallyHidden` component.\n\n```jsx\nconst App = () => <VisuallyHidden>I am VisuallyHidden!</VisuallyHidden>;\n```\n\n## Focusable content\n\nIf the content you want to hide visually contains focusable elements, add the\n`isFocusable` property to the `VisuallyHidden` component. The content then\nbecomes visible if the first focusable element inside is focused with the\n_keyboard_.\n\n```jsx live\nconst App = () => (\n <VisuallyHidden isFocusable>\n <Button>I can have focus</Button>\n </VisuallyHidden>\n);\n```\n\n## Inline content\n\n`VisuallyHidden` uses a `<div>` element by default to render into the DOM. If\nyou need to hide inline content, you can use the `as` prop to render a `<span>`\nelement instead, keeping the `html` semantics intact.\n\n```jsx live\nconst App = () => (\n <p>\n Text that will be visible.\n <VisuallyHidden as=\"span\">I will blend just in.</VisuallyHidden>\n Text that will be visible.\n </p>\n);\n```\n",
|
|
75
|
+
"views": {
|
|
76
|
+
"overview": {
|
|
77
|
+
"mdx": "\n## Basic usage\n\nJust wrap the content you want to hide visually, but keep accessible to screen\nreaders, with the `VisuallyHidden` component.\n\n```jsx\nconst App = () => <VisuallyHidden>I am VisuallyHidden!</VisuallyHidden>;\n```\n\n## Focusable content\n\nIf the content you want to hide visually contains focusable elements, add the\n`isFocusable` property to the `VisuallyHidden` component. The content then\nbecomes visible if the first focusable element inside is focused with the\n_keyboard_.\n\n```jsx live\nconst App = () => (\n <VisuallyHidden isFocusable>\n <Button>I can have focus</Button>\n </VisuallyHidden>\n);\n```\n\n## Inline content\n\n`VisuallyHidden` uses a `<div>` element by default to render into the DOM. If\nyou need to hide inline content, you can use the `as` prop to render a `<span>`\nelement instead, keeping the `html` semantics intact.\n\n```jsx live\nconst App = () => (\n <p>\n Text that will be visible.\n <VisuallyHidden as=\"span\">I will blend just in.</VisuallyHidden>\n Text that will be visible.\n </p>\n);\n```\n",
|
|
78
|
+
"toc": [
|
|
79
|
+
{
|
|
80
|
+
"value": "Basic usage",
|
|
81
|
+
"href": "#basic-usage",
|
|
82
|
+
"depth": 2,
|
|
83
|
+
"numbering": [
|
|
84
|
+
1,
|
|
85
|
+
1
|
|
86
|
+
],
|
|
87
|
+
"parent": "root"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"value": "Focusable content",
|
|
91
|
+
"href": "#focusable-content",
|
|
92
|
+
"depth": 2,
|
|
93
|
+
"numbering": [
|
|
94
|
+
1,
|
|
95
|
+
2
|
|
96
|
+
],
|
|
97
|
+
"parent": "root"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"value": "Inline content",
|
|
101
|
+
"href": "#inline-content",
|
|
102
|
+
"depth": 2,
|
|
103
|
+
"numbering": [
|
|
104
|
+
1,
|
|
105
|
+
3
|
|
106
|
+
],
|
|
107
|
+
"parent": "root"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"a11y": {
|
|
112
|
+
"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 <Button>\n <Icons.Delete />\n <VisuallyHidden>Delete item</VisuallyHidden>\n </Button>\n);\n```\n\n### Accessibility standards\n\n- **Provide text alternatives for icons:** Use VisuallyHidden to add descriptive\n text for icon-only buttons or links that is accessible to screen readers but\n visually hidden.\n- **Don't hide important content:** Only use VisuallyHidden for supplementary\n text that provides context for assistive technologies, not for essential\n information that all users need.\n- **Skip links:** Use VisuallyHidden to create skip navigation links that allow\n keyboard users to bypass repetitive content.\n- **Form labels:** Use for additional context in form labels when visual design\n already makes the purpose clear.\n- **Accessible names:** Provide accessible names for interactive elements that\n rely on visual cues (icons, colors, shapes).\n- **Maintain focus visibility:** When VisuallyHidden contains focusable elements\n (like skip links), ensure they become visible when focused.\n- **Screen reader only instructions:** Use for providing specific instructions\n that screen reader users need but sighted users don't.\n\n### Resources\n\n- [WebAIM - CSS in Action: Invisible Content](https://webaim.org/techniques/css/invisiblecontent/)\n- [A11y Project - How to hide content](https://www.a11yproject.com/posts/how-to-hide-content/)\n- [WCAG 2.4.1 Bypass Blocks](https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks.html)\n",
|
|
113
|
+
"toc": [
|
|
114
|
+
{
|
|
115
|
+
"value": "Accessibility",
|
|
116
|
+
"href": "#accessibility",
|
|
117
|
+
"depth": 2,
|
|
118
|
+
"numbering": [
|
|
119
|
+
1,
|
|
120
|
+
1
|
|
121
|
+
],
|
|
122
|
+
"parent": "root"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"value": "Accessibility standards",
|
|
126
|
+
"href": "#accessibility-standards",
|
|
127
|
+
"depth": 3,
|
|
128
|
+
"numbering": [
|
|
129
|
+
1,
|
|
130
|
+
1,
|
|
131
|
+
1
|
|
132
|
+
],
|
|
133
|
+
"parent": "root"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"value": "Resources",
|
|
137
|
+
"href": "#resources",
|
|
138
|
+
"depth": 3,
|
|
139
|
+
"numbering": [
|
|
140
|
+
1,
|
|
141
|
+
1,
|
|
142
|
+
2
|
|
143
|
+
],
|
|
144
|
+
"parent": "root"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"dev": {
|
|
149
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { VisuallyHidden, type VisuallyHiddenProps } from \"@commercetools/nimbus\";\n```\n\n### Basic usage\n\n```jsx live-dev\nconst App = () => (\n <VisuallyHidden>\n This text is hidden visually but accessible to screen readers\n </VisuallyHidden>\n);\n```\n\n## Usage examples\n\n### Screen reader-only content\n\nProvide additional context for screen reader users without cluttering the visual interface.\n\n```jsx live-dev\nconst App = () => (\n <Stack gap=\"400\">\n <Box>\n <Text fontWeight=\"bold\">\n Product Price\n <VisuallyHidden as=\"span\"> (in US Dollars)</VisuallyHidden>\n </Text>\n <Text textStyle=\"xl\">$29.99</Text>\n </Box>\n \n <Box>\n <Button>\n <VisuallyHidden>Add to cart: </VisuallyHidden>\n Add to Cart\n </Button>\n </Box>\n </Stack>\n);\n```\n\n### Focusable content\n\nUse `isFocusable` to make hidden content visible when it receives keyboard focus. This is essential for skip navigation links.\n\n```jsx live-dev\nconst App = () => (\n <Stack gap=\"400\">\n <VisuallyHidden isFocusable>\n <Button>Skip to main content</Button>\n </VisuallyHidden>\n \n <Text color=\"neutral.11\" textStyle=\"sm\">\n Press Tab to see the skip link appear\n </Text>\n \n <Box p=\"400\" bg=\"neutral.7\" borderRadius=\"md\">\n <Text fontWeight=\"bold\" mb=\"200\">Main Content</Text>\n <Text>Focus the skip link with Tab, and it will become visible.</Text>\n </Box>\n </Stack>\n);\n```\n\n### Inline vs block content\n\nUse the `as` prop to control whether VisuallyHidden renders as a block (`div`) or inline (`span`) element.\n\n```jsx live-dev\nconst App = () => (\n <Stack gap=\"400\">\n <Box>\n <Text fontWeight=\"bold\" mb=\"200\">Block element (default)</Text>\n <Text>Before text</Text>\n <VisuallyHidden>Hidden block content</VisuallyHidden>\n <Text>After text</Text>\n </Box>\n \n <Box>\n <Text fontWeight=\"bold\" mb=\"200\">Inline element (as=\"span\")</Text>\n <Text>\n Before text\n <VisuallyHidden as=\"span\"> hidden inline content </VisuallyHidden>\n after text.\n </Text>\n </Box>\n </Stack>\n);\n```\n\n### Status announcements\n\nProvide status updates that are only announced to screen readers.\n\n```jsx live-dev\nconst App = () => {\n const [items, setItems] = React.useState<string[]>([]);\n \n const addItem = () => {\n setItems([...items, `Item ${items.length + 1}`]);\n };\n \n const removeItem = (index: number) => {\n setItems(items.filter((_, i) => i !== index));\n };\n \n return (\n <Stack gap=\"400\">\n <Box>\n <Button onClick={addItem}>Add Item</Button>\n </Box>\n \n <VisuallyHidden role=\"status\" aria-live=\"polite\">\n {items.length} {items.length === 1 ? 'item' : 'items'} in list\n </VisuallyHidden>\n \n <Stack gap=\"200\">\n {items.map((item, index) => (\n <Box \n key={index} \n p=\"300\" \n bg=\"neutral.7\" \n borderRadius=\"md\"\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n <Text>{item}</Text>\n <Button size=\"sm\" onClick={() => removeItem(index)}>\n Remove\n </Button>\n </Box>\n ))}\n </Stack>\n \n {items.length === 0 && (\n <Text color=\"neutral.11\">No items in list</Text>\n )}\n </Stack>\n );\n};\n```\n\n## Component requirements\n\n### Usage context\n\n**When to use VisuallyHidden**:\n- Skip navigation links for keyboard users\n- Additional context for screen reader users\n- Accessible labels for icon-only buttons\n- Status announcements for dynamic content\n- Form hints that don't need to be visible\n\n**When NOT to use**:\n- Don't use for critical information that all users need\n- Don't hide interactive elements without `isFocusable` prop\n- Avoid using as a substitute for proper semantic HTML\n- Don't use to hide content from all users (use `display: none` or conditional rendering instead)\n\n## Accessibility\n\n**Role**: The component renders as a `<div>` or `<span>` with CSS that hides it visually while keeping it accessible to screen readers.\n\n**Labeling**: The content inside VisuallyHidden is read by screen readers:\n\n```tsx\n<Button>\n <Icon name=\"delete\" />\n <VisuallyHidden>Delete item</VisuallyHidden>\n</Button>\n```\n\n**Keyboard navigation**: \n- By default, hidden content cannot receive keyboard focus\n- With `isFocusable={true}`, the first focusable element inside becomes visible when focused\n- Essential for skip navigation patterns\n\n**ARIA attributes**: You can add ARIA attributes for live regions and status announcements:\n\n```tsx\n<VisuallyHidden role=\"status\" aria-live=\"polite\">\n Loading complete\n</VisuallyHidden>\n```\n\n### Persistent ID\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 = \"skip-navigation-link\";\n\nexport const SkipLink = () => (\n <VisuallyHidden id={PERSISTENT_ID} isFocusable>\n <Button>Skip to main content</Button>\n </VisuallyHidden>\n);\n```\n\n## API reference\n\n<PropsTable id=\"VisuallyHidden\" />\n\n## Common patterns\n\n### Skip to main content\n\nA standard accessibility pattern for keyboard navigation.\n\n```jsx live-dev\nconst App = () => {\n const mainContentRef = React.useRef<HTMLDivElement>(null);\n \n const handleSkip = () => {\n mainContentRef.current?.focus();\n };\n \n return (\n <Stack gap=\"400\">\n <VisuallyHidden isFocusable>\n <Button onClick={handleSkip}>Skip to main content</Button>\n </VisuallyHidden>\n \n <Box p=\"400\" bg=\"neutral.7\" borderRadius=\"md\">\n <Text fontWeight=\"bold\">Navigation Area</Text>\n <Text textStyle=\"sm\" color=\"neutral.11\">\n Press Tab to reveal the skip link\n </Text>\n </Box>\n \n <Box \n ref={mainContentRef}\n tabIndex={-1}\n p=\"400\" \n bg=\"primary.7\" \n borderRadius=\"md\"\n >\n <Text fontWeight=\"bold\" mb=\"200\">Main Content</Text>\n <Text>This is the main content area that users can skip to.</Text>\n </Box>\n </Stack>\n );\n};\n```\n\n### Accessible data tables\n\nProvide additional context for screen reader users navigating tables.\n\n```jsx live-dev\nconst App = () => {\n const data = [\n { product: 'Widget A', price: 29.99, stock: 45 },\n { product: 'Widget B', price: 39.99, stock: 12 },\n { product: 'Widget C', price: 19.99, stock: 0 },\n ];\n \n return (\n <Box overflowX=\"auto\">\n <table style={{ width: '100%', borderCollapse: 'collapse' }}>\n <thead>\n <tr>\n <th style={{ textAlign: 'left', padding: '12px', borderBottom: '2px solid #e2e8f0' }}>\n Product\n </th>\n <th style={{ textAlign: 'right', padding: '12px', borderBottom: '2px solid #e2e8f0' }}>\n Price\n </th>\n <th style={{ textAlign: 'right', padding: '12px', borderBottom: '2px solid #e2e8f0' }}>\n Stock\n </th>\n </tr>\n </thead>\n <tbody>\n {data.map((item, index) => (\n <tr key={index}>\n <td style={{ padding: '12px', borderBottom: '1px solid #e2e8f0' }}>\n {item.product}\n </td>\n <td style={{ textAlign: 'right', padding: '12px', borderBottom: '1px solid #e2e8f0' }}>\n <VisuallyHidden as=\"span\">Price: </VisuallyHidden>\n ${item.price.toFixed(2)}\n </td>\n <td style={{ textAlign: 'right', padding: '12px', borderBottom: '1px solid #e2e8f0' }}>\n <VisuallyHidden as=\"span\">Stock: </VisuallyHidden>\n {item.stock === 0 ? (\n <span style={{ color: '#ef4444' }}>\n Out of stock\n <VisuallyHidden as=\"span\"> for {item.product}</VisuallyHidden>\n </span>\n ) : (\n item.stock\n )}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </Box>\n );\n};\n```\n\n### Form field descriptions\n\nProvide additional hints for form fields without cluttering the UI.\n\n```jsx live-dev\nconst App = () => {\n const [password, setPassword] = React.useState('');\n \n return (\n <Stack gap=\"400\">\n <Box>\n <Text as=\"label\" fontWeight=\"semibold\" mb=\"200\" display=\"block\">\n Password\n </Text>\n <input\n type=\"password\"\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n aria-describedby=\"password-hint\"\n style={{\n width: '100%',\n padding: '8px 12px',\n borderRadius: '4px',\n border: '1px solid #cbd5e0',\n }}\n />\n <VisuallyHidden id=\"password-hint\">\n Password must be at least 8 characters long and contain a number\n </VisuallyHidden>\n <Text textStyle=\"sm\" color=\"neutral.11\" mt=\"100\">\n Min. 8 characters\n </Text>\n </Box>\n </Stack>\n );\n};\n```\n\n### Loading states\n\nAnnounce loading states to screen reader users.\n\n```jsx live-dev\nconst App = () => {\n const [isLoading, setIsLoading] = React.useState(false);\n const [data, setData] = React.useState<string | null>(null);\n \n const loadData = () => {\n setIsLoading(true);\n setData(null);\n \n setTimeout(() => {\n setData('Data loaded successfully!');\n setIsLoading(false);\n }, 2000);\n };\n \n return (\n <Stack gap=\"400\">\n <Button onClick={loadData} isDisabled={isLoading}>\n {isLoading ? 'Loading...' : 'Load Data'}\n </Button>\n \n <VisuallyHidden role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {isLoading ? 'Loading data, please wait' : ''}\n {data ? 'Data loaded successfully' : ''}\n </VisuallyHidden>\n \n {data && (\n <Box p=\"400\" bg=\"success.7\" borderRadius=\"md\">\n <Text>{data}</Text>\n </Box>\n )}\n </Stack>\n );\n};\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using VisuallyHidden 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 Usage Tests\n\nVerify the VisuallyHidden component hides content visually while keeping it accessible\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { VisuallyHidden, NimbusProvider, Button } from \"@commercetools/nimbus\";\n\ndescribe(\"VisuallyHidden - Basic usage\", () => {\n it(\"renders content that is accessible but visually hidden\", () => {\n render(\n <NimbusProvider>\n <VisuallyHidden data-testid=\"hidden-content\">\n Screen reader only text\n </VisuallyHidden>\n </NimbusProvider>\n );\n\n const element = screen.getByTestId(\"hidden-content\");\n expect(element).toBeInTheDocument();\n expect(element).toHaveTextContent(\"Screen reader only text\");\n\n // Verify it's visually hidden\n const styles = window.getComputedStyle(element);\n expect(styles.position).toBe(\"absolute\");\n expect(styles.width).toBe(\"1px\");\n expect(styles.height).toBe(\"1px\");\n });\n\n it(\"renders as div by default and as span when specified\", () => {\n const { rerender } = render(\n <NimbusProvider>\n <VisuallyHidden data-testid=\"element\">Content</VisuallyHidden>\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"element\").tagName).toBe(\"DIV\");\n\n rerender(\n <NimbusProvider>\n <VisuallyHidden as=\"span\" data-testid=\"element\">\n Content\n </VisuallyHidden>\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"element\").tagName).toBe(\"SPAN\");\n });\n\n it(\"supports skip navigation with isFocusable\", () => {\n render(\n <NimbusProvider>\n <VisuallyHidden isFocusable>\n <Button data-testid=\"skip-button\">Skip to content</Button>\n </VisuallyHidden>\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"skip-button\")).toBeInTheDocument();\n });\n});\n```\n\n### Accessibility Tests\n\nVerify ARIA attributes and accessibility patterns\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { VisuallyHidden, NimbusProvider, Button } from \"@commercetools/nimbus\";\n\ndescribe(\"VisuallyHidden - Accessibility\", () => {\n it(\"forwards ARIA attributes for live regions\", () => {\n render(\n <NimbusProvider>\n <VisuallyHidden\n role=\"status\"\n aria-live=\"polite\"\n data-testid=\"status-region\"\n >\n Loading complete\n </VisuallyHidden>\n </NimbusProvider>\n );\n\n const element = screen.getByTestId(\"status-region\");\n expect(element).toHaveAttribute(\"role\", \"status\");\n expect(element).toHaveAttribute(\"aria-live\", \"polite\");\n });\n\n it(\"can be used with aria-describedby for form hints\", () => {\n render(\n <NimbusProvider>\n <input\n type=\"text\"\n aria-describedby=\"field-hint\"\n data-testid=\"input-field\"\n />\n <VisuallyHidden id=\"field-hint\">\n Enter your full name as it appears on your ID\n </VisuallyHidden>\n </NimbusProvider>\n );\n\n const input = screen.getByTestId(\"input-field\");\n expect(input).toHaveAttribute(\"aria-describedby\", \"field-hint\");\n });\n\n it(\"provides accessible labels for icon buttons\", () => {\n render(\n <NimbusProvider>\n <Button data-testid=\"icon-button\">\n <span aria-hidden=\"true\">⚙️</span>\n <VisuallyHidden>Settings</VisuallyHidden>\n </Button>\n </NimbusProvider>\n );\n\n const button = screen.getByTestId(\"icon-button\");\n expect(button).toHaveTextContent(\"Settings\");\n });\n});\n```\n\n\n## Resources\n\n- [VisuallyHidden component in Storybook](https://nimbus-storybook.vercel.app/?path=/docs/utils-visuallyhidden--docs)\n- [React Aria VisuallyHidden documentation](https://react-spectrum.adobe.com/react-aria/VisuallyHidden.html)\n- [WebAIM: Invisible Content](https://webaim.org/techniques/css/invisiblecontent/)\n- [W3C Skip Navigation](https://www.w3.org/TR/WCAG20-TECHS/G1.html)\n",
|
|
150
|
+
"toc": [
|
|
151
|
+
{
|
|
152
|
+
"value": "Getting started",
|
|
153
|
+
"href": "#getting-started",
|
|
154
|
+
"depth": 2,
|
|
155
|
+
"numbering": [
|
|
156
|
+
1,
|
|
157
|
+
1
|
|
158
|
+
],
|
|
159
|
+
"parent": "root"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"value": "Import",
|
|
163
|
+
"href": "#import",
|
|
164
|
+
"depth": 3,
|
|
165
|
+
"numbering": [
|
|
166
|
+
1,
|
|
167
|
+
1,
|
|
168
|
+
1
|
|
169
|
+
],
|
|
170
|
+
"parent": "root"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"value": "Basic usage",
|
|
174
|
+
"href": "#basic-usage",
|
|
175
|
+
"depth": 3,
|
|
176
|
+
"numbering": [
|
|
177
|
+
1,
|
|
178
|
+
1,
|
|
179
|
+
2
|
|
180
|
+
],
|
|
181
|
+
"parent": "root"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"value": "Usage examples",
|
|
185
|
+
"href": "#usage-examples",
|
|
186
|
+
"depth": 2,
|
|
187
|
+
"numbering": [
|
|
188
|
+
1,
|
|
189
|
+
2
|
|
190
|
+
],
|
|
191
|
+
"parent": "root"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"value": "Screen reader-only content",
|
|
195
|
+
"href": "#screen-reader-only-content",
|
|
196
|
+
"depth": 3,
|
|
197
|
+
"numbering": [
|
|
198
|
+
1,
|
|
199
|
+
2,
|
|
200
|
+
1
|
|
201
|
+
],
|
|
202
|
+
"parent": "root"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"value": "Focusable content",
|
|
206
|
+
"href": "#focusable-content",
|
|
207
|
+
"depth": 3,
|
|
208
|
+
"numbering": [
|
|
209
|
+
1,
|
|
210
|
+
2,
|
|
211
|
+
2
|
|
212
|
+
],
|
|
213
|
+
"parent": "root"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"value": "Inline vs block content",
|
|
217
|
+
"href": "#inline-vs-block-content",
|
|
218
|
+
"depth": 3,
|
|
219
|
+
"numbering": [
|
|
220
|
+
1,
|
|
221
|
+
2,
|
|
222
|
+
3
|
|
223
|
+
],
|
|
224
|
+
"parent": "root"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"value": "Status announcements",
|
|
228
|
+
"href": "#status-announcements",
|
|
229
|
+
"depth": 3,
|
|
230
|
+
"numbering": [
|
|
231
|
+
1,
|
|
232
|
+
2,
|
|
233
|
+
4
|
|
234
|
+
],
|
|
235
|
+
"parent": "root"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"value": "Component requirements",
|
|
239
|
+
"href": "#component-requirements",
|
|
240
|
+
"depth": 2,
|
|
241
|
+
"numbering": [
|
|
242
|
+
1,
|
|
243
|
+
3
|
|
244
|
+
],
|
|
245
|
+
"parent": "root"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"value": "Usage context",
|
|
249
|
+
"href": "#usage-context",
|
|
250
|
+
"depth": 3,
|
|
251
|
+
"numbering": [
|
|
252
|
+
1,
|
|
253
|
+
3,
|
|
254
|
+
1
|
|
255
|
+
],
|
|
256
|
+
"parent": "root"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"value": "Accessibility",
|
|
260
|
+
"href": "#accessibility",
|
|
261
|
+
"depth": 2,
|
|
262
|
+
"numbering": [
|
|
263
|
+
1,
|
|
264
|
+
4
|
|
265
|
+
],
|
|
266
|
+
"parent": "root"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"value": "Persistent ID",
|
|
270
|
+
"href": "#persistent-id",
|
|
271
|
+
"depth": 3,
|
|
272
|
+
"numbering": [
|
|
273
|
+
1,
|
|
274
|
+
4,
|
|
275
|
+
1
|
|
276
|
+
],
|
|
277
|
+
"parent": "root"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"value": "API reference",
|
|
281
|
+
"href": "#api-reference",
|
|
282
|
+
"depth": 2,
|
|
283
|
+
"numbering": [
|
|
284
|
+
1,
|
|
285
|
+
5
|
|
286
|
+
],
|
|
287
|
+
"parent": "root"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"value": "Common patterns",
|
|
291
|
+
"href": "#common-patterns",
|
|
292
|
+
"depth": 2,
|
|
293
|
+
"numbering": [
|
|
294
|
+
1,
|
|
295
|
+
6
|
|
296
|
+
],
|
|
297
|
+
"parent": "root"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"value": "Skip to main content",
|
|
301
|
+
"href": "#skip-to-main-content",
|
|
302
|
+
"depth": 3,
|
|
303
|
+
"numbering": [
|
|
304
|
+
1,
|
|
305
|
+
6,
|
|
306
|
+
1
|
|
307
|
+
],
|
|
308
|
+
"parent": "root"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"value": "Accessible data tables",
|
|
312
|
+
"href": "#accessible-data-tables",
|
|
313
|
+
"depth": 3,
|
|
314
|
+
"numbering": [
|
|
315
|
+
1,
|
|
316
|
+
6,
|
|
317
|
+
2
|
|
318
|
+
],
|
|
319
|
+
"parent": "root"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"value": "Form field descriptions",
|
|
323
|
+
"href": "#form-field-descriptions",
|
|
324
|
+
"depth": 3,
|
|
325
|
+
"numbering": [
|
|
326
|
+
1,
|
|
327
|
+
6,
|
|
328
|
+
3
|
|
329
|
+
],
|
|
330
|
+
"parent": "root"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"value": "Loading states",
|
|
334
|
+
"href": "#loading-states",
|
|
335
|
+
"depth": 3,
|
|
336
|
+
"numbering": [
|
|
337
|
+
1,
|
|
338
|
+
6,
|
|
339
|
+
4
|
|
340
|
+
],
|
|
341
|
+
"parent": "root"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"value": "Testing your implementation",
|
|
345
|
+
"href": "#testing-your-implementation",
|
|
346
|
+
"depth": 2,
|
|
347
|
+
"numbering": [
|
|
348
|
+
1,
|
|
349
|
+
7
|
|
350
|
+
],
|
|
351
|
+
"parent": "root"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"value": "Basic Usage Tests",
|
|
355
|
+
"href": "#basic-usage-tests",
|
|
356
|
+
"depth": 3,
|
|
357
|
+
"numbering": [
|
|
358
|
+
1,
|
|
359
|
+
7,
|
|
360
|
+
1
|
|
361
|
+
],
|
|
362
|
+
"parent": "root"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"value": "Accessibility Tests",
|
|
366
|
+
"href": "#accessibility-tests",
|
|
367
|
+
"depth": 3,
|
|
368
|
+
"numbering": [
|
|
369
|
+
1,
|
|
370
|
+
7,
|
|
371
|
+
2
|
|
372
|
+
],
|
|
373
|
+
"parent": "root"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"value": "Resources",
|
|
377
|
+
"href": "#resources",
|
|
378
|
+
"depth": 2,
|
|
379
|
+
"numbering": [
|
|
380
|
+
1,
|
|
381
|
+
8
|
|
382
|
+
],
|
|
383
|
+
"parent": "root"
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Accessibility",
|
|
4
|
+
"title": "Accessibility",
|
|
5
|
+
"description": "Components designed to enhance accessibility and ARIA compliance.",
|
|
6
|
+
"order": 12,
|
|
7
|
+
"repoPath": "packages/nimbus/src/docs/accessibility.mdx",
|
|
8
|
+
"menu": [
|
|
9
|
+
"Components",
|
|
10
|
+
"Accessibility"
|
|
11
|
+
],
|
|
12
|
+
"route": "components/accessibility",
|
|
13
|
+
"tags": [
|
|
14
|
+
"document"
|
|
15
|
+
],
|
|
16
|
+
"toc": [],
|
|
17
|
+
"icon": "Blind",
|
|
18
|
+
"layout": "app-frame",
|
|
19
|
+
"tabs": [
|
|
20
|
+
{
|
|
21
|
+
"key": "overview",
|
|
22
|
+
"title": "Overview",
|
|
23
|
+
"order": 0
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"mdx": "\n# Accessibility\n\nComponents designed to enhance accessibility and ARIA compliance.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
28
|
+
"views": {
|
|
29
|
+
"overview": {
|
|
30
|
+
"mdx": "\n# Accessibility\n\nComponents designed to enhance accessibility and ARIA compliance.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
31
|
+
"toc": []
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|