@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,471 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file TokenizerEndLane.a11y.chromium.spec.ts
|
|
5
|
+
* @input `Core/Tokenizer` and `Core/PowerSearch` stories in a built Storybook.
|
|
6
|
+
* @output Real-engine proof that tokens, the overflow count and the input's
|
|
7
|
+
* text box never paint under the end lane (clear-all and busy indicator),
|
|
8
|
+
* across field widths, both writing directions and both overflow modes.
|
|
9
|
+
* @position Run with `pnpm test:a11y-contract`. The lane is absolutely
|
|
10
|
+
* positioned, so whether a token reaches it depends on how rows wrap at a
|
|
11
|
+
* given width, which only a shipping layout engine can show.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import {expect, test, type Page} from '@playwright/test';
|
|
15
|
+
import {
|
|
16
|
+
DEFAULT_STORYBOOK_DIR,
|
|
17
|
+
serveStorybook,
|
|
18
|
+
type StaticServer,
|
|
19
|
+
} from '@astryxdesign/a11y-spec/storybook';
|
|
20
|
+
|
|
21
|
+
let storybook: StaticServer;
|
|
22
|
+
|
|
23
|
+
test.beforeAll(async () => {
|
|
24
|
+
storybook = await serveStorybook(
|
|
25
|
+
process.env.ASTRYX_STORYBOOK_DIR ?? DEFAULT_STORYBOOK_DIR,
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test.afterAll(async () => {
|
|
30
|
+
await storybook?.close();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
type Direction = 'ltr' | 'rtl';
|
|
34
|
+
|
|
35
|
+
async function open(
|
|
36
|
+
page: Page,
|
|
37
|
+
id: string,
|
|
38
|
+
direction: Direction,
|
|
39
|
+
args = '',
|
|
40
|
+
): Promise<void> {
|
|
41
|
+
await page.goto(
|
|
42
|
+
`${storybook.origin}/iframe.html?id=${id}&viewMode=story&globals=direction:${direction}${args ? `&args=${args}` : ''}`,
|
|
43
|
+
{waitUntil: 'load'},
|
|
44
|
+
);
|
|
45
|
+
await page
|
|
46
|
+
.locator('button[aria-label="Clear all"]')
|
|
47
|
+
.first()
|
|
48
|
+
.waitFor({state: 'attached'});
|
|
49
|
+
await page.evaluate(async () => {
|
|
50
|
+
await document.fonts.ready;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Sets the story's sizing container to `width` and, for every field with a
|
|
56
|
+
* visible clear-all lane, returns each visible box that intersects the lane:
|
|
57
|
+
* tokens, the "+N more" count, and the input's content box (where its text
|
|
58
|
+
* and caret paint).
|
|
59
|
+
*/
|
|
60
|
+
async function overlapsAt(page: Page, width: number): Promise<string[]> {
|
|
61
|
+
return page.evaluate(async width => {
|
|
62
|
+
// The story decorator's fixed-width box; the layer mode's popover takes
|
|
63
|
+
// its width from the in-flow field inside it.
|
|
64
|
+
const host = document.querySelector<HTMLElement>(
|
|
65
|
+
'#storybook-root [style*="width"]',
|
|
66
|
+
);
|
|
67
|
+
if (!host) {
|
|
68
|
+
throw new Error('No sizing container in the story');
|
|
69
|
+
}
|
|
70
|
+
host.style.width = `${width}px`;
|
|
71
|
+
for (let frame = 0; frame < 4; frame++) {
|
|
72
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const isShown = (el: Element) =>
|
|
76
|
+
el.checkVisibility({visibilityProperty: true}) &&
|
|
77
|
+
!el.closest('[aria-hidden="true"]');
|
|
78
|
+
const lanes = [
|
|
79
|
+
...document.querySelectorAll('button[aria-label="Clear all"]'),
|
|
80
|
+
]
|
|
81
|
+
.filter(isShown)
|
|
82
|
+
.map(clear => clear.parentElement)
|
|
83
|
+
.filter(lane => lane?.parentElement != null) as HTMLElement[];
|
|
84
|
+
if (lanes.length === 0) {
|
|
85
|
+
throw new Error('No clear-all lane is visible');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return lanes.flatMap((lane, fieldIndex) => {
|
|
89
|
+
const field = lane.parentElement as HTMLElement;
|
|
90
|
+
const boxes: {name: string; rect: DOMRect}[] = [];
|
|
91
|
+
field.querySelectorAll('.astryx-token').forEach((token, index) => {
|
|
92
|
+
if (isShown(token)) {
|
|
93
|
+
boxes.push({
|
|
94
|
+
name: `token ${index}`,
|
|
95
|
+
rect: token.getBoundingClientRect(),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
field.querySelectorAll('span').forEach(span => {
|
|
100
|
+
if (/^\+\d+ more$/.test(span.textContent ?? '') && isShown(span)) {
|
|
101
|
+
boxes.push({
|
|
102
|
+
name: 'overflow count',
|
|
103
|
+
rect: span.getBoundingClientRect(),
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const input = field.querySelector<HTMLInputElement>('[role="combobox"]');
|
|
108
|
+
if (input && isShown(input) && getComputedStyle(input).opacity !== '0') {
|
|
109
|
+
const style = getComputedStyle(input);
|
|
110
|
+
const rect = input.getBoundingClientRect();
|
|
111
|
+
const left = rect.left + parseFloat(style.paddingLeft);
|
|
112
|
+
const right = rect.right - parseFloat(style.paddingRight);
|
|
113
|
+
if (right > left) {
|
|
114
|
+
boxes.push({
|
|
115
|
+
name: 'input text box',
|
|
116
|
+
rect: new DOMRect(left, rect.top, right - left, rect.height),
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const laneRect = lane.getBoundingClientRect();
|
|
122
|
+
return boxes.flatMap(({name, rect}) => {
|
|
123
|
+
const x =
|
|
124
|
+
Math.min(rect.right, laneRect.right) -
|
|
125
|
+
Math.max(rect.left, laneRect.left);
|
|
126
|
+
const y =
|
|
127
|
+
Math.min(rect.bottom, laneRect.bottom) -
|
|
128
|
+
Math.max(rect.top, laneRect.top);
|
|
129
|
+
return x > 0.5 && y > 0.5
|
|
130
|
+
? [
|
|
131
|
+
`${width}px field ${fieldIndex}: ${name} overlaps the end lane by ${x.toFixed(1)}px`,
|
|
132
|
+
]
|
|
133
|
+
: [];
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}, width);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function sweep(page: Page, from: number, to: number): Promise<string[]> {
|
|
140
|
+
const found: string[] = [];
|
|
141
|
+
for (let width = from; width <= to; width += 4) {
|
|
142
|
+
found.push(...(await overlapsAt(page, width)));
|
|
143
|
+
}
|
|
144
|
+
return found;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The same sweep with a search in flight at every width. The busy Spinner joins
|
|
149
|
+
* the lane only while a search runs, so each width is measured while the
|
|
150
|
+
* combobox reports `aria-busy`, typing again whenever the last search settled.
|
|
151
|
+
*/
|
|
152
|
+
async function sweepWhileBusy(
|
|
153
|
+
page: Page,
|
|
154
|
+
from: number,
|
|
155
|
+
to: number,
|
|
156
|
+
): Promise<string[]> {
|
|
157
|
+
const search = page.getByRole('combobox');
|
|
158
|
+
const found: string[] = [];
|
|
159
|
+
for (let width = from; width <= to; width += 4) {
|
|
160
|
+
for (;;) {
|
|
161
|
+
if ((await search.getAttribute('aria-busy')) !== 'true') {
|
|
162
|
+
await search.press('a');
|
|
163
|
+
await expect(search).toHaveAttribute('aria-busy', 'true');
|
|
164
|
+
}
|
|
165
|
+
const overlaps = await overlapsAt(page, width);
|
|
166
|
+
if ((await search.getAttribute('aria-busy')) === 'true') {
|
|
167
|
+
found.push(...overlaps);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return found;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Sizes the story container (a pixel width, or `max-content` for a
|
|
177
|
+
* content-sized field) and returns the field's border box.
|
|
178
|
+
*/
|
|
179
|
+
async function fieldBoxAt(
|
|
180
|
+
page: Page,
|
|
181
|
+
width: string,
|
|
182
|
+
): Promise<{width: number; height: number}> {
|
|
183
|
+
return page.evaluate(async width => {
|
|
184
|
+
const host = document.querySelector<HTMLElement>(
|
|
185
|
+
'#storybook-root [style*="width"]',
|
|
186
|
+
);
|
|
187
|
+
const field = document.querySelector('button[aria-label="Clear all"]')
|
|
188
|
+
?.parentElement?.parentElement;
|
|
189
|
+
if (!host || !field) {
|
|
190
|
+
throw new Error('Field or sizing container did not render');
|
|
191
|
+
}
|
|
192
|
+
host.style.width = width;
|
|
193
|
+
for (let frame = 0; frame < 4; frame++) {
|
|
194
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
195
|
+
}
|
|
196
|
+
const {width: w, height: h} = field.getBoundingClientRect();
|
|
197
|
+
return {
|
|
198
|
+
width: Math.round(w * 100) / 100,
|
|
199
|
+
height: Math.round(h * 100) / 100,
|
|
200
|
+
};
|
|
201
|
+
}, width);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** Adds tokens through the menu, as a person would. */
|
|
205
|
+
async function addTokens(page: Page, names: string[]): Promise<void> {
|
|
206
|
+
const search = page.getByRole('combobox');
|
|
207
|
+
for (const name of names) {
|
|
208
|
+
await search.fill(name.split(' ')[0]);
|
|
209
|
+
await page.getByRole('option', {name}).click();
|
|
210
|
+
await expect(search).not.toHaveAttribute('aria-busy', 'true');
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* The field's box with a search settled and again with one in flight. The
|
|
216
|
+
* query is non-empty both times, so only the busy state differs.
|
|
217
|
+
*/
|
|
218
|
+
async function settledAndBusy(
|
|
219
|
+
page: Page,
|
|
220
|
+
width: string,
|
|
221
|
+
): Promise<string | null> {
|
|
222
|
+
const search = page.getByRole('combobox');
|
|
223
|
+
await search.fill('a');
|
|
224
|
+
await expect(search).not.toHaveAttribute('aria-busy', 'true');
|
|
225
|
+
const settled = await fieldBoxAt(page, width);
|
|
226
|
+
await search.press('b');
|
|
227
|
+
await expect(search).toHaveAttribute('aria-busy', 'true');
|
|
228
|
+
const busy = await fieldBoxAt(page, width);
|
|
229
|
+
const stillBusy = (await search.getAttribute('aria-busy')) === 'true';
|
|
230
|
+
if (!stillBusy) {
|
|
231
|
+
throw new Error(`The search settled before ${width} was measured`);
|
|
232
|
+
}
|
|
233
|
+
return settled.width === busy.width && settled.height === busy.height
|
|
234
|
+
? null
|
|
235
|
+
: `${width}: settled ${settled.width}x${settled.height}, busy ${busy.width}x${busy.height}`;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* With four tokens on the Loading story, every width from 200px to 400px and a
|
|
240
|
+
* content-sized container where the field's box differs settled vs busy.
|
|
241
|
+
*/
|
|
242
|
+
async function busyLayoutChanges(page: Page, step: number): Promise<string[]> {
|
|
243
|
+
await addTokens(page, ['Bob Smith', 'Charlie Brown', 'Diana Prince']);
|
|
244
|
+
await expect(page.locator('.astryx-token')).toHaveCount(4);
|
|
245
|
+
const changed: string[] = [];
|
|
246
|
+
for (let width = 200; width <= 400; width += step) {
|
|
247
|
+
const change = await settledAndBusy(page, `${width}px`);
|
|
248
|
+
if (change) {
|
|
249
|
+
changed.push(change);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// Content-sized: the field may not widen while busy (input-fields FR1).
|
|
253
|
+
const contentSized = await settledAndBusy(page, 'max-content');
|
|
254
|
+
if (contentSized) {
|
|
255
|
+
changed.push(contentSized);
|
|
256
|
+
}
|
|
257
|
+
return changed;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The blurred, collapsed field at `width`: its border box, how many tokens
|
|
262
|
+
* show, and the "+N more" count.
|
|
263
|
+
*/
|
|
264
|
+
async function collapsedRowAt(page: Page, width: string): Promise<string> {
|
|
265
|
+
const box = await fieldBoxAt(page, width);
|
|
266
|
+
const row = await page.evaluate(() => {
|
|
267
|
+
const field = document.querySelector('button[aria-label="Clear all"]')
|
|
268
|
+
?.parentElement?.parentElement;
|
|
269
|
+
if (!field) {
|
|
270
|
+
throw new Error('Field did not render');
|
|
271
|
+
}
|
|
272
|
+
const shown = [...field.querySelectorAll('.astryx-token')].filter(
|
|
273
|
+
token =>
|
|
274
|
+
token.checkVisibility({visibilityProperty: true}) &&
|
|
275
|
+
!token.closest('[aria-hidden="true"]'),
|
|
276
|
+
).length;
|
|
277
|
+
const count = [...field.querySelectorAll('span')].find(span =>
|
|
278
|
+
/^\+\d+ more$/.test(span.textContent ?? ''),
|
|
279
|
+
);
|
|
280
|
+
return `${shown} tokens, ${count?.textContent ?? 'no count'}`;
|
|
281
|
+
});
|
|
282
|
+
return `${box.width}x${box.height}, ${row}`;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
for (const direction of ['ltr', 'rtl'] as const) {
|
|
286
|
+
test.describe(direction, () => {
|
|
287
|
+
test('PowerSearch tokens (custom renderToken) wrap before the end lane', async ({
|
|
288
|
+
page,
|
|
289
|
+
}) => {
|
|
290
|
+
await open(page, 'core-powersearch--near-full-token-row', direction);
|
|
291
|
+
expect(await sweep(page, 160, 640)).toEqual([]);
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
test('a token wider than the row truncates short of the end lane', async ({
|
|
295
|
+
page,
|
|
296
|
+
}) => {
|
|
297
|
+
await open(page, 'core-tokenizer--long-token-end-lane', direction);
|
|
298
|
+
expect(await sweep(page, 160, 400)).toEqual([]);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
test('default Tokenizer tokens wrap before the end lane', async ({
|
|
302
|
+
page,
|
|
303
|
+
}) => {
|
|
304
|
+
await open(
|
|
305
|
+
page,
|
|
306
|
+
'core-tokenizer--with-preselected',
|
|
307
|
+
direction,
|
|
308
|
+
'hasClear:!true',
|
|
309
|
+
);
|
|
310
|
+
expect(await sweep(page, 160, 400)).toEqual([]);
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
test('tokens stay clear of the lane while a search is busy', async ({
|
|
314
|
+
page,
|
|
315
|
+
}) => {
|
|
316
|
+
await open(page, 'core-tokenizer--loading', direction);
|
|
317
|
+
await page.getByRole('combobox').focus();
|
|
318
|
+
expect(await sweepWhileBusy(page, 200, 400)).toEqual([]);
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
test('a search starting does not move the field or its token rows', async ({
|
|
322
|
+
page,
|
|
323
|
+
}) => {
|
|
324
|
+
test.setTimeout(240_000);
|
|
325
|
+
await open(page, 'core-tokenizer--loading', direction);
|
|
326
|
+
expect(await busyLayoutChanges(page, 4)).toEqual([]);
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
test('the reserved Spinner costs no frames and stays silent while idle', async ({
|
|
330
|
+
page,
|
|
331
|
+
}) => {
|
|
332
|
+
await open(page, 'core-tokenizer--loading', direction);
|
|
333
|
+
const search = page.getByRole('combobox');
|
|
334
|
+
const cdp = await page.context().newCDPSession(page);
|
|
335
|
+
await cdp.send('Performance.enable');
|
|
336
|
+
// Style recalculations over a short window: a ticking ring animation
|
|
337
|
+
// recalculates every frame (about 30 in 500ms), an unrendered one does
|
|
338
|
+
// not. The idle allowance absorbs a stray one-off recalculation.
|
|
339
|
+
const recalcsOver = async (ms: number) => {
|
|
340
|
+
const count = async () => {
|
|
341
|
+
const {metrics} = await cdp.send('Performance.getMetrics');
|
|
342
|
+
return metrics.find(m => m.name === 'RecalcStyleCount')?.value ?? 0;
|
|
343
|
+
};
|
|
344
|
+
const before = await count();
|
|
345
|
+
await page.waitForTimeout(ms);
|
|
346
|
+
return (await count()) - before;
|
|
347
|
+
};
|
|
348
|
+
const spinnerState = async () =>
|
|
349
|
+
page.evaluate(() => {
|
|
350
|
+
const spinner = document
|
|
351
|
+
.querySelector('button[aria-label="Clear all"]')
|
|
352
|
+
?.parentElement?.querySelector('.astryx-spinner');
|
|
353
|
+
if (!spinner) {
|
|
354
|
+
throw new Error('The lane holds no Spinner');
|
|
355
|
+
}
|
|
356
|
+
return {
|
|
357
|
+
hidden: spinner.getAttribute('aria-hidden') === 'true',
|
|
358
|
+
width: spinner.getBoundingClientRect().width,
|
|
359
|
+
};
|
|
360
|
+
});
|
|
361
|
+
const idle = await spinnerState();
|
|
362
|
+
expect(idle.hidden).toBe(true);
|
|
363
|
+
expect(await recalcsOver(500)).toBeLessThanOrEqual(2);
|
|
364
|
+
await search.focus();
|
|
365
|
+
await search.press('a');
|
|
366
|
+
await expect(search).toHaveAttribute('aria-busy', 'true');
|
|
367
|
+
const busy = await spinnerState();
|
|
368
|
+
expect(busy.hidden).toBe(false);
|
|
369
|
+
expect(await recalcsOver(500)).toBeGreaterThanOrEqual(10);
|
|
370
|
+
expect(busy.width).toBe(idle.width);
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
test('the idle Spinner paints nothing, even when a theme styles its box', async ({
|
|
374
|
+
page,
|
|
375
|
+
}) => {
|
|
376
|
+
await page.goto(
|
|
377
|
+
`${storybook.origin}/iframe.html?id=core-tokenizer--loading&viewMode=story&globals=direction:${direction};astryxTheme:probe`,
|
|
378
|
+
{waitUntil: 'load'},
|
|
379
|
+
);
|
|
380
|
+
await page
|
|
381
|
+
.locator('button[aria-label="Clear all"]')
|
|
382
|
+
.waitFor({state: 'attached'});
|
|
383
|
+
const search = page.getByRole('combobox');
|
|
384
|
+
const spinnerPaint = async () =>
|
|
385
|
+
page.evaluate(() => {
|
|
386
|
+
const spinner = document
|
|
387
|
+
.querySelector('button[aria-label="Clear all"]')
|
|
388
|
+
?.parentElement?.querySelector('.astryx-spinner');
|
|
389
|
+
if (!spinner) {
|
|
390
|
+
throw new Error('The lane holds no Spinner');
|
|
391
|
+
}
|
|
392
|
+
const style = getComputedStyle(spinner);
|
|
393
|
+
return {
|
|
394
|
+
visible: spinner.checkVisibility({visibilityProperty: true}),
|
|
395
|
+
visibility: style.visibility,
|
|
396
|
+
background: style.backgroundColor,
|
|
397
|
+
};
|
|
398
|
+
});
|
|
399
|
+
const idle = await spinnerPaint();
|
|
400
|
+
// The probe theme paints the Spinner's own box, so a box that is only
|
|
401
|
+
// content-skipped would still show beside Clear all.
|
|
402
|
+
expect(idle.background).not.toBe('rgba(0, 0, 0, 0)');
|
|
403
|
+
expect(idle.visibility).toBe('hidden');
|
|
404
|
+
expect(idle.visible).toBe(false);
|
|
405
|
+
await search.focus();
|
|
406
|
+
await search.press('a');
|
|
407
|
+
await expect(search).toHaveAttribute('aria-busy', 'true');
|
|
408
|
+
expect((await spinnerPaint()).visible).toBe(true);
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
test('a themed, larger Spinner keeps its space too', async ({page}) => {
|
|
412
|
+
test.setTimeout(240_000);
|
|
413
|
+
await open(page, 'core-tokenizer--loading', direction);
|
|
414
|
+
// The public size var a theme sets for a named Spinner size.
|
|
415
|
+
await page.addStyleTag({
|
|
416
|
+
content: '.astryx-spinner { --spinner-diameter: 24px !important; }',
|
|
417
|
+
});
|
|
418
|
+
expect(await busyLayoutChanges(page, 8)).toEqual([]);
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
test('a search settling after blur does not change the collapsed row', async ({
|
|
422
|
+
page,
|
|
423
|
+
}) => {
|
|
424
|
+
test.setTimeout(240_000);
|
|
425
|
+
await open(
|
|
426
|
+
page,
|
|
427
|
+
'core-tokenizer--loading',
|
|
428
|
+
direction,
|
|
429
|
+
'tokenOverflowBehavior:unfocusedInline',
|
|
430
|
+
);
|
|
431
|
+
const search = page.getByRole('combobox');
|
|
432
|
+
await search.focus();
|
|
433
|
+
await addTokens(page, ['Bob Smith', 'Charlie Brown', 'Diana Prince']);
|
|
434
|
+
const changed: string[] = [];
|
|
435
|
+
for (let width = 200; width <= 400; width += 8) {
|
|
436
|
+
await search.focus();
|
|
437
|
+
await search.fill('');
|
|
438
|
+
await search.press('a');
|
|
439
|
+
await expect(search).toHaveAttribute('aria-busy', 'true');
|
|
440
|
+
await search.blur();
|
|
441
|
+
const busy = await collapsedRowAt(page, `${width}px`);
|
|
442
|
+
await expect(search).not.toHaveAttribute('aria-busy', 'true');
|
|
443
|
+
const settled = await collapsedRowAt(page, `${width}px`);
|
|
444
|
+
if (busy !== settled) {
|
|
445
|
+
changed.push(`${width}px: busy ${busy}, settled ${settled}`);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
expect(changed).toEqual([]);
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
for (const mode of ['overflow-inline', 'overflow-layer']) {
|
|
452
|
+
test(`${mode}: blurred and focused tokens stay clear of the end lane`, async ({
|
|
453
|
+
page,
|
|
454
|
+
}) => {
|
|
455
|
+
await open(page, `core-powersearch--${mode}`, direction);
|
|
456
|
+
// Blurred: only the inline mode keeps its lane on the page.
|
|
457
|
+
if (mode === 'overflow-inline') {
|
|
458
|
+
expect(await sweep(page, 320, 640)).toEqual([]);
|
|
459
|
+
}
|
|
460
|
+
// The field's own corner, clear of every token: the click a person
|
|
461
|
+
// makes to start typing, which expands both modes.
|
|
462
|
+
await page
|
|
463
|
+
.locator('.astryx-tokenizer')
|
|
464
|
+
.first()
|
|
465
|
+
.click({position: {x: 1, y: 1}});
|
|
466
|
+
await expect(page.getByRole('combobox')).toBeFocused();
|
|
467
|
+
expect(await sweep(page, 320, 640)).toEqual([]);
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
@@ -81,8 +81,9 @@ const reserveStyles = stylex.create({
|
|
|
81
81
|
*
|
|
82
82
|
* Takes the lane's inset from the field's inline-end border, as the CSS
|
|
83
83
|
* expression that positions it. Returns a ref callback for the lane, and the
|
|
84
|
-
* ordinary input reserve style. Tokenizer's
|
|
85
|
-
* property directly so
|
|
84
|
+
* ordinary input reserve style. With tokens, Tokenizer's field wrapper reads the
|
|
85
|
+
* same custom property directly so every token row, and the input after the
|
|
86
|
+
* last token, stops before the lane.
|
|
86
87
|
* With no lane mounted the variable is absent and either rule resolves to its
|
|
87
88
|
* no-lane fallback, so neither path needs to know whether a search is running.
|
|
88
89
|
*/
|
|
@@ -365,7 +365,11 @@ describe('Tooltip', () => {
|
|
|
365
365
|
__resetInteractionModalityForTest();
|
|
366
366
|
});
|
|
367
367
|
|
|
368
|
-
/**
|
|
368
|
+
/**
|
|
369
|
+
* A tap, in the order a browser dispatches it: the finger's pointer events,
|
|
370
|
+
* then the hover it synthesizes, then the `click` that says the touch was a
|
|
371
|
+
* tap and not the start of a scroll.
|
|
372
|
+
*/
|
|
369
373
|
const tap = (element: HTMLElement) => {
|
|
370
374
|
// A finger's arrival fires pointerenter too, and that is the path a pen
|
|
371
375
|
// must not take — cover it here rather than starting at pointerdown.
|
|
@@ -374,6 +378,14 @@ describe('Tooltip', () => {
|
|
|
374
378
|
fireEvent.pointerUp(element, {pointerType: 'touch'});
|
|
375
379
|
// Touch synthesizes hover after the press; the tooltip must not act on it.
|
|
376
380
|
fireEvent.mouseEnter(element);
|
|
381
|
+
fireEvent.click(element);
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/** A tap outside: what a finger landing and lifting elsewhere dispatches. */
|
|
385
|
+
const tapOutside = (element: HTMLElement) => {
|
|
386
|
+
fireEvent.pointerDown(element, {pointerType: 'touch'});
|
|
387
|
+
fireEvent.pointerUp(element, {pointerType: 'touch'});
|
|
388
|
+
fireEvent.click(element);
|
|
377
389
|
};
|
|
378
390
|
|
|
379
391
|
it('opens on a tap when the trigger performs no action', async () => {
|
|
@@ -479,9 +491,141 @@ describe('Tooltip', () => {
|
|
|
479
491
|
expect(onOpenChange).toHaveBeenCalledWith(true);
|
|
480
492
|
});
|
|
481
493
|
|
|
482
|
-
|
|
483
|
-
|
|
494
|
+
tapOutside(screen.getByRole('button', {name: 'Elsewhere'}));
|
|
495
|
+
|
|
496
|
+
await waitFor(() => {
|
|
497
|
+
expect(onOpenChange).toHaveBeenCalledWith(false);
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
it('opens when the finger lifts, not when it lands', async () => {
|
|
502
|
+
const onOpenChange = vi.fn();
|
|
503
|
+
render(
|
|
504
|
+
<Tooltip content="Tooltip text" onOpenChange={onOpenChange} delay={0}>
|
|
505
|
+
Abbreviation
|
|
506
|
+
</Tooltip>,
|
|
507
|
+
);
|
|
508
|
+
|
|
509
|
+
const trigger = screen.getByText('Abbreviation');
|
|
510
|
+
fireEvent.pointerEnter(trigger, {pointerType: 'touch'});
|
|
511
|
+
fireEvent.pointerDown(trigger, {pointerType: 'touch'});
|
|
512
|
+
// The finger is still down: it may be starting a scroll.
|
|
513
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
514
|
+
expect(onOpenChange).not.toHaveBeenCalled();
|
|
515
|
+
|
|
516
|
+
fireEvent.pointerUp(trigger, {pointerType: 'touch'});
|
|
517
|
+
fireEvent.click(trigger);
|
|
518
|
+
await waitFor(() => {
|
|
519
|
+
expect(onOpenChange).toHaveBeenCalledWith(true);
|
|
484
520
|
});
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
it('never opens for a touch that turns into a scroll', async () => {
|
|
524
|
+
const onOpenChange = vi.fn();
|
|
525
|
+
render(
|
|
526
|
+
<Tooltip content="Tooltip text" onOpenChange={onOpenChange} delay={0}>
|
|
527
|
+
Abbreviation
|
|
528
|
+
</Tooltip>,
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
const trigger = screen.getByText('Abbreviation');
|
|
532
|
+
fireEvent.pointerEnter(trigger, {pointerType: 'touch'});
|
|
533
|
+
fireEvent.pointerDown(trigger, {pointerType: 'touch'});
|
|
534
|
+
// The browser takes the touch for the page scroll: no tap follows.
|
|
535
|
+
fireEvent.pointerCancel(trigger, {pointerType: 'touch'});
|
|
536
|
+
|
|
537
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
538
|
+
expect(onOpenChange).not.toHaveBeenCalled();
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
it('never opens for a press the browser did not count as a tap', async () => {
|
|
542
|
+
const onOpenChange = vi.fn();
|
|
543
|
+
render(
|
|
544
|
+
<Tooltip content="Tooltip text" onOpenChange={onOpenChange} delay={0}>
|
|
545
|
+
Abbreviation
|
|
546
|
+
</Tooltip>,
|
|
547
|
+
);
|
|
548
|
+
|
|
549
|
+
const trigger = screen.getByText('Abbreviation');
|
|
550
|
+
// A long press: the finger lifts, but the browser fires no click
|
|
551
|
+
// (it selected text or showed its own menu instead).
|
|
552
|
+
fireEvent.pointerDown(trigger, {pointerType: 'touch'});
|
|
553
|
+
fireEvent.pointerUp(trigger, {pointerType: 'touch'});
|
|
554
|
+
|
|
555
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
556
|
+
expect(onOpenChange).not.toHaveBeenCalled();
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
it('does not take a later keyboard click for the tap of an earlier press', async () => {
|
|
560
|
+
const onOpenChange = vi.fn();
|
|
561
|
+
render(
|
|
562
|
+
<Tooltip
|
|
563
|
+
content="What this metric means"
|
|
564
|
+
onOpenChange={onOpenChange}
|
|
565
|
+
touchTrigger="tap"
|
|
566
|
+
delay={0}>
|
|
567
|
+
<button type="button">Info</button>
|
|
568
|
+
</Tooltip>,
|
|
569
|
+
);
|
|
570
|
+
|
|
571
|
+
const trigger = screen.getByRole('button', {name: 'Info'});
|
|
572
|
+
// A press that never became a tap ...
|
|
573
|
+
fireEvent.pointerDown(trigger, {pointerType: 'touch'});
|
|
574
|
+
fireEvent.pointerUp(trigger, {pointerType: 'touch'});
|
|
575
|
+
// ... then Enter on the focused button, which fires its own click.
|
|
576
|
+
fireEvent.keyDown(trigger, {key: 'Enter'});
|
|
577
|
+
fireEvent.click(trigger);
|
|
578
|
+
|
|
579
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
580
|
+
expect(onOpenChange).not.toHaveBeenCalledWith(true);
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
it('closes on a tap outside when the finger lifts, not when it lands', async () => {
|
|
584
|
+
const onOpenChange = vi.fn();
|
|
585
|
+
render(
|
|
586
|
+
<>
|
|
587
|
+
<Tooltip content="Tooltip text" onOpenChange={onOpenChange} delay={0}>
|
|
588
|
+
Abbreviation
|
|
589
|
+
</Tooltip>
|
|
590
|
+
<button type="button">Elsewhere</button>
|
|
591
|
+
</>,
|
|
592
|
+
);
|
|
593
|
+
|
|
594
|
+
tap(screen.getByText('Abbreviation'));
|
|
595
|
+
await waitFor(() => {
|
|
596
|
+
expect(onOpenChange).toHaveBeenCalledWith(true);
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
const elsewhere = screen.getByRole('button', {name: 'Elsewhere'});
|
|
600
|
+
fireEvent.pointerDown(elsewhere, {pointerType: 'touch'});
|
|
601
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
602
|
+
expect(onOpenChange).not.toHaveBeenCalledWith(false);
|
|
603
|
+
|
|
604
|
+
fireEvent.pointerUp(elsewhere, {pointerType: 'touch'});
|
|
605
|
+
await waitFor(() => {
|
|
606
|
+
expect(onOpenChange).toHaveBeenCalledWith(false);
|
|
607
|
+
});
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
it('closes when a scroll starts outside', async () => {
|
|
611
|
+
const onOpenChange = vi.fn();
|
|
612
|
+
render(
|
|
613
|
+
<>
|
|
614
|
+
<Tooltip content="Tooltip text" onOpenChange={onOpenChange} delay={0}>
|
|
615
|
+
Abbreviation
|
|
616
|
+
</Tooltip>
|
|
617
|
+
<p>Page content</p>
|
|
618
|
+
</>,
|
|
619
|
+
);
|
|
620
|
+
|
|
621
|
+
tap(screen.getByText('Abbreviation'));
|
|
622
|
+
await waitFor(() => {
|
|
623
|
+
expect(onOpenChange).toHaveBeenCalledWith(true);
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
const page = screen.getByText('Page content');
|
|
627
|
+
fireEvent.pointerDown(page, {pointerType: 'touch'});
|
|
628
|
+
fireEvent.pointerCancel(page, {pointerType: 'touch'});
|
|
485
629
|
|
|
486
630
|
await waitFor(() => {
|
|
487
631
|
expect(onOpenChange).toHaveBeenCalledWith(false);
|
|
@@ -543,6 +687,7 @@ describe('Tooltip', () => {
|
|
|
543
687
|
fireEvent.pointerEnter(trigger, {pointerType: 'pen', buttons: 0});
|
|
544
688
|
fireEvent.pointerDown(trigger, {pointerType: 'pen'});
|
|
545
689
|
fireEvent.pointerUp(trigger, {pointerType: 'pen'});
|
|
690
|
+
fireEvent.click(trigger);
|
|
546
691
|
|
|
547
692
|
await waitFor(() => {
|
|
548
693
|
expect(onOpenChange).toHaveBeenCalledWith(true);
|
|
@@ -98,9 +98,9 @@ export const TOOLTIP_EXCLUSIONS = [
|
|
|
98
98
|
{
|
|
99
99
|
id: 'touch-trigger',
|
|
100
100
|
owner:
|
|
101
|
-
'useTooltip.test.tsx and Tooltip.test.tsx (touchTrigger suites) through the shared useTouchTrigger hook',
|
|
101
|
+
'useTooltip.test.tsx and Tooltip.test.tsx (touchTrigger suites) through the shared useTouchTrigger hook, and TouchTrigger.a11y.chromium.spec.ts for real touch input',
|
|
102
102
|
reason:
|
|
103
|
-
'On a touch pointer there is no hover, so a tap opens the tooltip or leaves it to the control the tap operates; the APG defines no touch behaviour, and
|
|
103
|
+
'On a touch pointer there is no hover, so a tap opens the tooltip or leaves it to the control the tap operates; the APG defines no touch behaviour, and this contract drives a mouse and a keyboard only, so the touch outcomes have their own real-touch Chromium proof.',
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
id: 'controlled-and-disabled',
|
|
@@ -23,7 +23,7 @@ export const docs = {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
usage: {
|
|
26
|
-
description: 'Renders content in the accessibility tree while hiding it visually. Use for accessible names on icon-only controls, aria-live announcement regions, and supplementary screen-reader context. Deliberately has no styling props; the whole point is to stay invisible.',
|
|
26
|
+
description: 'Renders content in the accessibility tree while hiding it visually. Use for accessible names on icon-only controls, aria-live announcement regions, and supplementary screen-reader context. Deliberately has no styling props; the whole point is to stay invisible. `xstyle` is still accepted and ignored, only so code written against 0.7.2 keeps compiling; a planned minor removes it.',
|
|
27
27
|
bestPractices: [
|
|
28
28
|
{ guidance: true, description: 'Use to give icon-only buttons and controls an accessible name that screen readers announce.' },
|
|
29
29
|
{ guidance: true, description: 'Render as a block element (as="div") with aria-live to announce dynamic updates like drag-and-drop or result counts.' },
|