@astryxdesign/core 0.7.17-canary.gffd1fc0 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +334 -0
- package/README.md +26 -9
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +6 -8
- package/dist/AppShell/AppShell.d.ts +7 -3
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +74 -36
- package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
- package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
- package/dist/AppShell/unreadWidthPoint.js +134 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -1
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +6 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -29
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +11 -7
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +57 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +5 -0
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +6 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +12 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +45 -7
- package/dist/Calendar/Calendar.js +8 -2
- package/dist/Calendar/styles.d.ts +10 -6
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +7 -3
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +23 -4
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -4
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +8 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +7 -0
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +3 -9
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -0
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +1 -0
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +8 -0
- package/dist/Chat/pastedTextLabel.d.ts +4 -0
- package/dist/Chat/pastedTextLabel.d.ts.map +1 -0
- package/dist/Chat/pastedTextLabel.js +21 -0
- package/dist/Chat/useChatPasteAsToken.d.ts.map +1 -1
- package/dist/Chat/useChatPasteAsToken.js +8 -8
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +3 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +69 -18
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +8 -1
- package/dist/Code/Code.d.ts.map +1 -1
- package/dist/Code/Code.js +5 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +39 -12
- package/dist/CodeBlock/highlightRanges.d.ts.map +1 -1
- package/dist/CodeBlock/highlightRanges.js +6 -5
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +1 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +32 -5
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +1 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +3 -2
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +8 -8
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +5 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +104 -18
- package/dist/Dialog/DialogContext.d.ts +5 -4
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +38 -12
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/Drawer/DrawerHeader.js +23 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +23 -17
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts +24 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.js +29 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +5 -0
- package/dist/Field/inputStyles.stylex.d.ts +31 -4
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +30 -5
- package/dist/Grid/Grid.d.ts +2 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -2
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +15 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +32 -2
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +12 -6
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +18 -4
- package/dist/Indicator/indicatorRegistry.d.ts +3 -26
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
- package/dist/Indicator/indicatorRegistry.js +2 -11
- package/dist/Indicator/themeIndicators.d.ts +15 -0
- package/dist/Indicator/themeIndicators.d.ts.map +1 -0
- package/dist/Indicator/themeIndicators.js +21 -0
- package/dist/Indicator/types.d.ts +14 -0
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/Indicator/useThemeIndicator.d.ts +3 -0
- package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
- package/dist/Indicator/useThemeIndicator.js +19 -0
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +30 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +9 -2
- package/dist/Layer/layerExitCopy.d.ts.map +1 -1
- package/dist/Layer/layerExitCopy.js +1 -1
- package/dist/Layer/layerSlideRules.d.ts +23 -15
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +54 -54
- package/dist/Layer/useLayer.d.ts +41 -29
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +199 -126
- package/dist/Layer/useLayerKeyboardClearance.d.ts +5 -5
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
- package/dist/Layer/useLayerKeyboardClearance.js +5 -5
- package/dist/Layout/LayoutContainerContext.d.ts +4 -0
- package/dist/Layout/LayoutContainerContext.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerContext.js +20 -0
- package/dist/Layout/LayoutContainerScope.d.ts +15 -0
- package/dist/Layout/LayoutContainerScope.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerScope.js +23 -0
- package/dist/Layout/LayoutContent.d.ts +2 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +7 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +5 -1
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +5 -1
- package/dist/Layout/containerCorners.stylex.d.ts +15 -7
- package/dist/Layout/containerCorners.stylex.d.ts.map +1 -1
- package/dist/Layout/containerCorners.stylex.js +16 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +324 -6
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +14 -6
- package/dist/List/ListContext.d.ts +38 -1
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +50 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +85 -96
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +12 -5
- package/dist/Markdown/plugins/protocol.js +3 -3
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +11 -3
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +6 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +33 -9
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +5 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
- package/dist/NavMenu/NavMenuContext.d.ts +7 -0
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +9 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +8 -2
- package/dist/Outline/Outline.d.ts +7 -3
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +11 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +6 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +51 -25
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +33 -13
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +5 -1
- package/dist/Popover/popoverAnchor.d.ts +11 -0
- package/dist/Popover/popoverAnchor.d.ts.map +1 -0
- package/dist/Popover/popoverAnchor.js +33 -0
- package/dist/Popover/usePopover.d.ts +20 -3
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +110 -10
- package/dist/PowerSearch/PowerSearch.d.ts +1 -0
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +46 -9
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +7 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -4
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +6 -13
- package/dist/ProgressBar/ProgressBar.d.ts +5 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +26 -26
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +51 -0
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -1
- package/dist/Resizable/resizableModel.d.ts +45 -3
- package/dist/Resizable/resizableModel.d.ts.map +1 -1
- package/dist/Resizable/resizableModel.js +91 -3
- package/dist/Resizable/resizeGesture.d.ts +3 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -1
- package/dist/Resizable/resizeGesture.js +6 -0
- package/dist/Resizable/useResizable.d.ts +1 -33
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +8 -72
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +27 -5
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +70 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +34 -14
- package/dist/Selector/hooks.d.ts +5 -0
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +72 -16
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +9 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +18 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +47 -33
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +21 -12
- package/dist/Swipe/useSwipeAction.js +3 -3
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +64 -46
- package/dist/Switch/useSwitchTouch.d.ts +22 -1
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +54 -3
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +3 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +37 -18
- package/dist/Table/Table.d.ts +4 -3
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +32 -14
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -0
- package/dist/Table/TableHeaderCell.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +42 -9
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +9 -1
- package/dist/Table/TableRowPlacementContext.d.ts +18 -0
- package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
- package/dist/Table/TableRowPlacementContext.js +41 -0
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +7 -0
- package/dist/Table/columnUtils.d.ts +5 -0
- package/dist/Table/columnUtils.d.ts.map +1 -1
- package/dist/Table/columnUtils.js +9 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +8 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +10 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +76 -15
- package/dist/Table/table.stylex.d.ts +31 -5
- package/dist/Table/table.stylex.d.ts.map +1 -1
- package/dist/Table/table.stylex.js +33 -5
- package/dist/Table/types.d.ts +3 -1
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.d.ts +35 -1
- package/dist/Text/TruncationTooltip.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.js +115 -0
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +23 -4
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -1
- package/dist/TextInput/TextInput.d.ts +9 -3
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +19 -18
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +13 -4
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +10 -7
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +55 -4
- package/dist/Toast/Toast.d.ts +1 -6
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +77 -44
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +48 -21
- package/dist/Toast/types.d.ts +8 -0
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +14 -7
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +14 -9
- package/dist/Token/Token.d.ts +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -2
- package/dist/Tokenizer/Tokenizer.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +102 -62
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +33 -5
- package/dist/Tooltip/Tooltip.d.ts +12 -1
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +31 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +20 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +24 -8
- package/dist/TopNav/TopNavContext.d.ts +13 -0
- package/dist/TopNav/TopNavContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavContext.js +27 -1
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +21 -9
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +25 -17
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +13 -2
- package/dist/TopNav/TopNavMegaMenuItem.d.ts +9 -1
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +14 -2
- package/dist/TopNav/TopNavMenu.d.ts +8 -0
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +20 -5
- package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +24 -9
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +7 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +20 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +24 -9
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +7 -0
- package/dist/astryx.css +215 -56
- package/dist/gestures/GestureHost.d.ts +7 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +37 -0
- package/dist/hooks/anchoredHint.d.ts.map +1 -1
- package/dist/hooks/anchoredHint.js +0 -1
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +7 -0
- package/dist/hooks/focusableSelector.d.ts +16 -9
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +53 -2
- package/dist/hooks/scrollEdgeFade.d.ts +34 -0
- package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
- package/dist/hooks/scrollEdgeFade.js +173 -0
- package/dist/hooks/statusButtonPress.d.ts +15 -0
- package/dist/hooks/statusButtonPress.d.ts.map +1 -0
- package/dist/hooks/statusButtonPress.js +19 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +2 -1
- package/dist/hooks/useFocusTrap.d.ts +26 -16
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +75 -112
- package/dist/hooks/useGroupPressTracking.d.ts +1 -1
- package/dist/hooks/useGroupPressTracking.js +1 -1
- package/dist/hooks/useOverflow.d.ts +25 -2
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +137 -8
- package/dist/hooks/useResolvedRequired.d.ts +27 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +30 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +4 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +8 -8
- package/dist/i18n/InternationalizationContext.d.ts +13 -6
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +11 -6
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +7 -0
- package/dist/i18n/defaultTranslator.d.ts +17 -0
- package/dist/i18n/defaultTranslator.d.ts.map +1 -0
- package/dist/i18n/defaultTranslator.js +18 -0
- package/dist/i18n/firstStrongDirection.d.ts +3 -2
- package/dist/i18n/firstStrongDirection.d.ts.map +1 -1
- package/dist/i18n/firstStrongDirection.js +50 -12
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +1 -2
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +1 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +2 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +2 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Slider/Slider.generated.js +2 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +1 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +9 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +9 -0
- package/dist/i18n/publicContext.d.ts.map +1 -1
- package/dist/i18n/publicContext.js +4 -2
- package/dist/i18n/translatingContext.d.ts +2 -0
- package/dist/i18n/translatingContext.d.ts.map +1 -0
- package/dist/i18n/translatingContext.js +25 -0
- package/dist/i18n/useComponentTranslator.d.ts.map +1 -1
- package/dist/i18n/useComponentTranslator.js +3 -2
- package/dist/i18n/useListFormatter.d.ts.map +1 -1
- package/dist/i18n/useListFormatter.js +3 -2
- package/dist/i18n/useTranslator.d.ts.map +1 -1
- package/dist/i18n/useTranslator.js +3 -2
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +5 -1
- package/dist/keyboard/keyboardHeight.d.ts +34 -3
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -1
- package/dist/keyboard/keyboardHeight.js +101 -24
- package/dist/keyboard/keyboardTarget.d.ts +19 -16
- package/dist/keyboard/keyboardTarget.d.ts.map +1 -1
- package/dist/keyboard/keyboardTarget.js +529 -72
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -1
- package/dist/keyboard/useMobileKeyboard.js +1 -8
- package/dist/palette/color.d.ts +23 -0
- package/dist/palette/color.d.ts.map +1 -0
- package/dist/palette/color.js +126 -0
- package/dist/palette/generator.d.ts +69 -0
- package/dist/palette/generator.d.ts.map +1 -0
- package/dist/palette/generator.js +778 -0
- package/dist/palette/index.d.ts +12 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/index.js +13 -0
- package/dist/palette/mapping.d.ts +319 -0
- package/dist/palette/mapping.d.ts.map +1 -0
- package/dist/palette/mapping.js +1312 -0
- package/dist/palette/themePalette.d.ts +20 -0
- package/dist/palette/themePalette.d.ts.map +1 -0
- package/dist/palette/themePalette.js +145 -0
- package/dist/palette/types.d.ts +178 -0
- package/dist/palette/types.d.ts.map +1 -0
- package/dist/palette/types.js +1 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
- package/dist/privateAttributes/mediaDarkPage.js +27 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
- package/dist/privateAttributes/scheme.d.ts +10 -0
- package/dist/privateAttributes/scheme.d.ts.map +1 -0
- package/dist/privateAttributes/scheme.js +34 -0
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/travelling.stylex.js +2 -2
- package/dist/theme/MediaDarkPage.d.ts +18 -0
- package/dist/theme/MediaDarkPage.d.ts.map +1 -0
- package/dist/theme/MediaDarkPage.js +35 -0
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +9 -1
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +99 -31
- package/dist/theme/defineTheme.d.ts +31 -6
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +65 -29
- package/dist/theme/derivedVarRegistry.d.ts +19 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +49 -4
- package/dist/theme/expandRadiusScale.d.ts +1 -2
- package/dist/theme/expandRadiusScale.d.ts.map +1 -1
- package/dist/theme/expandRadiusScale.js +1 -5
- package/dist/theme/generateThemeRules.d.ts +10 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +310 -207
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/invertedSurfaceSide.d.ts +17 -0
- package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
- package/dist/theme/invertedSurfaceSide.js +47 -0
- package/dist/theme/resolveThemeValues.d.ts +5 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +7 -1
- package/dist/theme/statusRoleDefaults.d.ts +43 -0
- package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
- package/dist/theme/statusRoleDefaults.js +196 -0
- package/dist/theme/statusRoleDerivation.d.ts +4 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
- package/dist/theme/statusRoleDerivation.js +3 -1
- package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +7 -0
- package/dist/theme/themeAdaptations.d.ts +24 -1
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +48 -5
- package/dist/theme/tokenDefaults.d.ts +3 -0
- package/dist/theme/tokenDefaults.d.ts.map +1 -0
- package/dist/theme/tokenDefaults.js +30 -0
- package/dist/theme/tokenValues.d.ts +26 -0
- package/dist/theme/tokenValues.d.ts.map +1 -0
- package/dist/theme/tokenValues.js +180 -0
- package/dist/theme/tokens.d.ts +3 -2
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +7 -161
- package/dist/theme/tokens.stylex.d.ts +4 -4
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +7 -5
- package/dist/theme/useTheme.d.ts +40 -3
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +137 -32
- package/dist/utils/devWarning.d.ts +17 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +20 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +7 -4
- package/dist/utils/focusReturn.d.ts +110 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +418 -12
- package/dist/utils/hitArea.d.ts +28 -0
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +52 -18
- package/dist/utils/inputStream.d.ts +27 -0
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +72 -5
- package/dist/utils/nodeType.d.ts +2 -0
- package/dist/utils/nodeType.d.ts.map +1 -1
- package/dist/utils/nodeType.js +10 -0
- package/dist/utils/timeFormat.d.ts +14 -4
- package/dist/utils/timeFormat.d.ts.map +1 -1
- package/dist/utils/timeFormat.js +42 -4
- package/dist/utils/touchPresentation.d.ts +2 -2
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +10 -7
- package/dist/utils/touchPresentation.stylex.d.ts +4 -3
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +3 -3
- package/dist/utils/touchQueries.d.ts +3 -2
- package/dist/utils/touchQueries.d.ts.map +1 -1
- package/dist/utils/touchQueries.js +3 -2
- package/dist/utils/typeaheadMatch.d.ts +13 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -1
- package/dist/utils/typeaheadMatch.js +15 -1
- package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
- package/dist/virtualization/useInlineListWindow.js +38 -22
- package/locales/en.json +36 -0
- package/locales/pseudo.json +27 -0
- package/package.json +10 -5
- package/scripts/agent-doc-state.mjs +71 -4
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -1
- package/src/AlertDialog/AlertDialog.tsx +34 -7
- package/src/AppShell/AppShell.doc.mjs +22 -0
- package/src/AppShell/AppShell.tsx +112 -65
- package/src/AppShell/unreadWidthPoint.ts +162 -0
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +6 -1
- package/src/Badge/Badge.tsx +5 -2
- package/src/Banner/Banner.doc.mjs +15 -0
- package/src/Banner/Banner.tsx +56 -45
- package/src/BottomSheet/BottomSheet.doc.mjs +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +15 -7
- package/src/BottomSheet/BottomSheetSwitcher.tsx +73 -1
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +6 -14
- package/src/Breadcrumbs/BreadcrumbItem.tsx +14 -1
- package/src/Button/Button.doc.mjs +9 -3
- package/src/Button/Button.tsx +65 -11
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.tsx +32 -20
- package/src/Calendar/styles.ts +12 -3
- package/src/Card/Card.doc.mjs +2 -2
- package/src/Card/Card.tsx +22 -3
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposer.doc.mjs +3 -3
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +11 -7
- package/src/Chat/ChatDictationButton.tsx +12 -0
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatPastedTextToken.tsx +3 -9
- package/src/Chat/ChatSendButton.tsx +5 -0
- package/src/Chat/ChatSystemMessage.tsx +1 -0
- package/src/Chat/ChatToolCalls.tsx +16 -0
- package/src/Chat/pastedTextLabel.ts +23 -0
- package/src/Chat/useChatPasteAsToken.ts +9 -8
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
- package/src/CheckboxInput/CheckboxInput.tsx +83 -26
- package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +16 -1
- package/src/Code/Code.tsx +3 -0
- package/src/CodeBlock/CodeBlock.doc.mjs +7 -0
- package/src/CodeBlock/CodeBlock.tsx +60 -13
- package/src/CodeBlock/highlightRanges.ts +7 -5
- package/src/Collapsible/Collapsible.tsx +2 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
- package/src/ComplexSelector/ComplexSelector.tsx +19 -1
- package/src/ContextMenu/ContextMenu.doc.mjs +5 -1
- package/src/ContextMenu/ContextMenu.tsx +44 -5
- package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
- package/src/DateInput/MonthScroller.tsx +1 -0
- package/src/DateInput/PickerWheel.tsx +1 -0
- package/src/DateInput/TouchDateField.tsx +2 -0
- package/src/DateInput/Wheel.tsx +1 -0
- package/src/DateInput/usePointerDragScroll.ts +6 -2
- package/src/DateRangeInput/DateRangeInput.tsx +16 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- package/src/Dialog/Dialog.doc.mjs +11 -1
- package/src/Dialog/Dialog.tsx +116 -19
- package/src/Dialog/DialogContext.ts +5 -4
- package/src/Dialog/DialogHeader.tsx +50 -12
- package/src/Drawer/DrawerHeader.tsx +31 -6
- package/src/DropdownMenu/DropdownMenu.doc.mjs +20 -1
- package/src/DropdownMenu/DropdownMenu.tsx +29 -22
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +3 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +23 -1
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
- package/src/DropdownMenu/menuRowCorners.stylex.ts +40 -0
- package/src/EmptyState/EmptyState.tsx +2 -0
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +9 -2
- package/src/Field/inputDisabledFocus.ts +18 -0
- package/src/Field/inputStyles.stylex.ts +52 -1
- package/src/Grid/Grid.doc.mjs +6 -3
- package/src/Grid/Grid.tsx +5 -2
- package/src/Heading/Heading.tsx +24 -1
- package/src/Icon/Icon.doc.mjs +1 -1
- package/src/Icon/Icon.tsx +40 -2
- package/src/Indicator/CheckboxIndicator.tsx +11 -6
- package/src/Indicator/Indicator.doc.mjs +1 -1
- package/src/Indicator/RadioIndicator.tsx +31 -4
- package/src/Indicator/indicatorRegistry.ts +7 -23
- package/src/Indicator/themeIndicators.ts +29 -0
- package/src/Indicator/types.ts +14 -0
- package/src/Indicator/useThemeIndicator.ts +24 -0
- package/src/Item/Item.doc.mjs +3 -3
- package/src/Item/Item.tsx +48 -7
- package/src/Kbd/Kbd.doc.mjs +6 -2
- package/src/Kbd/Kbd.tsx +16 -1
- package/src/Layer/layerExitCopy.ts +0 -1
- package/src/Layer/layerSlideRules.ts +62 -74
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.tsx +293 -137
- package/src/Layer/useLayerKeyboardClearance.ts +9 -12
- package/src/Layout/Layout.doc.mjs +3 -3
- package/src/Layout/LayoutContainerContext.ts +27 -0
- package/src/Layout/LayoutContainerScope.tsx +32 -0
- package/src/Layout/LayoutContent.tsx +5 -2
- package/src/Layout/LayoutFooter.tsx +3 -1
- package/src/Layout/LayoutHeader.tsx +3 -1
- package/src/Layout/containerCorners.stylex.ts +44 -7
- package/src/Lightbox/Lightbox.tsx +460 -8
- package/src/Link/Link.doc.mjs +18 -0
- package/src/Link/Link.tsx +3 -1
- package/src/List/List.tsx +14 -2
- package/src/List/ListContext.tsx +60 -1
- package/src/List/ListItem.doc.mjs +11 -9
- package/src/List/ListItem.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +1 -1
- package/src/Markdown/Markdown.tsx +189 -190
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +14 -4
- package/src/Markdown/plugins/protocol.ts +3 -3
- package/src/MetadataList/MetadataListItem.tsx +18 -3
- package/src/MobileNav/MobileNav.doc.mjs +134 -52
- package/src/MobileNav/MobileNav.tsx +13 -9
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +51 -8
- package/src/NavMenu/NavHeadingMenu.tsx +5 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
- package/src/NavMenu/NavMenu.doc.mjs +105 -2
- package/src/NavMenu/NavMenuContext.tsx +13 -0
- package/src/NumberInput/NumberInput.doc.mjs +12 -10
- package/src/NumberInput/NumberInput.tsx +19 -11
- package/src/Outline/Outline.doc.mjs +26 -8
- package/src/Outline/Outline.tsx +35 -5
- package/src/Outline/useScrollSpy.ts +8 -3
- package/src/OverflowList/OverflowList.doc.mjs +15 -0
- package/src/OverflowList/OverflowList.tsx +62 -26
- package/src/Pagination/Pagination.doc.mjs +12 -0
- package/src/Pagination/Pagination.tsx +40 -6
- package/src/Popover/Popover.doc.mjs +10 -0
- package/src/Popover/Popover.tsx +8 -4
- package/src/Popover/popoverAnchor.ts +47 -0
- package/src/Popover/usePopover.doc.mjs +16 -2
- package/src/Popover/usePopover.tsx +152 -16
- package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
- package/src/PowerSearch/PowerSearch.tsx +65 -12
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +12 -0
- package/src/PowerSearch/PowerSearchToken.tsx +12 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +14 -19
- package/src/ProgressBar/ProgressBar.doc.mjs +2 -2
- package/src/ProgressBar/ProgressBar.tsx +44 -30
- package/src/RadioList/RadioList.tsx +63 -0
- package/src/RadioList/RadioListItem.tsx +4 -1
- package/src/Resizable/ResizeHandle.tsx +2 -3
- package/src/Resizable/resizableModel.ts +105 -3
- package/src/Resizable/resizeGesture.ts +14 -0
- package/src/Resizable/useResizable.ts +14 -75
- package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +76 -12
- package/src/Selector/Selector.doc.mjs +34 -7
- package/src/Selector/Selector.tsx +55 -25
- package/src/Selector/SelectorOption.doc.mjs +5 -5
- package/src/Selector/hooks.ts +92 -17
- package/src/Selector/useSelectorPresentation.ts +18 -3
- package/src/SideNav/SideNavHeading.tsx +15 -4
- package/src/SideNav/SideNavItem.doc.mjs +10 -10
- package/src/Slider/Slider.tsx +4 -1
- package/src/Spinner/Spinner.tsx +56 -41
- package/src/Stepper/Step.tsx +18 -3
- package/src/Stepper/Stepper.doc.mjs +14 -2
- package/src/Swipe/useSwipeAction.ts +3 -3
- package/src/Switch/Switch.doc.mjs +61 -5
- package/src/Switch/Switch.tsx +72 -35
- package/src/Switch/useSwitchTouch.ts +68 -3
- package/src/TabList/Tab.tsx +6 -0
- package/src/Table/BaseTable.tsx +73 -35
- package/src/Table/Table.doc.mjs +109 -5
- package/src/Table/Table.tsx +42 -17
- package/src/Table/TableBody.tsx +10 -1
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +52 -7
- package/src/Table/TableRow.tsx +8 -1
- package/src/Table/TableRowPlacementContext.ts +58 -0
- package/src/Table/TableSelectionToolbar.tsx +12 -0
- package/src/Table/columnUtils.ts +9 -1
- package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
- package/src/Table/plugins/sortable/useTableSortable.tsx +15 -2
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +5 -5
- package/src/Table/plugins/sortable/useTableSortableState.tsx +15 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +90 -14
- package/src/Table/table.stylex.ts +44 -5
- package/src/Table/types.ts +3 -1
- package/src/Table/useTableColumnResize.doc.mjs +3 -3
- package/src/Table/useTableColumnSettings.doc.mjs +3 -3
- package/src/Table/useTableFilterState.doc.mjs +6 -3
- package/src/Table/useTableFiltering.doc.mjs +71 -4
- package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
- package/src/Table/useTablePagination.doc.mjs +24 -3
- package/src/Table/useTableSelection.doc.mjs +30 -6
- package/src/Table/useTableSelectionState.doc.mjs +30 -2
- package/src/Table/useTableSortable.doc.mjs +104 -17
- package/src/Table/useTableStickyColumns.doc.mjs +3 -3
- package/src/Table/useTableTreeData.doc.mjs +2 -2
- package/src/Text/Heading.doc.mjs +2 -2
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/TruncationTooltip.tsx +168 -1
- package/src/Text/useTruncation.ts +20 -4
- package/src/TextArea/TextArea.doc.mjs +5 -5
- package/src/TextArea/TextArea.tsx +20 -1
- package/src/TextInput/TextInput.doc.mjs +5 -5
- package/src/TextInput/TextInput.tsx +23 -18
- package/src/Thumbnail/Thumbnail.tsx +2 -1
- package/src/Timer/Timer.tsx +21 -6
- package/src/Timestamp/Timestamp.tsx +67 -4
- package/src/Toast/Toast.doc.mjs +15 -5
- package/src/Toast/Toast.tsx +83 -62
- package/src/Toast/ToastViewport.tsx +62 -23
- package/src/Toast/types.ts +8 -0
- package/src/Toast/useToast.doc.mjs +80 -15
- package/src/Toast/useToast.tsx +18 -7
- package/src/ToggleButton/ToggleButton.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.tsx +25 -2
- package/src/Token/Token.tsx +5 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -3
- package/src/Tokenizer/Tokenizer.tsx +130 -75
- package/src/Toolbar/Toolbar.tsx +55 -4
- package/src/Tooltip/Tooltip.tsx +34 -0
- package/src/Tooltip/useTooltip.tsx +26 -0
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.tsx +13 -3
- package/src/TopNav/TopNavContext.ts +31 -1
- package/src/TopNav/TopNavHeading.tsx +22 -9
- package/src/TopNav/TopNavMegaMenu.tsx +27 -18
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +14 -2
- package/src/TopNav/TopNavMegaMenuItem.doc.mjs +26 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +26 -2
- package/src/TopNav/TopNavMenu.doc.mjs +19 -8
- package/src/TopNav/TopNavMenu.tsx +34 -2
- package/src/TopNav/TopNavRenderContext.ts +30 -9
- package/src/TreeList/TreeList.tsx +12 -0
- package/src/TreeList/TreeListItem.tsx +26 -5
- package/src/Typeahead/BaseTypeahead.doc.mjs +6 -0
- package/src/Typeahead/BaseTypeahead.tsx +2 -0
- package/src/Typeahead/Typeahead.doc.mjs +15 -2
- package/src/Typeahead/Typeahead.tsx +37 -13
- package/src/Typeahead/TypeaheadItem.tsx +12 -0
- package/src/gestures/GestureHost.ts +34 -0
- package/src/gestures/README.md +9 -6
- package/src/hooks/anchoredHint.tsx +1 -2
- package/src/hooks/computeOverflow.ts +10 -0
- package/src/hooks/focusableSelector.ts +59 -2
- package/src/hooks/scrollEdgeFade.ts +129 -0
- package/src/hooks/statusButtonPress.ts +26 -0
- package/src/hooks/useAnnounce.ts +2 -1
- package/src/hooks/useFocusTrap.ts +110 -141
- package/src/hooks/useGroupPressTracking.ts +1 -1
- package/src/hooks/useOverflow.ts +227 -13
- package/src/hooks/useResolvedRequired.ts +50 -1
- package/src/hooks/useTreeFocus.ts +8 -4
- package/src/hooks/useTypeahead.ts +12 -10
- package/src/i18n/InternationalizationContext.ts +16 -7
- package/src/i18n/InternationalizationProvider.doc.mjs +1 -1
- package/src/i18n/InternationalizationProvider.tsx +12 -0
- package/src/i18n/defaultTranslator.ts +25 -0
- package/src/i18n/firstStrongDirection.ts +54 -13
- package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +1 -2
- package/src/i18n/generated-english/Chat/pastedTextLabel.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +1 -0
- package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +2 -1
- package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +2 -1
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +2 -1
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
- package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +1 -0
- package/src/i18n/generated-locales/en.generated.ts +11 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +11 -0
- package/src/i18n/publicContext.ts +4 -2
- package/src/i18n/translatingContext.ts +28 -0
- package/src/i18n/useComponentTranslator.ts +3 -2
- package/src/i18n/useListFormatter.ts +3 -2
- package/src/i18n/useTranslator.ts +3 -2
- package/src/internal/touch.ts +7 -0
- package/src/keyboard/README.md +58 -16
- package/src/keyboard/keyboardHeight.ts +138 -26
- package/src/keyboard/keyboardTarget.ts +667 -71
- package/src/keyboard/useMobileKeyboard.ts +1 -7
- package/src/palette/color.ts +205 -0
- package/src/palette/generator.ts +1134 -0
- package/src/palette/index.ts +35 -0
- package/src/palette/mapping.ts +1630 -0
- package/src/palette/themePalette.ts +175 -0
- package/src/palette/types.ts +194 -0
- package/src/privateAttributes/mediaDarkPage.ts +27 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
- package/src/privateAttributes/scheme.ts +37 -0
- package/src/privateAttributes/travelling.stylex.ts +6 -4
- package/src/reset.css +1 -1
- package/src/theme/MediaDarkPage.tsx +41 -0
- package/src/theme/MediaTheme.tsx +8 -1
- package/src/theme/Theme.doc.mjs +4 -4
- package/src/theme/Theme.tsx +140 -35
- package/src/theme/defineTheme.ts +103 -40
- package/src/theme/derivedVarRegistry.ts +61 -4
- package/src/theme/expandRadiusScale.ts +1 -5
- package/src/theme/generateThemeRules.ts +398 -342
- package/src/theme/index.ts +2 -4
- package/src/theme/invertedSurfaceSide.ts +65 -0
- package/src/theme/resolveThemeValues.ts +8 -2
- package/src/theme/statusRoleDefaults.ts +330 -0
- package/src/theme/statusRoleDerivation.ts +2 -1
- package/src/theme/syntax/SyntaxTheme.tsx +12 -0
- package/src/theme/themeAdaptations.ts +53 -5
- package/src/theme/tokenDefaults.ts +44 -0
- package/src/theme/tokenValues.ts +193 -0
- package/src/theme/tokens.stylex.ts +7 -5
- package/src/theme/tokens.ts +14 -176
- package/src/theme/useTheme.ts +164 -35
- package/src/utils/devWarning.ts +24 -0
- package/src/utils/focusOutline.stylex.ts +7 -4
- package/src/utils/focusReturn.ts +578 -16
- package/src/utils/hitArea.ts +70 -33
- package/src/utils/inputStream.ts +81 -5
- package/src/utils/nodeType.ts +10 -0
- package/src/utils/timeFormat.ts +54 -4
- package/src/utils/touchPresentation.stylex.ts +7 -6
- package/src/utils/touchPresentation.ts +10 -7
- package/src/utils/touchQueries.ts +3 -2
- package/src/utils/typeaheadMatch.ts +20 -1
- package/src/virtualization/useInlineListWindow.ts +57 -33
|
@@ -51,6 +51,7 @@ const styles = stylex.create({
|
|
|
51
51
|
index: {
|
|
52
52
|
fontFamily: 'var(--font-family-code)',
|
|
53
53
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
54
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
54
55
|
fontVariantNumeric: 'tabular-nums',
|
|
55
56
|
color: colorVars['--color-text-secondary'],
|
|
56
57
|
},
|
|
@@ -140,11 +140,23 @@ const sortStyles = stylex.create({
|
|
|
140
140
|
},
|
|
141
141
|
font: 'inherit',
|
|
142
142
|
color: 'inherit',
|
|
143
|
-
|
|
143
|
+
// At least the cell's content width, so the whole cell is the target. A
|
|
144
|
+
// longer label may grow into the header cell's end padding before it
|
|
145
|
+
// wraps or truncates.
|
|
146
|
+
width: 'max-content',
|
|
147
|
+
minWidth: '100%',
|
|
148
|
+
maxWidth: 'calc(100% + var(--_table-header-end-room, 0px))',
|
|
144
149
|
height: '100%',
|
|
145
150
|
textAlign: 'inherit',
|
|
146
151
|
borderRadius: radiusVars['--radius-inner'],
|
|
147
152
|
},
|
|
153
|
+
// The label wraps or truncates before the sort indicator, so the indicator
|
|
154
|
+
// stays visible in a narrow column.
|
|
155
|
+
label: {
|
|
156
|
+
minWidth: 0,
|
|
157
|
+
overflow: 'hidden',
|
|
158
|
+
textOverflow: 'ellipsis',
|
|
159
|
+
},
|
|
148
160
|
// The button is a full-width flex container, so the `textAlign` a column's
|
|
149
161
|
// `align` puts on the <th> cannot position its contents. Mirror the column
|
|
150
162
|
// alignment onto the main axis, or an `align: 'end'` numeric column ends up
|
|
@@ -163,6 +175,7 @@ const sortStyles = stylex.create({
|
|
|
163
175
|
display: {default: 'inline-flex', ':empty': 'none'},
|
|
164
176
|
alignItems: 'center',
|
|
165
177
|
blockSize: 0,
|
|
178
|
+
flexShrink: 0,
|
|
166
179
|
},
|
|
167
180
|
iconWrapperUnsorted: {
|
|
168
181
|
opacity: {
|
|
@@ -303,7 +316,7 @@ function SortHeaderButton<T extends Record<string, unknown>>({
|
|
|
303
316
|
)}
|
|
304
317
|
aria-describedby={rank != null ? priorityId : undefined}
|
|
305
318
|
onClick={handleClick}>
|
|
306
|
-
<span>{children}</span>
|
|
319
|
+
<span {...stylex.props(sortStyles.label)}>{children}</span>
|
|
307
320
|
<span
|
|
308
321
|
{...stylex.props(
|
|
309
322
|
sortStyles.iconWrapper,
|
|
@@ -55,7 +55,7 @@ export const docs = {
|
|
|
55
55
|
name: 'config.comparators',
|
|
56
56
|
type: 'Partial<Record<TSortKey, (a: T, b: T) => number>>',
|
|
57
57
|
description:
|
|
58
|
-
'Ascending comparators per sort key; the hook flips the result for descending. Keys without one compare numbers numerically, compare other values as strings with a numeric collator in the active InternationalizationProvider locale, and put null, undefined and
|
|
58
|
+
'Ascending comparators per sort key (arrays such as tags need one: they have no sort text); the hook flips the result for descending. Keys without one compare numbers numerically, compare other values as strings with a numeric collator in the active InternationalizationProvider locale, and put null, undefined, NaN and an Invalid Date last in ascending order and first in descending. Arrays and plain objects have no sort text: they compare as equal to each other and sort before text in ascending order, so give a key such as tags a comparator. A Date sorts by its time.',
|
|
59
59
|
required: false,
|
|
60
60
|
},
|
|
61
61
|
{
|
|
@@ -91,7 +91,7 @@ export const docs = {
|
|
|
91
91
|
name: 'sortConfig',
|
|
92
92
|
type: 'UseTableSortableConfig<TSortKey>',
|
|
93
93
|
description:
|
|
94
|
-
'Pass to useTableSortable(sortConfig) and give the resulting plugin to Table.',
|
|
94
|
+
'Pass to useTableSortable<Row, TSortKey>(sortConfig), with the same type arguments as this hook (TypeScript cannot infer the row type there), and give the resulting plugin to Table.',
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
name: 'applySort',
|
|
@@ -112,7 +112,7 @@ export const docs = {
|
|
|
112
112
|
{
|
|
113
113
|
guidance: true,
|
|
114
114
|
description:
|
|
115
|
-
'Add a comparator for values whose order is not their string or number value, such as a status rank.',
|
|
115
|
+
'Add a comparator for values whose order is not their string or number value, such as a status rank, and for arrays such as tags, which otherwise have no sort text.',
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
guidance: false,
|
|
@@ -139,7 +139,7 @@ export const docsDense = {
|
|
|
139
139
|
'config.sort': 'controlled sort state; pair with onSortChange.',
|
|
140
140
|
'config.onSortChange': 'called with next sort state; required with sort.',
|
|
141
141
|
'config.comparators':
|
|
142
|
-
'ascending comparators per key (flipped for descending). Else numbers numeric, others numeric-collator strings in provider locale; null/undefined/NaN last ascending, first descending.',
|
|
142
|
+
'ascending comparators per key (arrays e.g. tags need one: no sort text; flipped for descending). Else numbers numeric, others numeric-collator strings in provider locale; null/undefined/NaN/Invalid Date last ascending, first descending; arrays/plain objects have no sort text (equal to each other, before text ascending): give them a comparator; Date sorts by time.',
|
|
143
143
|
'config.allowUnsortedState':
|
|
144
144
|
'to useTableSortable: third click returns to unsorted.',
|
|
145
145
|
'config.isMultiSortEnabled':
|
|
@@ -162,7 +162,7 @@ export const docsDense = {
|
|
|
162
162
|
{
|
|
163
163
|
guidance: true,
|
|
164
164
|
description:
|
|
165
|
-
'Add comparators for non-natural orders (e.g. status rank).',
|
|
165
|
+
'Add comparators for non-natural orders (e.g. status rank) and arrays (e.g. tags), which otherwise have no sort text.',
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
guidance: false,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useTableSortableState.tsx
|
|
7
|
-
* @input React, TableSortState types
|
|
7
|
+
* @input React, TableSortState types, isInvalidDate from columnUtils
|
|
8
8
|
* @output Exports useTableSortableState hook and config types
|
|
9
9
|
* @position Sort state helper; manages sort state + applies local sort to data.
|
|
10
10
|
* Pairs with useTableSortable (the headless sort plugin).
|
|
@@ -21,6 +21,7 @@ import {useState, useMemo, useCallback, useRef} from 'react';
|
|
|
21
21
|
import type {TableSortState, UseTableSortableConfig} from './useTableSortable';
|
|
22
22
|
import {useCollator} from '../../../i18n/useCollator';
|
|
23
23
|
import {useCommittedRef} from '../../../hooks/useCommittedRef';
|
|
24
|
+
import {isInvalidDate} from '../../columnUtils';
|
|
24
25
|
|
|
25
26
|
// =============================================================================
|
|
26
27
|
// Comparator Types
|
|
@@ -34,6 +35,14 @@ import {useCommittedRef} from '../../../hooks/useCommittedRef';
|
|
|
34
35
|
*/
|
|
35
36
|
export type TableSortComparator<T> = (a: T, b: T) => number;
|
|
36
37
|
|
|
38
|
+
function isMissingSortValue(value: unknown): boolean {
|
|
39
|
+
return (
|
|
40
|
+
value == null ||
|
|
41
|
+
(typeof value === 'number' && Number.isNaN(value)) ||
|
|
42
|
+
isInvalidDate(value)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
function toSortableString(value: unknown): string {
|
|
38
47
|
if (value instanceof Date) {
|
|
39
48
|
return value.toISOString();
|
|
@@ -170,13 +179,11 @@ function defaultCompare<T extends Record<string, unknown>>(
|
|
|
170
179
|
const aVal = a[sortKey];
|
|
171
180
|
const bVal = b[sortKey];
|
|
172
181
|
|
|
173
|
-
//
|
|
174
|
-
//
|
|
175
|
-
//
|
|
176
|
-
const aMissing =
|
|
177
|
-
|
|
178
|
-
const bMissing =
|
|
179
|
-
bVal == null || (typeof bVal === 'number' && Number.isNaN(bVal));
|
|
182
|
+
// Missing values never reach the comparisons below. Array.sort reads a NaN
|
|
183
|
+
// result as equal, which breaks the order of the other rows. toISOString
|
|
184
|
+
// throws for an Invalid Date.
|
|
185
|
+
const aMissing = isMissingSortValue(aVal);
|
|
186
|
+
const bMissing = isMissingSortValue(bVal);
|
|
180
187
|
if (aMissing && bMissing) {
|
|
181
188
|
return 0;
|
|
182
189
|
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
} from 'react';
|
|
25
25
|
import * as stylex from '@stylexjs/stylex';
|
|
26
26
|
import {registerCountIndependentPlugin} from '../../tableRowContextUsage';
|
|
27
|
+
import {scrollEdgeFadeOff} from '../../../hooks/scrollEdgeFade';
|
|
27
28
|
|
|
28
29
|
import {colorVars, durationVars, easeVars} from '../../../theme/tokens.stylex';
|
|
29
30
|
import type {
|
|
@@ -790,6 +791,13 @@ export function useTableStickyColumns<T extends Record<string, unknown>>(
|
|
|
790
791
|
return {
|
|
791
792
|
...props,
|
|
792
793
|
htmlProps: {...props.htmlProps, ref: mergedRef},
|
|
794
|
+
// A pinned edge marks its hidden columns with its own shadow, and
|
|
795
|
+
// the pinned column sits at that edge, so the edge does not fade.
|
|
796
|
+
xstyle: [
|
|
797
|
+
...props.xstyle,
|
|
798
|
+
...(stateRef.current.hasStart ? [scrollEdgeFadeOff.start] : []),
|
|
799
|
+
...(stateRef.current.hasEnd ? [scrollEdgeFadeOff.end] : []),
|
|
800
|
+
],
|
|
793
801
|
};
|
|
794
802
|
},
|
|
795
803
|
}),
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Expansion state flows through an external store (TreeStore) so each
|
|
21
21
|
* row's expander subscribes independently — a toggle re-renders only the
|
|
22
|
-
* affected cells, not the whole body. A ref callback on each <tr>
|
|
23
|
-
*
|
|
22
|
+
* affected cells, not the whole body. A ref callback on each <tr> records
|
|
23
|
+
* its depth and links the expander to its child rows (disclosure pattern),
|
|
24
|
+
* as selection's row styling does. Each subscription ends when
|
|
24
25
|
* its row disconnects.
|
|
25
26
|
*
|
|
26
27
|
* When `hasExpandableRows` is false (flat data), every transform is a
|
|
@@ -32,6 +33,7 @@ import {
|
|
|
32
33
|
use,
|
|
33
34
|
useCallback,
|
|
34
35
|
useEffect,
|
|
36
|
+
useId,
|
|
35
37
|
useMemo,
|
|
36
38
|
useRef,
|
|
37
39
|
useSyncExternalStore,
|
|
@@ -66,6 +68,7 @@ import {createSharedContext} from '../../../utils/sharedContext';
|
|
|
66
68
|
|
|
67
69
|
registerEnglishFallback(english);
|
|
68
70
|
import {TableContext} from '../../TableContext';
|
|
71
|
+
import {defaultCellRenderer} from '../../columnUtils';
|
|
69
72
|
import {registerCountIndependentPlugin} from '../../tableRowContextUsage';
|
|
70
73
|
|
|
71
74
|
// =============================================================================
|
|
@@ -155,6 +158,10 @@ interface TreeStore<T extends Record<string, unknown>> {
|
|
|
155
158
|
subscribe: (listener: () => void) => () => void;
|
|
156
159
|
notify: () => void;
|
|
157
160
|
getConfig: () => UseTableTreeDataConfig<T>;
|
|
161
|
+
/** The depth of each rendered row, so an expander can find its children. */
|
|
162
|
+
rowLevels: WeakMap<Element, number>;
|
|
163
|
+
/** Each rendered expander button, by row id. */
|
|
164
|
+
expanders: Map<string, HTMLButtonElement>;
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
function createTreeStore<T extends Record<string, unknown>>(
|
|
@@ -175,6 +182,8 @@ function createTreeStore<T extends Record<string, unknown>>(
|
|
|
175
182
|
getConfig() {
|
|
176
183
|
return configRef.current;
|
|
177
184
|
},
|
|
185
|
+
rowLevels: new WeakMap(),
|
|
186
|
+
expanders: new Map(),
|
|
178
187
|
};
|
|
179
188
|
}
|
|
180
189
|
|
|
@@ -232,18 +241,71 @@ function useRowSnapshot<T extends Record<string, unknown>>(
|
|
|
232
241
|
// Row ARIA (imperative, mirrors selection's row styling)
|
|
233
242
|
// =============================================================================
|
|
234
243
|
|
|
235
|
-
//
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
|
|
244
|
+
// Tree tables follow the disclosure pattern, not a treegrid: Table has no
|
|
245
|
+
// grid keyboard model (arrow keys between cells and rows), so claiming
|
|
246
|
+
// treegrid would promise navigation that isn't there. Rows therefore carry
|
|
247
|
+
// no aria-level or aria-expanded. Each parent row's expander button carries
|
|
248
|
+
// aria-expanded and, while expanded, aria-controls naming its child rows.
|
|
249
|
+
// Indentation stays visual.
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* A DOM id for a row, from the table's id prefix and the row's own id. Every
|
|
253
|
+
* character outside [A-Za-z0-9-], `_` included, becomes `_<hex code>_`, so
|
|
254
|
+
* distinct row ids always give distinct DOM ids.
|
|
255
|
+
*/
|
|
256
|
+
function rowDomId(prefix: string, id: string): string {
|
|
257
|
+
const encoded = id.replace(
|
|
258
|
+
/[^A-Za-z0-9-]/gu,
|
|
259
|
+
ch => `_${ch.codePointAt(0)?.toString(16)}_`,
|
|
260
|
+
);
|
|
261
|
+
return `${prefix}-${encoded}`;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function applyRowTreeAria<T extends Record<string, unknown>>(
|
|
239
265
|
el: HTMLTableRowElement,
|
|
240
266
|
meta: TableTreeRowMeta | undefined,
|
|
267
|
+
idPrefix: string,
|
|
268
|
+
store: TreeStore<T>,
|
|
241
269
|
): void {
|
|
270
|
+
// Rows rendered by an earlier version may still carry aria-level.
|
|
271
|
+
el.removeAttribute('aria-level');
|
|
272
|
+
const ownsId = el.id === '' || el.id.startsWith(`${idPrefix}-`);
|
|
242
273
|
if (!meta) {
|
|
243
|
-
|
|
274
|
+
store.rowLevels.delete(el);
|
|
275
|
+
if (ownsId) {
|
|
276
|
+
el.removeAttribute('id');
|
|
277
|
+
}
|
|
244
278
|
return;
|
|
245
279
|
}
|
|
246
|
-
|
|
280
|
+
store.rowLevels.set(el, meta.level);
|
|
281
|
+
if (ownsId) {
|
|
282
|
+
el.id = rowDomId(idPrefix, meta.id);
|
|
283
|
+
}
|
|
284
|
+
const expander = store.expanders.get(meta.id);
|
|
285
|
+
if (expander == null || !el.contains(expander)) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const childIds: string[] = [];
|
|
289
|
+
if (meta.hasChildren && meta.isExpanded) {
|
|
290
|
+
for (
|
|
291
|
+
let row = el.nextElementSibling;
|
|
292
|
+
row != null;
|
|
293
|
+
row = row.nextElementSibling
|
|
294
|
+
) {
|
|
295
|
+
const level = store.rowLevels.get(row);
|
|
296
|
+
if (level == null || level <= meta.level) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
if (level === meta.level + 1 && row.id !== '') {
|
|
300
|
+
childIds.push(row.id);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (childIds.length > 0) {
|
|
305
|
+
expander.setAttribute('aria-controls', childIds.join(' '));
|
|
306
|
+
} else {
|
|
307
|
+
expander.removeAttribute('aria-controls');
|
|
308
|
+
}
|
|
247
309
|
}
|
|
248
310
|
|
|
249
311
|
// =============================================================================
|
|
@@ -356,10 +418,12 @@ function TreeExpander({
|
|
|
356
418
|
isExpanded,
|
|
357
419
|
onToggle,
|
|
358
420
|
rowLabel,
|
|
421
|
+
buttonRef,
|
|
359
422
|
}: {
|
|
360
423
|
isExpanded: boolean;
|
|
361
424
|
onToggle: () => void;
|
|
362
425
|
rowLabel?: string;
|
|
426
|
+
buttonRef: React.RefCallback<HTMLButtonElement>;
|
|
363
427
|
}) {
|
|
364
428
|
const t = useComponentTranslator();
|
|
365
429
|
const isCompact = use(TableContext)?.density === 'compact';
|
|
@@ -384,7 +448,8 @@ function TreeExpander({
|
|
|
384
448
|
onToggle();
|
|
385
449
|
}}
|
|
386
450
|
aria-label={ariaLabel}
|
|
387
|
-
aria-expanded={isExpanded}
|
|
451
|
+
aria-expanded={isExpanded}
|
|
452
|
+
ref={buttonRef}>
|
|
388
453
|
<Icon
|
|
389
454
|
icon="chevronRight"
|
|
390
455
|
size="xsm"
|
|
@@ -510,6 +575,17 @@ function TreeCellContentInner<T extends Record<string, unknown>>({
|
|
|
510
575
|
isExpanded={meta.isExpanded}
|
|
511
576
|
onToggle={() => store.getConfig().onToggleItem(item)}
|
|
512
577
|
rowLabel={config.getRowLabel?.(item)}
|
|
578
|
+
buttonRef={button => {
|
|
579
|
+
if (!button) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
store.expanders.set(meta.id, button);
|
|
583
|
+
return () => {
|
|
584
|
+
if (store.expanders.get(meta.id) === button) {
|
|
585
|
+
store.expanders.delete(meta.id);
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
}}
|
|
513
589
|
/>
|
|
514
590
|
) : (
|
|
515
591
|
<span {...stylex.props(treeStyles.leafSpacer)} />
|
|
@@ -534,6 +610,7 @@ export function useTableTreeData<T extends Record<string, unknown>>(
|
|
|
534
610
|
storeRef.current = createTreeStore(configRef);
|
|
535
611
|
}
|
|
536
612
|
const store = storeRef.current;
|
|
613
|
+
const rowIdPrefix = useId();
|
|
537
614
|
|
|
538
615
|
// Notify subscribers on every render — useSyncExternalStore only
|
|
539
616
|
// re-renders cells whose snapshot actually changed. Row ref subscribers
|
|
@@ -631,10 +708,7 @@ export function useTableTreeData<T extends Record<string, unknown>>(
|
|
|
631
708
|
<TreeCellContent item={item}>
|
|
632
709
|
{originalRenderCell
|
|
633
710
|
? originalRenderCell(item)
|
|
634
|
-
:
|
|
635
|
-
(item[col.key] as
|
|
636
|
-
string | number | null | undefined) ?? '',
|
|
637
|
-
)}
|
|
711
|
+
: defaultCellRenderer(item, col.key)}
|
|
638
712
|
</TreeCellContent>
|
|
639
713
|
),
|
|
640
714
|
};
|
|
@@ -706,6 +780,8 @@ export function useTableTreeData<T extends Record<string, unknown>>(
|
|
|
706
780
|
applyRowTreeAria(
|
|
707
781
|
el,
|
|
708
782
|
cfg.hasExpandableRows ? cfg.getRowMeta(item) : undefined,
|
|
783
|
+
rowIdPrefix,
|
|
784
|
+
store,
|
|
709
785
|
);
|
|
710
786
|
};
|
|
711
787
|
apply();
|
|
@@ -775,6 +851,6 @@ export function useTableTreeData<T extends Record<string, unknown>>(
|
|
|
775
851
|
};
|
|
776
852
|
},
|
|
777
853
|
};
|
|
778
|
-
}, [store]);
|
|
854
|
+
}, [store, rowIdPrefix]);
|
|
779
855
|
return registerCountIndependentPlugin(plugin);
|
|
780
856
|
}
|
|
@@ -51,9 +51,31 @@ export const overflowStyles = stylex.create({
|
|
|
51
51
|
export const wrapStyles = stylex.create({
|
|
52
52
|
cell: {
|
|
53
53
|
overflow: 'hidden',
|
|
54
|
+
// Break a word only when it cannot fit its column. A zero max-width or a
|
|
55
|
+
// break at any letter lets automatic layout shrink a column below its
|
|
56
|
+
// longest word. The table sets the word-break for its layout.
|
|
54
57
|
overflowWrap: 'break-word',
|
|
55
|
-
wordBreak: '
|
|
56
|
-
|
|
58
|
+
wordBreak: 'var(--_table-cell-word-break, normal)',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Header cells when the table's cells wrap.
|
|
64
|
+
*
|
|
65
|
+
* The table sets the white-space for its layout. In fixed layout the columns
|
|
66
|
+
* come from the column definitions, so a heading wraps like the body cells.
|
|
67
|
+
* In automatic layout a heading stays on one line and its column grows to fit
|
|
68
|
+
* it. There is no zero max-width: in automatic layout it would hold every
|
|
69
|
+
* column at zero width. Under `textOverflow="truncate"`, header cells use
|
|
70
|
+
* `overflowStyles` like the body cells.
|
|
71
|
+
*/
|
|
72
|
+
export const headerOverflowStyles = stylex.create({
|
|
73
|
+
cell: {
|
|
74
|
+
overflow: 'hidden',
|
|
75
|
+
textOverflow: 'ellipsis',
|
|
76
|
+
whiteSpace: 'var(--_table-header-white-space, normal)',
|
|
77
|
+
overflowWrap: 'break-word',
|
|
78
|
+
wordBreak: 'var(--_table-cell-word-break, normal)',
|
|
57
79
|
},
|
|
58
80
|
});
|
|
59
81
|
|
|
@@ -69,6 +91,11 @@ export const wrapStyles = stylex.create({
|
|
|
69
91
|
* Each density variant uses its own paddingInline as the fallback,
|
|
70
92
|
* so standalone tables (where --container-padding-inline-start/end are unset)
|
|
71
93
|
* keep their normal density-based cell padding unchanged.
|
|
94
|
+
*
|
|
95
|
+
* The last column's end inset is also exposed as `--_table-edge-inline-end`,
|
|
96
|
+
* so a header cell can give its content the same room it pads with. Every
|
|
97
|
+
* other cell resets it, so a Table nested in a last-column cell does not
|
|
98
|
+
* inherit the outer cell's inset.
|
|
72
99
|
*/
|
|
73
100
|
export const containerEdgeStyles = stylex.create({
|
|
74
101
|
compact: {
|
|
@@ -76,9 +103,13 @@ export const containerEdgeStyles = stylex.create({
|
|
|
76
103
|
default: null,
|
|
77
104
|
':first-child': `max(var(--container-padding-inline-start, ${spacingVars['--spacing-2']}), ${spacingVars['--spacing-2']})`,
|
|
78
105
|
},
|
|
106
|
+
'--_table-edge-inline-end': {
|
|
107
|
+
default: 'initial',
|
|
108
|
+
':last-child': `max(var(--container-padding-inline-end, ${spacingVars['--spacing-2']}), ${spacingVars['--spacing-2']})`,
|
|
109
|
+
},
|
|
79
110
|
paddingInlineEnd: {
|
|
80
111
|
default: null,
|
|
81
|
-
':last-child':
|
|
112
|
+
':last-child': 'var(--_table-edge-inline-end)',
|
|
82
113
|
},
|
|
83
114
|
},
|
|
84
115
|
balanced: {
|
|
@@ -86,9 +117,13 @@ export const containerEdgeStyles = stylex.create({
|
|
|
86
117
|
default: null,
|
|
87
118
|
':first-child': `max(var(--container-padding-inline-start, ${spacingVars['--spacing-3']}), ${spacingVars['--spacing-2']})`,
|
|
88
119
|
},
|
|
120
|
+
'--_table-edge-inline-end': {
|
|
121
|
+
default: 'initial',
|
|
122
|
+
':last-child': `max(var(--container-padding-inline-end, ${spacingVars['--spacing-3']}), ${spacingVars['--spacing-2']})`,
|
|
123
|
+
},
|
|
89
124
|
paddingInlineEnd: {
|
|
90
125
|
default: null,
|
|
91
|
-
':last-child':
|
|
126
|
+
':last-child': 'var(--_table-edge-inline-end)',
|
|
92
127
|
},
|
|
93
128
|
},
|
|
94
129
|
spacious: {
|
|
@@ -96,9 +131,13 @@ export const containerEdgeStyles = stylex.create({
|
|
|
96
131
|
default: null,
|
|
97
132
|
':first-child': `max(var(--container-padding-inline-start, ${spacingVars['--spacing-4']}), ${spacingVars['--spacing-2']})`,
|
|
98
133
|
},
|
|
134
|
+
'--_table-edge-inline-end': {
|
|
135
|
+
default: 'initial',
|
|
136
|
+
':last-child': `max(var(--container-padding-inline-end, ${spacingVars['--spacing-4']}), ${spacingVars['--spacing-2']})`,
|
|
137
|
+
},
|
|
99
138
|
paddingInlineEnd: {
|
|
100
139
|
default: null,
|
|
101
|
-
':last-child':
|
|
140
|
+
':last-child': 'var(--_table-edge-inline-end)',
|
|
102
141
|
},
|
|
103
142
|
},
|
|
104
143
|
});
|
package/src/Table/types.ts
CHANGED
|
@@ -710,7 +710,9 @@ export interface BaseTableProps<
|
|
|
710
710
|
afterTable?: ReactNode;
|
|
711
711
|
}>;
|
|
712
712
|
/**
|
|
713
|
-
* How default-rendered
|
|
713
|
+
* How default-rendered cell text behaves when it exceeds column width.
|
|
714
|
+
* Header cells follow the same mode: under `'wrap'` a long heading wraps in
|
|
715
|
+
* a data-driven table, and in children mode its column grows to fit it.
|
|
714
716
|
*
|
|
715
717
|
* - `'wrap'` (default) — text wraps and the row grows taller
|
|
716
718
|
* - `'truncate'` — text is clipped with an ellipsis; default-rendered cells
|
|
@@ -7,7 +7,7 @@ export const docs = {
|
|
|
7
7
|
subComponentOf: 'Table',
|
|
8
8
|
displayName: 'useTableColumnResize',
|
|
9
9
|
description:
|
|
10
|
-
'Hook that returns a TablePlugin adding draggable resize handles to column header borders. Supports pointer + keyboard (WAI-ARIA window splitter) resizing, RTL, per-column min/max widths, and proportional-column preservation (resizes the neighbor so the table stays full-width). Commits widths on release.',
|
|
10
|
+
'Hook that returns a TablePlugin adding draggable resize handles to column header borders. T is the row type; TypeScript cannot infer it from the config, so it defaults to Record<string, unknown>, which a Table with typed rows rejects: pass it, as in `useTableColumnResize<Walk>(…)` for `<Table<Walk>>`. Supports pointer + keyboard (WAI-ARIA window splitter) resizing, RTL, per-column min/max widths, and proportional-column preservation (resizes the neighbor so the table stays full-width). Commits widths on release.',
|
|
11
11
|
props: [
|
|
12
12
|
{
|
|
13
13
|
name: 'columnWidths',
|
|
@@ -46,7 +46,7 @@ export const docsZh = {
|
|
|
46
46
|
name: 'useTableColumnResize',
|
|
47
47
|
displayName: 'useTableColumnResize',
|
|
48
48
|
description:
|
|
49
|
-
'返回 TablePlugin 的 Hook
|
|
49
|
+
'返回 TablePlugin 的 Hook,为列表头边框添加可拖动的调整手柄。T 是行类型;TypeScript 无法从配置推断它,因此默认为 Record<string, unknown>,带类型行的 Table 不接受:请传入,例如 `useTableColumnResize<Walk>(…)` 对应 `<Table<Walk>>`。支持指针 + 键盘(WAI-ARIA 窗口分隔符)调整、RTL、每列最小/最大宽度,以及比例列保留(调整相邻列以保持表格全宽)。在释放时提交宽度。',
|
|
50
50
|
props: [
|
|
51
51
|
{
|
|
52
52
|
name: 'columnWidths',
|
|
@@ -83,7 +83,7 @@ export const docsDense = {
|
|
|
83
83
|
name: 'useTableColumnResize',
|
|
84
84
|
displayName: 'useTableColumnResize',
|
|
85
85
|
description:
|
|
86
|
-
'Hook returning TablePlugin w/ draggable column resize handles. Pointer + keyboard (WAI-ARIA splitter), RTL, per-column min/max, proportional-preserving (resizes neighbor). Commits on release.',
|
|
86
|
+
'Hook returning TablePlugin w/ draggable column resize handles. T = row type, not inferred from config (defaults to Record<string, unknown>, rejected by typed Table): pass it, e.g. `useTableColumnResize<Walk>(…)`. Pointer + keyboard (WAI-ARIA splitter), RTL, per-column min/max, proportional-preserving (resizes neighbor). Commits on release.',
|
|
87
87
|
propDescriptions: {
|
|
88
88
|
columnWidths: 'Controlled pixel-width overrides keyed by column key.',
|
|
89
89
|
onColumnResizeEnd:
|
|
@@ -6,7 +6,7 @@ export const docs = {
|
|
|
6
6
|
name: 'useTableColumnSettings',
|
|
7
7
|
subComponentOf: 'Table',
|
|
8
8
|
displayName: 'useTableColumnSettings',
|
|
9
|
-
description: 'Headless column visibility and ordering management for Table. Provides filtered columns, toggle helpers, and pre-built MultiSelector options for a column picker UI.',
|
|
9
|
+
description: 'Headless column visibility and ordering management for Table. T is the row type; TypeScript cannot infer it from the config, so it defaults to Record<string, unknown>, which a Table with typed rows rejects: pass it, as in `useTableColumnSettings<Walk>(…)` for `<Table<Walk>>`. When the column keys have a narrower type than string (a union, or keys that useTableColumnSettingsState infers from its columns), pass both: `useTableColumnSettings<Walk, WalkColumnKey>(…)`. Provides filtered columns, toggle helpers, and pre-built MultiSelector options for a column picker UI.',
|
|
10
10
|
props: [
|
|
11
11
|
{
|
|
12
12
|
name: 'columns',
|
|
@@ -37,7 +37,7 @@ export const docs = {
|
|
|
37
37
|
export const docsZh = {
|
|
38
38
|
name: 'useTableColumnSettings',
|
|
39
39
|
displayName: 'useTableColumnSettings',
|
|
40
|
-
description: '
|
|
40
|
+
description: '无头列可见性和排序管理。T 是行类型;TypeScript 无法从配置推断它,因此默认为 Record<string, unknown>,带类型行的 Table 不接受:请传入,例如 `useTableColumnSettings<Walk>(…)` 对应 `<Table<Walk>>`。列键的类型比 string 更窄时(联合类型,或 useTableColumnSettingsState 从 columns 推断出的键),请传入两个类型参数:`useTableColumnSettings<Walk, WalkColumnKey>(…)`。提供筛选后的列、切换帮助方法和 MultiSelector 选项。',
|
|
41
41
|
props: [
|
|
42
42
|
{
|
|
43
43
|
name: 'columns',
|
|
@@ -63,7 +63,7 @@ export const docsZh = {
|
|
|
63
63
|
export const docsDense = {
|
|
64
64
|
name: 'useTableColumnSettings',
|
|
65
65
|
displayName: 'useTableColumnSettings',
|
|
66
|
-
description: 'Headless column visibility/ordering. Provides filtered columns, toggle helpers, MultiSelector options.',
|
|
66
|
+
description: 'Headless column visibility/ordering. T = row type, not inferred from config (defaults to Record<string, unknown>, rejected by typed Table): pass it, e.g. `useTableColumnSettings<Walk>(…)`; narrower column-key type => pass both: `useTableColumnSettings<Walk, WalkColumnKey>(…)`. Provides filtered columns, toggle helpers, MultiSelector options.',
|
|
67
67
|
propDescriptions: {
|
|
68
68
|
columns: 'All available columns w/ metadata (key, label, isAlwaysVisible, group).',
|
|
69
69
|
activeColumnKeys: 'Active column keys in display order.',
|
|
@@ -7,7 +7,8 @@ export const docs = {
|
|
|
7
7
|
subComponentOf: 'Table',
|
|
8
8
|
displayName: 'useTableFilterState',
|
|
9
9
|
isHiddenFromOverview: true,
|
|
10
|
-
description:
|
|
10
|
+
description:
|
|
11
|
+
'Managed state hook for table filtering. Returns filters (the current filter map), onFilterChange, and clearAll (clears every filter, for example from a "Clear filters" button in the Table emptyState). Pass filters and onFilterChange to useTableFiltering.',
|
|
11
12
|
props: [
|
|
12
13
|
{
|
|
13
14
|
name: 'initialState',
|
|
@@ -21,7 +22,8 @@ export const docsZh = {
|
|
|
21
22
|
name: 'useTableFilterState',
|
|
22
23
|
isHiddenFromOverview: true,
|
|
23
24
|
displayName: 'useTableFilterState',
|
|
24
|
-
description:
|
|
25
|
+
description:
|
|
26
|
+
'表格筛选的受管状态 hook。返回 filters(当前筛选映射)、onFilterChange 和 clearAll(清除所有筛选,例如 Table emptyState 中的“清除筛选”按钮)。将 filters 和 onFilterChange 传给 useTableFiltering。',
|
|
25
27
|
props: [
|
|
26
28
|
{
|
|
27
29
|
name: 'initialState',
|
|
@@ -35,7 +37,8 @@ export const docsDense = {
|
|
|
35
37
|
name: 'useTableFilterState',
|
|
36
38
|
isHiddenFromOverview: true,
|
|
37
39
|
displayName: 'useTableFilterState',
|
|
38
|
-
description:
|
|
40
|
+
description:
|
|
41
|
+
'Managed filter state hook. Returns {filters, onFilterChange, clearAll}; pass filters + onFilterChange to useTableFiltering; clearAll resets every filter.',
|
|
39
42
|
propDescriptions: {
|
|
40
43
|
initialState: 'Optional initial filter state map.',
|
|
41
44
|
},
|