@astryxdesign/core 0.1.9 → 0.2.0-canary.068bda9
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 +107 -0
- package/dist/Avatar/Avatar.d.ts +42 -3
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +190 -59
- package/dist/Avatar/AvatarStatusDot.d.ts +6 -4
- package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts +7 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +58 -6
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +7 -2
- package/dist/Banner/Banner.js +2 -2
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +11 -4
- package/dist/Breadcrumbs/index.d.ts +1 -0
- package/dist/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/Breadcrumbs/index.js +2 -1
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +6 -4
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +50 -9
- package/dist/Calendar/dayCellUtils.d.ts +4 -4
- package/dist/Calendar/dayCellUtils.js +2 -2
- package/dist/Calendar/styles.d.ts +30 -31
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +30 -31
- package/dist/Card/Card.js +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +22 -12
- package/dist/Chat/ChatComposerInput.js +1 -1
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +3 -1
- package/dist/Chat/ChatLayout.js +4 -4
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +8 -8
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +10 -3
- package/dist/Chat/useTriggerMenu.js +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +6 -6
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +19 -4
- package/dist/Citation/Citation.d.ts +22 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -6
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +16 -10
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +3 -1
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +42 -3
- package/dist/CommandPalette/CommandPaletteItem.js +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +23 -5
- package/dist/ContextMenu/index.d.ts +1 -0
- package/dist/ContextMenu/index.d.ts.map +1 -1
- package/dist/ContextMenu/index.js +3 -1
- package/dist/DateInput/DateInput.d.ts +10 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +33 -19
- package/dist/DateRangeInput/DateRangeInput.d.ts +10 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +23 -20
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +23 -18
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/Divider.d.ts.map +1 -1
- package/dist/Divider/Divider.js +13 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +6 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +22 -5
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +5 -2
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +8 -11
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioGroup.js +3 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +5 -2
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +104 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +435 -0
- package/dist/DropdownMenu/index.d.ts +10 -0
- package/dist/DropdownMenu/index.d.ts.map +1 -1
- package/dist/DropdownMenu/index.js +13 -0
- package/dist/DropdownMenu/menuItemHover.d.ts +24 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -0
- package/dist/DropdownMenu/menuItemHover.js +34 -0
- package/dist/DropdownMenu/menuItemRoles.d.ts +8 -0
- package/dist/DropdownMenu/menuItemRoles.d.ts.map +1 -1
- package/dist/DropdownMenu/menuItemRoles.js +10 -1
- package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -1
- package/dist/DropdownMenu/renderDropdownItems.js +21 -6
- package/dist/Field/Field.d.ts +3 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +4 -1
- package/dist/Field/FieldLabel.d.ts +2 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +9 -5
- package/dist/Field/inputStyles.stylex.d.ts +1 -0
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +1 -0
- package/dist/FieldStatus/FieldStatus.d.ts +10 -0
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +51 -5
- package/dist/FileInput/FileInput.d.ts +10 -2
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +93 -65
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +3 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +10 -4
- package/dist/Icon/Icon.d.ts +15 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +19 -3
- package/dist/Item/Item.d.ts +16 -3
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +31 -6
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +10 -2
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +34 -15
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +6 -3
- package/dist/List/ListItem.d.ts +11 -1
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +2 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +7 -0
- package/dist/MetadataList/MetadataList.d.ts +1 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +4 -2
- package/dist/MultiSelector/MultiSelector.d.ts +9 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +81 -43
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -1
- package/dist/NumberInput/NumberInput.d.ts +10 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +22 -17
- package/dist/Outline/Outline.js +2 -2
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +11 -3
- package/dist/PowerSearch/PowerSearch.d.ts +9 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +2 -0
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +6 -1
- package/dist/RadioList/RadioList.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -5
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +49 -19
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +5 -3
- package/dist/Selector/Selector.d.ts +8 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +66 -17
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +5 -5
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +13 -10
- package/dist/SideNav/SideNavItem.d.ts +1 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +12 -10
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +2 -2
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +87 -34
- package/dist/Spinner/Spinner.d.ts +3 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +11 -2
- package/dist/Switch/Switch.d.ts +8 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +171 -91
- package/dist/TabList/Tab.js +2 -2
- package/dist/TabList/TabList.d.ts +2 -11
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +5 -9
- package/dist/TabList/TabListContext.d.ts +0 -5
- package/dist/TabList/TabListContext.d.ts.map +1 -1
- package/dist/TabList/TabListContext.js +0 -5
- package/dist/TabList/TabMenu.js +1 -1
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +30 -4
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +15 -11
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +37 -27
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +3 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +15 -7
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +29 -23
- package/dist/Table/types.d.ts +32 -0
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Text/Text.d.ts +10 -1
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +25 -2
- package/dist/Text/index.d.ts +2 -2
- package/dist/Text/index.d.ts.map +1 -1
- package/dist/TextArea/TextArea.d.ts +10 -1
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +119 -52
- package/dist/TextInput/TextInput.d.ts +10 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +20 -17
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +51 -45
- package/dist/TimeInput/TimeInput.d.ts +10 -2
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +17 -17
- package/dist/Timestamp/Timestamp.d.ts +31 -3
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +48 -77
- package/dist/Timestamp/formatInstant.d.ts +41 -0
- package/dist/Timestamp/formatInstant.d.ts.map +1 -0
- package/dist/Timestamp/formatInstant.js +177 -0
- package/dist/Timestamp/index.d.ts +1 -0
- package/dist/Timestamp/index.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.d.ts +56 -0
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -0
- package/dist/Timestamp/tooltipEntries.js +163 -0
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +61 -9
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +3 -1
- package/dist/Token/Token.d.ts +34 -4
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +85 -45
- package/dist/Token/TokenLink.d.ts +62 -0
- package/dist/Token/TokenLink.d.ts.map +1 -0
- package/dist/Token/TokenLink.js +76 -0
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.d.ts +9 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +4 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +17 -1
- package/dist/TopNav/TopNavItem.d.ts +3 -1
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +30 -3
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +9 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +8 -6
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +32 -14
- package/dist/Typeahead/BaseTypeahead.d.ts +9 -0
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +22 -11
- package/dist/Typeahead/Typeahead.d.ts +9 -2
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +11 -2
- package/dist/Typeahead/TypeaheadItem.d.ts +1 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +20 -10
- package/dist/astryx.css +114 -35
- package/dist/astryx.umd.js +50 -50
- package/dist/astryx.umd.js.map +4 -4
- package/dist/hooks/containerReveal.pool.stylex.d.ts +281 -0
- package/dist/hooks/containerReveal.pool.stylex.d.ts.map +1 -0
- package/dist/hooks/containerReveal.pool.stylex.js +281 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/isRtlElement.d.ts +18 -0
- package/dist/hooks/isRtlElement.d.ts.map +1 -0
- package/dist/hooks/isRtlElement.js +27 -0
- package/dist/hooks/useAnnounce.d.ts +3 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +39 -1
- package/dist/hooks/useContainerReveal.d.ts +83 -0
- package/dist/hooks/useContainerReveal.d.ts.map +1 -0
- package/dist/hooks/useContainerReveal.js +123 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +52 -11
- package/dist/hooks/useGridFocus.d.ts +6 -1
- package/dist/hooks/useGridFocus.d.ts.map +1 -1
- package/dist/hooks/useGridFocus.js +12 -9
- package/dist/hooks/useHotkeys.d.ts +9 -0
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +9 -0
- package/dist/hooks/useInputStatusIcon.d.ts +38 -0
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -0
- package/dist/hooks/useInputStatusIcon.js +169 -0
- package/dist/hooks/useKeyboardHint.d.ts +1 -1
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +4 -2
- package/dist/hooks/useListFocus.d.ts +39 -1
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +54 -9
- package/dist/i18n/InternationalizationContext.d.ts +1 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +3 -0
- package/dist/i18n/InternationalizationProvider.d.ts +8 -1
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +5 -1
- package/dist/i18n/getLocaleDirection.d.ts +18 -0
- package/dist/i18n/getLocaleDirection.d.ts.map +1 -0
- package/dist/i18n/getLocaleDirection.js +29 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +7 -1
- package/dist/i18n/useDirection.d.ts +2 -0
- package/dist/i18n/useDirection.d.ts.map +1 -0
- package/dist/i18n/useDirection.js +27 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +13 -0
- package/dist/theme/index.d.ts +3 -3
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/types.d.ts +39 -2
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/plainDate.d.ts +17 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +23 -4
- package/dist/utils/rtlStyles.d.ts +24 -0
- package/dist/utils/rtlStyles.d.ts.map +1 -0
- package/dist/utils/rtlStyles.js +27 -0
- package/locales/en.json +120 -0
- package/locales/pseudo.json +90 -0
- package/package.json +7 -2
- package/src/Avatar/Avatar.doc.mjs +50 -3
- package/src/Avatar/Avatar.test.tsx +218 -0
- package/src/Avatar/Avatar.tsx +285 -79
- package/src/Avatar/AvatarStatusDot.doc.mjs +4 -4
- package/src/Avatar/AvatarStatusDot.tsx +6 -4
- package/src/AvatarGroup/AvatarGroup.doc.mjs +2 -0
- package/src/AvatarGroup/AvatarGroup.test.tsx +162 -2
- package/src/AvatarGroup/AvatarGroup.tsx +58 -3
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +5 -2
- package/src/Banner/Banner.tsx +6 -6
- package/src/Breadcrumbs/BreadcrumbItem.tsx +10 -10
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +52 -1
- package/src/Breadcrumbs/index.ts +4 -0
- package/src/Button/Button.doc.mjs +0 -4
- package/src/Button/Button.test.tsx +16 -0
- package/src/Button/Button.tsx +6 -4
- package/src/Calendar/Calendar.test.tsx +170 -20
- package/src/Calendar/Calendar.tsx +73 -16
- package/src/Calendar/dayCellUtils.test.ts +18 -18
- package/src/Calendar/dayCellUtils.ts +2 -2
- package/src/Calendar/styles.ts +33 -39
- package/src/Card/Card.tsx +1 -1
- package/src/Carousel/Carousel.tsx +25 -6
- package/src/Chat/ChatComposer.doc.mjs +2 -2
- package/src/Chat/ChatComposerInput.doc.mjs +1 -1
- package/src/Chat/ChatComposerInput.tsx +2 -2
- package/src/Chat/ChatDictationButton.tsx +7 -1
- package/src/Chat/ChatLayout.tsx +4 -4
- package/src/Chat/ChatMessageBubble.tsx +15 -10
- package/src/Chat/ChatSystemMessage.test.tsx +5 -0
- package/src/Chat/ChatToolCalls.tsx +9 -2
- package/src/Chat/useTriggerMenu.tsx +1 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +6 -0
- package/src/CheckboxInput/CheckboxInput.test.tsx +23 -0
- package/src/CheckboxInput/CheckboxInput.tsx +21 -6
- package/src/CheckboxList/CheckboxList.doc.mjs +6 -0
- package/src/CheckboxList/CheckboxList.test.tsx +94 -3
- package/src/CheckboxList/CheckboxListItem.tsx +17 -10
- package/src/Citation/Citation.doc.mjs +4 -3
- package/src/Citation/Citation.test.tsx +97 -0
- package/src/Citation/Citation.tsx +43 -11
- package/src/CodeBlock/CodeBlock.test.tsx +17 -0
- package/src/CodeBlock/CodeBlock.tsx +38 -11
- package/src/Collapsible/Collapsible.doc.mjs +1 -0
- package/src/Collapsible/Collapsible.test.tsx +7 -0
- package/src/Collapsible/Collapsible.tsx +16 -6
- package/src/CommandPalette/CommandPalette.test.tsx +95 -1
- package/src/CommandPalette/CommandPalette.tsx +41 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -1
- package/src/ContextMenu/ContextMenu.test.tsx +59 -2
- package/src/ContextMenu/ContextMenu.tsx +22 -11
- package/src/ContextMenu/index.ts +5 -0
- package/src/DateInput/DateInput.doc.mjs +25 -0
- package/src/DateInput/DateInput.test.tsx +230 -0
- package/src/DateInput/DateInput.tsx +51 -29
- package/src/DateRangeInput/DateRangeInput.doc.mjs +16 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +140 -0
- package/src/DateRangeInput/DateRangeInput.tsx +42 -30
- package/src/DateTimeInput/DateTimeInput.doc.mjs +22 -1
- package/src/DateTimeInput/DateTimeInput.test.tsx +112 -0
- package/src/DateTimeInput/DateTimeInput.tsx +44 -39
- package/src/Divider/Divider.test.tsx +32 -8
- package/src/Divider/Divider.tsx +14 -1
- package/src/DropdownMenu/DropdownMenu.test.tsx +60 -0
- package/src/DropdownMenu/DropdownMenu.tsx +31 -12
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuItem.tsx +9 -3
- package/src/DropdownMenu/DropdownMenuRadioGroup.doc.mjs +4 -12
- package/src/DropdownMenu/DropdownMenuRadioGroup.tsx +9 -10
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +9 -3
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +20 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +88 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +663 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +561 -0
- package/src/DropdownMenu/index.ts +16 -0
- package/src/DropdownMenu/menuItemHover.ts +40 -0
- package/src/DropdownMenu/menuItemRoles.ts +9 -0
- package/src/DropdownMenu/renderDropdownItems.tsx +29 -15
- package/src/Field/Field.doc.mjs +4 -0
- package/src/Field/Field.tsx +14 -9
- package/src/Field/FieldLabel.test.tsx +25 -0
- package/src/Field/FieldLabel.tsx +12 -3
- package/src/Field/inputStyles.stylex.ts +2 -0
- package/src/FieldStatus/FieldStatus.doc.mjs +1 -0
- package/src/FieldStatus/FieldStatus.test.tsx +133 -0
- package/src/FieldStatus/FieldStatus.tsx +61 -4
- package/src/FileInput/FileInput.doc.mjs +23 -2
- package/src/FileInput/FileInput.test.tsx +104 -13
- package/src/FileInput/FileInput.tsx +106 -79
- package/src/Heading/Heading.tsx +2 -1
- package/src/HoverCard/useHoverCard.tsx +15 -3
- package/src/Icon/Icon.doc.mjs +13 -0
- package/src/Icon/Icon.test.tsx +89 -0
- package/src/Icon/Icon.tsx +51 -3
- package/src/Item/Item.doc.mjs +5 -0
- package/src/Item/Item.test.tsx +88 -0
- package/src/Item/Item.tsx +57 -11
- package/src/Layer/layerAnimations.stylex.ts +23 -0
- package/src/Lightbox/Lightbox.test.tsx +33 -0
- package/src/Lightbox/Lightbox.tsx +30 -10
- package/src/List/List.test.tsx +17 -29
- package/src/List/List.tsx +6 -1
- package/src/List/ListItem.doc.mjs +12 -0
- package/src/List/ListItem.tsx +13 -0
- package/src/Markdown/Markdown.test.tsx +21 -0
- package/src/Markdown/Markdown.tsx +4 -0
- package/src/MetadataList/MetadataList.test.tsx +24 -0
- package/src/MetadataList/MetadataList.tsx +6 -2
- package/src/MultiSelector/MultiSelector.doc.mjs +20 -0
- package/src/MultiSelector/MultiSelector.test.tsx +402 -0
- package/src/MultiSelector/MultiSelector.tsx +126 -64
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -1
- package/src/NumberInput/NumberInput.doc.mjs +21 -0
- package/src/NumberInput/NumberInput.test.tsx +71 -0
- package/src/NumberInput/NumberInput.tsx +35 -26
- package/src/Outline/Outline.test.tsx +12 -12
- package/src/Outline/Outline.tsx +2 -2
- package/src/Pagination/Pagination.tsx +11 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +15 -0
- package/src/PowerSearch/PowerSearch.test.tsx +23 -0
- package/src/PowerSearch/PowerSearch.tsx +10 -1
- package/src/ProgressBar/ProgressBar.test.tsx +34 -0
- package/src/ProgressBar/ProgressBar.tsx +16 -1
- package/src/RadioList/RadioList.doc.mjs +6 -0
- package/src/RadioList/RadioList.test.tsx +26 -4
- package/src/RadioList/RadioList.tsx +2 -2
- package/src/RadioList/RadioListItem.tsx +12 -5
- package/src/Resizable/ResizeHandle.test.tsx +94 -0
- package/src/Resizable/ResizeHandle.tsx +70 -20
- package/src/SegmentedControl/SegmentedControl.test.tsx +28 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +22 -2
- package/src/Selector/Selector.doc.mjs +15 -0
- package/src/Selector/Selector.test.tsx +370 -0
- package/src/Selector/Selector.tsx +88 -20
- package/src/SideNav/SideNav.tsx +1 -8
- package/src/SideNav/SideNavCollapseButton.tsx +9 -7
- package/src/SideNav/SideNavItem.tsx +5 -3
- package/src/Skeleton/Skeleton.test.tsx +16 -0
- package/src/Skeleton/Skeleton.tsx +13 -1
- package/src/Slider/Slider.doc.mjs +6 -0
- package/src/Slider/Slider.test.tsx +240 -12
- package/src/Slider/Slider.tsx +96 -23
- package/src/Spinner/Spinner.test.tsx +10 -8
- package/src/Spinner/Spinner.tsx +15 -5
- package/src/Switch/Switch.doc.mjs +142 -42
- package/src/Switch/Switch.test.tsx +111 -0
- package/src/Switch/Switch.tsx +149 -32
- package/src/TabList/Tab.tsx +2 -2
- package/src/TabList/TabList.doc.mjs +0 -6
- package/src/TabList/TabList.test.tsx +3 -15
- package/src/TabList/TabList.tsx +6 -17
- package/src/TabList/TabListContext.ts +0 -6
- package/src/TabList/TabMenu.tsx +2 -2
- package/src/Table/BaseTable.tsx +34 -2
- package/src/Table/Table.doc.mjs +11 -0
- package/src/Table/Table.test.tsx +85 -0
- package/src/Table/TableCell.tsx +3 -3
- package/src/Table/TableHeaderCell.tsx +3 -3
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +9 -6
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +19 -0
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +27 -18
- package/src/Table/plugins/selection/useTableSelection.test.tsx +61 -3
- package/src/Table/plugins/selection/useTableSelection.tsx +3 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +38 -9
- package/src/Table/plugins/tree/useTableTreeData.tsx +17 -13
- package/src/Table/types.ts +33 -0
- package/src/Table/useTableRowStatus.doc.mjs +1 -1
- package/src/Text/Heading.doc.mjs +3 -3
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/Text.test.tsx +42 -0
- package/src/Text/Text.tsx +25 -1
- package/src/Text/index.ts +2 -6
- package/src/TextArea/TextArea.doc.mjs +23 -2
- package/src/TextArea/TextArea.test.tsx +132 -4
- package/src/TextArea/TextArea.tsx +161 -67
- package/src/TextInput/TextInput.doc.mjs +21 -0
- package/src/TextInput/TextInput.test.tsx +150 -0
- package/src/TextInput/TextInput.tsx +28 -25
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -1
- package/src/Thumbnail/Thumbnail.test.tsx +24 -1
- package/src/Thumbnail/Thumbnail.tsx +28 -35
- package/src/TimeInput/TimeInput.doc.mjs +21 -0
- package/src/TimeInput/TimeInput.test.tsx +23 -0
- package/src/TimeInput/TimeInput.tsx +24 -25
- package/src/Timestamp/Timestamp.doc.mjs +32 -6
- package/src/Timestamp/Timestamp.test.tsx +371 -0
- package/src/Timestamp/Timestamp.tsx +96 -93
- package/src/Timestamp/formatInstant.ts +218 -0
- package/src/Timestamp/index.ts +4 -0
- package/src/Timestamp/tooltipEntries.test.ts +552 -0
- package/src/Timestamp/tooltipEntries.ts +210 -0
- package/src/Toast/ToastViewport.test.tsx +218 -8
- package/src/Toast/ToastViewport.tsx +71 -12
- package/src/ToggleButton/ToggleButton.test.tsx +24 -0
- package/src/ToggleButton/ToggleButton.tsx +19 -1
- package/src/Token/Token.test.tsx +166 -15
- package/src/Token/Token.tsx +104 -47
- package/src/Token/TokenLink.tsx +107 -0
- package/src/Token/index.ts +1 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +23 -1
- package/src/Tokenizer/Tokenizer.test.tsx +23 -0
- package/src/Tokenizer/Tokenizer.tsx +14 -2
- package/src/Tooltip/Tooltip.test.tsx +46 -0
- package/src/Tooltip/useTooltip.tsx +20 -0
- package/src/TopNav/TopNav.test.tsx +93 -2
- package/src/TopNav/TopNavItem.doc.mjs +3 -3
- package/src/TopNav/TopNavItem.tsx +35 -6
- package/src/TopNav/TopNavMegaMenu.tsx +26 -2
- package/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs +1 -1
- package/src/TreeList/TreeList.doc.mjs +6 -0
- package/src/TreeList/TreeList.test.tsx +50 -10
- package/src/TreeList/TreeList.tsx +5 -0
- package/src/TreeList/TreeListBranches.tsx +8 -6
- package/src/TreeList/TreeListItem.tsx +33 -11
- package/src/Typeahead/BaseTypeahead.tsx +42 -15
- package/src/Typeahead/Typeahead.doc.mjs +13 -0
- package/src/Typeahead/Typeahead.test.tsx +112 -0
- package/src/Typeahead/Typeahead.tsx +17 -1
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/__tests__/babelPluginAddExtensions.test.ts +190 -0
- package/src/__tests__/forcedColors.ts +60 -0
- package/src/__tests__/inputWidthContract.test.tsx +62 -0
- package/src/doc-mjs.d.ts +19 -0
- package/src/hooks/containerReveal.pool.stylex.ts +464 -0
- package/src/hooks/index.ts +13 -0
- package/src/hooks/isRtlElement.ts +27 -0
- package/src/hooks/useAnnounce.test.tsx +75 -2
- package/src/hooks/useAnnounce.ts +47 -1
- package/src/hooks/useContainerReveal.test.tsx +116 -0
- package/src/hooks/useContainerReveal.ts +180 -0
- package/src/hooks/useFocusTrap.test.tsx +104 -0
- package/src/hooks/useFocusTrap.ts +61 -12
- package/src/hooks/useGridFocus.doc.mjs +3 -3
- package/src/hooks/useGridFocus.test.tsx +41 -0
- package/src/hooks/useGridFocus.ts +21 -10
- package/src/hooks/useHotkeys.ts +9 -0
- package/src/hooks/useInputStatusIcon.test.tsx +221 -0
- package/src/hooks/useInputStatusIcon.tsx +235 -0
- package/src/hooks/useKeyboardHint.test.tsx +22 -0
- package/src/hooks/useKeyboardHint.tsx +6 -2
- package/src/hooks/useListFocus.doc.mjs +25 -3
- package/src/hooks/useListFocus.test.tsx +153 -1
- package/src/hooks/useListFocus.ts +102 -9
- package/src/i18n/InternationalizationContext.ts +4 -0
- package/src/i18n/InternationalizationProvider.tsx +12 -2
- package/src/i18n/__tests__/getLocaleDirection.test.ts +40 -0
- package/src/i18n/__tests__/useDirection.test.tsx +66 -0
- package/src/i18n/getLocaleDirection.ts +29 -0
- package/src/i18n/index.ts +6 -0
- package/src/i18n/useDirection.ts +29 -0
- package/src/reset.css +0 -26
- package/src/reset.test.ts +60 -0
- package/src/theme/derivedVarRegistry.test.ts +1 -0
- package/src/theme/derivedVarRegistry.ts +6 -0
- package/src/theme/generateThemeRules.test.ts +42 -0
- package/src/theme/index.ts +4 -8
- package/src/theme/types.ts +43 -13
- package/src/utils/index.ts +2 -0
- package/src/utils/plainDate.test.ts +24 -6
- package/src/utils/plainDate.ts +18 -4
- package/src/utils/rtlStyles.ts +27 -0
- package/dist/Thumbnail/thumbnail.markers.stylex.d.ts +0 -9
- package/dist/Thumbnail/thumbnail.markers.stylex.d.ts.map +0 -1
- package/dist/Thumbnail/thumbnail.markers.stylex.js +0 -14
- package/src/Thumbnail/thumbnail.markers.stylex.ts +0 -12
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file containerReveal.pool.stylex.ts
|
|
3
|
+
* @input Uses StyleX, theme tokens
|
|
4
|
+
* @output A fixed pool of scoped markers, each paired with its reveal style
|
|
5
|
+
* blocks (reveal / conceal, each with a layout-preserved variant) compiled
|
|
6
|
+
* against that marker.
|
|
7
|
+
* @position Internal to useContainerReveal.
|
|
8
|
+
*
|
|
9
|
+
* WHY A POOL OF LITERAL BLOCKS: `stylex.when.ancestor(':hover', marker)` is
|
|
10
|
+
* resolved by the StyleX compiler, which welds the marker's class into the
|
|
11
|
+
* emitted selector (`.marker:hover *`). A marker and the styles referencing it
|
|
12
|
+
* are therefore inseparable at build time — the marker cannot be passed as a
|
|
13
|
+
* runtime argument, so the blocks cannot be produced by a loop or a helper and
|
|
14
|
+
* must be written out literally per marker. A single shared marker would leak
|
|
15
|
+
* hover/focus across NESTED reveal containers (an ancestor container's :hover
|
|
16
|
+
* matches a descendant container's revealed content), so useContainerReveal
|
|
17
|
+
* hands each concurrently mounted container a distinct marker from this pool
|
|
18
|
+
* (see the free-list there).
|
|
19
|
+
*
|
|
20
|
+
* The reveal recipe hides content with `position: absolute` (removed from
|
|
21
|
+
* layout flow, so it reserves no space) plus `opacity: 0`. Both keep the
|
|
22
|
+
* content in the accessibility tree and tab order — unlike display/visibility
|
|
23
|
+
* — so it stays reachable by keyboard and assistive tech while hidden.
|
|
24
|
+
*/
|
|
25
|
+
import * as stylex from '@stylexjs/stylex';
|
|
26
|
+
export declare const POOL_SIZE = 6;
|
|
27
|
+
export declare const m0: Readonly<{
|
|
28
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const m1: Readonly<{
|
|
31
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const m2: Readonly<{
|
|
34
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const m3: Readonly<{
|
|
37
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const m4: Readonly<{
|
|
40
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const m5: Readonly<{
|
|
43
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const POOL: readonly [{
|
|
46
|
+
readonly marker: Readonly<{
|
|
47
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
48
|
+
}>;
|
|
49
|
+
readonly reveal: Readonly<{
|
|
50
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
51
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
52
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
53
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
54
|
+
readonly '@media (hover: hover)': 1;
|
|
55
|
+
}>;
|
|
56
|
+
readonly position: stylex.StyleXClassNameFor<"position", "static" | "absolute" | {
|
|
57
|
+
readonly '@media (hover: hover)': "static";
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
readonly revealLayoutPreserved: Readonly<{
|
|
61
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
62
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
63
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
64
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
65
|
+
readonly '@media (hover: hover)': 1;
|
|
66
|
+
}>;
|
|
67
|
+
}>;
|
|
68
|
+
readonly conceal: Readonly<{
|
|
69
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
70
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
71
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
72
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
73
|
+
readonly '@media (hover: hover)': 0;
|
|
74
|
+
}>;
|
|
75
|
+
}>;
|
|
76
|
+
readonly concealLayoutPreserved: Readonly<{
|
|
77
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
78
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
79
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
80
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
81
|
+
readonly '@media (hover: hover)': 0;
|
|
82
|
+
}>;
|
|
83
|
+
}>;
|
|
84
|
+
}, {
|
|
85
|
+
readonly marker: Readonly<{
|
|
86
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
87
|
+
}>;
|
|
88
|
+
readonly reveal: Readonly<{
|
|
89
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
90
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
91
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
92
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
93
|
+
readonly '@media (hover: hover)': 1;
|
|
94
|
+
}>;
|
|
95
|
+
readonly position: stylex.StyleXClassNameFor<"position", "static" | "absolute" | {
|
|
96
|
+
readonly '@media (hover: hover)': "static";
|
|
97
|
+
}>;
|
|
98
|
+
}>;
|
|
99
|
+
readonly revealLayoutPreserved: Readonly<{
|
|
100
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
101
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
102
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
103
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
104
|
+
readonly '@media (hover: hover)': 1;
|
|
105
|
+
}>;
|
|
106
|
+
}>;
|
|
107
|
+
readonly conceal: Readonly<{
|
|
108
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
109
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
110
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
111
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
112
|
+
readonly '@media (hover: hover)': 0;
|
|
113
|
+
}>;
|
|
114
|
+
}>;
|
|
115
|
+
readonly concealLayoutPreserved: Readonly<{
|
|
116
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
117
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
118
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
119
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
120
|
+
readonly '@media (hover: hover)': 0;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
123
|
+
}, {
|
|
124
|
+
readonly marker: Readonly<{
|
|
125
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
126
|
+
}>;
|
|
127
|
+
readonly reveal: Readonly<{
|
|
128
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
129
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
130
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
131
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
132
|
+
readonly '@media (hover: hover)': 1;
|
|
133
|
+
}>;
|
|
134
|
+
readonly position: stylex.StyleXClassNameFor<"position", "static" | "absolute" | {
|
|
135
|
+
readonly '@media (hover: hover)': "static";
|
|
136
|
+
}>;
|
|
137
|
+
}>;
|
|
138
|
+
readonly revealLayoutPreserved: Readonly<{
|
|
139
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
140
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
141
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
142
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
143
|
+
readonly '@media (hover: hover)': 1;
|
|
144
|
+
}>;
|
|
145
|
+
}>;
|
|
146
|
+
readonly conceal: Readonly<{
|
|
147
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
148
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
149
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
150
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
151
|
+
readonly '@media (hover: hover)': 0;
|
|
152
|
+
}>;
|
|
153
|
+
}>;
|
|
154
|
+
readonly concealLayoutPreserved: Readonly<{
|
|
155
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
156
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
157
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
158
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
159
|
+
readonly '@media (hover: hover)': 0;
|
|
160
|
+
}>;
|
|
161
|
+
}>;
|
|
162
|
+
}, {
|
|
163
|
+
readonly marker: Readonly<{
|
|
164
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
165
|
+
}>;
|
|
166
|
+
readonly reveal: Readonly<{
|
|
167
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
168
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
169
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
170
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
171
|
+
readonly '@media (hover: hover)': 1;
|
|
172
|
+
}>;
|
|
173
|
+
readonly position: stylex.StyleXClassNameFor<"position", "static" | "absolute" | {
|
|
174
|
+
readonly '@media (hover: hover)': "static";
|
|
175
|
+
}>;
|
|
176
|
+
}>;
|
|
177
|
+
readonly revealLayoutPreserved: Readonly<{
|
|
178
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
179
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
180
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
181
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
182
|
+
readonly '@media (hover: hover)': 1;
|
|
183
|
+
}>;
|
|
184
|
+
}>;
|
|
185
|
+
readonly conceal: Readonly<{
|
|
186
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
187
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
188
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
189
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
190
|
+
readonly '@media (hover: hover)': 0;
|
|
191
|
+
}>;
|
|
192
|
+
}>;
|
|
193
|
+
readonly concealLayoutPreserved: Readonly<{
|
|
194
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
195
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
196
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
197
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
198
|
+
readonly '@media (hover: hover)': 0;
|
|
199
|
+
}>;
|
|
200
|
+
}>;
|
|
201
|
+
}, {
|
|
202
|
+
readonly marker: Readonly<{
|
|
203
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
204
|
+
}>;
|
|
205
|
+
readonly reveal: Readonly<{
|
|
206
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
207
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
208
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
209
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
210
|
+
readonly '@media (hover: hover)': 1;
|
|
211
|
+
}>;
|
|
212
|
+
readonly position: stylex.StyleXClassNameFor<"position", "static" | "absolute" | {
|
|
213
|
+
readonly '@media (hover: hover)': "static";
|
|
214
|
+
}>;
|
|
215
|
+
}>;
|
|
216
|
+
readonly revealLayoutPreserved: Readonly<{
|
|
217
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
218
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
219
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
220
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
221
|
+
readonly '@media (hover: hover)': 1;
|
|
222
|
+
}>;
|
|
223
|
+
}>;
|
|
224
|
+
readonly conceal: Readonly<{
|
|
225
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
226
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
227
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
228
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
229
|
+
readonly '@media (hover: hover)': 0;
|
|
230
|
+
}>;
|
|
231
|
+
}>;
|
|
232
|
+
readonly concealLayoutPreserved: Readonly<{
|
|
233
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
234
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
235
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
236
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
237
|
+
readonly '@media (hover: hover)': 0;
|
|
238
|
+
}>;
|
|
239
|
+
}>;
|
|
240
|
+
}, {
|
|
241
|
+
readonly marker: Readonly<{
|
|
242
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
243
|
+
}>;
|
|
244
|
+
readonly reveal: Readonly<{
|
|
245
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
246
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
247
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
248
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
249
|
+
readonly '@media (hover: hover)': 1;
|
|
250
|
+
}>;
|
|
251
|
+
readonly position: stylex.StyleXClassNameFor<"position", "static" | "absolute" | {
|
|
252
|
+
readonly '@media (hover: hover)': "static";
|
|
253
|
+
}>;
|
|
254
|
+
}>;
|
|
255
|
+
readonly revealLayoutPreserved: Readonly<{
|
|
256
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
257
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
258
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
259
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 0 | 1 | {
|
|
260
|
+
readonly '@media (hover: hover)': 1;
|
|
261
|
+
}>;
|
|
262
|
+
}>;
|
|
263
|
+
readonly conceal: Readonly<{
|
|
264
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
265
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
266
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
267
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
268
|
+
readonly '@media (hover: hover)': 0;
|
|
269
|
+
}>;
|
|
270
|
+
}>;
|
|
271
|
+
readonly concealLayoutPreserved: Readonly<{
|
|
272
|
+
readonly transitionProperty: stylex.StyleXClassNameFor<"transitionProperty", "opacity">;
|
|
273
|
+
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "175ms" | "0s">;
|
|
274
|
+
readonly transitionTimingFunction: stylex.StyleXClassNameFor<"transitionTimingFunction", "cubic-bezier(0.24, 1, 0.4, 1)">;
|
|
275
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1 | {
|
|
276
|
+
readonly '@media (hover: hover)': 0;
|
|
277
|
+
}>;
|
|
278
|
+
}>;
|
|
279
|
+
}];
|
|
280
|
+
export type RevealSlot = (typeof POOL)[number];
|
|
281
|
+
//# sourceMappingURL=containerReveal.pool.stylex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerReveal.pool.stylex.d.ts","sourceRoot":"","sources":["../../src/hooks/containerReveal.pool.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAG3C,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B,eAAO,MAAM,EAAE;;EAAwB,CAAC;AAsExC,eAAO,MAAM,EAAE;;EAAwB,CAAC;AAsExC,eAAO,MAAM,EAAE;;EAAwB,CAAC;AAsExC,eAAO,MAAM,EAAE;;EAAwB,CAAC;AAsExC,eAAO,MAAM,EAAE;;EAAwB,CAAC;AAsExC,eAAO,MAAM,EAAE;;EAAwB,CAAC;AAwExC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOP,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file containerReveal.pool.stylex.ts
|
|
5
|
+
* @input Uses StyleX, theme tokens
|
|
6
|
+
* @output A fixed pool of scoped markers, each paired with its reveal style
|
|
7
|
+
* blocks (reveal / conceal, each with a layout-preserved variant) compiled
|
|
8
|
+
* against that marker.
|
|
9
|
+
* @position Internal to useContainerReveal.
|
|
10
|
+
*
|
|
11
|
+
* WHY A POOL OF LITERAL BLOCKS: `stylex.when.ancestor(':hover', marker)` is
|
|
12
|
+
* resolved by the StyleX compiler, which welds the marker's class into the
|
|
13
|
+
* emitted selector (`.marker:hover *`). A marker and the styles referencing it
|
|
14
|
+
* are therefore inseparable at build time — the marker cannot be passed as a
|
|
15
|
+
* runtime argument, so the blocks cannot be produced by a loop or a helper and
|
|
16
|
+
* must be written out literally per marker. A single shared marker would leak
|
|
17
|
+
* hover/focus across NESTED reveal containers (an ancestor container's :hover
|
|
18
|
+
* matches a descendant container's revealed content), so useContainerReveal
|
|
19
|
+
* hands each concurrently mounted container a distinct marker from this pool
|
|
20
|
+
* (see the free-list there).
|
|
21
|
+
*
|
|
22
|
+
* The reveal recipe hides content with `position: absolute` (removed from
|
|
23
|
+
* layout flow, so it reserves no space) plus `opacity: 0`. Both keep the
|
|
24
|
+
* content in the accessibility tree and tab order — unlike display/visibility
|
|
25
|
+
* — so it stays reachable by keyboard and assistive tech while hidden.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import * as stylex from '@stylexjs/stylex';
|
|
29
|
+
import "../theme/tokens.stylex.js";
|
|
30
|
+
import { durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
31
|
+
export const POOL_SIZE = 6;
|
|
32
|
+
export const m0 = {
|
|
33
|
+
x177fznd: "x177fznd",
|
|
34
|
+
$$css: true
|
|
35
|
+
};
|
|
36
|
+
const s0 = {
|
|
37
|
+
reveal: {
|
|
38
|
+
k1ekBW: "x19991ni",
|
|
39
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
40
|
+
kAMwcw: "xlr8y92",
|
|
41
|
+
kSiTet: "xg01cxk xz63v9m x1ceiq2s xhva3ql",
|
|
42
|
+
kVAEAm: "x10l6tqk xd2i8i8 xw895rg x4k19zs",
|
|
43
|
+
$$css: true
|
|
44
|
+
},
|
|
45
|
+
revealLayoutPreserved: {
|
|
46
|
+
k1ekBW: "x19991ni",
|
|
47
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
48
|
+
kAMwcw: "xlr8y92",
|
|
49
|
+
kSiTet: "xg01cxk xz63v9m x1ceiq2s xhva3ql",
|
|
50
|
+
$$css: true
|
|
51
|
+
},
|
|
52
|
+
conceal: {
|
|
53
|
+
k1ekBW: "x19991ni",
|
|
54
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
55
|
+
kAMwcw: "xlr8y92",
|
|
56
|
+
kSiTet: "x1hc1fzr x1d23w33",
|
|
57
|
+
$$css: true
|
|
58
|
+
},
|
|
59
|
+
concealLayoutPreserved: {
|
|
60
|
+
k1ekBW: "x19991ni",
|
|
61
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
62
|
+
kAMwcw: "xlr8y92",
|
|
63
|
+
kSiTet: "x1hc1fzr x1d23w33",
|
|
64
|
+
$$css: true
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export const m1 = {
|
|
68
|
+
x1e36hu2: "x1e36hu2",
|
|
69
|
+
$$css: true
|
|
70
|
+
};
|
|
71
|
+
const s1 = {
|
|
72
|
+
reveal: {
|
|
73
|
+
k1ekBW: "x19991ni",
|
|
74
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
75
|
+
kAMwcw: "xlr8y92",
|
|
76
|
+
kSiTet: "xg01cxk x7g73g2 x8e9lel xhva3ql",
|
|
77
|
+
kVAEAm: "x10l6tqk x13sqjsa xxj8d0r x4k19zs",
|
|
78
|
+
$$css: true
|
|
79
|
+
},
|
|
80
|
+
revealLayoutPreserved: {
|
|
81
|
+
k1ekBW: "x19991ni",
|
|
82
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
83
|
+
kAMwcw: "xlr8y92",
|
|
84
|
+
kSiTet: "xg01cxk x7g73g2 x8e9lel xhva3ql",
|
|
85
|
+
$$css: true
|
|
86
|
+
},
|
|
87
|
+
conceal: {
|
|
88
|
+
k1ekBW: "x19991ni",
|
|
89
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
90
|
+
kAMwcw: "xlr8y92",
|
|
91
|
+
kSiTet: "x1hc1fzr x19f70rm",
|
|
92
|
+
$$css: true
|
|
93
|
+
},
|
|
94
|
+
concealLayoutPreserved: {
|
|
95
|
+
k1ekBW: "x19991ni",
|
|
96
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
97
|
+
kAMwcw: "xlr8y92",
|
|
98
|
+
kSiTet: "x1hc1fzr x19f70rm",
|
|
99
|
+
$$css: true
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
export const m2 = {
|
|
103
|
+
x10zkftw: "x10zkftw",
|
|
104
|
+
$$css: true
|
|
105
|
+
};
|
|
106
|
+
const s2 = {
|
|
107
|
+
reveal: {
|
|
108
|
+
k1ekBW: "x19991ni",
|
|
109
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
110
|
+
kAMwcw: "xlr8y92",
|
|
111
|
+
kSiTet: "xg01cxk xe0m1oz xtpmopf xhva3ql",
|
|
112
|
+
kVAEAm: "x10l6tqk x1k2a1sm xs5no71 x4k19zs",
|
|
113
|
+
$$css: true
|
|
114
|
+
},
|
|
115
|
+
revealLayoutPreserved: {
|
|
116
|
+
k1ekBW: "x19991ni",
|
|
117
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
118
|
+
kAMwcw: "xlr8y92",
|
|
119
|
+
kSiTet: "xg01cxk xe0m1oz xtpmopf xhva3ql",
|
|
120
|
+
$$css: true
|
|
121
|
+
},
|
|
122
|
+
conceal: {
|
|
123
|
+
k1ekBW: "x19991ni",
|
|
124
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
125
|
+
kAMwcw: "xlr8y92",
|
|
126
|
+
kSiTet: "x1hc1fzr xramsae",
|
|
127
|
+
$$css: true
|
|
128
|
+
},
|
|
129
|
+
concealLayoutPreserved: {
|
|
130
|
+
k1ekBW: "x19991ni",
|
|
131
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
132
|
+
kAMwcw: "xlr8y92",
|
|
133
|
+
kSiTet: "x1hc1fzr xramsae",
|
|
134
|
+
$$css: true
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
export const m3 = {
|
|
138
|
+
xbjq1vy: "xbjq1vy",
|
|
139
|
+
$$css: true
|
|
140
|
+
};
|
|
141
|
+
const s3 = {
|
|
142
|
+
reveal: {
|
|
143
|
+
k1ekBW: "x19991ni",
|
|
144
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
145
|
+
kAMwcw: "xlr8y92",
|
|
146
|
+
kSiTet: "xg01cxk xnsjgr4 x1y0vk26 xhva3ql",
|
|
147
|
+
kVAEAm: "x10l6tqk x1cuf62g x1qy2sty x4k19zs",
|
|
148
|
+
$$css: true
|
|
149
|
+
},
|
|
150
|
+
revealLayoutPreserved: {
|
|
151
|
+
k1ekBW: "x19991ni",
|
|
152
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
153
|
+
kAMwcw: "xlr8y92",
|
|
154
|
+
kSiTet: "xg01cxk xnsjgr4 x1y0vk26 xhva3ql",
|
|
155
|
+
$$css: true
|
|
156
|
+
},
|
|
157
|
+
conceal: {
|
|
158
|
+
k1ekBW: "x19991ni",
|
|
159
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
160
|
+
kAMwcw: "xlr8y92",
|
|
161
|
+
kSiTet: "x1hc1fzr x177ftvf",
|
|
162
|
+
$$css: true
|
|
163
|
+
},
|
|
164
|
+
concealLayoutPreserved: {
|
|
165
|
+
k1ekBW: "x19991ni",
|
|
166
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
167
|
+
kAMwcw: "xlr8y92",
|
|
168
|
+
kSiTet: "x1hc1fzr x177ftvf",
|
|
169
|
+
$$css: true
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
export const m4 = {
|
|
173
|
+
x3z7t8n: "x3z7t8n",
|
|
174
|
+
$$css: true
|
|
175
|
+
};
|
|
176
|
+
const s4 = {
|
|
177
|
+
reveal: {
|
|
178
|
+
k1ekBW: "x19991ni",
|
|
179
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
180
|
+
kAMwcw: "xlr8y92",
|
|
181
|
+
kSiTet: "xg01cxk x1qps2i7 x1a7n03g xhva3ql",
|
|
182
|
+
kVAEAm: "x10l6tqk xeilikp x1xz04m3 x4k19zs",
|
|
183
|
+
$$css: true
|
|
184
|
+
},
|
|
185
|
+
revealLayoutPreserved: {
|
|
186
|
+
k1ekBW: "x19991ni",
|
|
187
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
188
|
+
kAMwcw: "xlr8y92",
|
|
189
|
+
kSiTet: "xg01cxk x1qps2i7 x1a7n03g xhva3ql",
|
|
190
|
+
$$css: true
|
|
191
|
+
},
|
|
192
|
+
conceal: {
|
|
193
|
+
k1ekBW: "x19991ni",
|
|
194
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
195
|
+
kAMwcw: "xlr8y92",
|
|
196
|
+
kSiTet: "x1hc1fzr x1k1siky",
|
|
197
|
+
$$css: true
|
|
198
|
+
},
|
|
199
|
+
concealLayoutPreserved: {
|
|
200
|
+
k1ekBW: "x19991ni",
|
|
201
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
202
|
+
kAMwcw: "xlr8y92",
|
|
203
|
+
kSiTet: "x1hc1fzr x1k1siky",
|
|
204
|
+
$$css: true
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
export const m5 = {
|
|
208
|
+
x6dglqq: "x6dglqq",
|
|
209
|
+
$$css: true
|
|
210
|
+
};
|
|
211
|
+
const s5 = {
|
|
212
|
+
reveal: {
|
|
213
|
+
k1ekBW: "x19991ni",
|
|
214
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
215
|
+
kAMwcw: "xlr8y92",
|
|
216
|
+
kSiTet: "xg01cxk x52nu6g xt179ik xhva3ql",
|
|
217
|
+
kVAEAm: "x10l6tqk x8j1s1q x8gw32m x4k19zs",
|
|
218
|
+
$$css: true
|
|
219
|
+
},
|
|
220
|
+
revealLayoutPreserved: {
|
|
221
|
+
k1ekBW: "x19991ni",
|
|
222
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
223
|
+
kAMwcw: "xlr8y92",
|
|
224
|
+
kSiTet: "xg01cxk x52nu6g xt179ik xhva3ql",
|
|
225
|
+
$$css: true
|
|
226
|
+
},
|
|
227
|
+
conceal: {
|
|
228
|
+
k1ekBW: "x19991ni",
|
|
229
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
230
|
+
kAMwcw: "xlr8y92",
|
|
231
|
+
kSiTet: "x1hc1fzr xenj0cg",
|
|
232
|
+
$$css: true
|
|
233
|
+
},
|
|
234
|
+
concealLayoutPreserved: {
|
|
235
|
+
k1ekBW: "x19991ni",
|
|
236
|
+
kIyJzY: "xuedmi6 x12w9bfk",
|
|
237
|
+
kAMwcw: "xlr8y92",
|
|
238
|
+
kSiTet: "x1hc1fzr xenj0cg",
|
|
239
|
+
$$css: true
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// The compiled StyleX objects carry `when.ancestor` conditionals the public
|
|
244
|
+
// `StyleXStyles` type does not model, so the slot shape is inferred.
|
|
245
|
+
export const POOL = [{
|
|
246
|
+
marker: m0,
|
|
247
|
+
reveal: s0.reveal,
|
|
248
|
+
revealLayoutPreserved: s0.revealLayoutPreserved,
|
|
249
|
+
conceal: s0.conceal,
|
|
250
|
+
concealLayoutPreserved: s0.concealLayoutPreserved
|
|
251
|
+
}, {
|
|
252
|
+
marker: m1,
|
|
253
|
+
reveal: s1.reveal,
|
|
254
|
+
revealLayoutPreserved: s1.revealLayoutPreserved,
|
|
255
|
+
conceal: s1.conceal,
|
|
256
|
+
concealLayoutPreserved: s1.concealLayoutPreserved
|
|
257
|
+
}, {
|
|
258
|
+
marker: m2,
|
|
259
|
+
reveal: s2.reveal,
|
|
260
|
+
revealLayoutPreserved: s2.revealLayoutPreserved,
|
|
261
|
+
conceal: s2.conceal,
|
|
262
|
+
concealLayoutPreserved: s2.concealLayoutPreserved
|
|
263
|
+
}, {
|
|
264
|
+
marker: m3,
|
|
265
|
+
reveal: s3.reveal,
|
|
266
|
+
revealLayoutPreserved: s3.revealLayoutPreserved,
|
|
267
|
+
conceal: s3.conceal,
|
|
268
|
+
concealLayoutPreserved: s3.concealLayoutPreserved
|
|
269
|
+
}, {
|
|
270
|
+
marker: m4,
|
|
271
|
+
reveal: s4.reveal,
|
|
272
|
+
revealLayoutPreserved: s4.revealLayoutPreserved,
|
|
273
|
+
conceal: s4.conceal,
|
|
274
|
+
concealLayoutPreserved: s4.concealLayoutPreserved
|
|
275
|
+
}, {
|
|
276
|
+
marker: m5,
|
|
277
|
+
reveal: s5.reveal,
|
|
278
|
+
revealLayoutPreserved: s5.revealLayoutPreserved,
|
|
279
|
+
conceal: s5.conceal,
|
|
280
|
+
concealLayoutPreserved: s5.concealLayoutPreserved
|
|
281
|
+
}];
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -38,9 +38,13 @@ export { useClickableContainer, INTERACTIVE_SELECTORS, } from './useClickableCon
|
|
|
38
38
|
export type { UseClickableContainerOptions, ClickableContainerResult, } from './useClickableContainer';
|
|
39
39
|
export { useInputContainer } from './useInputContainer';
|
|
40
40
|
export type { UseInputContainerOptions } from './useInputContainer';
|
|
41
|
+
export { useInputStatusIcon } from './useInputStatusIcon';
|
|
42
|
+
export type { UseInputStatusIconOptions, UseInputStatusIconReturn, } from './useInputStatusIcon';
|
|
41
43
|
export { useInteractiveRole } from './useInteractiveRole';
|
|
42
44
|
export type { InteractiveRole, UseInteractiveRoleOptions, } from './useInteractiveRole';
|
|
43
45
|
export { useLongPress } from './useLongPress';
|
|
44
46
|
export type { UseLongPressOptions, UseLongPressHandlers } from './useLongPress';
|
|
45
47
|
export { useDevWarning } from './useDevWarning';
|
|
48
|
+
export { useContainerReveal } from './useContainerReveal';
|
|
49
|
+
export type { UseContainerRevealOptions, UseContainerRevealReturn, ContentRevealOptions, } from './useContainerReveal';
|
|
46
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAElE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,YAAY,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,eAAe,EACf,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAElE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,YAAY,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,eAAe,EACf,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,mBAAmB,EAAE,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -27,6 +27,8 @@ export { useStreamingText } from "./useStreamingText.js";
|
|
|
27
27
|
export { useImageMode } from "./useImageMode.js";
|
|
28
28
|
export { useClickableContainer, INTERACTIVE_SELECTORS } from "./useClickableContainer.js";
|
|
29
29
|
export { useInputContainer } from "./useInputContainer.js";
|
|
30
|
+
export { useInputStatusIcon } from "./useInputStatusIcon.js";
|
|
30
31
|
export { useInteractiveRole } from "./useInteractiveRole.js";
|
|
31
32
|
export { useLongPress } from "./useLongPress.js";
|
|
32
|
-
export { useDevWarning } from "./useDevWarning.js";
|
|
33
|
+
export { useDevWarning } from "./useDevWarning.js";
|
|
34
|
+
export { useContainerReveal } from "./useContainerReveal.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file isRtlElement.ts
|
|
3
|
+
* @input DOM element (nullable)
|
|
4
|
+
* @output Exports isRtlElement helper resolving an element's computed text
|
|
5
|
+
* direction
|
|
6
|
+
* @position Internal hook utility; used by useListFocus and useGridFocus to
|
|
7
|
+
* auto-detect RTL for arrow-key navigation (same getComputedStyle precedent
|
|
8
|
+
* as Resizable's ResizeHandle drag deltas).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Whether `el` renders right-to-left, per its computed `direction`.
|
|
12
|
+
*
|
|
13
|
+
* SSR-safe: returns false when `el` is null or no DOM is available. Callers
|
|
14
|
+
* should invoke this lazily (on keydown, not on render) so getComputedStyle
|
|
15
|
+
* runs only when a horizontal arrow key is actually handled.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isRtlElement(el: HTMLElement | null): boolean;
|
|
18
|
+
//# sourceMappingURL=isRtlElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isRtlElement.d.ts","sourceRoot":"","sources":["../../src/hooks/isRtlElement.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAK5D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file isRtlElement.ts
|
|
7
|
+
* @input DOM element (nullable)
|
|
8
|
+
* @output Exports isRtlElement helper resolving an element's computed text
|
|
9
|
+
* direction
|
|
10
|
+
* @position Internal hook utility; used by useListFocus and useGridFocus to
|
|
11
|
+
* auto-detect RTL for arrow-key navigation (same getComputedStyle precedent
|
|
12
|
+
* as Resizable's ResizeHandle drag deltas).
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Whether `el` renders right-to-left, per its computed `direction`.
|
|
17
|
+
*
|
|
18
|
+
* SSR-safe: returns false when `el` is null or no DOM is available. Callers
|
|
19
|
+
* should invoke this lazily (on keydown, not on render) so getComputedStyle
|
|
20
|
+
* runs only when a horizontal arrow key is actually handled.
|
|
21
|
+
*/
|
|
22
|
+
export function isRtlElement(el) {
|
|
23
|
+
if (!el || typeof window === 'undefined') {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return window.getComputedStyle(el).direction === 'rtl';
|
|
27
|
+
}
|
|
@@ -17,6 +17,9 @@ export type AnnounceFn = (message: string, politeness?: AnnouncePoliteness) => v
|
|
|
17
17
|
* The polite and assertive regions are created once on first use and kept
|
|
18
18
|
* mounted, so announcements are reliable even for messages that appear
|
|
19
19
|
* immediately (unlike a live region rendered together with its content).
|
|
20
|
+
* Each message is automatically cleared a couple of seconds after being
|
|
21
|
+
* announced, so users browsing the DOM later do not encounter stale status
|
|
22
|
+
* text; announcing again before the clear simply resets the countdown.
|
|
20
23
|
*
|
|
21
24
|
* @example
|
|
22
25
|
* ```
|