@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,415 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-LoadingSpinner",
|
|
4
|
+
"title": "Loading spinner",
|
|
5
|
+
"exportName": "LoadingSpinner",
|
|
6
|
+
"description": "A circular visual indicator that displays the loading status of an ongoing process. It can represent either determinate or indeterminate progress.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/loading-spinner/loading-spinner.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Feedback",
|
|
13
|
+
"Loading spinner"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/feedback/loading-spinner",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"loading",
|
|
19
|
+
"spinner",
|
|
20
|
+
"progress"
|
|
21
|
+
],
|
|
22
|
+
"toc": [
|
|
23
|
+
{
|
|
24
|
+
"value": "Overview",
|
|
25
|
+
"href": "#overview",
|
|
26
|
+
"depth": 2,
|
|
27
|
+
"numbering": [
|
|
28
|
+
1,
|
|
29
|
+
1
|
|
30
|
+
],
|
|
31
|
+
"parent": "root"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"value": "Resources",
|
|
35
|
+
"href": "#resources",
|
|
36
|
+
"depth": 3,
|
|
37
|
+
"numbering": [
|
|
38
|
+
1,
|
|
39
|
+
1,
|
|
40
|
+
1
|
|
41
|
+
],
|
|
42
|
+
"parent": "root"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"value": "Variables",
|
|
46
|
+
"href": "#variables",
|
|
47
|
+
"depth": 2,
|
|
48
|
+
"numbering": [
|
|
49
|
+
1,
|
|
50
|
+
2
|
|
51
|
+
],
|
|
52
|
+
"parent": "root"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "Visuals",
|
|
56
|
+
"href": "#visuals",
|
|
57
|
+
"depth": 3,
|
|
58
|
+
"numbering": [
|
|
59
|
+
1,
|
|
60
|
+
2,
|
|
61
|
+
1
|
|
62
|
+
],
|
|
63
|
+
"parent": "root"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "On white background",
|
|
67
|
+
"href": "#on-white-background",
|
|
68
|
+
"depth": 4,
|
|
69
|
+
"numbering": [
|
|
70
|
+
1,
|
|
71
|
+
2,
|
|
72
|
+
1,
|
|
73
|
+
1
|
|
74
|
+
],
|
|
75
|
+
"parent": "root"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"value": "On dark background",
|
|
79
|
+
"href": "#on-dark-background",
|
|
80
|
+
"depth": 4,
|
|
81
|
+
"numbering": [
|
|
82
|
+
1,
|
|
83
|
+
2,
|
|
84
|
+
1,
|
|
85
|
+
2
|
|
86
|
+
],
|
|
87
|
+
"parent": "root"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"value": "Size",
|
|
91
|
+
"href": "#size",
|
|
92
|
+
"depth": 3,
|
|
93
|
+
"numbering": [
|
|
94
|
+
1,
|
|
95
|
+
2,
|
|
96
|
+
2
|
|
97
|
+
],
|
|
98
|
+
"parent": "root"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"figmaLink": "https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=5605-25451&m=dev",
|
|
102
|
+
"layout": "app-frame",
|
|
103
|
+
"tabs": [
|
|
104
|
+
{
|
|
105
|
+
"key": "overview",
|
|
106
|
+
"title": "Overview",
|
|
107
|
+
"order": 0
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"key": "guidelines",
|
|
111
|
+
"title": "Guidelines",
|
|
112
|
+
"order": 2
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"key": "dev",
|
|
116
|
+
"title": "Implementation",
|
|
117
|
+
"order": 3
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"key": "a11y",
|
|
121
|
+
"title": "Accessibility",
|
|
122
|
+
"order": 4
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"mdx": "\n## Overview\n\nA loading spinner's primary usage is to visually communicate to the user that a\nprocess is ongoing and that they need to wait. It indicates that the system is\nworking and prevents the user from thinking the application is frozen or\nunresponsive.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=5605-25451&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Visuals\n\n#### On white background\n\nMost common, this is the default spinner animation to be used on white\nbackgrounds.\n\n```jsx live\nconst App = () => <LoadingSpinner aria-label=\"Loading content\" />\n```\n\n#### On dark background\n\nThis is the default spinner animation to be used on dark backgrounds.\n\n```jsx live\nconst App = () => <Stack backgroundColor=\"neutral.8\"><LoadingSpinner aria-label=\"Loading content\" colorPalette=\"white\" /></Stack>\n```\n\n### Size\n\nLoading spinners have five sizes to choose from: large, medium, small, x-small,\nand 2x-small.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <LoadingSpinner size=\"lg\" aria-label=\"Large spinner\" />\n <LoadingSpinner size=\"md\" aria-label=\"Medium spinner\" />\n <LoadingSpinner size=\"sm\" aria-label=\"Small spinner\" />\n <LoadingSpinner size=\"xs\" aria-label=\"Extra small spinner\" />\n <LoadingSpinner size=\"2xs\" aria-label=\"Extra extra small spinner\" />\n </Stack>\n)\n```\n",
|
|
127
|
+
"views": {
|
|
128
|
+
"overview": {
|
|
129
|
+
"mdx": "\n## Overview\n\nA loading spinner's primary usage is to visually communicate to the user that a\nprocess is ongoing and that they need to wait. It indicates that the system is\nworking and prevents the user from thinking the application is frozen or\nunresponsive.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system?node-id=5605-25451&m=dev)\n\n## Variables\n\nGet familiar with the features.\n\n### Visuals\n\n#### On white background\n\nMost common, this is the default spinner animation to be used on white\nbackgrounds.\n\n```jsx live\nconst App = () => <LoadingSpinner aria-label=\"Loading content\" />\n```\n\n#### On dark background\n\nThis is the default spinner animation to be used on dark backgrounds.\n\n```jsx live\nconst App = () => <Stack backgroundColor=\"neutral.8\"><LoadingSpinner aria-label=\"Loading content\" colorPalette=\"white\" /></Stack>\n```\n\n### Size\n\nLoading spinners have five sizes to choose from: large, medium, small, x-small,\nand 2x-small.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <LoadingSpinner size=\"lg\" aria-label=\"Large spinner\" />\n <LoadingSpinner size=\"md\" aria-label=\"Medium spinner\" />\n <LoadingSpinner size=\"sm\" aria-label=\"Small spinner\" />\n <LoadingSpinner size=\"xs\" aria-label=\"Extra small spinner\" />\n <LoadingSpinner size=\"2xs\" aria-label=\"Extra extra small spinner\" />\n </Stack>\n)\n```\n",
|
|
130
|
+
"toc": [
|
|
131
|
+
{
|
|
132
|
+
"value": "Overview",
|
|
133
|
+
"href": "#overview",
|
|
134
|
+
"depth": 2,
|
|
135
|
+
"numbering": [
|
|
136
|
+
1,
|
|
137
|
+
1
|
|
138
|
+
],
|
|
139
|
+
"parent": "root"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"value": "Resources",
|
|
143
|
+
"href": "#resources",
|
|
144
|
+
"depth": 3,
|
|
145
|
+
"numbering": [
|
|
146
|
+
1,
|
|
147
|
+
1,
|
|
148
|
+
1
|
|
149
|
+
],
|
|
150
|
+
"parent": "root"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"value": "Variables",
|
|
154
|
+
"href": "#variables",
|
|
155
|
+
"depth": 2,
|
|
156
|
+
"numbering": [
|
|
157
|
+
1,
|
|
158
|
+
2
|
|
159
|
+
],
|
|
160
|
+
"parent": "root"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"value": "Visuals",
|
|
164
|
+
"href": "#visuals",
|
|
165
|
+
"depth": 3,
|
|
166
|
+
"numbering": [
|
|
167
|
+
1,
|
|
168
|
+
2,
|
|
169
|
+
1
|
|
170
|
+
],
|
|
171
|
+
"parent": "root"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"value": "On white background",
|
|
175
|
+
"href": "#on-white-background",
|
|
176
|
+
"depth": 4,
|
|
177
|
+
"numbering": [
|
|
178
|
+
1,
|
|
179
|
+
2,
|
|
180
|
+
1,
|
|
181
|
+
1
|
|
182
|
+
],
|
|
183
|
+
"parent": "root"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"value": "On dark background",
|
|
187
|
+
"href": "#on-dark-background",
|
|
188
|
+
"depth": 4,
|
|
189
|
+
"numbering": [
|
|
190
|
+
1,
|
|
191
|
+
2,
|
|
192
|
+
1,
|
|
193
|
+
2
|
|
194
|
+
],
|
|
195
|
+
"parent": "root"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"value": "Size",
|
|
199
|
+
"href": "#size",
|
|
200
|
+
"depth": 3,
|
|
201
|
+
"numbering": [
|
|
202
|
+
1,
|
|
203
|
+
2,
|
|
204
|
+
2
|
|
205
|
+
],
|
|
206
|
+
"parent": "root"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"a11y": {
|
|
211
|
+
"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 = () => <LoadingSpinner aria-label=\"Loading data\" />;\n```\n\n### Accessibility standards\n\n- **Use an accessible label to provide context:** Always provide an `aria-label`\n to describe what is loading.\n- **Hide the spinner from assistive technologies when it's not visible or in\n use:** Use appropriate ARIA attributes to manage visibility.\n- **Announce a change in state to screen readers:** Update users on the loading\n progress using live regions.\n- **Ensure the contrast ratio is at least 3:1 against the background:** Verify\n color contrast meets accessibility standards.\n- **Use aria-label to describe the spinner:** Provide clear, concise\n descriptions like \"Loading data\" or \"Processing request\".\n- **Do not rely on color alone to communicate information:** Use additional\n visual cues beyond color.\n- **Provide a clear indication of what is loading or the action being\n performed:** Be specific in your aria-label.\n- **Ensure the spinner has a valid HTML structure and role:** The component uses\n `role=\"progressbar\"` by default.\n",
|
|
212
|
+
"toc": [
|
|
213
|
+
{
|
|
214
|
+
"value": "Accessibility",
|
|
215
|
+
"href": "#accessibility",
|
|
216
|
+
"depth": 2,
|
|
217
|
+
"numbering": [
|
|
218
|
+
1,
|
|
219
|
+
1
|
|
220
|
+
],
|
|
221
|
+
"parent": "root"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"value": "Accessibility standards",
|
|
225
|
+
"href": "#accessibility-standards",
|
|
226
|
+
"depth": 3,
|
|
227
|
+
"numbering": [
|
|
228
|
+
1,
|
|
229
|
+
1,
|
|
230
|
+
1
|
|
231
|
+
],
|
|
232
|
+
"parent": "root"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"dev": {
|
|
237
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { LoadingSpinner, type LoadingSpinnerProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe LoadingSpinner component indicates an ongoing process or indeterminate loading state.\n\n```jsx live-dev\nconst App = () => (\n <LoadingSpinner />\n)\n```\n\n## Usage examples\n\n### Size options\n\nThe `size` prop controls the dimensions of the spinner to match your interface density. Available sizes are `2xs`, `xs`, `sm` (default), `md`, and `lg`.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <LoadingSpinner size=\"2xs\" />\n <LoadingSpinner size=\"xs\" />\n <LoadingSpinner size=\"sm\" />\n <LoadingSpinner size=\"md\" />\n <LoadingSpinner size=\"lg\" />\n </Stack>\n)\n```\n\n### Visual variants\n\nThe `colorPalette` prop enables rendering a high-contrast loading spinner on light and dark backgrounds.\n\n- `primary`: The default color, suitable for light backgrounds.\n- `white`: Suitable for dark backgrounds or colored surfaces.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\">\n <LoadingSpinner colorPalette=\"primary\" margin=\"400\"/>\n <LoadingSpinner colorPalette=\"white\" margin=\"400\" bgColor=\"black\" />\n </Stack>\n)\n```\n\n## Component requirements\n\n## Accessibility\n\nThe LoadingSpinner uses `role=\"progressbar\"` and an indeterminate state by default.\n\nYou **must** ensure the spinner has an accessible label. The component provides a default localized label (\"Loading\"), but you should provide a more specific label when possible using `aria-label` or `aria-labelledby`.\n\n```tsx\n// Recommended: Specific label describing what is loading\n<LoadingSpinner aria-label=\"Loading order details\" />\n\n// Using aria-labelledby\n<h3 id=\"loading-heading\">Loading Users</h3>\n<LoadingSpinner aria-labelledby=\"loading-heading\" />\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 = \"user-list-loading-spinner\";\n\nexport const UserList = () => (\n <LoadingSpinner id={PERSISTENT_ID} />\n);\n```\n\n## API reference\n\n<PropsTable id=\"LoadingSpinner\" />\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using LoadingSpinner within your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic Rendering Tests\n\nVerify the component renders with the expected accessibility attributes\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport { LoadingSpinner, NimbusProvider } from \"@commercetools/nimbus\";\n\ndescribe(\"LoadingSpinner - Basic rendering\", () => {\n it(\"renders with default accessibility attributes\", () => {\n render(\n <NimbusProvider>\n <LoadingSpinner />\n </NimbusProvider>\n );\n\n // Verify role and default label\n const spinner = screen.getByRole(\"progressbar\");\n expect(spinner).toBeInTheDocument();\n expect(spinner).toHaveAttribute(\"aria-label\", \"Loading data\");\n });\n\n it(\"renders with a custom accessible label\", () => {\n render(\n <NimbusProvider>\n <LoadingSpinner aria-label=\"Loading products\" />\n </NimbusProvider>\n );\n\n expect(\n screen.getByRole(\"progressbar\", { name: \"Loading products\" })\n ).toBeInTheDocument();\n });\n\n it(\"renders with different sizes\", () => {\n const { rerender } = render(\n <NimbusProvider>\n <LoadingSpinner size=\"sm\" />\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"progressbar\")).toBeInTheDocument();\n\n rerender(\n <NimbusProvider>\n <LoadingSpinner size=\"lg\" />\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"progressbar\")).toBeInTheDocument();\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-loadingspinner--docs)\n- [React Aria ProgressBar](https://react-spectrum.adobe.com/react-aria/ProgressBar.html)\n\n",
|
|
238
|
+
"toc": [
|
|
239
|
+
{
|
|
240
|
+
"value": "Getting started",
|
|
241
|
+
"href": "#getting-started",
|
|
242
|
+
"depth": 2,
|
|
243
|
+
"numbering": [
|
|
244
|
+
1,
|
|
245
|
+
1
|
|
246
|
+
],
|
|
247
|
+
"parent": "root"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"value": "Import",
|
|
251
|
+
"href": "#import",
|
|
252
|
+
"depth": 3,
|
|
253
|
+
"numbering": [
|
|
254
|
+
1,
|
|
255
|
+
1,
|
|
256
|
+
1
|
|
257
|
+
],
|
|
258
|
+
"parent": "root"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"value": "Basic usage",
|
|
262
|
+
"href": "#basic-usage",
|
|
263
|
+
"depth": 3,
|
|
264
|
+
"numbering": [
|
|
265
|
+
1,
|
|
266
|
+
1,
|
|
267
|
+
2
|
|
268
|
+
],
|
|
269
|
+
"parent": "root"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"value": "Usage examples",
|
|
273
|
+
"href": "#usage-examples",
|
|
274
|
+
"depth": 2,
|
|
275
|
+
"numbering": [
|
|
276
|
+
1,
|
|
277
|
+
2
|
|
278
|
+
],
|
|
279
|
+
"parent": "root"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"value": "Size options",
|
|
283
|
+
"href": "#size-options",
|
|
284
|
+
"depth": 3,
|
|
285
|
+
"numbering": [
|
|
286
|
+
1,
|
|
287
|
+
2,
|
|
288
|
+
1
|
|
289
|
+
],
|
|
290
|
+
"parent": "root"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"value": "Visual variants",
|
|
294
|
+
"href": "#visual-variants",
|
|
295
|
+
"depth": 3,
|
|
296
|
+
"numbering": [
|
|
297
|
+
1,
|
|
298
|
+
2,
|
|
299
|
+
2
|
|
300
|
+
],
|
|
301
|
+
"parent": "root"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"value": "Component requirements",
|
|
305
|
+
"href": "#component-requirements",
|
|
306
|
+
"depth": 2,
|
|
307
|
+
"numbering": [
|
|
308
|
+
1,
|
|
309
|
+
3
|
|
310
|
+
],
|
|
311
|
+
"parent": "root"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"value": "Accessibility",
|
|
315
|
+
"href": "#accessibility",
|
|
316
|
+
"depth": 2,
|
|
317
|
+
"numbering": [
|
|
318
|
+
1,
|
|
319
|
+
4
|
|
320
|
+
],
|
|
321
|
+
"parent": "root"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"value": "API reference",
|
|
325
|
+
"href": "#api-reference",
|
|
326
|
+
"depth": 2,
|
|
327
|
+
"numbering": [
|
|
328
|
+
1,
|
|
329
|
+
5
|
|
330
|
+
],
|
|
331
|
+
"parent": "root"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"value": "Testing your implementation",
|
|
335
|
+
"href": "#testing-your-implementation",
|
|
336
|
+
"depth": 2,
|
|
337
|
+
"numbering": [
|
|
338
|
+
1,
|
|
339
|
+
6
|
|
340
|
+
],
|
|
341
|
+
"parent": "root"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"value": "Basic Rendering Tests",
|
|
345
|
+
"href": "#basic-rendering-tests",
|
|
346
|
+
"depth": 3,
|
|
347
|
+
"numbering": [
|
|
348
|
+
1,
|
|
349
|
+
6,
|
|
350
|
+
1
|
|
351
|
+
],
|
|
352
|
+
"parent": "root"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"value": "Resources",
|
|
356
|
+
"href": "#resources",
|
|
357
|
+
"depth": 2,
|
|
358
|
+
"numbering": [
|
|
359
|
+
1,
|
|
360
|
+
7
|
|
361
|
+
],
|
|
362
|
+
"parent": "root"
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
"guidelines": {
|
|
367
|
+
"mdx": "\n## Guidelines\n\nLoading spinner guidelines aim to provide clear and consistent visual feedback\nto users during processing delays, ensuring they understand the system is active\nand preventing frustration by indicating that they need to wait.\n\n### Best practices\n\n- **Appropriate placement:** Position the spinner close to the element or area\n that's loading. For full-page loads, center the spinner on the screen. For\n inline loading, place the spinner in the location of the content that will be\n loading.\n- **Provide context:** If the loading time is expected to be lengthy, consider\n adding a brief message like \"Loading...\" or \"Please wait...\" alongside the\n spinner. For very long loading periods, consider adding a percentage bar, or\n estimated time to let the user come back when ready.\n- **Responsive and smooth animation:** Ensure the spinner's animation is smooth\n and doesn't lag or stutter.\n- **Accessibility:** Use ARIA attributes (e.g., aria-busy, aria-label) to\n provide context for screen readers. If the loading time is excessive, provide\n a way to cancel the loading process.\n- **Avoid overuse:** Use spinners only when necessary, such as during data\n fetching or processing.\n- **Fallback options:** Have a fallback plan in case the loading action fails.\n Display an error message, and provide a way for the user to retry.\n\n### Usage\n\n> [!TIP]\\\n> When to use\n\n- **Data is being fetched:** When your application is retrieving data from a\n server or database, especially if it might take a noticeable amount of time.\n- **Processes are running:** During background operations, file uploads, or\n complex calculations that cause a delay.\n- **Content is loading:** When new content is being loaded dynamically, such as\n images, videos, or web pages.\n- **Actions are being processed:** After a user initiates an action, such as\n submitting a form or saving data, and the system requires time to complete the\n task.\n- **Any time a user action causes a delay:** When a user interacts with the UI\n and there is a delay that could cause confusion or a perception of the UI\n being broken.\n\n> [!CAUTION]\\\n> When not to use\n\n- **For extremely quick actions:** If an action completes in less than a few\n hundred milliseconds, a spinner is unnecessary and can feel jarring or\n distracting.\n- **For simple UI interactions:** Actions like toggling a switch, expanding a\n menu, or simple animations shouldn't trigger a spinner.\n- **When the wait is unpredictable or excessively long:** If you can't provide\n any indication of how long the wait will be, or if it might be excessively\n long, consider alternative indicators with a cancel option or other help text.\n- **When it creates unnecessary visual clutter:** Overusing spinners can make\n the UI feel busy and distracting.\n- **When a more subtle visual cue is sufficient:** For very short delays, a\n change in cursor, a slight fade, or a brief message might be more appropriate.\n\n### Loading spinner within elements\n\nWhen showing the process of content loading you may add the loading spinner\nwithin elements.\n\n> [!TIP]\\\n> **Do**\n>\n> - Use loading spinner in a disabled state so a user cannot interact with the\n> button fully till the action is complete.\n> - If the time expected to complete is short, no language is needed.\n\n```jsx live\nconst App = () => (\n <Flex gap=\"200\">\n <Button colorPalette=\"primary\" variant=\"solid\" isDisabled>\n <LoadingSpinner colorPalette=\"white\" />\n Saving...\n </Button>\n <Button colorPalette=\"primary\" variant=\"solid\" isDisabled>\n <LoadingSpinner colorPalette=\"white\" />\n </Button>\n </Flex>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Do not keep the button clickable while using a loading state.\n> - Do not use creative or funny phrases if using loading spinner in small\n> areas, to avoid confusing the user.\n\n```jsx live\nconst App = () => (\n <Flex gap=\"200\">\n <Button colorPalette=\"primary\" variant=\"solid\">\n <LoadingSpinner colorPalette=\"white\" />\n Remembering details...\n </Button>\n </Flex>\n);\n```\n\n> [!TIP]\\\n> **Do**\n>\n> - Use the loading spinner to show that content will be populated in that area.\n> - Keep loading messages short and clear.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"200\" alignItems=\"start\">\n <Button variant=\"ghost\" size=\"sm\" colorPalette=\"primary\">\n <Icons.Add />\n Add filter\n </Button>\n <Card.Root elevation=\"elevated\">\n <Card.Content>\n <Stack gap=\"200\">\n <ComboBox.Root\n inputValue=\"abc\"\n aria-label=\"Search filters\"\n allowsEmptyMenu\n >\n <ComboBox.Trigger />\n </ComboBox.Root>\n <Stack direction=\"horizontal\" alignSelf=\"center\" gap=\"200\">\n <LoadingSpinner colorPalette=\"primary\" />\n <Text>Loading results...</Text>\n </Stack>\n </Stack>\n </Card.Content>\n </Card.Root>\n </Stack>\n);\n```\n\n> [!CAUTION]\\\n> **Don't**\n>\n> - Don't use long statements. Try to keep updates and explainers short, as\n> translation will consistently add about 20% more length.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"200\" alignItems=\"start\">\n <Button variant=\"ghost\" size=\"sm\" colorPalette=\"primary\">\n <Icons.Add />\n Add filter\n </Button>\n <Card.Root elevation=\"elevated\">\n <Card.Content>\n <Stack gap=\"200\">\n <ComboBox.Root\n inputValue=\"abc\"\n aria-label=\"Search filters\"\n allowsEmptyMenu\n >\n <ComboBox.Trigger />\n </ComboBox.Root>\n <Stack\n direction=\"horizontal\"\n gap=\"200\"\n alignSelf=\"center\"\n width=\"2/3\"\n >\n <LoadingSpinner colorPalette=\"primary\" flexShrink=\"0\" />\n <Text>this is taking an unusually long time</Text>\n </Stack>\n </Stack>\n </Card.Content>\n </Card.Root>\n </Stack>\n);\n```\n",
|
|
368
|
+
"toc": [
|
|
369
|
+
{
|
|
370
|
+
"value": "Guidelines",
|
|
371
|
+
"href": "#guidelines",
|
|
372
|
+
"depth": 2,
|
|
373
|
+
"numbering": [
|
|
374
|
+
1,
|
|
375
|
+
1
|
|
376
|
+
],
|
|
377
|
+
"parent": "root"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"value": "Best practices",
|
|
381
|
+
"href": "#best-practices",
|
|
382
|
+
"depth": 3,
|
|
383
|
+
"numbering": [
|
|
384
|
+
1,
|
|
385
|
+
1,
|
|
386
|
+
1
|
|
387
|
+
],
|
|
388
|
+
"parent": "root"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"value": "Usage",
|
|
392
|
+
"href": "#usage",
|
|
393
|
+
"depth": 3,
|
|
394
|
+
"numbering": [
|
|
395
|
+
1,
|
|
396
|
+
1,
|
|
397
|
+
2
|
|
398
|
+
],
|
|
399
|
+
"parent": "root"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"value": "Loading spinner within elements",
|
|
403
|
+
"href": "#loading-spinner-within-elements",
|
|
404
|
+
"depth": 3,
|
|
405
|
+
"numbering": [
|
|
406
|
+
1,
|
|
407
|
+
1,
|
|
408
|
+
3
|
|
409
|
+
],
|
|
410
|
+
"parent": "root"
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|