@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
|
@@ -49,9 +49,9 @@ export const docs = {
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: 'icon',
|
|
52
|
-
type: 'IconType',
|
|
52
|
+
type: 'ReactNode | IconType',
|
|
53
53
|
description:
|
|
54
|
-
'Icon to display before the label
|
|
54
|
+
'Icon to display before the label; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
name: 'value',
|
|
@@ -111,7 +111,7 @@ export const docsZh = {
|
|
|
111
111
|
propDescriptions: {
|
|
112
112
|
label: '标识该项的主标签文本。',
|
|
113
113
|
description: '显示在标签下方的次要描述文本。',
|
|
114
|
-
icon: '
|
|
114
|
+
icon: '显示在标签前的图标;可传语义图标名称(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
|
|
115
115
|
value: '该项是否被勾选。受控,与 onChange 搭配使用。',
|
|
116
116
|
onChange: '切换该项时以下一个勾选状态触发的回调。',
|
|
117
117
|
isDisabled: '该项是否禁用。',
|
|
@@ -130,7 +130,7 @@ export const docsDense = {
|
|
|
130
130
|
propDescriptions: {
|
|
131
131
|
label: 'primary label text',
|
|
132
132
|
description: 'secondary text below label',
|
|
133
|
-
icon: 'icon before label',
|
|
133
|
+
icon: 'icon before label; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
|
|
134
134
|
value: 'checked state (controlled, w/ onChange)',
|
|
135
135
|
onChange: 'fired w/ next checked state on toggle',
|
|
136
136
|
isDisabled:
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
type ReactNode,
|
|
34
34
|
} from 'react';
|
|
35
35
|
import * as stylex from '@stylexjs/stylex';
|
|
36
|
+
import {menuRowCornerStyles} from './menuRowCorners.stylex';
|
|
36
37
|
import {renderIconSlot, type IconType} from '../Icon';
|
|
37
38
|
import {useIndicator} from '../Indicator';
|
|
38
39
|
import {Item} from '../Item';
|
|
@@ -40,7 +41,7 @@ import {useDropdownMenuContext} from './DropdownMenuContext';
|
|
|
40
41
|
import {focusOutlineStyles} from '../utils/focusOutline.stylex';
|
|
41
42
|
import {menuPressLitRowStyle} from '../privateAttributes/menuPressLit.stylex';
|
|
42
43
|
import {focusMenuItemOnHover} from './menuItemHover';
|
|
43
|
-
import {colorVars, focusVars
|
|
44
|
+
import {colorVars, focusVars} from '../theme/tokens.stylex';
|
|
44
45
|
import {composeEventHandlers, mergeProps, themeProps} from '../utils';
|
|
45
46
|
import type {BaseProps} from '../BaseProps';
|
|
46
47
|
import {keepDisabledRowUnfocused} from './menuItemRoles';
|
|
@@ -48,7 +49,6 @@ import {keepDisabledRowUnfocused} from './menuItemRoles';
|
|
|
48
49
|
const styles = stylex.create({
|
|
49
50
|
root: {
|
|
50
51
|
width: '100%',
|
|
51
|
-
borderRadius: `max(0px, calc(var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
52
52
|
color: colorVars['--color-text-primary'],
|
|
53
53
|
backgroundColor: {
|
|
54
54
|
default: 'transparent',
|
|
@@ -240,6 +240,7 @@ export function DropdownMenuCheckboxItem({
|
|
|
240
240
|
xstyle={[
|
|
241
241
|
focusOutlineStyles.focusVisible,
|
|
242
242
|
styles.root,
|
|
243
|
+
menuRowCornerStyles.root,
|
|
243
244
|
menuPressLitRowStyle,
|
|
244
245
|
isDisabled && styles.disabled,
|
|
245
246
|
xstyle,
|
|
@@ -61,9 +61,9 @@ export const docs = {
|
|
|
61
61
|
props: [
|
|
62
62
|
{
|
|
63
63
|
name: 'icon',
|
|
64
|
-
type: 'IconType',
|
|
64
|
+
type: 'ReactNode | IconType',
|
|
65
65
|
description:
|
|
66
|
-
'Icon to display before the label
|
|
66
|
+
'Icon to display before the label; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
name: 'label',
|
|
@@ -150,8 +150,8 @@ export const docsZh = {
|
|
|
150
150
|
props: [
|
|
151
151
|
{
|
|
152
152
|
name: 'icon',
|
|
153
|
-
type: 'IconType',
|
|
154
|
-
description: '
|
|
153
|
+
type: 'ReactNode | IconType',
|
|
154
|
+
description: '显示在标签前的图标;可传语义图标名称(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
name: 'label',
|
|
@@ -230,7 +230,7 @@ export const docsDense = {
|
|
|
230
230
|
description:
|
|
231
231
|
'one pointer-menu action/destination row; parent owns keyboard, row owns activation, state, destination, content, and root inputs',
|
|
232
232
|
propDescriptions: {
|
|
233
|
-
icon: 'icon before label',
|
|
233
|
+
icon: 'icon before label; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
|
|
234
234
|
label: 'primary label text',
|
|
235
235
|
description: 'secondary text below label',
|
|
236
236
|
onClick:
|
|
@@ -53,6 +53,7 @@ import {menuPressLitRowStyle} from '../privateAttributes/menuPressLit.stylex';
|
|
|
53
53
|
import {focusMenuItemOnHover} from './menuItemHover';
|
|
54
54
|
import {isModifiedClick, keepDisabledRowUnfocused} from './menuItemRoles';
|
|
55
55
|
import {themeProps} from '../utils/themeProps';
|
|
56
|
+
import {menuRowCornerStyles} from './menuRowCorners.stylex';
|
|
56
57
|
import {usePressFeedback} from '../hooks/usePressFeedback';
|
|
57
58
|
|
|
58
59
|
const menuItemStyles = stylex.create({
|
|
@@ -61,9 +62,9 @@ const menuItemStyles = stylex.create({
|
|
|
61
62
|
width: '100%',
|
|
62
63
|
paddingBlock: spacingVars['--spacing-2'],
|
|
63
64
|
paddingInline: spacingVars['--spacing-2'],
|
|
64
|
-
borderRadius: `max(0px, calc(var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
65
65
|
fontFamily: typographyVars['--font-family-body'],
|
|
66
66
|
fontSize: typeScaleVars['--text-label-size'],
|
|
67
|
+
lineHeight: typeScaleVars['--text-label-leading'],
|
|
67
68
|
color: colorVars['--color-text-primary'],
|
|
68
69
|
backgroundColor: {
|
|
69
70
|
default: 'transparent',
|
|
@@ -310,6 +311,7 @@ export function DropdownMenuItem({
|
|
|
310
311
|
xstyle={[
|
|
311
312
|
focusOutlineStyles.focusVisible,
|
|
312
313
|
menuItemStyles.root,
|
|
314
|
+
menuRowCornerStyles.root,
|
|
313
315
|
menuPressLitRowStyle,
|
|
314
316
|
itemSizeStyles[menuSize],
|
|
315
317
|
isDestructive && menuItemStyles.destructive,
|
|
@@ -43,9 +43,9 @@ export const docs = {
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
name: 'icon',
|
|
46
|
-
type: 'IconType',
|
|
46
|
+
type: 'ReactNode | IconType',
|
|
47
47
|
description:
|
|
48
|
-
'Icon to display before the label
|
|
48
|
+
'Icon to display before the label; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: 'isDisabled',
|
|
@@ -79,7 +79,7 @@ export const docsZh = {
|
|
|
79
79
|
value: '该项在组内代表的值。组的 value 与之匹配以确定勾选状态。',
|
|
80
80
|
label: '标识该选项的主标签文本。',
|
|
81
81
|
description: '显示在标签下方的次要描述文本。',
|
|
82
|
-
icon: '
|
|
82
|
+
icon: '显示在标签前的图标;可传语义图标名称(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
|
|
83
83
|
isDisabled: '该单选项是否禁用。',
|
|
84
84
|
endContent: '在标签和描述之后渲染的内容。',
|
|
85
85
|
ref: '转发到行根元素(带 role="menuitemradio" 的元素)的 ref。',
|
|
@@ -95,7 +95,7 @@ export const docsDense = {
|
|
|
95
95
|
value: "item's value within the group (matched vs group value)",
|
|
96
96
|
label: 'primary label text',
|
|
97
97
|
description: 'secondary text below label',
|
|
98
|
-
icon: 'icon before label',
|
|
98
|
+
icon: 'icon before label; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
|
|
99
99
|
isDisabled:
|
|
100
100
|
'disabled (aria-disabled); reached by arrows/typeahead, focusable, inert',
|
|
101
101
|
endContent: 'content after label+description',
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
type ReactNode,
|
|
30
30
|
} from 'react';
|
|
31
31
|
import * as stylex from '@stylexjs/stylex';
|
|
32
|
+
import {menuRowCornerStyles} from './menuRowCorners.stylex';
|
|
32
33
|
import {renderIconSlot, type IconType} from '../Icon';
|
|
33
34
|
import {useIndicator} from '../Indicator';
|
|
34
35
|
import {Item} from '../Item';
|
|
@@ -36,7 +37,7 @@ import {useDropdownMenuContext} from './DropdownMenuContext';
|
|
|
36
37
|
import {focusOutlineStyles} from '../utils/focusOutline.stylex';
|
|
37
38
|
import {menuPressLitRowStyle} from '../privateAttributes/menuPressLit.stylex';
|
|
38
39
|
import {focusMenuItemOnHover} from './menuItemHover';
|
|
39
|
-
import {colorVars, focusVars
|
|
40
|
+
import {colorVars, focusVars} from '../theme/tokens.stylex';
|
|
40
41
|
import {composeEventHandlers, mergeProps, themeProps} from '../utils';
|
|
41
42
|
import type {BaseProps} from '../BaseProps';
|
|
42
43
|
import {useDropdownMenuRadioGroupContext} from './DropdownMenuContext';
|
|
@@ -45,7 +46,6 @@ import {keepDisabledRowUnfocused} from './menuItemRoles';
|
|
|
45
46
|
const styles = stylex.create({
|
|
46
47
|
root: {
|
|
47
48
|
width: '100%',
|
|
48
|
-
borderRadius: `max(0px, calc(var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
49
49
|
color: colorVars['--color-text-primary'],
|
|
50
50
|
backgroundColor: {
|
|
51
51
|
default: 'transparent',
|
|
@@ -226,6 +226,7 @@ export function DropdownMenuRadioItem({
|
|
|
226
226
|
xstyle={[
|
|
227
227
|
focusOutlineStyles.focusVisible,
|
|
228
228
|
styles.root,
|
|
229
|
+
menuRowCornerStyles.root,
|
|
229
230
|
menuPressLitRowStyle,
|
|
230
231
|
isDisabled && styles.disabled,
|
|
231
232
|
xstyle,
|
|
@@ -21,9 +21,9 @@ export const docs = {
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
name: 'icon',
|
|
24
|
-
type: 'IconType',
|
|
24
|
+
type: 'ReactNode | IconType',
|
|
25
25
|
description:
|
|
26
|
-
'Icon to display before the label
|
|
26
|
+
'Icon to display before the label; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
name: 'description',
|
|
@@ -124,7 +124,7 @@ export const docsDense = {
|
|
|
124
124
|
'menu row that reveals a nested flyout of its own children/items (single component, not Sub/SubTrigger/SubContent); drills in on a phone',
|
|
125
125
|
propDescriptions: {
|
|
126
126
|
label: 'primary label text for the trigger row',
|
|
127
|
-
icon: 'icon before label',
|
|
127
|
+
icon: 'icon before label; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
|
|
128
128
|
description: 'secondary text below label',
|
|
129
129
|
children: 'flyout menu items (same components as top level)',
|
|
130
130
|
isDisabled: 'renders trigger but never opens',
|
|
@@ -64,6 +64,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
64
64
|
import {Icon, renderIconSlot, type IconType} from '../Icon';
|
|
65
65
|
import {Spinner} from '../Spinner';
|
|
66
66
|
import {moveRegionsTab} from './menuRegionStops';
|
|
67
|
+
import {menuRowCornerStyles} from './menuRowCorners.stylex';
|
|
67
68
|
import {Item} from '../Item';
|
|
68
69
|
import {useLayer} from '../Layer/useLayer';
|
|
69
70
|
import {layerAnimations} from '../Layer/layerAnimations.stylex';
|
|
@@ -143,9 +144,9 @@ const triggerStyles = stylex.create({
|
|
|
143
144
|
width: '100%',
|
|
144
145
|
paddingBlock: spacingVars['--spacing-2'],
|
|
145
146
|
paddingInline: spacingVars['--spacing-2'],
|
|
146
|
-
borderRadius: `max(0px, calc(var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
147
147
|
fontFamily: typographyVars['--font-family-body'],
|
|
148
148
|
fontSize: typeScaleVars['--text-label-size'],
|
|
149
|
+
lineHeight: typeScaleVars['--text-label-leading'],
|
|
149
150
|
color: colorVars['--color-text-primary'],
|
|
150
151
|
backgroundColor: {
|
|
151
152
|
default: 'transparent',
|
|
@@ -206,6 +207,16 @@ const flyoutStyles = stylex.create({
|
|
|
206
207
|
MENU_MAX_BLOCK_SIZE_FALLBACK,
|
|
207
208
|
),
|
|
208
209
|
'--_dropdown-menu-radius': radiusVars['--radius-container'],
|
|
210
|
+
// Theme corner variables inherit. Reset them, so a nested surface that the
|
|
211
|
+
// theme does not style hands out its own radius.
|
|
212
|
+
'--_dropdown-menu-radius-top-left': 'initial',
|
|
213
|
+
'--_dropdown-menu-radius-top-right': 'initial',
|
|
214
|
+
'--_dropdown-menu-radius-bottom-right': 'initial',
|
|
215
|
+
'--_dropdown-menu-radius-bottom-left': 'initial',
|
|
216
|
+
'--_dropdown-menu-radius-start-start': 'initial',
|
|
217
|
+
'--_dropdown-menu-radius-start-end': 'initial',
|
|
218
|
+
'--_dropdown-menu-radius-end-start': 'initial',
|
|
219
|
+
'--_dropdown-menu-radius-end-end': 'initial',
|
|
209
220
|
'--_dropdown-menu-padding': spacingVars['--spacing-1'],
|
|
210
221
|
padding: spacingVars['--spacing-1'],
|
|
211
222
|
borderRadius: 'var(--_dropdown-menu-radius)',
|
|
@@ -310,6 +321,16 @@ const regionStyles = stylex.create({
|
|
|
310
321
|
MENU_MAX_BLOCK_SIZE_FALLBACK,
|
|
311
322
|
),
|
|
312
323
|
'--_dropdown-menu-radius': radiusVars['--radius-container'],
|
|
324
|
+
// Theme corner variables inherit. Reset them, so a nested surface that the
|
|
325
|
+
// theme does not style hands out its own radius.
|
|
326
|
+
'--_dropdown-menu-radius-top-left': 'initial',
|
|
327
|
+
'--_dropdown-menu-radius-top-right': 'initial',
|
|
328
|
+
'--_dropdown-menu-radius-bottom-right': 'initial',
|
|
329
|
+
'--_dropdown-menu-radius-bottom-left': 'initial',
|
|
330
|
+
'--_dropdown-menu-radius-start-start': 'initial',
|
|
331
|
+
'--_dropdown-menu-radius-start-end': 'initial',
|
|
332
|
+
'--_dropdown-menu-radius-end-start': 'initial',
|
|
333
|
+
'--_dropdown-menu-radius-end-end': 'initial',
|
|
313
334
|
'--_dropdown-menu-padding': spacingVars['--spacing-1'],
|
|
314
335
|
borderRadius: 'var(--_dropdown-menu-radius)',
|
|
315
336
|
},
|
|
@@ -1303,6 +1324,7 @@ export function DropdownMenuSubMenu(
|
|
|
1303
1324
|
xstyle={[
|
|
1304
1325
|
focusOutlineStyles.focusVisible,
|
|
1305
1326
|
triggerStyles.root,
|
|
1327
|
+
menuRowCornerStyles.root,
|
|
1306
1328
|
menuPressLitRowStyle,
|
|
1307
1329
|
triggerSizeStyles[menuSize],
|
|
1308
1330
|
isOpen && triggerStyles.open,
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* @file lazyMenuBottomSheet.ts
|
|
7
7
|
* @input Uses React lazy and Suspense, useIsHydrating, MenuBottomSheet, and
|
|
8
8
|
* MenuBottomSheetActionList
|
|
9
|
-
* @output Exports MenuBottomSheet
|
|
10
|
-
*
|
|
9
|
+
* @output Exports MenuBottomSheet (for a menu that shows the action list),
|
|
10
|
+
* MenuBottomSheetWithoutActionList (for caller content) and
|
|
11
|
+
* MenuBottomSheetActionList wrappers that load the touch sheet on first render
|
|
11
12
|
* @position Internal to DropdownMenu and ContextMenu
|
|
12
13
|
*
|
|
13
14
|
* The touch sheet (BottomSheet, its gestures, and the touch action list) only
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
* module loader again (a loader that retries then loads it; a browser does not
|
|
21
22
|
* fetch a native module again once its import failed).
|
|
22
23
|
*
|
|
23
|
-
*
|
|
24
|
+
* No wrapper renders on the server or in the render that hydrates server
|
|
24
25
|
* HTML (spec:AST-013 FR9): a lazy component that has not loaded yet would
|
|
25
26
|
* leave server markup incomplete and abort hydration. The closed sheet has no
|
|
26
27
|
* visible markup, so it first renders right after hydration.
|
|
@@ -40,12 +41,6 @@ import type {MenuBottomSheet as EagerMenuBottomSheet} from './MenuBottomSheet';
|
|
|
40
41
|
import type {MenuBottomSheetActionList as EagerMenuBottomSheetActionList} from './MenuBottomSheetActionList';
|
|
41
42
|
import type * as ActionListModule from './MenuBottomSheetActionList';
|
|
42
43
|
|
|
43
|
-
const LazyMenuBottomSheet = lazy(async () =>
|
|
44
|
-
import('./MenuBottomSheet').then(module => ({
|
|
45
|
-
default: module.MenuBottomSheet,
|
|
46
|
-
})),
|
|
47
|
-
);
|
|
48
|
-
|
|
49
44
|
// The action list renders inside the sheet, which renders nothing while
|
|
50
45
|
// closed, so its first render is the first open. Once preloaded, it renders
|
|
51
46
|
// directly instead of through lazy(): a suspended render on open would hold
|
|
@@ -76,6 +71,25 @@ export async function preloadMenuBottomSheetActionList(): Promise<ActionListPrel
|
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
73
|
|
|
74
|
+
const loadSheet = async () => import('./MenuBottomSheet');
|
|
75
|
+
|
|
76
|
+
// A sheet that shows the action list waits for the rows' module too. A press
|
|
77
|
+
// right after mount then shows the sheet and its actions together. A failed
|
|
78
|
+
// row load does not hold the sheet; the rows then fail through lazy().
|
|
79
|
+
const LazyMenuBottomSheet = lazy(async () => {
|
|
80
|
+
const [module] = await Promise.all([
|
|
81
|
+
loadSheet(),
|
|
82
|
+
loadActionList().catch(() => undefined),
|
|
83
|
+
]);
|
|
84
|
+
return {default: module.MenuBottomSheet};
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// A sheet with caller content (ContextMenu `menuContent`) shows no action
|
|
88
|
+
// list, so it never loads or waits for the rows.
|
|
89
|
+
const LazyMenuBottomSheetWithoutActionList = lazy(async () =>
|
|
90
|
+
loadSheet().then(module => ({default: module.MenuBottomSheet})),
|
|
91
|
+
);
|
|
92
|
+
|
|
79
93
|
const LazyMenuBottomSheetActionList = lazy(async () =>
|
|
80
94
|
loadActionList().then(module => ({
|
|
81
95
|
default: module.MenuBottomSheetActionList,
|
|
@@ -95,6 +109,20 @@ export function MenuBottomSheet(
|
|
|
95
109
|
);
|
|
96
110
|
}
|
|
97
111
|
|
|
112
|
+
/** The touch sheet for caller content: it does not load the action list. */
|
|
113
|
+
export function MenuBottomSheetWithoutActionList(
|
|
114
|
+
props: ComponentProps<typeof EagerMenuBottomSheet>,
|
|
115
|
+
): ReactElement | null {
|
|
116
|
+
if (useIsHydrating()) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
return createElement(
|
|
120
|
+
Suspense,
|
|
121
|
+
{fallback: null},
|
|
122
|
+
createElement(LazyMenuBottomSheetWithoutActionList, props),
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
98
126
|
export function MenuBottomSheetActionList(
|
|
99
127
|
props: ComponentProps<typeof EagerMenuBottomSheetActionList>,
|
|
100
128
|
): ReactElement | null {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file menuRowCorners.stylex.ts
|
|
5
|
+
* @input The menu's radius and padding variables
|
|
6
|
+
* @output Exports menuRowCornerStyles: a menu row's corners, each the menu's
|
|
7
|
+
* corner less the menu's padding, never below 0
|
|
8
|
+
* @position Shared by DropdownMenu's item, checkbox item, radio item and
|
|
9
|
+
* sub-menu row (and so the context menu, which renders them)
|
|
10
|
+
*
|
|
11
|
+
* Each row corner follows the menu corner it sits in. The theme pipeline
|
|
12
|
+
* writes a variable for each menu corner. A row reads the logical corner,
|
|
13
|
+
* then the physical corner for this direction, then the menu's one radius.
|
|
14
|
+
* Menus stay outside container geometry, and a row subtracts the menu
|
|
15
|
+
* padding, so rows keep this reading of their own.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import * as stylex from '@stylexjs/stylex';
|
|
19
|
+
import {spacingVars} from '../theme/tokens.stylex';
|
|
20
|
+
|
|
21
|
+
export const menuRowCornerStyles = stylex.create({
|
|
22
|
+
root: {
|
|
23
|
+
borderStartStartRadius: {
|
|
24
|
+
default: `max(0px, calc(var(--_dropdown-menu-radius-start-start, var(--_dropdown-menu-radius-top-left, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
25
|
+
':dir(rtl)': `max(0px, calc(var(--_dropdown-menu-radius-start-start, var(--_dropdown-menu-radius-top-right, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
26
|
+
},
|
|
27
|
+
borderStartEndRadius: {
|
|
28
|
+
default: `max(0px, calc(var(--_dropdown-menu-radius-start-end, var(--_dropdown-menu-radius-top-right, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
29
|
+
':dir(rtl)': `max(0px, calc(var(--_dropdown-menu-radius-start-end, var(--_dropdown-menu-radius-top-left, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
30
|
+
},
|
|
31
|
+
borderEndStartRadius: {
|
|
32
|
+
default: `max(0px, calc(var(--_dropdown-menu-radius-end-start, var(--_dropdown-menu-radius-bottom-left, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
33
|
+
':dir(rtl)': `max(0px, calc(var(--_dropdown-menu-radius-end-start, var(--_dropdown-menu-radius-bottom-right, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
34
|
+
},
|
|
35
|
+
borderEndEndRadius: {
|
|
36
|
+
default: `max(0px, calc(var(--_dropdown-menu-radius-end-end, var(--_dropdown-menu-radius-bottom-right, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
37
|
+
':dir(rtl)': `max(0px, calc(var(--_dropdown-menu-radius-end-end, var(--_dropdown-menu-radius-bottom-left, var(--_dropdown-menu-radius, ${spacingVars['--spacing-2']}))) - var(--_dropdown-menu-padding, ${spacingVars['--spacing-1']})))`,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
@@ -54,6 +54,7 @@ const styles = stylex.create({
|
|
|
54
54
|
},
|
|
55
55
|
titleCompact: {
|
|
56
56
|
fontSize: typeScaleVars['--text-label-size'],
|
|
57
|
+
lineHeight: typeScaleVars['--text-label-leading'],
|
|
57
58
|
},
|
|
58
59
|
description: {
|
|
59
60
|
margin: 0,
|
|
@@ -65,6 +66,7 @@ const styles = stylex.create({
|
|
|
65
66
|
},
|
|
66
67
|
descriptionCompact: {
|
|
67
68
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
69
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
68
70
|
},
|
|
69
71
|
textGroup: {
|
|
70
72
|
display: 'flex',
|
package/src/Field/Field.doc.mjs
CHANGED
|
@@ -113,7 +113,7 @@ export const docs = {
|
|
|
113
113
|
{
|
|
114
114
|
name: 'labelIcon',
|
|
115
115
|
type: 'ReactNode | IconType',
|
|
116
|
-
description: 'Icon to display before the label text
|
|
116
|
+
description: 'Icon to display before the label text; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
name: 'labelTooltip',
|
|
@@ -67,7 +67,7 @@ export const docs = {
|
|
|
67
67
|
name: 'labelIcon',
|
|
68
68
|
type: 'ReactNode | IconType',
|
|
69
69
|
description:
|
|
70
|
-
'Icon
|
|
70
|
+
'Icon before the label text; pass a semantic icon name such as \'search\' (see `astryx docs icons`), an icon component, or an icon element.',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
name: 'labelTooltip',
|
|
@@ -172,7 +172,7 @@ export const docsZh = {
|
|
|
172
172
|
{
|
|
173
173
|
name: 'labelIcon',
|
|
174
174
|
type: 'ReactNode | IconType',
|
|
175
|
-
description: '
|
|
175
|
+
description: '标签文本前的图标或已渲染图标内容;可传语义图标名称(如 \'search\',见 `astryx docs icons`)、图标组件或图标元素。',
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
name: 'labelTooltip',
|
|
@@ -228,7 +228,7 @@ export const docsDense = {
|
|
|
228
228
|
isDisabled: 'Use disabled label presentation.',
|
|
229
229
|
isOptional: 'Show localized optional exception indicator.',
|
|
230
230
|
isRequired: 'Show localized required exception indicator.',
|
|
231
|
-
labelIcon: 'Icon
|
|
231
|
+
labelIcon: 'Icon before label text; semantic icon name string OK, e.g. \'search\' (`astryx docs icons`), or icon component/element.',
|
|
232
232
|
labelTooltip: 'Help text for the info button after the label.',
|
|
233
233
|
description: 'Supporting content outside the accessible name.',
|
|
234
234
|
descriptionID: 'ID for caller-owned aria-describedby wiring.',
|
package/src/Field/FieldLabel.tsx
CHANGED
|
@@ -66,8 +66,15 @@ const styles = stylex.create({
|
|
|
66
66
|
fontFamily: typographyVars['--font-family-body'],
|
|
67
67
|
fontSize: typeScaleVars['--text-label-size'],
|
|
68
68
|
lineHeight: typeScaleVars['--text-label-leading'],
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
// Arial, Helvetica, Liberation Sans, and Segoe UI have no 500 face, and
|
|
70
|
+
// CSS resolves a missing 500 to the regular face. Semibold resolves up to
|
|
71
|
+
// a heavier face, so the label stays heavier than its description with
|
|
72
|
+
// every font.
|
|
73
|
+
fontWeight: fontWeightVars['--font-weight-semibold'],
|
|
74
|
+
// The label names the control, so it takes the primary text colour. The
|
|
75
|
+
// description and the optionality marker stay secondary and read as
|
|
76
|
+
// supporting text beside it.
|
|
77
|
+
color: colorVars['--color-text-primary'],
|
|
71
78
|
cursor: {
|
|
72
79
|
default: 'pointer',
|
|
73
80
|
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
@@ -49,6 +49,24 @@ export const inputDisabledFocusStyles = stylex.create({
|
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
|
|
52
|
+
// The same ring for a disabled field box that takes keyboard focus itself
|
|
53
|
+
// (a collapsed layer-mode Tokenizer's placeholder).
|
|
54
|
+
selfRing: {
|
|
55
|
+
borderColor: {
|
|
56
|
+
default: colorVars['--color-border-emphasized'],
|
|
57
|
+
':focus-visible': {
|
|
58
|
+
default: colorVars['--color-accent'],
|
|
59
|
+
// Forced colors repaint author borders in one system color and drop
|
|
60
|
+
// the inset shadow; Highlight keeps the focused field visible.
|
|
61
|
+
'@media (forced-colors: active)': 'Highlight',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
boxShadow: {
|
|
65
|
+
default: 'none',
|
|
66
|
+
':focus-visible': `inset 0px 0px 0px 2px ${colorVars['--color-accent-muted']}`,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
|
|
52
70
|
// The same ring for a field that restores it while focus is anywhere inside
|
|
53
71
|
// it (TimeInput, DateRangeInput, DateTimeInput and their touch fields).
|
|
54
72
|
withinRing: {
|
|
@@ -23,6 +23,8 @@ import {
|
|
|
23
23
|
durationVars,
|
|
24
24
|
easeVars,
|
|
25
25
|
borderVars,
|
|
26
|
+
sizeVars,
|
|
27
|
+
typeScaleVars,
|
|
26
28
|
} from '../theme/tokens.stylex';
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -90,6 +92,42 @@ export const inputWrapperStyles = stylex.create({
|
|
|
90
92
|
},
|
|
91
93
|
});
|
|
92
94
|
|
|
95
|
+
/**
|
|
96
|
+
* The row height of a one-line text field, by size: the larger of the size
|
|
97
|
+
* and one bordered body text line. At the theme's default text size that is
|
|
98
|
+
* the size, as before; larger text grows the row to hold its line inside the
|
|
99
|
+
* borders. The height stays definite, so a theme's block padding cannot grow
|
|
100
|
+
* the row at the default text size, and group members can still fill a row.
|
|
101
|
+
* The coarse-pointer line follows the iOS 16px floor the input's own font
|
|
102
|
+
* size has.
|
|
103
|
+
*/
|
|
104
|
+
export const inputRowSizeStyles = stylex.create({
|
|
105
|
+
sm: {
|
|
106
|
+
height: {
|
|
107
|
+
default: `max(${sizeVars['--size-element-sm']}, calc(${typeScaleVars['--text-body-size']} * ${typeScaleVars['--text-body-leading']} + 2 * ${borderVars['--border-width']}))`,
|
|
108
|
+
'@media (pointer: coarse)': {
|
|
109
|
+
'@supports (-webkit-touch-callout: none)': `max(${sizeVars['--size-element-sm']}, calc(max(1rem, ${typeScaleVars['--text-body-size']}) * ${typeScaleVars['--text-body-leading']} + 2 * ${borderVars['--border-width']}))`,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
md: {
|
|
114
|
+
height: {
|
|
115
|
+
default: `max(${sizeVars['--size-element-md']}, calc(${typeScaleVars['--text-body-size']} * ${typeScaleVars['--text-body-leading']} + 2 * ${borderVars['--border-width']}))`,
|
|
116
|
+
'@media (pointer: coarse)': {
|
|
117
|
+
'@supports (-webkit-touch-callout: none)': `max(${sizeVars['--size-element-md']}, calc(max(1rem, ${typeScaleVars['--text-body-size']}) * ${typeScaleVars['--text-body-leading']} + 2 * ${borderVars['--border-width']}))`,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
lg: {
|
|
122
|
+
height: {
|
|
123
|
+
default: `max(${sizeVars['--size-element-lg']}, calc(${typeScaleVars['--text-body-size']} * ${typeScaleVars['--text-body-leading']} + 2 * ${borderVars['--border-width']}))`,
|
|
124
|
+
'@media (pointer: coarse)': {
|
|
125
|
+
'@supports (-webkit-touch-callout: none)': `max(${sizeVars['--size-element-lg']}, calc(max(1rem, ${typeScaleVars['--text-body-size']}) * ${typeScaleVars['--text-body-leading']} + 2 * ${borderVars['--border-width']}))`,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
|
|
93
131
|
/**
|
|
94
132
|
* Status border colors for input wrappers.
|
|
95
133
|
* Keyed by InputStatusType. Under forced colors a focused field's border is
|
|
@@ -127,7 +165,8 @@ export const inputStatusBorderStyles = stylex.create({
|
|
|
127
165
|
});
|
|
128
166
|
|
|
129
167
|
/**
|
|
130
|
-
* Status hover shadow styles for input wrappers.
|
|
168
|
+
* Status hover shadow styles for input wrappers. Each keeps the base focus
|
|
169
|
+
* ring.
|
|
131
170
|
* Keyed by InputStatusType.
|
|
132
171
|
*/
|
|
133
172
|
export const inputStatusHoverShadowStyles = stylex.create({
|
|
@@ -138,6 +177,10 @@ export const inputStatusHoverShadowStyles = stylex.create({
|
|
|
138
177
|
{
|
|
139
178
|
'@media (hover: hover)': shadowVars['--shadow-inset-warning'],
|
|
140
179
|
},
|
|
180
|
+
// This boxShadow replaces the base one whole, so it keeps the base
|
|
181
|
+
// focus ring: the status border does not change on focus, and the ring
|
|
182
|
+
// is the only sign of keyboard focus.
|
|
183
|
+
':focus-within': `inset 0px 0px 0px 2px ${colorVars['--color-accent-muted']}`,
|
|
141
184
|
},
|
|
142
185
|
},
|
|
143
186
|
error: {
|
|
@@ -147,6 +190,10 @@ export const inputStatusHoverShadowStyles = stylex.create({
|
|
|
147
190
|
{
|
|
148
191
|
'@media (hover: hover)': shadowVars['--shadow-inset-error'],
|
|
149
192
|
},
|
|
193
|
+
// This boxShadow replaces the base one whole, so it keeps the base
|
|
194
|
+
// focus ring: the status border does not change on focus, and the ring
|
|
195
|
+
// is the only sign of keyboard focus.
|
|
196
|
+
':focus-within': `inset 0px 0px 0px 2px ${colorVars['--color-accent-muted']}`,
|
|
150
197
|
},
|
|
151
198
|
},
|
|
152
199
|
success: {
|
|
@@ -156,6 +203,10 @@ export const inputStatusHoverShadowStyles = stylex.create({
|
|
|
156
203
|
{
|
|
157
204
|
'@media (hover: hover)': shadowVars['--shadow-inset-success'],
|
|
158
205
|
},
|
|
206
|
+
// This boxShadow replaces the base one whole, so it keeps the base
|
|
207
|
+
// focus ring: the status border does not change on focus, and the ring
|
|
208
|
+
// is the only sign of keyboard focus.
|
|
209
|
+
':focus-within': `inset 0px 0px 0px 2px ${colorVars['--color-accent-muted']}`,
|
|
159
210
|
},
|
|
160
211
|
},
|
|
161
212
|
});
|
package/src/Grid/Grid.doc.mjs
CHANGED
|
@@ -31,7 +31,8 @@ export const docs = {
|
|
|
31
31
|
bestPractices: [
|
|
32
32
|
{ guidance: true, description: 'Default to responsive columns for anything that must survive a phone: `columns={{minWidth: 240, max: 4}}` renders at most 4 columns, each at least 240px, and drops to one full-width column when narrow.' },
|
|
33
33
|
{ guidance: false, description: 'Use `columns={4}` for a row that must work on small screens; a number never reflows and renders four narrow tracks on a phone. Reserve numbers for rows that must stay fixed, such as a 7-day week.' },
|
|
34
|
-
{ guidance: true, description: '
|
|
34
|
+
{ guidance: true, description: 'Pair `minWidth` with `max` to cap the count on wide screens. In a container narrower than `minWidth`, one column shrinks to the container width, with or without `max`.' },
|
|
35
|
+
{ guidance: true, description: '`{minWidth}` alone keeps each column at its track width, and a grid with fewer items than tracks keeps the empty tracks: two items in an 880px grid with `minWidth: 280` leave an empty third column. To let the items grow to fill the row, use `repeat: \'fit\'`, or set `max` to no more than the item count.' },
|
|
35
36
|
{ guidance: true, description: 'Use `repeat: \'fill\'` (the default) for consistent item widths. Use `\'fit\'` when items should stretch to fill leftover space.' },
|
|
36
37
|
{ guidance: false, description: 'Write manual CSS grid; Grid handles spacing and responsive behavior for you.' },
|
|
37
38
|
{ guidance: false, description: 'Use `HStack` with wrapping for grids; use Grid instead.' },
|
|
@@ -140,7 +141,8 @@ export const docsZh = {
|
|
|
140
141
|
bestPractices: [
|
|
141
142
|
{ guidance: true, description: 'Default to responsive columns for anything that must survive a phone: `columns={{minWidth: 240, max: 4}}` renders at most 4 columns, each at least 240px, and drops to one full-width column when narrow.' },
|
|
142
143
|
{ guidance: false, description: 'Use `columns={4}` for a row that must work on small screens; a number never reflows and renders four narrow tracks on a phone. Reserve numbers for rows that must stay fixed, such as a 7-day week.' },
|
|
143
|
-
{ guidance: true, description: '
|
|
144
|
+
{ guidance: true, description: 'Pair `minWidth` with `max` to cap the count on wide screens. In a container narrower than `minWidth`, one column shrinks to the container width, with or without `max`.' },
|
|
145
|
+
{ guidance: true, description: '`{minWidth}` alone keeps each column at its track width, and a grid with fewer items than tracks keeps the empty tracks: two items in an 880px grid with `minWidth: 280` leave an empty third column. To let the items grow to fill the row, use `repeat: \'fit\'`, or set `max` to no more than the item count.' },
|
|
144
146
|
{ guidance: true, description: 'Use `repeat: \'fill\'` (the default) for consistent item widths. Use `\'fit\'` when items should stretch to fill leftover space.' },
|
|
145
147
|
{ guidance: false, description: 'Write manual CSS grid; Grid handles spacing and responsive behavior for you.' },
|
|
146
148
|
{ guidance: false, description: 'Use `HStack` with wrapping for grids; use Grid instead.' },
|
|
@@ -158,7 +160,8 @@ export const docsDense = {
|
|
|
158
160
|
bestPractices: [
|
|
159
161
|
{ guidance: true, description: 'Default to responsive columns for anything that must survive a phone: columns={{minWidth: 240, max: 4}} = at most 4 columns, each >= 240px, one full-width column when narrow.' },
|
|
160
162
|
{ guidance: false, description: 'Use columns={4} for rows that must work on small screens; a number never reflows (4 narrow tracks on a phone). Numbers only for rows that must stay fixed, e.g. a 7-day week.' },
|
|
161
|
-
{ guidance: true, description: '
|
|
163
|
+
{ guidance: true, description: 'Pair minWidth with max to cap the count on wide screens. In a container narrower than minWidth, one column shrinks to the container width, with or without max.' },
|
|
164
|
+
{ guidance: true, description: '{minWidth} alone keeps column width; fewer items than tracks leave empty tracks (2 items, 880px, minWidth 280 -> empty 3rd column). To let items grow: repeat: \'fit\', or max <= item count.' },
|
|
162
165
|
{ guidance: true, description: 'Use repeat: \'fill\' (the default) for consistent item widths. Use \'fit\' when items should stretch to fill leftover space.' },
|
|
163
166
|
{ guidance: false, description: 'Write manual CSS grid; Grid handles spacing and responsive behavior for you.' },
|
|
164
167
|
{ guidance: false, description: 'Use HStack with wrapping for grids; use Grid instead.' },
|
package/src/Grid/Grid.tsx
CHANGED
|
@@ -40,7 +40,8 @@ export type GridAlignment = 'start' | 'center' | 'end' | 'stretch';
|
|
|
40
40
|
*
|
|
41
41
|
* - `number` — exactly N `1fr` tracks (e.g. `columns={3}`); never reflows
|
|
42
42
|
* - `object` — responsive columns based on minimum child width:
|
|
43
|
-
* - `minWidth` — minimum width (px) for each column track
|
|
43
|
+
* - `minWidth` — minimum width (px) for each column track; in a container
|
|
44
|
+
* narrower than `minWidth`, one track shrinks to the container width
|
|
44
45
|
* - `repeat` — `'fill'` (default) preserves empty tracks for consistent widths;
|
|
45
46
|
* `'fit'` collapses empty tracks so items stretch to fill
|
|
46
47
|
* - `max` — caps the maximum number of columns. The grid stretches to 100%
|
|
@@ -419,7 +420,9 @@ export function Grid({
|
|
|
419
420
|
columnGap,
|
|
420
421
|
);
|
|
421
422
|
} else {
|
|
422
|
-
|
|
423
|
+
// `min(100%, …)` lets a lone track shrink to a container narrower than
|
|
424
|
+
// `minWidth` instead of overflowing it.
|
|
425
|
+
gridTemplateColumns = `repeat(${repeatMode}, minmax(min(100%, ${columns.minWidth}px), 1fr))`;
|
|
423
426
|
}
|
|
424
427
|
} else if (typeof columns === 'number' && columns > 0) {
|
|
425
428
|
// Fixed columns mode
|