@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,404 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Patterns-TextInputField",
|
|
4
|
+
"title": "Text input field",
|
|
5
|
+
"exportName": "TextInputField",
|
|
6
|
+
"description": "This pattern component integrates the TextInput within a FormField using a simple, consistent, and opinionated API.",
|
|
7
|
+
"order": 999,
|
|
8
|
+
"repoPath": "packages/nimbus/src/patterns/fields/text-input-field/text-input-field.mdx",
|
|
9
|
+
"menu": [
|
|
10
|
+
"Patterns",
|
|
11
|
+
"Fields",
|
|
12
|
+
"Text input field"
|
|
13
|
+
],
|
|
14
|
+
"route": "patterns/fields/text-input-field",
|
|
15
|
+
"tags": [
|
|
16
|
+
"component",
|
|
17
|
+
"pattern",
|
|
18
|
+
"field",
|
|
19
|
+
"TextInput",
|
|
20
|
+
"TextInputField"
|
|
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
|
+
"layout": "app-frame",
|
|
46
|
+
"tabs": [
|
|
47
|
+
{
|
|
48
|
+
"key": "overview",
|
|
49
|
+
"title": "Overview",
|
|
50
|
+
"order": 0
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"key": "dev",
|
|
54
|
+
"title": "Implementation",
|
|
55
|
+
"order": 3
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"mdx": "\n## Overview\n\nTextInputField is a pattern component that combines the FormField wrapper with the TextInput component. This integration provides a complete form field experience including accessible labels, helper text descriptions, info popovers for supplementary information, and comprehensive validation and error handling, all through a simplified, opinionated API.\n\n### Resources\n\nFor detailed guidance on the individual components that make up this pattern, consult the component guidelines:\n\n- [TextInput Guidelines](/components/inputs/textinput) - Text input patterns, interaction guidelines, and accessibility standards\n- [FormField Guidelines](/components/inputs/formfield) - Label options, helper text, validation patterns, and form field accessibility\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/patterns-fields-textinputfield--docs)\n",
|
|
60
|
+
"views": {
|
|
61
|
+
"overview": {
|
|
62
|
+
"mdx": "\n## Overview\n\nTextInputField is a pattern component that combines the FormField wrapper with the TextInput component. This integration provides a complete form field experience including accessible labels, helper text descriptions, info popovers for supplementary information, and comprehensive validation and error handling, all through a simplified, opinionated API.\n\n### Resources\n\nFor detailed guidance on the individual components that make up this pattern, consult the component guidelines:\n\n- [TextInput Guidelines](/components/inputs/textinput) - Text input patterns, interaction guidelines, and accessibility standards\n- [FormField Guidelines](/components/inputs/formfield) - Label options, helper text, validation patterns, and form field accessibility\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/patterns-fields-textinputfield--docs)\n",
|
|
63
|
+
"toc": [
|
|
64
|
+
{
|
|
65
|
+
"value": "Overview",
|
|
66
|
+
"href": "#overview",
|
|
67
|
+
"depth": 2,
|
|
68
|
+
"numbering": [
|
|
69
|
+
1,
|
|
70
|
+
1
|
|
71
|
+
],
|
|
72
|
+
"parent": "root"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"value": "Resources",
|
|
76
|
+
"href": "#resources",
|
|
77
|
+
"depth": 3,
|
|
78
|
+
"numbering": [
|
|
79
|
+
1,
|
|
80
|
+
1,
|
|
81
|
+
1
|
|
82
|
+
],
|
|
83
|
+
"parent": "root"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"dev": {
|
|
88
|
+
"mdx": "\n## Comparison: field pattern vs manual composition\n\n**With TextInputField:**\n```tsx\n<TextInputField\n label=\"Project name\"\n description=\"Enter a descriptive name\"\n value={value}\n onChange={setValue}\n errors={errors}\n touched={touched}\n isRequired\n/>\n```\n\n**Manual composition:**\n```tsx\n<FormField.Root isInvalid={!!(errors && touched)} isRequired>\n <FormField.Label>Project name</FormField.Label>\n <FormField.Input>\n <TextInput\n value={value}\n onChange={setValue}\n width=\"full\"\n />\n </FormField.Input>\n <FormField.Description>\n Enter a descriptive name\n </FormField.Description>\n {touched && errors && (\n <FormField.Error>\n <FieldErrors errors={errors} />\n </FormField.Error>\n )}\n</FormField.Root>\n```\n\n### When to use which\n\n**Use TextInputField when:**\n- Building standard forms with typical field layouts\n- You want consistent field patterns across your app\n- You need built-in error handling with FieldErrors\n- You want to minimize boilerplate code\n\n**Use TextInput with manual FormField composition when:**\n- You need custom field layouts\n- You're building complex, non-standard forms\n- You need granular control over FormField sub-components\n- You require a different error handling implementation\n\n## Getting started\n\n### Import\n\n```tsx\nimport { TextInputField, type TextInputFieldProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation with a label and controlled state:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n\n return (\n <TextInputField\n label=\"Username\"\n value={value}\n onChange={setValue}\n />\n );\n}\n```\n\n## Usage examples\n\n### Size options\n\nThe `sm` and `md` size variants are available to match your interface density:\n\n```jsx live-dev\nconst App = () => {\n const [valueSmall, setValueSmall] = useState<string>('');\n const [valueMedium, setValueMedium] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInputField\n size=\"sm\"\n label=\"Small input\"\n value={valueSmall}\n onChange={setValueSmall}\n placeholder=\"Small size\"\n />\n <TextInputField\n size=\"md\"\n label=\"Medium input\"\n value={valueMedium}\n onChange={setValueMedium}\n placeholder=\"Medium size (default)\"\n />\n </Stack>\n );\n}\n```\n\n### Visual variants\n\nChoose between `solid` and `ghost` variants to match your design context:\n\n```jsx live-dev\nconst App = () => {\n const [valueSolid, setValueSolid] = useState<string>('');\n const [valueGhost, setValueGhost] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInputField\n variant=\"solid\"\n label=\"Solid variant\"\n value={valueSolid}\n onChange={setValueSolid}\n placeholder=\"Solid variant (default)\"\n />\n <TextInputField\n variant=\"ghost\"\n label=\"Ghost variant\"\n value={valueGhost}\n onChange={setValueGhost}\n placeholder=\"Ghost variant\"\n />\n </Stack>\n );\n}\n```\n\n### With description\n\nAdd helper text below the input to provide context:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n\n return (\n <TextInputField\n label=\"Project name\"\n description=\"Choose a unique name that describes your project\"\n value={value}\n onChange={setValue}\n placeholder=\"My Awesome Project\"\n />\n );\n}\n```\n\n### With validation errors\n\nShow error messages when the field is touched and has validation errors:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n const [touched, setTouched] = useState<boolean>(false);\n\n // Simulate validation: require at least 3 characters\n const errors = touched && value.length < 3 ? { missing: true } : undefined;\n\n return (\n <TextInputField\n label=\"Username\"\n description=\"Enter at least 3 characters\"\n value={value}\n onChange={setValue}\n onBlur={() => setTouched(true)}\n errors={errors}\n touched={touched}\n isRequired\n placeholder=\"johndoe\"\n />\n );\n}\n```\n\n**Note**: Errors only display when both `touched={true}` and `errors` exist. This prevents showing errors before the user interacts with the field.\n\n### With info popover\n\nProvide additional context through an info button and popover:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n\n return (\n <TextInputField\n label=\"API Key\"\n description=\"Enter your API key for authentication\"\n info=\"Your API key can be found in your account settings under 'Developers'. Keep this key secure and do not share it publicly.\"\n value={value}\n onChange={setValue}\n type=\"password\"\n />\n );\n}\n```\n\n### Required field\n\nMark fields as required with the `isRequired` prop:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('');\n\n return (\n <TextInputField\n label=\"Email address\"\n description=\"We'll use this to contact you\"\n value={value}\n onChange={setValue}\n isRequired\n placeholder=\"user@example.com\"\n />\n );\n}\n```\n\n### Disabled state\n\nPrevent user interaction with the `isDisabled` prop:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('Cannot edit this');\n\n return (\n <TextInputField\n label=\"Account ID\"\n description=\"This field cannot be modified\"\n value={value}\n onChange={setValue}\n isDisabled\n />\n );\n}\n```\n\n### Read-only state\n\nDisplay a non-editable value with the `isReadOnly` prop:\n\n```jsx live-dev\nconst App = () => {\n const [value, setValue] = useState<string>('Read-only value');\n\n return (\n <TextInputField\n label=\"System-generated ID\"\n description=\"This value is automatically generated\"\n value={value}\n onChange={setValue}\n isReadOnly\n />\n );\n}\n```\n\n### Different input types\n\nUse the `type` prop to specify the HTML input type:\n\n```jsx live-dev\nconst App = () => {\n const [email, setEmail] = useState<string>('');\n const [password, setPassword] = useState<string>('');\n const [search, setSearch] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInputField\n type=\"email\"\n label=\"Email\"\n value={email}\n onChange={setEmail}\n placeholder=\"user@example.com\"\n />\n <TextInputField\n type=\"password\"\n label=\"Password\"\n value={password}\n onChange={setPassword}\n placeholder=\"Enter your password\"\n />\n <TextInputField\n type=\"search\"\n label=\"Search\"\n value={search}\n onChange={setSearch}\n placeholder=\"Search...\"\n />\n </Stack>\n );\n}\n```\n\n### With leading and trailing elements\n\nAdd icons or other elements to the input using `leadingElement` and `trailingElement`:\n\n```jsx live-dev\nconst App = () => {\n const [search, setSearch] = useState<string>('');\n const [url, setUrl] = useState<string>('');\n\n return (\n <Stack direction=\"column\" gap=\"400\">\n <TextInputField\n label=\"Search\"\n value={search}\n onChange={setSearch}\n placeholder=\"Search...\"\n leadingElement={<Icons.Search />}\n />\n <TextInputField\n label=\"Website URL\"\n value={url}\n onChange={setUrl}\n placeholder=\"example.com\"\n leadingElement={<Text fontSize=\"sm\" color=\"neutral.11\">https://</Text>}\n />\n </Stack>\n );\n}\n```\n\n## Component requirements\n\n### Error handling\n\nTextInputField uses the `FieldErrors` component to display validation errors with built-in localized messages. For custom error messages, use the `renderError` prop (see [Custom error rendering](#custom-error-rendering) below).\n\n**Error object format** (`FieldErrorsData`):\n```tsx\ntype FieldErrorsData = {\n [key: string]: boolean | string | ReactNode;\n};\n\n// Examples:\nconst errors = {\n missing: true, // Built-in message: \"This field is required\"\n invalidFormat: true, // Built-in message: \"Please enter a valid format\"\n custom: \"Custom error text\" // Custom message\n};\n```\n\n## Accessibility\n\nTextInputField provides comprehensive accessibility through [FormField](components/inputs/formfield):\n\n**Automatic ARIA relationships:**\n- Labels connected via `aria-labelledby`\n- Descriptions connected via `aria-describedby`\n- Error messages connected via `aria-describedby`\n- Required fields indicated with `aria-required`\n- Invalid state indicated with `aria-invalid`\n\nIf your use case requires tracking and analytics for this component, add a **persistent**, **unique** id:\n\n```tsx\nconst PERSISTENT_ID = \"example-text-input\";\n\nexport const Example = () => (\n <TextInputField\n id={PERSISTENT_ID}\n label=\"Username\"\n value={value}\n onChange={setValue}\n />\n);\n```\n\n#### Keyboard navigation\n\nThe component supports standard text input keyboard interaction:\n- `Tab` / `Shift+Tab`: Move focus to/from the input\n- `Arrow keys`: Navigate within the text\n- `Home` / `End`: Move to start/end of text\n- `Ctrl+A` / `Cmd+A`: Select all text\n\n## Form integration\n\nTextInputField integrates seamlessly with Formik:\n\n```tsx\nimport { useFormik } from 'formik';\nimport { TextInputField, Button, Stack } from '@commercetools/nimbus';\n\nconst MyForm = () => {\n const formik = useFormik({\n initialValues: {\n username: '',\n email: '',\n },\n validate: (values) => {\n const errors = {};\n\n if (!values.username) {\n errors.username = { missing: true };\n } else if (values.username.length < 3) {\n errors.username = { tooShort: true };\n }\n\n if (!values.email) {\n errors.email = { missing: true };\n } else if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(values.email)) {\n errors.email = { invalidFormat: true };\n }\n\n return errors;\n },\n onSubmit: (values) => {\n console.log('Submitted:', values);\n },\n });\n\n return (\n <form onSubmit={formik.handleSubmit}>\n <Stack direction=\"column\" gap=\"400\">\n <TextInputField\n name=\"username\"\n label=\"Username\"\n description=\"Choose a unique username\"\n value={formik.values.username}\n onChange={(value) => formik.setFieldValue('username', value)}\n onBlur={() => formik.setFieldTouched('username', true)}\n errors={formik.errors.username}\n touched={formik.touched.username}\n isRequired\n />\n <TextInputField\n name=\"email\"\n type=\"email\"\n label=\"Email address\"\n description=\"We'll use this to contact you\"\n value={formik.values.email}\n onChange={(value) => formik.setFieldValue('email', value)}\n onBlur={() => formik.setFieldTouched('email', true)}\n errors={formik.errors.email}\n touched={formik.touched.email}\n isRequired\n />\n <Button type=\"submit\">Submit</Button>\n </Stack>\n </form>\n );\n};\n```\n\n**Key integration points:**\n- **Value/OnChange**: Connect Formik values with `value` and `setFieldValue`\n- **OnBlur**: Mark field as touched on blur\n- **Errors**: Pass `errors.fieldName` (supports `FieldErrorsData` format or strings)\n- **Touched**: Pass `touched.fieldName` to control error visibility\n\n## API reference\n\n<PropsTable id=\"TextInputField\" />\n\n### Custom error rendering\n\nUse the `renderError` prop to customize how specific error keys are displayed:\n\n```tsx\n<TextInputField\n label=\"Email address\"\n value={value}\n onChange={setValue}\n errors={{ invalidEmail: true, tooShort: true }}\n touched={true}\n renderError={(key) => {\n switch (key) {\n case 'invalidEmail':\n return 'Please enter a valid email address (e.g., user@example.com)';\n case 'tooShort':\n return 'Email must be at least 5 characters long';\n default:\n return null; // Fall back to FieldErrors built-in messages\n }\n }}\n/>\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using TextInputField within your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic rendering tests\n\nVerify the component renders with expected elements:\n\n```tsx\nimport { render, screen } from '@testing-library/react';\nimport { TextInputField } from '@commercetools/nimbus';\n\ndescribe('TextInputField', () => {\n it('renders label and input', () => {\n render(\n <TextInputField\n label=\"Username\"\n value=\"\"\n onChange={() => {}}\n />\n );\n\n // Verify label is rendered\n expect(screen.getByText('Username')).toBeInTheDocument();\n\n // Verify input is rendered\n expect(screen.getByRole('textbox', { name: /username/i })).toBeInTheDocument();\n });\n\n it('renders description text', () => {\n render(\n <TextInputField\n label=\"Email\"\n description=\"Enter your email address\"\n value=\"\"\n onChange={() => {}}\n />\n );\n\n expect(screen.getByText('Enter your email address')).toBeInTheDocument();\n });\n\n it('shows required indicator', () => {\n render(\n <TextInputField\n label=\"Required field\"\n value=\"\"\n onChange={() => {}}\n isRequired\n />\n );\n\n // Check for required indicator (typically an asterisk or aria-required)\n const input = screen.getByRole('textbox');\n expect(input).toHaveAttribute('aria-required', 'true');\n });\n});\n```\n\n### Interaction tests\n\nTest user interactions with the component:\n\n```tsx\nimport { render, screen, waitFor } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\nimport { TextInputField } from '@commercetools/nimbus';\n\ndescribe('TextInputField interactions', () => {\n it('calls onChange when user types', async () => {\n const user = userEvent.setup();\n const handleChange = jest.fn();\n\n render(\n <TextInputField\n label=\"Username\"\n value=\"\"\n onChange={handleChange}\n />\n );\n\n const input = screen.getByRole('textbox', { name: /username/i });\n await user.type(input, 'johndoe');\n\n expect(handleChange).toHaveBeenCalledTimes(7); // Once per character\n expect(handleChange).toHaveBeenLastCalledWith('johndoe');\n });\n\n it('calls onBlur when input loses focus', async () => {\n const user = userEvent.setup();\n const handleBlur = jest.fn();\n\n render(\n <TextInputField\n label=\"Email\"\n value=\"\"\n onChange={() => {}}\n onBlur={handleBlur}\n />\n );\n\n const input = screen.getByRole('textbox');\n await user.click(input);\n await user.tab(); // Move focus away\n\n expect(handleBlur).toHaveBeenCalledTimes(1);\n });\n\n it('does not call onChange when disabled', async () => {\n const user = userEvent.setup();\n const handleChange = jest.fn();\n\n render(\n <TextInputField\n label=\"Username\"\n value=\"\"\n onChange={handleChange}\n isDisabled\n />\n );\n\n const input = screen.getByRole('textbox');\n expect(input).toBeDisabled();\n\n // Attempt to type (should not work)\n await user.type(input, 'test');\n expect(handleChange).not.toHaveBeenCalled();\n });\n});\n```\n\n### Testing validation and errors\n\nTest error handling and validation behavior:\n\n```tsx\nimport { render, screen } from '@testing-library/react';\nimport userEvent from '@testing-library/user-event';\nimport { TextInputField } from '@commercetools/nimbus';\n\ndescribe('TextInputField validation', () => {\n it('does not show errors when untouched', () => {\n render(\n <TextInputField\n label=\"Username\"\n value=\"\"\n onChange={() => {}}\n errors={{ missing: true }}\n touched={false}\n />\n );\n\n // Error should not be visible\n expect(screen.queryByText(/required/i)).not.toBeInTheDocument();\n });\n\n it('shows errors when touched', () => {\n render(\n <TextInputField\n label=\"Username\"\n value=\"\"\n onChange={() => {}}\n errors={{ missing: true }}\n touched={true}\n />\n );\n\n // Error should be visible\n expect(screen.getByText(/required/i)).toBeInTheDocument();\n });\n\n it('shows custom error messages', () => {\n render(\n <TextInputField\n label=\"Email\"\n value=\"\"\n onChange={() => {}}\n errors={{ invalidFormat: true }}\n touched={true}\n renderError={(key) => {\n if (key === 'invalidFormat') return 'Please enter a valid email';\n return null;\n }}\n />\n );\n\n expect(screen.getByText('Please enter a valid email')).toBeInTheDocument();\n });\n\n it('applies invalid styling when isInvalid is true', () => {\n render(\n <TextInputField\n label=\"Username\"\n value=\"\"\n onChange={() => {}}\n isInvalid\n />\n );\n\n const input = screen.getByRole('textbox');\n expect(input).toHaveAttribute('aria-invalid', 'true');\n });\n});\n```\n\n### Testing with different input types\n\nTest specific input type behavior:\n\n```tsx\nimport { render, screen } from '@testing-library/react';\nimport { TextInputField } from '@commercetools/nimbus';\n\ndescribe('TextInputField input types', () => {\n it('renders email input type', () => {\n render(\n <TextInputField\n type=\"email\"\n label=\"Email\"\n value=\"\"\n onChange={() => {}}\n />\n );\n\n const input = screen.getByRole('textbox');\n expect(input).toHaveAttribute('type', 'email');\n });\n\n it('renders password input type', () => {\n render(\n <TextInputField\n type=\"password\"\n label=\"Password\"\n value=\"\"\n onChange={() => {}}\n />\n );\n\n const input = screen.getByLabelText(/password/i);\n expect(input).toHaveAttribute('type', 'password');\n });\n\n it('renders search input type', () => {\n render(\n <TextInputField\n type=\"search\"\n label=\"Search\"\n value=\"\"\n onChange={() => {}}\n />\n );\n\n const input = screen.getByRole('searchbox');\n expect(input).toHaveAttribute('type', 'search');\n });\n});\n```\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/patterns-fields-textinputfield--docs)\n- [TextInput Component](/components/inputs/textinput)\n- [FormField Component](/components/inputs/formfield)\n- [FieldErrors Component](/components/forms/fielderrors)\n- [React Aria TextField](https://react-spectrum.adobe.com/react-aria/TextField.html)\n- [ARIA Textbox Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/textbox/)\n",
|
|
89
|
+
"toc": [
|
|
90
|
+
{
|
|
91
|
+
"value": "Comparison: field pattern vs manual composition",
|
|
92
|
+
"href": "#comparison-field-pattern-vs-manual-composition",
|
|
93
|
+
"depth": 2,
|
|
94
|
+
"numbering": [
|
|
95
|
+
1,
|
|
96
|
+
1
|
|
97
|
+
],
|
|
98
|
+
"parent": "root"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"value": "When to use which",
|
|
102
|
+
"href": "#when-to-use-which",
|
|
103
|
+
"depth": 3,
|
|
104
|
+
"numbering": [
|
|
105
|
+
1,
|
|
106
|
+
1,
|
|
107
|
+
1
|
|
108
|
+
],
|
|
109
|
+
"parent": "root"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"value": "Getting started",
|
|
113
|
+
"href": "#getting-started",
|
|
114
|
+
"depth": 2,
|
|
115
|
+
"numbering": [
|
|
116
|
+
1,
|
|
117
|
+
2
|
|
118
|
+
],
|
|
119
|
+
"parent": "root"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"value": "Import",
|
|
123
|
+
"href": "#import",
|
|
124
|
+
"depth": 3,
|
|
125
|
+
"numbering": [
|
|
126
|
+
1,
|
|
127
|
+
2,
|
|
128
|
+
1
|
|
129
|
+
],
|
|
130
|
+
"parent": "root"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"value": "Basic usage",
|
|
134
|
+
"href": "#basic-usage",
|
|
135
|
+
"depth": 3,
|
|
136
|
+
"numbering": [
|
|
137
|
+
1,
|
|
138
|
+
2,
|
|
139
|
+
2
|
|
140
|
+
],
|
|
141
|
+
"parent": "root"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"value": "Usage examples",
|
|
145
|
+
"href": "#usage-examples",
|
|
146
|
+
"depth": 2,
|
|
147
|
+
"numbering": [
|
|
148
|
+
1,
|
|
149
|
+
3
|
|
150
|
+
],
|
|
151
|
+
"parent": "root"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"value": "Size options",
|
|
155
|
+
"href": "#size-options",
|
|
156
|
+
"depth": 3,
|
|
157
|
+
"numbering": [
|
|
158
|
+
1,
|
|
159
|
+
3,
|
|
160
|
+
1
|
|
161
|
+
],
|
|
162
|
+
"parent": "root"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"value": "Visual variants",
|
|
166
|
+
"href": "#visual-variants",
|
|
167
|
+
"depth": 3,
|
|
168
|
+
"numbering": [
|
|
169
|
+
1,
|
|
170
|
+
3,
|
|
171
|
+
2
|
|
172
|
+
],
|
|
173
|
+
"parent": "root"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"value": "With description",
|
|
177
|
+
"href": "#with-description",
|
|
178
|
+
"depth": 3,
|
|
179
|
+
"numbering": [
|
|
180
|
+
1,
|
|
181
|
+
3,
|
|
182
|
+
3
|
|
183
|
+
],
|
|
184
|
+
"parent": "root"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"value": "With validation errors",
|
|
188
|
+
"href": "#with-validation-errors",
|
|
189
|
+
"depth": 3,
|
|
190
|
+
"numbering": [
|
|
191
|
+
1,
|
|
192
|
+
3,
|
|
193
|
+
4
|
|
194
|
+
],
|
|
195
|
+
"parent": "root"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"value": "With info popover",
|
|
199
|
+
"href": "#with-info-popover",
|
|
200
|
+
"depth": 3,
|
|
201
|
+
"numbering": [
|
|
202
|
+
1,
|
|
203
|
+
3,
|
|
204
|
+
5
|
|
205
|
+
],
|
|
206
|
+
"parent": "root"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"value": "Required field",
|
|
210
|
+
"href": "#required-field",
|
|
211
|
+
"depth": 3,
|
|
212
|
+
"numbering": [
|
|
213
|
+
1,
|
|
214
|
+
3,
|
|
215
|
+
6
|
|
216
|
+
],
|
|
217
|
+
"parent": "root"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"value": "Disabled state",
|
|
221
|
+
"href": "#disabled-state",
|
|
222
|
+
"depth": 3,
|
|
223
|
+
"numbering": [
|
|
224
|
+
1,
|
|
225
|
+
3,
|
|
226
|
+
7
|
|
227
|
+
],
|
|
228
|
+
"parent": "root"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"value": "Read-only state",
|
|
232
|
+
"href": "#read-only-state",
|
|
233
|
+
"depth": 3,
|
|
234
|
+
"numbering": [
|
|
235
|
+
1,
|
|
236
|
+
3,
|
|
237
|
+
8
|
|
238
|
+
],
|
|
239
|
+
"parent": "root"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"value": "Different input types",
|
|
243
|
+
"href": "#different-input-types",
|
|
244
|
+
"depth": 3,
|
|
245
|
+
"numbering": [
|
|
246
|
+
1,
|
|
247
|
+
3,
|
|
248
|
+
9
|
|
249
|
+
],
|
|
250
|
+
"parent": "root"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"value": "With leading and trailing elements",
|
|
254
|
+
"href": "#with-leading-and-trailing-elements",
|
|
255
|
+
"depth": 3,
|
|
256
|
+
"numbering": [
|
|
257
|
+
1,
|
|
258
|
+
3,
|
|
259
|
+
10
|
|
260
|
+
],
|
|
261
|
+
"parent": "root"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"value": "Component requirements",
|
|
265
|
+
"href": "#component-requirements",
|
|
266
|
+
"depth": 2,
|
|
267
|
+
"numbering": [
|
|
268
|
+
1,
|
|
269
|
+
4
|
|
270
|
+
],
|
|
271
|
+
"parent": "root"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"value": "Error handling",
|
|
275
|
+
"href": "#error-handling",
|
|
276
|
+
"depth": 3,
|
|
277
|
+
"numbering": [
|
|
278
|
+
1,
|
|
279
|
+
4,
|
|
280
|
+
1
|
|
281
|
+
],
|
|
282
|
+
"parent": "root"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"value": "Accessibility",
|
|
286
|
+
"href": "#accessibility",
|
|
287
|
+
"depth": 2,
|
|
288
|
+
"numbering": [
|
|
289
|
+
1,
|
|
290
|
+
5
|
|
291
|
+
],
|
|
292
|
+
"parent": "root"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"value": "Keyboard navigation",
|
|
296
|
+
"href": "#keyboard-navigation",
|
|
297
|
+
"depth": 4,
|
|
298
|
+
"numbering": [
|
|
299
|
+
1,
|
|
300
|
+
5,
|
|
301
|
+
1,
|
|
302
|
+
1
|
|
303
|
+
],
|
|
304
|
+
"parent": "root"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"value": "Form integration",
|
|
308
|
+
"href": "#form-integration",
|
|
309
|
+
"depth": 2,
|
|
310
|
+
"numbering": [
|
|
311
|
+
1,
|
|
312
|
+
6
|
|
313
|
+
],
|
|
314
|
+
"parent": "root"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"value": "API reference",
|
|
318
|
+
"href": "#api-reference",
|
|
319
|
+
"depth": 2,
|
|
320
|
+
"numbering": [
|
|
321
|
+
1,
|
|
322
|
+
7
|
|
323
|
+
],
|
|
324
|
+
"parent": "root"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"value": "Custom error rendering",
|
|
328
|
+
"href": "#custom-error-rendering",
|
|
329
|
+
"depth": 3,
|
|
330
|
+
"numbering": [
|
|
331
|
+
1,
|
|
332
|
+
7,
|
|
333
|
+
1
|
|
334
|
+
],
|
|
335
|
+
"parent": "root"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"value": "Testing your implementation",
|
|
339
|
+
"href": "#testing-your-implementation",
|
|
340
|
+
"depth": 2,
|
|
341
|
+
"numbering": [
|
|
342
|
+
1,
|
|
343
|
+
8
|
|
344
|
+
],
|
|
345
|
+
"parent": "root"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"value": "Basic rendering tests",
|
|
349
|
+
"href": "#basic-rendering-tests",
|
|
350
|
+
"depth": 3,
|
|
351
|
+
"numbering": [
|
|
352
|
+
1,
|
|
353
|
+
8,
|
|
354
|
+
1
|
|
355
|
+
],
|
|
356
|
+
"parent": "root"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"value": "Interaction tests",
|
|
360
|
+
"href": "#interaction-tests",
|
|
361
|
+
"depth": 3,
|
|
362
|
+
"numbering": [
|
|
363
|
+
1,
|
|
364
|
+
8,
|
|
365
|
+
2
|
|
366
|
+
],
|
|
367
|
+
"parent": "root"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"value": "Testing validation and errors",
|
|
371
|
+
"href": "#testing-validation-and-errors",
|
|
372
|
+
"depth": 3,
|
|
373
|
+
"numbering": [
|
|
374
|
+
1,
|
|
375
|
+
8,
|
|
376
|
+
3
|
|
377
|
+
],
|
|
378
|
+
"parent": "root"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"value": "Testing with different input types",
|
|
382
|
+
"href": "#testing-with-different-input-types",
|
|
383
|
+
"depth": 3,
|
|
384
|
+
"numbering": [
|
|
385
|
+
1,
|
|
386
|
+
8,
|
|
387
|
+
4
|
|
388
|
+
],
|
|
389
|
+
"parent": "root"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"value": "Resources",
|
|
393
|
+
"href": "#resources",
|
|
394
|
+
"depth": 2,
|
|
395
|
+
"numbering": [
|
|
396
|
+
1,
|
|
397
|
+
9
|
|
398
|
+
],
|
|
399
|
+
"parent": "root"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Patterns-Fields",
|
|
4
|
+
"title": "Fields",
|
|
5
|
+
"description": "Field pattern components that integrate inputs within FormField for consistent form layouts",
|
|
6
|
+
"order": 1,
|
|
7
|
+
"repoPath": "packages/nimbus/src/docs/fields.mdx",
|
|
8
|
+
"menu": [
|
|
9
|
+
"Patterns",
|
|
10
|
+
"Fields"
|
|
11
|
+
],
|
|
12
|
+
"route": "patterns/fields",
|
|
13
|
+
"tags": [
|
|
14
|
+
"patterns",
|
|
15
|
+
"fields",
|
|
16
|
+
"forms"
|
|
17
|
+
],
|
|
18
|
+
"toc": [
|
|
19
|
+
{
|
|
20
|
+
"value": "When to use field patterns",
|
|
21
|
+
"href": "#when-to-use-field-patterns",
|
|
22
|
+
"depth": 2,
|
|
23
|
+
"numbering": [
|
|
24
|
+
1,
|
|
25
|
+
1
|
|
26
|
+
],
|
|
27
|
+
"parent": "root"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"value": "Available field patterns",
|
|
31
|
+
"href": "#available-field-patterns",
|
|
32
|
+
"depth": 2,
|
|
33
|
+
"numbering": [
|
|
34
|
+
1,
|
|
35
|
+
2
|
|
36
|
+
],
|
|
37
|
+
"parent": "root"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"icon": "Input",
|
|
41
|
+
"layout": "app-frame",
|
|
42
|
+
"tabs": [
|
|
43
|
+
{
|
|
44
|
+
"key": "overview",
|
|
45
|
+
"title": "Overview",
|
|
46
|
+
"order": 0
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"mdx": "\n# Fields\n\nField pattern components provide a consistent way to integrate input components within FormField wrappers. These patterns simplify form building by combining labels, descriptions, validation, and error handling into a single, opinionated API.\n\n## When to use field patterns\n\nField patterns are ideal for:\n- Building standard forms with consistent field layouts\n- Reducing boilerplate in form code\n- Ensuring accessibility best practices across all form fields\n- Integrating with form libraries like Formik\n\n## Available field patterns\n\n<CategoryOverview variant=\"list\" />\n",
|
|
51
|
+
"views": {
|
|
52
|
+
"overview": {
|
|
53
|
+
"mdx": "\n# Fields\n\nField pattern components provide a consistent way to integrate input components within FormField wrappers. These patterns simplify form building by combining labels, descriptions, validation, and error handling into a single, opinionated API.\n\n## When to use field patterns\n\nField patterns are ideal for:\n- Building standard forms with consistent field layouts\n- Reducing boilerplate in form code\n- Ensuring accessibility best practices across all form fields\n- Integrating with form libraries like Formik\n\n## Available field patterns\n\n<CategoryOverview variant=\"list\" />\n",
|
|
54
|
+
"toc": [
|
|
55
|
+
{
|
|
56
|
+
"value": "When to use field patterns",
|
|
57
|
+
"href": "#when-to-use-field-patterns",
|
|
58
|
+
"depth": 2,
|
|
59
|
+
"numbering": [
|
|
60
|
+
1,
|
|
61
|
+
1
|
|
62
|
+
],
|
|
63
|
+
"parent": "root"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"value": "Available field patterns",
|
|
67
|
+
"href": "#available-field-patterns",
|
|
68
|
+
"depth": 2,
|
|
69
|
+
"numbering": [
|
|
70
|
+
1,
|
|
71
|
+
2
|
|
72
|
+
],
|
|
73
|
+
"parent": "root"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Patterns",
|
|
4
|
+
"title": "Patterns",
|
|
5
|
+
"description": "Reusable component patterns and compositions for common use cases",
|
|
6
|
+
"order": 4,
|
|
7
|
+
"repoPath": "packages/nimbus/src/docs/patterns.mdx",
|
|
8
|
+
"menu": [
|
|
9
|
+
"Patterns"
|
|
10
|
+
],
|
|
11
|
+
"route": "patterns",
|
|
12
|
+
"tags": [
|
|
13
|
+
"patterns",
|
|
14
|
+
"compositions",
|
|
15
|
+
"recipes"
|
|
16
|
+
],
|
|
17
|
+
"toc": [],
|
|
18
|
+
"layout": "app-frame",
|
|
19
|
+
"tabs": [
|
|
20
|
+
{
|
|
21
|
+
"key": "overview",
|
|
22
|
+
"title": "Overview",
|
|
23
|
+
"order": 0
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"mdx": "\n# Patterns\n\nA collection of reusable component patterns and compositions that combine multiple components to solve common UI challenges.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
28
|
+
"views": {
|
|
29
|
+
"overview": {
|
|
30
|
+
"mdx": "\n# Patterns\n\nA collection of reusable component patterns and compositions that combine multiple components to solve common UI challenges.\n\n<CategoryOverview variant=\"list\" />\n",
|
|
31
|
+
"toc": []
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|