@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
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 3
|
|
3
|
+
template_version: 7
|
|
4
|
+
kind: component
|
|
5
|
+
id: component:DropdownMenuRadioItem
|
|
6
|
+
authority: draft
|
|
7
|
+
archive_reason: null
|
|
8
|
+
superseded_by: null
|
|
9
|
+
approved_by: null
|
|
10
|
+
approved_at: null
|
|
11
|
+
owners: [cixzhang]
|
|
12
|
+
review_triggers: [public-api, behavior, accessibility, theming, testing]
|
|
13
|
+
verified_by:
|
|
14
|
+
[
|
|
15
|
+
packages/core/src/DropdownMenu/DropdownMenuSelectable.test.tsx,
|
|
16
|
+
packages/core/src/DropdownMenu/__tests__/Menu.a11y.test.tsx,
|
|
17
|
+
packages/core/src/RadioList/__tests__/RadioGroup.a11y.test.tsx,
|
|
18
|
+
packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts,
|
|
19
|
+
apps/storybook/stories/DropdownMenuRadioItem.stories.tsx,
|
|
20
|
+
apps/storybook/rtl-audit/verified-not-applicable.json,
|
|
21
|
+
scripts/check-knowledge.mjs,
|
|
22
|
+
]
|
|
23
|
+
modules: []
|
|
24
|
+
families: []
|
|
25
|
+
design_specs: []
|
|
26
|
+
architecture:
|
|
27
|
+
[
|
|
28
|
+
architecture:public-component-api,
|
|
29
|
+
architecture:component-theming-surface,
|
|
30
|
+
architecture:component-test-sufficiency,
|
|
31
|
+
architecture:interaction-modality,
|
|
32
|
+
]
|
|
33
|
+
contributing: []
|
|
34
|
+
system_specs: [spec:AST-020, spec:AST-029]
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# DropdownMenuRadioItem component contract
|
|
38
|
+
|
|
39
|
+
## Contract at a glance
|
|
40
|
+
|
|
41
|
+
| Area | Contract |
|
|
42
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| Public contract | One `menuitemradio` row inside a DropdownMenuRadioGroup with a required value and label, optional description, icon, end content, disabled state, root inputs, and an explicit React 19 ref. |
|
|
44
|
+
| Behavior | Enabled activation emits the row value through the group, applies the group close policy, then runs the caller click handler; disabled activation does none of these. |
|
|
45
|
+
| End-user impact | Assistive technology hears one radio option with its checked state; pointer and keyboard selection commit the same value, and a disabled option cannot be chosen. |
|
|
46
|
+
| Builder impact | Place the row inside a DropdownMenuRadioGroup and give it a unique value and a label; caller handlers run alongside the row's own behavior. |
|
|
47
|
+
| Compatibility/readiness | Released subcomponent; observational draft of current behavior. Authority stays `draft` until owner approval. |
|
|
48
|
+
| Review checks | Reject a nested semantic radio, a second keyboard owner, local selection state, a dropped caller input, or disabled activation that selects, closes, or calls the caller click handler. |
|
|
49
|
+
| Governing rules | WAI-ARIA menu pattern; `architecture:public-component-api/INV5–INV8`; `architecture:component-theming-surface/INV4–INV6`; `spec:AST-020/FR1,FR2`. |
|
|
50
|
+
|
|
51
|
+
This table is a review projection; the body below is authoritative.
|
|
52
|
+
|
|
53
|
+
## Intent
|
|
54
|
+
|
|
55
|
+
DropdownMenuRadioItem renders one selectable option of a single-choice group in
|
|
56
|
+
the pointer presentation of DropdownMenu. The row owns its `menuitemradio`
|
|
57
|
+
semantics, checked state, decorative radio marker, visible content, disabled
|
|
58
|
+
paint, and activation order. DropdownMenuRadioGroup owns the controlled value
|
|
59
|
+
and close policy; DropdownMenu owns focus movement, typeahead, keyboard
|
|
60
|
+
activation, and the menu lifecycle.
|
|
61
|
+
|
|
62
|
+
## Compatibility and migration
|
|
63
|
+
|
|
64
|
+
- Released default preserved: yes (`isDisabled=false`).
|
|
65
|
+
- Compatibility class: no public API change; caller `onClick` and
|
|
66
|
+
`onPointerMove` compose with the row's own behavior.
|
|
67
|
+
- Controlled behavior: the checked state always derives from the group `value`;
|
|
68
|
+
the row holds no selection state.
|
|
69
|
+
- Migration decision: none.
|
|
70
|
+
|
|
71
|
+
Consumer migration instructions belong in consumer docs and release notes.
|
|
72
|
+
|
|
73
|
+
## Ownership boundary
|
|
74
|
+
|
|
75
|
+
**Owns**
|
|
76
|
+
|
|
77
|
+
- One row root with `role="menuitemradio"` and `aria-checked` derived from the
|
|
78
|
+
group value.
|
|
79
|
+
- Selection order: disabled guard, group `onChange(value)`, optional close, then
|
|
80
|
+
the caller click handler.
|
|
81
|
+
- The decorative shared radio marker, its size, and its inline placement.
|
|
82
|
+
- Label, description, icon, and end content composition through Item.
|
|
83
|
+
- Disabled state exposure and paint, and hover focus for enabled rows.
|
|
84
|
+
- Root composition of ref, supported host inputs, `className`, `style`, and
|
|
85
|
+
`xstyle`.
|
|
86
|
+
|
|
87
|
+
**Does not own / non-goals**
|
|
88
|
+
|
|
89
|
+
- The selected value, change callback, and close policy — owned by
|
|
90
|
+
`component:DropdownMenuRadioGroup`.
|
|
91
|
+
- Focus entry, arrow-key navigation, typeahead, Enter/Space click synthesis,
|
|
92
|
+
press gestures, and closing — owned by `component:DropdownMenu`.
|
|
93
|
+
- Touch bottom-sheet rendering of selectable rows — owned by the parent
|
|
94
|
+
presentation.
|
|
95
|
+
- The radio marker's paint — owned by the shared radio Indicator.
|
|
96
|
+
|
|
97
|
+
## Public concepts
|
|
98
|
+
|
|
99
|
+
| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
|
|
100
|
+
| ------------ | ---------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------- | -------- | --------------------------------- | --------- | -------------------------------------------------------- |
|
|
101
|
+
| Option value | any string | The value the group emits and compares to decide the checked row. | Every row | required | `component:DropdownMenuRadioItem` | stable | A value no group value matches leaves the row unchecked. |
|
|
102
|
+
| Checked | checked; unchecked | Whether the group value equals this row's value. | Every row | derived | group context and row | stable | No local override exists. |
|
|
103
|
+
| Availability | enabled; disabled | Whether the row can take hover focus and commit its value. | Every row | enabled | `component:DropdownMenuRadioItem` | stable | Disabled blocks every activation path. |
|
|
104
|
+
| Content | label; description; icon; end content | Visible identification of the option, in reading order. | Every row | label | row through Item | stable | `label` is required by the public type. |
|
|
105
|
+
| Root surface | ref; DOM/data/ARIA; class/style/xstyle; events | Extends the row root while preserving its role and checked state. | Every row | omitted | public component API | stable | `role`, `aria-checked`, and `tabIndex` are not accepted. |
|
|
106
|
+
|
|
107
|
+
## Behavioral and layout contract
|
|
108
|
+
|
|
109
|
+
Draft requirements identify their basis so observed code is not mistaken for an
|
|
110
|
+
intentional decision.
|
|
111
|
+
|
|
112
|
+
| ID | Candidate invariant | Basis | Draft review state |
|
|
113
|
+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------ |
|
|
114
|
+
| FR1 | The row MUST render one element with `role="menuitemradio"` whose `aria-checked` is true exactly when the group value equals the row value. It MUST NOT nest a native or ARIA radio. | WAI-ARIA menu pattern; current source and focused tests | verify |
|
|
115
|
+
| FR2 | Rendering the row outside a DropdownMenuRadioGroup MUST throw. | Current source and focused tests | verify |
|
|
116
|
+
| FR3 | Enabled activation, by pointer or by the parent's synthesized Enter/Space click, MUST call the group `onChange` with the row value, then ask DropdownMenu to close when the group's close policy is on, then call the caller `onClick`. | Released behavior; `architecture:public-component-api/INV7`; focused tests | verify |
|
|
117
|
+
| FR4 | A disabled row MUST expose `aria-disabled="true"`, render no `tabindex`, take no hover focus, and on any activation, including an assistive-technology click, MUST NOT call `onChange`, close the menu, or call the caller `onClick`. It paints at half opacity with a default cursor. | Current source, focused tests, and browser evidence | verify |
|
|
118
|
+
| FR5 | Ref, supported host attributes and handlers, `className`, `style`, and `xstyle` MUST reach or compose on the row root. Caller `onPointerMove` MUST run after the row's hover focus, and caller handlers MUST NOT replace the row's own behavior. | `architecture:public-component-api/INV5–INV8`; focused tests | verify |
|
|
119
|
+
| FR6 | The marker MUST be the shared radio Indicator, hidden from assistive technology, never the pointer target, sized `sm` in a small menu and `md` otherwise, at the row's inline start on a fine pointer and its inline end on a coarse pointer. | Current source, focused tests, and browser evidence | verify |
|
|
120
|
+
| FR7 | The row MUST carry the `dropdown-menu-item` target with the menu size and the marker MUST carry the `dropdown-menu-radio` target with size, checked, and disabled reflections. | `architecture:component-theming-surface/INV4–INV6`; current source/docs | verify |
|
|
121
|
+
| FR8 | The row MUST add no key handler or tab stop of its own: enabled rows are `tabindex="-1"` for the parent's roving focus, and keyboard selection arrives as the parent's synthesized click. | `architecture:interaction-modality`; parent keyboard tests | verify |
|
|
122
|
+
|
|
123
|
+
### Allowed variation
|
|
124
|
+
|
|
125
|
+
- **AV1 — Content.** Label, description, icon, and end content may vary in
|
|
126
|
+
length and kind; long string labels truncate on one line.
|
|
127
|
+
- **AV2 — Size.** The marker follows the parent menu size: `sm` in a small
|
|
128
|
+
menu, `md` otherwise. Row padding does not currently vary with the menu size,
|
|
129
|
+
unlike action rows; this is an observation, not an invariant.
|
|
130
|
+
- **AV3 — Root styling.** Caller style inputs may extend the row while its role,
|
|
131
|
+
checked state, and marker remain intact.
|
|
132
|
+
|
|
133
|
+
### Representative states
|
|
134
|
+
|
|
135
|
+
| State | Required invariant | Allowed variation |
|
|
136
|
+
| -------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
137
|
+
| Checked | `aria-checked=true`; the marker shows its checked dot. | Content, size, theme, and mode. |
|
|
138
|
+
| Unchecked | `aria-checked=false`; the marker shows an empty circle. | Content, size, theme, and mode. |
|
|
139
|
+
| Focused | The row holds focus. | Pointer hover or keyboard arrival; focus paint is the AR4 gap. |
|
|
140
|
+
| Disabled | `aria-disabled=true`, no tab stop, half opacity, and no activation. | Checked or unchecked value. |
|
|
141
|
+
| Coarse pointer | The marker sits at the inline end of the row. | Direction mirrors the placement. |
|
|
142
|
+
| RTL / narrow | Content and marker follow logical order with no horizontal page overflow. | Parent menu placement and width. |
|
|
143
|
+
|
|
144
|
+
### Transformation and precedence order
|
|
145
|
+
|
|
146
|
+
- **ORD1 — Activation.** Disabled guard → group `onChange(value)` → close when
|
|
147
|
+
the group's close policy is on → caller `onClick`.
|
|
148
|
+
- **ORD2 — Pointer move.** Hover focus for an enabled row → caller
|
|
149
|
+
`onPointerMove`.
|
|
150
|
+
- **ORD3 — Root composition.** Base row styles → disabled paint → caller
|
|
151
|
+
`xstyle`; caller `className` and `style` merge with the row target.
|
|
152
|
+
|
|
153
|
+
### Performance and resources
|
|
154
|
+
|
|
155
|
+
- **PR1 — Render only.** The row owns no Effect, listener, observer, timer,
|
|
156
|
+
request, or local state.
|
|
157
|
+
|
|
158
|
+
## Accessibility contract
|
|
159
|
+
|
|
160
|
+
- **AR1 — One radio option.** The row is the only announced control; its
|
|
161
|
+
accessible name comes from its visible content and its state from
|
|
162
|
+
`aria-checked`.
|
|
163
|
+
- **AR2 — Disabled state.** A disabled row exposes `aria-disabled` and cannot
|
|
164
|
+
commit a value through any input.
|
|
165
|
+
- **AR3 — Keyboard ownership.** DropdownMenu owns focus movement and activation;
|
|
166
|
+
the row adds no key handling. Whether disabled rows stay keyboard-discoverable
|
|
167
|
+
is owned by `component:DropdownMenu` (its OQ1).
|
|
168
|
+
- **AR4 — Focus visibility (objective gap).** Keyboard focus MUST be
|
|
169
|
+
perceivable (WCAG 2.2 SC 2.4.7 and 1.4.11). The row currently paints focus
|
|
170
|
+
only as the menu overlay tint with no outline, which measures about 1.1:1
|
|
171
|
+
against the menu surface and paints nothing under forced colors. The
|
|
172
|
+
remediation is a shared row-visual decision with `component:DropdownMenuItem`
|
|
173
|
+
(its OQ2); this draft records the gap and does not settle it.
|
|
174
|
+
|
|
175
|
+
## Design relationships
|
|
176
|
+
|
|
177
|
+
| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
|
|
178
|
+
| ---------------- | ---------------------------------------------------------------- | -------------------------------- | -------------- | ------------------ |
|
|
179
|
+
| Row | Menu row paint and radius; focus paint is the AR4 objective gap. | Current source and menu tokens | structural | FR7, AR4 |
|
|
180
|
+
| Radio marker | Shared radio Indicator at the menu's control size. | Shared radio Indicator | prominent | FR1, FR6 |
|
|
181
|
+
| Disabled | Half-opacity row with a default cursor. | Current source | supporting | FR4 |
|
|
182
|
+
| Direction/touch | Logical marker placement that mirrors and moves on touch. | Bidirectionality and current CSS | structural | FR6 |
|
|
183
|
+
|
|
184
|
+
No new component-local visual decision is settled by this draft.
|
|
185
|
+
|
|
186
|
+
## Family and system relationships
|
|
187
|
+
|
|
188
|
+
- `component:DropdownMenuRadioGroup` owns value, change callback, and close policy.
|
|
189
|
+
- `component:DropdownMenu` owns keyboard navigation, the press model, the
|
|
190
|
+
`dropdown-menu-item` and `dropdown-menu-radio` target inventory, disabled
|
|
191
|
+
keyboard discoverability (its OQ1), and forced-colors row focus together with
|
|
192
|
+
`component:DropdownMenuItem` (its OQ2).
|
|
193
|
+
- `architecture:public-component-api` owns root input and handler composition.
|
|
194
|
+
- `architecture:component-theming-surface` owns target placement and state
|
|
195
|
+
reflection.
|
|
196
|
+
- `architecture:component-test-sufficiency` owns proportionate observable evidence.
|
|
197
|
+
- `spec:AST-020` supplies WCAG/APG adoption and evidence-layer boundaries.
|
|
198
|
+
- `spec:AST-029` keeps this observational draft separate from the audit receipt.
|
|
199
|
+
|
|
200
|
+
## Verification map
|
|
201
|
+
|
|
202
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
203
|
+
| ------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
|
204
|
+
| FR1, FR2, AR1 | `DropdownMenuSelectable.test.tsx`; reusable radio-group and Menu contracts; scoped axe | checked, unchecked, outside a group | A nested radio, wrong checked row, extra announced control, or missing throw fails | `audit:DropdownMenuRadioItem/§1,§4,§6` |
|
|
205
|
+
| FR3, FR5, FR8 | `DropdownMenuSelectable.test.tsx` handler, keyboard, close, and ref cases; browser fixture counters | pointer and keyboard activation, close on/off, caller handlers | A dropped caller handler, wrong order, or missing close fails | `audit:DropdownMenuRadioItem/§3,§4,§6` |
|
|
206
|
+
| FR4, AR2 | Disabled focused test with an assistive-technology click; browser disabled-hover frame | disabled checked/unchecked | Removing the disabled guard makes the focused test fail | `audit:DropdownMenuRadioItem/§1,§4` |
|
|
207
|
+
| AR4 | Exact-head keyboard-focus and forced-colors frames with rendered contrast | Neutral/Butter light/dark focus, forced colors | Current frames record the gap; a remediation passes only with a perceivable indicator in every theme and under forced colors | `audit:DropdownMenuRadioItem/§1,§5` |
|
|
208
|
+
| FR6, FR7 | Marker and target tests; exact-head Neutral/Butter/RTL/narrow/size/coarse/focus frames | sm/md/lg, fine/coarse, LTR/RTL, light/dark | A lost target or reflection, a marker that is announced, wrongly sized, or misplaced fails | `audit:DropdownMenuRadioItem/§2,§5,§9,§10` |
|
|
209
|
+
|
|
210
|
+
## Decision log
|
|
211
|
+
|
|
212
|
+
None. This draft records current facts and introduces no product decision.
|
|
213
|
+
|
|
214
|
+
## Open questions
|
|
215
|
+
|
|
216
|
+
- **OQ1 — Should the shared `dropdown-menu-item` target reflect the disabled
|
|
217
|
+
state its rows paint?** (`human-api`) Selectable and action rows paint disabled
|
|
218
|
+
rows at half opacity, but the target reflects only size and variant, so a theme
|
|
219
|
+
cannot style disabled rows through it. The target inventory is owned by
|
|
220
|
+
`component:DropdownMenu`.
|
|
221
|
+
|
|
222
|
+
## Content boundary
|
|
223
|
+
|
|
224
|
+
This file does not duplicate consumer prop tables/examples, current audit scores,
|
|
225
|
+
screenshot matrices, implementation steps, or group/parent contracts. The audit
|
|
226
|
+
pull request owns the closed run evidence required by `spec:AST-029/FR5`.
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* (role="menuitemradio"). The row owns the role and aria-checked; there is no
|
|
13
13
|
* nested native <input> (per the WAI-ARIA menuitemradio pattern). Selection
|
|
14
14
|
* state + onChange come from DropdownMenuRadioGroupContext. Keyboard nav +
|
|
15
|
-
* Enter/Space activation come from the parent DropdownMenu.
|
|
15
|
+
* Enter/Space activation come from the parent DropdownMenu. Caller onClick and
|
|
16
|
+
* onPointerMove run after the row's own selection and hover focus.
|
|
16
17
|
*
|
|
17
18
|
* The round radio visual is the shared radio indicator, decorative
|
|
18
19
|
* (aria-hidden) — the row owns the checked state, and menu radios pick up the
|
|
@@ -21,7 +22,12 @@
|
|
|
21
22
|
* the inline-end of the row on coarse-pointer (touch) devices via CSS `order`.
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
useCallback,
|
|
27
|
+
type MouseEvent,
|
|
28
|
+
type PointerEvent,
|
|
29
|
+
type ReactNode,
|
|
30
|
+
} from 'react';
|
|
25
31
|
import * as stylex from '@stylexjs/stylex';
|
|
26
32
|
import {renderIconSlot, type IconType} from '../Icon';
|
|
27
33
|
import {useIndicator} from '../Indicator';
|
|
@@ -29,7 +35,7 @@ import {Item} from '../Item';
|
|
|
29
35
|
import {useDropdownMenuContext} from './DropdownMenuContext';
|
|
30
36
|
import {focusMenuItemOnHover} from './menuItemHover';
|
|
31
37
|
import {colorVars, spacingVars} from '../theme/tokens.stylex';
|
|
32
|
-
import {mergeProps, themeProps} from '../utils';
|
|
38
|
+
import {composeEventHandlers, mergeProps, themeProps} from '../utils';
|
|
33
39
|
import type {BaseProps} from '../BaseProps';
|
|
34
40
|
import {useDropdownMenuRadioGroupContext} from './DropdownMenuContext';
|
|
35
41
|
|
|
@@ -97,9 +103,9 @@ export interface DropdownMenuRadioItemProps extends Omit<
|
|
|
97
103
|
*/
|
|
98
104
|
icon?: ReactNode | IconType;
|
|
99
105
|
/**
|
|
100
|
-
* Whether this individual radio item is disabled. Disabled items
|
|
101
|
-
*
|
|
102
|
-
*
|
|
106
|
+
* Whether this individual radio item is disabled. Disabled items expose
|
|
107
|
+
* `aria-disabled`, block selection, and are currently skipped by
|
|
108
|
+
* DropdownMenu arrow-key navigation.
|
|
103
109
|
* @default false
|
|
104
110
|
*/
|
|
105
111
|
isDisabled?: boolean;
|
|
@@ -115,6 +121,10 @@ export interface DropdownMenuRadioItemProps extends Omit<
|
|
|
115
121
|
/**
|
|
116
122
|
* A single option in a DropdownMenuRadioGroup (role="menuitemradio").
|
|
117
123
|
*
|
|
124
|
+
* Consumer click and pointer-move handlers compose after the row's own
|
|
125
|
+
* selection and hover-focus behavior; disabled activation stops before the
|
|
126
|
+
* consumer click handler.
|
|
127
|
+
*
|
|
118
128
|
* @example
|
|
119
129
|
* ```
|
|
120
130
|
* <DropdownMenuRadioGroup value={sort} onChange={setSort} label="Sort by">
|
|
@@ -133,6 +143,8 @@ export function DropdownMenuRadioItem({
|
|
|
133
143
|
xstyle,
|
|
134
144
|
className,
|
|
135
145
|
style,
|
|
146
|
+
onClick,
|
|
147
|
+
onPointerMove,
|
|
136
148
|
...rest
|
|
137
149
|
}: DropdownMenuRadioItemProps) {
|
|
138
150
|
const menuCtx = useDropdownMenuContext();
|
|
@@ -147,15 +159,19 @@ export function DropdownMenuRadioItem({
|
|
|
147
159
|
const isChecked = groupCtx.value === value;
|
|
148
160
|
const RadioControl = useIndicator('radio');
|
|
149
161
|
|
|
150
|
-
const handleClick = useCallback(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
162
|
+
const handleClick = useCallback(
|
|
163
|
+
(event: MouseEvent) => {
|
|
164
|
+
if (isDisabled) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
groupCtx.onChange(value);
|
|
168
|
+
if (groupCtx.hasCloseOnSelect) {
|
|
169
|
+
menuCtx?.closeMenu();
|
|
170
|
+
}
|
|
171
|
+
onClick?.(event as MouseEvent<HTMLElement>);
|
|
172
|
+
},
|
|
173
|
+
[isDisabled, groupCtx, value, menuCtx, onClick],
|
|
174
|
+
);
|
|
159
175
|
|
|
160
176
|
const handlePointerMove = useCallback(
|
|
161
177
|
(e: PointerEvent<HTMLElement>) => focusMenuItemOnHover(e, isDisabled),
|
|
@@ -168,7 +184,7 @@ export function DropdownMenuRadioItem({
|
|
|
168
184
|
role="menuitemradio"
|
|
169
185
|
aria-checked={isChecked}
|
|
170
186
|
tabIndex={isDisabled ? undefined : -1}
|
|
171
|
-
onPointerMove={handlePointerMove}
|
|
187
|
+
onPointerMove={composeEventHandlers(handlePointerMove, onPointerMove)}
|
|
172
188
|
marker={
|
|
173
189
|
// No wrapper — see DropdownMenuCheckboxItem: the target belongs on the
|
|
174
190
|
// visible circle, and the indicator already owns its control size.
|
|
@@ -338,6 +338,132 @@ describe('DropdownMenuRadioGroup / RadioItem', () => {
|
|
|
338
338
|
expect(HTMLElement.prototype.hidePopover).toHaveBeenCalledTimes(1);
|
|
339
339
|
});
|
|
340
340
|
|
|
341
|
+
it('composes the caller click handler with the selection', async () => {
|
|
342
|
+
const user = userEvent.setup();
|
|
343
|
+
const calls: string[] = [];
|
|
344
|
+
const onChange = vi.fn(() => calls.push('change'));
|
|
345
|
+
const onClick = vi.fn(() => calls.push('click'));
|
|
346
|
+
render(
|
|
347
|
+
<DropdownMenu button={{label: 'Sort'}}>
|
|
348
|
+
<DropdownMenuRadioGroup
|
|
349
|
+
value="newest"
|
|
350
|
+
onChange={onChange}
|
|
351
|
+
label="Sort by"
|
|
352
|
+
hasCloseOnSelect={false}>
|
|
353
|
+
<DropdownMenuRadioItem value="newest" label="Newest" />
|
|
354
|
+
<DropdownMenuRadioItem
|
|
355
|
+
value="oldest"
|
|
356
|
+
label="Oldest"
|
|
357
|
+
onClick={onClick}
|
|
358
|
+
/>
|
|
359
|
+
</DropdownMenuRadioGroup>
|
|
360
|
+
</DropdownMenu>,
|
|
361
|
+
);
|
|
362
|
+
await user.click(screen.getByRole('button', {name: /Sort/}));
|
|
363
|
+
await user.click(
|
|
364
|
+
screen.getByRole('menuitemradio', {name: 'Oldest', hidden: true}),
|
|
365
|
+
);
|
|
366
|
+
expect(onChange).toHaveBeenCalledWith('oldest');
|
|
367
|
+
expect(onClick).toHaveBeenCalledOnce();
|
|
368
|
+
expect(calls).toEqual(['change', 'click']);
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
it('composes the caller pointer-move handler with menu hover focus', async () => {
|
|
372
|
+
const user = userEvent.setup();
|
|
373
|
+
const onPointerMove = vi.fn(() => document.activeElement);
|
|
374
|
+
render(
|
|
375
|
+
<DropdownMenu button={{label: 'Sort'}}>
|
|
376
|
+
<DropdownMenuRadioGroup
|
|
377
|
+
value="newest"
|
|
378
|
+
onChange={() => {}}
|
|
379
|
+
label="Sort by">
|
|
380
|
+
<DropdownMenuRadioItem value="newest" label="Newest" />
|
|
381
|
+
<DropdownMenuRadioItem
|
|
382
|
+
value="oldest"
|
|
383
|
+
label="Oldest"
|
|
384
|
+
onPointerMove={onPointerMove}
|
|
385
|
+
/>
|
|
386
|
+
</DropdownMenuRadioGroup>
|
|
387
|
+
</DropdownMenu>,
|
|
388
|
+
);
|
|
389
|
+
await user.click(screen.getByRole('button', {name: /Sort/}));
|
|
390
|
+
const item = screen.getByRole('menuitemradio', {
|
|
391
|
+
name: 'Oldest',
|
|
392
|
+
hidden: true,
|
|
393
|
+
});
|
|
394
|
+
fireEvent.pointerMove(item, {pointerType: 'mouse'});
|
|
395
|
+
expect(item).toHaveFocus();
|
|
396
|
+
expect(onPointerMove).toHaveBeenCalledOnce();
|
|
397
|
+
expect(onPointerMove).toHaveReturnedWith(item);
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
it('composes the caller click handler on keyboard activation', async () => {
|
|
401
|
+
const user = userEvent.setup();
|
|
402
|
+
const onChange = vi.fn();
|
|
403
|
+
const onClick = vi.fn();
|
|
404
|
+
render(
|
|
405
|
+
<DropdownMenu button={{label: 'Sort'}}>
|
|
406
|
+
<DropdownMenuRadioGroup
|
|
407
|
+
value="oldest"
|
|
408
|
+
onChange={onChange}
|
|
409
|
+
label="Sort by">
|
|
410
|
+
<DropdownMenuRadioItem
|
|
411
|
+
value="newest"
|
|
412
|
+
label="Newest"
|
|
413
|
+
onClick={onClick}
|
|
414
|
+
/>
|
|
415
|
+
<DropdownMenuRadioItem value="oldest" label="Oldest" />
|
|
416
|
+
</DropdownMenuRadioGroup>
|
|
417
|
+
</DropdownMenu>,
|
|
418
|
+
);
|
|
419
|
+
screen.getByRole('button', {name: /Sort/}).focus();
|
|
420
|
+
await user.keyboard('{Enter}');
|
|
421
|
+
const item = screen.getByRole('menuitemradio', {
|
|
422
|
+
name: 'Newest',
|
|
423
|
+
hidden: true,
|
|
424
|
+
});
|
|
425
|
+
await waitFor(() => expect(item).toHaveFocus());
|
|
426
|
+
await user.keyboard('{Enter}');
|
|
427
|
+
expect(onChange).toHaveBeenCalledWith('newest');
|
|
428
|
+
expect(onClick).toHaveBeenCalledOnce();
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
it('does not select, close, or call the caller click handler when disabled', async () => {
|
|
432
|
+
const user = userEvent.setup();
|
|
433
|
+
const onChange = vi.fn();
|
|
434
|
+
const onClick = vi.fn();
|
|
435
|
+
render(
|
|
436
|
+
<DropdownMenu button={{label: 'Sort'}}>
|
|
437
|
+
<DropdownMenuRadioGroup
|
|
438
|
+
value="newest"
|
|
439
|
+
onChange={onChange}
|
|
440
|
+
label="Sort by">
|
|
441
|
+
<DropdownMenuRadioItem value="newest" label="Newest" />
|
|
442
|
+
<DropdownMenuRadioItem
|
|
443
|
+
value="oldest"
|
|
444
|
+
label="Oldest"
|
|
445
|
+
onClick={onClick}
|
|
446
|
+
isDisabled
|
|
447
|
+
/>
|
|
448
|
+
</DropdownMenuRadioGroup>
|
|
449
|
+
</DropdownMenu>,
|
|
450
|
+
);
|
|
451
|
+
await user.click(screen.getByRole('button', {name: /Sort/}));
|
|
452
|
+
const item = screen.getByRole('menuitemradio', {
|
|
453
|
+
name: 'Oldest',
|
|
454
|
+
hidden: true,
|
|
455
|
+
});
|
|
456
|
+
expect(item).toHaveAttribute('aria-disabled', 'true');
|
|
457
|
+
await user.click(item);
|
|
458
|
+
// A screen reader's activation reaches the row as a detail-0 click that
|
|
459
|
+
// the menu's press model does not intercept.
|
|
460
|
+
fireEvent.click(item, {detail: 0});
|
|
461
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
462
|
+
expect(onClick).not.toHaveBeenCalled();
|
|
463
|
+
expect(item).toHaveAttribute('aria-checked', 'false');
|
|
464
|
+
expect(HTMLElement.prototype.hidePopover).not.toHaveBeenCalled();
|
|
465
|
+
});
|
|
466
|
+
|
|
341
467
|
it('keeps the menu open while controlled selection updates when requested', async () => {
|
|
342
468
|
const user = userEvent.setup();
|
|
343
469
|
const onChange = vi.fn();
|
|
@@ -423,6 +549,38 @@ describe('DropdownMenuRadioGroup / RadioItem', () => {
|
|
|
423
549
|
expect(onClick).toHaveBeenCalledTimes(1);
|
|
424
550
|
});
|
|
425
551
|
|
|
552
|
+
it('composes caller root inputs without replacing the row semantics', async () => {
|
|
553
|
+
const user = userEvent.setup();
|
|
554
|
+
render(
|
|
555
|
+
<DropdownMenu button={{label: 'Sort'}}>
|
|
556
|
+
<DropdownMenuRadioGroup
|
|
557
|
+
value="newest"
|
|
558
|
+
onChange={() => {}}
|
|
559
|
+
label="Sort by">
|
|
560
|
+
<DropdownMenuRadioItem
|
|
561
|
+
value="newest"
|
|
562
|
+
label="Newest"
|
|
563
|
+
data-owner="consumer"
|
|
564
|
+
aria-describedby="sort-hint"
|
|
565
|
+
className="consumer-row"
|
|
566
|
+
style={{inlineSize: 240}}
|
|
567
|
+
/>
|
|
568
|
+
</DropdownMenuRadioGroup>
|
|
569
|
+
</DropdownMenu>,
|
|
570
|
+
);
|
|
571
|
+
await user.click(screen.getByRole('button', {name: /Sort/}));
|
|
572
|
+
const item = screen.getByRole('menuitemradio', {
|
|
573
|
+
name: 'Newest',
|
|
574
|
+
hidden: true,
|
|
575
|
+
});
|
|
576
|
+
expect(item).toHaveAttribute('data-owner', 'consumer');
|
|
577
|
+
expect(item).toHaveAttribute('aria-describedby', 'sort-hint');
|
|
578
|
+
expect(item).toHaveAttribute('aria-checked', 'true');
|
|
579
|
+
expect(item).toHaveClass('consumer-row');
|
|
580
|
+
expect(item).toHaveClass('astryx-dropdown-menu-item');
|
|
581
|
+
expect(item).toHaveStyle({inlineSize: '240px'});
|
|
582
|
+
});
|
|
583
|
+
|
|
426
584
|
it('throws when a radio item is used outside a group', () => {
|
|
427
585
|
const spy = vi.spyOn(console, 'error').mockImplementation(() => {});
|
|
428
586
|
expect(() =>
|