@astryxdesign/core 0.7.4 → 0.7.5-canary.04434e7
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/dist/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/AlertDialog/index.d.ts +4 -4
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +1 -1
- package/dist/AppShell/AppShell.d.ts +4 -4
- package/dist/AppShell/index.d.ts +4 -4
- package/dist/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/AspectRatio/index.d.ts +2 -2
- package/dist/Avatar/Avatar.d.ts +2 -2
- package/dist/Avatar/AvatarStatusDot.d.ts +2 -2
- package/dist/Avatar/index.d.ts +4 -4
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/dist/AvatarGroup/AvatarGroupContext.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/index.d.ts +6 -6
- package/dist/Badge/Badge.d.ts +2 -2
- package/dist/Badge/index.d.ts +2 -2
- package/dist/Banner/Banner.d.ts +4 -4
- package/dist/Banner/index.d.ts +2 -2
- package/dist/Blockquote/Blockquote.d.ts +1 -1
- package/dist/Blockquote/index.d.ts +2 -2
- package/dist/BottomSheet/BottomSheet.d.ts +10 -6
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +12 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts +3 -3
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts +1 -1
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +2 -2
- package/dist/BottomSheet/index.d.ts +4 -4
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/Breadcrumbs/index.d.ts +12 -12
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/index.d.ts +2 -2
- package/dist/ButtonGroup/ButtonGroup.d.ts +4 -4
- package/dist/ButtonGroup/index.d.ts +4 -4
- package/dist/Calendar/Calendar.d.ts +3 -3
- package/dist/Calendar/dayCellUtils.d.ts +1 -1
- package/dist/Calendar/getInitialFocusDate.d.ts +2 -2
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +1 -1
- package/dist/Calendar/hooks/index.d.ts +6 -6
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarDays.d.ts +2 -2
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts +2 -2
- package/dist/Calendar/index.d.ts +5 -5
- package/dist/Calendar/utils.d.ts +1 -1
- package/dist/Card/Card.d.ts +4 -4
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/Carousel/index.d.ts +2 -2
- package/dist/Center/Center.d.ts +2 -2
- package/dist/Center/index.d.ts +2 -2
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerInput.d.ts +4 -4
- package/dist/Chat/ChatDictationButton.d.ts +2 -2
- package/dist/Chat/ChatLayout.d.ts +1 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts +2 -2
- package/dist/Chat/ChatMessageBubble.d.ts +2 -2
- package/dist/Chat/ChatMessageList.d.ts +3 -3
- package/dist/Chat/ChatMessageMetadata.d.ts +1 -1
- package/dist/Chat/ChatSendButton.d.ts +1 -1
- package/dist/Chat/ChatSystemMessage.d.ts +1 -1
- package/dist/Chat/ChatTokenizedText.d.ts +2 -2
- package/dist/Chat/ChatToolCalls.d.ts +1 -1
- package/dist/Chat/index.d.ts +43 -43
- package/dist/Chat/useChatComposerTokens.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatPasteAsToken.d.ts +1 -1
- package/dist/Chat/useTriggerMenu.d.ts +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts +4 -4
- package/dist/CheckboxInput/index.d.ts +2 -2
- package/dist/CheckboxList/CheckboxList.d.ts +4 -4
- package/dist/CheckboxList/CheckboxListItem.d.ts +2 -2
- package/dist/CheckboxList/index.d.ts +4 -4
- package/dist/Citation/Citation.d.ts +1 -1
- package/dist/Citation/index.d.ts +2 -2
- package/dist/ClickableCard/ClickableCard.d.ts +3 -3
- package/dist/ClickableCard/index.d.ts +2 -2
- package/dist/Code/Code.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/CodeBlock/CodeBlock.d.ts +2 -2
- package/dist/CodeBlock/highlightRanges.d.ts +1 -1
- package/dist/CodeBlock/index.d.ts +8 -8
- package/dist/Collapsible/Collapsible.d.ts +2 -2
- package/dist/Collapsible/CollapsibleGroup.d.ts +2 -2
- package/dist/Collapsible/index.d.ts +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +2 -2
- package/dist/CommandPalette/CommandPaletteContext.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteEmpty.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteFooter.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteGroup.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteItem.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/index.d.ts +16 -16
- package/dist/ComplexSelector/ComplexSelector.d.ts +5 -5
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts +4 -4
- package/dist/ContextMenu/index.d.ts +9 -9
- package/dist/DateInput/DateInput.d.ts +7 -7
- package/dist/DateInput/MonthScroller.d.ts +1 -1
- package/dist/DateInput/NativeDateField.d.ts +1 -1
- package/dist/DateInput/TouchDateField.d.ts +1 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +1 -1
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/monthGeometry.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts +6 -6
- package/dist/DateRangeInput/index.d.ts +2 -2
- package/dist/DateTimeInput/DateTimeInput.d.ts +6 -6
- package/dist/DateTimeInput/NativeDateSegment.d.ts +3 -3
- package/dist/DateTimeInput/NativeTimeSegment.d.ts +4 -4
- package/dist/DateTimeInput/TouchDateTimeField.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts +3 -3
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/index.d.ts +6 -6
- package/dist/Dialog/useImperativeDialog.d.ts +1 -1
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/index.d.ts +2 -2
- package/dist/Drawer/Drawer.d.ts +3 -3
- package/dist/Drawer/DrawerHeader.d.ts +1 -1
- package/dist/Drawer/index.d.ts +4 -4
- package/dist/DropdownMenu/DropdownMenu.d.ts +5 -5
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts +2 -2
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +12 -7
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +13 -5
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +2 -2
- package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts +1 -1
- package/dist/DropdownMenu/index.d.ts +10 -10
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +2 -2
- package/dist/DropdownMenu/renderDropdownItems.d.ts +1 -1
- package/dist/DropdownMenu/useMenuDrillIn.d.ts +1 -1
- package/dist/EmptyState/EmptyState.d.ts +1 -1
- package/dist/EmptyState/index.d.ts +2 -2
- package/dist/Field/Field.d.ts +5 -5
- package/dist/Field/FieldLabel.d.ts +2 -2
- package/dist/Field/PanelSearchInput.d.ts +1 -1
- package/dist/Field/fieldInputFamily.testing.d.ts +1 -1
- package/dist/Field/fieldParts.d.ts +1 -1
- package/dist/Field/index.d.ts +10 -10
- package/dist/Field/inputDisabledFocus.d.ts +14 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -0
- package/dist/Field/inputDisabledFocus.js +19 -0
- package/dist/FieldStatus/FieldStatus.d.ts +3 -3
- package/dist/FieldStatus/index.d.ts +2 -2
- package/dist/FieldStatus/useFieldStatusAnnouncement.d.ts +1 -1
- package/dist/FileInput/FileInput.d.ts +4 -4
- package/dist/FileInput/index.d.ts +2 -2
- package/dist/FormLayout/FormLayout.d.ts +2 -2
- package/dist/FormLayout/index.d.ts +4 -4
- package/dist/Grid/Grid.d.ts +3 -3
- package/dist/Grid/GridSpan.d.ts +1 -1
- package/dist/Grid/index.d.ts +4 -4
- package/dist/HStack/HStack.d.ts +2 -2
- package/dist/HStack/index.d.ts +1 -1
- package/dist/Heading/Heading.d.ts +4 -4
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/HoverCard.d.ts +4 -4
- package/dist/HoverCard/index.d.ts +4 -4
- package/dist/HoverCard/useHoverCard.d.ts +2 -2
- package/dist/Icon/Icon.d.ts +3 -3
- package/dist/Icon/IconDefaultSizeContext.d.ts +1 -1
- package/dist/Icon/defaultIcons.d.ts +1 -1
- package/dist/Icon/globalIconRegistry.d.ts +1 -1
- package/dist/Icon/index.d.ts +5 -5
- package/dist/Icon/useIcon.d.ts +1 -1
- package/dist/IconButton/IconButton.d.ts +1 -1
- package/dist/IconButton/index.d.ts +2 -2
- package/dist/Indicator/CheckIndicator.d.ts +1 -1
- package/dist/Indicator/CheckboxIndicator.d.ts +1 -1
- package/dist/Indicator/RadioIndicator.d.ts +1 -1
- package/dist/Indicator/index.d.ts +8 -8
- package/dist/Indicator/indicatorRegistry.d.ts +2 -2
- package/dist/Indicator/types.d.ts +1 -1
- package/dist/Indicator/useIndicator.d.ts +2 -2
- package/dist/InputGroup/InputGroup.d.ts +2 -2
- package/dist/InputGroup/InputGroupText.d.ts +1 -1
- package/dist/InputGroup/index.d.ts +6 -6
- package/dist/InteractiveRoleContext/InteractiveRoleContext.d.ts +1 -1
- package/dist/InteractiveRoleContext/index.d.ts +1 -1
- package/dist/Item/Item.d.ts +1 -1
- package/dist/Item/ItemSwipeLayer.d.ts +2 -2
- package/dist/Item/index.d.ts +2 -2
- package/dist/Kbd/Kbd.d.ts +1 -1
- package/dist/Kbd/index.d.ts +2 -2
- package/dist/Layer/LayerProvider.d.ts +1 -1
- package/dist/Layer/index.d.ts +18 -18
- package/dist/Layer/layerInset.d.ts +1 -1
- package/dist/Layer/layerSlideRules.d.ts +1 -1
- package/dist/Layer/modalOutlet.d.ts +1 -1
- package/dist/Layer/modalOutlet.js +1 -1
- package/dist/Layer/useLayerDismissal.d.ts +1 -1
- package/dist/Layer/useTouchTrigger.d.ts +14 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +72 -17
- package/dist/Layout/Layout.d.ts +2 -2
- package/dist/Layout/LayoutContent.d.ts +2 -2
- package/dist/Layout/LayoutFooter.d.ts +2 -2
- package/dist/Layout/LayoutHeader.d.ts +2 -2
- package/dist/Layout/LayoutPanel.d.ts +3 -3
- package/dist/Layout/index.d.ts +29 -29
- package/dist/Layout/padding.stylex.d.ts +1 -1
- package/dist/Lightbox/Lightbox.d.ts +1 -1
- package/dist/Lightbox/index.d.ts +4 -4
- package/dist/Lightbox/useLightbox.d.ts +1 -1
- package/dist/Link/Link.d.ts +3 -3
- package/dist/Link/LinkContext.d.ts +1 -1
- package/dist/Link/LinkProvider.d.ts +1 -1
- package/dist/Link/index.d.ts +8 -8
- package/dist/Link/useLinkComponent.d.ts +1 -1
- package/dist/List/List.d.ts +3 -3
- package/dist/List/ListItem.d.ts +2 -2
- package/dist/List/index.d.ts +4 -4
- package/dist/Markdown/Markdown.d.ts +4 -4
- package/dist/Markdown/headingProjection.d.ts +3 -3
- package/dist/Markdown/index.d.ts +7 -7
- package/dist/Markdown/parser/index.d.ts +3 -3
- package/dist/Markdown/parser.d.ts +3 -3
- package/dist/Markdown/plugin-renderer/MarkdownPluginNodeRenderer.d.ts +1 -1
- package/dist/Markdown/plugin-renderer/index.d.ts +2 -2
- package/dist/Markdown/plugins/frontmatter.d.ts +2 -2
- package/dist/Markdown/plugins/headingLinks.d.ts +2 -2
- package/dist/Markdown/plugins/index.d.ts +14 -14
- package/dist/Markdown/plugins/protocol.d.ts +1 -1
- package/dist/Markdown/plugins/semanticFence.d.ts +2 -2
- package/dist/Markdown/plugins/softBreaks.d.ts +1 -1
- package/dist/Markdown/plugins/sourceDecoration.d.ts +2 -2
- package/dist/Markdown/plugins/sourceLines.d.ts +1 -1
- package/dist/Markdown/plugins/textTransform.d.ts +2 -2
- package/dist/Markdown/remark.d.ts +1 -1
- package/dist/Markdown/utils.d.ts +4 -4
- package/dist/MetadataList/MetadataList.d.ts +2 -2
- package/dist/MetadataList/MetadataListItem.d.ts +1 -1
- package/dist/MetadataList/index.d.ts +5 -5
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/index.d.ts +4 -4
- package/dist/MoreMenu/MoreMenu.d.ts +4 -4
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts +7 -7
- package/dist/MultiSelector/hooks.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +3 -3
- package/dist/MultiSelector/types.d.ts +1 -1
- package/dist/NavIcon/NavIcon.d.ts +1 -1
- package/dist/NavIcon/index.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenu.d.ts +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts +2 -2
- package/dist/NavMenu/index.d.ts +6 -6
- package/dist/NumberInput/NumberInput.d.ts +8 -8
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +46 -20
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/numberInputCommit.d.ts +1 -1
- package/dist/NumberInput/numberParser.d.ts +1 -1
- package/dist/Outline/Outline.d.ts +3 -3
- package/dist/Outline/index.d.ts +7 -7
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -2
- package/dist/Outline/useOutlineFromDOM.d.ts +1 -1
- package/dist/Outline/useOutlineFromMarkdown.d.ts +3 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/OverflowList/OverflowList.d.ts +2 -2
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/Overlay/Overlay.d.ts +2 -2
- package/dist/Overlay/index.d.ts +5 -5
- package/dist/Overlay/useOverlay.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts +2 -2
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Popover/Popover.d.ts +3 -3
- package/dist/Popover/index.d.ts +4 -4
- package/dist/Popover/usePopover.d.ts +2 -2
- package/dist/PowerSearch/PowerSearch.d.ts +5 -5
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +2 -2
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -2
- package/dist/PowerSearch/formatFilterValue.d.ts +3 -3
- package/dist/PowerSearch/index.d.ts +8 -8
- package/dist/PowerSearch/resolveDateTimeRangePart.d.ts +1 -1
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +2 -2
- package/dist/PowerSearch/types.d.ts +1 -1
- package/dist/PowerSearch/useInternalConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts +1 -1
- package/dist/PowerSearch/usePowerSearchSource.d.ts +3 -3
- package/dist/PowerSearch/utils.d.ts +3 -3
- package/dist/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/ProgressBar/index.d.ts +2 -2
- package/dist/RadioList/RadioList.d.ts +3 -3
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/index.d.ts +4 -4
- package/dist/Resizable/ResizeHandle.d.ts +2 -2
- package/dist/Resizable/index.d.ts +6 -6
- package/dist/Resizable/useResizable.d.ts +2 -2
- package/dist/Resizable/utils.d.ts +3 -3
- package/dist/ScrollableArea/ScrollableArea.d.ts +3 -3
- package/dist/ScrollableArea/index.d.ts +4 -4
- package/dist/Section/Section.d.ts +3 -3
- package/dist/Section/index.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +5 -5
- package/dist/SelectableCard/SelectableCard.d.ts +3 -3
- package/dist/SelectableCard/index.d.ts +2 -2
- package/dist/Selector/Selector.d.ts +8 -8
- package/dist/Selector/SelectorOption.d.ts +1 -1
- package/dist/Selector/hooks.d.ts +1 -1
- package/dist/Selector/index.d.ts +4 -4
- package/dist/Selector/types.d.ts +1 -1
- package/dist/Selector/useSelectorPresentation.d.ts +2 -2
- package/dist/Selector/utils.d.ts +1 -1
- package/dist/SideNav/SideNav.d.ts +3 -3
- package/dist/SideNav/SideNavCollapseButton.d.ts +3 -3
- package/dist/SideNav/SideNavHeading.d.ts +2 -2
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +34 -0
- package/dist/SideNav/SideNavItem.d.ts +4 -4
- package/dist/SideNav/SideNavSection.d.ts +1 -1
- package/dist/SideNav/index.d.ts +14 -14
- package/dist/SizeContext/index.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts +1 -1
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +12 -3
- package/dist/Skeleton/index.d.ts +2 -2
- package/dist/Slider/Slider.d.ts +3 -3
- package/dist/Slider/index.d.ts +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Stack/Stack.d.ts +3 -3
- package/dist/Stack/StackItem.d.ts +2 -2
- package/dist/Stack/index.d.ts +6 -6
- package/dist/Stack/stack.stylex.d.ts +1 -1
- package/dist/StatusDot/StatusDot.d.ts +2 -2
- package/dist/StatusDot/index.d.ts +2 -2
- package/dist/Stepper/Step.d.ts +2 -2
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +3 -3
- package/dist/Stepper/Stepper.d.ts +2 -2
- package/dist/Stepper/index.d.ts +7 -7
- package/dist/Switch/Switch.d.ts +4 -4
- package/dist/Switch/index.d.ts +2 -2
- package/dist/TabList/Tab.d.ts +2 -2
- package/dist/TabList/TabList.d.ts +3 -3
- package/dist/TabList/TabMenu.d.ts +2 -2
- package/dist/TabList/index.d.ts +8 -8
- package/dist/Table/BaseTable.d.ts +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/TableBody.d.ts +1 -1
- package/dist/Table/TableCell.d.ts +3 -3
- package/dist/Table/TableContext.d.ts +1 -1
- package/dist/Table/TableFooter.d.ts +1 -1
- package/dist/Table/TableHeader.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts +3 -3
- package/dist/Table/TableRow.d.ts +2 -2
- package/dist/Table/TableSelectionToolbar.d.ts +2 -2
- package/dist/Table/columnUtils.d.ts +1 -1
- package/dist/Table/index.d.ts +54 -54
- package/dist/Table/plugins/columnResize/index.d.ts +2 -2
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts +1 -1
- package/dist/Table/plugins/columnSettings/index.d.ts +4 -4
- package/dist/Table/plugins/columnSettings/useTableColumnSettings.d.ts +2 -2
- package/dist/Table/plugins/columnSettings/useTableColumnSettingsState.d.ts +1 -1
- package/dist/Table/plugins/filtering/index.d.ts +4 -4
- package/dist/Table/plugins/filtering/useTableFilterState.d.ts +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/index.d.ts +2 -2
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
- package/dist/Table/plugins/pagination/index.d.ts +3 -3
- package/dist/Table/plugins/pagination/useTablePagination.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/index.d.ts +2 -2
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowIndex/index.d.ts +2 -2
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +1 -1
- package/dist/Table/plugins/rowStatus/index.d.ts +2 -2
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +2 -2
- package/dist/Table/plugins/selection/index.d.ts +4 -4
- package/dist/Table/plugins/selection/useTableSelection.d.ts +1 -1
- package/dist/Table/plugins/selection/useTableSelectionState.d.ts +1 -1
- package/dist/Table/plugins/sortable/index.d.ts +4 -4
- package/dist/Table/plugins/sortable/useTableSortable.d.ts +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +1 -1
- package/dist/Table/plugins/stickyColumns/index.d.ts +2 -2
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts +1 -1
- package/dist/Table/plugins/tree/index.d.ts +4 -4
- package/dist/Table/plugins/tree/useTableTreeData.d.ts +1 -1
- package/dist/Table/plugins/tree/useTableTreeState.d.ts +1 -1
- package/dist/Table/tableContextMenu.d.ts +2 -2
- package/dist/Table/types.d.ts +3 -3
- package/dist/Table/useBaseTablePlugins.d.ts +1 -1
- package/dist/Table/useTableCellStyles.d.ts +2 -2
- package/dist/Table/utils.d.ts +2 -2
- package/dist/Text/Text.d.ts +3 -3
- package/dist/Text/index.d.ts +4 -4
- package/dist/TextArea/TextArea.d.ts +10 -8
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +14 -11
- package/dist/TextArea/index.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts +11 -9
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +27 -17
- package/dist/TextInput/index.d.ts +2 -2
- package/dist/Thumbnail/Thumbnail.d.ts +1 -1
- package/dist/Thumbnail/index.d.ts +2 -2
- package/dist/TimeInput/TimeInput.d.ts +6 -6
- package/dist/TimeInput/TouchTimeField.d.ts +1 -1
- package/dist/TimeInput/index.d.ts +3 -3
- package/dist/Timer/Timer.d.ts +2 -2
- package/dist/Timer/index.d.ts +2 -2
- package/dist/Timestamp/Timestamp.d.ts +3 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts +1 -1
- package/dist/Timestamp/formatInstant.d.ts +2 -2
- package/dist/Timestamp/formatRelativeTime.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +3 -3
- package/dist/Timestamp/tooltipEntries.d.ts +2 -2
- package/dist/Toast/Toast.d.ts +2 -2
- package/dist/Toast/ToastContext.d.ts +1 -1
- package/dist/Toast/ToastViewport.d.ts +2 -2
- package/dist/Toast/index.d.ts +6 -6
- package/dist/Toast/useToast.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/ToggleButton/index.d.ts +4 -4
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/index.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts +6 -6
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +44 -40
- package/dist/Tokenizer/index.d.ts +2 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts +3 -2
- package/dist/Tokenizer/useEndLaneReserve.d.ts.map +1 -1
- package/dist/Tokenizer/useEndLaneReserve.js +3 -2
- package/dist/Toolbar/Toolbar.d.ts +4 -4
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/index.d.ts +4 -4
- package/dist/Tooltip/useTooltip.d.ts +2 -2
- package/dist/TopNav/TopNav.d.ts +1 -1
- package/dist/TopNav/TopNavHeading.d.ts +2 -2
- package/dist/TopNav/TopNavItem.d.ts +3 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.d.ts +2 -2
- package/dist/TopNav/TopNavMenu.d.ts +1 -1
- package/dist/TopNav/index.d.ts +16 -16
- package/dist/TreeList/TreeList.d.ts +3 -3
- package/dist/TreeList/TreeListItem.d.ts +1 -1
- package/dist/TreeList/TreeListTypes.d.ts +1 -1
- package/dist/TreeList/index.d.ts +3 -3
- package/dist/Typeahead/BaseTypeahead.d.ts +2 -2
- package/dist/Typeahead/Typeahead.d.ts +6 -6
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -2
- package/dist/Typeahead/createStaticSource.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +9 -9
- package/dist/Typeahead/utils.d.ts +3 -3
- package/dist/VStack/VStack.d.ts +2 -2
- package/dist/VStack/index.d.ts +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +24 -6
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +24 -5
- package/dist/VisuallyHidden/index.d.ts +2 -2
- package/dist/astryx.css +8 -16
- package/dist/hooks/index.d.ts +52 -52
- package/dist/hooks/useAutoMediaMode.d.ts +1 -1
- package/dist/hooks/useInputContainer.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts +3 -3
- package/dist/hooks/useMenuPress.d.ts +1 -1
- package/dist/hooks/usePressFeedback.d.ts +1 -1
- package/dist/hooks/useScrollableArea.d.ts +1 -1
- package/dist/i18n/InternationalizationContext.d.ts +2 -2
- package/dist/i18n/InternationalizationProvider.d.ts +1 -1
- package/dist/i18n/index.d.ts +12 -12
- package/dist/i18n/resolve.d.ts +1 -1
- package/dist/i18n/useLocale.d.ts +1 -1
- package/dist/index.d.ts +111 -111
- package/dist/theme/Theme.d.ts +2 -2
- package/dist/theme/contrast.d.ts +1 -1
- package/dist/theme/defineTheme.d.ts +12 -12
- package/dist/theme/domainTokens/index.d.ts +6 -6
- package/dist/theme/generateThemeRules.d.ts +1 -1
- package/dist/theme/index.d.ts +31 -31
- package/dist/theme/localTokens.d.ts +1 -1
- package/dist/theme/mergeComponents.d.ts +1 -1
- package/dist/theme/onMediaTokens.d.ts +1 -1
- package/dist/theme/resolveThemeValues.d.ts +7 -7
- package/dist/theme/syntax/SyntaxTheme.d.ts +1 -1
- package/dist/theme/syntax/index.d.ts +7 -7
- package/dist/theme/syntax/presets.d.ts +1 -1
- package/dist/theme/themeAdaptations.d.ts +5 -5
- package/dist/theme/themeRegistry.d.ts +1 -1
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/types.d.ts +1 -1
- package/dist/theme/useTheme.d.ts +2 -2
- package/dist/utils/dateParser.d.ts +3 -3
- package/dist/utils/groupItems.d.ts +1 -1
- package/dist/utils/index.d.ts +29 -29
- package/dist/utils/plainDate.d.ts +3 -3
- package/package.json +5 -5
- package/src/Badge/Badge.doc.mjs +2 -1
- package/src/BottomSheet/BottomSheet.tsx +12 -1
- package/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts +82 -0
- package/src/DateInput/DateInputTouch.test.tsx +9 -0
- package/src/DateInput/Wheel.tsx +4 -1
- package/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts +158 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +5 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.spec.md +226 -0
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +32 -16
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +158 -0
- package/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts +539 -0
- package/src/Field/inputDisabledFocus.ts +28 -0
- package/src/HoverCard/HoverCard.test.tsx +93 -3
- package/src/Icon/Icon.spec.md +40 -29
- package/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts +199 -0
- package/src/Layer/modalOutlet.ts +1 -1
- package/src/Layer/useTouchTrigger.ts +95 -41
- package/src/NumberInput/NumberInput.doc.mjs +6 -6
- package/src/NumberInput/NumberInput.test.tsx +144 -14
- package/src/NumberInput/NumberInput.tsx +68 -21
- package/src/Pagination/Pagination.test.tsx +2 -2
- package/src/SideNav/SideNav.test.tsx +15 -6
- package/src/SideNav/SideNavHeading.tsx +41 -0
- package/src/Skeleton/Skeleton.test.tsx +108 -1
- package/src/Skeleton/Skeleton.tsx +30 -2
- package/src/Stepper/Step.tsx +7 -0
- package/src/Stepper/Stepper.test.tsx +33 -0
- package/src/TextArea/TextArea.doc.mjs +6 -6
- package/src/TextArea/TextArea.test.tsx +65 -6
- package/src/TextArea/TextArea.tsx +26 -14
- package/src/TextInput/TextInput.doc.mjs +8 -8
- package/src/TextInput/TextInput.test.tsx +83 -10
- package/src/TextInput/TextInput.tsx +38 -19
- package/src/Toast/ToastViewport.modalHost.test.tsx +139 -4
- package/src/Tokenizer/Tokenizer.test.tsx +26 -8
- package/src/Tokenizer/Tokenizer.tsx +65 -72
- package/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts +471 -0
- package/src/Tokenizer/useEndLaneReserve.ts +3 -2
- package/src/Tooltip/Tooltip.test.tsx +148 -3
- package/src/Tooltip/__tests__/Tooltip.a11y.states.ts +2 -2
- package/src/VisuallyHidden/VisuallyHidden.doc.mjs +1 -1
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +39 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +38 -5
- package/src/theme/tokens.test.ts +60 -0
package/src/Icon/Icon.spec.md
CHANGED
|
@@ -27,7 +27,7 @@ architecture:
|
|
|
27
27
|
architecture:public-component-api,
|
|
28
28
|
]
|
|
29
29
|
contributing: []
|
|
30
|
-
system_specs: []
|
|
30
|
+
system_specs: [spec:AST-087]
|
|
31
31
|
---
|
|
32
32
|
|
|
33
33
|
# Icon component contract
|
|
@@ -53,6 +53,7 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
53
53
|
**Owns**
|
|
54
54
|
|
|
55
55
|
- Accepting a semantic icon key or a supplied icon component as the glyph source.
|
|
56
|
+
- Passing the resolved size and a variant the entry can receive to a registry entry.
|
|
56
57
|
- Resolving explicit, component-owned contextual, and standalone size defaults.
|
|
57
58
|
- Applying Icon's size, color, theming target, and accessibility semantics to
|
|
58
59
|
the rendered glyph.
|
|
@@ -71,12 +72,13 @@ Consumer migration instructions belong in consumer docs and release notes.
|
|
|
71
72
|
|
|
72
73
|
## Public concepts
|
|
73
74
|
|
|
74
|
-
| Concept | Closed values or states | Meaning
|
|
75
|
-
| ------------- | --------------------------------------------------------- |
|
|
76
|
-
| Glyph source | semantic key, namespaced extension key, or icon component | Selects the visual symbol.
|
|
77
|
-
| Size | `xsm`, `sm`, `md`, `lg` | Selects the icon box size.
|
|
78
|
-
| Color | documented semantic and palette values | Selects the glyph color or inherits it from context.
|
|
79
|
-
| Accessibility | decorative or meaningfully labelled | Controls whether assistive technology receives the glyph.
|
|
75
|
+
| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
|
|
76
|
+
| ------------- | --------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | ---------------- | --------- | --------------------------------------------------------------------------------- |
|
|
77
|
+
| Glyph source | semantic key, namespaced extension key, or icon component | Selects the visual symbol. | Every render | Required | `component:Icon` | Stable | TypeScript rejects unsupported built-in string values. |
|
|
78
|
+
| Size | `xsm`, `sm`, `md`, `lg` | Selects the icon box size. | Every rendered glyph | nearest component-owned default; otherwise `md` | `component:Icon` | Stable | TypeScript rejects unsupported values. |
|
|
79
|
+
| Color | documented semantic and palette values | Selects the glyph color or inherits it from context. | Every rendered glyph | `inherit` | `component:Icon` | Stable | TypeScript rejects unsupported values. |
|
|
80
|
+
| Accessibility | decorative or meaningfully labelled | Controls whether assistive technology receives the glyph. | Every rendered glyph | Decorative | `component:Icon` | Stable | Empty labels use the decorative behavior. |
|
|
81
|
+
| Variant | names in `IconVariantMap`; the active theme lists its own | Requests a theme's alternate artwork for a registry glyph. | Registry glyphs only; never a supplied component | None | `component:Icon` | Stable | TypeScript rejects unknown names; an unlisted variant renders the normal artwork. |
|
|
80
82
|
|
|
81
83
|
A namespaced key that does not resolve currently renders nothing. This is
|
|
82
84
|
existing behavior, not an intentional fallback promise.
|
|
@@ -86,13 +88,15 @@ existing behavior, not an intentional fallback promise.
|
|
|
86
88
|
Requirements identify their basis so observed code is not mistaken for an
|
|
87
89
|
intentional decision.
|
|
88
90
|
|
|
89
|
-
| ID | Candidate invariant
|
|
90
|
-
| --- |
|
|
91
|
-
| FR1 | Icon MUST present at most one glyph from the supplied semantic key, namespaced key, or icon component.
|
|
92
|
-
| FR2 | Every rendered glyph MUST carry the `icon` theming target with its resolved size and selected color reflected as target data.
|
|
93
|
-
| FR3 | Icon MUST apply the resolved size as width and height for every glyph, plus font size where needed for 1em-based icon sources. This sizing contract MUST NOT promise an HTML or SVG element type.
|
|
94
|
-
| FR4 | Supported SVG and styling escape hatches MUST retain their established merge and override behavior.
|
|
95
|
-
| FR5 | An explicit Icon `size` MUST win. Without one, Icon MUST use the nearest default supplied by an owning Astryx component for its documented icon slot; without such a default, Icon MUST use `md`.
|
|
91
|
+
| ID | Candidate invariant | Basis | Draft review state |
|
|
92
|
+
| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------- |
|
|
93
|
+
| FR1 | Icon MUST present at most one glyph from the supplied semantic key, namespaced key, or icon component. | Documented promise and current tests. | Settled intent. |
|
|
94
|
+
| FR2 | Every rendered glyph MUST carry the `icon` theming target with its resolved size and selected color reflected as target data. | Current source, docs, and theming tests. | Settled intent. |
|
|
95
|
+
| FR3 | Icon MUST apply the resolved size as width and height for every glyph, plus font size where needed for 1em-based icon sources. This sizing contract MUST NOT promise an HTML or SVG element type. | Human decision, current source, and tests. | Settled intent. |
|
|
96
|
+
| FR4 | Supported SVG and styling escape hatches MUST retain their established merge and override behavior. | Current source and regression tests. | Current compatibility behavior; verify before changing. |
|
|
97
|
+
| FR5 | An explicit Icon `size` MUST win. Without one, Icon MUST use the nearest default supplied by an owning Astryx component for its documented icon slot; without such a default, Icon MUST use `md`. | Component-size precedence and Button sizing decision. | Settled intent. |
|
|
98
|
+
| FR6 | In registry mode, Icon MUST pass `{size, variant}` to the selected entry, where `size` is the size resolved by ORD1 and `variant` is the requested variant when the active theme lists it and, for a theme-supplied entry, the theme that defined the entry lists it too, otherwise `undefined`. A supplied icon component MUST NOT receive `variant`, Icon MUST NOT forward `variant` to the DOM, and the `icon` target MUST NOT reflect it. | `spec:AST-087` FR1–FR5 and FR9. | Settled intent. |
|
|
99
|
+
| FR7 | The `icon` target MUST guarantee `width` and `height` on its `size:*` selectors as reviewed target-specific additions, so a theme sets each size's dimension. Without theme styles, sizes are 12, 16, 20, and 24px at a 16px root and scale with the root font size. | `spec:AST-087` FR10. | Settled intent. |
|
|
96
100
|
|
|
97
101
|
### Allowed variation
|
|
98
102
|
|
|
@@ -109,15 +113,18 @@ intentional decision.
|
|
|
109
113
|
|
|
110
114
|
### Representative states
|
|
111
115
|
|
|
112
|
-
| State | Required invariant
|
|
113
|
-
| -------------------------------- |
|
|
114
|
-
| Semantic key | One resolved glyph carries the `icon` target.
|
|
115
|
-
| Namespaced extension key | A resolved extension glyph carries the `icon` target.
|
|
116
|
-
| Supplied icon component | The supplied glyph carries the `icon` target.
|
|
117
|
-
| Standalone Icon without `size` | The resolved size is `md`.
|
|
118
|
-
| Owned icon slot without `size` | The nearest documented component default is used.
|
|
119
|
-
| Explicit Icon size in owned slot | The explicit Icon size wins over the contextual default.
|
|
120
|
-
| Unresolved namespaced key | No glyph is currently rendered.
|
|
116
|
+
| State | Required invariant | Allowed variation |
|
|
117
|
+
| -------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------- |
|
|
118
|
+
| Semantic key | One resolved glyph carries the `icon` target. | Theme, registry, or built-in artwork. |
|
|
119
|
+
| Namespaced extension key | A resolved extension glyph carries the `icon` target. | Consumer- or library-owned artwork. |
|
|
120
|
+
| Supplied icon component | The supplied glyph carries the `icon` target. | Component implementation and SVG internals. |
|
|
121
|
+
| Standalone Icon without `size` | The resolved size is `md`. | Glyph source and color. |
|
|
122
|
+
| Owned icon slot without `size` | The nearest documented component default is used. | The owning component's declared size mapping. |
|
|
123
|
+
| Explicit Icon size in owned slot | The explicit Icon size wins over the contextual default. | Any supported Icon size. |
|
|
124
|
+
| Unresolved namespaced key | No glyph is currently rendered. | No fallback behavior is established by intent. |
|
|
125
|
+
| Listed variant | The entry receives the size and the variant when its defining theme also lists it. | The theme's artwork for that request. |
|
|
126
|
+
| Unlisted or omitted variant | The entry receives `variant: undefined`. | The theme's normal artwork. |
|
|
127
|
+
| Variant on a supplied component | The component renders as given without `variant`. | Component implementation. |
|
|
121
128
|
|
|
122
129
|
### Transformation and precedence order
|
|
123
130
|
|
|
@@ -172,6 +179,8 @@ not promise a `span`, `svg`, or other element type.
|
|
|
172
179
|
rules for the `icon` target.
|
|
173
180
|
- `architecture:icon-resolution-and-component-slots` owns semantic-key and
|
|
174
181
|
component-slot resolution before Icon renders the selected source.
|
|
182
|
+
- `spec:AST-087` decides the `variant` request, theme-listed variant names, and
|
|
183
|
+
theme-set size dimensions.
|
|
175
184
|
- `architecture:public-component-api` owns admission and compatibility rules for
|
|
176
185
|
Icon's public props and observable defaults.
|
|
177
186
|
- The owning component or family specifies each contextual Icon-size mapping.
|
|
@@ -181,12 +190,14 @@ not promise a `span`, `svg`, or other element type.
|
|
|
181
190
|
|
|
182
191
|
## Verification map
|
|
183
192
|
|
|
184
|
-
| Contract | Verification | Representative states
|
|
185
|
-
| ------------------- | ------------------------------------------------------------------------------ |
|
|
186
|
-
| FR1, FR3, FR5 | `Icon.test.tsx` sizing suites and `IconButton.test.tsx` contextual-size suites | standalone default; Button sizes; explicit override; both modes
|
|
187
|
-
| FR2, FR4 | `Icon.test.tsx` target/styling suites plus source inspection | Both source modes; size and color variants
|
|
188
|
-
| AR1, AR2, AR3 | `Icon.test.tsx` accessible-name suites | Decorative, labelled, explicit ARIA override
|
|
189
|
-
|
|
|
193
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
194
|
+
| ------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
|
|
195
|
+
| FR1, FR3, FR5 | `Icon.test.tsx` sizing suites and `IconButton.test.tsx` contextual-size suites | standalone default; Button sizes; explicit override; both modes | Breaking source rendering, standalone fallback, contextual mapping, explicit precedence, or cross-mode sizing fails assertions. | `audit:Icon/behavior` |
|
|
196
|
+
| FR2, FR4 | `Icon.test.tsx` target/styling suites plus source inspection | Both source modes; size and color variants | Removing the target or breaking override composition fails existing assertions; `data-color` reflection currently lacks focused assertions. | `audit:Icon/theming` |
|
|
197
|
+
| AR1, AR2, AR3 | `Icon.test.tsx` accessible-name suites | Decorative, labelled, explicit ARIA override | Changing default or labelled semantics fails accessibility assertions. | `audit:Icon/accessibility` |
|
|
198
|
+
| FR6 | `Icon.test.tsx` variant suites (pending) | listed, unlisted, and omitted variant; no active list; inherited entry under a replaced list; supplied component | An unlisted variant, or one the entry's defining theme does not list, reaches an entry, or `variant` reaches a supplied component or the DOM. | `audit:Icon/behavior` |
|
|
199
|
+
| FR7 | Theme styling tests for each size (pending) | each size with and without theme styles | A themed size does not change the glyph dimension, or an unstyled size changes. | `audit:Icon/theming` |
|
|
200
|
+
| Theming anatomy map | `scripts/check-knowledge.mjs` | Canonical consumer anatomy and current target | Missing, extra, prefixed, or stale mappings fail repository validation. | `audit:Icon/theming` |
|
|
190
201
|
|
|
191
202
|
Focused coverage for `data-color` on both glyph source modes is a checkable test
|
|
192
203
|
gap; source inspection is the current evidence for that part of FR2.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file TouchTrigger.a11y.chromium.spec.ts
|
|
5
|
+
* @input The `Core/Tooltip` and `Core/HoverCard` Touch Triggers stories in a
|
|
6
|
+
* built Storybook, driven by real Chromium touch input (CDP) in a phone-sized
|
|
7
|
+
* viewport.
|
|
8
|
+
* @output Real-engine proof that a hover layer answers a touch only once it is
|
|
9
|
+
* a tap: it opens when the finger lifts, stays shut while a finger rests on
|
|
10
|
+
* the trigger, never opens for a touch that turns into a scroll, and a
|
|
11
|
+
* tap-opened layer closes when a tap outside lifts or a scroll starts
|
|
12
|
+
* outside.
|
|
13
|
+
* @position Run with `pnpm test:a11y-contract`. Only a real engine decides
|
|
14
|
+
* whether a touch is a tap, a scroll or a long press, so these outcomes
|
|
15
|
+
* cannot be shown in jsdom; the unit suites (Tooltip.test.tsx,
|
|
16
|
+
* HoverCard.test.tsx) cover the same rules on synthetic events.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
expect,
|
|
21
|
+
test,
|
|
22
|
+
type CDPSession,
|
|
23
|
+
type Locator,
|
|
24
|
+
type Page,
|
|
25
|
+
} from '@playwright/test';
|
|
26
|
+
import {
|
|
27
|
+
DEFAULT_STORYBOOK_DIR,
|
|
28
|
+
serveStorybook,
|
|
29
|
+
type StaticServer,
|
|
30
|
+
} from '@astryxdesign/a11y-spec/storybook';
|
|
31
|
+
|
|
32
|
+
let storybook: StaticServer;
|
|
33
|
+
test.beforeAll(async () => {
|
|
34
|
+
storybook = await serveStorybook(
|
|
35
|
+
process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR,
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
test.afterAll(async () => {
|
|
39
|
+
await storybook?.close();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test.use({hasTouch: true, isMobile: true, viewport: {width: 390, height: 844}});
|
|
43
|
+
|
|
44
|
+
interface Finger {
|
|
45
|
+
down(x: number, y: number): Promise<void>;
|
|
46
|
+
move(x: number, y: number): Promise<void>;
|
|
47
|
+
up(): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function openStory(page: Page, id: string): Promise<Finger> {
|
|
51
|
+
await page.goto(`${storybook.origin}/iframe.html?id=${id}&viewMode=story`);
|
|
52
|
+
// Room to scroll, so a drag is a page scroll the browser takes from us.
|
|
53
|
+
await page.evaluate(() => {
|
|
54
|
+
const spacer = document.createElement('div');
|
|
55
|
+
spacer.style.height = '2000px';
|
|
56
|
+
document.body.append(spacer);
|
|
57
|
+
});
|
|
58
|
+
const cdp: CDPSession = await page.context().newCDPSession(page);
|
|
59
|
+
return {
|
|
60
|
+
down: async (x, y) => {
|
|
61
|
+
await cdp.send('Input.dispatchTouchEvent', {
|
|
62
|
+
type: 'touchStart',
|
|
63
|
+
touchPoints: [{x, y}],
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
move: async (x, y) => {
|
|
67
|
+
await cdp.send('Input.dispatchTouchEvent', {
|
|
68
|
+
type: 'touchMove',
|
|
69
|
+
touchPoints: [{x, y}],
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
up: async () => {
|
|
73
|
+
await cdp.send('Input.dispatchTouchEvent', {
|
|
74
|
+
type: 'touchEnd',
|
|
75
|
+
touchPoints: [],
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async function centerOf(target: Locator): Promise<[number, number]> {
|
|
82
|
+
const box = await target.boundingBox();
|
|
83
|
+
if (box == null) {
|
|
84
|
+
throw new Error('the trigger has no layout box');
|
|
85
|
+
}
|
|
86
|
+
return [
|
|
87
|
+
Math.round(box.x + box.width / 2),
|
|
88
|
+
Math.round(box.y + box.height / 2),
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** A blank point of the page, away from every trigger. */
|
|
93
|
+
const OUTSIDE: [number, number] = [360, 700];
|
|
94
|
+
|
|
95
|
+
const cases = [
|
|
96
|
+
{
|
|
97
|
+
name: 'Tooltip',
|
|
98
|
+
story: 'core-tooltip--touch-triggers',
|
|
99
|
+
trigger: (page: Page) => page.getByText('hover-able term', {exact: true}),
|
|
100
|
+
action: (page: Page) => page.getByRole('button', {name: 'Save'}),
|
|
101
|
+
layer: '.astryx-tooltip:popover-open',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'HoverCard',
|
|
105
|
+
story: 'core-hovercard--touch-triggers',
|
|
106
|
+
trigger: (page: Page) => page.getByText('Jane Doe', {exact: true}),
|
|
107
|
+
action: (page: Page) => page.getByRole('button', {name: 'Open profile'}),
|
|
108
|
+
layer: '.astryx-hover-card:popover-open',
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
for (const {name, story, trigger, action, layer} of cases) {
|
|
113
|
+
test.describe(`${name} under a finger`, () => {
|
|
114
|
+
test('opens when the tap lifts, not when the finger lands', async ({
|
|
115
|
+
page,
|
|
116
|
+
}) => {
|
|
117
|
+
const finger = await openStory(page, story);
|
|
118
|
+
const [x, y] = await centerOf(trigger(page));
|
|
119
|
+
await finger.down(x, y);
|
|
120
|
+
await page.waitForTimeout(150);
|
|
121
|
+
// The finger is still down: it may yet be starting a scroll.
|
|
122
|
+
await expect(page.locator(layer)).toHaveCount(0);
|
|
123
|
+
await finger.up();
|
|
124
|
+
await expect(page.locator(layer)).toHaveCount(1);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
test('never opens for a touch that turns into a scroll', async ({page}) => {
|
|
128
|
+
const finger = await openStory(page, story);
|
|
129
|
+
const [x, y] = await centerOf(trigger(page));
|
|
130
|
+
await finger.down(x, y);
|
|
131
|
+
for (let step = 1; step <= 8; step += 1) {
|
|
132
|
+
await finger.move(x, y - step * 10);
|
|
133
|
+
await page.waitForTimeout(16);
|
|
134
|
+
}
|
|
135
|
+
await finger.up();
|
|
136
|
+
await page.waitForTimeout(300);
|
|
137
|
+
await expect(page.locator(layer)).toHaveCount(0);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
test('stays shut while a finger rests on the trigger', async ({page}) => {
|
|
141
|
+
const finger = await openStory(page, story);
|
|
142
|
+
const [x, y] = await centerOf(trigger(page));
|
|
143
|
+
await finger.down(x, y);
|
|
144
|
+
await page.waitForTimeout(900);
|
|
145
|
+
// Nothing is decided until the finger lifts; whether a long hold still
|
|
146
|
+
// counts as a tap then is the engine's call (UIKit's own tap allows a
|
|
147
|
+
// hold of up to 1.5 s).
|
|
148
|
+
await expect(page.locator(layer)).toHaveCount(0);
|
|
149
|
+
await finger.up();
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
test('closes when a tap outside lifts, not when it lands', async ({
|
|
153
|
+
page,
|
|
154
|
+
}) => {
|
|
155
|
+
const finger = await openStory(page, story);
|
|
156
|
+
const [x, y] = await centerOf(trigger(page));
|
|
157
|
+
await finger.down(x, y);
|
|
158
|
+
await finger.up();
|
|
159
|
+
await expect(page.locator(layer)).toHaveCount(1);
|
|
160
|
+
|
|
161
|
+
await finger.down(...OUTSIDE);
|
|
162
|
+
await page.waitForTimeout(150);
|
|
163
|
+
await expect(page.locator(layer)).toHaveCount(1);
|
|
164
|
+
await finger.up();
|
|
165
|
+
await expect(page.locator(layer)).toHaveCount(0);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
test('closes as soon as a scroll that starts outside takes the touch', async ({
|
|
169
|
+
page,
|
|
170
|
+
}) => {
|
|
171
|
+
const finger = await openStory(page, story);
|
|
172
|
+
const [x, y] = await centerOf(trigger(page));
|
|
173
|
+
await finger.down(x, y);
|
|
174
|
+
await finger.up();
|
|
175
|
+
await expect(page.locator(layer)).toHaveCount(1);
|
|
176
|
+
|
|
177
|
+
const [ox, oy] = OUTSIDE;
|
|
178
|
+
await finger.down(ox, oy);
|
|
179
|
+
for (let step = 1; step <= 8; step += 1) {
|
|
180
|
+
await finger.move(ox, oy - step * 10);
|
|
181
|
+
await page.waitForTimeout(16);
|
|
182
|
+
}
|
|
183
|
+
// Still down: the scroll took the touch, which is the dismissal.
|
|
184
|
+
await expect(page.locator(layer)).toHaveCount(0);
|
|
185
|
+
await finger.up();
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
test('leaves a tap on a trigger that acts to that trigger', async ({
|
|
189
|
+
page,
|
|
190
|
+
}) => {
|
|
191
|
+
const finger = await openStory(page, story);
|
|
192
|
+
const [x, y] = await centerOf(action(page));
|
|
193
|
+
await finger.down(x, y);
|
|
194
|
+
await finger.up();
|
|
195
|
+
await page.waitForTimeout(300);
|
|
196
|
+
await expect(page.locator(layer)).toHaveCount(0);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
}
|
package/src/Layer/modalOutlet.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file modalOutlet.ts
|
|
7
|
-
* @input The open Dialog `<dialog>` elements
|
|
7
|
+
* @input The open Dialog and scrim BottomSheet `<dialog>` elements
|
|
8
8
|
* @output Exports useModalOutlet (a modal supplies its outlet),
|
|
9
9
|
* getActiveModalOutlet, and subscribeModalOutlets (a global host follows
|
|
10
10
|
* the latest one)
|
|
@@ -24,9 +24,21 @@
|
|
|
24
24
|
* lose, so the tap opens the layer and the next tap outside dismisses it. That
|
|
25
25
|
* is `auto`; `tap` and `none` state the choice outright, which is what an
|
|
26
26
|
* icon-button whose only job is to reveal the layer needs.
|
|
27
|
+
*
|
|
28
|
+
* A touch decides nothing until it is a tap. A finger landing on the trigger
|
|
29
|
+
* may be starting a scroll, a pinch or a long press, and only the browser
|
|
30
|
+
* knows which once the finger moves or lifts. Its `click` is that verdict (on
|
|
31
|
+
* iOS it comes from UIKit's own tap recognizer), so the press only records
|
|
32
|
+
* itself and the tap's `click` opens or closes the layer; a press the browser
|
|
33
|
+
* takes for scrolling ends in `pointercancel` and never gets there. That is
|
|
34
|
+
* how a UIKit tap behaves: it recognizes when the finger lifts and fails once
|
|
35
|
+
* the scroll view claims the touch. The tap outside that closes a tap-opened
|
|
36
|
+
* layer counts when the finger lifts too, or when a scroll takes the touch,
|
|
37
|
+
* which is when UIKit dismisses a popover.
|
|
27
38
|
*/
|
|
28
39
|
|
|
29
40
|
import {useCallback, useEffect, useRef, type RefObject} from 'react';
|
|
41
|
+
import {currentGesture} from './gestureCounter';
|
|
30
42
|
import {
|
|
31
43
|
getInteractionModality,
|
|
32
44
|
useInteractionModalityTracking,
|
|
@@ -175,7 +187,9 @@ export interface UseTouchTriggerReturn {
|
|
|
175
187
|
/**
|
|
176
188
|
* Attach to the trigger. Returns true when the press was a touch one and
|
|
177
189
|
* this hook has dealt with it, meaning the caller's own pointer-down
|
|
178
|
-
* behavior must not also run.
|
|
190
|
+
* behavior must not also run. A touch press opens or closes nothing by
|
|
191
|
+
* itself: the hook waits for that press's tap (the `click` the browser
|
|
192
|
+
* fires when the finger lifts without scrolling) on the same element.
|
|
179
193
|
*/
|
|
180
194
|
handlePointerDown: (event: PointerEvent) => boolean;
|
|
181
195
|
|
|
@@ -234,6 +248,9 @@ export function useTouchTrigger(
|
|
|
234
248
|
const outsideListenerRef = useRef<((event: PointerEvent) => void) | null>(
|
|
235
249
|
null,
|
|
236
250
|
);
|
|
251
|
+
// A touch press on the trigger still waiting for its tap: calling it stops
|
|
252
|
+
// waiting. The next press, a cancel, the tap itself or unmounting calls it.
|
|
253
|
+
const forgetPendingTapRef = useRef<(() => void) | null>(null);
|
|
237
254
|
|
|
238
255
|
useInteractionModalityTracking();
|
|
239
256
|
|
|
@@ -244,23 +261,30 @@ export function useTouchTrigger(
|
|
|
244
261
|
return;
|
|
245
262
|
}
|
|
246
263
|
outsideListenerRef.current = null;
|
|
247
|
-
document.removeEventListener('
|
|
264
|
+
document.removeEventListener('pointerup', listener, true);
|
|
265
|
+
document.removeEventListener('pointercancel', listener, true);
|
|
248
266
|
}, []);
|
|
249
267
|
|
|
250
268
|
// Capture phase, so a trigger that stops propagation cannot strand an open
|
|
251
|
-
// layer.
|
|
252
|
-
//
|
|
269
|
+
// layer. It is armed by the opening tap's `click`, after that tap's own
|
|
270
|
+
// `pointerup`, so the listener never sees the tap that opened the layer.
|
|
271
|
+
// A tap outside counts when it lifts (`pointerup`); a scroll or pinch that
|
|
272
|
+
// starts outside counts as soon as the browser takes it (`pointercancel`).
|
|
253
273
|
const armOutsideDismiss = useCallback(() => {
|
|
254
274
|
isTapOpenRef.current = true;
|
|
255
275
|
if (outsideListenerRef.current != null) {
|
|
256
276
|
return;
|
|
257
277
|
}
|
|
258
278
|
|
|
259
|
-
const
|
|
279
|
+
const handleOutsidePointerEnd = (event: PointerEvent) => {
|
|
260
280
|
const target = event.target as Node | null;
|
|
261
281
|
if (target != null) {
|
|
262
|
-
//
|
|
263
|
-
|
|
282
|
+
// A tap on the trigger is the trigger's to toggle. A scroll that
|
|
283
|
+
// starts there is a scroll outside the layer, and it does close it.
|
|
284
|
+
if (
|
|
285
|
+
event.type === 'pointerup' &&
|
|
286
|
+
triggerRef.current?.contains(target) === true
|
|
287
|
+
) {
|
|
264
288
|
return;
|
|
265
289
|
}
|
|
266
290
|
// Hover card content is interactive; a tap inside it is not a dismiss.
|
|
@@ -274,11 +298,13 @@ export function useTouchTrigger(
|
|
|
274
298
|
hideRef.current();
|
|
275
299
|
};
|
|
276
300
|
|
|
277
|
-
outsideListenerRef.current =
|
|
278
|
-
document.addEventListener('
|
|
301
|
+
outsideListenerRef.current = handleOutsidePointerEnd;
|
|
302
|
+
document.addEventListener('pointerup', handleOutsidePointerEnd, true);
|
|
303
|
+
document.addEventListener('pointercancel', handleOutsidePointerEnd, true);
|
|
279
304
|
}, [triggerRef, disarmOutsideDismiss]);
|
|
280
305
|
|
|
281
306
|
useEffect(() => disarmOutsideDismiss, [disarmOutsideDismiss]);
|
|
307
|
+
useEffect(() => () => forgetPendingTapRef.current?.(), []);
|
|
282
308
|
|
|
283
309
|
const isTouchInteraction = useCallback(
|
|
284
310
|
() => isTouchPointerRef.current && getInteractionModality() === 'pointer',
|
|
@@ -293,52 +319,80 @@ export function useTouchTrigger(
|
|
|
293
319
|
isTouchPointerRef.current = event.pointerType === 'touch';
|
|
294
320
|
}, []);
|
|
295
321
|
|
|
322
|
+
// What a tap on the trigger does. It runs from the tap's `click`, after the
|
|
323
|
+
// render that armed it, so it reads the latest props through this ref.
|
|
324
|
+
const answerTapRef = useRef<() => void>(() => {});
|
|
325
|
+
answerTapRef.current = () => {
|
|
326
|
+
const trigger = triggerRef.current;
|
|
327
|
+
const mode =
|
|
328
|
+
touchTrigger === 'auto'
|
|
329
|
+
? trigger != null && isActionTrigger(trigger)
|
|
330
|
+
? 'none'
|
|
331
|
+
: 'tap'
|
|
332
|
+
: touchTrigger;
|
|
333
|
+
|
|
334
|
+
if (mode === 'none' || !isEnabled) {
|
|
335
|
+
// A layer left open by an earlier tap must not survive the next one.
|
|
336
|
+
disarmOutsideDismiss();
|
|
337
|
+
hide();
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// A lazily mounted layer reports `isOpen` a tick after `show()`, so the
|
|
342
|
+
// tap's own bookkeeping is what makes the second tap a close.
|
|
343
|
+
if (isOpenRef.current || isTapOpenRef.current) {
|
|
344
|
+
disarmOutsideDismiss();
|
|
345
|
+
hide();
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
armOutsideDismiss();
|
|
350
|
+
show();
|
|
351
|
+
};
|
|
352
|
+
|
|
296
353
|
const handlePointerDown = useCallback(
|
|
297
354
|
(event: PointerEvent): boolean => {
|
|
298
355
|
const isTouch = TOUCH_POINTER_TYPES.has(event.pointerType);
|
|
299
356
|
isTouchPointerRef.current = isTouch;
|
|
357
|
+
// A new press replaces one that never became a tap.
|
|
358
|
+
forgetPendingTapRef.current?.();
|
|
300
359
|
|
|
301
360
|
if (!isTouch || isControlled) {
|
|
302
361
|
return false;
|
|
303
362
|
}
|
|
304
363
|
|
|
305
|
-
const trigger =
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
: 'tap'
|
|
311
|
-
: touchTrigger;
|
|
312
|
-
|
|
313
|
-
if (mode === 'none' || !isEnabled) {
|
|
314
|
-
// A layer left open by an earlier tap must not survive the next one.
|
|
315
|
-
disarmOutsideDismiss();
|
|
316
|
-
hide();
|
|
364
|
+
const trigger =
|
|
365
|
+
event.currentTarget instanceof Element
|
|
366
|
+
? event.currentTarget
|
|
367
|
+
: triggerRef.current;
|
|
368
|
+
if (trigger == null) {
|
|
317
369
|
return true;
|
|
318
370
|
}
|
|
319
371
|
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
372
|
+
// The tap must belong to this press. A key press or a new pointer press
|
|
373
|
+
// advances the gesture, so a keyboard activation that later fires
|
|
374
|
+
// `click` on the trigger (Enter on a button) is not mistaken for it.
|
|
375
|
+
const gesture = currentGesture();
|
|
376
|
+
const forget = () => {
|
|
377
|
+
trigger.removeEventListener('click', handleTap);
|
|
378
|
+
trigger.removeEventListener('pointercancel', forget);
|
|
379
|
+
if (forgetPendingTapRef.current === forget) {
|
|
380
|
+
forgetPendingTapRef.current = null;
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
const handleTap = () => {
|
|
384
|
+
forget();
|
|
385
|
+
if (currentGesture() === gesture) {
|
|
386
|
+
answerTapRef.current();
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
trigger.addEventListener('click', handleTap);
|
|
390
|
+
// The browser took the touch for a scroll or a pinch: no tap is coming.
|
|
391
|
+
trigger.addEventListener('pointercancel', forget);
|
|
392
|
+
forgetPendingTapRef.current = forget;
|
|
330
393
|
return true;
|
|
331
394
|
},
|
|
332
|
-
[
|
|
333
|
-
touchTrigger,
|
|
334
|
-
isEnabled,
|
|
335
|
-
isControlled,
|
|
336
|
-
triggerRef,
|
|
337
|
-
show,
|
|
338
|
-
hide,
|
|
339
|
-
armOutsideDismiss,
|
|
340
|
-
disarmOutsideDismiss,
|
|
341
|
-
],
|
|
395
|
+
[isControlled, triggerRef],
|
|
342
396
|
);
|
|
343
397
|
|
|
344
398
|
// A layer closed by any other path (Escape, a consumer, the browser) leaves
|
|
@@ -81,7 +81,7 @@ export const docs = {
|
|
|
81
81
|
name: 'isReadOnly',
|
|
82
82
|
type: 'boolean',
|
|
83
83
|
description:
|
|
84
|
-
'Makes the input read-only: the value is shown at full opacity and still submits with the form, but cannot be edited. Unlike isDisabled, a read-only input is not dimmed and
|
|
84
|
+
'Makes the input read-only: the value is shown at full opacity and still submits with the form, but cannot be edited. Unlike isDisabled, a read-only input is not dimmed and keeps its form value. Stepping is off in every form while read-only: arrow keys, the wheel, and the number steppers. isDisabled takes precedence when both are set.',
|
|
85
85
|
default: 'false',
|
|
86
86
|
},
|
|
87
87
|
{
|
|
@@ -308,7 +308,7 @@ export const docs = {
|
|
|
308
308
|
{
|
|
309
309
|
guidance: false,
|
|
310
310
|
description:
|
|
311
|
-
"Wrap a disabled NumberInput in Tooltip to explain why it's disabled
|
|
311
|
+
"Wrap a disabled NumberInput in Tooltip to explain why it's disabled. Use the disabledMessage prop, which attaches the reason to the field itself.",
|
|
312
312
|
},
|
|
313
313
|
],
|
|
314
314
|
anatomy: [
|
|
@@ -401,7 +401,7 @@ export const docsZh = {
|
|
|
401
401
|
name: 'isReadOnly',
|
|
402
402
|
type: 'boolean',
|
|
403
403
|
description:
|
|
404
|
-
'将输入框设为只读:值以完整不透明度显示并仍随表单提交,但无法编辑。与 isDisabled
|
|
404
|
+
'将输入框设为只读:值以完整不透明度显示并仍随表单提交,但无法编辑。与 isDisabled 不同,只读输入框不会变暗,并保留其表单值。只读时所有步进方式均被禁用:方向键、滚轮和步进按钮。同时设置时 isDisabled 优先。',
|
|
405
405
|
default: 'false',
|
|
406
406
|
},
|
|
407
407
|
{
|
|
@@ -613,7 +613,7 @@ export const docsZh = {
|
|
|
613
613
|
{
|
|
614
614
|
guidance: false,
|
|
615
615
|
description:
|
|
616
|
-
"Wrap a disabled NumberInput in Tooltip to explain why it's disabled
|
|
616
|
+
"Wrap a disabled NumberInput in Tooltip to explain why it's disabled. Use the disabledMessage prop, which attaches the reason to the field itself.",
|
|
617
617
|
},
|
|
618
618
|
],
|
|
619
619
|
anatomy: [
|
|
@@ -687,7 +687,7 @@ export const docsDense = {
|
|
|
687
687
|
{
|
|
688
688
|
guidance: false,
|
|
689
689
|
description:
|
|
690
|
-
"Wrap a disabled NumberInput in Tooltip to explain why it's disabled
|
|
690
|
+
"Wrap a disabled NumberInput in Tooltip to explain why it's disabled. Use the disabledMessage prop, which attaches the reason to the field itself.",
|
|
691
691
|
},
|
|
692
692
|
],
|
|
693
693
|
anatomy: [
|
|
@@ -737,7 +737,7 @@ export const docsDense = {
|
|
|
737
737
|
isRequired: 'Field required (mutually exclusive w/ isOptional).',
|
|
738
738
|
isDisabled: 'Input disabled.',
|
|
739
739
|
isReadOnly:
|
|
740
|
-
'Read-only: value visible + still submits, but not editable. Unlike isDisabled: not dimmed
|
|
740
|
+
'Read-only: value visible + still submits, but not editable. Unlike isDisabled: not dimmed.',
|
|
741
741
|
disabledMessage:
|
|
742
742
|
'Explains why input is disabled. With isDisabled, shows tooltip on hover/focus + keeps input focusable via aria-disabled (field becomes read-only). Use instead of wrapping a disabled NumberInput in Tooltip.',
|
|
743
743
|
placeholder: 'Placeholder text.',
|