@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
|
@@ -26,14 +26,14 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
26
26
|
import { usePopover } from "../Popover/usePopover.js";
|
|
27
27
|
import { Button } from "../Button/index.js";
|
|
28
28
|
import { Icon } from "../Icon/index.js";
|
|
29
|
-
import {
|
|
29
|
+
import { renderDropdownItems } from "./renderDropdownItems.js";
|
|
30
30
|
import { DropdownMenuContext } from "./DropdownMenuContext.js";
|
|
31
31
|
import { useListFocus } from "../hooks/useListFocus.js";
|
|
32
32
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
33
33
|
import "../theme/tokens.stylex.js";
|
|
34
34
|
import { spacingVars, radiusVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
35
35
|
import { mergeProps } from "../utils/index.js";
|
|
36
|
-
import {
|
|
36
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
37
37
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
38
|
const styles = {
|
|
39
39
|
dropdown: {
|
|
@@ -265,7 +265,7 @@ export function DropdownMenu({
|
|
|
265
265
|
}), [closeMenu, menuSize]);
|
|
266
266
|
|
|
267
267
|
// Resolve menu content: data-driven items become components
|
|
268
|
-
const menuContent = props.items !== undefined ?
|
|
268
|
+
const menuContent = props.items !== undefined ? renderDropdownItems(items) : children;
|
|
269
269
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
270
270
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
271
271
|
...button,
|
|
@@ -294,7 +294,7 @@ export function DropdownMenu({
|
|
|
294
294
|
id: menuId,
|
|
295
295
|
role: "menu",
|
|
296
296
|
onKeyDown: listKeyDown,
|
|
297
|
-
...mergeProps(
|
|
297
|
+
...mergeProps(themeProps('dropdown-menu'), stylex.props(styles.dropdown, xstyle), className, style),
|
|
298
298
|
children: /*#__PURE__*/_jsx(DropdownMenuContext, {
|
|
299
299
|
value: contextValue,
|
|
300
300
|
children: menuContent
|
|
@@ -30,7 +30,7 @@ import "../theme/tokens.stylex.js";
|
|
|
30
30
|
import { colorVars, spacingVars, typographyVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
31
31
|
import { mergeProps } from "../utils/index.js";
|
|
32
32
|
import { useDropdownMenuContext } from "./DropdownMenuContext.js";
|
|
33
|
-
import {
|
|
33
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
34
34
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
35
|
const menuItemStyles = {
|
|
36
36
|
root: {
|
|
@@ -115,7 +115,7 @@ export function DropdownMenuItem({
|
|
|
115
115
|
onClick: handleClick,
|
|
116
116
|
isDisabled: isDisabled,
|
|
117
117
|
xstyle: [menuItemStyles.root, itemSizeStyles[menuSize], isDisabled && menuItemStyles.disabled, xstyle],
|
|
118
|
-
...mergeProps(
|
|
118
|
+
...mergeProps(themeProps('dropdown-menu-item', {
|
|
119
119
|
size: menuSize
|
|
120
120
|
}), {
|
|
121
121
|
className,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file
|
|
2
|
+
* @file renderDropdownItems.tsx
|
|
3
3
|
* @output Converts data-driven menu items into DropdownMenuItem components
|
|
4
4
|
* @position Utility; used by DropdownMenu to unify data-driven and compound paths
|
|
5
5
|
*/
|
|
@@ -9,5 +9,5 @@ import type { DropdownMenuOption } from './DropdownMenu';
|
|
|
9
9
|
* Converts data-driven items into DropdownMenuItem components,
|
|
10
10
|
* so both modes share the same rendering and keyboard navigation path.
|
|
11
11
|
*/
|
|
12
|
-
export declare function
|
|
13
|
-
//# sourceMappingURL=
|
|
12
|
+
export declare function renderDropdownItems(items: DropdownMenuOption[]): ReactNode;
|
|
13
|
+
//# sourceMappingURL=renderDropdownItems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderDropdownItems.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/renderDropdownItems.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAUrC,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AAyBxB;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,kBAAkB,EAAE,GAC1B,SAAS,CA8CX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file
|
|
4
|
+
* @file renderDropdownItems.tsx
|
|
5
5
|
* @output Converts data-driven menu items into DropdownMenuItem components
|
|
6
6
|
* @position Utility; used by DropdownMenu to unify data-driven and compound paths
|
|
7
7
|
*/
|
|
@@ -29,7 +29,7 @@ function getSectionKey(section, index) {
|
|
|
29
29
|
* Converts data-driven items into DropdownMenuItem components,
|
|
30
30
|
* so both modes share the same rendering and keyboard navigation path.
|
|
31
31
|
*/
|
|
32
|
-
export function
|
|
32
|
+
export function renderDropdownItems(items) {
|
|
33
33
|
const elements = [];
|
|
34
34
|
for (let i = 0; i < items.length; i++) {
|
|
35
35
|
const option = items[i];
|
|
@@ -19,7 +19,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
19
19
|
import "../theme/tokens.stylex.js";
|
|
20
20
|
import { colorVars, spacingVars, fontWeightVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
21
21
|
import { mergeProps } from "../utils/index.js";
|
|
22
|
-
import {
|
|
22
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
const styles = {
|
|
25
25
|
container: {
|
|
@@ -78,7 +78,7 @@ export function EmptyState({
|
|
|
78
78
|
return /*#__PURE__*/_jsxs("div", {
|
|
79
79
|
ref: ref,
|
|
80
80
|
role: "status",
|
|
81
|
-
...mergeProps(
|
|
81
|
+
...mergeProps(themeProps('empty-state', {
|
|
82
82
|
variant: isCompact ? 'compact' : null
|
|
83
83
|
}), stylex.props(styles.container, isCompact && styles.containerCompact, xstyle), className, style),
|
|
84
84
|
...props,
|
package/dist/Field/Field.js
CHANGED
|
@@ -24,7 +24,7 @@ import { spacingVars, borderVars } from "../theme/tokens.stylex.js";
|
|
|
24
24
|
import { mergeProps } from "../utils/index.js";
|
|
25
25
|
import { FormLayoutContext } from "../FormLayout/FormLayoutContext.js";
|
|
26
26
|
import { Text } from "../Text/index.js";
|
|
27
|
-
import {
|
|
27
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
29
|
const styles = {
|
|
30
30
|
container: {
|
|
@@ -121,7 +121,7 @@ export function Field({
|
|
|
121
121
|
if (isHorizontalLabels) {
|
|
122
122
|
return /*#__PURE__*/_jsxs("div", {
|
|
123
123
|
ref: ref,
|
|
124
|
-
...mergeProps(
|
|
124
|
+
...mergeProps(themeProps('field', {
|
|
125
125
|
layout: 'horizontal-labels'
|
|
126
126
|
}), stylex.props(styles.horizontalLabels, xstyle), className, style),
|
|
127
127
|
...props,
|
|
@@ -147,7 +147,7 @@ export function Field({
|
|
|
147
147
|
// ─── Default mode (vertical / horizontal) ─────────────────────────────
|
|
148
148
|
return /*#__PURE__*/_jsxs("div", {
|
|
149
149
|
ref: ref,
|
|
150
|
-
...mergeProps(
|
|
150
|
+
...mergeProps(themeProps('field'), stylex.props(styles.container, !isLabelHidden && styles.containerGap, width != null && dynamicStyles.width(width), xstyle), className, style),
|
|
151
151
|
...props,
|
|
152
152
|
children: [labelNode, statusVariant === 'attached' ? /*#__PURE__*/_jsxs("div", {
|
|
153
153
|
...{
|
package/dist/Field/FieldLabel.js
CHANGED
|
@@ -18,7 +18,7 @@ import "../theme/tokens.stylex.js";
|
|
|
18
18
|
import { colorVars, fontWeightVars, spacingVars, typographyVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
19
19
|
import { Icon, renderIconSlot } from "../Icon/index.js";
|
|
20
20
|
import { Tooltip } from "../Tooltip/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
23
|
/**
|
|
24
24
|
* Label + description group for form fields. Handles sr-only hiding,
|
|
@@ -51,7 +51,7 @@ export function FieldLabel({
|
|
|
51
51
|
children: [/*#__PURE__*/_jsxs("label", {
|
|
52
52
|
ref: ref,
|
|
53
53
|
htmlFor: inputID,
|
|
54
|
-
...mergeProps(
|
|
54
|
+
...mergeProps(themeProps('field-label'), {
|
|
55
55
|
0: {
|
|
56
56
|
className: "x78zum5 x6s0dn4 xzye2dw x9ynric xcr08ib x1e4wzip xv1l7n4 x1ypdohk"
|
|
57
57
|
},
|
|
@@ -22,7 +22,7 @@ import { mergeProps } from "../utils/index.js";
|
|
|
22
22
|
import "../theme/tokens.stylex.js";
|
|
23
23
|
import { colorVars, radiusVars, spacingVars, typographyVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
24
24
|
import { useEntryAnimation } from "../hooks/useEntryAnimation.js";
|
|
25
|
-
import {
|
|
25
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
26
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
27
|
const styles = {
|
|
28
28
|
base: {
|
|
@@ -118,7 +118,7 @@ export function FieldStatus({
|
|
|
118
118
|
role: type === 'error' ? 'alert' : 'status',
|
|
119
119
|
"aria-live": type === 'error' ? 'assertive' : 'polite',
|
|
120
120
|
...rest,
|
|
121
|
-
...mergeProps(
|
|
121
|
+
...mergeProps(themeProps('field-status', {
|
|
122
122
|
type,
|
|
123
123
|
variant
|
|
124
124
|
}), stylex.props(styles.base, entryStyle, variant === 'attached' ? styles.attached : styles.detached, colorStyles[type], xstyle), className, style),
|
|
@@ -23,7 +23,7 @@ import { Field, InputClearButton } from "../Field/index.js";
|
|
|
23
23
|
import { Icon } from "../Icon/index.js";
|
|
24
24
|
import { Spinner } from "../Spinner/index.js";
|
|
25
25
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
26
|
-
import {
|
|
26
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
27
27
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
function formatFileSize(bytes) {
|
|
29
29
|
if (bytes < 1024) {
|
|
@@ -399,7 +399,7 @@ export function FileInput({
|
|
|
399
399
|
"aria-label": label,
|
|
400
400
|
"aria-busy": isLoading || undefined,
|
|
401
401
|
...dragDropProps,
|
|
402
|
-
...mergeProps(
|
|
402
|
+
...mergeProps(themeProps('file-input', {
|
|
403
403
|
mode,
|
|
404
404
|
status: status?.type ?? null
|
|
405
405
|
}), stylex.props(isDropzone ? styles.dropzone : styles.compact, isDropzone && !isDisabled && styles.dropzoneHover, isDropzone && isDragOver && styles.dropzoneActive, isDropzone && isDisabled && styles.dropzoneDisabled, !isDropzone && isDisabled && styles.compactDisabled, status && statusBorderStyles[status.type], xstyle), className, style),
|
|
@@ -20,7 +20,7 @@ import "../theme/tokens.stylex.js";
|
|
|
20
20
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
21
21
|
import { FormLayoutContext } from "./FormLayoutContext.js";
|
|
22
22
|
import { mergeProps } from "../utils/index.js";
|
|
23
|
-
import {
|
|
23
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
24
24
|
|
|
25
25
|
// =============================================================================
|
|
26
26
|
// Responsive breakpoint for horizontal-labels collapse
|
|
@@ -99,7 +99,7 @@ export function FormLayout({
|
|
|
99
99
|
value: contextValue,
|
|
100
100
|
children: /*#__PURE__*/_jsx("div", {
|
|
101
101
|
ref: ref,
|
|
102
|
-
...mergeProps(
|
|
102
|
+
...mergeProps(themeProps('form-layout', {
|
|
103
103
|
direction
|
|
104
104
|
}), stylex.props(styles.base, direction === 'horizontal' && styles.horizontal, direction === 'horizontal-labels' && styles.horizontalLabels, xstyle), className, style),
|
|
105
105
|
...props,
|
package/dist/Grid/Grid.js
CHANGED
|
@@ -18,7 +18,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
18
18
|
import "../theme/tokens.stylex.js";
|
|
19
19
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
20
20
|
import { mergeProps } from "../utils/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Grid alignment options for align-items and justify-items.
|
|
@@ -325,11 +325,11 @@ export function Grid({
|
|
|
325
325
|
})
|
|
326
326
|
};
|
|
327
327
|
|
|
328
|
-
// For
|
|
328
|
+
// For themeProps, extract numeric columns value for variant tracking
|
|
329
329
|
const columnsVariant = typeof columns === 'number' ? columns : typeof columns === 'object' ? undefined : undefined;
|
|
330
330
|
return /*#__PURE__*/_jsx("div", {
|
|
331
331
|
ref: ref,
|
|
332
|
-
...mergeProps(
|
|
332
|
+
...mergeProps(themeProps('grid', {
|
|
333
333
|
columns: columnsVariant,
|
|
334
334
|
gap,
|
|
335
335
|
align,
|
package/dist/Grid/GridSpan.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import * as stylex from '@stylexjs/stylex';
|
|
17
17
|
import { mergeProps } from "../utils/index.js";
|
|
18
|
-
import {
|
|
18
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
const baseStyles = {
|
|
21
21
|
span: {
|
|
@@ -61,7 +61,7 @@ export function GridSpan({
|
|
|
61
61
|
};
|
|
62
62
|
return /*#__PURE__*/_jsx("div", {
|
|
63
63
|
ref: ref,
|
|
64
|
-
...mergeProps(
|
|
64
|
+
...mergeProps(themeProps('grid-span'), stylex.props(baseStyles.span, xstyle), className, {
|
|
65
65
|
...style,
|
|
66
66
|
...inlineStyle
|
|
67
67
|
}),
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -21,7 +21,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
21
21
|
import { colorStyles, sizeByLevelStyles, sizeByTypeStyles, defaultWeightByTypeStyles, displayStyles, justifyStyles, truncationStyles, wordBreakStyles, textWrapStyles, capsizeStyles, decorationStyles, truncationTooltipStyles } from "../Text/text.stylex.js";
|
|
22
22
|
import { useTruncation } from "../Text/useTruncation.js";
|
|
23
23
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
24
|
-
import {
|
|
24
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
25
25
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
26
|
const LazyXDSTooltip = /*#__PURE__*/lazy(async () => import('../Tooltip/Tooltip').then(mod => ({
|
|
27
27
|
default: mod.Tooltip
|
|
@@ -113,7 +113,7 @@ export function Heading({
|
|
|
113
113
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
114
114
|
children: [/*#__PURE__*/_jsx(Component, {
|
|
115
115
|
ref: mergeRefs(ref, truncation.ref, headingRef),
|
|
116
|
-
...mergeProps(
|
|
116
|
+
...mergeProps(themeProps('heading', {
|
|
117
117
|
level,
|
|
118
118
|
color,
|
|
119
119
|
...(type && {
|
|
@@ -18,7 +18,7 @@ import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
|
18
18
|
import "../theme/tokens.stylex.js";
|
|
19
19
|
import { colorVars, shadowVars, radiusVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
20
20
|
import { mergeProps } from "../utils/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const styles = {
|
|
24
24
|
container: {
|
|
@@ -264,7 +264,7 @@ export function useHoverCard(options = {}) {
|
|
|
264
264
|
xstyle: [popoverXstyle, layerAnimations[renderPlacement]]
|
|
265
265
|
};
|
|
266
266
|
return layer.render(/*#__PURE__*/_jsx("div", {
|
|
267
|
-
...mergeProps(
|
|
267
|
+
...mergeProps(themeProps('hovercard'), {
|
|
268
268
|
className: "x1vlblms xvmdzux x126nfab x1t818jl"
|
|
269
269
|
}),
|
|
270
270
|
onMouseEnter: () => {
|
package/dist/Icon/Icon.js
CHANGED
|
@@ -27,7 +27,7 @@ import "../theme/tokens.stylex.js";
|
|
|
27
27
|
import { colorVars } from "../theme/tokens.stylex.js";
|
|
28
28
|
import { getIcon } from "./globalIconRegistry.js";
|
|
29
29
|
import { mergeProps } from "../utils/index.js";
|
|
30
|
-
import {
|
|
30
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
31
31
|
|
|
32
32
|
// =============================================================================
|
|
33
33
|
// Styles
|
|
@@ -231,7 +231,7 @@ export function Icon({
|
|
|
231
231
|
return /*#__PURE__*/_jsx(IconComponent, {
|
|
232
232
|
ref: ref,
|
|
233
233
|
"aria-hidden": "true",
|
|
234
|
-
...mergeProps(
|
|
234
|
+
...mergeProps(themeProps('icon', {
|
|
235
235
|
size,
|
|
236
236
|
color
|
|
237
237
|
}), stylex.props(styles.root, colorStyles[color], sizeStyles[size])),
|
|
@@ -263,7 +263,7 @@ function IconFromRegistry({
|
|
|
263
263
|
}
|
|
264
264
|
return /*#__PURE__*/_jsx("span", {
|
|
265
265
|
...spanProps,
|
|
266
|
-
...mergeProps(
|
|
266
|
+
...mergeProps(themeProps('icon', {
|
|
267
267
|
size,
|
|
268
268
|
color
|
|
269
269
|
}), stylex.props(styles.span, colorStyles[color], spanSizeStyles[size])),
|
|
@@ -27,7 +27,7 @@ import { Field } from "../Field/index.js";
|
|
|
27
27
|
import { SizeProvider, useSize } from "../SizeContext/SizeContext.js";
|
|
28
28
|
import { mergeProps } from "../utils/index.js";
|
|
29
29
|
import { InputGroupContext } from "./InputGroupContext.js";
|
|
30
|
-
import {
|
|
30
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
31
31
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
32
|
const styles = {
|
|
33
33
|
group: {
|
|
@@ -117,7 +117,7 @@ export function InputGroup({
|
|
|
117
117
|
"aria-label": label,
|
|
118
118
|
"data-testid": testId,
|
|
119
119
|
...rest,
|
|
120
|
-
...mergeProps(
|
|
120
|
+
...mergeProps(themeProps('input-group', {
|
|
121
121
|
size,
|
|
122
122
|
status: status?.type ?? null
|
|
123
123
|
}), stylex.props(styles.group, sizeStyles[size], isDisabled && styles.disabled, xstyle), className, style),
|
|
@@ -18,7 +18,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
18
18
|
import "../theme/tokens.stylex.js";
|
|
19
19
|
import { colorVars, spacingVars, radiusVars, typographyVars, typeScaleVars, borderVars } from "../theme/tokens.stylex.js";
|
|
20
20
|
import { mergeProps } from "../utils/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
const styles = {
|
|
24
24
|
text: {
|
|
@@ -65,7 +65,7 @@ export function InputGroupText({
|
|
|
65
65
|
return /*#__PURE__*/_jsx("div", {
|
|
66
66
|
ref: ref,
|
|
67
67
|
...rest,
|
|
68
|
-
...mergeProps(
|
|
68
|
+
...mergeProps(themeProps('input-group-text'), stylex.props(styles.text, xstyle), className, style),
|
|
69
69
|
children: children
|
|
70
70
|
});
|
|
71
71
|
}
|
package/dist/Item/Item.js
CHANGED
|
@@ -21,7 +21,7 @@ import { colorVars, radiusVars, spacingVars, durationVars, easeVars, typeScaleVa
|
|
|
21
21
|
import { mergeProps } from "../utils/index.js";
|
|
22
22
|
import { computeTargetAndRel } from "../Link/computeTargetAndRel.js";
|
|
23
23
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
24
|
-
import {
|
|
24
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
25
25
|
|
|
26
26
|
// =============================================================================
|
|
27
27
|
// Types
|
|
@@ -283,7 +283,7 @@ export function Item({
|
|
|
283
283
|
"aria-selected": isSelected || undefined,
|
|
284
284
|
"aria-disabled": isDisabled || undefined,
|
|
285
285
|
...restProps,
|
|
286
|
-
...mergeProps(
|
|
286
|
+
...mergeProps(themeProps('item', {
|
|
287
287
|
density,
|
|
288
288
|
align
|
|
289
289
|
}), stylex.props(styles.root, densityStyles[density], align === 'start' && styles.alignStart, isInteractive && styles.interactive, isInteractive && styles.focusVisibleOutline, isHighlighted && styles.highlighted, isSelected && styles.selected, isDisabled && !hasParentRole && styles.disabled, xstyle), className, style),
|
package/dist/Kbd/Kbd.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import React, { useSyncExternalStore } from 'react';
|
|
16
16
|
import * as stylex from '@stylexjs/stylex';
|
|
17
17
|
import { mergeProps } from "../utils/index.js";
|
|
18
|
-
import {
|
|
18
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
19
19
|
import "../theme/tokens.stylex.js";
|
|
20
20
|
import { colorVars, spacingVars, radiusVars, typographyVars, fontWeightVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -118,7 +118,7 @@ export function Kbd({
|
|
|
118
118
|
return /*#__PURE__*/_jsx("span", {
|
|
119
119
|
ref: ref,
|
|
120
120
|
...rest,
|
|
121
|
-
...mergeProps(
|
|
121
|
+
...mergeProps(themeProps('kbd'), stylex.props(styles.wrapper, xstyle), className, style),
|
|
122
122
|
"aria-hidden": "true",
|
|
123
123
|
children: parts.map(key => /*#__PURE__*/_jsx("kbd", {
|
|
124
124
|
...{
|
package/dist/Layer/useLayer.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ContextRenderProps {
|
|
|
30
30
|
xstyle?: StyleXStyles;
|
|
31
31
|
/**
|
|
32
32
|
* Additional CSS class name(s) for the popover container.
|
|
33
|
-
* Use with
|
|
33
|
+
* Use with themeProps() for theme targeting when reflecting visual props.
|
|
34
34
|
*/
|
|
35
35
|
className?: string;
|
|
36
36
|
/**
|
|
@@ -51,7 +51,7 @@ export interface FixedRenderProps {
|
|
|
51
51
|
xstyle?: StyleXStyles;
|
|
52
52
|
/**
|
|
53
53
|
* Additional CSS class name(s) for the popover container.
|
|
54
|
-
* Use with
|
|
54
|
+
* Use with themeProps() for theme targeting when reflecting visual props.
|
|
55
55
|
*/
|
|
56
56
|
className?: string;
|
|
57
57
|
/**
|
package/dist/Layout/Layout.js
CHANGED
|
@@ -24,7 +24,7 @@ import { LayoutDividerContext } from "./LayoutDividerContext.js";
|
|
|
24
24
|
import { stack } from "../Stack/stack.stylex.js";
|
|
25
25
|
import { stackItem } from "../Stack/stackItem.stylex.js";
|
|
26
26
|
import { mergeProps } from "../utils/index.js";
|
|
27
|
-
import {
|
|
27
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
28
28
|
import { layoutPaddingOuterXVarStyles, layoutPaddingOuterYVarStyles } from "./padding.stylex.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -189,7 +189,7 @@ export function Layout({
|
|
|
189
189
|
value: slotsValue,
|
|
190
190
|
children: /*#__PURE__*/_jsx("div", {
|
|
191
191
|
ref: ref,
|
|
192
|
-
...mergeProps(
|
|
192
|
+
...mergeProps(themeProps('layout', {
|
|
193
193
|
height
|
|
194
194
|
}), stylex.props(styles.layoutOuter, isFill ? styles.fill : styles.auto, xstyle), className, style),
|
|
195
195
|
children: /*#__PURE__*/_jsxs("div", {
|
|
@@ -20,7 +20,7 @@ import "../theme/tokens.stylex.js";
|
|
|
20
20
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
21
21
|
import { LayoutSlotsContext } from "./LayoutSlotsContext.js";
|
|
22
22
|
import { mergeProps } from "../utils/index.js";
|
|
23
|
-
import {
|
|
23
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
24
24
|
import { paddingStyles, containerPaddingInlineVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles } from "./padding.stylex.js";
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
26
|
const styles = {
|
|
@@ -134,7 +134,7 @@ export function LayoutContent({
|
|
|
134
134
|
ref: ref,
|
|
135
135
|
role: role,
|
|
136
136
|
"aria-label": label,
|
|
137
|
-
...mergeProps(
|
|
137
|
+
...mergeProps(themeProps('layout-content'), stylex.props(styles.content,
|
|
138
138
|
// Outer padding on container edges (unless content is full bleed)
|
|
139
139
|
!hasStart && !isZeroPadding && padding == null && styles.noStart, !hasEnd && !isZeroPadding && padding == null && styles.noEnd, !hasHeader && !isZeroPadding && padding == null && styles.noHeader, !hasFooter && !isZeroPadding && padding == null && styles.noFooter, isScrollable && styles.scrollable, isZeroPadding && styles.fullBleed, padding != null && paddingStyles[padding], padding != null && containerPaddingInlineVarStyles[padding], padding != null && containerPaddingBlockStartVarStyles[padding], padding != null && containerPaddingBlockEndVarStyles[padding], xstyle), className, style),
|
|
140
140
|
...props,
|
|
@@ -20,7 +20,7 @@ import { LayoutDividerContext } from "./LayoutDividerContext.js";
|
|
|
20
20
|
import "../theme/tokens.stylex.js";
|
|
21
21
|
import { colorVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
22
22
|
import { mergeProps } from "../utils/index.js";
|
|
23
|
-
import {
|
|
23
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
24
24
|
import { paddingStyles, containerPaddingInlineVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles } from "./padding.stylex.js";
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
26
|
const styles = {
|
|
@@ -108,7 +108,7 @@ export function LayoutFooter({
|
|
|
108
108
|
role: role,
|
|
109
109
|
"aria-label": label,
|
|
110
110
|
"data-divider": resolvedHasDivider || undefined,
|
|
111
|
-
...mergeProps(
|
|
111
|
+
...mergeProps(themeProps('layout-footer'), stylex.props(styles.footer, dynamicStyles.sizing(height ?? null), resolvedHasDivider && styles.divider, xstyle), className, style),
|
|
112
112
|
...props,
|
|
113
113
|
children: /*#__PURE__*/_jsx("div", {
|
|
114
114
|
...stylex.props(styles.inner, isZeroPadding && styles.fullBleed, padding != null && paddingStyles[padding], padding != null && containerPaddingInlineVarStyles[padding], padding != null && containerPaddingBlockStartVarStyles[padding], padding != null && containerPaddingBlockEndVarStyles[padding]),
|
|
@@ -20,7 +20,7 @@ import { LayoutDividerContext } from "./LayoutDividerContext.js";
|
|
|
20
20
|
import "../theme/tokens.stylex.js";
|
|
21
21
|
import { colorVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
22
22
|
import { mergeProps } from "../utils/index.js";
|
|
23
|
-
import {
|
|
23
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
24
24
|
import { paddingStyles, containerPaddingInlineVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles } from "./padding.stylex.js";
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
26
|
const styles = {
|
|
@@ -108,7 +108,7 @@ export function LayoutHeader({
|
|
|
108
108
|
role: role,
|
|
109
109
|
"aria-label": label,
|
|
110
110
|
"data-divider": resolvedHasDivider || undefined,
|
|
111
|
-
...mergeProps(
|
|
111
|
+
...mergeProps(themeProps('layout-header'), stylex.props(styles.header, dynamicStyles.sizing(height ?? null), resolvedHasDivider && styles.divider, xstyle), className, style),
|
|
112
112
|
...props,
|
|
113
113
|
children: /*#__PURE__*/_jsx("div", {
|
|
114
114
|
...stylex.props(styles.inner, isZeroPadding && styles.fullBleed, padding != null && paddingStyles[padding], padding != null && containerPaddingInlineVarStyles[padding], padding != null && containerPaddingBlockStartVarStyles[padding], padding != null && containerPaddingBlockEndVarStyles[padding]),
|
|
@@ -21,7 +21,7 @@ import { colorVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
|
21
21
|
import { LayoutAreaContext } from "./LayoutAreaContext.js";
|
|
22
22
|
import { LayoutSlotsContext } from "./LayoutSlotsContext.js";
|
|
23
23
|
import { mergeProps } from "../utils/index.js";
|
|
24
|
-
import {
|
|
24
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
25
25
|
import { paddingStyles, containerPaddingInlineVarStyles, containerPaddingBlockStartVarStyles, containerPaddingBlockEndVarStyles } from "./padding.stylex.js";
|
|
26
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
27
|
const styles = {
|
|
@@ -170,7 +170,7 @@ export function LayoutPanel({
|
|
|
170
170
|
ref: ref,
|
|
171
171
|
role: role,
|
|
172
172
|
"aria-label": label,
|
|
173
|
-
...mergeProps(
|
|
173
|
+
...mergeProps(themeProps('layout-panel'), stylex.props(styles.panel, dynamicStyles.sizing(effectiveWidth ?? null),
|
|
174
174
|
// Outer padding on container edges (unless component is full bleed)
|
|
175
175
|
isStartPanel && !isZeroPadding && padding == null && styles.startPanel, isEndPanel && !isZeroPadding && padding == null && styles.endPanel, !hasHeader && !isZeroPadding && padding == null && styles.noHeader, !hasFooter && !isZeroPadding && padding == null && styles.noFooter, isScrollable && styles.scrollable, isZeroPadding && styles.fullBleed, padding != null && paddingStyles[padding], padding != null && containerPaddingInlineVarStyles[padding], padding != null && containerPaddingBlockStartVarStyles[padding], padding != null && containerPaddingBlockEndVarStyles[padding], hasDivider && dividerStyle, shouldCollapseSpacing && collapseStyle, xstyle), className, style),
|
|
176
176
|
...props,
|
|
@@ -24,7 +24,7 @@ import { IconButton } from "../IconButton/index.js";
|
|
|
24
24
|
import { useScrollLock } from "../hooks/useScrollLock.js";
|
|
25
25
|
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
26
26
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
27
|
-
import {
|
|
27
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Media type for lightbox items.
|
|
@@ -313,7 +313,7 @@ export function Lightbox({
|
|
|
313
313
|
onKeyDownProp?.(e);
|
|
314
314
|
},
|
|
315
315
|
"aria-label": currentItem.alt || 'Media viewer',
|
|
316
|
-
...mergeProps(
|
|
316
|
+
...mergeProps(themeProps('lightbox'), stylex.props(styles.dialog, xstyle), className, style),
|
|
317
317
|
...props,
|
|
318
318
|
children: /*#__PURE__*/_jsxs("div", {
|
|
319
319
|
...{
|
package/dist/Link/Link.js
CHANGED
|
@@ -25,7 +25,7 @@ import { useLinkComponent } from "./useLinkComponent.js";
|
|
|
25
25
|
import { mergeProps } from "../utils/index.js";
|
|
26
26
|
import { computeTargetAndRel } from "./computeTargetAndRel.js";
|
|
27
27
|
import { useInteractiveRole } from "../hooks/useInteractiveRole.js";
|
|
28
|
-
import {
|
|
28
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Base link styles
|
|
@@ -184,7 +184,7 @@ export function Link({
|
|
|
184
184
|
"aria-disabled": isDisabled || undefined,
|
|
185
185
|
tabIndex: isDisabled ? -1 : undefined,
|
|
186
186
|
disabled: isDisabled,
|
|
187
|
-
...mergeProps(
|
|
187
|
+
...mergeProps(themeProps('link', {
|
|
188
188
|
color
|
|
189
189
|
}), stylex.props(styles.base, styles.buttonReset, linkColorStyles[color], hasUnderline && styles.hasUnderline, isStandalone && styles.standalone, isDisabled && styles.disabled, xstyle), className, style),
|
|
190
190
|
...props,
|
|
@@ -200,7 +200,7 @@ export function Link({
|
|
|
200
200
|
"aria-label": label || undefined,
|
|
201
201
|
"aria-disabled": isDisabled || undefined,
|
|
202
202
|
tabIndex: isDisabled ? -1 : undefined,
|
|
203
|
-
...mergeProps(
|
|
203
|
+
...mergeProps(themeProps('link', {
|
|
204
204
|
color
|
|
205
205
|
}), stylex.props(styles.base, linkColorStyles[color], hasUnderline && styles.hasUnderline, isStandalone && styles.standalone, isDisabled && styles.disabled, xstyle), className, style),
|
|
206
206
|
...props,
|
package/dist/List/List.js
CHANGED
|
@@ -21,7 +21,7 @@ import "../theme/tokens.stylex.js";
|
|
|
21
21
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
22
22
|
import { ListContext } from "./ListContext.js";
|
|
23
23
|
import { mergeProps } from "../utils/index.js";
|
|
24
|
-
import {
|
|
24
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
26
|
// =============================================================================
|
|
27
27
|
// Styles
|
|
@@ -109,7 +109,7 @@ export function List({
|
|
|
109
109
|
...(listStyle === 'none' && !isOrdered ? {
|
|
110
110
|
role: 'list'
|
|
111
111
|
} : {}),
|
|
112
|
-
...mergeProps(
|
|
112
|
+
...mergeProps(themeProps('list', {
|
|
113
113
|
density,
|
|
114
114
|
listStyle
|
|
115
115
|
}), stylex.props(styles.list, hasDividers && styles.withDividers, listStyle !== 'none' && (start != null && start !== 1 ? dynamicStyles.counterStart(start - 1) : styles.withCounter), xstyle), className, style),
|
package/dist/List/ListItem.js
CHANGED
|
@@ -25,7 +25,7 @@ import { colorVars, spacingVars, typeScaleVars, borderVars } from "../theme/toke
|
|
|
25
25
|
import { ListContext } from "./ListContext.js";
|
|
26
26
|
import { mergeProps } from "../utils/index.js";
|
|
27
27
|
import { Item } from "../Item/index.js";
|
|
28
|
-
import {
|
|
28
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
29
29
|
|
|
30
30
|
// =============================================================================
|
|
31
31
|
// Types
|
|
@@ -140,7 +140,7 @@ export function ListItem({
|
|
|
140
140
|
isSelected: isSelected,
|
|
141
141
|
density: density,
|
|
142
142
|
xstyle: [hasMarkers && styles.withCounter, hasDividers && styles.withDivider, hasDividers && embeddedStyles.noRadius, xstyle],
|
|
143
|
-
...mergeProps(
|
|
143
|
+
...mergeProps(themeProps('list-item'), {
|
|
144
144
|
className,
|
|
145
145
|
style
|
|
146
146
|
}),
|
|
@@ -32,7 +32,7 @@ import { useTheme } from "../theme/useTheme.js";
|
|
|
32
32
|
import { Citation } from "../Citation/Citation.js";
|
|
33
33
|
import { useLinkComponent } from "../Link/useLinkComponent.js";
|
|
34
34
|
import { parseInline, parseMarkdown, parseMarkdownIncremental, createIncrementalState, trimStreamingArtifacts } from "./parser.js";
|
|
35
|
-
import {
|
|
35
|
+
import { themeProps } from "../utils/themeProps.js";
|
|
36
36
|
|
|
37
37
|
// ---------------------------------------------------------------------------
|
|
38
38
|
// Props
|
|
@@ -1092,7 +1092,7 @@ export function Markdown({
|
|
|
1092
1092
|
const renderedInline = /*#__PURE__*/_jsx("span", {
|
|
1093
1093
|
ref: ref,
|
|
1094
1094
|
"data-testid": testId,
|
|
1095
|
-
...mergeProps(
|
|
1095
|
+
...mergeProps(themeProps('markdown', {
|
|
1096
1096
|
density
|
|
1097
1097
|
}), stylex.props(styles.root, styles.inlineRoot, xstyle), className, style),
|
|
1098
1098
|
children: inlineNodes.map((node, i) => renderInline(node, i, onLinkClick, cursor, citationCtx, LinkComponent, inlinePlugins, components))
|
|
@@ -1107,7 +1107,7 @@ export function Markdown({
|
|
|
1107
1107
|
role: "document",
|
|
1108
1108
|
ref: ref,
|
|
1109
1109
|
"data-testid": testId,
|
|
1110
|
-
...mergeProps(
|
|
1110
|
+
...mergeProps(themeProps('markdown', {
|
|
1111
1111
|
density
|
|
1112
1112
|
}), stylex.props(styles.root, xstyle), className, style),
|
|
1113
1113
|
children: blocks.map((block, i) => renderBlock(block, i, blocks.length, density, headingLevelStart, onLinkClick, cursor, citationCtx, contentWidth ? typeof contentWidth === 'number' ? `${contentWidth}px` : contentWidth : null, contentAlign, LinkComponent, inlinePlugins, components))
|