@astryxdesign/core 0.0.15 → 0.1.0-canary.08d4cf4
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 +69 -0
- package/README.md +8 -10
- package/dist/AlertDialog/AlertDialog.js +2 -2
- package/dist/AppShell/AppShell.js +5 -5
- package/dist/AspectRatio/AspectRatio.js +2 -2
- package/dist/Avatar/Avatar.js +2 -2
- package/dist/Avatar/AvatarStatusDot.js +2 -2
- package/dist/AvatarGroup/AvatarGroup.js +2 -2
- package/dist/AvatarGroup/AvatarGroupOverflow.js +3 -3
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +2 -2
- package/dist/Banner/Banner.js +6 -6
- package/dist/Blockquote/Blockquote.js +2 -2
- package/dist/Breadcrumbs/BreadcrumbItem.js +3 -3
- package/dist/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/Button/Button.js +2 -2
- package/dist/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/Calendar/Calendar.js +3 -3
- package/dist/Card/Card.js +2 -2
- package/dist/Carousel/Carousel.js +2 -2
- package/dist/Center/Center.js +2 -2
- package/dist/Chat/ChatComposer.js +2 -2
- package/dist/Chat/ChatComposerDrawer.js +2 -2
- package/dist/Chat/ChatComposerInput.js +2 -2
- package/dist/Chat/ChatLayout.js +2 -2
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +5 -1
- package/dist/Chat/ChatMessage.js +2 -2
- package/dist/Chat/ChatMessageBubble.js +2 -2
- package/dist/Chat/ChatMessageList.js +2 -2
- package/dist/Chat/ChatMessageMetadata.js +2 -2
- package/dist/Chat/ChatSendButton.js +2 -2
- package/dist/Chat/ChatSystemMessage.js +3 -3
- package/dist/Chat/ChatTokenizedText.js +3 -3
- package/dist/Chat/ChatToolCalls.js +3 -3
- package/dist/Chat/useTriggerMenu.js +2 -2
- package/dist/CheckboxInput/CheckboxInput.js +3 -3
- package/dist/CheckboxList/CheckboxList.js +2 -2
- package/dist/Citation/Citation.js +3 -3
- package/dist/ClickableCard/ClickableCard.js +2 -2
- package/dist/Code/Code.js +2 -2
- package/dist/CodeBlock/CodeBlock.js +2 -2
- package/dist/Collapsible/Collapsible.js +2 -2
- package/dist/CommandPalette/CommandPaletteFooter.js +2 -2
- package/dist/CommandPalette/CommandPaletteGroup.js +2 -2
- package/dist/CommandPalette/CommandPaletteInput.js +2 -2
- package/dist/CommandPalette/CommandPaletteItem.js +2 -2
- package/dist/CommandPalette/CommandPaletteList.js +2 -2
- package/dist/ContextMenu/ContextMenu.js +4 -4
- package/dist/DateInput/DateInput.js +2 -2
- package/dist/DateRangeInput/DateRangeInput.js +2 -2
- package/dist/DateTimeInput/DateTimeInput.js +2 -2
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/Divider/Divider.js +2 -2
- package/dist/DropdownMenu/DropdownMenu.js +4 -4
- package/dist/DropdownMenu/DropdownMenuItem.js +2 -2
- package/dist/DropdownMenu/{renderXDSDropdownItems.d.ts → renderDropdownItems.d.ts} +3 -3
- package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -0
- package/dist/DropdownMenu/{renderXDSDropdownItems.js → renderDropdownItems.js} +2 -2
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/Field.js +3 -3
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/FieldStatus/FieldStatus.js +2 -2
- package/dist/FileInput/FileInput.js +2 -2
- package/dist/FormLayout/FormLayout.js +2 -2
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/GridSpan.js +2 -2
- package/dist/Heading/Heading.js +2 -2
- package/dist/HoverCard/useHoverCard.js +2 -2
- package/dist/Icon/Icon.js +3 -3
- package/dist/InputGroup/InputGroup.js +2 -2
- package/dist/InputGroup/InputGroupText.js +2 -2
- package/dist/Item/Item.js +2 -2
- package/dist/Kbd/Kbd.js +2 -2
- package/dist/Layer/useLayer.d.ts +2 -2
- package/dist/Layout/Layout.js +2 -2
- package/dist/Layout/LayoutContent.js +2 -2
- package/dist/Layout/LayoutFooter.js +2 -2
- package/dist/Layout/LayoutHeader.js +2 -2
- package/dist/Layout/LayoutPanel.js +2 -2
- package/dist/Lightbox/Lightbox.js +2 -2
- package/dist/Link/Link.js +3 -3
- package/dist/List/List.js +2 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.js +3 -3
- package/dist/MetadataList/MetadataList.js +2 -2
- package/dist/MetadataList/MetadataListItem.js +3 -3
- package/dist/MobileNav/MobileNav.js +2 -2
- package/dist/MultiSelector/MultiSelector.js +2 -2
- package/dist/NavIcon/NavIcon.js +2 -2
- package/dist/NavMenu/NavHeadingMenu.js +2 -2
- package/dist/NavMenu/NavHeadingMenuItem.js +2 -2
- package/dist/NumberInput/NumberInput.js +2 -2
- package/dist/Outline/Outline.d.ts +3 -2
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +27 -8
- package/dist/Outline/useScrollSpy.d.ts +14 -1
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +161 -50
- package/dist/OverflowList/OverflowList.js +2 -2
- package/dist/Overlay/Overlay.js +2 -2
- package/dist/Overlay/OverlayScrim.js +2 -2
- package/dist/Pagination/Pagination.js +3 -3
- package/dist/Popover/Popover.js +4 -4
- package/dist/PowerSearch/PowerSearch.js +2 -2
- package/dist/ProgressBar/ProgressBar.js +5 -5
- package/dist/RadioList/RadioList.js +2 -2
- package/dist/RadioList/RadioListItem.js +4 -4
- package/dist/Resizable/ResizeHandle.js +4 -4
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +1 -5
- package/dist/Section/Section.js +2 -2
- package/dist/SegmentedControl/SegmentedControl.js +2 -2
- package/dist/SegmentedControl/SegmentedControlItem.js +2 -2
- package/dist/SelectableCard/SelectableCard.js +2 -2
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +3 -3
- package/dist/Selector/SelectorOption.js +2 -2
- package/dist/SideNav/SideNav.js +3 -3
- package/dist/SideNav/SideNavHeading.js +9 -9
- package/dist/SideNav/SideNavItem.js +3 -3
- package/dist/SideNav/SideNavSection.js +2 -2
- package/dist/Skeleton/Skeleton.js +2 -2
- package/dist/Slider/Slider.js +4 -4
- package/dist/Spinner/Spinner.js +3 -3
- package/dist/Stack/Stack.js +2 -2
- package/dist/Stack/StackItem.js +2 -2
- package/dist/StatusDot/StatusDot.js +2 -2
- package/dist/Switch/Switch.js +4 -4
- package/dist/TabList/Tab.js +3 -3
- package/dist/TabList/TabList.js +2 -2
- package/dist/TabList/TabMenu.js +5 -5
- package/dist/Table/BaseTable.js +2 -2
- package/dist/Table/Table.js +3 -3
- package/dist/Table/TableBody.js +2 -2
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableFooter.js +2 -2
- package/dist/Table/TableHeader.js +2 -2
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/TableRow.js +3 -3
- package/dist/Text/Text.js +2 -2
- package/dist/TextArea/TextArea.js +2 -2
- package/dist/TextInput/TextInput.js +2 -2
- package/dist/Thumbnail/Thumbnail.js +2 -2
- package/dist/TimeInput/TimeInput.js +2 -2
- package/dist/Timestamp/Timestamp.js +2 -2
- package/dist/Toast/Toast.js +2 -2
- package/dist/ToggleButton/ToggleButton.d.ts +10 -3
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +66 -20
- package/dist/ToggleButton/ToggleButtonGroup.js +2 -2
- package/dist/Token/Token.js +4 -4
- package/dist/Tokenizer/Tokenizer.js +3 -3
- package/dist/Toolbar/Toolbar.js +2 -2
- package/dist/Tooltip/useTooltip.js +2 -2
- package/dist/TopNav/TopNav.js +3 -3
- package/dist/TopNav/TopNavHeading.js +7 -7
- package/dist/TopNav/TopNavItem.js +3 -3
- package/dist/TopNav/TopNavMegaMenu.js +3 -3
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +2 -2
- package/dist/TopNav/TopNavMegaMenuItem.js +3 -3
- package/dist/TopNav/TopNavMenu.js +2 -2
- package/dist/TreeList/TreeList.js +2 -2
- package/dist/TreeList/TreeListItem.js +2 -2
- package/dist/Typeahead/BaseTypeahead.js +2 -2
- package/dist/Typeahead/Typeahead.js +2 -2
- package/dist/Typeahead/TypeaheadItem.js +2 -2
- package/dist/docs-types.d.ts +3 -3
- package/dist/docs-types.d.ts.map +1 -1
- package/dist/naming.d.ts +1 -1
- package/dist/naming.js +1 -1
- package/dist/theme/Theme.js +1 -1
- package/dist/theme/defineTheme.d.ts +3 -3
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +1 -1
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -2
- package/dist/theme/syntax/defineSyntaxTheme.js +1 -1
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/tokens.js +4 -4
- package/dist/theme/useTheme.d.ts +2 -2
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +15 -2
- package/dist/utils/mergeProps.d.ts +3 -3
- package/dist/utils/mergeProps.js +4 -4
- package/dist/utils/parseStyleKey.d.ts +2 -2
- package/dist/utils/parseStyleKey.js +2 -2
- package/dist/utils/{xdsThemeProps.d.ts → themeProps.d.ts} +4 -4
- package/dist/utils/themeProps.d.ts.map +1 -0
- package/dist/utils/{xdsThemeProps.js → themeProps.js} +5 -5
- package/package.json +2 -2
- package/src/AlertDialog/AlertDialog.tsx +2 -2
- package/src/AppShell/AppShell.tsx +5 -5
- package/src/AspectRatio/AspectRatio.tsx +2 -2
- package/src/Avatar/Avatar.tsx +2 -2
- package/src/Avatar/AvatarStatusDot.tsx +2 -2
- package/src/AvatarGroup/AvatarGroup.tsx +2 -2
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +3 -3
- package/src/Badge/Badge.tsx +2 -2
- package/src/Banner/Banner.tsx +6 -6
- package/src/Blockquote/Blockquote.tsx +2 -2
- package/src/Breadcrumbs/BreadcrumbItem.tsx +3 -3
- package/src/Breadcrumbs/Breadcrumbs.tsx +2 -2
- package/src/Button/Button.tsx +2 -2
- package/src/ButtonGroup/ButtonGroup.tsx +2 -2
- package/src/Calendar/Calendar.tsx +3 -3
- package/src/Card/Card.tsx +2 -2
- package/src/Carousel/Carousel.tsx +2 -2
- package/src/Center/Center.tsx +2 -2
- package/src/Chat/ChatComposer.tsx +2 -2
- package/src/Chat/ChatComposerDrawer.tsx +2 -2
- package/src/Chat/ChatComposerInput.tsx +2 -2
- package/src/Chat/ChatLayout.tsx +2 -2
- package/src/Chat/ChatLayoutScrollButton.tsx +7 -1
- package/src/Chat/ChatMessage.tsx +2 -2
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatMessageList.tsx +2 -2
- package/src/Chat/ChatMessageMetadata.tsx +2 -2
- package/src/Chat/ChatSendButton.tsx +2 -2
- package/src/Chat/ChatSystemMessage.tsx +3 -3
- package/src/Chat/ChatTokenizedText.tsx +3 -3
- package/src/Chat/ChatToolCalls.tsx +3 -3
- package/src/Chat/useTriggerMenu.tsx +2 -2
- package/src/CheckboxInput/CheckboxInput.tsx +3 -3
- package/src/CheckboxList/CheckboxList.tsx +2 -2
- package/src/Citation/Citation.tsx +3 -3
- package/src/ClickableCard/ClickableCard.tsx +2 -2
- package/src/Code/Code.tsx +2 -2
- package/src/CodeBlock/CodeBlock.tsx +2 -2
- package/src/Collapsible/Collapsible.tsx +2 -2
- package/src/Collapsible/useCollapsible.doc.mjs +2 -2
- package/src/CommandPalette/CommandPaletteFooter.tsx +2 -2
- package/src/CommandPalette/CommandPaletteGroup.tsx +2 -2
- package/src/CommandPalette/CommandPaletteInput.tsx +2 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +2 -2
- package/src/CommandPalette/CommandPaletteList.tsx +2 -2
- package/src/ContextMenu/ContextMenu.tsx +4 -4
- package/src/DateInput/DateInput.test.tsx +68 -20
- package/src/DateInput/DateInput.tsx +2 -2
- package/src/DateRangeInput/DateRangeInput.tsx +2 -2
- package/src/DateTimeInput/DateTimeInput.tsx +2 -2
- package/src/Dialog/Dialog.tsx +3 -3
- package/src/Divider/Divider.doc.mjs +1 -1
- package/src/Divider/Divider.tsx +2 -2
- package/src/DropdownMenu/DropdownMenu.tsx +4 -4
- package/src/DropdownMenu/DropdownMenuItem.tsx +2 -2
- package/src/DropdownMenu/{renderXDSDropdownItems.tsx → renderDropdownItems.tsx} +2 -2
- package/src/EmptyState/EmptyState.tsx +2 -2
- package/src/Field/Field.tsx +3 -3
- package/src/Field/FieldLabel.tsx +2 -2
- package/src/FieldStatus/FieldStatus.tsx +2 -2
- package/src/FileInput/FileInput.tsx +2 -2
- package/src/FormLayout/FormLayout.doc.mjs +3 -3
- package/src/FormLayout/FormLayout.tsx +2 -2
- package/src/Grid/Grid.tsx +3 -3
- package/src/Grid/GridSpan.tsx +2 -2
- package/src/Heading/Heading.tsx +2 -2
- package/src/HoverCard/useHoverCard.tsx +2 -2
- package/src/Icon/Icon.doc.mjs +4 -4
- package/src/Icon/Icon.tsx +3 -3
- package/src/InputGroup/InputGroup.tsx +2 -2
- package/src/InputGroup/InputGroupText.tsx +2 -2
- package/src/Item/Item.doc.mjs +2 -2
- package/src/Item/Item.tsx +2 -2
- package/src/Kbd/Kbd.tsx +2 -2
- package/src/Layer/useLayer.tsx +2 -2
- package/src/Layout/Layout.tsx +2 -2
- package/src/Layout/LayoutContent.tsx +2 -2
- package/src/Layout/LayoutFooter.tsx +2 -2
- package/src/Layout/LayoutHeader.tsx +2 -2
- package/src/Layout/LayoutPanel.tsx +2 -2
- package/src/Lightbox/Lightbox.tsx +2 -2
- package/src/Link/Link.doc.mjs +3 -3
- package/src/Link/Link.tsx +3 -3
- package/src/Link/LinkProvider.doc.mjs +3 -3
- package/src/List/List.tsx +2 -2
- package/src/List/ListItem.tsx +2 -2
- package/src/Markdown/Markdown.doc.mjs +4 -4
- package/src/Markdown/Markdown.tsx +3 -3
- package/src/MetadataList/MetadataList.tsx +2 -2
- package/src/MetadataList/MetadataListItem.tsx +3 -3
- package/src/MobileNav/MobileNav.tsx +2 -2
- package/src/MoreMenu/MoreMenu.doc.mjs +0 -13
- package/src/MultiSelector/MultiSelector.tsx +2 -2
- package/src/NavIcon/NavIcon.tsx +2 -2
- package/src/NavMenu/NavHeadingMenu.tsx +2 -2
- package/src/NavMenu/NavHeadingMenuItem.tsx +2 -2
- package/src/NumberInput/NumberInput.tsx +2 -2
- package/src/Outline/Outline.doc.mjs +1 -1
- package/src/Outline/Outline.test.tsx +76 -38
- package/src/Outline/Outline.tsx +27 -8
- package/src/Outline/useScrollSpy.ts +196 -63
- package/src/OverflowList/OverflowList.tsx +2 -2
- package/src/Overlay/Overlay.tsx +2 -2
- package/src/Overlay/OverlayScrim.tsx +2 -2
- package/src/Pagination/Pagination.tsx +3 -3
- package/src/Popover/Popover.tsx +4 -4
- package/src/PowerSearch/PowerSearch.tsx +2 -2
- package/src/ProgressBar/ProgressBar.tsx +5 -5
- package/src/RadioList/RadioList.tsx +2 -2
- package/src/RadioList/RadioListItem.tsx +4 -4
- package/src/Resizable/Resizable.doc.mjs +2 -2
- package/src/Resizable/ResizeHandle.tsx +4 -4
- package/src/Resizable/useResizable.ts +1 -7
- package/src/Section/Section.tsx +2 -2
- package/src/SegmentedControl/SegmentedControl.tsx +2 -2
- package/src/SegmentedControl/SegmentedControlItem.tsx +2 -2
- package/src/SelectableCard/SelectableCard.tsx +2 -2
- package/src/Selector/Selector.tsx +7 -8
- package/src/Selector/SelectorOption.tsx +2 -2
- package/src/SideNav/SideNav.tsx +3 -3
- package/src/SideNav/SideNavHeading.tsx +9 -9
- package/src/SideNav/SideNavItem.tsx +3 -3
- package/src/SideNav/SideNavSection.tsx +2 -2
- package/src/Skeleton/Skeleton.tsx +2 -2
- package/src/Slider/Slider.tsx +4 -4
- package/src/Spinner/Spinner.tsx +3 -3
- package/src/Stack/Stack.tsx +2 -2
- package/src/Stack/StackItem.tsx +2 -2
- package/src/StatusDot/StatusDot.tsx +2 -2
- package/src/Switch/Switch.tsx +4 -4
- package/src/TabList/Tab.tsx +3 -3
- package/src/TabList/TabList.tsx +2 -2
- package/src/TabList/TabMenu.tsx +5 -5
- package/src/Table/BaseTable.tsx +2 -2
- package/src/Table/Table.doc.mjs +3 -3
- package/src/Table/Table.tsx +3 -3
- package/src/Table/TableBody.tsx +2 -2
- package/src/Table/TableCell.tsx +3 -3
- package/src/Table/TableFooter.tsx +2 -2
- package/src/Table/TableHeader.tsx +2 -2
- package/src/Table/TableHeaderCell.tsx +3 -3
- package/src/Table/TableRow.tsx +3 -3
- package/src/Text/Text.tsx +2 -2
- package/src/TextArea/TextArea.tsx +2 -2
- package/src/TextInput/TextInput.tsx +2 -2
- package/src/Thumbnail/Thumbnail.tsx +2 -2
- package/src/TimeInput/TimeInput.tsx +2 -2
- package/src/Timestamp/Timestamp.tsx +2 -2
- package/src/Toast/Toast.tsx +2 -2
- package/src/ToggleButton/ToggleButton.doc.mjs +2 -2
- package/src/ToggleButton/ToggleButton.test.tsx +148 -6
- package/src/ToggleButton/ToggleButton.tsx +85 -22
- package/src/ToggleButton/ToggleButtonGroup.tsx +2 -2
- package/src/Token/Token.tsx +4 -4
- package/src/Tokenizer/Tokenizer.tsx +3 -3
- package/src/Toolbar/Toolbar.doc.mjs +8 -7
- package/src/Toolbar/Toolbar.tsx +2 -2
- package/src/Tooltip/useTooltip.tsx +2 -2
- package/src/TopNav/TopNav.tsx +3 -3
- package/src/TopNav/TopNavHeading.tsx +7 -7
- package/src/TopNav/TopNavItem.tsx +3 -3
- package/src/TopNav/TopNavMegaMenu.tsx +3 -3
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +2 -2
- package/src/TopNav/TopNavMegaMenuItem.tsx +3 -3
- package/src/TopNav/TopNavMenu.tsx +2 -2
- package/src/TreeList/TreeList.tsx +2 -2
- package/src/TreeList/TreeListItem.tsx +2 -2
- package/src/Typeahead/BaseTypeahead.tsx +2 -2
- package/src/Typeahead/Typeahead.tsx +2 -2
- package/src/Typeahead/TypeaheadItem.tsx +2 -2
- package/src/docs-types.ts +3 -3
- package/src/hooks/useEntryAnimation.doc.mjs +3 -3
- package/src/hooks/useMediaQuery.doc.mjs +2 -2
- package/src/hooks/useStreamingText.doc.mjs +3 -3
- package/src/naming.ts +1 -1
- package/src/reset.css +1 -1
- package/src/tailwind-theme.css +1 -1
- package/src/theme/Theme.doc.mjs +2 -2
- package/src/theme/Theme.tsx +1 -1
- package/src/theme/defineTheme.ts +3 -3
- package/src/theme/index.ts +2 -2
- package/src/theme/syntax/defineSyntaxTheme.ts +1 -1
- package/src/theme/tokens.ts +4 -4
- package/src/theme/useTheme.ts +2 -2
- package/src/utils/dateParser.test.ts +26 -0
- package/src/utils/dateParser.ts +16 -2
- package/src/utils/mergeProps.ts +4 -4
- package/src/utils/parseStyleKey.ts +2 -2
- package/src/utils/{xdsThemeProps.test.ts → themeProps.test.ts} +12 -12
- package/src/utils/{xdsThemeProps.ts → themeProps.ts} +5 -5
- package/dist/DropdownMenu/renderXDSDropdownItems.d.ts.map +0 -1
- package/dist/utils/xdsThemeProps.d.ts.map +0 -1
package/src/Popover/Popover.tsx
CHANGED
|
@@ -32,7 +32,7 @@ import type {LayerAlignment, LayerPlacement} from '../Layer/useLayer';
|
|
|
32
32
|
import {layerAnimations} from '../Layer/layerAnimations.stylex';
|
|
33
33
|
import {spacingVars} from '../theme/tokens.stylex';
|
|
34
34
|
import {InteractiveRoleContext} from '../InteractiveRoleContext/InteractiveRoleContext';
|
|
35
|
-
import {
|
|
35
|
+
import {themeProps} from '../utils/themeProps';
|
|
36
36
|
|
|
37
37
|
// =============================================================================
|
|
38
38
|
// Helpers
|
|
@@ -472,7 +472,7 @@ export function Popover({
|
|
|
472
472
|
<div
|
|
473
473
|
data-testid={testId}
|
|
474
474
|
{...mergeProps(
|
|
475
|
-
|
|
475
|
+
themeProps('popover'),
|
|
476
476
|
stylex.props(styles.contentPadding, xstyle),
|
|
477
477
|
className,
|
|
478
478
|
style,
|
|
@@ -508,7 +508,7 @@ export function Popover({
|
|
|
508
508
|
<div
|
|
509
509
|
data-testid={testId}
|
|
510
510
|
{...mergeProps(
|
|
511
|
-
|
|
511
|
+
themeProps('popover'),
|
|
512
512
|
stylex.props(styles.contentPadding, xstyle),
|
|
513
513
|
className,
|
|
514
514
|
style,
|
|
@@ -537,7 +537,7 @@ export function Popover({
|
|
|
537
537
|
<div
|
|
538
538
|
data-testid={testId}
|
|
539
539
|
{...mergeProps(
|
|
540
|
-
|
|
540
|
+
themeProps('popover'),
|
|
541
541
|
stylex.props(styles.contentPadding, xstyle),
|
|
542
542
|
className,
|
|
543
543
|
style,
|
|
@@ -50,7 +50,7 @@ import {useInternalConfig} from './useInternalConfig';
|
|
|
50
50
|
import {usePowerSearchSource} from './usePowerSearchSource';
|
|
51
51
|
import {formatFilterValue} from './formatFilterValue';
|
|
52
52
|
import {PowerSearchEditPopover} from './PowerSearchEditPopover';
|
|
53
|
-
import {
|
|
53
|
+
import {themeProps} from '../utils/themeProps';
|
|
54
54
|
import type {
|
|
55
55
|
PowerSearchConfig,
|
|
56
56
|
PowerSearchFilter,
|
|
@@ -966,7 +966,7 @@ export function PowerSearch({
|
|
|
966
966
|
<>
|
|
967
967
|
<div
|
|
968
968
|
ref={mergeRefs(ref, popover.triggerRef as React.Ref<HTMLDivElement>)}
|
|
969
|
-
{...
|
|
969
|
+
{...themeProps('power-search')}>
|
|
970
970
|
<Tokenizer
|
|
971
971
|
handleRef={tokenizerRef}
|
|
972
972
|
label={label}
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from '../theme/tokens.stylex';
|
|
31
31
|
import {mergeProps} from '../utils';
|
|
32
32
|
import type {BaseProps} from '../BaseProps';
|
|
33
|
-
import {
|
|
33
|
+
import {themeProps} from '../utils/themeProps';
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Extensible variant map for ProgressBar.
|
|
@@ -283,7 +283,7 @@ export function ProgressBar({
|
|
|
283
283
|
<div
|
|
284
284
|
ref={ref}
|
|
285
285
|
{...mergeProps(
|
|
286
|
-
|
|
286
|
+
themeProps('progressbar', {variant}),
|
|
287
287
|
stylex.props(styles.container, xstyle),
|
|
288
288
|
className,
|
|
289
289
|
style,
|
|
@@ -327,13 +327,13 @@ export function ProgressBar({
|
|
|
327
327
|
aria-labelledby={labelId}
|
|
328
328
|
aria-valuetext={isIndeterminate ? undefined : valueText}
|
|
329
329
|
{...mergeProps(
|
|
330
|
-
|
|
330
|
+
themeProps('progressbar-track'),
|
|
331
331
|
stylex.props(styles.track),
|
|
332
332
|
)}>
|
|
333
333
|
{isIndeterminate ? (
|
|
334
334
|
<div
|
|
335
335
|
{...mergeProps(
|
|
336
|
-
|
|
336
|
+
themeProps('progressbar-fill', {variant: fillVariant}),
|
|
337
337
|
stylex.props(
|
|
338
338
|
styles.indeterminateFill,
|
|
339
339
|
variantStyles[fillVariant],
|
|
@@ -343,7 +343,7 @@ export function ProgressBar({
|
|
|
343
343
|
) : (
|
|
344
344
|
<div
|
|
345
345
|
{...mergeProps(
|
|
346
|
-
|
|
346
|
+
themeProps('progressbar-fill', {variant: fillVariant}),
|
|
347
347
|
stylex.props(styles.fill, variantStyles[fillVariant]),
|
|
348
348
|
)}
|
|
349
349
|
style={{width: `${percentage}%`}}
|
|
@@ -24,7 +24,7 @@ import type {InputStatus} from '../Field/types';
|
|
|
24
24
|
import {mergeProps} from '../utils';
|
|
25
25
|
import type {BaseProps} from '../BaseProps';
|
|
26
26
|
import type {SizeValue} from '../utils/types';
|
|
27
|
-
import {
|
|
27
|
+
import {themeProps} from '../utils/themeProps';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Size of the radio controls, matching CheckboxInput sizes.
|
|
@@ -224,7 +224,7 @@ export function RadioList({
|
|
|
224
224
|
aria-invalid={status?.type === 'error' ? true : undefined}
|
|
225
225
|
aria-required={isRequired || undefined}
|
|
226
226
|
{...mergeProps(
|
|
227
|
-
|
|
227
|
+
themeProps('radio-list', {orientation, size}),
|
|
228
228
|
stylex.props(
|
|
229
229
|
styles.radiogroup,
|
|
230
230
|
orientation === 'vertical' ? styles.vertical : styles.horizontal,
|
|
@@ -32,7 +32,7 @@ import {RadioListContext} from './RadioList';
|
|
|
32
32
|
import {mergeProps} from '../utils';
|
|
33
33
|
import {radioScope} from './radio.markers.stylex';
|
|
34
34
|
import {Item} from '../Item';
|
|
35
|
-
import {
|
|
35
|
+
import {themeProps} from '../utils/themeProps';
|
|
36
36
|
|
|
37
37
|
const styles = stylex.create({
|
|
38
38
|
container: {
|
|
@@ -259,7 +259,7 @@ export function RadioListItem({
|
|
|
259
259
|
<div
|
|
260
260
|
aria-hidden="true"
|
|
261
261
|
{...mergeProps(
|
|
262
|
-
|
|
262
|
+
themeProps('radio', {
|
|
263
263
|
size,
|
|
264
264
|
checked: isChecked ? 'checked' : null,
|
|
265
265
|
disabled: isDisabled ? 'disabled' : null,
|
|
@@ -275,7 +275,7 @@ export function RadioListItem({
|
|
|
275
275
|
{isChecked && (
|
|
276
276
|
<div
|
|
277
277
|
{...mergeProps(
|
|
278
|
-
|
|
278
|
+
themeProps('radio-dot', {size}),
|
|
279
279
|
stylex.props(styles.innerDot, dotSizeStyles[size]),
|
|
280
280
|
)}
|
|
281
281
|
/>
|
|
@@ -299,7 +299,7 @@ export function RadioListItem({
|
|
|
299
299
|
ref={ref}
|
|
300
300
|
data-testid={dataTestId}
|
|
301
301
|
{...mergeProps(
|
|
302
|
-
|
|
302
|
+
themeProps('radio-list-item'),
|
|
303
303
|
stylex.props(styles.container, !isDisabled && radioScope),
|
|
304
304
|
)}>
|
|
305
305
|
<Item
|
|
@@ -27,7 +27,7 @@ export const docs = {
|
|
|
27
27
|
{
|
|
28
28
|
guidance: true,
|
|
29
29
|
description:
|
|
30
|
-
'Use useResizable() with existing
|
|
30
|
+
'Use useResizable() with existing Astryx layout components. ' +
|
|
31
31
|
'Pass the returned props to the resizable prop on LayoutPanel or SideNav.',
|
|
32
32
|
},
|
|
33
33
|
{
|
|
@@ -195,7 +195,7 @@ export const docsDense = {
|
|
|
195
195
|
description:
|
|
196
196
|
'Hook-based resizable panel system. useResizable() manages size state; ResizeHandle provides interactive pill-grip separator. Pass resize props to existing layout components via their resizable prop.',
|
|
197
197
|
bestPractices: [
|
|
198
|
-
{guidance: true, description: 'Use useResizable() w/ existing
|
|
198
|
+
{guidance: true, description: 'Use useResizable() w/ existing Astryx layout components. Pass returned props to resizable prop on LayoutPanel or SideNav.'},
|
|
199
199
|
{guidance: true, description: 'Provide accessible label on each ResizeHandle when multiple handles exist (e.g. "Resize sidebar", "Resize terminal").'},
|
|
200
200
|
{guidance: false, description: 'Wrap panels in extra container components for resize. Hook-first architecture avoids extra DOM; use it directly on existing components.'},
|
|
201
201
|
],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* flips when the panel collapses to 0px so it stays accessible.
|
|
16
16
|
*
|
|
17
17
|
* Pill placement uses a single stylex dynamic style that accepts a direction
|
|
18
|
-
* multiplier (-1 or 1). The pill element has its own
|
|
18
|
+
* multiplier (-1 or 1). The pill element has its own themeProps
|
|
19
19
|
* ('resize-handle-pill') so themes can target size/shape directly.
|
|
20
20
|
*/
|
|
21
21
|
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from '../theme/tokens.stylex';
|
|
33
33
|
import {mergeProps, mergeRefs} from '../utils';
|
|
34
34
|
import type {ResizableProps} from './useResizable';
|
|
35
|
-
import {
|
|
35
|
+
import {themeProps} from '../utils/themeProps';
|
|
36
36
|
|
|
37
37
|
const KEYBOARD_STEP = 10;
|
|
38
38
|
const KEYBOARD_LARGE_STEP = 50;
|
|
@@ -487,7 +487,7 @@ export function ResizeHandle({
|
|
|
487
487
|
onBlur={() => setIsFocused(false)}
|
|
488
488
|
data-resizing={isDragging || undefined}
|
|
489
489
|
{...mergeProps(
|
|
490
|
-
|
|
490
|
+
themeProps('resize-handle'),
|
|
491
491
|
stylex.props(
|
|
492
492
|
styles.handle,
|
|
493
493
|
isOverlay && styles.overlay,
|
|
@@ -534,7 +534,7 @@ export function ResizeHandle({
|
|
|
534
534
|
{children ?? (
|
|
535
535
|
<div
|
|
536
536
|
{...mergeProps(
|
|
537
|
-
|
|
537
|
+
themeProps('resize-handle-pill'),
|
|
538
538
|
stylex.props(
|
|
539
539
|
styles.pill,
|
|
540
540
|
isHorizontal ? styles.pillHorizontal : styles.pillVertical,
|
|
@@ -107,10 +107,6 @@ export interface ResizableProps {
|
|
|
107
107
|
const DEFAULT_MIN = 50;
|
|
108
108
|
const DEFAULT_COLLAPSED_SIZE = 40;
|
|
109
109
|
const STORAGE_PREFIX = 'astryx-resizable:';
|
|
110
|
-
// Legacy key prefix read during the compat window so persisted panel sizes
|
|
111
|
-
// survive the xds -> astryx rename. Read-only fallback; we always write the
|
|
112
|
-
// new prefix. Removed at final cutover.
|
|
113
|
-
const LEGACY_STORAGE_PREFIX = 'xds-resizable:';
|
|
114
110
|
|
|
115
111
|
// =============================================================================
|
|
116
112
|
// Helpers
|
|
@@ -147,9 +143,7 @@ function loadPersistedSize(key: string): number | null {
|
|
|
147
143
|
return null;
|
|
148
144
|
}
|
|
149
145
|
try {
|
|
150
|
-
const raw =
|
|
151
|
-
localStorage.getItem(STORAGE_PREFIX + key) ??
|
|
152
|
-
localStorage.getItem(LEGACY_STORAGE_PREFIX + key);
|
|
146
|
+
const raw = localStorage.getItem(STORAGE_PREFIX + key);
|
|
153
147
|
if (raw != null) {
|
|
154
148
|
const parsed = JSON.parse(raw);
|
|
155
149
|
if (typeof parsed === 'number') {
|
package/src/Section/Section.tsx
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from '../Layout/padding.stylex';
|
|
33
33
|
import type {SizeValue, SpacingStep} from '../utils/types';
|
|
34
34
|
import {mergeProps} from '../utils';
|
|
35
|
-
import {
|
|
35
|
+
import {themeProps} from '../utils/themeProps';
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Extensible variant map for Section.
|
|
@@ -268,7 +268,7 @@ export function Section({
|
|
|
268
268
|
{...props}>
|
|
269
269
|
<div
|
|
270
270
|
{...mergeProps(
|
|
271
|
-
|
|
271
|
+
themeProps('section', {variant}),
|
|
272
272
|
stylex.props(
|
|
273
273
|
nestedStyles.inner,
|
|
274
274
|
...container(
|
|
@@ -26,7 +26,7 @@ import type {
|
|
|
26
26
|
import {mergeProps, mergeRefs} from '../utils';
|
|
27
27
|
import {useSize} from '../SizeContext/SizeContext';
|
|
28
28
|
import type {BaseProps} from '../BaseProps';
|
|
29
|
-
import {
|
|
29
|
+
import {themeProps} from '../utils/themeProps';
|
|
30
30
|
|
|
31
31
|
export interface SegmentedControlProps extends Omit<
|
|
32
32
|
BaseProps<HTMLDivElement>,
|
|
@@ -206,7 +206,7 @@ export function SegmentedControl({
|
|
|
206
206
|
aria-disabled={isDisabled || undefined}
|
|
207
207
|
onKeyDown={handleKeyDown}
|
|
208
208
|
{...mergeProps(
|
|
209
|
-
|
|
209
|
+
themeProps('segmented-control', {size}),
|
|
210
210
|
stylex.props(
|
|
211
211
|
styles.container,
|
|
212
212
|
sizeStyles[size],
|
|
@@ -31,7 +31,7 @@ import {useSegmentedControlContext} from './SegmentedControlContext';
|
|
|
31
31
|
import type {SegmentedControlSize} from './SegmentedControlContext';
|
|
32
32
|
import {mergeProps} from '../utils';
|
|
33
33
|
import type {BaseProps} from '../BaseProps';
|
|
34
|
-
import {
|
|
34
|
+
import {themeProps} from '../utils/themeProps';
|
|
35
35
|
|
|
36
36
|
export interface SegmentedControlItemProps extends BaseProps<HTMLButtonElement> {
|
|
37
37
|
ref?: React.Ref<HTMLButtonElement>;
|
|
@@ -198,7 +198,7 @@ export function SegmentedControlItem({
|
|
|
198
198
|
tabIndex={isSelected ? 0 : -1}
|
|
199
199
|
onClick={handleClick}
|
|
200
200
|
{...mergeProps(
|
|
201
|
-
|
|
201
|
+
themeProps('segmented-control-item', {
|
|
202
202
|
size,
|
|
203
203
|
selected: isSelected ? 'selected' : null,
|
|
204
204
|
disabled: isItemDisabled ? 'disabled' : null,
|
|
@@ -42,7 +42,7 @@ import {Card} from '../Card/Card';
|
|
|
42
42
|
import type {CardVariant} from '../Card/Card';
|
|
43
43
|
import {useClickableContainer} from '../hooks/useClickableContainer';
|
|
44
44
|
import type {BaseProps} from '../BaseProps';
|
|
45
|
-
import {
|
|
45
|
+
import {themeProps} from '../utils/themeProps';
|
|
46
46
|
|
|
47
47
|
// =============================================================================
|
|
48
48
|
// Styles — selection + interaction; Card handles the rest
|
|
@@ -329,7 +329,7 @@ export function SelectableCard({
|
|
|
329
329
|
padding={padding}
|
|
330
330
|
variant={variant}
|
|
331
331
|
{...mergeProps(
|
|
332
|
-
|
|
332
|
+
themeProps('selectable-card', {
|
|
333
333
|
variant,
|
|
334
334
|
selected: isSelected ? 'true' : 'false',
|
|
335
335
|
}),
|
|
@@ -65,7 +65,7 @@ import {mergeProps} from '../utils';
|
|
|
65
65
|
import {useSize} from '../SizeContext/SizeContext';
|
|
66
66
|
import type {BaseProps} from '../BaseProps';
|
|
67
67
|
import type {SizeValue} from '../utils/types';
|
|
68
|
-
import {
|
|
68
|
+
import {themeProps} from '../utils/themeProps';
|
|
69
69
|
|
|
70
70
|
const styles = stylex.create({
|
|
71
71
|
// Trigger container — the enhanced click target wrapping the combobox button and clear button as siblings
|
|
@@ -107,12 +107,11 @@ const styles = stylex.create({
|
|
|
107
107
|
lineHeight: 'inherit',
|
|
108
108
|
color: 'inherit',
|
|
109
109
|
cursor: 'pointer',
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
borderRadius: radiusVars['--radius-element'],
|
|
110
|
+
// The wrapper (inputWrapperStyles.base) renders the focus ring via
|
|
111
|
+
// :focus-within when this button is focused, matching TextInput/NumberInput.
|
|
112
|
+
// The button must not draw its own :focus-visible outline or the two stack
|
|
113
|
+
// into a doubled ring over the trigger.
|
|
114
|
+
outline: 'none',
|
|
116
115
|
},
|
|
117
116
|
triggerPlaceholder: {
|
|
118
117
|
color: colorVars['--color-text-secondary'],
|
|
@@ -873,7 +872,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
873
872
|
onClick={onTriggerClick}
|
|
874
873
|
data-testid={testId}
|
|
875
874
|
{...mergeProps(
|
|
876
|
-
|
|
875
|
+
themeProps('selector', {size, status: status?.type ?? null}),
|
|
877
876
|
stylex.props(
|
|
878
877
|
inputWrapperStyles.base,
|
|
879
878
|
styles.triggerContainer,
|
|
@@ -14,7 +14,7 @@ import type {StyleXStyles} from '@stylexjs/stylex';
|
|
|
14
14
|
import {renderIconSlot, type IconType} from '../Icon';
|
|
15
15
|
import {Item} from '../Item';
|
|
16
16
|
import {mergeProps} from '../utils';
|
|
17
|
-
import {
|
|
17
|
+
import {themeProps} from '../utils/themeProps';
|
|
18
18
|
|
|
19
19
|
const embeddedStyles = stylex.create({
|
|
20
20
|
root: {
|
|
@@ -111,7 +111,7 @@ export function SelectorOption({
|
|
|
111
111
|
description={description}
|
|
112
112
|
endContent={endContent}
|
|
113
113
|
xstyle={[embeddedStyles.root, xstyle]}
|
|
114
|
-
{...mergeProps(
|
|
114
|
+
{...mergeProps(themeProps('selector-option'), {className, style})}
|
|
115
115
|
/>
|
|
116
116
|
);
|
|
117
117
|
}
|
package/src/SideNav/SideNav.tsx
CHANGED
|
@@ -44,7 +44,7 @@ import {MobileNav} from '../MobileNav/MobileNav';
|
|
|
44
44
|
import {useResizable} from '../Resizable/useResizable';
|
|
45
45
|
import type {ResizableConfig} from '../Resizable/useResizable';
|
|
46
46
|
import {ResizeHandle} from '../Resizable/ResizeHandle';
|
|
47
|
-
import {
|
|
47
|
+
import {themeProps} from '../utils/themeProps';
|
|
48
48
|
|
|
49
49
|
// =============================================================================
|
|
50
50
|
// Constants
|
|
@@ -427,7 +427,7 @@ export function SideNav({
|
|
|
427
427
|
<div
|
|
428
428
|
data-testid={testId}
|
|
429
429
|
{...mergeProps(
|
|
430
|
-
|
|
430
|
+
themeProps('side-nav', {mode: 'topbar'}),
|
|
431
431
|
stylex.props(styles.topbar, xstyle),
|
|
432
432
|
className,
|
|
433
433
|
style,
|
|
@@ -503,7 +503,7 @@ export function SideNav({
|
|
|
503
503
|
aria-label="Side navigation"
|
|
504
504
|
data-testid={testId}
|
|
505
505
|
{...mergeProps(
|
|
506
|
-
|
|
506
|
+
themeProps('side-nav'),
|
|
507
507
|
stylex.props(styles.root, collapsed && styles.rootCollapsed, xstyle),
|
|
508
508
|
className,
|
|
509
509
|
resizableNavStyle,
|
|
@@ -43,7 +43,7 @@ import {mergeProps, mergeRefs} from '../utils';
|
|
|
43
43
|
import type {BaseProps} from '../BaseProps';
|
|
44
44
|
import {useMenuHover} from '../hooks/useMenuHover';
|
|
45
45
|
import {NavHeadingCloseContext} from '../NavMenu/NavMenuContext';
|
|
46
|
-
import {
|
|
46
|
+
import {themeProps} from '../utils/themeProps';
|
|
47
47
|
|
|
48
48
|
// =============================================================================
|
|
49
49
|
// Styles
|
|
@@ -392,7 +392,7 @@ export function SideNavHeading({
|
|
|
392
392
|
aria-label={heading}
|
|
393
393
|
data-testid={testId}
|
|
394
394
|
{...mergeProps(
|
|
395
|
-
|
|
395
|
+
themeProps('side-nav-heading'),
|
|
396
396
|
stylex.props(navItemStyles.item, styles.rootCollapsed, xstyle),
|
|
397
397
|
className,
|
|
398
398
|
style,
|
|
@@ -411,7 +411,7 @@ export function SideNavHeading({
|
|
|
411
411
|
{...popover.triggerProps}
|
|
412
412
|
{...triggerProps}
|
|
413
413
|
{...mergeProps(
|
|
414
|
-
|
|
414
|
+
themeProps('side-nav-heading'),
|
|
415
415
|
stylex.props(
|
|
416
416
|
navItemStyles.item,
|
|
417
417
|
styles.rootCollapsed,
|
|
@@ -473,7 +473,7 @@ export function SideNavHeading({
|
|
|
473
473
|
ref={collapsedSetRef}
|
|
474
474
|
data-testid={testId}
|
|
475
475
|
{...mergeProps(
|
|
476
|
-
|
|
476
|
+
themeProps('side-nav-heading'),
|
|
477
477
|
stylex.props(styles.root, styles.rootCollapsed, xstyle),
|
|
478
478
|
className,
|
|
479
479
|
style,
|
|
@@ -571,7 +571,7 @@ export function SideNavHeading({
|
|
|
571
571
|
href={headingHref}
|
|
572
572
|
data-testid={testId}
|
|
573
573
|
{...mergeProps(
|
|
574
|
-
|
|
574
|
+
themeProps('side-nav-heading'),
|
|
575
575
|
stylex.props(styles.root, styles.menuTrigger, xstyle),
|
|
576
576
|
className,
|
|
577
577
|
style,
|
|
@@ -594,7 +594,7 @@ export function SideNavHeading({
|
|
|
594
594
|
data-testid={testId}
|
|
595
595
|
{...triggerProps}
|
|
596
596
|
{...mergeProps(
|
|
597
|
-
|
|
597
|
+
themeProps('side-nav-heading'),
|
|
598
598
|
stylex.props(styles.root, styles.menuTrigger, xstyle),
|
|
599
599
|
className,
|
|
600
600
|
style,
|
|
@@ -645,7 +645,7 @@ export function SideNavHeading({
|
|
|
645
645
|
data-testid={testId}
|
|
646
646
|
{...triggerProps}
|
|
647
647
|
{...mergeProps(
|
|
648
|
-
|
|
648
|
+
themeProps('side-nav-heading'),
|
|
649
649
|
stylex.props(styles.root, xstyle),
|
|
650
650
|
className,
|
|
651
651
|
style,
|
|
@@ -701,7 +701,7 @@ export function SideNavHeading({
|
|
|
701
701
|
ref={ref}
|
|
702
702
|
data-testid={testId}
|
|
703
703
|
{...mergeProps(
|
|
704
|
-
|
|
704
|
+
themeProps('side-nav-heading'),
|
|
705
705
|
stylex.props(styles.root, xstyle),
|
|
706
706
|
className,
|
|
707
707
|
style,
|
|
@@ -758,7 +758,7 @@ export function SideNavHeading({
|
|
|
758
758
|
ref={ref}
|
|
759
759
|
data-testid={testId}
|
|
760
760
|
{...mergeProps(
|
|
761
|
-
|
|
761
|
+
themeProps('side-nav-heading'),
|
|
762
762
|
stylex.props(styles.root, xstyle),
|
|
763
763
|
className,
|
|
764
764
|
style,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import {getIcon} from '../Icon/globalIconRegistry';
|
|
54
54
|
import {useSideNavRenderMode} from './SideNavRenderContext';
|
|
55
55
|
import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
|
|
56
|
-
import {
|
|
56
|
+
import {themeProps} from '../utils/themeProps';
|
|
57
57
|
|
|
58
58
|
// =============================================================================
|
|
59
59
|
// Styles
|
|
@@ -482,7 +482,7 @@ export function SideNavItem({
|
|
|
482
482
|
|
|
483
483
|
// Shared collapsed item styles — used by trigger, link, and button
|
|
484
484
|
const collapsedItemStyles = mergeProps(
|
|
485
|
-
|
|
485
|
+
themeProps('side-nav-item', {
|
|
486
486
|
size,
|
|
487
487
|
selected: isSelected ? 'selected' : null,
|
|
488
488
|
}),
|
|
@@ -583,7 +583,7 @@ export function SideNavItem({
|
|
|
583
583
|
);
|
|
584
584
|
|
|
585
585
|
const navItemStyleProps = mergeProps(
|
|
586
|
-
|
|
586
|
+
themeProps('side-nav-item', {
|
|
587
587
|
size,
|
|
588
588
|
selected: isSelected ? 'selected' : null,
|
|
589
589
|
}),
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {mergeProps} from '../utils';
|
|
30
30
|
import type {BaseProps} from '../BaseProps';
|
|
31
31
|
import {useSideNavCollapse} from './SideNavCollapseContext';
|
|
32
|
-
import {
|
|
32
|
+
import {themeProps} from '../utils/themeProps';
|
|
33
33
|
// =============================================================================
|
|
34
34
|
// Styles
|
|
35
35
|
// =============================================================================
|
|
@@ -187,7 +187,7 @@ export function SideNavSection({
|
|
|
187
187
|
aria-labelledby={titleId}
|
|
188
188
|
data-testid={testId}
|
|
189
189
|
{...mergeProps(
|
|
190
|
-
|
|
190
|
+
themeProps('side-nav-section'),
|
|
191
191
|
stylex.props(styles.root, xstyle),
|
|
192
192
|
className,
|
|
193
193
|
style,
|
|
@@ -19,7 +19,7 @@ import type {BaseProps} from '../BaseProps';
|
|
|
19
19
|
import * as stylex from '@stylexjs/stylex';
|
|
20
20
|
import {colorVars, radiusVars, durationVars} from '../theme/tokens.stylex';
|
|
21
21
|
import {mergeProps} from '../utils';
|
|
22
|
-
import {
|
|
22
|
+
import {themeProps} from '../utils/themeProps';
|
|
23
23
|
|
|
24
24
|
// =============================================================================
|
|
25
25
|
// Animation Timing Constants
|
|
@@ -182,7 +182,7 @@ export function Skeleton({
|
|
|
182
182
|
ref={ref}
|
|
183
183
|
data-testid={testId}
|
|
184
184
|
{...mergeProps(
|
|
185
|
-
|
|
185
|
+
themeProps('skeleton'),
|
|
186
186
|
stylex.props(
|
|
187
187
|
styles.root,
|
|
188
188
|
styles.animate,
|
package/src/Slider/Slider.tsx
CHANGED
|
@@ -41,7 +41,7 @@ import type {InputStatus} from '../Field/types';
|
|
|
41
41
|
import {mergeProps, mergeRefs} from '../utils';
|
|
42
42
|
import type {BaseProps} from '../BaseProps';
|
|
43
43
|
import type {SizeValue} from '../utils/types';
|
|
44
|
-
import {
|
|
44
|
+
import {themeProps} from '../utils/themeProps';
|
|
45
45
|
|
|
46
46
|
// =============================================================================
|
|
47
47
|
// Types
|
|
@@ -661,7 +661,7 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
661
661
|
aria-describedby={ariaDescribedBy}
|
|
662
662
|
onKeyDown={e => handleKeyDown(thumbIndex, e)}
|
|
663
663
|
{...mergeProps(
|
|
664
|
-
|
|
664
|
+
themeProps('slider-thumb', {
|
|
665
665
|
orientation,
|
|
666
666
|
disabled: isDisabled ? 'disabled' : null,
|
|
667
667
|
}),
|
|
@@ -751,7 +751,7 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
751
751
|
style={style}>
|
|
752
752
|
<div
|
|
753
753
|
{...mergeProps(
|
|
754
|
-
|
|
754
|
+
themeProps('slider', {
|
|
755
755
|
orientation,
|
|
756
756
|
disabled: isDisabled ? 'disabled' : null,
|
|
757
757
|
}),
|
|
@@ -775,7 +775,7 @@ export function Slider({ref, ...props}: SliderProps) {
|
|
|
775
775
|
<div
|
|
776
776
|
aria-hidden="true"
|
|
777
777
|
{...mergeProps(
|
|
778
|
-
|
|
778
|
+
themeProps('slider-track', {orientation}),
|
|
779
779
|
stylex.props(
|
|
780
780
|
styles.track,
|
|
781
781
|
isHorizontal ? styles.trackHorizontal : styles.trackVertical,
|
package/src/Spinner/Spinner.tsx
CHANGED
|
@@ -23,7 +23,7 @@ import {useTheme} from '../theme/useTheme';
|
|
|
23
23
|
import type {BaseProps} from '../BaseProps';
|
|
24
24
|
import {Text} from '../Text/Text';
|
|
25
25
|
import {mergeProps} from '../utils';
|
|
26
|
-
import {
|
|
26
|
+
import {themeProps} from '../utils/themeProps';
|
|
27
27
|
|
|
28
28
|
// =============================================================================
|
|
29
29
|
// Constants
|
|
@@ -261,7 +261,7 @@ export function Spinner({
|
|
|
261
261
|
data-testid={hasLabel ? undefined : testId}
|
|
262
262
|
{...(hasLabel ? {} : restProps)}
|
|
263
263
|
{...mergeProps(
|
|
264
|
-
hasLabel ? '' :
|
|
264
|
+
hasLabel ? '' : themeProps('spinner', {size, shade}),
|
|
265
265
|
stylex.props(styles.spinner, !hasLabel && xstyle),
|
|
266
266
|
hasLabel ? undefined : className,
|
|
267
267
|
{...(hasLabel ? {} : style), width: frameSize, height: frameSize},
|
|
@@ -280,7 +280,7 @@ export function Spinner({
|
|
|
280
280
|
data-testid={testId}
|
|
281
281
|
{...restProps}
|
|
282
282
|
{...mergeProps(
|
|
283
|
-
|
|
283
|
+
themeProps('spinner', {size, shade}),
|
|
284
284
|
stylex.props(styles.wrapper, xstyle),
|
|
285
285
|
className,
|
|
286
286
|
style,
|
package/src/Stack/Stack.tsx
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from './stack.stylex';
|
|
27
27
|
import type {SizeValue} from '../utils/types';
|
|
28
28
|
import {mergeProps} from '../utils';
|
|
29
|
-
import {
|
|
29
|
+
import {themeProps} from '../utils/themeProps';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Alignment values accepted by Stack.
|
|
@@ -233,7 +233,7 @@ export function Stack({
|
|
|
233
233
|
{
|
|
234
234
|
ref: ref as Ref<Element>,
|
|
235
235
|
...mergeProps(
|
|
236
|
-
|
|
236
|
+
themeProps('stack', {direction, gap, wrap}),
|
|
237
237
|
stylexProps,
|
|
238
238
|
className,
|
|
239
239
|
{...style, ...sizingStyle},
|
package/src/Stack/StackItem.tsx
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
type StackItemSize,
|
|
22
22
|
} from './stackItem.stylex';
|
|
23
23
|
import {mergeProps} from '../utils';
|
|
24
|
-
import {
|
|
24
|
+
import {themeProps} from '../utils/themeProps';
|
|
25
25
|
|
|
26
26
|
export interface StackItemProps extends BaseProps<HTMLElement> {
|
|
27
27
|
/** Ref forwarded to the root element */
|
|
@@ -110,7 +110,7 @@ export function StackItem({
|
|
|
110
110
|
{
|
|
111
111
|
ref: ref as Ref<Element>,
|
|
112
112
|
...mergeProps(
|
|
113
|
-
|
|
113
|
+
themeProps('stack-item', {size}),
|
|
114
114
|
stylexProps,
|
|
115
115
|
className,
|
|
116
116
|
style,
|
|
@@ -21,7 +21,7 @@ import {colorVars} from '../theme/tokens.stylex';
|
|
|
21
21
|
import type {BaseProps} from '../BaseProps';
|
|
22
22
|
import {Tooltip} from '../Tooltip/Tooltip';
|
|
23
23
|
import {mergeProps} from '../utils';
|
|
24
|
-
import {
|
|
24
|
+
import {themeProps} from '../utils/themeProps';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Pulse animation keyframes
|
|
@@ -160,7 +160,7 @@ export function StatusDot({
|
|
|
160
160
|
role="img"
|
|
161
161
|
aria-label={label}
|
|
162
162
|
{...mergeProps(
|
|
163
|
-
|
|
163
|
+
themeProps('statusdot', {variant}),
|
|
164
164
|
stylex.props(
|
|
165
165
|
styles.base,
|
|
166
166
|
variants[variant],
|