@astryxdesign/core 0.3.0 → 0.4.0-canary.3112e99
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 +156 -0
- package/dist/AlertDialog/AlertDialog.d.ts +10 -2
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +22 -3
- package/dist/AppShell/AppShell.d.ts +2 -2
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +40 -9
- package/dist/AspectRatio/AspectRatio.d.ts +13 -0
- package/dist/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/AspectRatio/AspectRatio.js +9 -0
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +33 -20
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +2 -3
- package/dist/Banner/Banner.d.ts +3 -0
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -17
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +21 -8
- package/dist/Breadcrumbs/index.d.ts +2 -1
- package/dist/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/Breadcrumbs/index.js +1 -0
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +12 -16
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +2 -1
- package/dist/Calendar/styles.d.ts +0 -2
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +0 -2
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +8 -12
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +2 -1
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +3 -1
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +4 -3
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +17 -17
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +2 -6
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +36 -125
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +3 -11
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +84 -67
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +35 -15
- package/dist/CommandPalette/CommandPaletteItem.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +6 -3
- package/dist/CommandPalette/CommandPaletteList.js +1 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts +1 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +32 -31
- package/dist/ContextMenu/ContextMenu.d.ts +2 -2
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +1 -1
- package/dist/ContextMenu/index.d.ts +2 -1
- package/dist/ContextMenu/index.d.ts.map +1 -1
- package/dist/ContextMenu/index.js +1 -0
- package/dist/DateInput/DateInput.d.ts +9 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +47 -33
- package/dist/DateRangeInput/DateRangeInput.d.ts +9 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +55 -32
- package/dist/DateTimeInput/DateTimeInput.d.ts +9 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +54 -30
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +4 -4
- package/dist/DropdownMenu/DropdownMenu.d.ts +33 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +62 -20
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts +8 -11
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +32 -31
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts +25 -0
- package/dist/DropdownMenu/DropdownMenuDivider.d.ts.map +1 -0
- package/dist/DropdownMenu/DropdownMenuDivider.js +66 -0
- package/dist/DropdownMenu/DropdownMenuItem.d.ts +15 -2
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +20 -8
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioGroup.js +10 -3
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +5 -5
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +24 -67
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +2 -8
- package/dist/DropdownMenu/index.d.ts +2 -1
- package/dist/DropdownMenu/index.d.ts.map +1 -1
- package/dist/DropdownMenu/index.js +4 -0
- package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -1
- package/dist/DropdownMenu/renderDropdownItems.js +35 -27
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +9 -5
- package/dist/Field/InputClearButton.d.ts +16 -3
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +15 -4
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +21 -10
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +3 -19
- package/dist/Indicator/CheckIndicator.d.ts +25 -0
- package/dist/Indicator/CheckIndicator.d.ts.map +1 -0
- package/dist/Indicator/CheckIndicator.js +155 -0
- package/dist/Indicator/CheckboxIndicator.d.ts +22 -0
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -0
- package/dist/Indicator/CheckboxIndicator.js +173 -0
- package/dist/Indicator/RadioIndicator.d.ts +23 -0
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -0
- package/dist/Indicator/RadioIndicator.js +137 -0
- package/dist/Indicator/index.d.ts +24 -0
- package/dist/Indicator/index.d.ts.map +1 -0
- package/dist/Indicator/index.js +26 -0
- package/dist/Indicator/indicator.markers.stylex.d.ts +16 -0
- package/dist/Indicator/indicator.markers.stylex.d.ts.map +1 -0
- package/dist/Indicator/indicator.markers.stylex.js +21 -0
- package/dist/Indicator/indicatorRegistry.d.ts +71 -0
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -0
- package/dist/Indicator/indicatorRegistry.js +93 -0
- package/dist/Indicator/types.d.ts +177 -0
- package/dist/Indicator/types.d.ts.map +1 -0
- package/dist/Indicator/types.js +1 -0
- package/dist/Indicator/useIndicator.d.ts +18 -0
- package/dist/Indicator/useIndicator.d.ts.map +1 -0
- package/dist/Indicator/useIndicator.js +30 -0
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +4 -8
- package/dist/Layer/useLayer.d.ts +14 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +25 -2
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +80 -103
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +4 -5
- package/dist/MobileNav/MobileNav.js +8 -8
- package/dist/MoreMenu/MoreMenu.d.ts +14 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +4 -0
- package/dist/MultiSelector/MultiSelector.d.ts +8 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +119 -95
- package/dist/NumberInput/NumberInput.d.ts +27 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +230 -42
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +2 -3
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +61 -63
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +6 -8
- package/dist/Popover/usePopover.d.ts +15 -0
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +14 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +7 -0
- package/dist/ProgressBar/ProgressBar.d.ts +11 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +95 -6
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +29 -84
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +2 -3
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +2 -3
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +3 -11
- package/dist/Selector/Selector.d.ts +12 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +222 -111
- package/dist/Selector/hooks.d.ts +18 -6
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +57 -40
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +1 -1
- package/dist/SideNav/SideNavCollapseButton.d.ts +1 -1
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +29 -14
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +56 -20
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +28 -22
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -6
- package/dist/Stack/stack.stylex.d.ts +3 -3
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +14 -13
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +2 -3
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +41 -19
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +8 -0
- package/dist/Table/TableRow.d.ts +1 -1
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +4 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +22 -18
- package/dist/Table/plugins/rowExpansion/index.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/index.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/index.js +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +41 -76
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +94 -345
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +23 -4
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +29 -33
- package/dist/Table/tableContextMenu.d.ts.map +1 -1
- package/dist/Table/tableContextMenu.js +2 -1
- package/dist/Table/types.d.ts +11 -0
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/TextArea/TextArea.d.ts +10 -1
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +16 -6
- package/dist/TextInput/TextInput.d.ts +10 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +13 -19
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +32 -26
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +14 -17
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +14 -3
- package/dist/Timestamp/TimestampHoverCard.d.ts.map +1 -1
- package/dist/Timestamp/TimestampHoverCard.js +16 -34
- package/dist/Timestamp/formatInstant.d.ts +11 -1
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +3 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +20 -11
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +4 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +3 -19
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +6 -5
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +54 -16
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +3 -9
- package/dist/TopNav/TopNavMegaMenu.d.ts +7 -0
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +146 -60
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +22 -3
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +83 -38
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +13 -0
- package/dist/TreeList/TreeListBranches.d.ts +1 -1
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +14 -4
- package/dist/TreeList/TreeListItem.d.ts +11 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +57 -30
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +16 -8
- package/dist/astryx.css +84 -96
- package/dist/astryx.umd.js +56 -56
- package/dist/astryx.umd.js.map +4 -4
- package/dist/hooks/containerReveal.stylex.d.ts +61 -0
- package/dist/hooks/containerReveal.stylex.d.ts.map +1 -0
- package/dist/hooks/containerReveal.stylex.js +63 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useClipboard.d.ts +59 -0
- package/dist/hooks/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useClipboard.js +106 -0
- package/dist/hooks/useContainerReveal.d.ts +14 -8
- package/dist/hooks/useContainerReveal.d.ts.map +1 -1
- package/dist/hooks/useContainerReveal.js +28 -69
- package/dist/hooks/useIndicatorFocusRing.d.ts +28 -0
- package/dist/hooks/useIndicatorFocusRing.d.ts.map +1 -0
- package/dist/hooks/useIndicatorFocusRing.js +96 -0
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +17 -4
- package/dist/hooks/useLongPress.d.ts.map +1 -1
- package/dist/hooks/useLongPress.js +12 -2
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +33 -18
- package/dist/hooks/useStreamingText.d.ts +18 -3
- package/dist/hooks/useStreamingText.d.ts.map +1 -1
- package/dist/hooks/useStreamingText.js +47 -7
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +9 -3
- package/dist/hooks/useTypeahead.d.ts +3 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +19 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/theme/defineTheme.d.ts +18 -2
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +10 -1
- package/dist/theme/derivedVarRegistry.d.ts +8 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +14 -13
- package/dist/theme/expandColorScale.d.ts +3 -1
- package/dist/theme/expandColorScale.d.ts.map +1 -1
- package/dist/theme/expandColorScale.js +17 -7
- package/dist/theme/expandTypeScale.d.ts.map +1 -1
- package/dist/theme/expandTypeScale.js +17 -0
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +11 -0
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/tokens.stylex.d.ts +12 -0
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +23 -0
- package/dist/utils/focusOutline.stylex.d.ts +122 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -0
- package/dist/utils/focusOutline.stylex.js +143 -0
- package/dist/utils/focusReturn.d.ts +24 -0
- package/dist/utils/focusReturn.d.ts.map +1 -0
- package/dist/utils/focusReturn.js +29 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -1
- package/dist/utils/mergeRefs.d.ts.map +1 -1
- package/dist/utils/mergeRefs.js +7 -5
- package/dist/utils/rtlStyles.d.ts +2 -2
- package/dist/utils/rtlStyles.js +2 -2
- package/dist/utils/themeProps.d.ts +20 -1
- package/dist/utils/themeProps.d.ts.map +1 -1
- package/dist/utils/themeProps.js +8 -2
- package/locales/en.json +52 -0
- package/locales/pseudo.json +39 -0
- package/package.json +8 -3
- package/src/AlertDialog/AlertDialog.doc.mjs +16 -3
- package/src/AlertDialog/AlertDialog.test.tsx +208 -1
- package/src/AlertDialog/AlertDialog.tsx +21 -3
- package/src/AppShell/AppShell.doc.mjs +11 -0
- package/src/AppShell/AppShell.test.tsx +139 -0
- package/src/AppShell/AppShell.tsx +32 -22
- package/src/AspectRatio/AspectRatio.doc.mjs +27 -3
- package/src/AspectRatio/AspectRatio.test.tsx +30 -0
- package/src/AspectRatio/AspectRatio.tsx +13 -0
- package/src/Avatar/Avatar.doc.mjs +2 -13
- package/src/Avatar/Avatar.test.tsx +33 -8
- package/src/Avatar/Avatar.tsx +52 -50
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +2 -9
- package/src/Banner/Banner.test.tsx +58 -1
- package/src/Banner/Banner.tsx +33 -11
- package/src/Breadcrumbs/BreadcrumbItem.tsx +16 -6
- package/src/Breadcrumbs/index.ts +5 -1
- package/src/Button/Button.doc.mjs +2 -2
- package/src/Button/Button.tsx +22 -41
- package/src/Calendar/Calendar.tsx +2 -1
- package/src/Calendar/styles.ts +0 -8
- package/src/Carousel/Carousel.doc.mjs +3 -0
- package/src/Carousel/Carousel.tsx +10 -6
- package/src/Chat/Chat.doc.mjs +2 -0
- package/src/Chat/ChatDictationButton.tsx +7 -1
- package/src/Chat/ChatLayoutScrollButton.test.tsx +22 -0
- package/src/Chat/ChatLayoutScrollButton.tsx +8 -1
- package/src/Chat/ChatSendButton.tsx +2 -3
- package/src/Chat/ChatToolCalls.test.tsx +35 -0
- package/src/Chat/ChatToolCalls.tsx +36 -16
- package/src/Chat/useTriggerMenu.tsx +2 -5
- package/src/CheckboxInput/CheckboxInput.doc.mjs +4 -2
- package/src/CheckboxInput/CheckboxInput.test.tsx +120 -0
- package/src/CheckboxInput/CheckboxInput.tsx +45 -202
- package/src/ClickableCard/ClickableCard.tsx +6 -11
- package/src/CodeBlock/CodeBlock.doc.mjs +3 -0
- package/src/CodeBlock/CodeBlock.test.tsx +91 -0
- package/src/CodeBlock/CodeBlock.tsx +57 -80
- package/src/Collapsible/Collapsible.tsx +22 -18
- package/src/CommandPalette/CommandPalette.test.tsx +29 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +7 -4
- package/src/CommandPalette/CommandPaletteList.tsx +2 -2
- package/src/ComplexSelector/ComplexSelector.doc.mjs +42 -0
- package/src/ComplexSelector/ComplexSelector.test.tsx +73 -0
- package/src/ComplexSelector/ComplexSelector.tsx +41 -28
- package/src/ContextMenu/ContextMenu.doc.mjs +1 -1
- package/src/ContextMenu/ContextMenu.test.tsx +41 -0
- package/src/ContextMenu/ContextMenu.tsx +3 -3
- package/src/ContextMenu/index.ts +5 -1
- package/src/DateInput/DateInput.doc.mjs +18 -3
- package/src/DateInput/DateInput.test.tsx +112 -11
- package/src/DateInput/DateInput.tsx +44 -25
- package/src/DateRangeInput/DateRangeInput.doc.mjs +10 -2
- package/src/DateRangeInput/DateRangeInput.test.tsx +110 -14
- package/src/DateRangeInput/DateRangeInput.tsx +27 -21
- package/src/DateTimeInput/DateTimeInput.doc.mjs +16 -2
- package/src/DateTimeInput/DateTimeInput.test.tsx +154 -1
- package/src/DateTimeInput/DateTimeInput.tsx +58 -17
- package/src/Dialog/Dialog.tsx +2 -9
- package/src/DropdownMenu/DropdownMenu.doc.mjs +5 -9
- package/src/DropdownMenu/DropdownMenu.test.tsx +534 -4
- package/src/DropdownMenu/DropdownMenu.tsx +113 -52
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +27 -30
- package/src/DropdownMenu/DropdownMenuDivider.doc.mjs +34 -0
- package/src/DropdownMenu/DropdownMenuDivider.tsx +81 -0
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +39 -4
- package/src/DropdownMenu/DropdownMenuItem.tsx +48 -10
- package/src/DropdownMenu/DropdownMenuRadioGroup.tsx +2 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +30 -76
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +25 -19
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +44 -14
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +1 -5
- package/src/DropdownMenu/index.ts +8 -1
- package/src/DropdownMenu/renderDropdownItems.tsx +33 -34
- package/src/EmptyState/EmptyState.doc.mjs +4 -0
- package/src/EmptyState/EmptyState.test.tsx +62 -0
- package/src/EmptyState/EmptyState.tsx +16 -6
- package/src/Field/Field.doc.mjs +1 -0
- package/src/Field/InputClearButton.test.tsx +117 -0
- package/src/Field/InputClearButton.tsx +30 -3
- package/src/FileInput/FileInput.tsx +21 -8
- package/src/HoverCard/useHoverCard.tsx +2 -23
- package/src/Icon/Icon.doc.mjs +2 -1
- package/src/Indicator/CheckIndicator.tsx +174 -0
- package/src/Indicator/CheckboxIndicator.tsx +257 -0
- package/src/Indicator/Indicator.doc.mjs +344 -0
- package/src/Indicator/Indicator.test.tsx +393 -0
- package/src/Indicator/RadioIndicator.tsx +206 -0
- package/src/Indicator/index.ts +46 -0
- package/src/Indicator/indicator.markers.stylex.ts +19 -0
- package/src/Indicator/indicatorRegistry.test.tsx +106 -0
- package/src/Indicator/indicatorRegistry.ts +120 -0
- package/src/Indicator/types.ts +197 -0
- package/src/Indicator/useIndicator.ts +39 -0
- package/src/Item/Item.doc.mjs +1 -1
- package/src/Item/Item.tsx +7 -14
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.test.tsx +85 -0
- package/src/Layer/useLayer.tsx +39 -1
- package/src/Lightbox/Lightbox.doc.mjs +1 -1
- package/src/Lightbox/Lightbox.tsx +45 -49
- package/src/Link/Link.tsx +4 -11
- package/src/MobileNav/MobileNav.tsx +3 -3
- package/src/MoreMenu/MoreMenu.doc.mjs +31 -0
- package/src/MoreMenu/MoreMenu.test.tsx +68 -1
- package/src/MoreMenu/MoreMenu.tsx +19 -0
- package/src/MultiSelector/MultiSelector.doc.mjs +16 -1
- package/src/MultiSelector/MultiSelector.test.tsx +259 -16
- package/src/MultiSelector/MultiSelector.tsx +144 -121
- package/src/NumberInput/NumberInput.doc.mjs +265 -50
- package/src/NumberInput/NumberInput.test.tsx +726 -21
- package/src/NumberInput/NumberInput.tsx +353 -59
- package/src/Outline/Outline.tsx +2 -5
- package/src/Pagination/Pagination.doc.mjs +1 -1
- package/src/Pagination/Pagination.test.tsx +22 -7
- package/src/Pagination/Pagination.tsx +38 -35
- package/src/Popover/Popover.doc.mjs +2 -0
- package/src/Popover/Popover.tsx +6 -7
- package/src/Popover/usePopover.tsx +37 -4
- package/src/PowerSearch/PowerSearch.tsx +1 -1
- package/src/PowerSearch/PowerSearchEditPopover.test.tsx +42 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +7 -0
- package/src/ProgressBar/ProgressBar.doc.mjs +27 -5
- package/src/ProgressBar/ProgressBar.test.tsx +224 -1
- package/src/ProgressBar/ProgressBar.tsx +126 -30
- package/src/RadioList/RadioList.doc.mjs +4 -2
- package/src/RadioList/RadioListItem.tsx +31 -130
- package/src/Resizable/ResizeHandle.tsx +2 -9
- package/src/SegmentedControl/SegmentedControlItem.tsx +2 -9
- package/src/SelectableCard/SelectableCard.tsx +4 -9
- package/src/Selector/Selector.doc.mjs +15 -4
- package/src/Selector/Selector.test.tsx +1234 -98
- package/src/Selector/Selector.tsx +254 -126
- package/src/Selector/hooks.ts +77 -50
- package/src/SideNav/SideNav.test.tsx +46 -0
- package/src/SideNav/SideNav.tsx +1 -0
- package/src/SideNav/SideNavCollapseButton.tsx +15 -10
- package/src/SideNav/SideNavHeading.tsx +48 -10
- package/src/SideNav/SideNavItem.tsx +20 -12
- package/src/Slider/Slider.tsx +2 -11
- package/src/Stack/Stack.doc.mjs +110 -0
- package/src/StatusDot/StatusDot.doc.mjs +12 -3
- package/src/Switch/Switch.test.tsx +32 -0
- package/src/Switch/Switch.tsx +18 -10
- package/src/TabList/Tab.tsx +2 -9
- package/src/TabList/TabMenu.tsx +14 -21
- package/src/Table/BaseTable.tsx +11 -0
- package/src/Table/Table.test.tsx +31 -0
- package/src/Table/TableRow.tsx +6 -0
- package/src/Table/index.ts +1 -4
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +30 -14
- package/src/Table/plugins/rowExpansion/index.ts +1 -4
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +125 -175
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +115 -458
- package/src/Table/plugins/sortable/useTableSortable.tsx +2 -6
- package/src/Table/plugins/tree/useTableTreeData.tsx +43 -24
- package/src/Table/tableContextMenu.test.tsx +27 -0
- package/src/Table/tableContextMenu.tsx +1 -0
- package/src/Table/types.ts +11 -0
- package/src/Table/useTableGroupedRows.doc.mjs +1 -1
- package/src/Table/useTableRowExpansion.doc.mjs +43 -66
- package/src/TextArea/TextArea.doc.mjs +42 -2
- package/src/TextArea/TextArea.test.tsx +219 -0
- package/src/TextArea/TextArea.tsx +34 -7
- package/src/TextInput/TextInput.doc.mjs +18 -2
- package/src/TextInput/TextInput.test.tsx +189 -0
- package/src/TextInput/TextInput.tsx +25 -31
- package/src/Thumbnail/Thumbnail.tsx +2 -9
- package/src/TimeInput/TimeInput.doc.mjs +2 -2
- package/src/TimeInput/TimeInput.test.tsx +84 -3
- package/src/TimeInput/TimeInput.tsx +26 -28
- package/src/Timestamp/Timestamp.doc.mjs +4 -3
- package/src/Timestamp/Timestamp.test.tsx +91 -14
- package/src/Timestamp/Timestamp.tsx +14 -2
- package/src/Timestamp/TimestampHoverCard.tsx +13 -35
- package/src/Timestamp/formatInstant.ts +16 -1
- package/src/Token/Token.tsx +5 -28
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.test.tsx +45 -3
- package/src/Tokenizer/Tokenizer.tsx +10 -2
- package/src/Tooltip/useTooltip.tsx +2 -23
- package/src/TopNav/TopNav.tsx +1 -3
- package/src/TopNav/TopNavHeading.tsx +42 -13
- package/src/TopNav/TopNavItem.tsx +3 -21
- package/src/TopNav/TopNavMegaMenu.doc.mjs +5 -0
- package/src/TopNav/TopNavMegaMenu.test.tsx +433 -33
- package/src/TopNav/TopNavMegaMenu.tsx +118 -53
- package/src/TopNav/TopNavMegaMenuItem.tsx +2 -9
- package/src/TopNav/TopNavMenu.tsx +34 -37
- package/src/TreeList/TreeList.doc.mjs +5 -0
- package/src/TreeList/TreeList.test.tsx +208 -8
- package/src/TreeList/TreeList.tsx +22 -0
- package/src/TreeList/TreeListBranches.tsx +25 -2
- package/src/TreeList/TreeListItem.tsx +89 -52
- package/src/Typeahead/BaseTypeahead.tsx +19 -6
- package/src/Typeahead/Typeahead.doc.mjs +1 -0
- package/src/Typeahead/Typeahead.test.tsx +76 -3
- package/src/hooks/containerReveal.stylex.ts +102 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useClipboard.doc.mjs +87 -0
- package/src/hooks/useClipboard.test.tsx +151 -0
- package/src/hooks/useClipboard.ts +135 -0
- package/src/hooks/useContainerReveal.doc.mjs +7 -7
- package/src/hooks/useContainerReveal.test.tsx +42 -62
- package/src/hooks/useContainerReveal.ts +36 -91
- package/src/hooks/useImageMode.test.ts +1 -1
- package/src/hooks/useIndicatorFocusRing.tsx +120 -0
- package/src/hooks/useInputStatusIcon.tsx +8 -8
- package/src/hooks/useLongPress.test.tsx +18 -0
- package/src/hooks/useLongPress.ts +12 -2
- package/src/hooks/useScrollLock.test.ts +72 -0
- package/src/hooks/useScrollLock.ts +51 -19
- package/src/hooks/useStreamingText.test.ts +46 -1
- package/src/hooks/useStreamingText.ts +49 -7
- package/src/hooks/useTreeFocus.test.tsx +50 -0
- package/src/hooks/useTreeFocus.ts +14 -3
- package/src/hooks/useTypeahead.test.tsx +150 -0
- package/src/hooks/useTypeahead.ts +24 -9
- package/src/i18n/InternationalizationProvider.doc.mjs +7 -2
- package/src/index.ts +1 -0
- package/src/theme/defineTheme.ts +27 -0
- package/src/theme/derivedVarRegistry.test.ts +21 -1
- package/src/theme/derivedVarRegistry.ts +19 -6
- package/src/theme/expandColorScale.test.ts +14 -0
- package/src/theme/expandColorScale.ts +24 -9
- package/src/theme/expandTypeScale.test.ts +43 -0
- package/src/theme/expandTypeScale.ts +17 -0
- package/src/theme/generateThemeRules.test.ts +78 -20
- package/src/theme/generateThemeRules.ts +11 -0
- package/src/theme/index.ts +15 -0
- package/src/theme/tokens.stylex.ts +18 -0
- package/src/theme/tokens.test.ts +37 -0
- package/src/utils/focusOutline.stylex.ts +177 -0
- package/src/utils/focusReturn.test.ts +42 -0
- package/src/utils/focusReturn.ts +31 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/mergeRefs.test.ts +48 -0
- package/src/utils/mergeRefs.ts +12 -6
- package/src/utils/rtlStyles.ts +2 -2
- package/src/utils/themeProps.ts +26 -4
- package/dist/CheckboxInput/checkbox.markers.stylex.d.ts +0 -9
- package/dist/CheckboxInput/checkbox.markers.stylex.d.ts.map +0 -1
- package/dist/CheckboxInput/checkbox.markers.stylex.js +0 -14
- package/dist/RadioList/radio.markers.stylex.d.ts +0 -7
- package/dist/RadioList/radio.markers.stylex.d.ts.map +0 -1
- package/dist/RadioList/radio.markers.stylex.js +0 -12
- package/dist/hooks/containerReveal.pool.stylex.d.ts +0 -303
- package/dist/hooks/containerReveal.pool.stylex.d.ts.map +0 -1
- package/dist/hooks/containerReveal.pool.stylex.js +0 -292
- package/src/CheckboxInput/checkbox.markers.stylex.ts +0 -12
- package/src/RadioList/radio.markers.stylex.ts +0 -10
- package/src/hooks/containerReveal.pool.stylex.ts +0 -571
package/dist/Selector/hooks.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface UseSelectedItemOffsetOptions {
|
|
|
5
5
|
selectedItemIndex: number;
|
|
6
6
|
listboxId: string;
|
|
7
7
|
listboxRef: RefObject<HTMLDivElement | null>;
|
|
8
|
-
|
|
8
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
9
9
|
}
|
|
10
10
|
interface UseSelectedItemOffsetResult {
|
|
11
11
|
offset: number;
|
|
@@ -13,15 +13,15 @@ interface UseSelectedItemOffsetResult {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Calculates the offset needed to position the dropdown so that the selected
|
|
16
|
-
* item appears centered over the
|
|
16
|
+
* item appears centered over the outer selector control (macOS-style selector).
|
|
17
17
|
*
|
|
18
|
-
* The desired dropdown top is calculated directly from the
|
|
18
|
+
* The desired dropdown top is calculated directly from the anchor center and
|
|
19
19
|
* selected-item center, then clamped to the viewport. This preserves the
|
|
20
20
|
* default "selected item over trigger" behavior while letting the menu slide
|
|
21
21
|
* upward near the bottom edge or downward near the top edge instead of being
|
|
22
22
|
* clipped off-screen.
|
|
23
23
|
*/
|
|
24
|
-
export declare function useSelectedItemOffset({ isOpen, selectedItemIndex, listboxId, listboxRef,
|
|
24
|
+
export declare function useSelectedItemOffset({ isOpen, selectedItemIndex, listboxId, listboxRef, anchorRef, }: UseSelectedItemOffsetOptions): UseSelectedItemOffsetResult;
|
|
25
25
|
interface UseComboboxOptions {
|
|
26
26
|
selectableItems: SelectorOptionData[];
|
|
27
27
|
value?: string;
|
|
@@ -38,6 +38,13 @@ interface UseComboboxOptions {
|
|
|
38
38
|
* navigation owns those keys there) or when there is no value.
|
|
39
39
|
*/
|
|
40
40
|
onClear?: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* With `hasSearch`, printable characters typed on the trigger are appended to
|
|
43
|
+
* the search query (opening the popup if needed), so type-to-find works
|
|
44
|
+
* without a separate open step. Characters keep arriving here until focus
|
|
45
|
+
* lands in the search input, which then owns its own typing.
|
|
46
|
+
*/
|
|
47
|
+
onSearchSeed?: (char: string) => void;
|
|
41
48
|
listboxId: string;
|
|
42
49
|
}
|
|
43
50
|
interface UseComboboxResult {
|
|
@@ -50,8 +57,13 @@ interface UseComboboxResult {
|
|
|
50
57
|
onItemMouseEnter: (item: SelectorOptionData, index: number) => void;
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
|
-
* Handles keyboard navigation
|
|
60
|
+
* Handles keyboard navigation and selection for combobox/listbox patterns.
|
|
61
|
+
*
|
|
62
|
+
* Type-to-select is not handled here: callers that want it compose the shared
|
|
63
|
+
* `useTypeahead` hook and run it ahead of this handler (see Selector). That
|
|
64
|
+
* keeps matching consistent with the other collections and leaves consumers
|
|
65
|
+
* whose own input already filters the items (CommandPalette) untouched.
|
|
54
66
|
*/
|
|
55
|
-
export declare function useCombobox({ selectableItems, value, isDisabled, isOpen, hasSearch, onOpen, onClose, onSelect, onClear, listboxId, }: UseComboboxOptions): UseComboboxResult;
|
|
67
|
+
export declare function useCombobox({ selectableItems, value, isDisabled, isOpen, hasSearch, onOpen, onClose, onSelect, onClear, onSearchSeed, listboxId, }: UseComboboxOptions): UseComboboxResult;
|
|
56
68
|
export {};
|
|
57
69
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/Selector/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/Selector/hooks.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAyBhD,UAAU,4BAA4B;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7C,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC1C;AAED,UAAU,2BAA2B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,SAAS,GACV,EAAE,4BAA4B,GAAG,2BAA2B,CAgF5D;AAMD,UAAU,kBAAkB;IAC1B,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,iBAAiB;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,gBAAgB,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,eAAe,EACf,KAAK,EACL,UAAkB,EAClB,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,SAAS,GACV,EAAE,kBAAkB,GAAG,iBAAiB,CA2NxC"}
|
package/dist/Selector/hooks.js
CHANGED
|
@@ -4,11 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file hooks.ts
|
|
7
|
+
* @input Uses untransformed DOM layout geometry from the Selector's outer
|
|
8
|
+
* anchor, listbox, and selected option
|
|
7
9
|
* @output Hooks for Selector
|
|
8
10
|
* @position Internal hooks; used by Selector.tsx
|
|
9
11
|
*/
|
|
10
|
-
import { useCallback,
|
|
12
|
+
import { useCallback, useState } from 'react';
|
|
11
13
|
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
14
|
+
// The selected row renders one optical pixel below the closed trigger label at
|
|
15
|
+
// the same mathematical center, so compensate before viewport clamping.
|
|
16
|
+
const SELECTED_ITEM_OPTICAL_OFFSET = 1;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Return an element's document-relative layout top without CSS transforms.
|
|
20
|
+
* getBoundingClientRect includes the popover's entry scale, which would make
|
|
21
|
+
* the measured error grow with each option's distance from the menu top.
|
|
22
|
+
*/
|
|
23
|
+
function getLayoutTop(element) {
|
|
24
|
+
let top = 0;
|
|
25
|
+
let current = element;
|
|
26
|
+
while (current) {
|
|
27
|
+
top += current.offsetTop;
|
|
28
|
+
current = current.offsetParent;
|
|
29
|
+
}
|
|
30
|
+
return top;
|
|
31
|
+
}
|
|
12
32
|
|
|
13
33
|
// =============================================================================
|
|
14
34
|
// useSelectedItemOffset - Position dropdown to center selected item over trigger
|
|
@@ -16,9 +36,9 @@ import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js
|
|
|
16
36
|
|
|
17
37
|
/**
|
|
18
38
|
* Calculates the offset needed to position the dropdown so that the selected
|
|
19
|
-
* item appears centered over the
|
|
39
|
+
* item appears centered over the outer selector control (macOS-style selector).
|
|
20
40
|
*
|
|
21
|
-
* The desired dropdown top is calculated directly from the
|
|
41
|
+
* The desired dropdown top is calculated directly from the anchor center and
|
|
22
42
|
* selected-item center, then clamped to the viewport. This preserves the
|
|
23
43
|
* default "selected item over trigger" behavior while letting the menu slide
|
|
24
44
|
* upward near the bottom edge or downward near the top edge instead of being
|
|
@@ -29,7 +49,7 @@ export function useSelectedItemOffset({
|
|
|
29
49
|
selectedItemIndex,
|
|
30
50
|
listboxId,
|
|
31
51
|
listboxRef,
|
|
32
|
-
|
|
52
|
+
anchorRef
|
|
33
53
|
}) {
|
|
34
54
|
const [offset, setOffset] = useState(0);
|
|
35
55
|
const [isPositioned, setIsPositioned] = useState(false);
|
|
@@ -45,7 +65,7 @@ export function useSelectedItemOffset({
|
|
|
45
65
|
commitPosition(0, false);
|
|
46
66
|
return;
|
|
47
67
|
}
|
|
48
|
-
if (!listboxRef.current || !
|
|
68
|
+
if (!listboxRef.current || !anchorRef.current) {
|
|
49
69
|
commitPosition(0, true);
|
|
50
70
|
return;
|
|
51
71
|
}
|
|
@@ -59,35 +79,34 @@ export function useSelectedItemOffset({
|
|
|
59
79
|
commitPosition(0, true);
|
|
60
80
|
return;
|
|
61
81
|
}
|
|
82
|
+
const listbox = listboxRef.current;
|
|
83
|
+
const anchorRect = anchorRef.current.getBoundingClientRect();
|
|
62
84
|
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
const listboxRect = listboxRef.current.getBoundingClientRect();
|
|
66
|
-
const itemRect = targetItem.getBoundingClientRect();
|
|
67
|
-
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
68
|
-
const listboxHeight = listboxRect.height;
|
|
85
|
+
// offset* metrics intentionally exclude the popover's entry transform.
|
|
86
|
+
const listboxHeight = listbox.offsetHeight;
|
|
69
87
|
if (listboxHeight <= 0) {
|
|
70
88
|
commitPosition(0, true);
|
|
71
89
|
return;
|
|
72
90
|
}
|
|
73
91
|
|
|
74
92
|
// Item center relative to listbox top. This remains stable even as the
|
|
75
|
-
// popover
|
|
76
|
-
|
|
77
|
-
const
|
|
93
|
+
// popover animates between scale values. scrollTop keeps the calculation
|
|
94
|
+
// correct when a previously scrolled listbox is reopened.
|
|
95
|
+
const itemCenterInListbox = getLayoutTop(targetItem) - getLayoutTop(listbox) - listbox.scrollTop + targetItem.offsetHeight / 2;
|
|
96
|
+
const anchorCenter = anchorRect.top + anchorRect.height / 2;
|
|
78
97
|
|
|
79
|
-
// Desired top aligns the selected item's center with
|
|
80
|
-
const desiredTop =
|
|
98
|
+
// Desired top aligns the selected item's center with the anchor center.
|
|
99
|
+
const desiredTop = anchorCenter - itemCenterInListbox - SELECTED_ITEM_OPTICAL_OFFSET;
|
|
81
100
|
const viewportHeight = window.innerHeight;
|
|
82
101
|
const maxTop = Math.max(0, viewportHeight - listboxHeight);
|
|
83
102
|
const clampedTop = Math.min(Math.max(desiredTop, 0), maxTop);
|
|
84
103
|
|
|
85
|
-
// useLayer positions the popover below the
|
|
104
|
+
// useLayer positions the popover below the outer anchor. Apply a negative
|
|
86
105
|
// block-start margin to the layer container so the listbox top moves from
|
|
87
|
-
//
|
|
88
|
-
const clampedOffset = Math.max(0,
|
|
106
|
+
// anchorRect.bottom to clampedTop.
|
|
107
|
+
const clampedOffset = Math.max(0, anchorRect.bottom - clampedTop);
|
|
89
108
|
commitPosition(clampedOffset, true);
|
|
90
|
-
}, [isOpen, selectedItemIndex, listboxId, listboxRef,
|
|
109
|
+
}, [isOpen, selectedItemIndex, listboxId, listboxRef, anchorRef, commitPosition]);
|
|
91
110
|
return {
|
|
92
111
|
offset,
|
|
93
112
|
isPositioned
|
|
@@ -95,11 +114,16 @@ export function useSelectedItemOffset({
|
|
|
95
114
|
}
|
|
96
115
|
|
|
97
116
|
// =============================================================================
|
|
98
|
-
// useCombobox - Keyboard navigation
|
|
117
|
+
// useCombobox - Keyboard navigation and selection
|
|
99
118
|
// =============================================================================
|
|
100
119
|
|
|
101
120
|
/**
|
|
102
|
-
* Handles keyboard navigation
|
|
121
|
+
* Handles keyboard navigation and selection for combobox/listbox patterns.
|
|
122
|
+
*
|
|
123
|
+
* Type-to-select is not handled here: callers that want it compose the shared
|
|
124
|
+
* `useTypeahead` hook and run it ahead of this handler (see Selector). That
|
|
125
|
+
* keeps matching consistent with the other collections and leaves consumers
|
|
126
|
+
* whose own input already filters the items (CommandPalette) untouched.
|
|
103
127
|
*/
|
|
104
128
|
export function useCombobox({
|
|
105
129
|
selectableItems,
|
|
@@ -111,11 +135,10 @@ export function useCombobox({
|
|
|
111
135
|
onClose,
|
|
112
136
|
onSelect,
|
|
113
137
|
onClear,
|
|
138
|
+
onSearchSeed,
|
|
114
139
|
listboxId
|
|
115
140
|
}) {
|
|
116
141
|
const [highlightedIndex, setHighlightedIndex] = useState(-1);
|
|
117
|
-
const [typeahead, setTypeahead] = useState('');
|
|
118
|
-
const typeaheadTimeoutRef = useRef(undefined);
|
|
119
142
|
const getItemId = useCallback(index => `${listboxId}-item-${index}`, [listboxId]);
|
|
120
143
|
const getEnabledIndices = useCallback(() => {
|
|
121
144
|
return selectableItems.map((item, i) => !item.disabled ? i : -1).filter(i => i >= 0);
|
|
@@ -185,6 +208,8 @@ export function useCombobox({
|
|
|
185
208
|
if (hasSearch) {
|
|
186
209
|
break;
|
|
187
210
|
}
|
|
211
|
+
// A space mid-typeahead extends the query instead of activating; the
|
|
212
|
+
// caller's useTypeahead claims it before this handler ever runs.
|
|
188
213
|
// falls through
|
|
189
214
|
case 'Enter':
|
|
190
215
|
e.preventDefault();
|
|
@@ -253,26 +278,18 @@ export function useCombobox({
|
|
|
253
278
|
}
|
|
254
279
|
break;
|
|
255
280
|
default:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
typeaheadTimeoutRef.current = setTimeout(() => {
|
|
263
|
-
setTypeahead('');
|
|
264
|
-
}, 500);
|
|
265
|
-
const matchIndex = selectableItems.findIndex(item => !item.disabled && item.label?.toLowerCase().startsWith(newTypeahead));
|
|
266
|
-
if (matchIndex >= 0) {
|
|
267
|
-
if (!isOpen) {
|
|
268
|
-
onOpen();
|
|
269
|
-
}
|
|
270
|
-
setHighlightedIndex(matchIndex);
|
|
281
|
+
// Keys land here only while the trigger holds focus — once the search
|
|
282
|
+
// input takes over it handles its own typing — so they belong in the
|
|
283
|
+
// query, including the ones racing the open.
|
|
284
|
+
if (hasSearch && onSearchSeed && e.key.length === 1 && !e.ctrlKey && !e.metaKey) {
|
|
285
|
+
if (!isOpen) {
|
|
286
|
+
onOpen();
|
|
271
287
|
}
|
|
288
|
+
onSearchSeed(e.key);
|
|
272
289
|
}
|
|
273
290
|
break;
|
|
274
291
|
}
|
|
275
|
-
}, [isDisabled, isOpen, onOpen, closeAndReset, selectableItems, highlightedIndex, selectItem, findSelectedIndex, getEnabledIndices,
|
|
292
|
+
}, [isDisabled, isOpen, onOpen, closeAndReset, selectableItems, highlightedIndex, selectItem, findSelectedIndex, getEnabledIndices, hasSearch, onClear, onSearchSeed, value]);
|
|
276
293
|
return {
|
|
277
294
|
highlightedIndex,
|
|
278
295
|
setHighlightedIndex,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNav.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNav.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAmJ/D,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC1D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;IAEvD;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAEtC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EACR,OAAO,GACP;QACE,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;QACnD,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACP;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAmB,EACnB,SAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,YAAY,+BAiQd;yBAhRe,OAAO"}
|
package/dist/SideNav/SideNav.js
CHANGED
|
@@ -320,7 +320,7 @@ export function SideNav({
|
|
|
320
320
|
className: "x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf xfsso4q x1wesfrj"
|
|
321
321
|
},
|
|
322
322
|
1: {
|
|
323
|
-
className: "x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf x1wesfrj xexx8yu"
|
|
323
|
+
className: "x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf x1wesfrj xexx8yu x6s0dn4"
|
|
324
324
|
}
|
|
325
325
|
}[!!collapsed << 0],
|
|
326
326
|
children: [footer, /*#__PURE__*/_jsxs("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file SideNavCollapseButton.tsx
|
|
3
|
-
* @input Uses React, StyleX, SideNavCollapseContext,
|
|
3
|
+
* @input Uses React, StyleX, SideNavCollapseContext, Icon
|
|
4
4
|
* @output Exports SideNavCollapseButton component
|
|
5
5
|
* @position Composable toggle button for sidenav collapse
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavCollapseButton.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavCollapseButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAK5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,0BAA0B,CAAC;AAyBlC,MAAM,WAAW,0BAA2B,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC9E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAC;IAEpE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,GAAG,KAAK,EACT,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"SideNavCollapseButton.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavCollapseButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAK5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,0BAA0B,CAAC;AAyBlC,MAAM,WAAW,0BAA2B,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAC9E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAC;IAEpE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,GAAG,KAAK,EACT,EAAE,0BAA0B,4BA8C5B;yBArDe,qBAAqB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file SideNavCollapseButton.tsx
|
|
7
|
-
* @input Uses React, StyleX, SideNavCollapseContext,
|
|
7
|
+
* @input Uses React, StyleX, SideNavCollapseContext, Icon
|
|
8
8
|
* @output Exports SideNavCollapseButton component
|
|
9
9
|
* @position Composable toggle button for sidenav collapse
|
|
10
10
|
*
|
|
@@ -20,7 +20,7 @@ import React from 'react';
|
|
|
20
20
|
import * as stylex from '@stylexjs/stylex';
|
|
21
21
|
import "../theme/tokens.stylex.js";
|
|
22
22
|
import { durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
23
|
-
import {
|
|
23
|
+
import { Icon } from "../Icon/index.js";
|
|
24
24
|
import { Button } from "../Button/index.js";
|
|
25
25
|
import { composeEventHandlers, rtlStyles } from "../utils/index.js";
|
|
26
26
|
import { useSideNavCollapse } from "./SideNavCollapseContext.js";
|
|
@@ -31,6 +31,21 @@ import { useTranslator } from "../i18n/index.js";
|
|
|
31
31
|
// Styles
|
|
32
32
|
// =============================================================================
|
|
33
33
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
|
+
const styles = {
|
|
35
|
+
chevron: {
|
|
36
|
+
k1xSpc: "x3nfvp2",
|
|
37
|
+
kGNEyG: "x6s0dn4",
|
|
38
|
+
k1ekBW: "x11xpdln",
|
|
39
|
+
kIyJzY: "xuedmi6",
|
|
40
|
+
kAMwcw: "xlr8y92",
|
|
41
|
+
$$css: true
|
|
42
|
+
},
|
|
43
|
+
chevronCollapsed: {
|
|
44
|
+
k3aq6I: "x19jd1h0",
|
|
45
|
+
$$css: true
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
34
49
|
// =============================================================================
|
|
35
50
|
// Types
|
|
36
51
|
// =============================================================================
|
|
@@ -69,7 +84,6 @@ export function SideNavCollapseButton({
|
|
|
69
84
|
...props
|
|
70
85
|
}) {
|
|
71
86
|
const t = useTranslator();
|
|
72
|
-
const chevronLeftIcon = useIcon('chevronLeft');
|
|
73
87
|
const {
|
|
74
88
|
isCollapsed,
|
|
75
89
|
toggle,
|
|
@@ -90,18 +104,19 @@ export function SideNavCollapseButton({
|
|
|
90
104
|
variant: "ghost",
|
|
91
105
|
...props,
|
|
92
106
|
onClick: composeEventHandlers(onClickProp, toggle),
|
|
93
|
-
icon: children ??
|
|
107
|
+
icon: children ??
|
|
108
|
+
/*#__PURE__*/
|
|
109
|
+
// The RTL mirror stays on its own element, wrapping (not merged
|
|
110
|
+
// into) the state rotation: both are `transform`, so on a single
|
|
111
|
+
// element one would overwrite the other and the chevron would stop
|
|
112
|
+
// mirroring under RTL. See utils/rtlStyles.ts.
|
|
113
|
+
_jsx("span", {
|
|
94
114
|
...stylex.props(rtlStyles.mirror),
|
|
95
|
-
children: /*#__PURE__*/_jsx(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
1: {
|
|
101
|
-
className: "x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92 x19jd1h0"
|
|
102
|
-
}
|
|
103
|
-
}[!!isCollapsed << 0],
|
|
104
|
-
children: chevronLeftIcon
|
|
115
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
116
|
+
icon: "chevronLeft",
|
|
117
|
+
size: "sm",
|
|
118
|
+
color: "inherit",
|
|
119
|
+
xstyle: [styles.chevron, isCollapsed && styles.chevronCollapsed]
|
|
105
120
|
})
|
|
106
121
|
}),
|
|
107
122
|
isIconOnly: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavHeading.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavHeading.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAmBtD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SideNavHeading.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavHeading.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAmBtD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAiN5C,MAAM,WAAW,mBAAoB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACpE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,IAAI,EACJ,OAAO,EACP,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,mBAAmB,sCA6drB;yBA9ee,cAAc"}
|
|
@@ -27,7 +27,7 @@ import { colorVars, spacingVars, fontWeightVars, radiusVars, typeScaleVars } fro
|
|
|
27
27
|
// of lazy loading layer resources.
|
|
28
28
|
import { usePopover } from "../Popover/usePopover.js";
|
|
29
29
|
import { Link } from "../Link/index.js";
|
|
30
|
-
import {
|
|
30
|
+
import { Icon } from "../Icon/index.js";
|
|
31
31
|
import { Tooltip } from "../Tooltip/index.js";
|
|
32
32
|
import { navItemStyles } from "../NavItem/navItemStyles.stylex.js";
|
|
33
33
|
import { useSideNavCollapse } from "./SideNavCollapseContext.js";
|
|
@@ -74,6 +74,33 @@ const styles = {
|
|
|
74
74
|
k9WMMc: "x1yc453h",
|
|
75
75
|
$$css: true
|
|
76
76
|
},
|
|
77
|
+
chevron: {
|
|
78
|
+
kmuXW: "x2lah0s",
|
|
79
|
+
k1xSpc: "x78zum5",
|
|
80
|
+
kGNEyG: "x6s0dn4",
|
|
81
|
+
kjj79g: "xl56j7k",
|
|
82
|
+
k7Eaqz: "xy8csz5",
|
|
83
|
+
kAzted: "ximsjs8",
|
|
84
|
+
kMwMTN: "xv9yike",
|
|
85
|
+
kGuDYH: "x1qlqyl8",
|
|
86
|
+
$$css: true
|
|
87
|
+
},
|
|
88
|
+
popoverChevron: {
|
|
89
|
+
kmuXW: "x2lah0s",
|
|
90
|
+
k1xSpc: "x78zum5",
|
|
91
|
+
kGNEyG: "x6s0dn4",
|
|
92
|
+
kjj79g: "xl56j7k",
|
|
93
|
+
k7Eaqz: "xy8csz5",
|
|
94
|
+
kAzted: "ximsjs8",
|
|
95
|
+
kMwMTN: "xv9yike",
|
|
96
|
+
kGuDYH: "x1qlqyl8",
|
|
97
|
+
k3aq6I: "x19jd1h0",
|
|
98
|
+
$$css: true
|
|
99
|
+
},
|
|
100
|
+
chevronGlyph: {
|
|
101
|
+
kGuDYH: "x1qlqyl8",
|
|
102
|
+
$$css: true
|
|
103
|
+
},
|
|
77
104
|
popover: {
|
|
78
105
|
k7Eaqz: "xrzjruh",
|
|
79
106
|
keoZOQ: "xcsaf9d",
|
|
@@ -146,7 +173,6 @@ export function SideNavHeading({
|
|
|
146
173
|
...props
|
|
147
174
|
}) {
|
|
148
175
|
const t = useTranslator();
|
|
149
|
-
const chevronDownIcon = useIcon('chevronDown');
|
|
150
176
|
const LinkComponent = useLinkComponent(as);
|
|
151
177
|
const {
|
|
152
178
|
isCollapsed
|
|
@@ -189,7 +215,7 @@ export function SideNavHeading({
|
|
|
189
215
|
},
|
|
190
216
|
children: icon
|
|
191
217
|
});
|
|
192
|
-
const collapsedSetRef = mergeRefs(collapsedItemRef, ref);
|
|
218
|
+
const collapsedSetRef = mergeRefs(collapsedItemRef, ref, menu ? popover.triggerRef : undefined);
|
|
193
219
|
let collapsedElement;
|
|
194
220
|
if (headingHref) {
|
|
195
221
|
collapsedElement = /*#__PURE__*/_jsx(LinkComponent, {
|
|
@@ -251,11 +277,11 @@ export function SideNavHeading({
|
|
|
251
277
|
}
|
|
252
278
|
}[!!!!(superheading || subheading) << 0],
|
|
253
279
|
children: heading
|
|
254
|
-
}), /*#__PURE__*/_jsx(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
280
|
+
}), /*#__PURE__*/_jsx(Icon, {
|
|
281
|
+
icon: "chevronDown",
|
|
282
|
+
size: "sm",
|
|
283
|
+
color: "secondary",
|
|
284
|
+
xstyle: styles.popoverChevron
|
|
259
285
|
})]
|
|
260
286
|
}), subheading && /*#__PURE__*/_jsx("span", {
|
|
261
287
|
...{
|
|
@@ -346,11 +372,11 @@ export function SideNavHeading({
|
|
|
346
372
|
children: subheading
|
|
347
373
|
}))]
|
|
348
374
|
});
|
|
349
|
-
const chevronElement = showChevron && /*#__PURE__*/_jsx(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
375
|
+
const chevronElement = showChevron && /*#__PURE__*/_jsx(Icon, {
|
|
376
|
+
icon: "chevronDown",
|
|
377
|
+
size: "sm",
|
|
378
|
+
color: "secondary",
|
|
379
|
+
xstyle: styles.chevron
|
|
354
380
|
});
|
|
355
381
|
const headerEndContentElement = headerEndContent && /*#__PURE__*/_jsx("span", {
|
|
356
382
|
...{
|
|
@@ -372,11 +398,11 @@ export function SideNavHeading({
|
|
|
372
398
|
className: "x2lah0s x78zum5 x6s0dn4 xl56j7k"
|
|
373
399
|
},
|
|
374
400
|
children: icon
|
|
375
|
-
}), renderTextContent(/*#__PURE__*/_jsx(
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
401
|
+
}), renderTextContent(/*#__PURE__*/_jsx(Icon, {
|
|
402
|
+
icon: "chevronDown",
|
|
403
|
+
size: "sm",
|
|
404
|
+
color: "secondary",
|
|
405
|
+
xstyle: styles.popoverChevron
|
|
380
406
|
}))]
|
|
381
407
|
});
|
|
382
408
|
|
|
@@ -421,7 +447,12 @@ export function SideNavHeading({
|
|
|
421
447
|
...{
|
|
422
448
|
className: "x2lah0s x78zum5 x6s0dn4 xl56j7k xy8csz5 ximsjs8 xv9yike x1ypdohk xh6dtrn xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x1sodnla x1yc453h xe9uy6x"
|
|
423
449
|
},
|
|
424
|
-
children:
|
|
450
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
451
|
+
icon: "chevronDown",
|
|
452
|
+
size: "sm",
|
|
453
|
+
color: "inherit",
|
|
454
|
+
xstyle: styles.chevronGlyph
|
|
455
|
+
})
|
|
425
456
|
})), headerEndContentElement]
|
|
426
457
|
}), popover.render(/*#__PURE__*/_jsxs("div", {
|
|
427
458
|
ref: menuRef,
|
|
@@ -475,7 +506,12 @@ export function SideNavHeading({
|
|
|
475
506
|
...{
|
|
476
507
|
className: "x2lah0s x78zum5 x6s0dn4 xl56j7k xy8csz5 ximsjs8 xv9yike x1ypdohk xh6dtrn xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x1sodnla x1yc453h xe9uy6x"
|
|
477
508
|
},
|
|
478
|
-
children:
|
|
509
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
510
|
+
icon: "chevronDown",
|
|
511
|
+
size: "sm",
|
|
512
|
+
color: "inherit",
|
|
513
|
+
xstyle: styles.chevronGlyph
|
|
514
|
+
})
|
|
479
515
|
}) : undefined), headerEndContentElement]
|
|
480
516
|
}), popover.render(/*#__PURE__*/_jsxs("div", {
|
|
481
517
|
ref: menuRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavItem.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAaf,OAAO,
|
|
1
|
+
{"version":3,"file":"SideNavItem.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAaf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAgB,KAAK,WAAW,EAAC,MAAM,iCAAiC,CAAC;AA4MhF,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EACR,OAAO,GACP;QACE,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;KACpD,CAAC;IACN;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,UAAkB,EAClB,UAAkB,EAClB,IAAI,EACJ,OAAO,EACP,UAAU,EACV,QAAQ,EACR,WAAW,EAAE,eAAe,EAC5B,IAAW,EACX,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,MAAM,GACP,EAAE,gBAAgB,sCAuVlB;yBAvWe,WAAW"}
|
|
@@ -21,7 +21,7 @@ import { useCallback, useId, useMemo, useRef, useState } from 'react';
|
|
|
21
21
|
import * as stylex from '@stylexjs/stylex';
|
|
22
22
|
import "../theme/tokens.stylex.js";
|
|
23
23
|
import { colorVars, spacingVars, sizeVars, fontWeightVars, typeScaleVars, durationVars, easeVars, borderVars, radiusVars } from "../theme/tokens.stylex.js";
|
|
24
|
-
import {
|
|
24
|
+
import { Icon, renderIconSlot } from "../Icon/index.js";
|
|
25
25
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
26
26
|
import { usePopover } from "../Popover/usePopover.js";
|
|
27
27
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
@@ -57,6 +57,23 @@ const styles = {
|
|
|
57
57
|
itemCollapsedLg: {
|
|
58
58
|
kzqmXN: "x1m747yf",
|
|
59
59
|
$$css: true
|
|
60
|
+
},
|
|
61
|
+
expandChevron: {
|
|
62
|
+
k1xSpc: "x3nfvp2",
|
|
63
|
+
kGNEyG: "x6s0dn4",
|
|
64
|
+
kjj79g: "xl56j7k",
|
|
65
|
+
kzqmXN: "x1mtvzj0",
|
|
66
|
+
kZKoxP: "xvpftlf",
|
|
67
|
+
kGuDYH: "x1qlqyl8",
|
|
68
|
+
k1ekBW: "x11xpdln",
|
|
69
|
+
kIyJzY: "xuedmi6",
|
|
70
|
+
kAMwcw: "xlr8y92",
|
|
71
|
+
kmuXW: "x2lah0s",
|
|
72
|
+
$$css: true
|
|
73
|
+
},
|
|
74
|
+
expandChevronExpanded: {
|
|
75
|
+
k3aq6I: "x19jd1h0",
|
|
76
|
+
$$css: true
|
|
60
77
|
}
|
|
61
78
|
};
|
|
62
79
|
|
|
@@ -150,7 +167,6 @@ export function SideNavItem({
|
|
|
150
167
|
xstyle
|
|
151
168
|
}) {
|
|
152
169
|
const t = useTranslator();
|
|
153
|
-
const chevronDownIcon = useIcon('chevronDown');
|
|
154
170
|
const {
|
|
155
171
|
isCollapsed
|
|
156
172
|
} = useSideNavCollapse();
|
|
@@ -347,16 +363,11 @@ export function SideNavItem({
|
|
|
347
363
|
className: "x2lah0s x78zum5 x6s0dn4"
|
|
348
364
|
},
|
|
349
365
|
children: endContent
|
|
350
|
-
}), !isCollapsed && isItemCollapsible && !hasIndependentToggle && /*#__PURE__*/_jsx(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
1: {
|
|
356
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"
|
|
357
|
-
}
|
|
358
|
-
}[!!!isItemCollapsed << 0],
|
|
359
|
-
children: chevronDownIcon
|
|
366
|
+
}), !isCollapsed && isItemCollapsible && !hasIndependentToggle && /*#__PURE__*/_jsx(Icon, {
|
|
367
|
+
icon: "chevronDown",
|
|
368
|
+
size: "lg",
|
|
369
|
+
color: "inherit",
|
|
370
|
+
xstyle: [styles.expandChevron, !isItemCollapsed && styles.expandChevronExpanded]
|
|
360
371
|
})]
|
|
361
372
|
});
|
|
362
373
|
const navItemStyleProps = mergeProps(themeProps('side-nav-item', {
|
|
@@ -406,16 +417,11 @@ export function SideNavItem({
|
|
|
406
417
|
...{
|
|
407
418
|
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn xe9uy6x xyxi2l3"
|
|
408
419
|
},
|
|
409
|
-
children: /*#__PURE__*/_jsx(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
1: {
|
|
415
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"
|
|
416
|
-
}
|
|
417
|
-
}[!!!isItemCollapsed << 0],
|
|
418
|
-
children: chevronDownIcon
|
|
420
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
421
|
+
icon: "chevronDown",
|
|
422
|
+
size: "lg",
|
|
423
|
+
color: "inherit",
|
|
424
|
+
xstyle: [styles.expandChevron, !isItemCollapsed && styles.expandChevronExpanded]
|
|
419
425
|
})
|
|
420
426
|
})]
|
|
421
427
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../src/Slider/Slider.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../src/Slider/Slider.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAO9C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,CACX;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,uEAAuE;IACvE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3C,8DAA8D;IAC9D,KAAK,CAAC,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,iEAAiE;IACjE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,8CAA8C;IAC9C,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAC7C,iEAAiE;IACjE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAChD,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAkO/D;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,EAAC,GAAG,EAAE,GAAG,KAAK,EAAC,EAAE,WAAW,+BA8mBlD;yBA9mBe,MAAM"}
|
package/dist/Slider/Slider.js
CHANGED
|
@@ -24,6 +24,7 @@ import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
|
24
24
|
import { useTooltip } from "../Tooltip/index.js";
|
|
25
25
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
26
26
|
import { mergeProps, mergeRefs, rtlStyles } from "../utils/index.js";
|
|
27
|
+
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
27
28
|
import { isRtlElement } from "../hooks/isRtlElement.js";
|
|
28
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
29
30
|
|
|
@@ -103,11 +104,6 @@ const styles = {
|
|
|
103
104
|
kWkggS: "x1ewilqj xyxu9wt",
|
|
104
105
|
$$css: true
|
|
105
106
|
},
|
|
106
|
-
thumbFocusVisible: {
|
|
107
|
-
kI3sdo: "x1a2a7pz x17nn4n9",
|
|
108
|
-
kInvED: "x1wfwxd8 x7s97pk",
|
|
109
|
-
$$css: true
|
|
110
|
-
},
|
|
111
107
|
thumbDisabled: {
|
|
112
108
|
kWkggS: "xwmxj5m",
|
|
113
109
|
kkrTdU: "x1h6gzvc",
|
|
@@ -484,7 +480,7 @@ export function Slider({
|
|
|
484
480
|
...mergeProps(themeProps('slider-thumb', {
|
|
485
481
|
orientation,
|
|
486
482
|
disabled: isDisabled ? 'disabled' : null
|
|
487
|
-
}), stylex.props(styles.thumb, isHorizontal ? styles.thumbHorizontal : rtlStyles.centerInline('50%'), !isDisabled && styles.thumbHover, !isDisabled &&
|
|
483
|
+
}), stylex.props(styles.thumb, isHorizontal ? styles.thumbHorizontal : rtlStyles.centerInline('50%'), !isDisabled && styles.thumbHover, !isDisabled && focusOutlineStyles.focusVisible, isDisabled && styles.thumbDisabled), undefined, positionStyle)
|
|
488
484
|
}, thumbIndex);
|
|
489
485
|
if (useValueTooltip) {
|
|
490
486
|
return /*#__PURE__*/_jsx(Tooltip, {
|