@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,1040 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-Toast",
|
|
4
|
+
"title": "Toast",
|
|
5
|
+
"exportName": "toast",
|
|
6
|
+
"description": "Displays brief, temporary notifications that confirm actions or provide status updates without interrupting the user's workflow.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/toast/toast.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Feedback",
|
|
13
|
+
"Toast"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/feedback/toast",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"notification",
|
|
19
|
+
"feedback",
|
|
20
|
+
"transient"
|
|
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": "Key characteristics",
|
|
35
|
+
"href": "#key-characteristics",
|
|
36
|
+
"depth": 3,
|
|
37
|
+
"numbering": [
|
|
38
|
+
1,
|
|
39
|
+
1,
|
|
40
|
+
1
|
|
41
|
+
],
|
|
42
|
+
"parent": "root"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"value": "Resources",
|
|
46
|
+
"href": "#resources",
|
|
47
|
+
"depth": 3,
|
|
48
|
+
"numbering": [
|
|
49
|
+
1,
|
|
50
|
+
1,
|
|
51
|
+
2
|
|
52
|
+
],
|
|
53
|
+
"parent": "root"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": "Variables",
|
|
57
|
+
"href": "#variables",
|
|
58
|
+
"depth": 2,
|
|
59
|
+
"numbering": [
|
|
60
|
+
1,
|
|
61
|
+
2
|
|
62
|
+
],
|
|
63
|
+
"parent": "root"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "Color palette",
|
|
67
|
+
"href": "#color-palette",
|
|
68
|
+
"depth": 3,
|
|
69
|
+
"numbering": [
|
|
70
|
+
1,
|
|
71
|
+
2,
|
|
72
|
+
1
|
|
73
|
+
],
|
|
74
|
+
"parent": "root"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"value": "Info (blue)",
|
|
78
|
+
"href": "#info-blue",
|
|
79
|
+
"depth": 4,
|
|
80
|
+
"numbering": [
|
|
81
|
+
1,
|
|
82
|
+
2,
|
|
83
|
+
1,
|
|
84
|
+
1
|
|
85
|
+
],
|
|
86
|
+
"parent": "root"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"value": "Positive (green)",
|
|
90
|
+
"href": "#positive-green",
|
|
91
|
+
"depth": 4,
|
|
92
|
+
"numbering": [
|
|
93
|
+
1,
|
|
94
|
+
2,
|
|
95
|
+
1,
|
|
96
|
+
2
|
|
97
|
+
],
|
|
98
|
+
"parent": "root"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"value": "Warning (orange)",
|
|
102
|
+
"href": "#warning-orange",
|
|
103
|
+
"depth": 4,
|
|
104
|
+
"numbering": [
|
|
105
|
+
1,
|
|
106
|
+
2,
|
|
107
|
+
1,
|
|
108
|
+
3
|
|
109
|
+
],
|
|
110
|
+
"parent": "root"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"value": "Critical (red)",
|
|
114
|
+
"href": "#critical-red",
|
|
115
|
+
"depth": 4,
|
|
116
|
+
"numbering": [
|
|
117
|
+
1,
|
|
118
|
+
2,
|
|
119
|
+
1,
|
|
120
|
+
4
|
|
121
|
+
],
|
|
122
|
+
"parent": "root"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"value": "Placement",
|
|
126
|
+
"href": "#placement",
|
|
127
|
+
"depth": 3,
|
|
128
|
+
"numbering": [
|
|
129
|
+
1,
|
|
130
|
+
2,
|
|
131
|
+
2
|
|
132
|
+
],
|
|
133
|
+
"parent": "root"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"value": "Top positions",
|
|
137
|
+
"href": "#top-positions",
|
|
138
|
+
"depth": 4,
|
|
139
|
+
"numbering": [
|
|
140
|
+
1,
|
|
141
|
+
2,
|
|
142
|
+
2,
|
|
143
|
+
1
|
|
144
|
+
],
|
|
145
|
+
"parent": "root"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"value": "Bottom positions",
|
|
149
|
+
"href": "#bottom-positions",
|
|
150
|
+
"depth": 4,
|
|
151
|
+
"numbering": [
|
|
152
|
+
1,
|
|
153
|
+
2,
|
|
154
|
+
2,
|
|
155
|
+
2
|
|
156
|
+
],
|
|
157
|
+
"parent": "root"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"value": "Structure",
|
|
161
|
+
"href": "#structure",
|
|
162
|
+
"depth": 3,
|
|
163
|
+
"numbering": [
|
|
164
|
+
1,
|
|
165
|
+
2,
|
|
166
|
+
3
|
|
167
|
+
],
|
|
168
|
+
"parent": "root"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"value": "Title and description",
|
|
172
|
+
"href": "#title-and-description",
|
|
173
|
+
"depth": 4,
|
|
174
|
+
"numbering": [
|
|
175
|
+
1,
|
|
176
|
+
2,
|
|
177
|
+
3,
|
|
178
|
+
1
|
|
179
|
+
],
|
|
180
|
+
"parent": "root"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"value": "Custom icons",
|
|
184
|
+
"href": "#custom-icons",
|
|
185
|
+
"depth": 4,
|
|
186
|
+
"numbering": [
|
|
187
|
+
1,
|
|
188
|
+
2,
|
|
189
|
+
3,
|
|
190
|
+
2
|
|
191
|
+
],
|
|
192
|
+
"parent": "root"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"value": "Action buttons",
|
|
196
|
+
"href": "#action-buttons",
|
|
197
|
+
"depth": 4,
|
|
198
|
+
"numbering": [
|
|
199
|
+
1,
|
|
200
|
+
2,
|
|
201
|
+
3,
|
|
202
|
+
3
|
|
203
|
+
],
|
|
204
|
+
"parent": "root"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"value": "Guidelines",
|
|
208
|
+
"href": "#guidelines",
|
|
209
|
+
"depth": 2,
|
|
210
|
+
"numbering": [
|
|
211
|
+
1,
|
|
212
|
+
3
|
|
213
|
+
],
|
|
214
|
+
"parent": "root"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"value": "Best practices",
|
|
218
|
+
"href": "#best-practices",
|
|
219
|
+
"depth": 3,
|
|
220
|
+
"numbering": [
|
|
221
|
+
1,
|
|
222
|
+
3,
|
|
223
|
+
1
|
|
224
|
+
],
|
|
225
|
+
"parent": "root"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"value": "When to use",
|
|
229
|
+
"href": "#when-to-use",
|
|
230
|
+
"depth": 3,
|
|
231
|
+
"numbering": [
|
|
232
|
+
1,
|
|
233
|
+
3,
|
|
234
|
+
2
|
|
235
|
+
],
|
|
236
|
+
"parent": "root"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"value": "Writing guidelines",
|
|
240
|
+
"href": "#writing-guidelines",
|
|
241
|
+
"depth": 3,
|
|
242
|
+
"numbering": [
|
|
243
|
+
1,
|
|
244
|
+
3,
|
|
245
|
+
3
|
|
246
|
+
],
|
|
247
|
+
"parent": "root"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"value": "Message structure",
|
|
251
|
+
"href": "#message-structure",
|
|
252
|
+
"depth": 4,
|
|
253
|
+
"numbering": [
|
|
254
|
+
1,
|
|
255
|
+
3,
|
|
256
|
+
3,
|
|
257
|
+
1
|
|
258
|
+
],
|
|
259
|
+
"parent": "root"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"value": "Preferred words",
|
|
263
|
+
"href": "#preferred-words",
|
|
264
|
+
"depth": 4,
|
|
265
|
+
"numbering": [
|
|
266
|
+
1,
|
|
267
|
+
3,
|
|
268
|
+
3,
|
|
269
|
+
2
|
|
270
|
+
],
|
|
271
|
+
"parent": "root"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"value": "Avoid these words",
|
|
275
|
+
"href": "#avoid-these-words",
|
|
276
|
+
"depth": 4,
|
|
277
|
+
"numbering": [
|
|
278
|
+
1,
|
|
279
|
+
3,
|
|
280
|
+
3,
|
|
281
|
+
3
|
|
282
|
+
],
|
|
283
|
+
"parent": "root"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"value": "Voice and tone",
|
|
287
|
+
"href": "#voice-and-tone",
|
|
288
|
+
"depth": 4,
|
|
289
|
+
"numbering": [
|
|
290
|
+
1,
|
|
291
|
+
3,
|
|
292
|
+
3,
|
|
293
|
+
4
|
|
294
|
+
],
|
|
295
|
+
"parent": "root"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"value": "Accessibility",
|
|
299
|
+
"href": "#accessibility",
|
|
300
|
+
"depth": 2,
|
|
301
|
+
"numbering": [
|
|
302
|
+
1,
|
|
303
|
+
4
|
|
304
|
+
],
|
|
305
|
+
"parent": "root"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"value": "Screen reader announcements",
|
|
309
|
+
"href": "#screen-reader-announcements",
|
|
310
|
+
"depth": 3,
|
|
311
|
+
"numbering": [
|
|
312
|
+
1,
|
|
313
|
+
4,
|
|
314
|
+
1
|
|
315
|
+
],
|
|
316
|
+
"parent": "root"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"value": "Keyboard navigation",
|
|
320
|
+
"href": "#keyboard-navigation",
|
|
321
|
+
"depth": 3,
|
|
322
|
+
"numbering": [
|
|
323
|
+
1,
|
|
324
|
+
4,
|
|
325
|
+
2
|
|
326
|
+
],
|
|
327
|
+
"parent": "root"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"value": "Auto-dismiss considerations",
|
|
331
|
+
"href": "#auto-dismiss-considerations",
|
|
332
|
+
"depth": 3,
|
|
333
|
+
"numbering": [
|
|
334
|
+
1,
|
|
335
|
+
4,
|
|
336
|
+
3
|
|
337
|
+
],
|
|
338
|
+
"parent": "root"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"value": "Specs",
|
|
342
|
+
"href": "#specs",
|
|
343
|
+
"depth": 2,
|
|
344
|
+
"numbering": [
|
|
345
|
+
1,
|
|
346
|
+
5
|
|
347
|
+
],
|
|
348
|
+
"parent": "root"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"layout": "app-frame",
|
|
352
|
+
"tabs": [
|
|
353
|
+
{
|
|
354
|
+
"key": "overview",
|
|
355
|
+
"title": "Overview",
|
|
356
|
+
"order": 0
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"key": "dev",
|
|
360
|
+
"title": "Implementation",
|
|
361
|
+
"order": 3
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
"mdx": "\n## Overview\n\nToasts are lightweight, non-modal notifications that appear temporarily at the edge of the screen. They provide contextual feedback about completed actions, system status, or important updates while allowing users to continue their work uninterrupted. Unlike alerts or dialogs, toasts automatically dismiss after a few seconds and don't require user interaction unless an action is provided.\n\n### Key characteristics\n\n- **Non-intrusive**: Appears without blocking content or requiring immediate attention\n- **Temporary**: Auto-dismisses after a configurable duration (default 6 seconds)\n- **Stackable**: Multiple toasts can appear simultaneously in organized regions\n- **Contextual**: Provides immediate feedback at key moments in the user journey\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[ARIA Live Regions Pattern](https://www.w3.org/WAI/ARIA/apg/practices/live-regions/)\n\n## Variables\n\nGet familiar with the features.\n\n### Color palette\n\nEach color palette conveys a specific semantic meaning and visual urgency level.\n\n#### Info (blue)\n\nUse for general informational messages that provide helpful context without requiring action.\n\n```jsx-live\nconst App = () => {\n const showInfoToast = () => {\n toast.info({\n title: \"Information\",\n description: \"Your settings have been synced with the cloud.\"\n });\n };\n\n return <Button onPress={showInfoToast}>Show Info Toast</Button>;\n}\n```\n\n#### Positive (green)\n\nUse for success confirmations after users complete important actions.\n\n```jsx-live\nconst App = () => {\n const showSuccessToast = () => {\n toast.success({\n title: \"Success\",\n description: \"Your changes have been saved successfully.\"\n });\n };\n\n return <Button onPress={showSuccessToast}>Show Success Toast</Button>;\n}\n```\n\n#### Warning (orange)\n\nUse for cautionary messages that don't prevent action but require user awareness.\n\n```jsx-live\nconst App = () => {\n const showWarningToast = () => {\n toast.warning({\n title: \"Warning\",\n description: \"You're approaching your storage limit (85% used).\"\n });\n };\n\n return <Button onPress={showWarningToast}>Show Warning Toast</Button>;\n}\n```\n\n#### Critical (red)\n\nUse for error messages when actions fail or require immediate attention.\n\n```jsx-live\nconst App = () => {\n const showErrorToast = () => {\n toast.error({\n title: \"Error\",\n description: \"Unable to save changes. Please try again.\"\n });\n };\n\n return <Button onPress={showErrorToast}>Show Error Toast</Button>;\n}\n```\n\n### Placement\n\nChoose placement based on interface layout and user attention priorities.\n\n#### Top positions\n\nBest for important confirmations that users should notice immediately. Use top-end (default) for most cases as it aligns with reading direction and avoids covering primary content.\n\n- **Top-start**: Left-aligned notifications\n- **Top-end**: Right-aligned (default), recommended for most use cases\n\n#### Bottom positions\n\nBetter for less urgent updates or dense interfaces where top placement might obscure important content.\n\n- **Bottom-start**: Left-aligned, use in left-nav interfaces\n- **Bottom-end**: Right-aligned, balances with top-end\n\n### Structure\n\n#### Title and description\n\nAlways include a clear title that summarizes the message. Use description for additional context when needed.\n\n```jsx-live\nconst App = () => {\n const showToast = () => {\n toast.success({\n title: \"Product published\",\n description: \"Your product is now live and visible to customers.\"\n });\n };\n\n return <Button onPress={showToast}>Publish Product</Button>;\n}\n```\n\n#### Custom icons\n\nOverride the default type-based icon with a custom icon to provide more specific visual context.\n\n```jsx-live\nconst App = () => {\n const { Bathtub } = Icons;\n\n const showCustomIconToast = () => {\n toast.info({\n title: \"Bath is ready\",\n description: \"Your bath has reached the perfect temperature.\",\n icon: <Bathtub />\n });\n };\n\n return <Button onPress={showCustomIconToast}>Show Custom Icon Toast</Button>;\n}\n```\n\n#### Action buttons\n\nInclude action buttons when users might want to undo or view details. Toasts with actions auto-dismiss after the standard duration (6 seconds by default). Each toast supports a single action button — this keeps notifications scannable and focused. For workflows that involve multiple steps, use `toast.update()` to evolve the same toast through each stage rather than stacking separate notifications (see the [multi-step operations pattern](./toast.dev.mdx#multi-step-operations) in the implementation docs).\n\n```jsx-live\nconst App = () => {\n const [undone, setUndone] = useState(false);\n\n const handleDelete = () => {\n setUndone(false);\n toast({\n title: \"Item deleted\",\n description: \"The item has been removed from your list.\",\n type: \"info\",\n action: {\n label: \"Undo\",\n onPress: () => setUndone(true)\n }\n });\n };\n\n return (\n <Stack direction=\"column\" gap=\"200\">\n <Button onPress={handleDelete}>Delete Item</Button>\n {undone && <Text color=\"positive.fg\">Action was undone</Text>}\n </Stack>\n );\n}\n```\n\n## Guidelines\n\nUse toasts strategically to confirm actions and provide feedback without disrupting the user experience.\n\n### Best practices\n\n- **Keep messages concise**: Aim for titles under 60 characters and descriptions under 120 characters\n- **Use appropriate urgency**: Match the color palette to the message severity\n- **Provide clear actions**: If including a button, make the action specific (\"Undo delete\" not \"Undo\")\n- **Consider timing**: Default 6 seconds works for most messages; use longer durations for complex information\n- **Limit frequency**: Avoid showing multiple toasts simultaneously unless they're from different contexts\n- **Maintain consistency**: Use the same placement throughout your application\n\n### When to use\n\n> [!TIP]\\\n> When to use Toast\n\n- **Action confirmations**: \"Saved successfully\", \"Item deleted\"\n- **Background task updates**: \"Export complete\", \"Sync finished\"\n- **Non-critical errors**: Recoverable failures that don't require immediate action\n- **Undo opportunities**: Allow users to reverse recent actions\n- **Progress notifications**: Brief updates on ongoing operations\n\n> [!CAUTION]\\\n> When NOT to use Toast\n\n- **Critical errors requiring action**: Use Dialog instead for errors that block workflow\n- **Complex information**: Use Alert for messages requiring careful reading\n- **Persistent status**: Use Alert for information that should remain visible\n- **Input validation**: Use inline FieldErrors for form validation feedback\n- **Confirmation dialogs**: Use Dialog when user decision is required before proceeding\n- **Success states already visible**: Don't duplicate feedback that's obvious from UI changes\n\n### Writing guidelines\n\nWrite clear, actionable messages that users can quickly scan and understand.\n\n#### Message structure\n\n- **Title**: Action + outcome (\"Item deleted\", \"Changes saved\")\n- **Description**: Additional context or next steps (optional)\n- **Action button**: Specific verb (\"Undo\", \"View details\", \"Retry\")\n\n#### Preferred words\n\n| Use | When |\n| --- | --- |\n| **Saved** | Confirming data persistence |\n| **Deleted** | Confirming removal |\n| **Updated** | Confirming changes applied |\n| **Published** | Confirming content went live |\n| **Synced** | Confirming data synchronization |\n| **Complete** | Confirming process finished |\n\n#### Avoid these words\n\n| Avoid | Use instead |\n| --- | --- |\n| **Success!** | Specific action (\"Saved successfully\") |\n| **Error** | Specific problem (\"Unable to save changes\") |\n| **OK** | Specific action (\"View details\", \"Got it\") |\n| **Done** | Specific completion (\"Export complete\") |\n\n#### Voice and tone\n\n- **Active voice**: \"Deleted 3 items\" not \"3 items were deleted\"\n- **Positive framing**: \"Saved successfully\" not \"No errors occurred\"\n- **Specific outcomes**: \"Product published\" not \"Operation completed\"\n\n## Accessibility\n\nToasts follow WCAG 2.1 AA guidelines with proper ARIA implementation for screen readers.\n\n### Screen reader announcements\n\n- **Info, Success, and Warning**: Announced politely (role=\"status\") without interrupting current reading\n- **Error**: Announced assertively (role=\"alert\") to immediately notify users of important information\n- The `\"aria-live\"` option allows overriding the default politeness level for any toast type\n\n### Keyboard navigation\n\n| Key | Action |\n| --- | --- |\n| `Tab` | Navigate between close button and action button (if present) |\n| `Escape` | Dismiss the focused toast |\n| `Ctrl+Shift+[1-9]` | Focus specific placement region (based on numpad position) |\n\nUsers can dismiss toasts via keyboard, ensuring full accessibility for non-mouse users.\n\n### Auto-dismiss considerations\n\n- Toasts with action buttons auto-dismiss after the standard duration; use `duration: Infinity` with `closable: true` to create persistent toasts that require user interaction\n- Timers pause when toast is focused or hovered, accommodating users who need more time\n- Default 6-second duration allows sufficient time to read messages (reading time: ~2-3 seconds + comprehension buffer)\n\n## Specs\n\nSee the [Implementation tab](./toast.dev.mdx) for the full API reference including `ToastOptions` properties and control methods.\n",
|
|
366
|
+
"views": {
|
|
367
|
+
"overview": {
|
|
368
|
+
"mdx": "\n## Overview\n\nToasts are lightweight, non-modal notifications that appear temporarily at the edge of the screen. They provide contextual feedback about completed actions, system status, or important updates while allowing users to continue their work uninterrupted. Unlike alerts or dialogs, toasts automatically dismiss after a few seconds and don't require user interaction unless an action is provided.\n\n### Key characteristics\n\n- **Non-intrusive**: Appears without blocking content or requiring immediate attention\n- **Temporary**: Auto-dismisses after a configurable duration (default 6 seconds)\n- **Stackable**: Multiple toasts can appear simultaneously in organized regions\n- **Contextual**: Provides immediate feedback at key moments in the user journey\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[ARIA Live Regions Pattern](https://www.w3.org/WAI/ARIA/apg/practices/live-regions/)\n\n## Variables\n\nGet familiar with the features.\n\n### Color palette\n\nEach color palette conveys a specific semantic meaning and visual urgency level.\n\n#### Info (blue)\n\nUse for general informational messages that provide helpful context without requiring action.\n\n```jsx-live\nconst App = () => {\n const showInfoToast = () => {\n toast.info({\n title: \"Information\",\n description: \"Your settings have been synced with the cloud.\"\n });\n };\n\n return <Button onPress={showInfoToast}>Show Info Toast</Button>;\n}\n```\n\n#### Positive (green)\n\nUse for success confirmations after users complete important actions.\n\n```jsx-live\nconst App = () => {\n const showSuccessToast = () => {\n toast.success({\n title: \"Success\",\n description: \"Your changes have been saved successfully.\"\n });\n };\n\n return <Button onPress={showSuccessToast}>Show Success Toast</Button>;\n}\n```\n\n#### Warning (orange)\n\nUse for cautionary messages that don't prevent action but require user awareness.\n\n```jsx-live\nconst App = () => {\n const showWarningToast = () => {\n toast.warning({\n title: \"Warning\",\n description: \"You're approaching your storage limit (85% used).\"\n });\n };\n\n return <Button onPress={showWarningToast}>Show Warning Toast</Button>;\n}\n```\n\n#### Critical (red)\n\nUse for error messages when actions fail or require immediate attention.\n\n```jsx-live\nconst App = () => {\n const showErrorToast = () => {\n toast.error({\n title: \"Error\",\n description: \"Unable to save changes. Please try again.\"\n });\n };\n\n return <Button onPress={showErrorToast}>Show Error Toast</Button>;\n}\n```\n\n### Placement\n\nChoose placement based on interface layout and user attention priorities.\n\n#### Top positions\n\nBest for important confirmations that users should notice immediately. Use top-end (default) for most cases as it aligns with reading direction and avoids covering primary content.\n\n- **Top-start**: Left-aligned notifications\n- **Top-end**: Right-aligned (default), recommended for most use cases\n\n#### Bottom positions\n\nBetter for less urgent updates or dense interfaces where top placement might obscure important content.\n\n- **Bottom-start**: Left-aligned, use in left-nav interfaces\n- **Bottom-end**: Right-aligned, balances with top-end\n\n### Structure\n\n#### Title and description\n\nAlways include a clear title that summarizes the message. Use description for additional context when needed.\n\n```jsx-live\nconst App = () => {\n const showToast = () => {\n toast.success({\n title: \"Product published\",\n description: \"Your product is now live and visible to customers.\"\n });\n };\n\n return <Button onPress={showToast}>Publish Product</Button>;\n}\n```\n\n#### Custom icons\n\nOverride the default type-based icon with a custom icon to provide more specific visual context.\n\n```jsx-live\nconst App = () => {\n const { Bathtub } = Icons;\n\n const showCustomIconToast = () => {\n toast.info({\n title: \"Bath is ready\",\n description: \"Your bath has reached the perfect temperature.\",\n icon: <Bathtub />\n });\n };\n\n return <Button onPress={showCustomIconToast}>Show Custom Icon Toast</Button>;\n}\n```\n\n#### Action buttons\n\nInclude action buttons when users might want to undo or view details. Toasts with actions auto-dismiss after the standard duration (6 seconds by default). Each toast supports a single action button — this keeps notifications scannable and focused. For workflows that involve multiple steps, use `toast.update()` to evolve the same toast through each stage rather than stacking separate notifications (see the [multi-step operations pattern](./toast.dev.mdx#multi-step-operations) in the implementation docs).\n\n```jsx-live\nconst App = () => {\n const [undone, setUndone] = useState(false);\n\n const handleDelete = () => {\n setUndone(false);\n toast({\n title: \"Item deleted\",\n description: \"The item has been removed from your list.\",\n type: \"info\",\n action: {\n label: \"Undo\",\n onPress: () => setUndone(true)\n }\n });\n };\n\n return (\n <Stack direction=\"column\" gap=\"200\">\n <Button onPress={handleDelete}>Delete Item</Button>\n {undone && <Text color=\"positive.fg\">Action was undone</Text>}\n </Stack>\n );\n}\n```\n\n## Guidelines\n\nUse toasts strategically to confirm actions and provide feedback without disrupting the user experience.\n\n### Best practices\n\n- **Keep messages concise**: Aim for titles under 60 characters and descriptions under 120 characters\n- **Use appropriate urgency**: Match the color palette to the message severity\n- **Provide clear actions**: If including a button, make the action specific (\"Undo delete\" not \"Undo\")\n- **Consider timing**: Default 6 seconds works for most messages; use longer durations for complex information\n- **Limit frequency**: Avoid showing multiple toasts simultaneously unless they're from different contexts\n- **Maintain consistency**: Use the same placement throughout your application\n\n### When to use\n\n> [!TIP]\\\n> When to use Toast\n\n- **Action confirmations**: \"Saved successfully\", \"Item deleted\"\n- **Background task updates**: \"Export complete\", \"Sync finished\"\n- **Non-critical errors**: Recoverable failures that don't require immediate action\n- **Undo opportunities**: Allow users to reverse recent actions\n- **Progress notifications**: Brief updates on ongoing operations\n\n> [!CAUTION]\\\n> When NOT to use Toast\n\n- **Critical errors requiring action**: Use Dialog instead for errors that block workflow\n- **Complex information**: Use Alert for messages requiring careful reading\n- **Persistent status**: Use Alert for information that should remain visible\n- **Input validation**: Use inline FieldErrors for form validation feedback\n- **Confirmation dialogs**: Use Dialog when user decision is required before proceeding\n- **Success states already visible**: Don't duplicate feedback that's obvious from UI changes\n\n### Writing guidelines\n\nWrite clear, actionable messages that users can quickly scan and understand.\n\n#### Message structure\n\n- **Title**: Action + outcome (\"Item deleted\", \"Changes saved\")\n- **Description**: Additional context or next steps (optional)\n- **Action button**: Specific verb (\"Undo\", \"View details\", \"Retry\")\n\n#### Preferred words\n\n| Use | When |\n| --- | --- |\n| **Saved** | Confirming data persistence |\n| **Deleted** | Confirming removal |\n| **Updated** | Confirming changes applied |\n| **Published** | Confirming content went live |\n| **Synced** | Confirming data synchronization |\n| **Complete** | Confirming process finished |\n\n#### Avoid these words\n\n| Avoid | Use instead |\n| --- | --- |\n| **Success!** | Specific action (\"Saved successfully\") |\n| **Error** | Specific problem (\"Unable to save changes\") |\n| **OK** | Specific action (\"View details\", \"Got it\") |\n| **Done** | Specific completion (\"Export complete\") |\n\n#### Voice and tone\n\n- **Active voice**: \"Deleted 3 items\" not \"3 items were deleted\"\n- **Positive framing**: \"Saved successfully\" not \"No errors occurred\"\n- **Specific outcomes**: \"Product published\" not \"Operation completed\"\n\n## Accessibility\n\nToasts follow WCAG 2.1 AA guidelines with proper ARIA implementation for screen readers.\n\n### Screen reader announcements\n\n- **Info, Success, and Warning**: Announced politely (role=\"status\") without interrupting current reading\n- **Error**: Announced assertively (role=\"alert\") to immediately notify users of important information\n- The `\"aria-live\"` option allows overriding the default politeness level for any toast type\n\n### Keyboard navigation\n\n| Key | Action |\n| --- | --- |\n| `Tab` | Navigate between close button and action button (if present) |\n| `Escape` | Dismiss the focused toast |\n| `Ctrl+Shift+[1-9]` | Focus specific placement region (based on numpad position) |\n\nUsers can dismiss toasts via keyboard, ensuring full accessibility for non-mouse users.\n\n### Auto-dismiss considerations\n\n- Toasts with action buttons auto-dismiss after the standard duration; use `duration: Infinity` with `closable: true` to create persistent toasts that require user interaction\n- Timers pause when toast is focused or hovered, accommodating users who need more time\n- Default 6-second duration allows sufficient time to read messages (reading time: ~2-3 seconds + comprehension buffer)\n\n## Specs\n\nSee the [Implementation tab](./toast.dev.mdx) for the full API reference including `ToastOptions` properties and control methods.\n",
|
|
369
|
+
"toc": [
|
|
370
|
+
{
|
|
371
|
+
"value": "Overview",
|
|
372
|
+
"href": "#overview",
|
|
373
|
+
"depth": 2,
|
|
374
|
+
"numbering": [
|
|
375
|
+
1,
|
|
376
|
+
1
|
|
377
|
+
],
|
|
378
|
+
"parent": "root"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"value": "Key characteristics",
|
|
382
|
+
"href": "#key-characteristics",
|
|
383
|
+
"depth": 3,
|
|
384
|
+
"numbering": [
|
|
385
|
+
1,
|
|
386
|
+
1,
|
|
387
|
+
1
|
|
388
|
+
],
|
|
389
|
+
"parent": "root"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"value": "Resources",
|
|
393
|
+
"href": "#resources",
|
|
394
|
+
"depth": 3,
|
|
395
|
+
"numbering": [
|
|
396
|
+
1,
|
|
397
|
+
1,
|
|
398
|
+
2
|
|
399
|
+
],
|
|
400
|
+
"parent": "root"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"value": "Variables",
|
|
404
|
+
"href": "#variables",
|
|
405
|
+
"depth": 2,
|
|
406
|
+
"numbering": [
|
|
407
|
+
1,
|
|
408
|
+
2
|
|
409
|
+
],
|
|
410
|
+
"parent": "root"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"value": "Color palette",
|
|
414
|
+
"href": "#color-palette",
|
|
415
|
+
"depth": 3,
|
|
416
|
+
"numbering": [
|
|
417
|
+
1,
|
|
418
|
+
2,
|
|
419
|
+
1
|
|
420
|
+
],
|
|
421
|
+
"parent": "root"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"value": "Info (blue)",
|
|
425
|
+
"href": "#info-blue",
|
|
426
|
+
"depth": 4,
|
|
427
|
+
"numbering": [
|
|
428
|
+
1,
|
|
429
|
+
2,
|
|
430
|
+
1,
|
|
431
|
+
1
|
|
432
|
+
],
|
|
433
|
+
"parent": "root"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"value": "Positive (green)",
|
|
437
|
+
"href": "#positive-green",
|
|
438
|
+
"depth": 4,
|
|
439
|
+
"numbering": [
|
|
440
|
+
1,
|
|
441
|
+
2,
|
|
442
|
+
1,
|
|
443
|
+
2
|
|
444
|
+
],
|
|
445
|
+
"parent": "root"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"value": "Warning (orange)",
|
|
449
|
+
"href": "#warning-orange",
|
|
450
|
+
"depth": 4,
|
|
451
|
+
"numbering": [
|
|
452
|
+
1,
|
|
453
|
+
2,
|
|
454
|
+
1,
|
|
455
|
+
3
|
|
456
|
+
],
|
|
457
|
+
"parent": "root"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"value": "Critical (red)",
|
|
461
|
+
"href": "#critical-red",
|
|
462
|
+
"depth": 4,
|
|
463
|
+
"numbering": [
|
|
464
|
+
1,
|
|
465
|
+
2,
|
|
466
|
+
1,
|
|
467
|
+
4
|
|
468
|
+
],
|
|
469
|
+
"parent": "root"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"value": "Placement",
|
|
473
|
+
"href": "#placement",
|
|
474
|
+
"depth": 3,
|
|
475
|
+
"numbering": [
|
|
476
|
+
1,
|
|
477
|
+
2,
|
|
478
|
+
2
|
|
479
|
+
],
|
|
480
|
+
"parent": "root"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"value": "Top positions",
|
|
484
|
+
"href": "#top-positions",
|
|
485
|
+
"depth": 4,
|
|
486
|
+
"numbering": [
|
|
487
|
+
1,
|
|
488
|
+
2,
|
|
489
|
+
2,
|
|
490
|
+
1
|
|
491
|
+
],
|
|
492
|
+
"parent": "root"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"value": "Bottom positions",
|
|
496
|
+
"href": "#bottom-positions",
|
|
497
|
+
"depth": 4,
|
|
498
|
+
"numbering": [
|
|
499
|
+
1,
|
|
500
|
+
2,
|
|
501
|
+
2,
|
|
502
|
+
2
|
|
503
|
+
],
|
|
504
|
+
"parent": "root"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"value": "Structure",
|
|
508
|
+
"href": "#structure",
|
|
509
|
+
"depth": 3,
|
|
510
|
+
"numbering": [
|
|
511
|
+
1,
|
|
512
|
+
2,
|
|
513
|
+
3
|
|
514
|
+
],
|
|
515
|
+
"parent": "root"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"value": "Title and description",
|
|
519
|
+
"href": "#title-and-description",
|
|
520
|
+
"depth": 4,
|
|
521
|
+
"numbering": [
|
|
522
|
+
1,
|
|
523
|
+
2,
|
|
524
|
+
3,
|
|
525
|
+
1
|
|
526
|
+
],
|
|
527
|
+
"parent": "root"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"value": "Custom icons",
|
|
531
|
+
"href": "#custom-icons",
|
|
532
|
+
"depth": 4,
|
|
533
|
+
"numbering": [
|
|
534
|
+
1,
|
|
535
|
+
2,
|
|
536
|
+
3,
|
|
537
|
+
2
|
|
538
|
+
],
|
|
539
|
+
"parent": "root"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"value": "Action buttons",
|
|
543
|
+
"href": "#action-buttons",
|
|
544
|
+
"depth": 4,
|
|
545
|
+
"numbering": [
|
|
546
|
+
1,
|
|
547
|
+
2,
|
|
548
|
+
3,
|
|
549
|
+
3
|
|
550
|
+
],
|
|
551
|
+
"parent": "root"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"value": "Guidelines",
|
|
555
|
+
"href": "#guidelines",
|
|
556
|
+
"depth": 2,
|
|
557
|
+
"numbering": [
|
|
558
|
+
1,
|
|
559
|
+
3
|
|
560
|
+
],
|
|
561
|
+
"parent": "root"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"value": "Best practices",
|
|
565
|
+
"href": "#best-practices",
|
|
566
|
+
"depth": 3,
|
|
567
|
+
"numbering": [
|
|
568
|
+
1,
|
|
569
|
+
3,
|
|
570
|
+
1
|
|
571
|
+
],
|
|
572
|
+
"parent": "root"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"value": "When to use",
|
|
576
|
+
"href": "#when-to-use",
|
|
577
|
+
"depth": 3,
|
|
578
|
+
"numbering": [
|
|
579
|
+
1,
|
|
580
|
+
3,
|
|
581
|
+
2
|
|
582
|
+
],
|
|
583
|
+
"parent": "root"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"value": "Writing guidelines",
|
|
587
|
+
"href": "#writing-guidelines",
|
|
588
|
+
"depth": 3,
|
|
589
|
+
"numbering": [
|
|
590
|
+
1,
|
|
591
|
+
3,
|
|
592
|
+
3
|
|
593
|
+
],
|
|
594
|
+
"parent": "root"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"value": "Message structure",
|
|
598
|
+
"href": "#message-structure",
|
|
599
|
+
"depth": 4,
|
|
600
|
+
"numbering": [
|
|
601
|
+
1,
|
|
602
|
+
3,
|
|
603
|
+
3,
|
|
604
|
+
1
|
|
605
|
+
],
|
|
606
|
+
"parent": "root"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"value": "Preferred words",
|
|
610
|
+
"href": "#preferred-words",
|
|
611
|
+
"depth": 4,
|
|
612
|
+
"numbering": [
|
|
613
|
+
1,
|
|
614
|
+
3,
|
|
615
|
+
3,
|
|
616
|
+
2
|
|
617
|
+
],
|
|
618
|
+
"parent": "root"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"value": "Avoid these words",
|
|
622
|
+
"href": "#avoid-these-words",
|
|
623
|
+
"depth": 4,
|
|
624
|
+
"numbering": [
|
|
625
|
+
1,
|
|
626
|
+
3,
|
|
627
|
+
3,
|
|
628
|
+
3
|
|
629
|
+
],
|
|
630
|
+
"parent": "root"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"value": "Voice and tone",
|
|
634
|
+
"href": "#voice-and-tone",
|
|
635
|
+
"depth": 4,
|
|
636
|
+
"numbering": [
|
|
637
|
+
1,
|
|
638
|
+
3,
|
|
639
|
+
3,
|
|
640
|
+
4
|
|
641
|
+
],
|
|
642
|
+
"parent": "root"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"value": "Accessibility",
|
|
646
|
+
"href": "#accessibility",
|
|
647
|
+
"depth": 2,
|
|
648
|
+
"numbering": [
|
|
649
|
+
1,
|
|
650
|
+
4
|
|
651
|
+
],
|
|
652
|
+
"parent": "root"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"value": "Screen reader announcements",
|
|
656
|
+
"href": "#screen-reader-announcements",
|
|
657
|
+
"depth": 3,
|
|
658
|
+
"numbering": [
|
|
659
|
+
1,
|
|
660
|
+
4,
|
|
661
|
+
1
|
|
662
|
+
],
|
|
663
|
+
"parent": "root"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"value": "Keyboard navigation",
|
|
667
|
+
"href": "#keyboard-navigation",
|
|
668
|
+
"depth": 3,
|
|
669
|
+
"numbering": [
|
|
670
|
+
1,
|
|
671
|
+
4,
|
|
672
|
+
2
|
|
673
|
+
],
|
|
674
|
+
"parent": "root"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"value": "Auto-dismiss considerations",
|
|
678
|
+
"href": "#auto-dismiss-considerations",
|
|
679
|
+
"depth": 3,
|
|
680
|
+
"numbering": [
|
|
681
|
+
1,
|
|
682
|
+
4,
|
|
683
|
+
3
|
|
684
|
+
],
|
|
685
|
+
"parent": "root"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"value": "Specs",
|
|
689
|
+
"href": "#specs",
|
|
690
|
+
"depth": 2,
|
|
691
|
+
"numbering": [
|
|
692
|
+
1,
|
|
693
|
+
5
|
|
694
|
+
],
|
|
695
|
+
"parent": "root"
|
|
696
|
+
}
|
|
697
|
+
]
|
|
698
|
+
},
|
|
699
|
+
"dev": {
|
|
700
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { toast, type ToastOptions } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nCreate toast notifications using the imperative `toast()` API. Toasts are rendered automatically by the `NimbusProvider`.\n\n```jsx-live-dev\nconst App = () => {\n const handleClick = () => {\n toast({\n title: \"Success\",\n description: \"Your changes have been saved.\",\n type: \"success\"\n });\n };\n\n return (\n <Button onPress={handleClick}>\n Show Toast\n </Button>\n );\n}\n```\n\n## Usage examples\n\n### Toast types\n\nFour types are available, each with semantic meaning and ARIA roles:\n\n```jsx-live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\" flexWrap=\"wrap\">\n <Button onPress={() => toast.info({ title: \"Information\", description: \"This is informational.\" })}>\n Info Toast\n </Button>\n <Button onPress={() => toast.success({ title: \"Success\", description: \"Operation completed.\" })}>\n Success Toast\n </Button>\n <Button onPress={() => toast.warning({ title: \"Warning\", description: \"Please review this.\" })}>\n Warning Toast\n </Button>\n <Button onPress={() => toast.error({ title: \"Error\", description: \"An error occurred.\" })}>\n Error Toast\n </Button>\n </Stack>\n)\n```\n\n**ARIA semantics:**\n- `info`, `success`, and `warning`: `role=\"status\"` (polite announcements)\n- `error`: `role=\"alert\"` (assertive announcements)\n- Use the `\"aria-live\"` option to override the default politeness level for any toast type\n\n### Placement options\n\nControl where toasts appear on screen using the `placement` prop. Each placement creates an independent toast region:\n\n```jsx-live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\" flexWrap=\"wrap\">\n <Button onPress={() => toast({ title: \"Top Start\", placement: \"top-start\" })}>\n Top Start\n </Button>\n <Button onPress={() => toast({ title: \"Top End (Default)\", placement: \"top-end\" })}>\n Top End\n </Button>\n <Button onPress={() => toast({ title: \"Bottom Start\", placement: \"bottom-start\" })}>\n Bottom Start\n </Button>\n <Button onPress={() => toast({ title: \"Bottom End\", placement: \"bottom-end\" })}>\n Bottom End\n </Button>\n </Stack>\n)\n```\n\n### Auto-dismiss behavior\n\nToasts auto-dismiss after 6 seconds by default. The timer pauses on hover and focus:\n\n```jsx-live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\" flexWrap=\"wrap\">\n <Button onPress={() => toast({ title: \"Default (6s)\", description: \"Dismisses after 6 seconds\" })}>\n Default Duration\n </Button>\n <Button onPress={() => toast({ title: \"Custom Duration\", description: \"Dismisses after 10 seconds\", duration: 10000 })}>\n 10 Second Duration\n </Button>\n <Button onPress={() => toast({ title: \"Persistent\", description: \"Never auto-dismisses\", duration: Infinity })}>\n No Auto-Dismiss\n </Button>\n </Stack>\n)\n```\n\n**Duration values:**\n- Default: `6000` (6 seconds)\n- Custom: Any positive number in milliseconds\n- Persistent: `Infinity` (never auto-dismisses)\n\n### Action buttons\n\nAdd action buttons to toasts. Duration is controlled independently — set `duration: Infinity` if the action requires user acknowledgment:\n\n```jsx-live-dev\nconst App = () => {\n const handleUndo = () => {\n toast.success({ title: \"Undo successful\" });\n };\n\n const handleDelete = () => {\n toast({\n title: \"Item deleted\",\n description: \"The item has been removed from your list.\",\n type: \"info\",\n action: {\n label: \"Undo\",\n onPress: handleUndo\n }\n });\n };\n\n return (\n <Button onPress={handleDelete}>\n Delete Item\n </Button>\n );\n}\n```\n\n### Promise pattern\n\nUse `toast.promise()` to show loading, success, and error states for async operations:\n\n```jsx-live-dev\nconst App = () => {\n const simulateAsyncOperation = () => {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n Math.random() > 0.5 ? resolve(\"Success!\") : reject(\"Failed!\");\n }, 2000);\n });\n };\n\n const handleClick = () => {\n toast.promise(\n simulateAsyncOperation(),\n {\n loading: { title: \"Saving...\", description: \"Please wait\", closable: false },\n success: { title: \"Saved\", description: \"Your changes have been saved\", type: \"success\" },\n error: { title: \"Error\", description: \"Failed to save changes\", type: \"error\" }\n }\n );\n };\n\n return (\n <Button onPress={handleClick}>\n Save with Promise\n </Button>\n );\n}\n```\n\n### Programmatic control\n\nUpdate or dismiss toasts programmatically using their IDs:\n\n```jsx-live-dev\nconst App = () => {\n const [toastId, setToastId] = useState<string | null>(null);\n\n const handleCreate = () => {\n const id = toast({\n title: \"Processing...\",\n description: \"Operation in progress\",\n duration: Infinity\n });\n setToastId(id);\n };\n\n const handleUpdate = () => {\n if (toastId) {\n toast.update(toastId, {\n title: \"Updated!\",\n description: \"Toast content has been updated\",\n type: \"success\"\n });\n }\n };\n\n const handleDismiss = () => {\n if (toastId) {\n toast.dismiss(toastId);\n setToastId(null);\n }\n };\n\n return (\n <Stack direction=\"row\" gap=\"200\">\n <Button onPress={handleCreate}>Create Toast</Button>\n <Button onPress={handleUpdate} isDisabled={!toastId}>Update Toast</Button>\n <Button onPress={handleDismiss} isDisabled={!toastId}>Dismiss Toast</Button>\n </Stack>\n );\n}\n```\n\n**API methods:**\n- `toast.update(id, options)`: Update toast content\n- `toast.dismiss(id)`: Dismiss with animation (omit `id` to dismiss all)\n- `toast.remove(id)`: Remove immediately without animation (omit `id` to remove all)\n\n### Custom icon\n\nOverride the default type-based icon with a custom icon element using the `icon` prop:\n\n```jsx-live-dev\nconst App = () => {\n const { Bathtub } = Icons;\n\n return (\n <Stack direction=\"row\" gap=\"200\" flexWrap=\"wrap\">\n <Button onPress={() => toast.info({ title: \"Custom Icon\", description: \"This toast uses a custom icon\", icon: <Bathtub /> })}>\n Custom Icon Toast\n </Button>\n <Button onPress={() => toast.info({ title: \"Default Icon\", description: \"This toast uses the default info icon\" })}>\n Default Icon Toast\n </Button>\n </Stack>\n );\n}\n```\n\nWhen the `icon` prop is provided, it replaces the default icon for that toast type. The `loading` type always shows a spinner regardless of the `icon` prop.\n\n### Closable control\n\nControl close button visibility with the `closable` prop. Useful for loading states:\n\n```jsx-live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\">\n <Button onPress={() => toast({ title: \"Closable Toast\", description: \"Has close button\", closable: true })}>\n With Close Button\n </Button>\n <Button onPress={() => toast({ title: \"Loading...\", description: \"Processing your request\", closable: false, duration: 3000 })}>\n No Close Button\n </Button>\n </Stack>\n)\n```\n\n### Stacking and queuing\n\nMultiple toasts stack vertically without overlapping. When the maximum (24) is exceeded, additional toasts queue:\n\n```jsx-live-dev\nconst App = () => {\n const handleCreateMultiple = () => {\n for (let i = 1; i <= 5; i++) {\n setTimeout(() => {\n toast({\n title: `Toast ${i}`,\n description: `This is toast notification ${i}`,\n type: i % 2 === 0 ? \"success\" : \"info\"\n });\n }, i * 300);\n }\n };\n\n return (\n <Button onPress={handleCreateMultiple}>\n Create Multiple Toasts\n </Button>\n );\n}\n```\n\n## Component requirements\n\n### Zero setup\n\nToast functionality is automatically available when using `NimbusProvider`. No additional setup is required:\n\n```tsx\nimport { NimbusProvider } from '@commercetools/nimbus';\n\nconst App = () => (\n <NimbusProvider>\n {/* Toast is ready to use anywhere in your app */}\n <YourApp />\n </NimbusProvider>\n);\n```\n\nThe `ToastOutlet` component is rendered internally by `NimbusProvider` and manages all toast regions.\n\n### Accessibility\n\nThe Toast component handles accessibility requirements internally via React Aria and Chakra UI.\n\n**ARIA role differentiation:**\n- Info, success, and warning toasts use `role=\"status\"` with `aria-live=\"polite\"` for non-intrusive announcements\n- Error toasts use `role=\"alert\"` with `aria-live=\"assertive\"` for immediate attention\n- The `ariaLive` option allows overriding the default politeness level for any toast type\n\n**Internationalization:**\nThe close button uses a localized `aria-label` resolved via `useLocalizedStringFormatter` from `@react-aria/i18n`. Translations are provided for English, German, Spanish, French, and Portuguese.\n\n#### Keyboard navigation\n\nToast regions support keyboard interaction:\n\n- `Tab`: Navigate between close button and action button (if present)\n- `Escape`: Dismiss the focused toast\n- `Ctrl+Shift+[1-9]`: Focus specific placement regions (works with both number row and numpad)\n - `Ctrl+Shift+7`: Top-start\n - `Ctrl+Shift+9`: Top-end (default)\n - `Ctrl+Shift+1`: Bottom-start\n - `Ctrl+Shift+3`: Bottom-end\n\nHotkeys are only active for placements with visible toasts.\n\n## API reference\n\n### `toast(options: ToastOptions): string`\n\nCreates a toast and returns its ID. Also available as convenience methods: `toast.info()`, `toast.success()`, `toast.warning()`, `toast.error()`.\n\n### ToastOptions\n\n| Prop | Type | Default | Description |\n| --- | --- | --- | --- |\n| `type` | `\"info\" \\| \"success\" \\| \"warning\" \\| \"error\"` | `\"info\"` | Visual style and ARIA semantics |\n| `title` | `string` | — | Title text |\n| `description` | `string` | — | Description text |\n| `action` | `{ label: string; onPress: () => void }` | — | Action button |\n| `icon` | `React.ReactElement` | — | Custom icon replacing the default type-based icon |\n| `duration` | `number` | `6000` | Auto-dismiss in ms (`Infinity` = never) |\n| `placement` | `ToastPlacement` | `\"top-end\"` | Screen position |\n| `closable` | `boolean` | `false` | Show/hide close button (auto-enabled for persistent toasts) |\n| `pauseOnInteraction` | `boolean` | `true` | Pause timer on hover/focus |\n| `variant` | `\"solid\" \\| \"subtle\" \\| \"accent-start\"` | `\"accent-start\"` | Visual variant |\n\n### Control methods\n\n| Method | Description |\n| --- | --- |\n| `toast.update(id, options)` | Update toast content |\n| `toast.dismiss(id?)` | Dismiss with animation (omit `id` for all) |\n| `toast.remove(id?)` | Remove immediately (omit `id` for all) |\n| `toast.promise(promise, options, config?)` | Loading → success/error transitions |\n\n## Common patterns\n\n### Error handling with actions\n\nProvide users with recovery options directly in error toasts:\n\n```jsx-live-dev\nconst App = () => {\n const handleRetry = () => {\n toast.info({ title: \"Retrying...\", description: \"Attempting operation again\" });\n };\n\n const handleError = () => {\n toast.error({\n title: \"Network Error\",\n description: \"Failed to connect to the server\",\n action: {\n label: \"Retry\",\n onPress: handleRetry\n }\n });\n };\n\n return (\n <Button onPress={handleError}>\n Simulate Error\n </Button>\n );\n}\n```\n\n### Success confirmation with undo\n\nAllow users to undo destructive actions:\n\n```jsx-live-dev\nconst App = () => {\n const [items, setItems] = useState(['Item 1', 'Item 2', 'Item 3']);\n const [lastDeleted, setLastDeleted] = useState<string | null>(null);\n\n const handleDelete = (item: string) => {\n setLastDeleted(item);\n setItems(items.filter(i => i !== item));\n\n toast.success({\n title: \"Item deleted\",\n description: `${item} has been removed`,\n action: {\n label: \"Undo\",\n onPress: () => {\n if (lastDeleted) {\n setItems([...items, lastDeleted]);\n setLastDeleted(null);\n toast.info({ title: \"Restored\", description: `${lastDeleted} has been restored` });\n }\n }\n }\n });\n };\n\n return (\n <Stack direction=\"column\" gap=\"200\">\n {items.map(item => (\n <Stack key={item} direction=\"row\" gap=\"200\" alignItems=\"center\">\n <Text>{item}</Text>\n <Button size=\"sm\" onPress={() => handleDelete(item)}>Delete</Button>\n </Stack>\n ))}\n {items.length === 0 && <Text>No items remaining</Text>}\n </Stack>\n );\n}\n```\n\n### Multi-step operations\n\nTrack progress through multi-step processes:\n\n```jsx-live-dev\nconst App = () => {\n const handleMultiStep = async () => {\n const id = toast({\n title: \"Step 1 of 3\",\n description: \"Validating data...\",\n type: \"info\",\n duration: Infinity\n });\n\n await new Promise(resolve => setTimeout(resolve, 1500));\n toast.update(id, {\n title: \"Step 2 of 3\",\n description: \"Processing records...\"\n });\n\n await new Promise(resolve => setTimeout(resolve, 1500));\n toast.update(id, {\n title: \"Step 3 of 3\",\n description: \"Finalizing...\"\n });\n\n await new Promise(resolve => setTimeout(resolve, 1500));\n toast.update(id, {\n title: \"Complete!\",\n description: \"All steps finished successfully\",\n type: \"success\",\n duration: 6000\n });\n };\n\n return (\n <Button onPress={handleMultiStep}>\n Start Multi-Step Process\n </Button>\n );\n}\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using Toast 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 Usage\n\nCreate toast notifications using the imperative toast() API\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { toast } from \"@commercetools/nimbus\";\n\ndescribe(\"Toast - Basic usage\", () => {\n it(\"creates toast using toast() function\", () => {\n const id = toast({\n title: \"Imperative Toast\",\n description: \"Created programmatically\",\n type: \"info\",\n });\n\n expect(id).toBeDefined();\n expect(typeof id).toBe(\"string\");\n\n // Clean up\n toast.remove(id);\n });\n\n it(\"creates toasts using convenience methods\", () => {\n const successId = toast.success({\n title: \"Success Toast\",\n description: \"Operation completed successfully\",\n });\n\n const errorId = toast.error({\n title: \"Error Toast\",\n description: \"Something went wrong\",\n });\n\n const warningId = toast.warning({\n title: \"Warning Toast\",\n description: \"Please be careful\",\n });\n\n const infoId = toast.info({\n title: \"Info Toast\",\n description: \"Here is some information\",\n });\n\n expect(successId).toBeDefined();\n expect(errorId).toBeDefined();\n expect(warningId).toBeDefined();\n expect(infoId).toBeDefined();\n\n // Clean up\n toast.remove(successId);\n toast.remove(errorId);\n toast.remove(warningId);\n toast.remove(infoId);\n });\n\n it(\"creates toasts with custom placement\", () => {\n const id = toast({\n title: \"Custom Placement\",\n description: \"This toast appears at bottom-end\",\n placement: \"bottom-end\",\n });\n\n expect(id).toBeDefined();\n\n // Clean up\n toast.remove(id);\n });\n});\n```\n\n### Programmatic Control\n\nUpdate and dismiss toasts programmatically\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { toast } from \"@commercetools/nimbus\";\n\ndescribe(\"Toast - Programmatic control\", () => {\n it(\"updates toast content programmatically\", () => {\n const id = toast({\n title: \"Initial Title\",\n description: \"Initial Description\",\n duration: Infinity,\n });\n\n // Update the toast content\n toast.update(id, {\n title: \"Updated Title\",\n description: \"Updated Description\",\n });\n\n // Clean up\n toast.remove(id);\n });\n\n it(\"dismisses toast programmatically\", () => {\n const id = toast({\n title: \"Dismissible Toast\",\n description: \"This toast can be dismissed programmatically\",\n duration: Infinity,\n });\n\n // Dismiss triggers the exit animation\n toast.dismiss(id);\n });\n});\n```\n\n### Promise Pattern\n\nUse toast.promise() for async operation states\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { toast } from \"@commercetools/nimbus\";\n\ndescribe(\"Toast - Promise pattern\", () => {\n it(\"shows loading then success states\", async () => {\n const promiseSpy = vi.spyOn(toast, \"promise\");\n\n const asyncOperation = () =>\n new Promise((resolve) => {\n setTimeout(() => resolve(\"Done\"), 10);\n });\n\n const promise = asyncOperation();\n\n toast.promise(promise, {\n loading: {\n title: \"Loading...\",\n description: \"Please wait\",\n closable: false,\n },\n success: {\n title: \"Success!\",\n description: \"Operation completed\",\n type: \"success\",\n },\n error: {\n title: \"Failed\",\n description: \"Something went wrong\",\n type: \"error\",\n },\n });\n\n // Verify toast.promise was called with the correct promise and state titles\n expect(promiseSpy).toHaveBeenCalledWith(\n promise,\n expect.objectContaining({\n loading: expect.objectContaining({ title: \"Loading...\" }),\n success: expect.objectContaining({ title: \"Success!\" }),\n error: expect.objectContaining({ title: \"Failed\" }),\n })\n );\n\n promiseSpy.mockRestore();\n });\n});\n```\n\n### Action Buttons\n\nCreate toasts with action buttons and callbacks\n\n```tsx\nimport { describe, it, expect, vi } from \"vitest\";\nimport { toast } from \"@commercetools/nimbus\";\n\ndescribe(\"Toast - Action buttons\", () => {\n it(\"creates toast with action button\", () => {\n const handleAction = vi.fn();\n\n const id = toast({\n title: \"Action Required\",\n description: \"Please take action\",\n action: {\n label: \"Retry\",\n onPress: handleAction,\n },\n });\n\n expect(id).toBeDefined();\n\n // Clean up\n toast.remove(id);\n });\n});\n```\n\n\n## Resources\n\n{/* TODO: Add Storybook deep-link once the story is published */}\n- [Chakra UI Toast Documentation](https://www.chakra-ui.com/docs/components/toast)\n- [React Aria Live Regions](https://react-spectrum.adobe.com/react-aria/useLiveAnnouncer.html)\n- [ARIA Live Regions](https://www.w3.org/WAI/ARIA/apg/practices/live-regions/)\n",
|
|
701
|
+
"toc": [
|
|
702
|
+
{
|
|
703
|
+
"value": "Getting started",
|
|
704
|
+
"href": "#getting-started",
|
|
705
|
+
"depth": 2,
|
|
706
|
+
"numbering": [
|
|
707
|
+
1,
|
|
708
|
+
1
|
|
709
|
+
],
|
|
710
|
+
"parent": "root"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"value": "Import",
|
|
714
|
+
"href": "#import",
|
|
715
|
+
"depth": 3,
|
|
716
|
+
"numbering": [
|
|
717
|
+
1,
|
|
718
|
+
1,
|
|
719
|
+
1
|
|
720
|
+
],
|
|
721
|
+
"parent": "root"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"value": "Basic usage",
|
|
725
|
+
"href": "#basic-usage",
|
|
726
|
+
"depth": 3,
|
|
727
|
+
"numbering": [
|
|
728
|
+
1,
|
|
729
|
+
1,
|
|
730
|
+
2
|
|
731
|
+
],
|
|
732
|
+
"parent": "root"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"value": "Usage examples",
|
|
736
|
+
"href": "#usage-examples",
|
|
737
|
+
"depth": 2,
|
|
738
|
+
"numbering": [
|
|
739
|
+
1,
|
|
740
|
+
2
|
|
741
|
+
],
|
|
742
|
+
"parent": "root"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"value": "Toast types",
|
|
746
|
+
"href": "#toast-types",
|
|
747
|
+
"depth": 3,
|
|
748
|
+
"numbering": [
|
|
749
|
+
1,
|
|
750
|
+
2,
|
|
751
|
+
1
|
|
752
|
+
],
|
|
753
|
+
"parent": "root"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"value": "Placement options",
|
|
757
|
+
"href": "#placement-options",
|
|
758
|
+
"depth": 3,
|
|
759
|
+
"numbering": [
|
|
760
|
+
1,
|
|
761
|
+
2,
|
|
762
|
+
2
|
|
763
|
+
],
|
|
764
|
+
"parent": "root"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"value": "Auto-dismiss behavior",
|
|
768
|
+
"href": "#auto-dismiss-behavior",
|
|
769
|
+
"depth": 3,
|
|
770
|
+
"numbering": [
|
|
771
|
+
1,
|
|
772
|
+
2,
|
|
773
|
+
3
|
|
774
|
+
],
|
|
775
|
+
"parent": "root"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"value": "Action buttons",
|
|
779
|
+
"href": "#action-buttons",
|
|
780
|
+
"depth": 3,
|
|
781
|
+
"numbering": [
|
|
782
|
+
1,
|
|
783
|
+
2,
|
|
784
|
+
4
|
|
785
|
+
],
|
|
786
|
+
"parent": "root"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"value": "Promise pattern",
|
|
790
|
+
"href": "#promise-pattern",
|
|
791
|
+
"depth": 3,
|
|
792
|
+
"numbering": [
|
|
793
|
+
1,
|
|
794
|
+
2,
|
|
795
|
+
5
|
|
796
|
+
],
|
|
797
|
+
"parent": "root"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"value": "Programmatic control",
|
|
801
|
+
"href": "#programmatic-control",
|
|
802
|
+
"depth": 3,
|
|
803
|
+
"numbering": [
|
|
804
|
+
1,
|
|
805
|
+
2,
|
|
806
|
+
6
|
|
807
|
+
],
|
|
808
|
+
"parent": "root"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"value": "Custom icon",
|
|
812
|
+
"href": "#custom-icon",
|
|
813
|
+
"depth": 3,
|
|
814
|
+
"numbering": [
|
|
815
|
+
1,
|
|
816
|
+
2,
|
|
817
|
+
7
|
|
818
|
+
],
|
|
819
|
+
"parent": "root"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"value": "Closable control",
|
|
823
|
+
"href": "#closable-control",
|
|
824
|
+
"depth": 3,
|
|
825
|
+
"numbering": [
|
|
826
|
+
1,
|
|
827
|
+
2,
|
|
828
|
+
8
|
|
829
|
+
],
|
|
830
|
+
"parent": "root"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"value": "Stacking and queuing",
|
|
834
|
+
"href": "#stacking-and-queuing",
|
|
835
|
+
"depth": 3,
|
|
836
|
+
"numbering": [
|
|
837
|
+
1,
|
|
838
|
+
2,
|
|
839
|
+
9
|
|
840
|
+
],
|
|
841
|
+
"parent": "root"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"value": "Component requirements",
|
|
845
|
+
"href": "#component-requirements",
|
|
846
|
+
"depth": 2,
|
|
847
|
+
"numbering": [
|
|
848
|
+
1,
|
|
849
|
+
3
|
|
850
|
+
],
|
|
851
|
+
"parent": "root"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"value": "Zero setup",
|
|
855
|
+
"href": "#zero-setup",
|
|
856
|
+
"depth": 3,
|
|
857
|
+
"numbering": [
|
|
858
|
+
1,
|
|
859
|
+
3,
|
|
860
|
+
1
|
|
861
|
+
],
|
|
862
|
+
"parent": "root"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"value": "Accessibility",
|
|
866
|
+
"href": "#accessibility",
|
|
867
|
+
"depth": 3,
|
|
868
|
+
"numbering": [
|
|
869
|
+
1,
|
|
870
|
+
3,
|
|
871
|
+
2
|
|
872
|
+
],
|
|
873
|
+
"parent": "root"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"value": "Keyboard navigation",
|
|
877
|
+
"href": "#keyboard-navigation",
|
|
878
|
+
"depth": 4,
|
|
879
|
+
"numbering": [
|
|
880
|
+
1,
|
|
881
|
+
3,
|
|
882
|
+
2,
|
|
883
|
+
1
|
|
884
|
+
],
|
|
885
|
+
"parent": "root"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"value": "API reference",
|
|
889
|
+
"href": "#api-reference",
|
|
890
|
+
"depth": 2,
|
|
891
|
+
"numbering": [
|
|
892
|
+
1,
|
|
893
|
+
4
|
|
894
|
+
],
|
|
895
|
+
"parent": "root"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"value": "toast(options: ToastOptions): string",
|
|
899
|
+
"href": "#toastoptions-toastoptions-string",
|
|
900
|
+
"depth": 3,
|
|
901
|
+
"numbering": [
|
|
902
|
+
1,
|
|
903
|
+
4,
|
|
904
|
+
1
|
|
905
|
+
],
|
|
906
|
+
"parent": "root"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"value": "ToastOptions",
|
|
910
|
+
"href": "#toastoptions",
|
|
911
|
+
"depth": 3,
|
|
912
|
+
"numbering": [
|
|
913
|
+
1,
|
|
914
|
+
4,
|
|
915
|
+
2
|
|
916
|
+
],
|
|
917
|
+
"parent": "root"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"value": "Control methods",
|
|
921
|
+
"href": "#control-methods",
|
|
922
|
+
"depth": 3,
|
|
923
|
+
"numbering": [
|
|
924
|
+
1,
|
|
925
|
+
4,
|
|
926
|
+
3
|
|
927
|
+
],
|
|
928
|
+
"parent": "root"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"value": "Common patterns",
|
|
932
|
+
"href": "#common-patterns",
|
|
933
|
+
"depth": 2,
|
|
934
|
+
"numbering": [
|
|
935
|
+
1,
|
|
936
|
+
5
|
|
937
|
+
],
|
|
938
|
+
"parent": "root"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"value": "Error handling with actions",
|
|
942
|
+
"href": "#error-handling-with-actions",
|
|
943
|
+
"depth": 3,
|
|
944
|
+
"numbering": [
|
|
945
|
+
1,
|
|
946
|
+
5,
|
|
947
|
+
1
|
|
948
|
+
],
|
|
949
|
+
"parent": "root"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"value": "Success confirmation with undo",
|
|
953
|
+
"href": "#success-confirmation-with-undo",
|
|
954
|
+
"depth": 3,
|
|
955
|
+
"numbering": [
|
|
956
|
+
1,
|
|
957
|
+
5,
|
|
958
|
+
2
|
|
959
|
+
],
|
|
960
|
+
"parent": "root"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"value": "Multi-step operations",
|
|
964
|
+
"href": "#multi-step-operations",
|
|
965
|
+
"depth": 3,
|
|
966
|
+
"numbering": [
|
|
967
|
+
1,
|
|
968
|
+
5,
|
|
969
|
+
3
|
|
970
|
+
],
|
|
971
|
+
"parent": "root"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"value": "Testing your implementation",
|
|
975
|
+
"href": "#testing-your-implementation",
|
|
976
|
+
"depth": 2,
|
|
977
|
+
"numbering": [
|
|
978
|
+
1,
|
|
979
|
+
6
|
|
980
|
+
],
|
|
981
|
+
"parent": "root"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"value": "Basic Usage",
|
|
985
|
+
"href": "#basic-usage-1",
|
|
986
|
+
"depth": 3,
|
|
987
|
+
"numbering": [
|
|
988
|
+
1,
|
|
989
|
+
6,
|
|
990
|
+
1
|
|
991
|
+
],
|
|
992
|
+
"parent": "root"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"value": "Programmatic Control",
|
|
996
|
+
"href": "#programmatic-control-1",
|
|
997
|
+
"depth": 3,
|
|
998
|
+
"numbering": [
|
|
999
|
+
1,
|
|
1000
|
+
6,
|
|
1001
|
+
2
|
|
1002
|
+
],
|
|
1003
|
+
"parent": "root"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"value": "Promise Pattern",
|
|
1007
|
+
"href": "#promise-pattern-1",
|
|
1008
|
+
"depth": 3,
|
|
1009
|
+
"numbering": [
|
|
1010
|
+
1,
|
|
1011
|
+
6,
|
|
1012
|
+
3
|
|
1013
|
+
],
|
|
1014
|
+
"parent": "root"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"value": "Action Buttons",
|
|
1018
|
+
"href": "#action-buttons-1",
|
|
1019
|
+
"depth": 3,
|
|
1020
|
+
"numbering": [
|
|
1021
|
+
1,
|
|
1022
|
+
6,
|
|
1023
|
+
4
|
|
1024
|
+
],
|
|
1025
|
+
"parent": "root"
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"value": "Resources",
|
|
1029
|
+
"href": "#resources",
|
|
1030
|
+
"depth": 2,
|
|
1031
|
+
"numbering": [
|
|
1032
|
+
1,
|
|
1033
|
+
7
|
|
1034
|
+
],
|
|
1035
|
+
"parent": "root"
|
|
1036
|
+
}
|
|
1037
|
+
]
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|