@astryxdesign/core 0.7.17-canary.gffd1c8e → 0.7.17
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/CHANGELOG.md +334 -0
- package/README.md +26 -9
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +6 -8
- package/dist/AppShell/AppShell.d.ts +7 -3
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +74 -36
- package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
- package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
- package/dist/AppShell/unreadWidthPoint.js +134 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -1
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +6 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -29
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +11 -7
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +57 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +5 -0
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +6 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +12 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +4 -0
- package/dist/Calendar/Calendar.js +8 -2
- package/dist/Calendar/styles.d.ts +10 -6
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +7 -3
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +23 -4
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -4
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +8 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +7 -0
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +3 -9
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -0
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +1 -0
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +8 -0
- package/dist/Chat/pastedTextLabel.d.ts +4 -0
- package/dist/Chat/pastedTextLabel.d.ts.map +1 -0
- package/dist/Chat/pastedTextLabel.js +21 -0
- package/dist/Chat/useChatPasteAsToken.d.ts.map +1 -1
- package/dist/Chat/useChatPasteAsToken.js +8 -8
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +3 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +69 -18
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +8 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +17 -3
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +1 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +32 -5
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +1 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +3 -2
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +8 -8
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +5 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +104 -18
- package/dist/Dialog/DialogContext.d.ts +5 -4
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +38 -12
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/Drawer/DrawerHeader.js +23 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +23 -17
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts +24 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.js +29 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +5 -0
- package/dist/Field/inputStyles.stylex.d.ts +31 -4
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +30 -5
- package/dist/Grid/Grid.d.ts +2 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -2
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +15 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +32 -2
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +12 -6
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +18 -4
- package/dist/Indicator/indicatorRegistry.d.ts +3 -26
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
- package/dist/Indicator/indicatorRegistry.js +2 -11
- package/dist/Indicator/themeIndicators.d.ts +15 -0
- package/dist/Indicator/themeIndicators.d.ts.map +1 -0
- package/dist/Indicator/themeIndicators.js +21 -0
- package/dist/Indicator/types.d.ts +14 -0
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/Indicator/useThemeIndicator.d.ts +3 -0
- package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
- package/dist/Indicator/useThemeIndicator.js +19 -0
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +30 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +9 -2
- package/dist/Layer/layerExitCopy.d.ts.map +1 -1
- package/dist/Layer/layerExitCopy.js +1 -1
- package/dist/Layer/layerSlideRules.d.ts +23 -15
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +54 -54
- package/dist/Layer/useLayer.d.ts +41 -29
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +199 -126
- package/dist/Layer/useLayerKeyboardClearance.d.ts +5 -5
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
- package/dist/Layer/useLayerKeyboardClearance.js +5 -5
- package/dist/Layout/LayoutContainerContext.d.ts +4 -0
- package/dist/Layout/LayoutContainerContext.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerContext.js +20 -0
- package/dist/Layout/LayoutContainerScope.d.ts +15 -0
- package/dist/Layout/LayoutContainerScope.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerScope.js +23 -0
- package/dist/Layout/LayoutContent.d.ts +2 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +7 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +5 -1
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +5 -1
- package/dist/Layout/containerCorners.stylex.d.ts +15 -7
- package/dist/Layout/containerCorners.stylex.d.ts.map +1 -1
- package/dist/Layout/containerCorners.stylex.js +16 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +324 -6
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +14 -6
- package/dist/List/ListContext.d.ts +38 -1
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +50 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +85 -96
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +12 -5
- package/dist/Markdown/plugins/protocol.js +3 -3
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +11 -3
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +6 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +33 -9
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +5 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
- package/dist/NavMenu/NavMenuContext.d.ts +7 -0
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +9 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +8 -2
- package/dist/Outline/Outline.d.ts +7 -3
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +11 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +6 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +51 -25
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +33 -13
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +5 -1
- package/dist/Popover/popoverAnchor.d.ts +11 -0
- package/dist/Popover/popoverAnchor.d.ts.map +1 -0
- package/dist/Popover/popoverAnchor.js +33 -0
- package/dist/Popover/usePopover.d.ts +20 -3
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +110 -10
- package/dist/PowerSearch/PowerSearch.d.ts +1 -0
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +46 -9
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +7 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -4
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +6 -13
- package/dist/ProgressBar/ProgressBar.d.ts +5 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +26 -26
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +51 -0
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -1
- package/dist/Resizable/resizableModel.d.ts +45 -3
- package/dist/Resizable/resizableModel.d.ts.map +1 -1
- package/dist/Resizable/resizableModel.js +91 -3
- package/dist/Resizable/resizeGesture.d.ts +3 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -1
- package/dist/Resizable/resizeGesture.js +6 -0
- package/dist/Resizable/useResizable.d.ts +1 -33
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +8 -72
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +27 -5
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +70 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +34 -14
- package/dist/Selector/hooks.d.ts +5 -0
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +72 -16
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +9 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +18 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +47 -33
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +21 -12
- package/dist/Swipe/useSwipeAction.js +3 -3
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +64 -46
- package/dist/Switch/useSwitchTouch.d.ts +22 -1
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +54 -3
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +3 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +37 -18
- package/dist/Table/Table.d.ts +4 -3
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +32 -14
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -0
- package/dist/Table/TableHeaderCell.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +42 -9
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +9 -1
- package/dist/Table/TableRowPlacementContext.d.ts +18 -0
- package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
- package/dist/Table/TableRowPlacementContext.js +41 -0
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +7 -0
- package/dist/Table/columnUtils.d.ts +5 -0
- package/dist/Table/columnUtils.d.ts.map +1 -1
- package/dist/Table/columnUtils.js +9 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +8 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +10 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +2 -1
- package/dist/Table/table.stylex.d.ts +31 -5
- package/dist/Table/table.stylex.d.ts.map +1 -1
- package/dist/Table/table.stylex.js +33 -5
- package/dist/Table/types.d.ts +3 -1
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.js +17 -6
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +23 -4
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -1
- package/dist/TextInput/TextInput.d.ts +9 -3
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +19 -18
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +13 -4
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +10 -7
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +55 -4
- package/dist/Toast/Toast.d.ts +1 -6
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +77 -44
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +48 -21
- package/dist/Toast/types.d.ts +8 -0
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +14 -7
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +2 -1
- package/dist/Token/Token.d.ts +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -2
- package/dist/Tokenizer/Tokenizer.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +102 -62
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +33 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +20 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +24 -8
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +21 -9
- package/dist/TopNav/TopNavMegaMenu.js +1 -1
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +9 -2
- package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +24 -9
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +7 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +20 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +24 -9
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +7 -0
- package/dist/astryx.css +211 -56
- package/dist/gestures/GestureHost.d.ts +7 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +37 -0
- package/dist/hooks/anchoredHint.d.ts.map +1 -1
- package/dist/hooks/anchoredHint.js +0 -1
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +7 -0
- package/dist/hooks/focusableSelector.d.ts +16 -9
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +53 -2
- package/dist/hooks/scrollEdgeFade.d.ts +34 -0
- package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
- package/dist/hooks/scrollEdgeFade.js +173 -0
- package/dist/hooks/statusButtonPress.d.ts +15 -0
- package/dist/hooks/statusButtonPress.d.ts.map +1 -0
- package/dist/hooks/statusButtonPress.js +19 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +2 -1
- package/dist/hooks/useFocusTrap.d.ts +26 -16
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +75 -112
- package/dist/hooks/useGroupPressTracking.d.ts +1 -1
- package/dist/hooks/useGroupPressTracking.js +1 -1
- package/dist/hooks/useOverflow.d.ts +25 -2
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +137 -8
- package/dist/hooks/useResolvedRequired.d.ts +27 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +30 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +4 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +8 -8
- package/dist/i18n/InternationalizationContext.d.ts +13 -6
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +11 -6
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +7 -0
- package/dist/i18n/defaultTranslator.d.ts +17 -0
- package/dist/i18n/defaultTranslator.d.ts.map +1 -0
- package/dist/i18n/defaultTranslator.js +18 -0
- package/dist/i18n/firstStrongDirection.d.ts +3 -2
- package/dist/i18n/firstStrongDirection.d.ts.map +1 -1
- package/dist/i18n/firstStrongDirection.js +50 -12
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +1 -2
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +1 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +2 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +2 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Slider/Slider.generated.js +2 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +1 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +9 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +9 -0
- package/dist/i18n/publicContext.d.ts.map +1 -1
- package/dist/i18n/publicContext.js +4 -2
- package/dist/i18n/translatingContext.d.ts +2 -0
- package/dist/i18n/translatingContext.d.ts.map +1 -0
- package/dist/i18n/translatingContext.js +25 -0
- package/dist/i18n/useComponentTranslator.d.ts.map +1 -1
- package/dist/i18n/useComponentTranslator.js +3 -2
- package/dist/i18n/useListFormatter.d.ts.map +1 -1
- package/dist/i18n/useListFormatter.js +3 -2
- package/dist/i18n/useTranslator.d.ts.map +1 -1
- package/dist/i18n/useTranslator.js +3 -2
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +5 -1
- package/dist/keyboard/keyboardHeight.d.ts +34 -3
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -1
- package/dist/keyboard/keyboardHeight.js +101 -24
- package/dist/keyboard/keyboardTarget.d.ts +19 -16
- package/dist/keyboard/keyboardTarget.d.ts.map +1 -1
- package/dist/keyboard/keyboardTarget.js +529 -72
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -1
- package/dist/keyboard/useMobileKeyboard.js +1 -8
- package/dist/palette/color.d.ts +23 -0
- package/dist/palette/color.d.ts.map +1 -0
- package/dist/palette/color.js +126 -0
- package/dist/palette/generator.d.ts +69 -0
- package/dist/palette/generator.d.ts.map +1 -0
- package/dist/palette/generator.js +778 -0
- package/dist/palette/index.d.ts +12 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/index.js +13 -0
- package/dist/palette/mapping.d.ts +319 -0
- package/dist/palette/mapping.d.ts.map +1 -0
- package/dist/palette/mapping.js +1312 -0
- package/dist/palette/themePalette.d.ts +20 -0
- package/dist/palette/themePalette.d.ts.map +1 -0
- package/dist/palette/themePalette.js +145 -0
- package/dist/palette/types.d.ts +178 -0
- package/dist/palette/types.d.ts.map +1 -0
- package/dist/palette/types.js +1 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
- package/dist/privateAttributes/mediaDarkPage.js +27 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
- package/dist/privateAttributes/scheme.d.ts +10 -0
- package/dist/privateAttributes/scheme.d.ts.map +1 -0
- package/dist/privateAttributes/scheme.js +34 -0
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/travelling.stylex.js +2 -2
- package/dist/theme/MediaDarkPage.d.ts +18 -0
- package/dist/theme/MediaDarkPage.d.ts.map +1 -0
- package/dist/theme/MediaDarkPage.js +35 -0
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +9 -1
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +99 -31
- package/dist/theme/defineTheme.d.ts +31 -6
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +65 -29
- package/dist/theme/derivedVarRegistry.d.ts +19 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +49 -4
- package/dist/theme/expandRadiusScale.d.ts +1 -2
- package/dist/theme/expandRadiusScale.d.ts.map +1 -1
- package/dist/theme/expandRadiusScale.js +1 -5
- package/dist/theme/generateThemeRules.d.ts +10 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +310 -207
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/invertedSurfaceSide.d.ts +17 -0
- package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
- package/dist/theme/invertedSurfaceSide.js +47 -0
- package/dist/theme/resolveThemeValues.d.ts +5 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +7 -1
- package/dist/theme/statusRoleDefaults.d.ts +43 -0
- package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
- package/dist/theme/statusRoleDefaults.js +196 -0
- package/dist/theme/statusRoleDerivation.d.ts +4 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
- package/dist/theme/statusRoleDerivation.js +3 -1
- package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +7 -0
- package/dist/theme/themeAdaptations.d.ts +24 -1
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +48 -5
- package/dist/theme/tokenDefaults.d.ts +3 -0
- package/dist/theme/tokenDefaults.d.ts.map +1 -0
- package/dist/theme/tokenDefaults.js +30 -0
- package/dist/theme/tokenValues.d.ts +26 -0
- package/dist/theme/tokenValues.d.ts.map +1 -0
- package/dist/theme/tokenValues.js +180 -0
- package/dist/theme/tokens.d.ts +3 -2
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +7 -161
- package/dist/theme/tokens.stylex.d.ts +4 -4
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +7 -5
- package/dist/theme/useTheme.d.ts +40 -3
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +137 -32
- package/dist/utils/devWarning.d.ts +17 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +20 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +7 -4
- package/dist/utils/focusReturn.d.ts +110 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +418 -12
- package/dist/utils/hitArea.d.ts +28 -0
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +52 -18
- package/dist/utils/inputStream.d.ts +27 -0
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +72 -5
- package/dist/utils/nodeType.d.ts +2 -0
- package/dist/utils/nodeType.d.ts.map +1 -1
- package/dist/utils/nodeType.js +10 -0
- package/dist/utils/timeFormat.d.ts +14 -4
- package/dist/utils/timeFormat.d.ts.map +1 -1
- package/dist/utils/timeFormat.js +42 -4
- package/dist/utils/touchPresentation.d.ts +2 -2
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +10 -7
- package/dist/utils/touchPresentation.stylex.d.ts +4 -3
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +3 -3
- package/dist/utils/touchQueries.d.ts +3 -2
- package/dist/utils/touchQueries.d.ts.map +1 -1
- package/dist/utils/touchQueries.js +3 -2
- package/dist/utils/typeaheadMatch.d.ts +13 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -1
- package/dist/utils/typeaheadMatch.js +15 -1
- package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
- package/dist/virtualization/useInlineListWindow.js +38 -22
- package/locales/en.json +36 -0
- package/locales/pseudo.json +27 -0
- package/package.json +10 -5
- package/scripts/agent-doc-state.mjs +71 -4
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -1
- package/src/AlertDialog/AlertDialog.tsx +34 -7
- package/src/AppShell/AppShell.doc.mjs +22 -0
- package/src/AppShell/AppShell.tsx +112 -65
- package/src/AppShell/unreadWidthPoint.ts +162 -0
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +6 -1
- package/src/Badge/Badge.tsx +5 -2
- package/src/Banner/Banner.doc.mjs +15 -0
- package/src/Banner/Banner.tsx +56 -45
- package/src/BottomSheet/BottomSheet.doc.mjs +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +15 -7
- package/src/BottomSheet/BottomSheetSwitcher.tsx +73 -1
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +6 -14
- package/src/Breadcrumbs/BreadcrumbItem.tsx +14 -1
- package/src/Button/Button.doc.mjs +6 -0
- package/src/Button/Button.tsx +6 -0
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.tsx +32 -20
- package/src/Calendar/styles.ts +12 -3
- package/src/Card/Card.doc.mjs +2 -2
- package/src/Card/Card.tsx +22 -3
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposer.doc.mjs +3 -3
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +11 -7
- package/src/Chat/ChatDictationButton.tsx +12 -0
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatPastedTextToken.tsx +3 -9
- package/src/Chat/ChatSendButton.tsx +5 -0
- package/src/Chat/ChatSystemMessage.tsx +1 -0
- package/src/Chat/ChatToolCalls.tsx +16 -0
- package/src/Chat/pastedTextLabel.ts +23 -0
- package/src/Chat/useChatPasteAsToken.ts +9 -8
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
- package/src/CheckboxInput/CheckboxInput.tsx +83 -26
- package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +16 -1
- package/src/CodeBlock/CodeBlock.tsx +29 -2
- package/src/Collapsible/Collapsible.tsx +2 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
- package/src/ComplexSelector/ComplexSelector.tsx +19 -1
- package/src/ContextMenu/ContextMenu.doc.mjs +5 -1
- package/src/ContextMenu/ContextMenu.tsx +44 -5
- package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
- package/src/DateInput/MonthScroller.tsx +1 -0
- package/src/DateInput/PickerWheel.tsx +1 -0
- package/src/DateInput/TouchDateField.tsx +2 -0
- package/src/DateInput/Wheel.tsx +1 -0
- package/src/DateInput/usePointerDragScroll.ts +6 -2
- package/src/DateRangeInput/DateRangeInput.tsx +16 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- package/src/Dialog/Dialog.doc.mjs +11 -1
- package/src/Dialog/Dialog.tsx +116 -19
- package/src/Dialog/DialogContext.ts +5 -4
- package/src/Dialog/DialogHeader.tsx +50 -12
- package/src/Drawer/DrawerHeader.tsx +31 -6
- package/src/DropdownMenu/DropdownMenu.doc.mjs +20 -1
- package/src/DropdownMenu/DropdownMenu.tsx +29 -22
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +3 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +23 -1
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
- package/src/DropdownMenu/menuRowCorners.stylex.ts +40 -0
- package/src/EmptyState/EmptyState.tsx +2 -0
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +9 -2
- package/src/Field/inputDisabledFocus.ts +18 -0
- package/src/Field/inputStyles.stylex.ts +52 -1
- package/src/Grid/Grid.doc.mjs +6 -3
- package/src/Grid/Grid.tsx +5 -2
- package/src/Heading/Heading.tsx +24 -1
- package/src/Icon/Icon.doc.mjs +1 -1
- package/src/Icon/Icon.tsx +40 -2
- package/src/Indicator/CheckboxIndicator.tsx +11 -6
- package/src/Indicator/Indicator.doc.mjs +1 -1
- package/src/Indicator/RadioIndicator.tsx +31 -4
- package/src/Indicator/indicatorRegistry.ts +7 -23
- package/src/Indicator/themeIndicators.ts +29 -0
- package/src/Indicator/types.ts +14 -0
- package/src/Indicator/useThemeIndicator.ts +24 -0
- package/src/Item/Item.doc.mjs +3 -3
- package/src/Item/Item.tsx +48 -7
- package/src/Kbd/Kbd.doc.mjs +6 -2
- package/src/Kbd/Kbd.tsx +16 -1
- package/src/Layer/layerExitCopy.ts +0 -1
- package/src/Layer/layerSlideRules.ts +62 -74
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.tsx +293 -137
- package/src/Layer/useLayerKeyboardClearance.ts +9 -12
- package/src/Layout/Layout.doc.mjs +3 -3
- package/src/Layout/LayoutContainerContext.ts +27 -0
- package/src/Layout/LayoutContainerScope.tsx +32 -0
- package/src/Layout/LayoutContent.tsx +5 -2
- package/src/Layout/LayoutFooter.tsx +3 -1
- package/src/Layout/LayoutHeader.tsx +3 -1
- package/src/Layout/containerCorners.stylex.ts +44 -7
- package/src/Lightbox/Lightbox.tsx +460 -8
- package/src/Link/Link.doc.mjs +18 -0
- package/src/Link/Link.tsx +3 -1
- package/src/List/List.tsx +14 -2
- package/src/List/ListContext.tsx +60 -1
- package/src/List/ListItem.doc.mjs +11 -9
- package/src/List/ListItem.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +1 -1
- package/src/Markdown/Markdown.tsx +189 -190
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +14 -4
- package/src/Markdown/plugins/protocol.ts +3 -3
- package/src/MetadataList/MetadataListItem.tsx +18 -3
- package/src/MobileNav/MobileNav.doc.mjs +134 -52
- package/src/MobileNav/MobileNav.tsx +13 -9
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +51 -8
- package/src/NavMenu/NavHeadingMenu.tsx +5 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
- package/src/NavMenu/NavMenu.doc.mjs +105 -2
- package/src/NavMenu/NavMenuContext.tsx +13 -0
- package/src/NumberInput/NumberInput.doc.mjs +12 -10
- package/src/NumberInput/NumberInput.tsx +19 -11
- package/src/Outline/Outline.doc.mjs +26 -8
- package/src/Outline/Outline.tsx +35 -5
- package/src/Outline/useScrollSpy.ts +8 -3
- package/src/OverflowList/OverflowList.doc.mjs +15 -0
- package/src/OverflowList/OverflowList.tsx +62 -26
- package/src/Pagination/Pagination.doc.mjs +12 -0
- package/src/Pagination/Pagination.tsx +40 -6
- package/src/Popover/Popover.doc.mjs +10 -0
- package/src/Popover/Popover.tsx +8 -4
- package/src/Popover/popoverAnchor.ts +47 -0
- package/src/Popover/usePopover.doc.mjs +16 -2
- package/src/Popover/usePopover.tsx +152 -16
- package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
- package/src/PowerSearch/PowerSearch.tsx +65 -12
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +12 -0
- package/src/PowerSearch/PowerSearchToken.tsx +12 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +14 -19
- package/src/ProgressBar/ProgressBar.doc.mjs +2 -2
- package/src/ProgressBar/ProgressBar.tsx +44 -30
- package/src/RadioList/RadioList.tsx +63 -0
- package/src/RadioList/RadioListItem.tsx +4 -1
- package/src/Resizable/ResizeHandle.tsx +2 -3
- package/src/Resizable/resizableModel.ts +105 -3
- package/src/Resizable/resizeGesture.ts +14 -0
- package/src/Resizable/useResizable.ts +14 -75
- package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +76 -12
- package/src/Selector/Selector.doc.mjs +34 -7
- package/src/Selector/Selector.tsx +55 -25
- package/src/Selector/SelectorOption.doc.mjs +5 -5
- package/src/Selector/hooks.ts +92 -17
- package/src/Selector/useSelectorPresentation.ts +18 -3
- package/src/SideNav/SideNavHeading.tsx +15 -4
- package/src/SideNav/SideNavItem.doc.mjs +10 -10
- package/src/Slider/Slider.tsx +4 -1
- package/src/Spinner/Spinner.tsx +56 -41
- package/src/Stepper/Step.tsx +18 -3
- package/src/Stepper/Stepper.doc.mjs +14 -2
- package/src/Swipe/useSwipeAction.ts +3 -3
- package/src/Switch/Switch.doc.mjs +61 -5
- package/src/Switch/Switch.tsx +72 -35
- package/src/Switch/useSwitchTouch.ts +68 -3
- package/src/TabList/Tab.tsx +6 -0
- package/src/Table/BaseTable.tsx +73 -35
- package/src/Table/Table.doc.mjs +109 -5
- package/src/Table/Table.tsx +42 -17
- package/src/Table/TableBody.tsx +10 -1
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +52 -7
- package/src/Table/TableRow.tsx +8 -1
- package/src/Table/TableRowPlacementContext.ts +58 -0
- package/src/Table/TableSelectionToolbar.tsx +12 -0
- package/src/Table/columnUtils.ts +9 -1
- package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
- package/src/Table/plugins/sortable/useTableSortable.tsx +15 -2
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +5 -5
- package/src/Table/plugins/sortable/useTableSortableState.tsx +15 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +2 -4
- package/src/Table/table.stylex.ts +44 -5
- package/src/Table/types.ts +3 -1
- package/src/Table/useTableColumnResize.doc.mjs +3 -3
- package/src/Table/useTableColumnSettings.doc.mjs +3 -3
- package/src/Table/useTableFilterState.doc.mjs +6 -3
- package/src/Table/useTableFiltering.doc.mjs +71 -4
- package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
- package/src/Table/useTablePagination.doc.mjs +24 -3
- package/src/Table/useTableSelection.doc.mjs +30 -6
- package/src/Table/useTableSelectionState.doc.mjs +30 -2
- package/src/Table/useTableSortable.doc.mjs +104 -17
- package/src/Table/useTableStickyColumns.doc.mjs +3 -3
- package/src/Text/Heading.doc.mjs +2 -2
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/TruncationTooltip.tsx +18 -11
- package/src/Text/useTruncation.ts +20 -4
- package/src/TextArea/TextArea.doc.mjs +5 -5
- package/src/TextArea/TextArea.tsx +20 -1
- package/src/TextInput/TextInput.doc.mjs +5 -5
- package/src/TextInput/TextInput.tsx +23 -18
- package/src/Thumbnail/Thumbnail.tsx +2 -1
- package/src/Timer/Timer.tsx +21 -6
- package/src/Timestamp/Timestamp.tsx +67 -4
- package/src/Toast/Toast.doc.mjs +15 -5
- package/src/Toast/Toast.tsx +83 -62
- package/src/Toast/ToastViewport.tsx +62 -23
- package/src/Toast/types.ts +8 -0
- package/src/Toast/useToast.doc.mjs +80 -15
- package/src/Toast/useToast.tsx +18 -7
- package/src/ToggleButton/ToggleButton.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.tsx +1 -0
- package/src/Token/Token.tsx +5 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -3
- package/src/Tokenizer/Tokenizer.tsx +130 -75
- package/src/Toolbar/Toolbar.tsx +55 -4
- package/src/Tooltip/useTooltip.tsx +26 -0
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.tsx +13 -3
- package/src/TopNav/TopNavHeading.tsx +22 -9
- package/src/TopNav/TopNavMegaMenu.tsx +4 -4
- package/src/TopNav/TopNavMenu.tsx +13 -0
- package/src/TopNav/TopNavRenderContext.ts +30 -9
- package/src/TreeList/TreeList.tsx +12 -0
- package/src/TreeList/TreeListItem.tsx +26 -5
- package/src/Typeahead/BaseTypeahead.doc.mjs +6 -0
- package/src/Typeahead/BaseTypeahead.tsx +2 -0
- package/src/Typeahead/Typeahead.doc.mjs +15 -2
- package/src/Typeahead/Typeahead.tsx +37 -13
- package/src/Typeahead/TypeaheadItem.tsx +12 -0
- package/src/gestures/GestureHost.ts +34 -0
- package/src/gestures/README.md +9 -6
- package/src/hooks/anchoredHint.tsx +1 -2
- package/src/hooks/computeOverflow.ts +10 -0
- package/src/hooks/focusableSelector.ts +59 -2
- package/src/hooks/scrollEdgeFade.ts +129 -0
- package/src/hooks/statusButtonPress.ts +26 -0
- package/src/hooks/useAnnounce.ts +2 -1
- package/src/hooks/useFocusTrap.ts +110 -141
- package/src/hooks/useGroupPressTracking.ts +1 -1
- package/src/hooks/useOverflow.ts +227 -13
- package/src/hooks/useResolvedRequired.ts +50 -1
- package/src/hooks/useTreeFocus.ts +8 -4
- package/src/hooks/useTypeahead.ts +12 -10
- package/src/i18n/InternationalizationContext.ts +16 -7
- package/src/i18n/InternationalizationProvider.doc.mjs +1 -1
- package/src/i18n/InternationalizationProvider.tsx +12 -0
- package/src/i18n/defaultTranslator.ts +25 -0
- package/src/i18n/firstStrongDirection.ts +54 -13
- package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +1 -2
- package/src/i18n/generated-english/Chat/pastedTextLabel.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +1 -0
- package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +2 -1
- package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +2 -1
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +2 -1
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
- package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +1 -0
- package/src/i18n/generated-locales/en.generated.ts +11 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +11 -0
- package/src/i18n/publicContext.ts +4 -2
- package/src/i18n/translatingContext.ts +28 -0
- package/src/i18n/useComponentTranslator.ts +3 -2
- package/src/i18n/useListFormatter.ts +3 -2
- package/src/i18n/useTranslator.ts +3 -2
- package/src/internal/touch.ts +7 -0
- package/src/keyboard/README.md +58 -16
- package/src/keyboard/keyboardHeight.ts +138 -26
- package/src/keyboard/keyboardTarget.ts +667 -71
- package/src/keyboard/useMobileKeyboard.ts +1 -7
- package/src/palette/color.ts +205 -0
- package/src/palette/generator.ts +1134 -0
- package/src/palette/index.ts +35 -0
- package/src/palette/mapping.ts +1630 -0
- package/src/palette/themePalette.ts +175 -0
- package/src/palette/types.ts +194 -0
- package/src/privateAttributes/mediaDarkPage.ts +27 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
- package/src/privateAttributes/scheme.ts +37 -0
- package/src/privateAttributes/travelling.stylex.ts +6 -4
- package/src/reset.css +1 -1
- package/src/theme/MediaDarkPage.tsx +41 -0
- package/src/theme/MediaTheme.tsx +8 -1
- package/src/theme/Theme.doc.mjs +4 -4
- package/src/theme/Theme.tsx +140 -35
- package/src/theme/defineTheme.ts +103 -40
- package/src/theme/derivedVarRegistry.ts +61 -4
- package/src/theme/expandRadiusScale.ts +1 -5
- package/src/theme/generateThemeRules.ts +398 -342
- package/src/theme/index.ts +2 -4
- package/src/theme/invertedSurfaceSide.ts +65 -0
- package/src/theme/resolveThemeValues.ts +8 -2
- package/src/theme/statusRoleDefaults.ts +330 -0
- package/src/theme/statusRoleDerivation.ts +2 -1
- package/src/theme/syntax/SyntaxTheme.tsx +12 -0
- package/src/theme/themeAdaptations.ts +53 -5
- package/src/theme/tokenDefaults.ts +44 -0
- package/src/theme/tokenValues.ts +193 -0
- package/src/theme/tokens.stylex.ts +7 -5
- package/src/theme/tokens.ts +14 -176
- package/src/theme/useTheme.ts +164 -35
- package/src/utils/devWarning.ts +24 -0
- package/src/utils/focusOutline.stylex.ts +7 -4
- package/src/utils/focusReturn.ts +578 -16
- package/src/utils/hitArea.ts +70 -33
- package/src/utils/inputStream.ts +81 -5
- package/src/utils/nodeType.ts +10 -0
- package/src/utils/timeFormat.ts +54 -4
- package/src/utils/touchPresentation.stylex.ts +7 -6
- package/src/utils/touchPresentation.ts +10 -7
- package/src/utils/touchQueries.ts +3 -2
- package/src/utils/typeaheadMatch.ts +20 -1
- package/src/virtualization/useInlineListWindow.ts +57 -33
|
@@ -60,9 +60,9 @@ import {inputDisabledFocusStyles} from '../Field/inputDisabledFocus';
|
|
|
60
60
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
61
61
|
import {
|
|
62
62
|
useScrollableArea,
|
|
63
|
-
type ScrollAxisState,
|
|
64
63
|
type UseScrollableAreaResult,
|
|
65
64
|
} from '../hooks/useScrollableArea';
|
|
65
|
+
import {scrollEdgeFadeStyles} from '../hooks/scrollEdgeFade';
|
|
66
66
|
import {hasInteractiveAncestor} from '../hooks/useClickableContainer';
|
|
67
67
|
import {TokenizerClearAllMessageContext} from './TokenizerClearAllMessageContext';
|
|
68
68
|
import {TokenizerItemRemovableContext} from './TokenizerItemRemovableContext';
|
|
@@ -72,8 +72,10 @@ import {
|
|
|
72
72
|
useAdaptivePresentation,
|
|
73
73
|
} from '../hooks/useAdaptivePresentation';
|
|
74
74
|
import {useIsHydrating} from '../hooks/useIsHydrating';
|
|
75
|
+
import {useInputStatusIcon} from '../hooks/useInputStatusIcon';
|
|
76
|
+
import {isStatusButtonPress} from '../hooks/statusButtonPress';
|
|
75
77
|
import {VisuallyHidden} from '../VisuallyHidden';
|
|
76
|
-
import {warnOnce} from '../utils/devWarning';
|
|
78
|
+
import {devPropError, warnOnce} from '../utils/devWarning';
|
|
77
79
|
import {FOCUSABLE_SELECTOR} from '../hooks/focusableSelector';
|
|
78
80
|
import {useInteractionModalityTracking} from '../utils/interactionModality';
|
|
79
81
|
import type {SizeValue} from '../utils/types';
|
|
@@ -132,6 +134,10 @@ import {
|
|
|
132
134
|
import english from '../i18n/generated-english/Tokenizer/Tokenizer.generated';
|
|
133
135
|
import {isRenderable} from '../utils/isRenderable';
|
|
134
136
|
|
|
137
|
+
// Bundlers replace this value at build time. The declaration lets a product
|
|
138
|
+
// without Node's types type-check this file.
|
|
139
|
+
declare const process: {readonly env: {readonly NODE_ENV?: string}};
|
|
140
|
+
|
|
135
141
|
registerEnglishFallback(english);
|
|
136
142
|
|
|
137
143
|
// Re-export status types for convenience
|
|
@@ -280,8 +286,8 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<
|
|
|
280
286
|
/**
|
|
281
287
|
* Whether the input is disabled. The disabled input keeps its tab stop: it
|
|
282
288
|
* is announced as disabled (`aria-disabled`), is read-only, and opens and
|
|
283
|
-
* picks nothing. With `tokenOverflowBehavior="unfocusedLayer"
|
|
284
|
-
*
|
|
289
|
+
* picks nothing. With `tokenOverflowBehavior="unfocusedLayer"`, the
|
|
290
|
+
* collapsed field's placeholder keeps that tab stop.
|
|
285
291
|
* @default false
|
|
286
292
|
*/
|
|
287
293
|
isDisabled?: boolean;
|
|
@@ -426,8 +432,6 @@ const TOKEN_ROW_INSET = `calc(${spacingVars['--spacing-1']} - 1px)`;
|
|
|
426
432
|
* padding.
|
|
427
433
|
*/
|
|
428
434
|
const TRACK_FADE_INSET = `calc(${TOKEN_ROW_INSET} + ${spacingVars['--spacing-6']})`;
|
|
429
|
-
const TRACK_FADE_FROM_LEFT = `linear-gradient(to right, transparent ${TOKEN_ROW_INSET}, black ${TRACK_FADE_INSET})`;
|
|
430
|
-
const TRACK_FADE_FROM_RIGHT = `linear-gradient(to left, transparent ${TOKEN_ROW_INSET}, black ${TRACK_FADE_INSET})`;
|
|
431
435
|
// Kept in sync with useEndLaneReserve: wrapperWithTokens reads the custom
|
|
432
436
|
// property directly, to keep token rows and the input short of the lane.
|
|
433
437
|
const END_LANE_RESERVE_VAR = '--_tokenizer-end-lane-reserve';
|
|
@@ -477,6 +481,11 @@ const styles = stylex.create({
|
|
|
477
481
|
position: 'relative',
|
|
478
482
|
zIndex: 1,
|
|
479
483
|
},
|
|
484
|
+
// Holds the sheet field's status icon without a box of its own, so the icon
|
|
485
|
+
// stays a direct item of the end lane.
|
|
486
|
+
statusIconSlot: {
|
|
487
|
+
display: 'contents',
|
|
488
|
+
},
|
|
480
489
|
endSection: {
|
|
481
490
|
position: 'absolute',
|
|
482
491
|
// Match the field's inline padding (inputWrapperStyles.base uses
|
|
@@ -582,6 +591,10 @@ const styles = stylex.create({
|
|
|
582
591
|
'@media (forced-colors: active)': 'thin',
|
|
583
592
|
},
|
|
584
593
|
scrollPaddingInline: TRACK_FADE_INSET,
|
|
594
|
+
// The shared edge fade keeps a clear band across the strip's focus-ring
|
|
595
|
+
// bleed, so a faded edge never paints into the row's focus ring.
|
|
596
|
+
'--_scroll-fade-inset': TOKEN_ROW_INSET,
|
|
597
|
+
'--_scroll-fade-length': spacingVars['--spacing-6'],
|
|
585
598
|
},
|
|
586
599
|
inGroupTrackContent: {
|
|
587
600
|
display: 'flex',
|
|
@@ -596,34 +609,6 @@ const styles = stylex.create({
|
|
|
596
609
|
// The "+N more" summary measures this box, so it holds the track's width.
|
|
597
610
|
width: '100%',
|
|
598
611
|
},
|
|
599
|
-
// Each fade masks an edge that hides tokens. Forced colors drop the fades,
|
|
600
|
-
// since the native scrollbar is back there.
|
|
601
|
-
trackFadeStart: {
|
|
602
|
-
maskImage: {
|
|
603
|
-
default: TRACK_FADE_FROM_LEFT,
|
|
604
|
-
':dir(rtl)': {
|
|
605
|
-
default: TRACK_FADE_FROM_RIGHT,
|
|
606
|
-
'@media (forced-colors: active)': 'none',
|
|
607
|
-
},
|
|
608
|
-
'@media (forced-colors: active)': 'none',
|
|
609
|
-
},
|
|
610
|
-
},
|
|
611
|
-
trackFadeEnd: {
|
|
612
|
-
maskImage: {
|
|
613
|
-
default: TRACK_FADE_FROM_RIGHT,
|
|
614
|
-
':dir(rtl)': {
|
|
615
|
-
default: TRACK_FADE_FROM_LEFT,
|
|
616
|
-
'@media (forced-colors: active)': 'none',
|
|
617
|
-
},
|
|
618
|
-
'@media (forced-colors: active)': 'none',
|
|
619
|
-
},
|
|
620
|
-
},
|
|
621
|
-
trackFadeBoth: {
|
|
622
|
-
maskImage: {
|
|
623
|
-
default: `linear-gradient(to right, transparent ${TOKEN_ROW_INSET}, black ${TRACK_FADE_INSET}, black calc(100% - ${TRACK_FADE_INSET}), transparent calc(100% - ${TOKEN_ROW_INSET}))`,
|
|
624
|
-
'@media (forced-colors: active)': 'none',
|
|
625
|
-
},
|
|
626
|
-
},
|
|
627
612
|
inGroupInput: {
|
|
628
613
|
// Always in flow after the last token. The empty-query hit surface of
|
|
629
614
|
// inputCompact keeps a wrapping field from growing a blank row; a grouped
|
|
@@ -656,6 +641,7 @@ const styles = stylex.create({
|
|
|
656
641
|
flexShrink: 0,
|
|
657
642
|
whiteSpace: 'nowrap',
|
|
658
643
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
644
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
659
645
|
color: colorVars['--color-text-secondary'],
|
|
660
646
|
paddingInline: spacingVars['--spacing-1'],
|
|
661
647
|
},
|
|
@@ -929,19 +915,6 @@ function EndLane({
|
|
|
929
915
|
);
|
|
930
916
|
}
|
|
931
917
|
|
|
932
|
-
function trackFade(inline: ScrollAxisState) {
|
|
933
|
-
if (!inline.isScrollable) {
|
|
934
|
-
return null;
|
|
935
|
-
}
|
|
936
|
-
if (!inline.atStart && !inline.atEnd) {
|
|
937
|
-
return styles.trackFadeBoth;
|
|
938
|
-
}
|
|
939
|
-
if (!inline.atStart) {
|
|
940
|
-
return styles.trackFadeStart;
|
|
941
|
-
}
|
|
942
|
-
return inline.atEnd ? null : styles.trackFadeEnd;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
918
|
/**
|
|
946
919
|
* Keyboard focus in a grouped track brings the whole item it lands in into
|
|
947
920
|
* view, clear of the fades: the track's scroll padding is the fade width.
|
|
@@ -989,7 +962,10 @@ function TokenTrack({
|
|
|
989
962
|
{...scrollArea.getViewportProps<HTMLDivElement>({
|
|
990
963
|
ref: trackRef,
|
|
991
964
|
onFocus: revealFocusedItem,
|
|
992
|
-
xstyle: [
|
|
965
|
+
xstyle: [
|
|
966
|
+
styles.inGroupTrack,
|
|
967
|
+
scrollEdgeFadeStyles(scrollArea.state.inline, 'hidden'),
|
|
968
|
+
],
|
|
993
969
|
})}>
|
|
994
970
|
<div
|
|
995
971
|
{...scrollArea.getContentProps<HTMLDivElement>(
|
|
@@ -1067,6 +1043,13 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1067
1043
|
'aria-labelledby': ariaLabelledByProp,
|
|
1068
1044
|
...restProps
|
|
1069
1045
|
}: TokenizerProps<T> | TokenizerAcceptedProps<T>): React.JSX.Element {
|
|
1046
|
+
if (process.env.NODE_ENV !== 'production' && !Array.isArray(value)) {
|
|
1047
|
+
throw devPropError(
|
|
1048
|
+
'Tokenizer',
|
|
1049
|
+
'value',
|
|
1050
|
+
'must be an array of the selected items, for example value={selected} with onChange={setSelected} and useState([]).',
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1070
1053
|
const isEffectivelyRequired = useResolvedRequired({isRequired, isOptional});
|
|
1071
1054
|
const {rest, container} = useFieldInputStyling('Tokenizer', restProps, {
|
|
1072
1055
|
containerXstyle,
|
|
@@ -1383,10 +1366,13 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1383
1366
|
// disabled-message tooltip, whose handlers are gated internally by
|
|
1384
1367
|
// isEnabled, so attaching unconditionally is safe.
|
|
1385
1368
|
const tooltipAnchorRef = disabledMessageTooltip.ref;
|
|
1369
|
+
const anchorsOnWrapper = tokenOverflowBehavior !== 'unfocusedLayer';
|
|
1386
1370
|
const wrapperCallbackRef = useCallback(
|
|
1387
1371
|
(el: HTMLDivElement | null) => {
|
|
1388
1372
|
wrapperRef.current = el;
|
|
1389
|
-
|
|
1373
|
+
if (anchorsOnWrapper) {
|
|
1374
|
+
tooltipAnchorRef(el);
|
|
1375
|
+
}
|
|
1390
1376
|
if (el == null) {
|
|
1391
1377
|
return;
|
|
1392
1378
|
}
|
|
@@ -1396,11 +1382,13 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1396
1382
|
isFocusPendingHandOffRef.current = true;
|
|
1397
1383
|
}
|
|
1398
1384
|
wrapperRef.current = null;
|
|
1399
|
-
|
|
1385
|
+
if (anchorsOnWrapper) {
|
|
1386
|
+
tooltipAnchorRef(null);
|
|
1387
|
+
}
|
|
1400
1388
|
releaseModality?.();
|
|
1401
1389
|
};
|
|
1402
1390
|
},
|
|
1403
|
-
[tooltipAnchorRef, modalityRef],
|
|
1391
|
+
[tooltipAnchorRef, modalityRef, anchorsOnWrapper],
|
|
1404
1392
|
);
|
|
1405
1393
|
|
|
1406
1394
|
// A swap also removes `endContent` and a custom token's remove. If focus is
|
|
@@ -1462,12 +1450,14 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1462
1450
|
const [laneRef, laneReserve] = useEndLaneReserve(END_LANE_INSET);
|
|
1463
1451
|
// `laneRef` publishes the lane's width, so token rows and the placeholder
|
|
1464
1452
|
// stop short of it. `sheetLaneRef` tells a tap in the lane from a tap on the
|
|
1465
|
-
// field
|
|
1453
|
+
// field, and `sheetStatusIconRef` tells a tap on the plain status icon from
|
|
1454
|
+
// a tap on `endContent`.
|
|
1466
1455
|
const sheetLaneRef = useRef<HTMLDivElement | null>(null);
|
|
1467
1456
|
const sheetLaneMergedRef = useMergedRefs<HTMLDivElement>(
|
|
1468
1457
|
laneRef,
|
|
1469
1458
|
sheetLaneRef,
|
|
1470
1459
|
);
|
|
1460
|
+
const sheetStatusIconRef = useRef<HTMLSpanElement | null>(null);
|
|
1471
1461
|
// A composing component can lock tokens (PowerSearch's read-only filters
|
|
1472
1462
|
// and read-only field). No remove path removes a locked token.
|
|
1473
1463
|
const isItemRemovable = use(TokenizerItemRemovableContext);
|
|
@@ -1480,7 +1470,14 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1480
1470
|
// busy state during this render, which is exactly the re-render the store
|
|
1481
1471
|
// exists to avoid.
|
|
1482
1472
|
const hasClearButton = hasClear && !isDisabled && value.some(canRemoveItem);
|
|
1483
|
-
const
|
|
1473
|
+
const {statusIcon, describedBy: statusTooltipDescribedBy} =
|
|
1474
|
+
useInputStatusIcon({
|
|
1475
|
+
status,
|
|
1476
|
+
statusVariant,
|
|
1477
|
+
isInGroup: !!inputGroup,
|
|
1478
|
+
});
|
|
1479
|
+
const hasStaticEndLane =
|
|
1480
|
+
Boolean(endContent || hasClearButton) || isRenderable(statusIcon);
|
|
1484
1481
|
const [isFocusedWithin, setIsFocusedWithin] = useState(false);
|
|
1485
1482
|
const isTruncated =
|
|
1486
1483
|
!isFocusedWithin && tokenOverflowBehavior !== 'none' && value.length > 0;
|
|
@@ -1491,14 +1488,15 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1491
1488
|
const layer = useLayer({mode: 'context'});
|
|
1492
1489
|
const layerContentRef = useRef<HTMLDivElement>(null);
|
|
1493
1490
|
|
|
1494
|
-
// Anchor the layer to the placeholder
|
|
1491
|
+
// Anchor the layer, and the disabled-message tooltip, to the placeholder.
|
|
1495
1492
|
const placeholderRef = useCallback(
|
|
1496
1493
|
(el: HTMLElement | null) => {
|
|
1497
1494
|
if (isLayerMode) {
|
|
1498
1495
|
layer.ref(el);
|
|
1496
|
+
tooltipAnchorRef(el);
|
|
1499
1497
|
}
|
|
1500
1498
|
},
|
|
1501
|
-
[isLayerMode, layer],
|
|
1499
|
+
[isLayerMode, layer, tooltipAnchorRef],
|
|
1502
1500
|
);
|
|
1503
1501
|
|
|
1504
1502
|
// For the layer variant, focus can be in either the placeholder or the
|
|
@@ -1539,8 +1537,9 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1539
1537
|
// Redirect to the input so the user doesn't have to tab through
|
|
1540
1538
|
// every token remove button. A press on a token's own control, and
|
|
1541
1539
|
// the menu returning focus to the token that opened it, keep focus
|
|
1542
|
-
// where they put it.
|
|
1543
|
-
//
|
|
1540
|
+
// where they put it. The status info-tip keeps focus from a press or
|
|
1541
|
+
// Shift+Tab, as it does on TextInput. A disabled grouped track that
|
|
1542
|
+
// takes focus keeps it: it is the keyboard path to its hidden tokens.
|
|
1544
1543
|
// In a grouped row, a move to the input also scrolls the strip to its
|
|
1545
1544
|
// end before the press releases, so a press on a token's remove
|
|
1546
1545
|
// button keeps its focus too. A finger's tap on a remove button with
|
|
@@ -1549,6 +1548,7 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1549
1548
|
if (
|
|
1550
1549
|
e.target !== inputRef.current &&
|
|
1551
1550
|
e.target !== trackRef.current &&
|
|
1551
|
+
!isStatusButtonPress(e.target, statusTooltipDescribedBy) &&
|
|
1552
1552
|
!(
|
|
1553
1553
|
readModality() === 'pointer' &&
|
|
1554
1554
|
(findTokenControl(e.target) != null ||
|
|
@@ -1570,6 +1570,7 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1570
1570
|
readModality,
|
|
1571
1571
|
findTokenControl,
|
|
1572
1572
|
wasKeyboardDown,
|
|
1573
|
+
statusTooltipDescribedBy,
|
|
1573
1574
|
],
|
|
1574
1575
|
);
|
|
1575
1576
|
|
|
@@ -1843,8 +1844,12 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1843
1844
|
(event: React.MouseEvent) => {
|
|
1844
1845
|
// The click has run, so a menu opened from it has read the control.
|
|
1845
1846
|
pressedTokenControlRef.current = null;
|
|
1846
|
-
// A click on a custom token's own control
|
|
1847
|
-
|
|
1847
|
+
// A click on a custom token's own control or on the status info-tip
|
|
1848
|
+
// leaves focus on that control.
|
|
1849
|
+
if (
|
|
1850
|
+
findTokenControl(event.target) != null ||
|
|
1851
|
+
isStatusButtonPress(event.target, statusTooltipDescribedBy)
|
|
1852
|
+
) {
|
|
1848
1853
|
return;
|
|
1849
1854
|
}
|
|
1850
1855
|
if (!isDisabled) {
|
|
@@ -1860,9 +1865,27 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1860
1865
|
}
|
|
1861
1866
|
}
|
|
1862
1867
|
},
|
|
1863
|
-
[
|
|
1868
|
+
[
|
|
1869
|
+
isDisabled,
|
|
1870
|
+
isLayerMode,
|
|
1871
|
+
layer,
|
|
1872
|
+
findTokenControl,
|
|
1873
|
+
statusTooltipDescribedBy,
|
|
1874
|
+
],
|
|
1864
1875
|
);
|
|
1865
1876
|
|
|
1877
|
+
// The collapsed placeholder is the field's tab stop. Its own focus opens
|
|
1878
|
+
// the field and moves focus to the input, as a click does. A focused token
|
|
1879
|
+
// inside it keeps focus.
|
|
1880
|
+
const handlePlaceholderFocus = (event: React.FocusEvent<HTMLDivElement>) => {
|
|
1881
|
+
if (event.target !== event.currentTarget || isDisabled) {
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
layer.show();
|
|
1885
|
+
setIsFocusedWithin(true);
|
|
1886
|
+
inputRef.current?.focus();
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1866
1889
|
// Inside an InputGroup no Field renders the local description or status —
|
|
1867
1890
|
// the group's are the ones shown — so neither is referenced or painted; the
|
|
1868
1891
|
// disabled reason is input-local and stays.
|
|
@@ -1872,7 +1895,12 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
1872
1895
|
inputLabelId,
|
|
1873
1896
|
[
|
|
1874
1897
|
!inputGroup && description ? descriptionId : null,
|
|
1875
|
-
|
|
1898
|
+
// The tooltip variant renders no message box; the info-tip's tooltip
|
|
1899
|
+
// describes the input instead.
|
|
1900
|
+
localStatus?.message && statusVariant !== 'tooltip'
|
|
1901
|
+
? statusMessageId
|
|
1902
|
+
: null,
|
|
1903
|
+
statusTooltipDescribedBy,
|
|
1876
1904
|
showsDisabledMessage ? disabledMessageTooltip.describedBy : null,
|
|
1877
1905
|
],
|
|
1878
1906
|
inputGroup,
|
|
@@ -2016,7 +2044,7 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2016
2044
|
behavior="observeParent"
|
|
2017
2045
|
overflowRenderer={items => (
|
|
2018
2046
|
<span {...stylex.props(styles.overflowText)}>
|
|
2019
|
-
|
|
2047
|
+
{t('@astryx.tokenizer.overflowCount', {count: items.length})}
|
|
2020
2048
|
</span>
|
|
2021
2049
|
)}>
|
|
2022
2050
|
{tokens}
|
|
@@ -2053,12 +2081,9 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2053
2081
|
minQueryLength={minQueryLength}
|
|
2054
2082
|
emptySearchText={emptySearchText}
|
|
2055
2083
|
isDisabled={isDisabled}
|
|
2056
|
-
// A disabled field keeps its tab stop (spec:AST-085 FR1)
|
|
2057
|
-
// unfocusedLayer mode
|
|
2058
|
-
|
|
2059
|
-
isFocusableDisabled={
|
|
2060
|
-
showsDisabledMessage || (isDisabled && !isLayerMode)
|
|
2061
|
-
}
|
|
2084
|
+
// A disabled field keeps its tab stop (spec:AST-085 FR1). In
|
|
2085
|
+
// unfocusedLayer mode the placeholder is that stop.
|
|
2086
|
+
isFocusableDisabled={isDisabled}
|
|
2062
2087
|
hasAutoFocus={hasAutoFocus}
|
|
2063
2088
|
inputId={inputId}
|
|
2064
2089
|
ariaLabelledBy={inputLabelledBy}
|
|
@@ -2138,6 +2163,7 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2138
2163
|
}}
|
|
2139
2164
|
/>
|
|
2140
2165
|
)}
|
|
2166
|
+
{statusIcon}
|
|
2141
2167
|
</EndLane>
|
|
2142
2168
|
</div>
|
|
2143
2169
|
);
|
|
@@ -2150,18 +2176,21 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2150
2176
|
triggerRef.current?.focus();
|
|
2151
2177
|
}
|
|
2152
2178
|
};
|
|
2153
|
-
// A tap on a token, the placeholder
|
|
2154
|
-
// on the trigger does. The trigger, `endContent
|
|
2155
|
-
// controls handle their own clicks.
|
|
2179
|
+
// A tap on a token, the placeholder, empty space or the plain status icon
|
|
2180
|
+
// opens the sheet, as a tap on the trigger does. The trigger, `endContent`,
|
|
2181
|
+
// the status info-tip and a custom token's controls handle their own clicks.
|
|
2156
2182
|
const handleSheetFieldClick = (event: React.MouseEvent<HTMLDivElement>) => {
|
|
2157
2183
|
const trigger = triggerRef.current;
|
|
2158
2184
|
const target = event.target;
|
|
2159
2185
|
if (trigger == null || !(target instanceof Element)) {
|
|
2160
2186
|
return;
|
|
2161
2187
|
}
|
|
2188
|
+
const isInLane = sheetLaneRef.current?.contains(target) === true;
|
|
2189
|
+
const isOnStatusIcon =
|
|
2190
|
+
sheetStatusIconRef.current?.contains(target) === true;
|
|
2162
2191
|
if (
|
|
2163
2192
|
trigger.contains(target) ||
|
|
2164
|
-
|
|
2193
|
+
(isInLane && !isOnStatusIcon) ||
|
|
2165
2194
|
hasInteractiveAncestor(target, event.currentTarget)
|
|
2166
2195
|
) {
|
|
2167
2196
|
return;
|
|
@@ -2343,11 +2372,16 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2343
2372
|
/>
|
|
2344
2373
|
),
|
|
2345
2374
|
)}
|
|
2346
|
-
{isRenderable(endContent) && (
|
|
2375
|
+
{(isRenderable(endContent) || isRenderable(statusIcon)) && (
|
|
2347
2376
|
<div
|
|
2348
2377
|
ref={sheetLaneMergedRef}
|
|
2349
2378
|
{...stylex.props(styles.endSection, endSectionSizeStyles[size])}>
|
|
2350
2379
|
{endContent}
|
|
2380
|
+
<span
|
|
2381
|
+
ref={sheetStatusIconRef}
|
|
2382
|
+
{...stylex.props(styles.statusIconSlot)}>
|
|
2383
|
+
{statusIcon}
|
|
2384
|
+
</span>
|
|
2351
2385
|
</div>
|
|
2352
2386
|
)}
|
|
2353
2387
|
</div>
|
|
@@ -2407,6 +2441,19 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2407
2441
|
<div
|
|
2408
2442
|
ref={placeholderRef}
|
|
2409
2443
|
onClick={handleWrapperClick}
|
|
2444
|
+
onFocus={handlePlaceholderFocus}
|
|
2445
|
+
// One keyboard stop for the collapsed field, before its tokens. A
|
|
2446
|
+
// named group, not a control: it holds the tokens' own controls.
|
|
2447
|
+
role="group"
|
|
2448
|
+
aria-labelledby={
|
|
2449
|
+
inputGroup ? inputLabelledBy : (fieldLabelledBy ?? fieldLabelId)
|
|
2450
|
+
}
|
|
2451
|
+
aria-describedby={
|
|
2452
|
+
[ariaDescribedByProp, ariaDescribedBy].filter(Boolean).join(' ') ||
|
|
2453
|
+
undefined
|
|
2454
|
+
}
|
|
2455
|
+
aria-disabled={isDisabled || undefined}
|
|
2456
|
+
tabIndex={isFocusedWithin ? -1 : 0}
|
|
2410
2457
|
{...mergeProps(
|
|
2411
2458
|
themeProps('tokenizer', {
|
|
2412
2459
|
size,
|
|
@@ -2421,6 +2468,8 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2421
2468
|
placeholderSizeStyle,
|
|
2422
2469
|
isTruncated && styles.truncatedWrapper,
|
|
2423
2470
|
isDisabled && inputWrapperStyles.disabled,
|
|
2471
|
+
// Keyboard focus on the disabled placeholder still shows the ring.
|
|
2472
|
+
isDisabled && inputDisabledFocusStyles.selfRing,
|
|
2424
2473
|
localStatus && inputStatusBorderStyles[localStatus.type],
|
|
2425
2474
|
localStatus &&
|
|
2426
2475
|
!isDisabled &&
|
|
@@ -2445,7 +2494,9 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2445
2494
|
behavior="observeParent"
|
|
2446
2495
|
overflowRenderer={items => (
|
|
2447
2496
|
<span {...stylex.props(styles.overflowText)}>
|
|
2448
|
-
|
|
2497
|
+
{t('@astryx.tokenizer.overflowCount', {
|
|
2498
|
+
count: items.length,
|
|
2499
|
+
})}
|
|
2449
2500
|
</span>
|
|
2450
2501
|
)}>
|
|
2451
2502
|
{tokens}
|
|
@@ -2491,7 +2542,11 @@ export function Tokenizer<T extends SearchableItem>({
|
|
|
2491
2542
|
isLabelHidden={isLabelHidden}
|
|
2492
2543
|
description={description}
|
|
2493
2544
|
inputID={inputId}
|
|
2494
|
-
labelID={
|
|
2545
|
+
labelID={
|
|
2546
|
+
ariaLabelledByProp != null || tokenOverflowBehavior === 'unfocusedLayer'
|
|
2547
|
+
? fieldLabelId
|
|
2548
|
+
: undefined
|
|
2549
|
+
}
|
|
2495
2550
|
descriptionID={description ? descriptionId : undefined}
|
|
2496
2551
|
isOptional={isOptional}
|
|
2497
2552
|
isRequired={isRequired}
|
package/src/Toolbar/Toolbar.tsx
CHANGED
|
@@ -51,10 +51,17 @@ const spacingStepToVar: Record<SpacingStep, keyof typeof spacingVars> = {
|
|
|
51
51
|
10: '--spacing-10',
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
// A lane that holds an OverflowList as its own child. OverflowList's theme
|
|
55
|
+
// class marks the list's visible row.
|
|
56
|
+
const HOLDS_OVERFLOW_LIST = ':has(> .astryx-overflow-list)';
|
|
57
|
+
|
|
54
58
|
const styles = stylex.create({
|
|
55
|
-
// Two-
|
|
59
|
+
// Two-lane layout (no centerContent). A lane keeps its controls on one
|
|
60
|
+
// line, so when the lanes do not fit, the row wraps and the end lane moves
|
|
61
|
+
// to a following line.
|
|
56
62
|
baseFlex: {
|
|
57
63
|
display: 'flex',
|
|
64
|
+
flexWrap: 'wrap',
|
|
58
65
|
alignItems: 'center',
|
|
59
66
|
justifyContent: 'space-between',
|
|
60
67
|
},
|
|
@@ -75,6 +82,7 @@ const styles = stylex.create({
|
|
|
75
82
|
// Vertical orientation
|
|
76
83
|
vertical: {
|
|
77
84
|
flexDirection: 'column',
|
|
85
|
+
flexWrap: 'nowrap',
|
|
78
86
|
alignItems: 'stretch',
|
|
79
87
|
},
|
|
80
88
|
// Slot containers
|
|
@@ -111,10 +119,43 @@ const styles = stylex.create({
|
|
|
111
119
|
alignItems: 'center',
|
|
112
120
|
justifyContent: 'flex-end',
|
|
113
121
|
},
|
|
122
|
+
// A two-lane lane keeps its controls on one line, capped at the toolbar's
|
|
123
|
+
// width. A lane wider than the toolbar wraps its own controls.
|
|
124
|
+
twoLane: {
|
|
125
|
+
flexWrap: 'wrap',
|
|
126
|
+
minWidth: stylex.firstThatWorks('fit-content', '-webkit-fit-content'),
|
|
127
|
+
},
|
|
128
|
+
// The end lane fills the rest of its line, so its controls stay at the
|
|
129
|
+
// inline end, also on a following line.
|
|
130
|
+
twoLaneEnd: {
|
|
131
|
+
flexGrow: 1,
|
|
132
|
+
},
|
|
114
133
|
// When only startContent is present, let it fill
|
|
115
134
|
startOnly: {
|
|
116
135
|
flex: '1 1 0%',
|
|
117
136
|
},
|
|
137
|
+
// A start lane that holds an OverflowList takes the width the end lane
|
|
138
|
+
// leaves, and its automatic minimum stops counting the list's unfolded
|
|
139
|
+
// items. The list then folds to that width, down to its own floor.
|
|
140
|
+
startFolds: {
|
|
141
|
+
flexGrow: {default: null, [HOLDS_OVERFLOW_LIST]: 1},
|
|
142
|
+
flexBasis: {default: null, [HOLDS_OVERFLOW_LIST]: '0%'},
|
|
143
|
+
minWidth: {default: null, [HOLDS_OVERFLOW_LIST]: 0},
|
|
144
|
+
},
|
|
145
|
+
// A two-lane start lane: `twoLane`, except that a lane holding an
|
|
146
|
+
// OverflowList folds it. Such a lane takes all the free space, because the
|
|
147
|
+
// end lane grows by 1 and this factor dwarfs it, so the end lane stays at
|
|
148
|
+
// its content width. It does not wrap, because a wrapping lane would move
|
|
149
|
+
// the list, at its unfolded width, to a line of its own.
|
|
150
|
+
twoLaneStart: {
|
|
151
|
+
flexWrap: {default: 'wrap', [HOLDS_OVERFLOW_LIST]: 'nowrap'},
|
|
152
|
+
minWidth: {
|
|
153
|
+
default: stylex.firstThatWorks('fit-content', '-webkit-fit-content'),
|
|
154
|
+
[HOLDS_OVERFLOW_LIST]: 0,
|
|
155
|
+
},
|
|
156
|
+
flexGrow: {default: null, [HOLDS_OVERFLOW_LIST]: 1_000_000},
|
|
157
|
+
flexBasis: {default: null, [HOLDS_OVERFLOW_LIST]: '0%'},
|
|
158
|
+
},
|
|
118
159
|
// When only endContent, push to end
|
|
119
160
|
endOnly: {
|
|
120
161
|
marginInlineStart: 'auto',
|
|
@@ -165,8 +206,7 @@ const defaultBlockPaddingForSize: Record<ElementSize, SpacingStep> = {
|
|
|
165
206
|
};
|
|
166
207
|
|
|
167
208
|
/**
|
|
168
|
-
* Whether a
|
|
169
|
-
* vertical band.
|
|
209
|
+
* Whether a row has wrapped: its lanes no longer share one vertical band.
|
|
170
210
|
*/
|
|
171
211
|
function lanesHaveWrapped(row: Element): boolean {
|
|
172
212
|
// An empty lane is a box with no height, so it shares every line.
|
|
@@ -326,7 +366,10 @@ export function Toolbar({
|
|
|
326
366
|
// padding. That is right only while the lanes share one line, so a wrapped
|
|
327
367
|
// row keeps the indicator on its tab. The row reports a wrap after layout,
|
|
328
368
|
// in a resize observation.
|
|
329
|
-
const
|
|
369
|
+
const canWrap =
|
|
370
|
+
hasCenterContent ||
|
|
371
|
+
(hasStartContent && hasEndContent && orientation !== 'vertical');
|
|
372
|
+
const watchesWrap = canWrap && hasBottomDivider;
|
|
330
373
|
const [isWrapped, setIsWrapped] = useState(false);
|
|
331
374
|
useAttachment(
|
|
332
375
|
listRef,
|
|
@@ -454,6 +497,9 @@ export function Toolbar({
|
|
|
454
497
|
{...stylex.props(
|
|
455
498
|
styles.startSlot,
|
|
456
499
|
!hasEndContent && styles.startOnly,
|
|
500
|
+
hasEndContent && orientation !== 'vertical'
|
|
501
|
+
? styles.twoLaneStart
|
|
502
|
+
: orientation === 'horizontal' && styles.startFolds,
|
|
457
503
|
edgeCompSlot.inset(edgeCompInsetForSize[size]),
|
|
458
504
|
dynamicStyles.gap(gapVar),
|
|
459
505
|
)}>
|
|
@@ -464,6 +510,11 @@ export function Toolbar({
|
|
|
464
510
|
<div
|
|
465
511
|
{...stylex.props(
|
|
466
512
|
styles.endSlot,
|
|
513
|
+
hasStartContent &&
|
|
514
|
+
orientation !== 'vertical' && [
|
|
515
|
+
styles.twoLane,
|
|
516
|
+
styles.twoLaneEnd,
|
|
517
|
+
],
|
|
467
518
|
!hasStartContent && styles.endOnly,
|
|
468
519
|
edgeCompSlot.inset(edgeCompInsetForSize[size]),
|
|
469
520
|
dynamicStyles.gap(gapVar),
|
|
@@ -26,6 +26,8 @@ import {useCommittedRef} from '../hooks/useCommittedRef';
|
|
|
26
26
|
import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect';
|
|
27
27
|
import {TooltipPresentInterestContext} from './tooltipPresentInterest';
|
|
28
28
|
import {createTriggerFocusGate, isFocusOnTrigger} from '../utils/triggerFocus';
|
|
29
|
+
import {getInteractionModality} from '../utils/interactionModality';
|
|
30
|
+
import {NON_TEXT_INPUT_TYPES} from '../keyboard/keyboardHeight';
|
|
29
31
|
import * as stylex from '@stylexjs/stylex';
|
|
30
32
|
import {
|
|
31
33
|
useLayerInternal,
|
|
@@ -52,6 +54,22 @@ import {
|
|
|
52
54
|
typeScaleVars,
|
|
53
55
|
} from '../theme/tokens.stylex';
|
|
54
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Whether `element` is a text field in any state: a text-like `<input>`, a
|
|
59
|
+
* `<textarea>` or an editable element, also when it is read-only, disabled
|
|
60
|
+
* or brings up no keyboard.
|
|
61
|
+
*/
|
|
62
|
+
function isTextField(element: HTMLElement): boolean {
|
|
63
|
+
if (element.localName === 'input') {
|
|
64
|
+
return !NON_TEXT_INPUT_TYPES.has(
|
|
65
|
+
(element.getAttribute('type') ?? 'text').toLowerCase(),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return element.matches(
|
|
69
|
+
'textarea, [contenteditable]:not([contenteditable="false"])',
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
55
73
|
/**
|
|
56
74
|
* Grace period (ms) before hiding on pointer-leave when no explicit `hideDelay`
|
|
57
75
|
* is set, so the pointer can travel across the small gap from the trigger onto
|
|
@@ -557,6 +575,14 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
|
|
|
557
575
|
if (trigger != null && !isFocusOnTrigger(target, trigger, focusTrigger)) {
|
|
558
576
|
return false;
|
|
559
577
|
}
|
|
578
|
+
// Browsers mark a pointer's focus on a text field focus-visible, so
|
|
579
|
+
// after a pointer press only a text field opens the tooltip.
|
|
580
|
+
if (
|
|
581
|
+
!isTextField(target) &&
|
|
582
|
+
getInteractionModality(target) === 'pointer'
|
|
583
|
+
) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
560
586
|
return !isTouchInteraction() && target.matches(':focus-visible');
|
|
561
587
|
},
|
|
562
588
|
[focusTrigger, isTouchInteraction],
|
|
@@ -22,7 +22,7 @@ export const docs = {
|
|
|
22
22
|
targets: [
|
|
23
23
|
{className: 'astryx-top-nav', states: ['mode']},
|
|
24
24
|
{className: 'astryx-top-nav-item', states: ['mode', 'selected']},
|
|
25
|
-
{className: 'astryx-top-nav-heading'},
|
|
25
|
+
{className: 'astryx-top-nav-heading', states: ['mode']},
|
|
26
26
|
{className: 'astryx-top-nav-mega-menu', states: ['mode']},
|
|
27
27
|
{className: 'astryx-top-nav-mega-menu-item', states: ['mode']},
|
|
28
28
|
{className: 'astryx-top-nav-mega-menu-featured-card'},
|
package/src/TopNav/TopNav.tsx
CHANGED
|
@@ -22,7 +22,10 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
22
22
|
import {spacingVars} from '../theme/tokens.stylex';
|
|
23
23
|
import {mergeProps} from '../utils';
|
|
24
24
|
import {TopNavSlotContext} from './TopNavContext';
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
useTopNavRenderMode,
|
|
27
|
+
useTopNavUnreadRegionStyle,
|
|
28
|
+
} from './TopNavRenderContext';
|
|
26
29
|
import {useTopNavMobileContent} from './TopNavMobileContentContext';
|
|
27
30
|
import {Divider} from '../Divider/Divider';
|
|
28
31
|
import {MobileNav} from '../MobileNav/MobileNav';
|
|
@@ -141,12 +144,16 @@ const styles = stylex.create({
|
|
|
141
144
|
textOverflow: 'ellipsis',
|
|
142
145
|
whiteSpace: 'nowrap',
|
|
143
146
|
},
|
|
147
|
+
// The end content keeps its full width while the heading can yield.
|
|
148
|
+
// It is never wider than the bar. A fluid end item then narrows,
|
|
149
|
+
// so the toggle stays on screen.
|
|
144
150
|
mobileBarEnd: {
|
|
145
151
|
display: 'flex',
|
|
146
152
|
alignItems: 'center',
|
|
147
153
|
gap: spacingVars['--spacing-1'],
|
|
148
154
|
flexShrink: 0,
|
|
149
155
|
marginInlineStart: 'auto',
|
|
156
|
+
maxWidth: '100%',
|
|
150
157
|
},
|
|
151
158
|
// Drawer mode — vertical list of nav items
|
|
152
159
|
drawerItems: {
|
|
@@ -236,6 +243,7 @@ export function TopNav({
|
|
|
236
243
|
const t = useComponentTranslator();
|
|
237
244
|
const label = labelFromProps ?? t('@astryx.topNav.landmarkLabel');
|
|
238
245
|
const renderMode = useTopNavRenderMode();
|
|
246
|
+
const unreadRegionStyle = useTopNavUnreadRegionStyle() ?? undefined;
|
|
239
247
|
const mobileContent = useTopNavMobileContent();
|
|
240
248
|
const {hasAutoToggle} = useAppShellMobile();
|
|
241
249
|
const resolvedStartContent = startContent ?? children;
|
|
@@ -340,7 +348,7 @@ export function TopNav({
|
|
|
340
348
|
)}
|
|
341
349
|
{hasStartContent && (
|
|
342
350
|
<TopNavSlotContext value="start">
|
|
343
|
-
<div {...stylex.props(styles.startContent)}>
|
|
351
|
+
<div {...stylex.props(styles.startContent, unreadRegionStyle)}>
|
|
344
352
|
{resolvedStartContent}
|
|
345
353
|
</div>
|
|
346
354
|
</TopNavSlotContext>
|
|
@@ -348,7 +356,9 @@ export function TopNav({
|
|
|
348
356
|
</div>
|
|
349
357
|
{hasCenterContent && (
|
|
350
358
|
<TopNavSlotContext value="center">
|
|
351
|
-
<div {...stylex.props(styles.centerContent)}>
|
|
359
|
+
<div {...stylex.props(styles.centerContent, unreadRegionStyle)}>
|
|
360
|
+
{centerContent}
|
|
361
|
+
</div>
|
|
352
362
|
</TopNavSlotContext>
|
|
353
363
|
)}
|
|
354
364
|
{hasCenterContent ? (
|