@commercetools/nimbus-mcp 0.1.0 → 2.11.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 +10998 -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-scrollarea.json +428 -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 +179 -0
- package/data/docs/types/ScrollAreaElementIds.json +9 -0
- package/data/docs/types/ScrollAreaProps.json +9 -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 +280 -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,593 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-List",
|
|
4
|
+
"title": "List",
|
|
5
|
+
"exportName": "List",
|
|
6
|
+
"description": "The list component organizes related items or data into a vertical, scannable format.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/list/list.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Typography",
|
|
13
|
+
"List"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/typography/list",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"list",
|
|
19
|
+
"collections",
|
|
20
|
+
"ordered",
|
|
21
|
+
"unordered"
|
|
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": "Basic options",
|
|
57
|
+
"href": "#basic-options",
|
|
58
|
+
"depth": 3,
|
|
59
|
+
"numbering": [
|
|
60
|
+
1,
|
|
61
|
+
2,
|
|
62
|
+
1
|
|
63
|
+
],
|
|
64
|
+
"parent": "root"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"value": "Vertical lists",
|
|
68
|
+
"href": "#vertical-lists",
|
|
69
|
+
"depth": 4,
|
|
70
|
+
"numbering": [
|
|
71
|
+
1,
|
|
72
|
+
2,
|
|
73
|
+
1,
|
|
74
|
+
1
|
|
75
|
+
],
|
|
76
|
+
"parent": "root"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "Alignment",
|
|
80
|
+
"href": "#alignment",
|
|
81
|
+
"depth": 4,
|
|
82
|
+
"numbering": [
|
|
83
|
+
1,
|
|
84
|
+
2,
|
|
85
|
+
1,
|
|
86
|
+
2
|
|
87
|
+
],
|
|
88
|
+
"parent": "root"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"value": "Nested items, added gap space, and item wrapping",
|
|
92
|
+
"href": "#nested-items-added-gap-space-and-item-wrapping",
|
|
93
|
+
"depth": 4,
|
|
94
|
+
"numbering": [
|
|
95
|
+
1,
|
|
96
|
+
2,
|
|
97
|
+
1,
|
|
98
|
+
3
|
|
99
|
+
],
|
|
100
|
+
"parent": "root"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"layout": "app-frame",
|
|
104
|
+
"tabs": [
|
|
105
|
+
{
|
|
106
|
+
"key": "overview",
|
|
107
|
+
"title": "Overview",
|
|
108
|
+
"order": 0
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"key": "guidelines",
|
|
112
|
+
"title": "Guidelines",
|
|
113
|
+
"order": 2
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"key": "dev",
|
|
117
|
+
"title": "Implementation",
|
|
118
|
+
"order": 3
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"key": "a11y",
|
|
122
|
+
"title": "Accessibility",
|
|
123
|
+
"order": 4
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"mdx": "\n## Overview\n\nThe list component presents structured content which can include details such as\ntext, icons, and actions, in a vertical arrangement. With improved readability\nletting readers quickly scan the content and compare relevant details.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[W3C: Lists](https://www.w3.org/WAI/tutorials/page-structure/content/#lists)\n[Chakra UI: List](https://chakra-ui.com/docs/components/list)\n\n## Variables\n\nGet familiar with the features.\n\n### Basic options\n\n#### Vertical lists\n\nVertical lists can function differently based on need. Using bullet points,\nnumbered lists, and icons or emojis will help users understand the information\ndifferently as needed.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" gap=\"800\" alignItems=\"flex-start\">\n <List.Root>\n <List.Item>Red pandas</List.Item>\n <List.Item>Pangolins</List.Item>\n <List.Item>Opossums</List.Item>\n <List.Item>Aye-ayes</List.Item>\n <List.Item>Okapi</List.Item>\n </List.Root>\n <List.Root as=\"ol\">\n <List.Item>Boil water</List.Item>\n <List.Item>Add pasta</List.Item>\n <List.Item>Wait patiently to cook</List.Item>\n <List.Item>Remove and drain pasta</List.Item>\n <List.Item>Add final ingredients and serve</List.Item>\n </List.Root>\n <List.Root variant=\"plain\">\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\">\n <Icons.Circle />\n </Icon>\n </List.Indicator>\n Reading a book\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\">\n <Icons.Circle />\n </Icon>\n </List.Indicator>\n Talking to a friend\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\">\n <Icons.Circle />\n </Icon>\n </List.Indicator>\n Going for a walk\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"critical.11\"><Icons.Close /></Icon>\n </List.Indicator>\n Doomscrolling\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"critical.11\"><Icons.Close /></Icon>\n </List.Indicator>\n Not eating a treat\n </List.Item>\n </List.Root>\n </Stack>\n)\n```\n\n#### Alignment\n\nList items are aligned to the left, center and the right. Choose what suits the\ninformation to be shown based on language and data.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" gap=\"600\" alignItems=\"flex-start\">\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"bold\" textAlign=\"left\">Left</Text>\n <List.Root>\n <List.Item textAlign=\"left\">Red pandas</List.Item>\n <List.Item textAlign=\"left\">Pangolins</List.Item>\n <List.Item textAlign=\"left\">Opossums</List.Item>\n <List.Item textAlign=\"left\">Aye-ayes</List.Item>\n <List.Item textAlign=\"left\">Okapi</List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"bold\" textAlign=\"center\">Center</Text>\n <List.Root>\n <List.Item textAlign=\"center\">Red pandas</List.Item>\n <List.Item textAlign=\"center\">Pangolins</List.Item>\n <List.Item textAlign=\"center\">Opossums</List.Item>\n <List.Item textAlign=\"center\">Aye-ayes</List.Item>\n <List.Item textAlign=\"center\">Okapi</List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"bold\" textAlign=\"right\">Right</Text>\n <List.Root>\n <List.Item textAlign=\"right\">Red pandas</List.Item>\n <List.Item textAlign=\"right\">Pangolins</List.Item>\n <List.Item textAlign=\"right\">Opossums</List.Item>\n <List.Item textAlign=\"right\">Aye-ayes</List.Item>\n <List.Item textAlign=\"right\">Okapi</List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n\n#### Nested items, added gap space, and item wrapping\n\nWhen nesting related items, maintain proper spacing and wrapping to keep the\nstructure intact. Avoid long lines of text; if necessary, rephrase to make it\nshorter or use body text instead of bullet points, which should be reserved for\nconcise information.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" gap=\"800\" alignItems=\"flex-start\">\n <Stack gap=\"200\">\n <Text fontWeight=\"bold\">Nested items</Text>\n <List.Root>\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\">\n <Text fontWeight=\"bold\">Gap space</Text>\n <List.Root gap=\"400\">\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\">\n <Text fontWeight=\"bold\">Item wrapping</Text>\n <List.Root maxWidth=\"200px\">\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n",
|
|
128
|
+
"views": {
|
|
129
|
+
"overview": {
|
|
130
|
+
"mdx": "\n## Overview\n\nThe list component presents structured content which can include details such as\ntext, icons, and actions, in a vertical arrangement. With improved readability\nletting readers quickly scan the content and compare relevant details.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[W3C: Lists](https://www.w3.org/WAI/tutorials/page-structure/content/#lists)\n[Chakra UI: List](https://chakra-ui.com/docs/components/list)\n\n## Variables\n\nGet familiar with the features.\n\n### Basic options\n\n#### Vertical lists\n\nVertical lists can function differently based on need. Using bullet points,\nnumbered lists, and icons or emojis will help users understand the information\ndifferently as needed.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" gap=\"800\" alignItems=\"flex-start\">\n <List.Root>\n <List.Item>Red pandas</List.Item>\n <List.Item>Pangolins</List.Item>\n <List.Item>Opossums</List.Item>\n <List.Item>Aye-ayes</List.Item>\n <List.Item>Okapi</List.Item>\n </List.Root>\n <List.Root as=\"ol\">\n <List.Item>Boil water</List.Item>\n <List.Item>Add pasta</List.Item>\n <List.Item>Wait patiently to cook</List.Item>\n <List.Item>Remove and drain pasta</List.Item>\n <List.Item>Add final ingredients and serve</List.Item>\n </List.Root>\n <List.Root variant=\"plain\">\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\">\n <Icons.Circle />\n </Icon>\n </List.Indicator>\n Reading a book\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\">\n <Icons.Circle />\n </Icon>\n </List.Indicator>\n Talking to a friend\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\">\n <Icons.Circle />\n </Icon>\n </List.Indicator>\n Going for a walk\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"critical.11\"><Icons.Close /></Icon>\n </List.Indicator>\n Doomscrolling\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"critical.11\"><Icons.Close /></Icon>\n </List.Indicator>\n Not eating a treat\n </List.Item>\n </List.Root>\n </Stack>\n)\n```\n\n#### Alignment\n\nList items are aligned to the left, center and the right. Choose what suits the\ninformation to be shown based on language and data.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" gap=\"600\" alignItems=\"flex-start\">\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"bold\" textAlign=\"left\">Left</Text>\n <List.Root>\n <List.Item textAlign=\"left\">Red pandas</List.Item>\n <List.Item textAlign=\"left\">Pangolins</List.Item>\n <List.Item textAlign=\"left\">Opossums</List.Item>\n <List.Item textAlign=\"left\">Aye-ayes</List.Item>\n <List.Item textAlign=\"left\">Okapi</List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"bold\" textAlign=\"center\">Center</Text>\n <List.Root>\n <List.Item textAlign=\"center\">Red pandas</List.Item>\n <List.Item textAlign=\"center\">Pangolins</List.Item>\n <List.Item textAlign=\"center\">Opossums</List.Item>\n <List.Item textAlign=\"center\">Aye-ayes</List.Item>\n <List.Item textAlign=\"center\">Okapi</List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"bold\" textAlign=\"right\">Right</Text>\n <List.Root>\n <List.Item textAlign=\"right\">Red pandas</List.Item>\n <List.Item textAlign=\"right\">Pangolins</List.Item>\n <List.Item textAlign=\"right\">Opossums</List.Item>\n <List.Item textAlign=\"right\">Aye-ayes</List.Item>\n <List.Item textAlign=\"right\">Okapi</List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n\n#### Nested items, added gap space, and item wrapping\n\nWhen nesting related items, maintain proper spacing and wrapping to keep the\nstructure intact. Avoid long lines of text; if necessary, rephrase to make it\nshorter or use body text instead of bullet points, which should be reserved for\nconcise information.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"horizontal\" gap=\"800\" alignItems=\"flex-start\">\n <Stack gap=\"200\">\n <Text fontWeight=\"bold\">Nested items</Text>\n <List.Root>\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\">\n <Text fontWeight=\"bold\">Gap space</Text>\n <List.Root gap=\"400\">\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Stack>\n <Stack gap=\"200\">\n <Text fontWeight=\"bold\">Item wrapping</Text>\n <List.Root maxWidth=\"200px\">\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n",
|
|
131
|
+
"toc": [
|
|
132
|
+
{
|
|
133
|
+
"value": "Overview",
|
|
134
|
+
"href": "#overview",
|
|
135
|
+
"depth": 2,
|
|
136
|
+
"numbering": [
|
|
137
|
+
1,
|
|
138
|
+
1
|
|
139
|
+
],
|
|
140
|
+
"parent": "root"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"value": "Resources",
|
|
144
|
+
"href": "#resources",
|
|
145
|
+
"depth": 3,
|
|
146
|
+
"numbering": [
|
|
147
|
+
1,
|
|
148
|
+
1,
|
|
149
|
+
1
|
|
150
|
+
],
|
|
151
|
+
"parent": "root"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"value": "Variables",
|
|
155
|
+
"href": "#variables",
|
|
156
|
+
"depth": 2,
|
|
157
|
+
"numbering": [
|
|
158
|
+
1,
|
|
159
|
+
2
|
|
160
|
+
],
|
|
161
|
+
"parent": "root"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"value": "Basic options",
|
|
165
|
+
"href": "#basic-options",
|
|
166
|
+
"depth": 3,
|
|
167
|
+
"numbering": [
|
|
168
|
+
1,
|
|
169
|
+
2,
|
|
170
|
+
1
|
|
171
|
+
],
|
|
172
|
+
"parent": "root"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"value": "Vertical lists",
|
|
176
|
+
"href": "#vertical-lists",
|
|
177
|
+
"depth": 4,
|
|
178
|
+
"numbering": [
|
|
179
|
+
1,
|
|
180
|
+
2,
|
|
181
|
+
1,
|
|
182
|
+
1
|
|
183
|
+
],
|
|
184
|
+
"parent": "root"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"value": "Alignment",
|
|
188
|
+
"href": "#alignment",
|
|
189
|
+
"depth": 4,
|
|
190
|
+
"numbering": [
|
|
191
|
+
1,
|
|
192
|
+
2,
|
|
193
|
+
1,
|
|
194
|
+
2
|
|
195
|
+
],
|
|
196
|
+
"parent": "root"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"value": "Nested items, added gap space, and item wrapping",
|
|
200
|
+
"href": "#nested-items-added-gap-space-and-item-wrapping",
|
|
201
|
+
"depth": 4,
|
|
202
|
+
"numbering": [
|
|
203
|
+
1,
|
|
204
|
+
2,
|
|
205
|
+
1,
|
|
206
|
+
3
|
|
207
|
+
],
|
|
208
|
+
"parent": "root"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"a11y": {
|
|
213
|
+
"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 <List.Root>\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements\n <List.Root pl=\"400\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n)\n```\n\n### Accessibility standards\n\n- **Keyboard navigation:** Ensure all interactive list items are navigable using\n the Tab key and fully operable using the Enter or Spacebar keys.\n- **ARIA roles:** Use semantic HTML (`<ul>`, `<ol>`) when possible. For custom\n interactive lists, use appropriate ARIA roles (e.g., `role=\"listbox\"`,\n `role=\"option\"`) to define the component's structure.\n- **Focus indicators:** Provide a strong, clear visual focus indicator on the\n entire list item when it is being accessed via the keyboard.\n- **Text alternatives:** Ensure any icons or custom elements within the list\n item have appropriate aria-label or descriptive text.\n- **Reading order:** The programmatic reading order must logically match the\n visual vertical order.\n",
|
|
214
|
+
"toc": [
|
|
215
|
+
{
|
|
216
|
+
"value": "Accessibility",
|
|
217
|
+
"href": "#accessibility",
|
|
218
|
+
"depth": 2,
|
|
219
|
+
"numbering": [
|
|
220
|
+
1,
|
|
221
|
+
1
|
|
222
|
+
],
|
|
223
|
+
"parent": "root"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"value": "Accessibility standards",
|
|
227
|
+
"href": "#accessibility-standards",
|
|
228
|
+
"depth": 3,
|
|
229
|
+
"numbering": [
|
|
230
|
+
1,
|
|
231
|
+
1,
|
|
232
|
+
1
|
|
233
|
+
],
|
|
234
|
+
"parent": "root"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
"dev": {
|
|
239
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { List } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation renders as an unordered list (`<ul>`) by default:\n\n```jsx live-dev\nconst App = () => (\n <List.Root>\n <List.Item>First item</List.Item>\n <List.Item>Second item</List.Item>\n <List.Item>Third item</List.Item>\n </List.Root>\n)\n```\n\n## Usage examples\n\n### Visual variants\n\nThe List component supports two visual variants: `marker` (default) and `plain`. The `marker` variant displays native list markers (bullets or numbers), while `plain` removes markers and is ideal for custom indicators.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"600\" alignItems=\"flex-start\">\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Marker variant (default)</Text>\n <List.Root variant=\"marker\">\n <List.Item>Red pandas</List.Item>\n <List.Item>Pangolins</List.Item>\n <List.Item>Opossums</List.Item>\n </List.Root>\n </Stack>\n\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Plain variant</Text>\n <List.Root variant=\"plain\">\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\"><Icons.Circle /></Icon>\n </List.Indicator>\n Reading a book\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\"><Icons.Circle /></Icon>\n </List.Indicator>\n Going for a walk\n </List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n\n### Alignment options\n\nControl the alignment of list items using the `align` prop. Options include `start` (default), `center`, and `end`:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"600\" alignItems=\"flex-start\">\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Start (default)</Text>\n <List.Root align=\"start\">\n <List.Item>Left-aligned item</List.Item>\n <List.Item>Another item</List.Item>\n </List.Root>\n </Stack>\n\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Center</Text>\n <List.Root align=\"center\">\n <List.Item>Center-aligned item</List.Item>\n <List.Item>Another item</List.Item>\n </List.Root>\n </Stack>\n\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">End</Text>\n <List.Root align=\"end\">\n <List.Item>Right-aligned item</List.Item>\n <List.Item>Another item</List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n\n### Ordered lists\n\nBy default, `List.Root` renders as an unordered list (`<ul>`). Use the `as=\"ol\"` prop when you need an ordered list:\n\n```jsx live-dev\nconst App = () => (\n <Stack gap=\"200\">\n <Text fontWeight=\"600\">Ordered list (<ol>)</Text>\n <List.Root as=\"ol\">\n <List.Item>Boil water</List.Item>\n <List.Item>Add pasta</List.Item>\n <List.Item>Wait patiently to cook</List.Item>\n <List.Item>Remove and drain pasta</List.Item>\n </List.Root>\n </Stack>\n)\n```\n\n### Custom indicators\n\nUse `List.Indicator` with the `plain` variant to add custom markers, icons, or other visual elements before list items:\n\n```jsx live-dev\nconst App = () => (\n <List.Root variant=\"plain\">\n <List.Item>\n <List.Indicator>\n <Icon color=\"positive.9\"><Icons.Check /></Icon>\n </List.Indicator>\n Completed task\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"warning.9\"><Icons.Warning /></Icon>\n </List.Indicator>\n Task with warning\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon color=\"critical.11\"><Icons.Close /></Icon>\n </List.Indicator>\n Failed task\n </List.Item>\n </List.Root>\n)\n```\n\n### Nested lists\n\nLists can be nested to create hierarchical structures. Use proper indentation and spacing to maintain visual hierarchy:\n\n```jsx live-dev\nconst App = () => (\n <List.Root gap=\"400\">\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\" gap=\"100\">\n <List.Item>8 characters and 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Name and email requirements:\n <List.Root pl=\"400\" gap=\"200\">\n <List.Item>Validation process</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n)\n```\n\n### Spacing and gap\n\nControl spacing between list items using the `gap` prop, which accepts Nimbus spacing tokens:\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"600\" alignItems=\"flex-start\">\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Small gap (200)</Text>\n <List.Root gap=\"200\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n <List.Item>Item 3</List.Item>\n </List.Root>\n </Stack>\n\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Medium gap (400)</Text>\n <List.Root gap=\"400\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n <List.Item>Item 3</List.Item>\n </List.Root>\n </Stack>\n\n <Stack gap=\"200\" flex=\"1\">\n <Text fontWeight=\"600\">Large gap (600)</Text>\n <List.Root gap=\"600\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n <List.Item>Item 3</List.Item>\n </List.Root>\n </Stack>\n </Stack>\n)\n```\n\n## Component requirements\n\n### Usage context\n\nList should be used when you need to:\n- Display a series of related items in a vertical format\n- Organize structured content with clear hierarchy\n- Present navigation menus or option lists\n- Show task lists, metadata, or brief information\n\nFor image-heavy content or complex data comparison, consider using other components like Card or DataTable instead.\n\n## Accessibility\n\nThe List component uses semantic HTML (`<ul>`, `<ol>`, `<li>`) to convey structure to assistive technologies. By default, `List.Root` renders as `<ul>` and `List.Item` renders as `<li>`. Use the `as=\"ol\"` prop when you need an ordered list:\n\n```tsx\n// ✅ Default - renders as <ul>\n<List.Root>\n <List.Item>Item 1</List.Item>\n</List.Root>\n\n// ✅ Ordered list - use as=\"ol\"\n<List.Root as=\"ol\">\n <List.Item>Item 1</List.Item>\n</List.Root>\n```\n\nFor custom indicators, ensure they have appropriate accessibility attributes:\n\n```tsx\n<List.Root variant=\"plain\">\n <List.Item>\n <List.Indicator>\n <Icon aria-label=\"Completed\" color=\"positive.9\">\n <Icons.Check />\n </Icon>\n </List.Indicator>\n Task completed\n </List.Item>\n</List.Root>\n```\n\nIf your use case requires tracking and analytics for this component, it is good practice to add a **persistent**, **unique** id to the component:\n\n```tsx\nconst PERSISTENT_ID = \"example-list\";\n\nexport const Example = () => (\n <List.Root id={PERSISTENT_ID}>\n <List.Item>Item 1</List.Item>\n </List.Root>\n);\n```\n\n#### Keyboard navigation\n\nThe List component itself doesn't handle keyboard interactions, as it's a presentational component. However, when list items are interactive (e.g., clickable), ensure they are keyboard accessible:\n\n- `Tab` / `Shift+Tab`: Navigate between interactive list items\n- `Enter` / `Space`: Activate the focused list item\n- Ensure interactive items have proper focus indicators\n\n## API reference\n\n<PropsTable id=\"List\" />\n\n## Common patterns\n\n### Task list with status indicators\n\nCreate a task list with visual status indicators:\n\n```jsx live-dev\nconst App = () => {\n const tasks = [\n { id: 1, text: \"Review design mockups\", completed: true },\n { id: 2, text: \"Write component documentation\", completed: true },\n { id: 3, text: \"Fix accessibility issues\", completed: false },\n { id: 4, text: \"Update test coverage\", completed: false },\n ];\n\n return (\n <List.Root variant=\"plain\">\n {tasks.map((task) => (\n <List.Item key={task.id}>\n <List.Indicator>\n <Icon\n color={task.completed ? \"positive.9\" : \"neutral.7\"}\n >\n {task.completed ? <Icons.Check /> : <Icons.Circle />}\n </Icon>\n </List.Indicator>\n <Text\n textDecoration={task.completed ? \"line-through\" : \"none\"}\n color={task.completed ? \"neutral.9\" : \"fg.default\"}\n >\n {task.text}\n </Text>\n </List.Item>\n ))}\n </List.Root>\n );\n}\n```\n\n### Navigation menu\n\nUse List to create navigation menus:\n\n```jsx live-dev\nconst App = () => {\n const menuItems = [\n \"Home\",\n \"Products\",\n \"About\",\n \"Contact\",\n ];\n\n return (\n <Box p=\"400\" bg=\"neutral.2\" borderRadius=\"200\" width=\"fit-content\">\n <List.Root variant=\"plain\">\n {menuItems.map((item, index) => (\n <List.Item key={index}>\n <Link href={`#${item.toLowerCase()}`}>\n {item}\n </Link>\n </List.Item>\n ))}\n </List.Root>\n </Box>\n );\n}\n```\n\n### Requirements checklist\n\nDisplay a requirements checklist with nested items:\n\n```jsx live-dev\nconst App = () => (\n <Box p=\"400\" bg=\"neutral.1\" borderRadius=\"200\">\n <Text fontWeight=\"600\" mb=\"300\">Account Setup Requirements</Text>\n <List.Root gap=\"200\">\n <List.Item>\n Password requirements:\n <List.Root pl=\"400\" gap=\"200\" mt=\"200\">\n <List.Item>Minimum 8 characters</List.Item>\n <List.Item>At least 3 numbers</List.Item>\n <List.Item>One special character (!@#$%^&*)</List.Item>\n </List.Root>\n </List.Item>\n <List.Item>\n Profile information:\n <List.Root pl=\"400\" gap=\"200\" mt=\"200\">\n <List.Item>Full name</List.Item>\n <List.Item>Email address</List.Item>\n <List.Item>Phone number (optional)</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </Box>\n)\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using List in your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic Rendering Tests\n\nVerify the List component renders with expected structure and children\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Basic rendering\", () => {\n it(\"renders List.Root with children\", () => {\n render(\n <NimbusProvider>\n <List.Root data-testid=\"test-list\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n <List.Item>Item 3</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"test-list\");\n expect(list).toBeInTheDocument();\n expect(list).toHaveTextContent(\"Item 1\");\n expect(list).toHaveTextContent(\"Item 2\");\n expect(list).toHaveTextContent(\"Item 3\");\n });\n\n it(\"renders as semantic ul element by default\", () => {\n render(\n <NimbusProvider>\n <List.Root data-testid=\"unordered-list\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"unordered-list\");\n expect(list.tagName).toBe(\"UL\");\n });\n\n it(\"renders as semantic ol element with as prop\", () => {\n render(\n <NimbusProvider>\n <List.Root as=\"ol\" data-testid=\"ordered-list\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"ordered-list\");\n expect(list.tagName).toBe(\"OL\");\n });\n\n it(\"renders List.Item with content\", () => {\n render(\n <NimbusProvider>\n <List.Root>\n <List.Item data-testid=\"list-item\">List item content</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const item = screen.getByTestId(\"list-item\");\n expect(item).toBeInTheDocument();\n expect(item).toHaveTextContent(\"List item content\");\n });\n});\n```\n\n### Variant Tests\n\nTest different visual variants of the List component\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Variants\", () => {\n it(\"renders with marker variant by default\", () => {\n render(\n <NimbusProvider>\n <List.Root data-testid=\"marker-list\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"marker-list\");\n expect(list).toBeInTheDocument();\n // Marker variant applies list-style styling\n });\n\n it(\"renders with plain variant\", () => {\n render(\n <NimbusProvider>\n <List.Root variant=\"plain\" data-testid=\"plain-list\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"plain-list\");\n expect(list).toBeInTheDocument();\n });\n\n it(\"renders custom indicators with plain variant\", () => {\n render(\n <NimbusProvider>\n <List.Root variant=\"plain\" data-testid=\"indicator-list\">\n <List.Item>\n <List.Indicator>\n <Icon>\n <Check />\n </Icon>\n </List.Indicator>\n Item with indicator\n </List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"indicator-list\");\n expect(list).toBeInTheDocument();\n expect(list).toHaveTextContent(\"Item with indicator\");\n });\n});\n```\n\n### Alignment Tests\n\nTest alignment options for list items\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Alignment\", () => {\n it(\"applies start alignment by default\", () => {\n render(\n <NimbusProvider>\n <List.Root align=\"start\" data-testid=\"start-list\">\n <List.Item>Item 1</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"start-list\");\n expect(list).toBeInTheDocument();\n });\n\n it(\"applies center alignment\", () => {\n render(\n <NimbusProvider>\n <List.Root align=\"center\" data-testid=\"center-list\">\n <List.Item>Item 1</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"center-list\");\n expect(list).toBeInTheDocument();\n });\n\n it(\"applies end alignment\", () => {\n render(\n <NimbusProvider>\n <List.Root align=\"end\" data-testid=\"end-list\">\n <List.Item>Item 1</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"end-list\");\n expect(list).toBeInTheDocument();\n });\n});\n```\n\n### Nested Lists Tests\n\nTest nested list structures\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Nested lists\", () => {\n it(\"renders nested lists correctly\", () => {\n render(\n <NimbusProvider>\n <List.Root data-testid=\"parent-list\">\n <List.Item>\n Parent item\n <List.Root data-testid=\"nested-list\">\n <List.Item>Nested item 1</List.Item>\n <List.Item>Nested item 2</List.Item>\n </List.Root>\n </List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const parentList = screen.getByTestId(\"parent-list\");\n const nestedList = screen.getByTestId(\"nested-list\");\n\n expect(parentList).toBeInTheDocument();\n expect(nestedList).toBeInTheDocument();\n expect(parentList).toHaveTextContent(\"Parent item\");\n expect(nestedList).toHaveTextContent(\"Nested item 1\");\n expect(nestedList).toHaveTextContent(\"Nested item 2\");\n });\n});\n```\n\n### Style Props Tests\n\nTest that List accepts and applies Chakra style props\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Style props\", () => {\n it(\"applies gap prop for spacing\", () => {\n render(\n <NimbusProvider>\n <List.Root gap=\"400\" data-testid=\"spaced-list\">\n <List.Item>Item 1</List.Item>\n <List.Item>Item 2</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"spaced-list\");\n expect(list).toBeInTheDocument();\n });\n\n it(\"applies padding prop\", () => {\n render(\n <NimbusProvider>\n <List.Root p=\"400\" data-testid=\"padded-list\">\n <List.Item>Item 1</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"padded-list\");\n expect(list).toBeInTheDocument();\n });\n\n it(\"applies background color prop\", () => {\n render(\n <NimbusProvider>\n <List.Root\n bg=\"neutral.2\"\n p=\"400\"\n borderRadius=\"200\"\n data-testid=\"styled-list\"\n >\n <List.Item>Item 1</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"styled-list\");\n expect(list).toBeInTheDocument();\n });\n});\n```\n\n### Props Forwarding Tests\n\nVerify that List forwards standard HTML and ARIA attributes\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Props forwarding\", () => {\n it(\"forwards data attributes\", () => {\n render(\n <NimbusProvider>\n <List.Root data-testid=\"data-list\" data-custom=\"custom-value\">\n <List.Item>Content</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"data-list\");\n expect(list).toHaveAttribute(\"data-custom\", \"custom-value\");\n });\n\n it(\"forwards className prop\", () => {\n render(\n <NimbusProvider>\n <List.Root data-testid=\"class-list\" className=\"custom-class\">\n <List.Item>Content</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"class-list\");\n expect(list).toHaveClass(\"custom-class\");\n });\n\n it(\"forwards id prop\", () => {\n render(\n <NimbusProvider>\n <List.Root id=\"unique-list-id\">\n <List.Item>Content</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = document.getElementById(\"unique-list-id\");\n expect(list).toBeInTheDocument();\n });\n\n it(\"forwards ARIA attributes\", () => {\n render(\n <NimbusProvider>\n <List.Root\n data-testid=\"aria-list\"\n aria-label=\"Navigation list\"\n role=\"navigation\"\n >\n <List.Item>Content</List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const list = screen.getByTestId(\"aria-list\");\n expect(list).toHaveAttribute(\"aria-label\", \"Navigation list\");\n expect(list).toHaveAttribute(\"role\", \"navigation\");\n });\n});\n```\n\n### Indicator Tests\n\nTest List.Indicator component functionality\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { List, NimbusProvider, Icon } from \"@commercetools/nimbus\";\nimport { Check, Close } from \"@commercetools/nimbus-icons\";\n\ndescribe(\"List - Indicator\", () => {\n it(\"renders List.Indicator with content\", () => {\n render(\n <NimbusProvider>\n <List.Root variant=\"plain\">\n <List.Item data-testid=\"item-with-indicator\">\n <List.Indicator data-testid=\"indicator\">\n <Icon>\n <Check />\n </Icon>\n </List.Indicator>\n Item content\n </List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n const indicator = screen.getByTestId(\"indicator\");\n const item = screen.getByTestId(\"item-with-indicator\");\n\n expect(indicator).toBeInTheDocument();\n expect(item).toHaveTextContent(\"Item content\");\n });\n\n it(\"renders multiple items with different indicators\", () => {\n render(\n <NimbusProvider>\n <List.Root variant=\"plain\">\n <List.Item>\n <List.Indicator>\n <Icon>\n <Check />\n </Icon>\n </List.Indicator>\n Item 1\n </List.Item>\n <List.Item>\n <List.Indicator>\n <Icon>\n <Close />\n </Icon>\n </List.Indicator>\n Item 2\n </List.Item>\n </List.Root>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Item 1\")).toBeInTheDocument();\n expect(screen.getByText(\"Item 2\")).toBeInTheDocument();\n });\n});\n```\n\n\n## Resources\n\n- [Chakra UI: List](https://chakra-ui.com/docs/components/list)\n- [W3C: Lists](https://www.w3.org/WAI/tutorials/page-structure/content/#lists)\n",
|
|
240
|
+
"toc": [
|
|
241
|
+
{
|
|
242
|
+
"value": "Getting started",
|
|
243
|
+
"href": "#getting-started",
|
|
244
|
+
"depth": 2,
|
|
245
|
+
"numbering": [
|
|
246
|
+
1,
|
|
247
|
+
1
|
|
248
|
+
],
|
|
249
|
+
"parent": "root"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"value": "Import",
|
|
253
|
+
"href": "#import",
|
|
254
|
+
"depth": 3,
|
|
255
|
+
"numbering": [
|
|
256
|
+
1,
|
|
257
|
+
1,
|
|
258
|
+
1
|
|
259
|
+
],
|
|
260
|
+
"parent": "root"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"value": "Basic usage",
|
|
264
|
+
"href": "#basic-usage",
|
|
265
|
+
"depth": 3,
|
|
266
|
+
"numbering": [
|
|
267
|
+
1,
|
|
268
|
+
1,
|
|
269
|
+
2
|
|
270
|
+
],
|
|
271
|
+
"parent": "root"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"value": "Usage examples",
|
|
275
|
+
"href": "#usage-examples",
|
|
276
|
+
"depth": 2,
|
|
277
|
+
"numbering": [
|
|
278
|
+
1,
|
|
279
|
+
2
|
|
280
|
+
],
|
|
281
|
+
"parent": "root"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"value": "Visual variants",
|
|
285
|
+
"href": "#visual-variants",
|
|
286
|
+
"depth": 3,
|
|
287
|
+
"numbering": [
|
|
288
|
+
1,
|
|
289
|
+
2,
|
|
290
|
+
1
|
|
291
|
+
],
|
|
292
|
+
"parent": "root"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"value": "Alignment options",
|
|
296
|
+
"href": "#alignment-options",
|
|
297
|
+
"depth": 3,
|
|
298
|
+
"numbering": [
|
|
299
|
+
1,
|
|
300
|
+
2,
|
|
301
|
+
2
|
|
302
|
+
],
|
|
303
|
+
"parent": "root"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"value": "Ordered lists",
|
|
307
|
+
"href": "#ordered-lists",
|
|
308
|
+
"depth": 3,
|
|
309
|
+
"numbering": [
|
|
310
|
+
1,
|
|
311
|
+
2,
|
|
312
|
+
3
|
|
313
|
+
],
|
|
314
|
+
"parent": "root"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"value": "Custom indicators",
|
|
318
|
+
"href": "#custom-indicators",
|
|
319
|
+
"depth": 3,
|
|
320
|
+
"numbering": [
|
|
321
|
+
1,
|
|
322
|
+
2,
|
|
323
|
+
4
|
|
324
|
+
],
|
|
325
|
+
"parent": "root"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"value": "Nested lists",
|
|
329
|
+
"href": "#nested-lists",
|
|
330
|
+
"depth": 3,
|
|
331
|
+
"numbering": [
|
|
332
|
+
1,
|
|
333
|
+
2,
|
|
334
|
+
5
|
|
335
|
+
],
|
|
336
|
+
"parent": "root"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"value": "Spacing and gap",
|
|
340
|
+
"href": "#spacing-and-gap",
|
|
341
|
+
"depth": 3,
|
|
342
|
+
"numbering": [
|
|
343
|
+
1,
|
|
344
|
+
2,
|
|
345
|
+
6
|
|
346
|
+
],
|
|
347
|
+
"parent": "root"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"value": "Component requirements",
|
|
351
|
+
"href": "#component-requirements",
|
|
352
|
+
"depth": 2,
|
|
353
|
+
"numbering": [
|
|
354
|
+
1,
|
|
355
|
+
3
|
|
356
|
+
],
|
|
357
|
+
"parent": "root"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"value": "Usage context",
|
|
361
|
+
"href": "#usage-context",
|
|
362
|
+
"depth": 3,
|
|
363
|
+
"numbering": [
|
|
364
|
+
1,
|
|
365
|
+
3,
|
|
366
|
+
1
|
|
367
|
+
],
|
|
368
|
+
"parent": "root"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"value": "Accessibility",
|
|
372
|
+
"href": "#accessibility",
|
|
373
|
+
"depth": 2,
|
|
374
|
+
"numbering": [
|
|
375
|
+
1,
|
|
376
|
+
4
|
|
377
|
+
],
|
|
378
|
+
"parent": "root"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"value": "Keyboard navigation",
|
|
382
|
+
"href": "#keyboard-navigation",
|
|
383
|
+
"depth": 4,
|
|
384
|
+
"numbering": [
|
|
385
|
+
1,
|
|
386
|
+
4,
|
|
387
|
+
1,
|
|
388
|
+
1
|
|
389
|
+
],
|
|
390
|
+
"parent": "root"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"value": "API reference",
|
|
394
|
+
"href": "#api-reference",
|
|
395
|
+
"depth": 2,
|
|
396
|
+
"numbering": [
|
|
397
|
+
1,
|
|
398
|
+
5
|
|
399
|
+
],
|
|
400
|
+
"parent": "root"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"value": "Common patterns",
|
|
404
|
+
"href": "#common-patterns",
|
|
405
|
+
"depth": 2,
|
|
406
|
+
"numbering": [
|
|
407
|
+
1,
|
|
408
|
+
6
|
|
409
|
+
],
|
|
410
|
+
"parent": "root"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"value": "Task list with status indicators",
|
|
414
|
+
"href": "#task-list-with-status-indicators",
|
|
415
|
+
"depth": 3,
|
|
416
|
+
"numbering": [
|
|
417
|
+
1,
|
|
418
|
+
6,
|
|
419
|
+
1
|
|
420
|
+
],
|
|
421
|
+
"parent": "root"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"value": "Navigation menu",
|
|
425
|
+
"href": "#navigation-menu",
|
|
426
|
+
"depth": 3,
|
|
427
|
+
"numbering": [
|
|
428
|
+
1,
|
|
429
|
+
6,
|
|
430
|
+
2
|
|
431
|
+
],
|
|
432
|
+
"parent": "root"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"value": "Requirements checklist",
|
|
436
|
+
"href": "#requirements-checklist",
|
|
437
|
+
"depth": 3,
|
|
438
|
+
"numbering": [
|
|
439
|
+
1,
|
|
440
|
+
6,
|
|
441
|
+
3
|
|
442
|
+
],
|
|
443
|
+
"parent": "root"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"value": "Testing your implementation",
|
|
447
|
+
"href": "#testing-your-implementation",
|
|
448
|
+
"depth": 2,
|
|
449
|
+
"numbering": [
|
|
450
|
+
1,
|
|
451
|
+
7
|
|
452
|
+
],
|
|
453
|
+
"parent": "root"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"value": "Basic Rendering Tests",
|
|
457
|
+
"href": "#basic-rendering-tests",
|
|
458
|
+
"depth": 3,
|
|
459
|
+
"numbering": [
|
|
460
|
+
1,
|
|
461
|
+
7,
|
|
462
|
+
1
|
|
463
|
+
],
|
|
464
|
+
"parent": "root"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"value": "Variant Tests",
|
|
468
|
+
"href": "#variant-tests",
|
|
469
|
+
"depth": 3,
|
|
470
|
+
"numbering": [
|
|
471
|
+
1,
|
|
472
|
+
7,
|
|
473
|
+
2
|
|
474
|
+
],
|
|
475
|
+
"parent": "root"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"value": "Alignment Tests",
|
|
479
|
+
"href": "#alignment-tests",
|
|
480
|
+
"depth": 3,
|
|
481
|
+
"numbering": [
|
|
482
|
+
1,
|
|
483
|
+
7,
|
|
484
|
+
3
|
|
485
|
+
],
|
|
486
|
+
"parent": "root"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"value": "Nested Lists Tests",
|
|
490
|
+
"href": "#nested-lists-tests",
|
|
491
|
+
"depth": 3,
|
|
492
|
+
"numbering": [
|
|
493
|
+
1,
|
|
494
|
+
7,
|
|
495
|
+
4
|
|
496
|
+
],
|
|
497
|
+
"parent": "root"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"value": "Style Props Tests",
|
|
501
|
+
"href": "#style-props-tests",
|
|
502
|
+
"depth": 3,
|
|
503
|
+
"numbering": [
|
|
504
|
+
1,
|
|
505
|
+
7,
|
|
506
|
+
5
|
|
507
|
+
],
|
|
508
|
+
"parent": "root"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"value": "Props Forwarding Tests",
|
|
512
|
+
"href": "#props-forwarding-tests",
|
|
513
|
+
"depth": 3,
|
|
514
|
+
"numbering": [
|
|
515
|
+
1,
|
|
516
|
+
7,
|
|
517
|
+
6
|
|
518
|
+
],
|
|
519
|
+
"parent": "root"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"value": "Indicator Tests",
|
|
523
|
+
"href": "#indicator-tests",
|
|
524
|
+
"depth": 3,
|
|
525
|
+
"numbering": [
|
|
526
|
+
1,
|
|
527
|
+
7,
|
|
528
|
+
7
|
|
529
|
+
],
|
|
530
|
+
"parent": "root"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"value": "Resources",
|
|
534
|
+
"href": "#resources",
|
|
535
|
+
"depth": 2,
|
|
536
|
+
"numbering": [
|
|
537
|
+
1,
|
|
538
|
+
8
|
|
539
|
+
],
|
|
540
|
+
"parent": "root"
|
|
541
|
+
}
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
"guidelines": {
|
|
545
|
+
"mdx": "\n## Guidelines\n\nList guidelines aim to provide users the best experience when understanding\ninformation that is being conveyed through the interface.\n\n### Best practices\n\n- **Consistency in content:** Ensure all items within a single list adhere to\n the same content structure (e.g., if one item has an icon and metadata, all\n items should).\n- **Clear hierarchy:** Use typography, indentation, and visual separators to\n establish a clear hierarchy between list items and their sub-elements.\n- **Easy scanning:** Prioritize short, primary information at the beginning of\n each list item to enable quick scanning.\n- **Interactivity:** Clearly distinguish interactive list items\n (tappable/clickable) from static, informational ones using visual cues like\n hover states and pointers.\n- **State management:** Define consistent visual states for list items,\n including default, hover, focused, selected, and disabled.\n- **Grouping:** Use dividers, headers, or subtle visual spacing to group related\n items within a long list (e.g., grouping customers by status or date).\n- **Limited information:** Avoid cramming too much detail into a single list\n item; use secondary detail panels, cards, or dedicated pages for complex\n information.\n\n### Usage\n\nLists are fundamental UI components used to display a series of related items,\nallowing users to quickly scan, organize, and interact with structured data or\noptions.\n\n> [!TIP]\\\n> When to use\n\n- **Navigation menus:** For primary or secondary menus where items are primarily\n text links.\n- **Short metadata/tasks:** For displaying a history log, task list, or brief\n metadata where the vertical format is optimal for chronological or simple item\n tracking.\n- **Structured options:** To present settings, filters, or menu choices where\n hierarchy and text are the main content.\n\n> [!CAUTION]\\\n> When not to use\n\n- **Image-heavy content:** For displaying a collection where the visual preview\n (e.g., product image) is the most critical element.\n- **Wide data sets:** When the content requires many columns of data that won't\n fit on a single line, even on a large screen.\n- **Complex data comparison:** When the user needs to compare many different\n data points across items, use a data table instead.\n\n### Do's and don'ts for implementing a list\n\n> [!TIP]\\\n> **Do**\n>\n> - Ensure adequate padding and spacing to clearly separate each list item.\n> - Provide clear feedback when an item is selected or activated.\n> - Use semantic HTML (`<ul>`, `<ol>`, `<li>`) to convey structure to assistive\n> technologies.\n> - Allow content within the list item to truncate gracefully, revealing the\n> full text via a tooltip or expansion interactive.\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't use generic links like \"Click here\"; make the entire interactive item\n> text descriptive.\n> - Don't mix vastly different content structures or types of items in one list.\n> - Don't neglect a strategy for empty states (what happens when the list has no\n> items?).\n> - Don't use low-contrast text for critical list item details.\n",
|
|
546
|
+
"toc": [
|
|
547
|
+
{
|
|
548
|
+
"value": "Guidelines",
|
|
549
|
+
"href": "#guidelines",
|
|
550
|
+
"depth": 2,
|
|
551
|
+
"numbering": [
|
|
552
|
+
1,
|
|
553
|
+
1
|
|
554
|
+
],
|
|
555
|
+
"parent": "root"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"value": "Best practices",
|
|
559
|
+
"href": "#best-practices",
|
|
560
|
+
"depth": 3,
|
|
561
|
+
"numbering": [
|
|
562
|
+
1,
|
|
563
|
+
1,
|
|
564
|
+
1
|
|
565
|
+
],
|
|
566
|
+
"parent": "root"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"value": "Usage",
|
|
570
|
+
"href": "#usage",
|
|
571
|
+
"depth": 3,
|
|
572
|
+
"numbering": [
|
|
573
|
+
1,
|
|
574
|
+
1,
|
|
575
|
+
2
|
|
576
|
+
],
|
|
577
|
+
"parent": "root"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"value": "Do's and don'ts for implementing a list",
|
|
581
|
+
"href": "#dos-and-donts-for-implementing-a-list",
|
|
582
|
+
"depth": 3,
|
|
583
|
+
"numbering": [
|
|
584
|
+
1,
|
|
585
|
+
1,
|
|
586
|
+
3
|
|
587
|
+
],
|
|
588
|
+
"parent": "root"
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|