@astryxdesign/core 0.4.5 → 0.4.6-canary.cea9ecd
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 +134 -0
- package/dist/Avatar/Avatar.d.ts +10 -5
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +139 -30
- package/dist/Avatar/AvatarStatusDot.d.ts +2 -1
- package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
- package/dist/Avatar/AvatarStatusDot.js +30 -4
- package/dist/Avatar/AvatarStatusLabelContext.d.ts +39 -0
- package/dist/Avatar/AvatarStatusLabelContext.d.ts.map +1 -0
- package/dist/Avatar/AvatarStatusLabelContext.js +41 -0
- package/dist/AvatarGroup/AvatarGroup.d.ts +3 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +15 -9
- package/dist/Blockquote/Blockquote.d.ts +4 -3
- package/dist/Blockquote/Blockquote.d.ts.map +1 -1
- package/dist/Blockquote/Blockquote.js +9 -10
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +21 -5
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +47 -34
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +7 -7
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +21 -12
- package/dist/Calendar/hooks/useCalendarNavigation.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarNavigation.js +8 -4
- package/dist/Calendar/styles.d.ts +2 -2
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +5 -5
- package/dist/Center/Center.d.ts +23 -1
- package/dist/Center/Center.d.ts.map +1 -1
- package/dist/Center/Center.js +12 -6
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +3 -3
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +2 -2
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +2 -2
- package/dist/Chat/useChatDictation.d.ts +1 -1
- package/dist/Chat/useChatDictation.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.d.ts +1 -1
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +4 -3
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +2 -2
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +5 -5
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +4 -4
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +1 -1
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -2
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +3 -3
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +6 -6
- package/dist/DateInput/DateInput.d.ts +31 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +90 -22
- package/dist/DateInput/MonthScroller.d.ts +35 -0
- package/dist/DateInput/MonthScroller.d.ts.map +1 -0
- package/dist/DateInput/MonthScroller.js +658 -0
- package/dist/DateInput/MonthYearWheels.d.ts +24 -0
- package/dist/DateInput/MonthYearWheels.d.ts.map +1 -0
- package/dist/DateInput/MonthYearWheels.js +114 -0
- package/dist/DateInput/TouchDateField.d.ts +10 -0
- package/dist/DateInput/TouchDateField.d.ts.map +1 -0
- package/dist/DateInput/TouchDateField.js +810 -0
- package/dist/DateInput/Wheel.d.ts +41 -0
- package/dist/DateInput/Wheel.d.ts.map +1 -0
- package/dist/DateInput/Wheel.js +315 -0
- package/dist/DateInput/monthGeometry.d.ts +65 -0
- package/dist/DateInput/monthGeometry.d.ts.map +1 -0
- package/dist/DateInput/monthGeometry.js +98 -0
- package/dist/DateInput/tokens.stylex.d.ts +63 -0
- package/dist/DateInput/tokens.stylex.d.ts.map +1 -0
- package/dist/DateInput/tokens.stylex.js +74 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts +41 -0
- package/dist/DateInput/useOwnScrollGesture.d.ts.map +1 -0
- package/dist/DateInput/useOwnScrollGesture.js +202 -0
- package/dist/DateInput/usePointerDragScroll.d.ts +15 -0
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -0
- package/dist/DateInput/usePointerDragScroll.js +216 -0
- package/dist/DateInput/useScrollSettle.d.ts +26 -0
- package/dist/DateInput/useScrollSettle.d.ts.map +1 -0
- package/dist/DateInput/useScrollSettle.js +149 -0
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +17 -14
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +17 -14
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +2 -2
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +2 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +2 -2
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +4 -4
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +6 -0
- package/dist/Field/inputStyles.stylex.d.ts +1 -1
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +5 -5
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +6 -6
- package/dist/HoverCard/HoverCard.d.ts +13 -3
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +2 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.d.ts +17 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +78 -9
- package/dist/InputGroup/InputGroup.js +1 -1
- package/dist/Item/Item.d.ts +9 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +52 -14
- package/dist/Layer/index.d.ts +4 -2
- package/dist/Layer/index.d.ts.map +1 -1
- package/dist/Layer/index.js +2 -0
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +3 -2
- package/dist/Layer/useTouchTrigger.d.ts +113 -0
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -0
- package/dist/Layer/useTouchTrigger.js +241 -0
- package/dist/Layout/container.stylex.d.ts +4 -2
- package/dist/Layout/container.stylex.d.ts.map +1 -1
- package/dist/Layout/container.stylex.js +19 -11
- package/dist/Layout/index.d.ts +1 -0
- package/dist/Layout/index.d.ts.map +1 -1
- package/dist/Layout/index.js +4 -0
- package/dist/Layout/padding.stylex.d.ts +315 -12
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +389 -12
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +5 -4
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +6 -6
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +1 -1
- package/dist/MobileNav/MobileNav.d.ts +1 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +24 -6
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +8 -8
- package/dist/NavItem/navItemStyles.stylex.d.ts +4 -4
- package/dist/NavItem/navItemStyles.stylex.d.ts.map +1 -1
- package/dist/NavItem/navItemStyles.stylex.js +4 -4
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +3 -3
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +36 -8
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +3 -3
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +2 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +11 -12
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -1
- package/dist/PowerSearch/formatFilterValue.d.ts +11 -2
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +23 -8
- package/dist/RadioList/RadioListItem.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +70 -40
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +7 -7
- package/dist/Section/Section.d.ts +36 -1
- package/dist/Section/Section.d.ts.map +1 -1
- package/dist/Section/Section.js +12 -2
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +7 -2
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +3 -3
- package/dist/Selector/Selector.d.ts +26 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +93 -20
- package/dist/Selector/SelectorOption.d.ts +14 -1
- package/dist/Selector/SelectorOption.d.ts.map +1 -1
- package/dist/Selector/SelectorOption.js +6 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts +8 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -0
- package/dist/Selector/SelectorRowLayoutContext.js +27 -0
- package/dist/Selector/types.d.ts +1 -0
- package/dist/Selector/types.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +4 -4
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -3
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +7 -7
- package/dist/Stack/Stack.d.ts +23 -1
- package/dist/Stack/Stack.d.ts.map +1 -1
- package/dist/Stack/Stack.js +12 -6
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +2 -2
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +1 -1
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +3 -3
- package/dist/Table/TableRow.js +4 -4
- package/dist/Table/plugins/columnResize/useTableColumnResize.d.ts.map +1 -1
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +2 -2
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +2 -2
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts +5 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +12 -9
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +3 -3
- package/dist/TextArea/TextArea.js +1 -1
- package/dist/TextInput/TextInput.js +1 -1
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +3 -3
- package/dist/TimeInput/TimeInput.js +2 -2
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +6 -4
- package/dist/Timestamp/formatInstant.d.ts +3 -2
- package/dist/Timestamp/formatInstant.d.ts.map +1 -1
- package/dist/Timestamp/formatInstant.js +8 -8
- package/dist/Timestamp/tooltipEntries.d.ts +2 -1
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.js +5 -3
- package/dist/Toast/Toast.d.ts +4 -3
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +10 -7
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -6
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +1 -1
- package/dist/Tooltip/Tooltip.d.ts +16 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +2 -0
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +21 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +71 -13
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +4 -4
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +3 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +2 -2
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +2 -2
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +4 -4
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +7 -7
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -2
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +1 -1
- package/dist/astryx.css +124 -62
- package/dist/hooks/containerReveal.stylex.d.ts.map +1 -1
- package/dist/hooks/containerReveal.stylex.js +18 -18
- package/dist/hooks/scrollbarGutter.d.ts +28 -0
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -0
- package/dist/hooks/scrollbarGutter.js +103 -0
- package/dist/hooks/useAutoMediaMode.d.ts +31 -0
- package/dist/hooks/useAutoMediaMode.d.ts.map +1 -0
- package/dist/hooks/useAutoMediaMode.js +201 -0
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +1 -1
- package/dist/hooks/useListFocus.d.ts +5 -2
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +12 -6
- package/dist/hooks/useScrollLock.d.ts +4 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +13 -1
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +2 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +6 -0
- package/dist/i18n/useCollator.d.ts +12 -0
- package/dist/i18n/useCollator.d.ts.map +1 -0
- package/dist/i18n/useCollator.js +40 -0
- package/dist/i18n/useLocale.d.ts +3 -0
- package/dist/i18n/useLocale.d.ts.map +1 -0
- package/dist/i18n/useLocale.js +31 -0
- package/dist/theme/MediaTheme.d.ts +25 -5
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +31 -6
- package/dist/theme/defineTheme.d.ts +5 -0
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +5 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +7 -0
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +66 -5
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/syntax/index.d.ts +6 -0
- package/dist/theme/syntax/index.d.ts.map +1 -1
- package/dist/theme/syntax/index.js +7 -2
- package/dist/utils/dateParser.d.ts +4 -3
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +8 -8
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/plainDate.d.ts +5 -2
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +20 -4
- package/locales/en.json +28 -0
- package/locales/pseudo.json +21 -0
- package/package.json +3 -3
- package/src/Avatar/Avatar.doc.mjs +10 -6
- package/src/Avatar/Avatar.test.tsx +219 -1
- package/src/Avatar/Avatar.tsx +179 -37
- package/src/Avatar/AvatarStatusDot.tsx +30 -4
- package/src/Avatar/AvatarStatusLabelContext.ts +47 -0
- package/src/AvatarGroup/AvatarGroup.doc.mjs +10 -6
- package/src/AvatarGroup/AvatarGroup.test.tsx +62 -0
- package/src/AvatarGroup/AvatarGroup.tsx +3 -1
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +31 -8
- package/src/Banner/Banner.doc.mjs +2 -0
- package/src/Blockquote/Blockquote.doc.mjs +30 -7
- package/src/Blockquote/Blockquote.test.tsx +34 -3
- package/src/Blockquote/Blockquote.tsx +11 -9
- package/src/BottomSheet/BottomSheet.doc.mjs +3 -3
- package/src/BottomSheet/BottomSheet.test.tsx +24 -0
- package/src/BottomSheet/BottomSheetPanel.test.tsx +91 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +58 -3
- package/src/Breadcrumbs/BreadcrumbItem.tsx +36 -23
- package/src/Breadcrumbs/Breadcrumbs.doc.mjs +26 -2
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +31 -0
- package/src/Button/Button.tsx +12 -9
- package/src/Calendar/Calendar.tsx +15 -9
- package/src/Calendar/hooks/useCalendarNavigation.ts +6 -4
- package/src/Calendar/styles.ts +8 -5
- package/src/Center/Center.doc.mjs +48 -0
- package/src/Center/Center.test.tsx +158 -0
- package/src/Center/Center.tsx +50 -9
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +4 -1
- package/src/Chat/ChatToolCalls.tsx +13 -4
- package/src/Chat/{useChatDictation.test.ts → useChatDictation.test.tsx} +29 -14
- package/src/Chat/useChatDictation.ts +1 -1
- package/src/Chat/useSpeechRecognition.ts +5 -3
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.tsx +5 -2
- package/src/Citation/Citation.test.tsx +6 -1
- package/src/Citation/Citation.tsx +11 -5
- package/src/ClickableCard/ClickableCard.tsx +7 -4
- package/src/CodeBlock/CodeBlock.tsx +4 -1
- package/src/Collapsible/Collapsible.tsx +5 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +6 -3
- package/src/ComplexSelector/ComplexSelector.doc.mjs +10 -0
- package/src/ComplexSelector/ComplexSelector.tsx +14 -7
- package/src/DateInput/DateInput.test.tsx +17 -1
- package/src/DateInput/DateInput.tsx +93 -21
- package/src/DateInput/DateInputTouch.test.tsx +2582 -0
- package/src/DateInput/MonthScroller.tsx +878 -0
- package/src/DateInput/MonthYearWheels.tsx +147 -0
- package/src/DateInput/TouchDateField.tsx +1223 -0
- package/src/DateInput/Wheel.tsx +473 -0
- package/src/DateInput/monthGeometry.ts +118 -0
- package/src/DateInput/tokens.stylex.ts +99 -0
- package/src/DateInput/useOwnScrollGesture.ts +227 -0
- package/src/DateInput/usePointerDragScroll.ts +220 -0
- package/src/DateInput/useScrollSettle.ts +164 -0
- package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
- package/src/DateRangeInput/DateRangeInput.tsx +31 -13
- package/src/DateTimeInput/DateTimeInput.tsx +25 -9
- package/src/Dialog/Dialog.test.tsx +24 -0
- package/src/Dialog/Dialog.tsx +3 -0
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +5 -2
- package/src/DropdownMenu/DropdownMenuItem.tsx +5 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +5 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +5 -2
- package/src/Field/Field.doc.mjs +2 -0
- package/src/Field/FieldLabel.tsx +9 -3
- package/src/Field/InputClearButton.test.tsx +110 -3
- package/src/Field/InputClearButton.tsx +38 -0
- package/src/Field/inputStyles.stylex.ts +17 -13
- package/src/FileInput/FileInput.tsx +15 -8
- package/src/FormLayout/FormLayout.doc.mjs +1 -1
- package/src/HoverCard/HoverCard.doc.mjs +18 -0
- package/src/HoverCard/HoverCard.test.tsx +189 -0
- package/src/HoverCard/HoverCard.tsx +22 -2
- package/src/HoverCard/index.ts +1 -0
- package/src/HoverCard/useHoverCard.doc.mjs +2 -0
- package/src/HoverCard/useHoverCard.tsx +103 -7
- package/src/InputGroup/InputGroup.tsx +1 -1
- package/src/Item/Item.doc.mjs +1 -0
- package/src/Item/Item.test.tsx +50 -0
- package/src/Item/Item.tsx +54 -6
- package/src/Layer/index.ts +10 -0
- package/src/Layer/useLayer.tsx +13 -2
- package/src/Layer/useTouchTrigger.test.ts +70 -0
- package/src/Layer/useTouchTrigger.ts +366 -0
- package/src/Layout/Layout.doc.mjs +18 -0
- package/src/Layout/container.stylex.ts +11 -3
- package/src/Layout/index.ts +4 -0
- package/src/Layout/overlayPaddingReset.test.tsx +222 -0
- package/src/Layout/padding.stylex.ts +192 -12
- package/src/Lightbox/Lightbox.tsx +11 -3
- package/src/Link/Link.tsx +9 -6
- package/src/MetadataList/MetadataList.tsx +4 -1
- package/src/MobileNav/MobileNav.tsx +61 -5
- package/src/MobileNav/MobileNavEntryAnimation.test.tsx +212 -0
- package/src/MobileNav/MobileNavScrollbarGutter.test.tsx +109 -0
- package/src/MultiSelector/MultiSelector.test.tsx +1 -1
- package/src/MultiSelector/MultiSelector.tsx +26 -10
- package/src/NavItem/navItemStyles.stylex.ts +7 -4
- package/src/NavMenu/NavHeadingMenuItem.tsx +6 -3
- package/src/NumberInput/NumberInput.doc.mjs +24 -0
- package/src/NumberInput/NumberInput.test.tsx +138 -0
- package/src/NumberInput/NumberInput.tsx +47 -8
- package/src/Outline/Outline.tsx +5 -2
- package/src/Pagination/Pagination.tsx +5 -2
- package/src/Popover/Popover.test.tsx +27 -1
- package/src/PowerSearch/PowerSearch.tsx +17 -8
- package/src/PowerSearch/PowerSearchToken.tsx +3 -0
- package/src/PowerSearch/formatFilterValue.test.ts +22 -2
- package/src/PowerSearch/formatFilterValue.ts +31 -6
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/RadioList/RadioList.test.tsx +170 -2
- package/src/RadioList/RadioListItem.tsx +88 -53
- package/src/Resizable/ResizeHandle.test.tsx +22 -0
- package/src/Resizable/ResizeHandle.tsx +25 -7
- package/src/Section/Section.doc.mjs +55 -0
- package/src/Section/Section.test.tsx +201 -4
- package/src/Section/Section.tsx +69 -0
- package/src/SegmentedControl/SegmentedControl.test.tsx +31 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +15 -3
- package/src/SelectableCard/SelectableCard.tsx +6 -3
- package/src/Selector/Selector.doc.mjs +16 -2
- package/src/Selector/Selector.test.tsx +525 -1
- package/src/Selector/Selector.tsx +180 -25
- package/src/Selector/SelectorOption.doc.mjs +7 -0
- package/src/Selector/SelectorOption.tsx +21 -0
- package/src/Selector/SelectorRowLayoutContext.ts +32 -0
- package/src/Selector/types.ts +4 -4
- package/src/SideNav/SideNavHeading.tsx +14 -5
- package/src/SideNav/SideNavItem.tsx +9 -3
- package/src/Slider/Slider.tsx +25 -6
- package/src/Stack/Stack.doc.mjs +72 -0
- package/src/Stack/Stack.test.tsx +156 -0
- package/src/Stack/Stack.tsx +50 -8
- package/src/Switch/Switch.tsx +5 -2
- package/src/TabList/Tab.tsx +4 -1
- package/src/TabList/TabMenu.tsx +9 -3
- package/src/Table/TableRow.tsx +4 -4
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +6 -2
- package/src/Table/plugins/filtering/useTableFiltering.tsx +4 -1
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +10 -3
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +6 -3
- package/src/Table/plugins/sortable/useTableSortable.tsx +4 -1
- package/src/Table/plugins/sortable/useTableSortableState.test.tsx +34 -0
- package/src/Table/plugins/sortable/useTableSortableState.tsx +26 -23
- package/src/Table/plugins/tree/useTableTreeData.tsx +10 -4
- package/src/TextArea/TextArea.doc.mjs +1 -1
- package/src/TextArea/TextArea.tsx +1 -1
- package/src/TextInput/TextInput.tsx +1 -1
- package/src/Thumbnail/Thumbnail.tsx +9 -3
- package/src/TimeInput/TimeInput.tsx +1 -1
- package/src/Timestamp/Timestamp.test.tsx +27 -7
- package/src/Timestamp/Timestamp.tsx +8 -4
- package/src/Timestamp/formatInstant.ts +9 -7
- package/src/Timestamp/tooltipEntries.test.ts +11 -6
- package/src/Timestamp/tooltipEntries.ts +6 -2
- package/src/Toast/Toast.tsx +9 -7
- package/src/Token/Token.tsx +14 -5
- package/src/Tokenizer/Tokenizer.tsx +4 -1
- package/src/Tooltip/Tooltip.doc.mjs +18 -0
- package/src/Tooltip/Tooltip.test.tsx +254 -1
- package/src/Tooltip/Tooltip.tsx +22 -2
- package/src/Tooltip/index.ts +1 -0
- package/src/Tooltip/useTooltip.doc.mjs +2 -0
- package/src/Tooltip/useTooltip.tsx +99 -21
- package/src/TopNav/TopNavHeading.tsx +13 -4
- package/src/TopNav/TopNavItem.tsx +6 -3
- package/src/TopNav/TopNavMegaMenu.tsx +5 -2
- package/src/TopNav/TopNavMegaMenuItem.tsx +5 -2
- package/src/TopNav/TopNavMenu.tsx +10 -4
- package/src/TreeList/TreeListItem.tsx +22 -7
- package/src/Typeahead/BaseTypeahead.tsx +5 -2
- package/src/Typeahead/Typeahead.tsx +4 -1
- package/src/hooks/containerReveal.stylex.ts +54 -18
- package/src/hooks/scrollbarGutter.test.ts +167 -0
- package/src/hooks/scrollbarGutter.ts +121 -0
- package/src/hooks/useAutoMediaMode.test.ts +109 -0
- package/src/hooks/useAutoMediaMode.ts +233 -0
- package/src/hooks/useInputStatusIcon.tsx +4 -1
- package/src/hooks/useListFocus.doc.mjs +2 -2
- package/src/hooks/useListFocus.test.tsx +65 -3
- package/src/hooks/useListFocus.ts +15 -7
- package/src/hooks/useScrollLock.doc.mjs +4 -4
- package/src/hooks/useScrollLock.test.ts +73 -0
- package/src/hooks/useScrollLock.ts +14 -0
- package/src/i18n/InternationalizationContext.ts +2 -0
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +37 -1
- package/src/i18n/__tests__/useCollator.test.tsx +115 -0
- package/src/i18n/__tests__/useLocale.test.tsx +52 -0
- package/src/i18n/index.ts +6 -0
- package/src/i18n/useCollator.doc.mjs +84 -0
- package/src/i18n/useCollator.ts +44 -0
- package/src/i18n/useLocale.doc.mjs +70 -0
- package/src/i18n/useLocale.ts +34 -0
- package/src/i18n/useTranslator.doc.mjs +1 -1
- package/src/reset.css +9 -2
- package/src/reset.test.ts +22 -0
- package/src/theme/MediaTheme.doc.mjs +23 -4
- package/src/theme/MediaTheme.dom.test.tsx +97 -0
- package/src/theme/MediaTheme.tsx +42 -7
- package/src/theme/defineTheme.test.ts +9 -3
- package/src/theme/defineTheme.ts +5 -0
- package/src/theme/derivedVarRegistry.test.ts +19 -5
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/generateThemeRules.test.ts +118 -0
- package/src/theme/generateThemeRules.ts +83 -5
- package/src/theme/index.ts +1 -1
- package/src/theme/syntax/index.ts +6 -2
- package/src/theme/syntax/serverSafeSyntax.test.ts +68 -0
- package/src/utils/dateParser.test.ts +20 -0
- package/src/utils/dateParser.ts +14 -7
- package/src/utils/index.ts +2 -0
- package/src/utils/plainDate.test.ts +6 -0
- package/src/utils/plainDate.ts +21 -4
|
@@ -344,6 +344,28 @@ describe('ResizeHandle', () => {
|
|
|
344
344
|
expect(hitArea.className).not.toContain('hitAreaOffsetX');
|
|
345
345
|
});
|
|
346
346
|
|
|
347
|
+
// The grab zone is stretched along the handle by its 0/0 insets, so anything
|
|
348
|
+
// that moves it across the handle displaces the whole zone off the divider —
|
|
349
|
+
// a percentage does it by half the handle's length, so the taller the panel
|
|
350
|
+
// the larger the dead region, and nothing about it is visible on screen.
|
|
351
|
+
it.each([
|
|
352
|
+
['horizontal' as const, 'translateX'],
|
|
353
|
+
['vertical' as const, 'translateY'],
|
|
354
|
+
])('offsets the %s grab zone along the pill axis only', (direction, axis) => {
|
|
355
|
+
render(<Harness handleProps={{direction, pillPlacement: 'start'}} />);
|
|
356
|
+
const hitArea = getSeparator().firstElementChild as HTMLElement;
|
|
357
|
+
const translates = (hitArea.getAttribute('style') ?? '')
|
|
358
|
+
.split(';')
|
|
359
|
+
.map(decl => decl.split(/:(.*)/s)[1]?.trim() ?? '')
|
|
360
|
+
.filter(value => value.startsWith('translate'));
|
|
361
|
+
|
|
362
|
+
// Both the LTR and RTL declarations of the horizontal offset.
|
|
363
|
+
expect(translates.length).toBeGreaterThan(0);
|
|
364
|
+
for (const translate of translates) {
|
|
365
|
+
expect(translate.startsWith(`${axis}(`)).toBe(true);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
|
|
347
369
|
// --- Prop composition (ordering choice: handler sits after {...props}) ---
|
|
348
370
|
|
|
349
371
|
it('runs a consumer onKeyDown alongside keyboard resizing', () => {
|
|
@@ -119,12 +119,18 @@ const styles = stylex.create({
|
|
|
119
119
|
horizontal: {
|
|
120
120
|
width: 1,
|
|
121
121
|
height: '100%',
|
|
122
|
-
cursor:
|
|
122
|
+
cursor: {
|
|
123
|
+
default: 'col-resize',
|
|
124
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
125
|
+
},
|
|
123
126
|
},
|
|
124
127
|
vertical: {
|
|
125
128
|
height: 1,
|
|
126
129
|
width: '100%',
|
|
127
|
-
cursor:
|
|
130
|
+
cursor: {
|
|
131
|
+
default: 'row-resize',
|
|
132
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
133
|
+
},
|
|
128
134
|
},
|
|
129
135
|
noDividerHorizontal: {
|
|
130
136
|
backgroundColor: 'transparent',
|
|
@@ -155,13 +161,19 @@ const styles = stylex.create({
|
|
|
155
161
|
width: spacingVars['--spacing-4'],
|
|
156
162
|
top: 0,
|
|
157
163
|
bottom: 0,
|
|
158
|
-
cursor:
|
|
164
|
+
cursor: {
|
|
165
|
+
default: 'col-resize',
|
|
166
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
167
|
+
},
|
|
159
168
|
},
|
|
160
169
|
hitAreaVertical: {
|
|
161
170
|
height: spacingVars['--spacing-4'],
|
|
162
171
|
insetInlineStart: 0,
|
|
163
172
|
insetInlineEnd: 0,
|
|
164
|
-
cursor:
|
|
173
|
+
cursor: {
|
|
174
|
+
default: 'row-resize',
|
|
175
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
176
|
+
},
|
|
165
177
|
},
|
|
166
178
|
// Centered grab zone (pillPlacement 'center' / no bias): sit the hit area on
|
|
167
179
|
// the divider itself. Inline centering comes from rtlStyles.centerInline at
|
|
@@ -219,16 +231,22 @@ const dynamicStyles = stylex.create({
|
|
|
219
231
|
// directions because the pill's own offset is physical. Mixing the previous
|
|
220
232
|
// divider-relative `50%` anchor with a percentage translate stranded the grab
|
|
221
233
|
// zone to one side under RTL; this construction keeps it on the pill.
|
|
234
|
+
//
|
|
235
|
+
// Only the offset axis is translated. Unlike the pill — a small box anchored
|
|
236
|
+
// at the divider's midpoint, so it needs a −50% self-shift to centre — the
|
|
237
|
+
// grab zone is STRETCHED along the handle by hitAreaHorizontal/Vertical's
|
|
238
|
+
// 0/0 insets, so it is already in place on that axis. A percentage there
|
|
239
|
+
// would displace it by half the handle's own length, growing with the panel.
|
|
222
240
|
hitAreaOffsetX: (dir: number) => ({
|
|
223
241
|
insetInlineStart: 0,
|
|
224
242
|
transform: {
|
|
225
|
-
default: `
|
|
226
|
-
':is([dir="rtl"] *)': `
|
|
243
|
+
default: `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) - 6.5px))`,
|
|
244
|
+
':is([dir="rtl"] *)': `translateX(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) + 6.5px))`,
|
|
227
245
|
},
|
|
228
246
|
}),
|
|
229
247
|
hitAreaOffsetY: (dir: number) => ({
|
|
230
248
|
insetBlockStart: 0,
|
|
231
|
-
transform: `
|
|
249
|
+
transform: `translateY(calc(${dir} * (3px + ${spacingVars['--spacing-1']}) - 6.5px))`,
|
|
232
250
|
}),
|
|
233
251
|
pillOffsetX: (dir: number) => ({
|
|
234
252
|
insetInlineStart: 0,
|
|
@@ -53,11 +53,36 @@ export const docs = {
|
|
|
53
53
|
description: 'Internal padding using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Use padding={0} for edge-to-edge content.',
|
|
54
54
|
default: '4',
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
name: 'paddingInline',
|
|
58
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
59
|
+
description: 'Inline (horizontal) padding override. Overrides only the inline-axis padding while preserving block padding from `padding` or the container theme default. Accepts the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10).',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'paddingInlineStart',
|
|
63
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
64
|
+
description: 'Inline-start padding override (left in LTR, right in RTL). Overrides paddingInline and padding on that edge only.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'paddingInlineEnd',
|
|
68
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
69
|
+
description: 'Inline-end padding override (right in LTR, left in RTL). Overrides paddingInline and padding on that edge only.',
|
|
70
|
+
},
|
|
56
71
|
{
|
|
57
72
|
name: 'paddingBlock',
|
|
58
73
|
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
59
74
|
description: 'Block (vertical) padding override. Overrides only the block-axis padding while preserving inline padding from `padding` or the container theme default. Accepts the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10).',
|
|
60
75
|
},
|
|
76
|
+
{
|
|
77
|
+
name: 'paddingBlockStart',
|
|
78
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
79
|
+
description: 'Block-start (top) padding, using the spacing scale. Overrides paddingBlock and padding on that edge only.',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'paddingBlockEnd',
|
|
83
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
84
|
+
description: 'Block-end (bottom) padding, using the spacing scale. Overrides paddingBlock and padding on that edge only.',
|
|
85
|
+
},
|
|
61
86
|
{
|
|
62
87
|
name: 'xstyle',
|
|
63
88
|
type: 'StyleXStyles',
|
|
@@ -135,11 +160,36 @@ export const docsZh = {
|
|
|
135
160
|
description: '使用间距比例的内部内边距(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。使用 padding={0} 实现全宽内容。',
|
|
136
161
|
default: '4',
|
|
137
162
|
},
|
|
163
|
+
{
|
|
164
|
+
name: 'paddingInline',
|
|
165
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
166
|
+
description: '行内(水平)方向内边距覆盖。仅覆盖行内轴内边距,同时保留来自 padding 或容器主题默认值的块内边距。使用间距比例(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'paddingInlineStart',
|
|
170
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
171
|
+
description: '行内起始内边距覆盖(LTR 中为左侧,RTL 中为右侧)。仅在该边上覆盖 paddingInline 和 padding。',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'paddingInlineEnd',
|
|
175
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
176
|
+
description: '行内结束内边距覆盖(LTR 中为右侧,RTL 中为左侧)。仅在该边上覆盖 paddingInline 和 padding。',
|
|
177
|
+
},
|
|
138
178
|
{
|
|
139
179
|
name: 'paddingBlock',
|
|
140
180
|
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
141
181
|
description: '块(垂直)方向内边距覆盖。仅覆盖块轴内边距,同时保留来自 padding 或容器主题默认值的行内内边距。使用间距比例(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。',
|
|
142
182
|
},
|
|
183
|
+
{
|
|
184
|
+
name: 'paddingBlockStart',
|
|
185
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
186
|
+
description: '块起始(顶部)内边距,使用间距刻度。仅在该边上覆盖 paddingBlock 和 padding。',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'paddingBlockEnd',
|
|
190
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
191
|
+
description: '块结束(底部)内边距,使用间距刻度。仅在该边上覆盖 paddingBlock 和 padding。',
|
|
192
|
+
},
|
|
143
193
|
{
|
|
144
194
|
name: 'xstyle',
|
|
145
195
|
type: 'StyleXStyles',
|
|
@@ -192,7 +242,12 @@ export const docsDense = {
|
|
|
192
242
|
children: 'Content rendered inside section.',
|
|
193
243
|
dividers: 'Which sides of section have divider borders.',
|
|
194
244
|
padding: 'Internal padding via spacing scale; 0 for edge-to-edge content.',
|
|
245
|
+
paddingInline: 'Inline-axis padding override; preserves block padding from padding/theme.',
|
|
246
|
+
paddingInlineStart: 'Inline-start (left in LTR) padding override; wins over paddingInline/padding on that edge.',
|
|
247
|
+
paddingInlineEnd: 'Inline-end (right in LTR) padding override; wins over paddingInline/padding on that edge.',
|
|
195
248
|
paddingBlock: 'Block-axis padding override; preserves inline padding from padding/theme.',
|
|
249
|
+
paddingBlockStart: 'Block-start (top) padding override; wins over paddingBlock/padding on that edge.',
|
|
250
|
+
paddingBlockEnd: 'Block-end (bottom) padding override; wins over paddingBlock/padding on that edge.',
|
|
196
251
|
xstyle: 'StyleX styles for layout customization; must be stylex.create() value.',
|
|
197
252
|
},
|
|
198
253
|
};
|
|
@@ -4,6 +4,22 @@ import {describe, it, expect} from 'vitest';
|
|
|
4
4
|
import {render, screen} from '@testing-library/react';
|
|
5
5
|
import {Section} from './Section';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The functional class output, as an order-insensitive set. StyleX's dev
|
|
9
|
+
* runtime also emits readable debug classes naming the style object a
|
|
10
|
+
* declaration came from ("padding__paddingBlockStyles.2"); those record
|
|
11
|
+
* provenance rather than applied CSS and survive even when the declaration
|
|
12
|
+
* they name loses a merge, so they are dropped here.
|
|
13
|
+
*/
|
|
14
|
+
function classSet(el: HTMLElement): Set<string> {
|
|
15
|
+
return new Set(
|
|
16
|
+
el.className
|
|
17
|
+
.split(' ')
|
|
18
|
+
.filter(Boolean)
|
|
19
|
+
.filter(c => !c.includes('__') && !c.includes('.')),
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
describe('Section', () => {
|
|
8
24
|
it('renders with default props', () => {
|
|
9
25
|
const {container} = render(<Section>Default section</Section>);
|
|
@@ -151,15 +167,27 @@ describe('Section', () => {
|
|
|
151
167
|
expect(screen.getByTestId('custom-section')).toBeInTheDocument();
|
|
152
168
|
});
|
|
153
169
|
|
|
154
|
-
it('propagates explicit padding to nested sections via --
|
|
170
|
+
it('propagates explicit padding to nested sections via --_section-padding-propagated', () => {
|
|
155
171
|
const {container} = render(
|
|
156
172
|
<Section padding={6}>
|
|
157
173
|
<Section data-testid="inner">Inner</Section>
|
|
158
174
|
</Section>,
|
|
159
175
|
);
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
176
|
+
// The outer section's inner div announces its padding on the PRIVATE
|
|
177
|
+
// propagation var, not the public `--astryx-section-padding` theme token —
|
|
178
|
+
// the split is what lets an overlay drop an inherited value at its
|
|
179
|
+
// boundary while keeping the theme's (see overlayPaddingReset).
|
|
180
|
+
const outerInner = container.firstElementChild!
|
|
181
|
+
.firstElementChild! as HTMLElement;
|
|
182
|
+
expect(
|
|
183
|
+
getComputedStyle(outerInner).getPropertyValue(
|
|
184
|
+
'--_section-padding-propagated',
|
|
185
|
+
),
|
|
186
|
+
// jsdom does not resolve the token reference to its 24px value.
|
|
187
|
+
).toBe('var(--spacing-6)');
|
|
188
|
+
expect(
|
|
189
|
+
getComputedStyle(outerInner).getPropertyValue('--astryx-section-padding'),
|
|
190
|
+
).toBe('');
|
|
163
191
|
// Inner section should render without error
|
|
164
192
|
expect(screen.getByTestId('inner')).toBeInTheDocument();
|
|
165
193
|
expect(screen.getByText('Inner')).toBeInTheDocument();
|
|
@@ -176,4 +204,173 @@ describe('Section', () => {
|
|
|
176
204
|
expect(screen.getByTestId('inner')).toBeInTheDocument();
|
|
177
205
|
expect(screen.getByText('Inner')).toBeInTheDocument();
|
|
178
206
|
});
|
|
207
|
+
|
|
208
|
+
it('applies a class when paddingBlockStart is set on its own', () => {
|
|
209
|
+
const {container, rerender} = render(<Section>Content</Section>);
|
|
210
|
+
const baseline = (
|
|
211
|
+
container.firstElementChild!.firstElementChild as HTMLElement
|
|
212
|
+
).className;
|
|
213
|
+
rerender(<Section paddingBlockStart={2}>Content</Section>);
|
|
214
|
+
const withEdge = (
|
|
215
|
+
container.firstElementChild!.firstElementChild as HTMLElement
|
|
216
|
+
).className;
|
|
217
|
+
expect(withEdge).not.toBe(baseline);
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
it('treats paddingBlock as the two edge props set to the same step', () => {
|
|
221
|
+
const {container, rerender} = render(
|
|
222
|
+
<Section paddingBlock={2}>Content</Section>,
|
|
223
|
+
);
|
|
224
|
+
const axis = classSet(
|
|
225
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
226
|
+
);
|
|
227
|
+
rerender(
|
|
228
|
+
<Section paddingBlockStart={2} paddingBlockEnd={2}>
|
|
229
|
+
Content
|
|
230
|
+
</Section>,
|
|
231
|
+
);
|
|
232
|
+
expect(axis).toEqual(
|
|
233
|
+
classSet(container.firstElementChild!.firstElementChild as HTMLElement),
|
|
234
|
+
);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it('gives paddingBlockEnd precedence over paddingBlock', () => {
|
|
238
|
+
const {container, rerender} = render(
|
|
239
|
+
<Section paddingBlock={2} paddingBlockEnd={8}>
|
|
240
|
+
Content
|
|
241
|
+
</Section>,
|
|
242
|
+
);
|
|
243
|
+
const overridden = classSet(
|
|
244
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
245
|
+
);
|
|
246
|
+
rerender(
|
|
247
|
+
<Section paddingBlockStart={2} paddingBlockEnd={8}>
|
|
248
|
+
Content
|
|
249
|
+
</Section>,
|
|
250
|
+
);
|
|
251
|
+
expect(overridden).toEqual(
|
|
252
|
+
classSet(container.firstElementChild!.firstElementChild as HTMLElement),
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
it('keeps inline padding when only a block edge is overridden', () => {
|
|
257
|
+
// padding={6} sets all four edges; paddingBlockStart={0} may only move the
|
|
258
|
+
// top edge, so the inline classes must survive unchanged.
|
|
259
|
+
const {container, rerender} = render(
|
|
260
|
+
<Section padding={6}>Content</Section>,
|
|
261
|
+
);
|
|
262
|
+
const uniform = classSet(
|
|
263
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
264
|
+
);
|
|
265
|
+
rerender(
|
|
266
|
+
<Section padding={6} paddingBlockStart={0}>
|
|
267
|
+
Content
|
|
268
|
+
</Section>,
|
|
269
|
+
);
|
|
270
|
+
const overridden = classSet(
|
|
271
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
272
|
+
);
|
|
273
|
+
// Everything the uniform render dropped is block-start related.
|
|
274
|
+
const removed = [...uniform].filter(c => !overridden.has(c));
|
|
275
|
+
const added = [...overridden].filter(c => !uniform.has(c));
|
|
276
|
+
expect(removed.length).toBeGreaterThan(0);
|
|
277
|
+
expect(added.length).toBeGreaterThan(0);
|
|
278
|
+
// The inline-axis classes are shared by both renders.
|
|
279
|
+
expect(uniform.size - removed.length).toBeGreaterThan(0);
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
it('applies a class when paddingInlineStart is set on its own', () => {
|
|
283
|
+
const {container, rerender} = render(<Section>Content</Section>);
|
|
284
|
+
const baseline = (
|
|
285
|
+
container.firstElementChild!.firstElementChild as HTMLElement
|
|
286
|
+
).className;
|
|
287
|
+
rerender(<Section paddingInlineStart={2}>Content</Section>);
|
|
288
|
+
expect(
|
|
289
|
+
(container.firstElementChild!.firstElementChild as HTMLElement).className,
|
|
290
|
+
).not.toBe(baseline);
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
it('treats paddingInline as the two inline edge props set to the same step', () => {
|
|
294
|
+
const {container, rerender} = render(
|
|
295
|
+
<Section paddingInline={2}>Content</Section>,
|
|
296
|
+
);
|
|
297
|
+
const axis = classSet(
|
|
298
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
299
|
+
);
|
|
300
|
+
rerender(
|
|
301
|
+
<Section paddingInlineStart={2} paddingInlineEnd={2}>
|
|
302
|
+
Content
|
|
303
|
+
</Section>,
|
|
304
|
+
);
|
|
305
|
+
expect(axis).toEqual(
|
|
306
|
+
classSet(container.firstElementChild!.firstElementChild as HTMLElement),
|
|
307
|
+
);
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
it('gives paddingInlineEnd precedence over paddingInline', () => {
|
|
311
|
+
const {container, rerender} = render(
|
|
312
|
+
<Section paddingInline={2} paddingInlineEnd={8}>
|
|
313
|
+
Content
|
|
314
|
+
</Section>,
|
|
315
|
+
);
|
|
316
|
+
const overridden = classSet(
|
|
317
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
318
|
+
);
|
|
319
|
+
rerender(
|
|
320
|
+
<Section paddingInlineStart={2} paddingInlineEnd={8}>
|
|
321
|
+
Content
|
|
322
|
+
</Section>,
|
|
323
|
+
);
|
|
324
|
+
expect(overridden).toEqual(
|
|
325
|
+
classSet(container.firstElementChild!.firstElementChild as HTMLElement),
|
|
326
|
+
);
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
it('keeps block padding when only an inline edge is overridden', () => {
|
|
330
|
+
const {container, rerender} = render(
|
|
331
|
+
<Section padding={6}>Content</Section>,
|
|
332
|
+
);
|
|
333
|
+
const uniform = classSet(
|
|
334
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
335
|
+
);
|
|
336
|
+
rerender(
|
|
337
|
+
<Section padding={6} paddingInlineStart={0}>
|
|
338
|
+
Content
|
|
339
|
+
</Section>,
|
|
340
|
+
);
|
|
341
|
+
const overridden = classSet(
|
|
342
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
343
|
+
);
|
|
344
|
+
const removed = [...uniform].filter(c => !overridden.has(c));
|
|
345
|
+
const added = [...overridden].filter(c => !uniform.has(c));
|
|
346
|
+
expect(removed.length).toBeGreaterThan(0);
|
|
347
|
+
expect(added.length).toBeGreaterThan(0);
|
|
348
|
+
// The block-axis classes survive the inline-edge override.
|
|
349
|
+
expect(uniform.size - removed.length).toBeGreaterThan(0);
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
it('moves the inline container vars with a per-edge override', () => {
|
|
353
|
+
// Section drives --container-padding-inline-start/end for bleed children.
|
|
354
|
+
// A per-edge override must move only the matching var, so a nested Section
|
|
355
|
+
// or a bleeding Divider compensates against the real padding.
|
|
356
|
+
const {container, rerender} = render(
|
|
357
|
+
<Section padding={6} paddingInlineStart={2}>
|
|
358
|
+
Content
|
|
359
|
+
</Section>,
|
|
360
|
+
);
|
|
361
|
+
const startOverride = classSet(
|
|
362
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
363
|
+
);
|
|
364
|
+
rerender(
|
|
365
|
+
<Section padding={6} paddingInlineEnd={2}>
|
|
366
|
+
Content
|
|
367
|
+
</Section>,
|
|
368
|
+
);
|
|
369
|
+
const endOverride = classSet(
|
|
370
|
+
container.firstElementChild!.firstElementChild as HTMLElement,
|
|
371
|
+
);
|
|
372
|
+
// Overriding opposite edges by the same step must not produce identical
|
|
373
|
+
// output — each edge carries its own padding class and its own var class.
|
|
374
|
+
expect(startOverride).not.toEqual(endOverride);
|
|
375
|
+
});
|
|
179
376
|
});
|
package/src/Section/Section.tsx
CHANGED
|
@@ -21,8 +21,15 @@ import {container} from '../Layout/container.stylex';
|
|
|
21
21
|
import type {SpacingToken} from '../Layout/container.stylex';
|
|
22
22
|
import {
|
|
23
23
|
paddingStyles,
|
|
24
|
+
paddingInlineStyles,
|
|
25
|
+
paddingInlineStartStyles,
|
|
26
|
+
paddingInlineEndStyles,
|
|
24
27
|
paddingBlockStyles,
|
|
28
|
+
paddingBlockStartStyles,
|
|
29
|
+
paddingBlockEndStyles,
|
|
25
30
|
containerPaddingInlineVarStyles,
|
|
31
|
+
containerPaddingInlineStartVarStyles,
|
|
32
|
+
containerPaddingInlineEndVarStyles,
|
|
26
33
|
containerPaddingBlockStartVarStyles,
|
|
27
34
|
containerPaddingBlockEndVarStyles,
|
|
28
35
|
sectionPaddingPropagationStyles,
|
|
@@ -175,6 +182,27 @@ export interface SectionProps extends BaseProps<HTMLElement> {
|
|
|
175
182
|
* @default 4 (16px)
|
|
176
183
|
*/
|
|
177
184
|
padding?: SpacingStep;
|
|
185
|
+
/**
|
|
186
|
+
* Inline (horizontal) padding override. When set, overrides only the inline
|
|
187
|
+
* axis padding while preserving block padding from `padding` or the
|
|
188
|
+
* container theme default.
|
|
189
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
190
|
+
*/
|
|
191
|
+
paddingInline?: SpacingStep;
|
|
192
|
+
/**
|
|
193
|
+
* Inline-start padding override. Logical: the left edge in LTR, the right
|
|
194
|
+
* edge in RTL. Takes precedence over `paddingInline` and `padding` on that
|
|
195
|
+
* edge only; every other edge is left alone.
|
|
196
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
197
|
+
*/
|
|
198
|
+
paddingInlineStart?: SpacingStep;
|
|
199
|
+
/**
|
|
200
|
+
* Inline-end padding override. Logical: the right edge in LTR, the left
|
|
201
|
+
* edge in RTL. Takes precedence over `paddingInline` and `padding` on that
|
|
202
|
+
* edge only; every other edge is left alone.
|
|
203
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
204
|
+
*/
|
|
205
|
+
paddingInlineEnd?: SpacingStep;
|
|
178
206
|
/**
|
|
179
207
|
* Block (vertical) padding override. When set, overrides only the block
|
|
180
208
|
* axis padding while preserving inline padding from `padding` or the
|
|
@@ -182,6 +210,20 @@ export interface SectionProps extends BaseProps<HTMLElement> {
|
|
|
182
210
|
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
183
211
|
*/
|
|
184
212
|
paddingBlock?: SpacingStep;
|
|
213
|
+
/**
|
|
214
|
+
* Block-start (top) padding override. Takes precedence over `paddingBlock`
|
|
215
|
+
* and `padding` on that edge only; the block-end edge and both inline edges
|
|
216
|
+
* are left alone.
|
|
217
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
218
|
+
*/
|
|
219
|
+
paddingBlockStart?: SpacingStep;
|
|
220
|
+
/**
|
|
221
|
+
* Block-end (bottom) padding override. Takes precedence over `paddingBlock`
|
|
222
|
+
* and `padding` on that edge only; the block-start edge and both inline
|
|
223
|
+
* edges are left alone.
|
|
224
|
+
* Accepts numeric spacing steps: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10.
|
|
225
|
+
*/
|
|
226
|
+
paddingBlockEnd?: SpacingStep;
|
|
185
227
|
}
|
|
186
228
|
|
|
187
229
|
/**
|
|
@@ -211,7 +253,12 @@ export function Section({
|
|
|
211
253
|
children,
|
|
212
254
|
dividers,
|
|
213
255
|
padding,
|
|
256
|
+
paddingInline,
|
|
257
|
+
paddingInlineStart,
|
|
258
|
+
paddingInlineEnd,
|
|
214
259
|
paddingBlock,
|
|
260
|
+
paddingBlockStart,
|
|
261
|
+
paddingBlockEnd,
|
|
215
262
|
xstyle,
|
|
216
263
|
className,
|
|
217
264
|
style,
|
|
@@ -275,11 +322,33 @@ export function Section({
|
|
|
275
322
|
containerPaddingBlockEndVarStyles[effectivePadding],
|
|
276
323
|
!useThemeDefault &&
|
|
277
324
|
sectionPaddingPropagationStyles[effectivePadding],
|
|
325
|
+
paddingInline != null && paddingInlineStyles[paddingInline],
|
|
326
|
+
paddingInline != null &&
|
|
327
|
+
containerPaddingInlineVarStyles[paddingInline],
|
|
278
328
|
paddingBlock != null && paddingBlockStyles[paddingBlock],
|
|
279
329
|
paddingBlock != null &&
|
|
280
330
|
containerPaddingBlockStartVarStyles[paddingBlock],
|
|
281
331
|
paddingBlock != null &&
|
|
282
332
|
containerPaddingBlockEndVarStyles[paddingBlock],
|
|
333
|
+
// Per-edge overrides come last so they win over `paddingBlock`
|
|
334
|
+
// and `padding` on their own edge. The matching container var is
|
|
335
|
+
// updated alongside so bleed children (Table, Divider, nested
|
|
336
|
+
// Section) compensate against the padding actually applied.
|
|
337
|
+
paddingBlockStart != null &&
|
|
338
|
+
paddingBlockStartStyles[paddingBlockStart],
|
|
339
|
+
paddingBlockStart != null &&
|
|
340
|
+
containerPaddingBlockStartVarStyles[paddingBlockStart],
|
|
341
|
+
paddingBlockEnd != null && paddingBlockEndStyles[paddingBlockEnd],
|
|
342
|
+
paddingBlockEnd != null &&
|
|
343
|
+
containerPaddingBlockEndVarStyles[paddingBlockEnd],
|
|
344
|
+
paddingInlineStart != null &&
|
|
345
|
+
paddingInlineStartStyles[paddingInlineStart],
|
|
346
|
+
paddingInlineStart != null &&
|
|
347
|
+
containerPaddingInlineStartVarStyles[paddingInlineStart],
|
|
348
|
+
paddingInlineEnd != null &&
|
|
349
|
+
paddingInlineEndStyles[paddingInlineEnd],
|
|
350
|
+
paddingInlineEnd != null &&
|
|
351
|
+
containerPaddingInlineEndVarStyles[paddingInlineEnd],
|
|
283
352
|
variantStyles[variant],
|
|
284
353
|
dividers?.includes('top') && dividerStyles.top,
|
|
285
354
|
dividers?.includes('bottom') && dividerStyles.bottom,
|
|
@@ -199,6 +199,37 @@ describe('SegmentedControl', () => {
|
|
|
199
199
|
expect(screen.queryByText('Grid view')).not.toBeInTheDocument();
|
|
200
200
|
});
|
|
201
201
|
|
|
202
|
+
it('fill items can shrink and truncate long labels', () => {
|
|
203
|
+
render(
|
|
204
|
+
<SegmentedControl
|
|
205
|
+
value="grid"
|
|
206
|
+
onChange={() => {}}
|
|
207
|
+
label="View mode"
|
|
208
|
+
layout="fill">
|
|
209
|
+
<SegmentedControlItem
|
|
210
|
+
value="grid"
|
|
211
|
+
label="A very long segment label that should truncate"
|
|
212
|
+
/>
|
|
213
|
+
<SegmentedControlItem value="list" label="List" />
|
|
214
|
+
<SegmentedControlItem value="table" label="Table" />
|
|
215
|
+
</SegmentedControl>,
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const button = screen.getByRole('radio', {name: /very long/});
|
|
219
|
+
const label = screen.getByText(
|
|
220
|
+
'A very long segment label that should truncate',
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
// The button (flex child) must allow shrinking below content size
|
|
224
|
+
const buttonStyle = getComputedStyle(button);
|
|
225
|
+
expect(buttonStyle.minWidth).toBe('0');
|
|
226
|
+
|
|
227
|
+
// The label span must set up text truncation
|
|
228
|
+
const labelStyle = getComputedStyle(label);
|
|
229
|
+
expect(labelStyle.overflow).toBe('hidden');
|
|
230
|
+
expect(labelStyle.textOverflow).toBe('ellipsis');
|
|
231
|
+
});
|
|
232
|
+
|
|
202
233
|
it('uses roving tabindex — selected item has tabIndex 0, others -1', () => {
|
|
203
234
|
render(
|
|
204
235
|
<SegmentedControl value="list" onChange={() => {}} label="View mode">
|
|
@@ -82,7 +82,11 @@ const styles = stylex.create({
|
|
|
82
82
|
lineHeight: typeScaleVars['--text-label-leading'],
|
|
83
83
|
fontWeight: fontWeightVars['--font-weight-medium'],
|
|
84
84
|
color: colorVars['--color-text-secondary'],
|
|
85
|
-
cursor:
|
|
85
|
+
cursor: {
|
|
86
|
+
default: 'pointer',
|
|
87
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
88
|
+
},
|
|
89
|
+
whiteSpace: 'nowrap',
|
|
86
90
|
transitionProperty: 'color, background-color, box-shadow',
|
|
87
91
|
transitionDuration: durationVars['--duration-fast'],
|
|
88
92
|
transitionTimingFunction: easeVars['--ease-standard'],
|
|
@@ -90,7 +94,7 @@ const styles = stylex.create({
|
|
|
90
94
|
hover: {
|
|
91
95
|
backgroundColor: {
|
|
92
96
|
default: null,
|
|
93
|
-
':hover': {
|
|
97
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))': {
|
|
94
98
|
'@media (hover: hover)': colorVars['--color-overlay-hover'],
|
|
95
99
|
},
|
|
96
100
|
},
|
|
@@ -125,6 +129,7 @@ const styles = stylex.create({
|
|
|
125
129
|
},
|
|
126
130
|
fill: {
|
|
127
131
|
flex: 1,
|
|
132
|
+
minWidth: 0,
|
|
128
133
|
justifyContent: 'center',
|
|
129
134
|
},
|
|
130
135
|
icon: {
|
|
@@ -133,6 +138,11 @@ const styles = stylex.create({
|
|
|
133
138
|
justifyContent: 'center',
|
|
134
139
|
flexShrink: 0,
|
|
135
140
|
},
|
|
141
|
+
labelText: {
|
|
142
|
+
overflow: 'hidden',
|
|
143
|
+
textOverflow: 'ellipsis',
|
|
144
|
+
minWidth: 0,
|
|
145
|
+
},
|
|
136
146
|
});
|
|
137
147
|
|
|
138
148
|
const CONCENTRIC_RADIUS =
|
|
@@ -244,7 +254,9 @@ export function SegmentedControlItem({
|
|
|
244
254
|
),
|
|
245
255
|
)}>
|
|
246
256
|
{iconElement}
|
|
247
|
-
{!isLabelHidden &&
|
|
257
|
+
{!isLabelHidden && (
|
|
258
|
+
<span {...stylex.props(styles.labelText)}>{label}</span>
|
|
259
|
+
)}
|
|
248
260
|
</button>
|
|
249
261
|
);
|
|
250
262
|
}
|
|
@@ -55,7 +55,10 @@ import {focusOutlineProps} from '../utils/focusOutline.stylex';
|
|
|
55
55
|
const styles = stylex.create({
|
|
56
56
|
interactive: {
|
|
57
57
|
position: 'relative',
|
|
58
|
-
cursor:
|
|
58
|
+
cursor: {
|
|
59
|
+
default: 'pointer',
|
|
60
|
+
':is(:disabled,[aria-disabled="true"])': 'default',
|
|
61
|
+
},
|
|
59
62
|
transitionProperty: 'box-shadow, border-color',
|
|
60
63
|
transitionDuration: durationVars['--duration-fast'],
|
|
61
64
|
transitionTimingFunction: easeVars['--ease-standard'],
|
|
@@ -80,13 +83,13 @@ const styles = stylex.create({
|
|
|
80
83
|
},
|
|
81
84
|
hoverOnPointer: {
|
|
82
85
|
'@media (hover: hover)': {
|
|
83
|
-
':hover::after': {
|
|
86
|
+
':hover:where(:not(:disabled,[aria-disabled="true"]))::after': {
|
|
84
87
|
backgroundColor: colorVars['--color-overlay-hover'],
|
|
85
88
|
},
|
|
86
89
|
},
|
|
87
90
|
},
|
|
88
91
|
disabled: {
|
|
89
|
-
cursor: '
|
|
92
|
+
cursor: 'default',
|
|
90
93
|
opacity: 0.5,
|
|
91
94
|
},
|
|
92
95
|
srOnly: {
|