@astryxdesign/core 0.3.0 → 0.4.0-canary.058f476
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 +10 -2
- package/dist/AspectRatio/index.d.ts.map +1 -1
- package/dist/AspectRatio/index.js +1 -2
- 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/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +1 -2
- package/dist/Badge/index.d.ts.map +1 -1
- package/dist/Badge/index.js +1 -2
- 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/Blockquote/Blockquote.d.ts.map +1 -1
- package/dist/Blockquote/Blockquote.js +1 -2
- package/dist/Blockquote/index.d.ts.map +1 -1
- package/dist/Blockquote/index.js +1 -2
- 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/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +1 -2
- package/dist/Card/index.d.ts.map +1 -1
- package/dist/Card/index.js +1 -2
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +8 -12
- package/dist/Center/Center.d.ts.map +1 -1
- package/dist/Center/Center.js +1 -2
- package/dist/Center/index.d.ts.map +1 -1
- package/dist/Center/index.js +1 -2
- 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/Code/Code.d.ts.map +1 -1
- package/dist/Code/Code.js +1 -2
- 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/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +5 -0
- 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/Field/PanelSearchInput.d.ts +81 -0
- package/dist/Field/PanelSearchInput.d.ts.map +1 -0
- package/dist/Field/PanelSearchInput.js +151 -0
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +21 -10
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +1 -2
- package/dist/Grid/index.d.ts.map +1 -1
- package/dist/Grid/index.js +1 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +3 -19
- package/dist/Icon/globalIconRegistry.d.ts +5 -4
- package/dist/Icon/globalIconRegistry.d.ts.map +1 -1
- package/dist/Icon/globalIconRegistry.js +5 -4
- 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 +205 -170
- 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/Section/Section.d.ts.map +1 -1
- package/dist/Section/Section.js +1 -2
- package/dist/Section/index.d.ts.map +1 -1
- package/dist/Section/index.js +1 -2
- 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 +293 -183
- 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/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +1 -2
- package/dist/Skeleton/index.d.ts.map +1 -1
- package/dist/Skeleton/index.js +1 -2
- 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/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -2
- package/dist/VisuallyHidden/index.d.ts.map +1 -1
- package/dist/VisuallyHidden/index.js +1 -2
- package/dist/astryx.css +86 -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/interactionModality.d.ts +34 -0
- package/dist/utils/interactionModality.d.ts.map +1 -0
- package/dist/utils/interactionModality.js +70 -0
- 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 +14 -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 -2
- package/src/AspectRatio/index.ts +0 -2
- 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/Badge/Badge.tsx +0 -2
- package/src/Badge/index.ts +0 -2
- package/src/Banner/Banner.test.tsx +58 -1
- package/src/Banner/Banner.tsx +33 -11
- package/src/Blockquote/Blockquote.tsx +0 -2
- package/src/Blockquote/index.ts +0 -2
- 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/Card/Card.tsx +0 -2
- package/src/Card/index.ts +0 -2
- package/src/Carousel/Carousel.doc.mjs +3 -0
- package/src/Carousel/Carousel.tsx +10 -6
- package/src/Center/Center.tsx +0 -2
- package/src/Center/index.ts +0 -2
- 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/Code/Code.tsx +0 -2
- 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 +83 -0
- package/src/CommandPalette/CommandPalette.tsx +5 -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/Field/PanelSearchInput.tsx +271 -0
- package/src/FileInput/FileInput.tsx +21 -8
- package/src/Grid/Grid.tsx +0 -2
- package/src/Grid/index.ts +0 -2
- package/src/HoverCard/useHoverCard.tsx +2 -23
- package/src/Icon/Icon.doc.mjs +2 -1
- package/src/Icon/globalIconRegistry.tsx +5 -4
- 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 +18 -1
- package/src/MultiSelector/MultiSelector.test.tsx +387 -18
- package/src/MultiSelector/MultiSelector.tsx +267 -220
- 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/Section/Section.tsx +0 -2
- package/src/Section/index.ts +0 -2
- package/src/SegmentedControl/SegmentedControlItem.tsx +2 -9
- package/src/SelectableCard/SelectableCard.tsx +4 -9
- package/src/Selector/Selector.doc.mjs +17 -4
- package/src/Selector/Selector.test.tsx +1394 -100
- package/src/Selector/Selector.tsx +355 -212
- 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/Skeleton/Skeleton.tsx +0 -2
- package/src/Skeleton/index.ts +0 -2
- 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/VisuallyHidden/VisuallyHidden.tsx +0 -2
- package/src/VisuallyHidden/index.ts +0 -2
- 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/serverSafeComponents.test.ts +665 -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/interactionModality.ts +74 -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
|
@@ -20,20 +20,22 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
20
20
|
import { usePopover } from "../Popover/usePopover.js";
|
|
21
21
|
import { useTooltip } from "../Tooltip/index.js";
|
|
22
22
|
import { Icon, renderIconSlot } from "../Icon/index.js";
|
|
23
|
-
import { Field, inputStatusBorderStyles, inputStatusHoverShadowStyles, inputWrapperStyles } from "../Field/index.js";
|
|
23
|
+
import { Field, InputClearButton, inputStatusBorderStyles, inputStatusHoverShadowStyles, inputWrapperStyles } from "../Field/index.js";
|
|
24
24
|
import { Divider } from "../Divider/index.js";
|
|
25
25
|
import { Spinner } from "../Spinner/index.js";
|
|
26
|
-
import {
|
|
26
|
+
import { PanelSearchInput } from "../Field/PanelSearchInput.js";
|
|
27
27
|
import { CheckboxInput } from "../CheckboxInput/index.js";
|
|
28
28
|
import { Badge } from "../Badge/index.js";
|
|
29
29
|
import "../theme/tokens.stylex.js";
|
|
30
|
-
import { colorVars, sizeVars, spacingVars, radiusVars, durationVars, easeVars, typographyVars, fontWeightVars, typeScaleVars
|
|
30
|
+
import { colorVars, sizeVars, spacingVars, radiusVars, durationVars, easeVars, typographyVars, fontWeightVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
31
31
|
import { isOptionData, isDivider, isSection, normalizeOption, getSelectableOptions } from "../Selector/utils.js";
|
|
32
32
|
import { useMultiCombobox } from "./hooks.js";
|
|
33
33
|
import { getInputARIA, mergeProps } from "../utils/index.js";
|
|
34
34
|
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
35
35
|
import { useSize } from "../SizeContext/SizeContext.js";
|
|
36
36
|
import { themeProps } from "../utils/themeProps.js";
|
|
37
|
+
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
38
|
+
import { stableClassName } from "../naming.js";
|
|
37
39
|
import { groupStyles } from "../InputGroup/groupStyles.js";
|
|
38
40
|
import { useInputGroup } from "../InputGroup/InputGroupContext.js";
|
|
39
41
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
@@ -63,6 +65,21 @@ const styles = {
|
|
|
63
65
|
kMwMTN: "xv1l7n4",
|
|
64
66
|
$$css: true
|
|
65
67
|
},
|
|
68
|
+
triggerIcon: {
|
|
69
|
+
kmuXW: "x2lah0s",
|
|
70
|
+
$$css: true
|
|
71
|
+
},
|
|
72
|
+
triggerIconRotation: {
|
|
73
|
+
k1ekBW: "x11xpdln",
|
|
74
|
+
kIyJzY: "xuedmi6",
|
|
75
|
+
kAMwcw: "xlr8y92",
|
|
76
|
+
k3nNDw: "x1g0ag68",
|
|
77
|
+
$$css: true
|
|
78
|
+
},
|
|
79
|
+
triggerIconOpen: {
|
|
80
|
+
k3aq6I: "x19jd1h0",
|
|
81
|
+
$$css: true
|
|
82
|
+
},
|
|
66
83
|
triggerGhost: {
|
|
67
84
|
kzqmXN: "x14atkfc",
|
|
68
85
|
kMzoRj: "xc342km",
|
|
@@ -70,8 +87,6 @@ const styles = {
|
|
|
70
87
|
kKwaWg: "x1ilzqfv xq8i9tn",
|
|
71
88
|
kGVxlE: "x1gnnqk1 x1irk71m x15ysqaf",
|
|
72
89
|
k63SB2: "x1e4wzip",
|
|
73
|
-
kI3sdo: "x1a2a7pz x1irc7jg",
|
|
74
|
-
kInvED: "x1wfwxd8 xscfbxq",
|
|
75
90
|
k1ekBW: "xrafxwg",
|
|
76
91
|
k3aq6I: "x3oybdh xk4oym4",
|
|
77
92
|
$$css: true
|
|
@@ -81,9 +96,22 @@ const styles = {
|
|
|
81
96
|
k3aq6I: "x1c071of x1pdlv7q",
|
|
82
97
|
$$css: true
|
|
83
98
|
},
|
|
99
|
+
statusButton: {
|
|
100
|
+
k1xSpc: "x78zum5",
|
|
101
|
+
kGNEyG: "x6s0dn4",
|
|
102
|
+
kjj79g: "xl56j7k",
|
|
103
|
+
kmVPX3: "x1717udv",
|
|
104
|
+
kogj98: "x1ghz6dp",
|
|
105
|
+
kMzoRj: "xc342km",
|
|
106
|
+
ksu8eU: "xng3xce",
|
|
107
|
+
kWkggS: "xjbqb8w",
|
|
108
|
+
kMwMTN: "x1heor9g",
|
|
109
|
+
kkrTdU: "x1ypdohk",
|
|
110
|
+
kaIpWk: "xh6dtrn",
|
|
111
|
+
$$css: true
|
|
112
|
+
},
|
|
84
113
|
popover: {
|
|
85
114
|
k7Eaqz: "xrzjruh",
|
|
86
|
-
keoZOQ: "xcsaf9d",
|
|
87
115
|
$$css: true
|
|
88
116
|
},
|
|
89
117
|
selectAllWrapper: {
|
|
@@ -93,10 +121,6 @@ const styles = {
|
|
|
93
121
|
kkrTdU: "x1ypdohk",
|
|
94
122
|
$$css: true
|
|
95
123
|
},
|
|
96
|
-
sectionDivider: {
|
|
97
|
-
kqGvvJ: "xsq74q5",
|
|
98
|
-
$$css: true
|
|
99
|
-
},
|
|
100
124
|
divider: {
|
|
101
125
|
kqGvvJ: "xsq74q5",
|
|
102
126
|
$$css: true
|
|
@@ -109,6 +133,10 @@ const styles = {
|
|
|
109
133
|
kzqmXN: "xh8yej3",
|
|
110
134
|
kaIpWk: "xh6dtrn",
|
|
111
135
|
kkrTdU: "x1ypdohk",
|
|
136
|
+
kMv6JI: "x9ynric",
|
|
137
|
+
kGuDYH: "xcr08ib",
|
|
138
|
+
k63SB2: "x1e4wzip",
|
|
139
|
+
kMwMTN: "x1tgivj0",
|
|
112
140
|
kWkggS: "xjbqb8w",
|
|
113
141
|
kI3sdo: "x1a2a7pz",
|
|
114
142
|
$$css: true
|
|
@@ -119,6 +147,7 @@ const styles = {
|
|
|
119
147
|
},
|
|
120
148
|
itemDisabled: {
|
|
121
149
|
kSiTet: "xbyyjgo",
|
|
150
|
+
kMwMTN: "xnbbluu",
|
|
122
151
|
kkrTdU: "x1h6gzvc",
|
|
123
152
|
$$css: true
|
|
124
153
|
}
|
|
@@ -248,6 +277,7 @@ export function MultiSelector({
|
|
|
248
277
|
triggerDisplay = 'count',
|
|
249
278
|
maxBadges = 3,
|
|
250
279
|
renderOption,
|
|
280
|
+
indicatorPosition = 'start',
|
|
251
281
|
isDefaultOpen = false,
|
|
252
282
|
'data-testid': testId,
|
|
253
283
|
htmlName,
|
|
@@ -272,7 +302,7 @@ export function MultiSelector({
|
|
|
272
302
|
const searchRef = useRef(null);
|
|
273
303
|
const inputGroup = useInputGroup();
|
|
274
304
|
const [searchQuery, setSearchQuery] = useState('');
|
|
275
|
-
// A typed query shows
|
|
305
|
+
// A typed query shows the search row's clear (✕) button, which becomes
|
|
276
306
|
// the next tab stop after the search input.
|
|
277
307
|
const hasQuery = searchQuery.length > 0;
|
|
278
308
|
|
|
@@ -389,7 +419,10 @@ export function MultiSelector({
|
|
|
389
419
|
hasAutoFocus: false,
|
|
390
420
|
// The popup's own role="listbox" is the exposed semantics; the trigger
|
|
391
421
|
// keeps DOM focus, so wrapping it in a modal dialog would misrepresent it.
|
|
392
|
-
role: 'none'
|
|
422
|
+
role: 'none',
|
|
423
|
+
// The theme target belongs on the SURFACE that paints the popup, which
|
|
424
|
+
// `usePopover` owns — not on the scrolling list inside it.
|
|
425
|
+
surfaceTarget: 'multi-selector-popup'
|
|
393
426
|
});
|
|
394
427
|
|
|
395
428
|
// Open dropdown on mount when isDefaultOpen is true
|
|
@@ -595,13 +628,36 @@ export function MultiSelector({
|
|
|
595
628
|
if (!hasSearch) {
|
|
596
629
|
return null;
|
|
597
630
|
}
|
|
598
|
-
return /*#__PURE__*/_jsx(
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
631
|
+
return /*#__PURE__*/_jsx(PanelSearchInput, {
|
|
632
|
+
ref: searchRef,
|
|
633
|
+
id: searchId
|
|
634
|
+
// The search row is the panel's header: a magnifier, a borderless
|
|
635
|
+
// input, and the shared clear (✕) button. It deliberately does NOT
|
|
636
|
+
// render a bordered TextInput — the popup is already a bordered
|
|
637
|
+
// surface, and a field inside it drew a second box within that box.
|
|
638
|
+
,
|
|
639
|
+
label: t('@astryx.multiSelector.searchOptions')
|
|
640
|
+
// Same accessible name the TextInput's built-in clear produced
|
|
641
|
+
// ("Clear Search options"), so the affordance keeps its name while its
|
|
642
|
+
// chrome changes.
|
|
643
|
+
,
|
|
644
|
+
clearLabel: t('@astryx.textInput.clearLabel', {
|
|
645
|
+
label: t('@astryx.multiSelector.searchOptions')
|
|
646
|
+
}),
|
|
647
|
+
...themeProps('multi-selector-search'),
|
|
648
|
+
// When hasSearch is set, focus moves into this input on open, so it —
|
|
649
|
+
// not the trigger — must be the combobox reporting the highlighted
|
|
650
|
+
// option via aria-activedescendant (comboboxes-4).
|
|
651
|
+
role: "combobox",
|
|
652
|
+
"aria-expanded": popover.isOpen,
|
|
653
|
+
"aria-controls": listboxId,
|
|
654
|
+
"aria-autocomplete": "list",
|
|
655
|
+
"aria-activedescendant": popover.isOpen && highlightedIndex >= 0 ? getItemId(highlightedIndex) : undefined,
|
|
656
|
+
value: searchQuery,
|
|
657
|
+
onValueChange: handleSearchChange,
|
|
658
|
+
onContainerKeyDown: e => {
|
|
659
|
+
// The clear (✕) button lives inside the row, after the input in DOM
|
|
660
|
+
// order. When it is focused and the user tabs forward there is
|
|
605
661
|
// nothing else in the popup, so dismiss it (Shift+Tab returns to the
|
|
606
662
|
// input natively). Key events originating on the input are handled on
|
|
607
663
|
// the input below; ignore them here so we don't double-dismiss.
|
|
@@ -612,54 +668,23 @@ export function MultiSelector({
|
|
|
612
668
|
onKeyDown(e);
|
|
613
669
|
}
|
|
614
670
|
},
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
//
|
|
619
|
-
//
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
width: "100%"
|
|
633
|
-
// When hasSearch is set, focus moves into this input on open, so it —
|
|
634
|
-
// not the trigger — must be the combobox reporting the highlighted
|
|
635
|
-
// option via aria-activedescendant (comboboxes-4). role + aria-* pass
|
|
636
|
-
// through to the underlying <input> via BaseProps.
|
|
637
|
-
,
|
|
638
|
-
role: "combobox",
|
|
639
|
-
"aria-expanded": popover.isOpen,
|
|
640
|
-
"aria-controls": listboxId,
|
|
641
|
-
"aria-autocomplete": "list",
|
|
642
|
-
"aria-activedescendant": popover.isOpen && highlightedIndex >= 0 ? getItemId(highlightedIndex) : undefined,
|
|
643
|
-
value: searchQuery,
|
|
644
|
-
onChange: handleSearchChange,
|
|
645
|
-
onKeyDown: e => {
|
|
646
|
-
// Arrow keys navigate options; Enter toggles; Escape closes.
|
|
647
|
-
// Space and Home/End are left to the input (type a space / move
|
|
648
|
-
// the caret) per the APG editable combobox; PageUp/PageDown are
|
|
649
|
-
// the sanctioned substitute for jumping to the first/last option.
|
|
650
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'PageUp' || e.key === 'PageDown' || e.key === 'Enter' || e.key === 'Escape') {
|
|
651
|
-
onKeyDown(e);
|
|
652
|
-
return;
|
|
653
|
-
}
|
|
654
|
-
// Tab: when a query is showing the clear (✕) button, forward-tab
|
|
655
|
-
// moves focus to it (keeping the popup open) so the affordance is
|
|
656
|
-
// keyboard-reachable. Every other Tab dismisses the popup as usual.
|
|
657
|
-
if (e.key === 'Tab' && (e.shiftKey || !hasQuery)) {
|
|
658
|
-
onKeyDown(e);
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
placeholder: searchPlaceholder
|
|
662
|
-
})
|
|
671
|
+
onKeyDown: e => {
|
|
672
|
+
// Arrow keys navigate options; Enter toggles; Escape closes.
|
|
673
|
+
// Space and Home/End are left to the input (type a space / move
|
|
674
|
+
// the caret) per the APG editable combobox; PageUp/PageDown are
|
|
675
|
+
// the sanctioned substitute for jumping to the first/last option.
|
|
676
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'PageUp' || e.key === 'PageDown' || e.key === 'Enter' || e.key === 'Escape') {
|
|
677
|
+
onKeyDown(e);
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
// Tab: when a query is showing the clear (✕) button, forward-tab
|
|
681
|
+
// moves focus to it (keeping the popup open) so the affordance is
|
|
682
|
+
// keyboard-reachable. Every other Tab dismisses the popup as usual.
|
|
683
|
+
if (e.key === 'Tab' && (e.shiftKey || !hasQuery)) {
|
|
684
|
+
onKeyDown(e);
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
placeholder: searchPlaceholder
|
|
663
688
|
});
|
|
664
689
|
}, [hasSearch, searchId, listboxId, searchQuery, hasQuery, searchPlaceholder, handleSearchChange, onKeyDown, popover.isOpen, highlightedIndex, getItemId, t]);
|
|
665
690
|
|
|
@@ -673,6 +698,25 @@ export function MultiSelector({
|
|
|
673
698
|
// checkbox is inert/decorative, so the indeterminate state must be
|
|
674
699
|
// conveyed through the option's accessible name (WCAG 4.1.2).
|
|
675
700
|
const isPartiallySelected = isSelectAll && selectAllState === 'indeterminate';
|
|
701
|
+
const checkbox = /*#__PURE__*/_jsx("div", {
|
|
702
|
+
inert: true,
|
|
703
|
+
...{
|
|
704
|
+
0: {
|
|
705
|
+
className: "x47corl x78zum5 x2lah0s"
|
|
706
|
+
},
|
|
707
|
+
1: {
|
|
708
|
+
className: "x47corl x78zum5 x2lah0s xvc5jky"
|
|
709
|
+
}
|
|
710
|
+
}[!!(indicatorPosition === 'end') << 0],
|
|
711
|
+
children: /*#__PURE__*/_jsx(CheckboxInput, {
|
|
712
|
+
label: "",
|
|
713
|
+
isLabelHidden: true,
|
|
714
|
+
value: checkboxValue,
|
|
715
|
+
onChange: () => {},
|
|
716
|
+
isDisabled: item.disabled,
|
|
717
|
+
size: size === 'lg' ? 'md' : size
|
|
718
|
+
})
|
|
719
|
+
});
|
|
676
720
|
return /*#__PURE__*/_jsxs("div", {
|
|
677
721
|
id: getItemId(flatIndex),
|
|
678
722
|
role: "option",
|
|
@@ -687,33 +731,25 @@ export function MultiSelector({
|
|
|
687
731
|
}
|
|
688
732
|
},
|
|
689
733
|
onMouseEnter: () => onItemMouseEnter(item, flatIndex),
|
|
690
|
-
...
|
|
691
|
-
|
|
692
|
-
|
|
734
|
+
...mergeProps(
|
|
735
|
+
// One target for every dropdown row, carrying the row's size and
|
|
736
|
+
// runtime state so a theme can express "selected option at large"
|
|
737
|
+
// or restyle just the Select All row (`.select-all`) without
|
|
738
|
+
// reaching for structural selectors.
|
|
739
|
+
themeProps('multi-selector-option', {
|
|
740
|
+
size,
|
|
741
|
+
'select-all': isSelectAll ? 'select-all' : null,
|
|
742
|
+
selected: isSelected ? 'selected' : null,
|
|
743
|
+
disabled: item.disabled ? 'disabled' : null
|
|
744
|
+
}), stylex.props(styles.item, isSelectAll ? selectAllSizeStyles[size] : itemSizeStyles[size], isSelectAll && styles.selectAllWrapper, isHighlighted && styles.itemHighlighted, item.disabled && styles.itemDisabled)),
|
|
745
|
+
children: [indicatorPosition === 'start' && checkbox, renderOption && !isSelectAll ? renderOption(item) : /*#__PURE__*/_jsx("span", {
|
|
693
746
|
...{
|
|
694
|
-
className: "
|
|
747
|
+
className: "xeuugli xb3r6kr xlyipyv xuxw1ft"
|
|
695
748
|
},
|
|
696
|
-
children: /*#__PURE__*/_jsx(CheckboxInput, {
|
|
697
|
-
label: "",
|
|
698
|
-
isLabelHidden: true,
|
|
699
|
-
value: checkboxValue,
|
|
700
|
-
onChange: () => {},
|
|
701
|
-
isDisabled: item.disabled,
|
|
702
|
-
size: size === 'lg' ? 'md' : size
|
|
703
|
-
})
|
|
704
|
-
}), renderOption && !isSelectAll ? renderOption(item) : /*#__PURE__*/_jsx("span", {
|
|
705
|
-
...{
|
|
706
|
-
0: {
|
|
707
|
-
className: "x9ynric xcr08ib x1e4wzip x1tgivj0 xeuugli xb3r6kr xlyipyv xuxw1ft"
|
|
708
|
-
},
|
|
709
|
-
1: {
|
|
710
|
-
className: "x9ynric xcr08ib x1e4wzip xeuugli xb3r6kr xlyipyv xuxw1ft xnbbluu"
|
|
711
|
-
}
|
|
712
|
-
}[!!item.disabled << 0],
|
|
713
749
|
children: item.label ?? item.value
|
|
714
|
-
})]
|
|
750
|
+
}), indicatorPosition === 'end' && checkbox]
|
|
715
751
|
}, item.value);
|
|
716
|
-
}, [renderOption, highlightedIndex, optimisticValue, allEnabledSelected, selectAllState, selectAllLabel, getItemId, handleNavigableToggle, onItemMouseEnter, size, t]);
|
|
752
|
+
}, [renderOption, indicatorPosition, highlightedIndex, optimisticValue, allEnabledSelected, selectAllState, selectAllLabel, getItemId, handleNavigableToggle, onItemMouseEnter, size, t]);
|
|
717
753
|
|
|
718
754
|
// Render all options. Uses sortedItems as the single source of truth for
|
|
719
755
|
// item order — no independent sorting here. Structural elements (dividers,
|
|
@@ -725,12 +761,11 @@ export function MultiSelector({
|
|
|
725
761
|
// Number of real items (excluding the select-all sentinel)
|
|
726
762
|
const realItemCount = hasSelectAll ? sortedItems.length - 1 : sortedItems.length;
|
|
727
763
|
|
|
728
|
-
// Show select-all only when there are real items to select
|
|
764
|
+
// Show select-all only when there are real items to select. It reads as
|
|
765
|
+
// the first row of the list, not a section of its own — no divider under
|
|
766
|
+
// it (the checkbox column already lines it up with the options below).
|
|
729
767
|
if (hasSelectAll && realItemCount > 0) {
|
|
730
768
|
elements.push(renderItem(sortedItems[0], 0));
|
|
731
|
-
elements.push(/*#__PURE__*/_jsx(Divider, {
|
|
732
|
-
xstyle: styles.divider
|
|
733
|
-
}, "select-all-divider"));
|
|
734
769
|
cursor = 1;
|
|
735
770
|
} else if (hasSelectAll) {
|
|
736
771
|
// Skip the select-all sentinel when there are no real items
|
|
@@ -744,9 +779,9 @@ export function MultiSelector({
|
|
|
744
779
|
if (realItemCount === 0) {
|
|
745
780
|
elements.push(/*#__PURE__*/_jsx("div", {
|
|
746
781
|
role: "presentation",
|
|
747
|
-
...{
|
|
782
|
+
...mergeProps(themeProps('multi-selector-empty-state'), {
|
|
748
783
|
className: "x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib"
|
|
749
|
-
},
|
|
784
|
+
}),
|
|
750
785
|
children: "No results found"
|
|
751
786
|
}, "empty"));
|
|
752
787
|
return elements;
|
|
@@ -788,16 +823,21 @@ export function MultiSelector({
|
|
|
788
823
|
sectionItems.push(renderItem(sortedItems[cursor], cursor));
|
|
789
824
|
cursor++;
|
|
790
825
|
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
elements.push(/*#__PURE__*/_jsx("div", {
|
|
826
|
+
// The heading lives INSIDE the group and is aria-hidden: the group
|
|
827
|
+
// already carries the title as its accessible name, so exposing the
|
|
828
|
+
// text again would announce it twice. This also keeps role="listbox"'s
|
|
829
|
+
// children to option/group only — the old labeled Divider sat in the
|
|
830
|
+
// listbox as a stray role="separator".
|
|
831
|
+
elements.push(/*#__PURE__*/_jsxs("div", {
|
|
798
832
|
role: "group",
|
|
799
833
|
"aria-label": option.title,
|
|
800
|
-
children:
|
|
834
|
+
children: [option.title && /*#__PURE__*/_jsx("div", {
|
|
835
|
+
"aria-hidden": "true",
|
|
836
|
+
...mergeProps(themeProps('multi-selector-section-heading'), {
|
|
837
|
+
className: "xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"
|
|
838
|
+
}),
|
|
839
|
+
children: option.title
|
|
840
|
+
}), sectionItems]
|
|
801
841
|
}, `section-${i}`));
|
|
802
842
|
} else if (isOptionData(option)) {
|
|
803
843
|
if (!isSearching || optionMatchesQuery(normalizeOption(option), searchQuery)) {
|
|
@@ -827,8 +867,9 @@ export function MultiSelector({
|
|
|
827
867
|
...mergeProps(themeProps('multi-selector', {
|
|
828
868
|
variant,
|
|
829
869
|
size,
|
|
830
|
-
status: status?.type ?? null
|
|
831
|
-
|
|
870
|
+
status: status?.type ?? null,
|
|
871
|
+
disabled: isDisabled ? 'disabled' : null
|
|
872
|
+
}), stylex.props(inputWrapperStyles.base, styles.triggerContainer, sizeStyles[size], variant === 'ghost' && styles.triggerGhost, variant === 'ghost' && focusOutlineStyles.focusWithin, isDisabled && inputWrapperStyles.disabled, variant === 'ghost' && isDisabled && styles.triggerGhostDisabled, optimisticValue.length === 0 && styles.triggerPlaceholder, variant !== 'ghost' && status && inputStatusBorderStyles[status.type], variant !== 'ghost' && status && !isDisabled && inputStatusHoverShadowStyles[status.type], variant !== 'ghost' && inputGroup && groupStyles.inGroup, xstyle), className, style),
|
|
832
873
|
children: [startIcon && renderIconSlot(startIcon, {
|
|
833
874
|
size: 'sm',
|
|
834
875
|
color: 'secondary'
|
|
@@ -880,89 +921,83 @@ export function MultiSelector({
|
|
|
880
921
|
disabled: isDisabled
|
|
881
922
|
}, v)), isBusy && /*#__PURE__*/_jsx(Spinner, {
|
|
882
923
|
size: "sm"
|
|
883
|
-
}), hasClear && value.length > 0 && !isDisabled && /*#__PURE__*/_jsx(
|
|
884
|
-
|
|
885
|
-
onClick: handleClear,
|
|
886
|
-
"aria-label": t('@astryx.multiSelector.clearAll', {
|
|
924
|
+
}), hasClear && value.length > 0 && !isDisabled && /*#__PURE__*/_jsx(InputClearButton, {
|
|
925
|
+
label: t('@astryx.multiSelector.clearAll', {
|
|
887
926
|
label
|
|
888
927
|
}),
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
928
|
+
onClick: handleClear,
|
|
929
|
+
iconClassName: stableClassName('multi-selector-clear-icon')
|
|
930
|
+
}), showStatusIcon ? showStatusTooltip ? /*#__PURE__*/_jsx("button", {
|
|
931
|
+
ref: statusTooltip.ref,
|
|
932
|
+
type: "button",
|
|
933
|
+
"aria-label": t(STATUS_BUTTON_LABEL_KEY[status.type]),
|
|
934
|
+
"aria-describedby": statusTooltip.describedBy,
|
|
935
|
+
onClick: e => e.stopPropagation(),
|
|
936
|
+
...stylex.props(focusOutlineStyles.focusVisible, styles.statusButton),
|
|
892
937
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
893
|
-
icon:
|
|
938
|
+
icon: STATUS_ICON_MAP[status.type],
|
|
894
939
|
size: "sm",
|
|
895
|
-
color:
|
|
896
|
-
|
|
897
|
-
// restyle just this icon (color, size, hover) via `defineTheme`.
|
|
898
|
-
// Same-element rules in @layer astryx-theme win over the icon's
|
|
899
|
-
// own base color/size, which a button-level target could not
|
|
900
|
-
// reach.
|
|
901
|
-
,
|
|
902
|
-
...themeProps('multi-selector-clear-icon')
|
|
940
|
+
color: STATUS_ICON_COLOR_MAP[status.type],
|
|
941
|
+
xstyle: styles.triggerIcon
|
|
903
942
|
})
|
|
904
|
-
})
|
|
943
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
|
944
|
+
icon: STATUS_ICON_MAP[status.type],
|
|
945
|
+
size: "sm",
|
|
946
|
+
color: STATUS_ICON_COLOR_MAP[status.type],
|
|
947
|
+
xstyle: styles.triggerIcon
|
|
948
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
|
949
|
+
icon: "chevronDown",
|
|
950
|
+
size: "sm",
|
|
951
|
+
color: "secondary"
|
|
952
|
+
// The rotation rides on the glyph, alongside the box and color
|
|
953
|
+
// the wrapper used to provide, so one element carries the mark,
|
|
954
|
+
// its open/closed transform, and the theme target.
|
|
955
|
+
,
|
|
956
|
+
xstyle: [styles.triggerIcon, styles.triggerIconRotation, popover.isOpen && styles.triggerIconOpen]
|
|
957
|
+
// Stable theme target on the chevron glyph itself, so a theme can
|
|
958
|
+
// restyle just this icon (color, size, hover) — and its
|
|
959
|
+
// open/closed state — via `defineTheme`. Same-element rules in
|
|
960
|
+
// @layer astryx-theme win over the icon's own base color/size,
|
|
961
|
+
// which a button-level target could not reach.
|
|
962
|
+
,
|
|
963
|
+
...themeProps('multi-selector-indicator-icon', {
|
|
964
|
+
state: popover.isOpen ? 'expanded' : 'collapsed'
|
|
965
|
+
})
|
|
966
|
+
})]
|
|
967
|
+
}), popover.render(hasSearch ?
|
|
968
|
+
/*#__PURE__*/
|
|
969
|
+
// With a search row the panel splits: the header stays put while the
|
|
970
|
+
// options scroll under it, so the field does not slide out of reach
|
|
971
|
+
// in a long list. Without one the panel is a single scroll container,
|
|
972
|
+
// exactly as before.
|
|
973
|
+
_jsxs("div", {
|
|
974
|
+
children: [renderSearch(), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx("div", {
|
|
905
975
|
...{
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
},
|
|
915
|
-
3: {
|
|
916
|
-
className: "x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0 xq2gx43"
|
|
917
|
-
}
|
|
918
|
-
}[!!(!showStatusIcon && popover.isOpen) << 1 | !!showStatusIcon << 0],
|
|
919
|
-
children: showStatusIcon ? showStatusTooltip ? /*#__PURE__*/_jsx("button", {
|
|
920
|
-
ref: statusTooltip.ref,
|
|
921
|
-
type: "button",
|
|
922
|
-
"aria-label": t(STATUS_BUTTON_LABEL_KEY[status.type]),
|
|
923
|
-
"aria-describedby": statusTooltip.describedBy,
|
|
924
|
-
onClick: e => e.stopPropagation(),
|
|
925
|
-
...{
|
|
926
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto"
|
|
927
|
-
},
|
|
928
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
929
|
-
icon: STATUS_ICON_MAP[status.type],
|
|
930
|
-
size: "sm",
|
|
931
|
-
color: STATUS_ICON_COLOR_MAP[status.type]
|
|
932
|
-
})
|
|
933
|
-
}) : /*#__PURE__*/_jsx(Icon, {
|
|
934
|
-
icon: STATUS_ICON_MAP[status.type],
|
|
935
|
-
size: "sm",
|
|
936
|
-
color: STATUS_ICON_COLOR_MAP[status.type]
|
|
937
|
-
}) : /*#__PURE__*/_jsx(Icon, {
|
|
938
|
-
icon: "chevronDown",
|
|
939
|
-
size: "sm",
|
|
940
|
-
color: "inherit"
|
|
941
|
-
// Stable theme target on the chevron glyph itself, so a theme can
|
|
942
|
-
// restyle just this icon (color, size, hover) — and its
|
|
943
|
-
// open/closed state — via `defineTheme`. Same-element rules in
|
|
944
|
-
// @layer astryx-theme win over the icon's own base color/size,
|
|
945
|
-
// which a button-level target could not reach.
|
|
946
|
-
,
|
|
947
|
-
...themeProps('multi-selector-indicator-icon', {
|
|
948
|
-
state: popover.isOpen ? 'expanded' : 'collapsed'
|
|
949
|
-
})
|
|
976
|
+
className: "x9f619 xuyqlj2 x1odjw0f x9epnlk"
|
|
977
|
+
},
|
|
978
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
979
|
+
id: listboxId,
|
|
980
|
+
role: "listbox",
|
|
981
|
+
"aria-multiselectable": "true",
|
|
982
|
+
"aria-labelledby": triggerId,
|
|
983
|
+
children: renderOptions()
|
|
950
984
|
})
|
|
951
985
|
})]
|
|
952
|
-
})
|
|
986
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
953
987
|
...{
|
|
954
988
|
className: "x9f619 xuyqlj2 x1odjw0f x9epnlk"
|
|
955
989
|
},
|
|
956
|
-
children:
|
|
990
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
957
991
|
id: listboxId,
|
|
958
992
|
role: "listbox",
|
|
959
993
|
"aria-multiselectable": "true",
|
|
960
994
|
"aria-labelledby": triggerId,
|
|
961
995
|
children: renderOptions()
|
|
962
|
-
})
|
|
996
|
+
})
|
|
963
997
|
}), {
|
|
964
998
|
placement: 'below',
|
|
965
999
|
alignment: 'start',
|
|
1000
|
+
offset: spacingVars['--spacing-1'],
|
|
966
1001
|
xstyle: styles.popover
|
|
967
1002
|
}), showStatusTooltip && statusTooltip.renderTooltip(status?.message ?? ''), showsDisabledMessage && disabledMessageTooltip.renderTooltip(disabledMessage)]
|
|
968
1003
|
});
|
|
@@ -61,6 +61,17 @@ interface NumberInputPropsBase extends Omit<BaseProps, 'onChange' | 'defaultValu
|
|
|
61
61
|
* @default false
|
|
62
62
|
*/
|
|
63
63
|
isDisabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the input is read-only.
|
|
66
|
+
* The value is shown at full opacity and still submits with the form, but
|
|
67
|
+
* cannot be edited. Unlike `isDisabled`, a read-only input is not dimmed and
|
|
68
|
+
* stays in the tab order — use it for a value the user should see and send
|
|
69
|
+
* but not change. Stepping is off in every form while read-only: arrow keys,
|
|
70
|
+
* the wheel, and the number steppers. `isDisabled` takes precedence when both
|
|
71
|
+
* are set.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
isReadOnly?: boolean;
|
|
64
75
|
/**
|
|
65
76
|
* Explains why the input is disabled. When set together with `isDisabled`,
|
|
66
77
|
* the input shows a tooltip with this text on hover and keyboard focus, and
|
|
@@ -159,6 +170,21 @@ interface NumberInputPropsBase extends Omit<BaseProps, 'onChange' | 'defaultValu
|
|
|
159
170
|
* @default 1
|
|
160
171
|
*/
|
|
161
172
|
step?: number | null;
|
|
173
|
+
/**
|
|
174
|
+
* Formats the committed value while the input is not being edited.
|
|
175
|
+
* The raw numeric value is shown on focus so it remains editable.
|
|
176
|
+
*/
|
|
177
|
+
formatValue?: (value: number) => string;
|
|
178
|
+
/**
|
|
179
|
+
* Whether scrolling the wheel over a focused input steps the value.
|
|
180
|
+
* @default true
|
|
181
|
+
*/
|
|
182
|
+
isWheelEnabled?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Whether to show increment and decrement buttons at the end of the input.
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
hasNumberSteppers?: boolean;
|
|
162
188
|
/**
|
|
163
189
|
* Units text to display at the end of the input (e.g., "%" or "GB").
|
|
164
190
|
*/
|
|
@@ -215,7 +241,7 @@ export type NumberInputProps = NumberInputPropsNonClearable | NumberInputPropsCl
|
|
|
215
241
|
* <NumberInput label="Price" value={price} onChange={setPrice} min={0} step={0.01} />
|
|
216
242
|
* ```
|
|
217
243
|
*/
|
|
218
|
-
export declare function NumberInput({ label, isLabelHidden, description, isOptional, isRequired, isDisabled, disabledMessage, startIcon, labelIcon, status, statusVariant, size: sizeProp, onChange, value, placeholder, labelTooltip, hasAutoFocus, htmlName, autoComplete, min, max, step, units, isIntegerOnly, onFocus, onBlur, hasClear, onEnter, onKeyDown, width, xstyle, className, style, ref, ...rest }: NumberInputProps): import("react").JSX.Element;
|
|
244
|
+
export declare function NumberInput({ label, isLabelHidden, description, isOptional, isRequired, isDisabled, isReadOnly, disabledMessage, startIcon, labelIcon, status, statusVariant, size: sizeProp, onChange, value, placeholder, labelTooltip, hasAutoFocus, htmlName, autoComplete, min, max, step, formatValue, isWheelEnabled, hasNumberSteppers, units, isIntegerOnly, onFocus, onBlur, hasClear, onEnter, onKeyDown, width, xstyle, className, style, ref, ...rest }: NumberInputProps): import("react").JSX.Element;
|
|
219
245
|
export declare namespace NumberInput {
|
|
220
246
|
var displayName: string;
|
|
221
247
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../src/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../src/NumberInput/NumberInput.tsx"],"names":[],"mappings":"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"}
|