@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
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
|
|
73
73
|
export type {ISODateString, DayOfWeek, DateRange} from '../utils/dateTypes';
|
|
74
74
|
import type {ISODateString, DayOfWeek, DateRange} from '../utils/dateTypes';
|
|
75
|
-
import {
|
|
75
|
+
import {themeProps} from '../utils/themeProps';
|
|
76
76
|
|
|
77
77
|
/** Imperative handle for Calendar handleRef */
|
|
78
78
|
|
|
@@ -398,7 +398,7 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
398
398
|
<div
|
|
399
399
|
ref={ref}
|
|
400
400
|
{...mergeProps(
|
|
401
|
-
|
|
401
|
+
themeProps('calendar', {mode}),
|
|
402
402
|
stylex.props(calendarStyles.calendar, xstyle),
|
|
403
403
|
className,
|
|
404
404
|
style,
|
|
@@ -874,7 +874,7 @@ function DayCell({
|
|
|
874
874
|
onMouseEnter={() => !state.effectivelyDisabled && onDayHover(date)}
|
|
875
875
|
onMouseLeave={() => onDayHover(null)}
|
|
876
876
|
{...mergeProps(
|
|
877
|
-
|
|
877
|
+
themeProps('calendar-day', {
|
|
878
878
|
selected: endpoint ? 'selected' : null,
|
|
879
879
|
today: state.isToday ? 'today' : null,
|
|
880
880
|
disabled: state.effectivelyDisabled ? 'disabled' : null,
|
package/src/Card/Card.tsx
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import type {SizeValue, SpacingStep} from '../utils/types';
|
|
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
|
// Variant type
|
|
@@ -262,7 +262,7 @@ export function Card({
|
|
|
262
262
|
<div
|
|
263
263
|
ref={ref}
|
|
264
264
|
{...mergeProps(
|
|
265
|
-
|
|
265
|
+
themeProps('card', {variant}),
|
|
266
266
|
stylex.props(
|
|
267
267
|
styles.card,
|
|
268
268
|
variantStyles[variant],
|
|
@@ -33,7 +33,7 @@ import {useScrollOverflow} from '../hooks/useScrollOverflow';
|
|
|
33
33
|
import type {BaseProps} from '../BaseProps';
|
|
34
34
|
import {mergeProps, mergeRefs} from '../utils';
|
|
35
35
|
import type {SpacingStep} from '../utils/types';
|
|
36
|
-
import {
|
|
36
|
+
import {themeProps} from '../utils/themeProps';
|
|
37
37
|
|
|
38
38
|
export interface CarouselProps extends BaseProps<HTMLDivElement> {
|
|
39
39
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -325,7 +325,7 @@ export function Carousel({
|
|
|
325
325
|
aria-label={ariaLabel}
|
|
326
326
|
aria-roledescription="carousel"
|
|
327
327
|
{...mergeProps(
|
|
328
|
-
|
|
328
|
+
themeProps('carousel'),
|
|
329
329
|
stylex.props(styles.root, xstyle),
|
|
330
330
|
className,
|
|
331
331
|
style,
|
package/src/Center/Center.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import type {BaseProps} from '../BaseProps';
|
|
|
20
20
|
import * as stylex from '@stylexjs/stylex';
|
|
21
21
|
import type {SizeValue} from '../utils/types';
|
|
22
22
|
import {mergeProps} from '../utils';
|
|
23
|
-
import {
|
|
23
|
+
import {themeProps} from '../utils/themeProps';
|
|
24
24
|
|
|
25
25
|
const styles = stylex.create({
|
|
26
26
|
base: {
|
|
@@ -110,7 +110,7 @@ export function Center({
|
|
|
110
110
|
...props
|
|
111
111
|
}: CenterProps) {
|
|
112
112
|
const stylexProps = mergeProps(
|
|
113
|
-
|
|
113
|
+
themeProps('center', {axis}),
|
|
114
114
|
stylex.props(
|
|
115
115
|
isInline ? styles.inline : styles.base,
|
|
116
116
|
(axis === 'both' || axis === 'vertical') && styles.alignItemsCenter,
|
|
@@ -48,7 +48,7 @@ import {Icon} from '../Icon';
|
|
|
48
48
|
import {ChatComposerInput} from './ChatComposerInput';
|
|
49
49
|
import {ChatComposerContext} from './ChatContext';
|
|
50
50
|
import {ChatSendButton} from './ChatSendButton';
|
|
51
|
-
import {
|
|
51
|
+
import {themeProps} from '../utils/themeProps';
|
|
52
52
|
|
|
53
53
|
// =============================================================================
|
|
54
54
|
// Types
|
|
@@ -384,7 +384,7 @@ export function ChatComposer(props: ChatComposerProps) {
|
|
|
384
384
|
<div
|
|
385
385
|
ref={ref}
|
|
386
386
|
{...mergeProps(
|
|
387
|
-
|
|
387
|
+
themeProps('chat-composer', {density}),
|
|
388
388
|
stylex.props(styles.root, isDisabled && styles.rootDisabled),
|
|
389
389
|
className,
|
|
390
390
|
style,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {Badge} from '../Badge';
|
|
30
30
|
import {mergeProps} from '../utils';
|
|
31
31
|
import type {BaseProps} from '../BaseProps';
|
|
32
|
-
import {
|
|
32
|
+
import {themeProps} from '../utils/themeProps';
|
|
33
33
|
|
|
34
34
|
export interface ChatComposerDrawerProps extends BaseProps<HTMLDivElement> {
|
|
35
35
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -250,7 +250,7 @@ export function ChatComposerDrawer({
|
|
|
250
250
|
ref={ref}
|
|
251
251
|
data-testid={testId}
|
|
252
252
|
{...mergeProps(
|
|
253
|
-
|
|
253
|
+
themeProps('chat-composer-drawer', {
|
|
254
254
|
collapsed: isCollapsed ? 'collapsed' : null,
|
|
255
255
|
}),
|
|
256
256
|
stylex.props(styles.root, xstyle),
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from './useChatPasteAsToken';
|
|
56
56
|
import {Badge, type BadgeProps} from '../Badge';
|
|
57
57
|
import {useChatComposerContext} from './ChatContext';
|
|
58
|
-
import {
|
|
58
|
+
import {themeProps} from '../utils/themeProps';
|
|
59
59
|
|
|
60
60
|
// =============================================================================
|
|
61
61
|
// Types
|
|
@@ -619,7 +619,7 @@ export function ChatComposerInput(props: ChatComposerInputProps) {
|
|
|
619
619
|
<div
|
|
620
620
|
ref={ref}
|
|
621
621
|
{...mergeProps(
|
|
622
|
-
|
|
622
|
+
themeProps('chat-composer-input'),
|
|
623
623
|
stylex.props(styles.root, isDisabled && styles.disabled, xstyle),
|
|
624
624
|
className,
|
|
625
625
|
style,
|
package/src/Chat/ChatLayout.tsx
CHANGED
|
@@ -31,7 +31,7 @@ import {useChatStreamScroll} from './useChatStreamScroll';
|
|
|
31
31
|
import {useChatNewMessages} from './useChatNewMessages';
|
|
32
32
|
import {ChatLayoutScrollButton} from './ChatLayoutScrollButton';
|
|
33
33
|
import {ChatLayoutContext} from './ChatContext';
|
|
34
|
-
import {
|
|
34
|
+
import {themeProps} from '../utils/themeProps';
|
|
35
35
|
|
|
36
36
|
// =============================================================================
|
|
37
37
|
// Types
|
|
@@ -330,7 +330,7 @@ export function ChatLayout({
|
|
|
330
330
|
ref={mergeRefs(ref, rootRef)}
|
|
331
331
|
data-testid={testId}
|
|
332
332
|
{...mergeProps(
|
|
333
|
-
|
|
333
|
+
themeProps('chat-layout', {density}),
|
|
334
334
|
stylex.props(
|
|
335
335
|
styles.root,
|
|
336
336
|
isSelfScrolling && styles.rootScrollable,
|
|
@@ -90,6 +90,12 @@ const styles = stylex.create({
|
|
|
90
90
|
whiteSpace: 'nowrap',
|
|
91
91
|
paddingInline: spacingVars['--spacing-2'],
|
|
92
92
|
},
|
|
93
|
+
// When a label is shown, the icon sits on the leading edge and the text on
|
|
94
|
+
// the trailing edge. Symmetric padding leaves the text cramped against the
|
|
95
|
+
// pill's rounded edge, so give the trailing side extra breathing room.
|
|
96
|
+
buttonWithLabel: {
|
|
97
|
+
paddingInlineEnd: spacingVars['--spacing-3'],
|
|
98
|
+
},
|
|
93
99
|
});
|
|
94
100
|
|
|
95
101
|
// =============================================================================
|
|
@@ -130,7 +136,7 @@ export function ChatLayoutScrollButton({
|
|
|
130
136
|
variant="ghost"
|
|
131
137
|
size="md"
|
|
132
138
|
onClick={onClick}
|
|
133
|
-
xstyle={styles.button}>
|
|
139
|
+
xstyle={[styles.button, label ? styles.buttonWithLabel : null]}>
|
|
134
140
|
{label ?? undefined}
|
|
135
141
|
</Button>
|
|
136
142
|
</div>
|
package/src/Chat/ChatMessage.tsx
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from './ChatContext';
|
|
36
36
|
import {mergeProps} from '../utils';
|
|
37
37
|
import type {BaseProps} from '../BaseProps';
|
|
38
|
-
import {
|
|
38
|
+
import {themeProps} from '../utils/themeProps';
|
|
39
39
|
|
|
40
40
|
export interface ChatMessageProps extends BaseProps<HTMLElement> {
|
|
41
41
|
ref?: React.Ref<HTMLElement>;
|
|
@@ -221,7 +221,7 @@ export function ChatMessage({
|
|
|
221
221
|
aria-label={!hasName ? `Message from ${sender}` : undefined}
|
|
222
222
|
aria-labelledby={hasName ? nameId : undefined}
|
|
223
223
|
{...mergeProps(
|
|
224
|
-
|
|
224
|
+
themeProps('chat-message', {sender, density}),
|
|
225
225
|
stylex.props(
|
|
226
226
|
styles.root,
|
|
227
227
|
rootAlignment,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {useChatMessageContext} from './ChatContext';
|
|
38
38
|
import {mergeProps} from '../utils';
|
|
39
39
|
import type {BaseProps} from '../BaseProps';
|
|
40
|
-
import {
|
|
40
|
+
import {themeProps} from '../utils/themeProps';
|
|
41
41
|
|
|
42
42
|
export type ChatMessageBubbleVariant = 'filled' | 'ghost';
|
|
43
43
|
|
|
@@ -277,7 +277,7 @@ export function ChatMessageBubble({
|
|
|
277
277
|
ref={ref}
|
|
278
278
|
data-testid={testId}
|
|
279
279
|
{...mergeProps(
|
|
280
|
-
|
|
280
|
+
themeProps('chat-message-bubble', {sender, variant, density}),
|
|
281
281
|
stylex.props(
|
|
282
282
|
styles.content,
|
|
283
283
|
density === 'compact' && styles.radiusCompact,
|
|
@@ -34,7 +34,7 @@ import {mergeProps} from '../utils';
|
|
|
34
34
|
import {Spinner} from '../Spinner';
|
|
35
35
|
import type {BaseProps} from '../BaseProps';
|
|
36
36
|
import type {SpacingStep} from '../utils/types';
|
|
37
|
-
import {
|
|
37
|
+
import {themeProps} from '../utils/themeProps';
|
|
38
38
|
|
|
39
39
|
export interface ChatMessageListProps extends BaseProps<HTMLDivElement> {
|
|
40
40
|
/** Ref forwarded to the root element */
|
|
@@ -255,7 +255,7 @@ export function ChatMessageList({
|
|
|
255
255
|
tabIndex={0}
|
|
256
256
|
data-testid={testId}
|
|
257
257
|
{...mergeProps(
|
|
258
|
-
|
|
258
|
+
themeProps('chat-message-list', {density}),
|
|
259
259
|
stylex.props(styles.root, xstyle),
|
|
260
260
|
className,
|
|
261
261
|
style,
|
|
@@ -25,7 +25,7 @@ import {Icon} from '../Icon';
|
|
|
25
25
|
import type {IconName} from '../Icon/globalIconRegistry';
|
|
26
26
|
import {mergeProps} from '../utils';
|
|
27
27
|
import type {BaseProps} from '../BaseProps';
|
|
28
|
-
import {
|
|
28
|
+
import {themeProps} from '../utils/themeProps';
|
|
29
29
|
|
|
30
30
|
export type ChatMessageStatus =
|
|
31
31
|
| 'sending'
|
|
@@ -134,7 +134,7 @@ export function ChatMessageMetadata({
|
|
|
134
134
|
<div
|
|
135
135
|
ref={ref}
|
|
136
136
|
{...mergeProps(
|
|
137
|
-
|
|
137
|
+
themeProps('chat-message-metadata'),
|
|
138
138
|
stylex.props(
|
|
139
139
|
styles.meta,
|
|
140
140
|
sender === 'user' ? styles.metaUser : styles.metaAssistant,
|
|
@@ -24,7 +24,7 @@ import {getIcon} from '../Icon/globalIconRegistry';
|
|
|
24
24
|
import {useChatComposerContext} from './ChatContext';
|
|
25
25
|
|
|
26
26
|
import type {BaseProps} from '../BaseProps';
|
|
27
|
-
import {
|
|
27
|
+
import {themeProps} from '../utils/themeProps';
|
|
28
28
|
|
|
29
29
|
// =============================================================================
|
|
30
30
|
// Types
|
|
@@ -105,7 +105,7 @@ export function ChatSendButton(props: ChatSendButtonProps): ReactNode {
|
|
|
105
105
|
isIconOnly
|
|
106
106
|
isDisabled={!isStopShown && isDisabled}
|
|
107
107
|
onClick={isStopShown ? onStop : handleSend}
|
|
108
|
-
{...
|
|
108
|
+
{...themeProps('chat-send-button')}
|
|
109
109
|
xstyle={[styles.root, xstyle]}
|
|
110
110
|
/>
|
|
111
111
|
);
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import {mergeProps} from '../utils';
|
|
32
32
|
import {Divider} from '../Divider';
|
|
33
33
|
import type {BaseProps} from '../BaseProps';
|
|
34
|
-
import {
|
|
34
|
+
import {themeProps} from '../utils/themeProps';
|
|
35
35
|
|
|
36
36
|
export type ChatSystemMessageVariant = 'default' | 'divider';
|
|
37
37
|
|
|
@@ -130,7 +130,7 @@ export function ChatSystemMessage({
|
|
|
130
130
|
role="status"
|
|
131
131
|
data-testid={testId}
|
|
132
132
|
{...mergeProps(
|
|
133
|
-
|
|
133
|
+
themeProps('chat-system-message', {variant}),
|
|
134
134
|
stylex.props(styles.dividerWrap, xstyle),
|
|
135
135
|
className,
|
|
136
136
|
styleProp,
|
|
@@ -146,7 +146,7 @@ export function ChatSystemMessage({
|
|
|
146
146
|
role="status"
|
|
147
147
|
data-testid={testId}
|
|
148
148
|
{...mergeProps(
|
|
149
|
-
|
|
149
|
+
themeProps('chat-system-message', {variant}),
|
|
150
150
|
stylex.props(styles.root, xstyle),
|
|
151
151
|
className,
|
|
152
152
|
styleProp,
|
|
@@ -23,7 +23,7 @@ import {Badge} from '../Badge';
|
|
|
23
23
|
import type {ChatComposerToken} from './ChatComposerInput';
|
|
24
24
|
import {mergeProps} from '../utils';
|
|
25
25
|
import type {BaseProps} from '../BaseProps';
|
|
26
|
-
import {
|
|
26
|
+
import {themeProps} from '../utils/themeProps';
|
|
27
27
|
|
|
28
28
|
// =============================================================================
|
|
29
29
|
// Styles
|
|
@@ -97,7 +97,7 @@ export function ChatTokenizedText({
|
|
|
97
97
|
<span
|
|
98
98
|
ref={ref}
|
|
99
99
|
{...mergeProps(
|
|
100
|
-
|
|
100
|
+
themeProps('chat-tokenized-text'),
|
|
101
101
|
stylex.props(styles.root),
|
|
102
102
|
)}>
|
|
103
103
|
{children ?? ''}
|
|
@@ -110,7 +110,7 @@ export function ChatTokenizedText({
|
|
|
110
110
|
<span
|
|
111
111
|
ref={ref}
|
|
112
112
|
{...mergeProps(
|
|
113
|
-
|
|
113
|
+
themeProps('chat-tokenized-text'),
|
|
114
114
|
stylex.props(styles.root),
|
|
115
115
|
)}>
|
|
116
116
|
{parts}
|
|
@@ -35,7 +35,7 @@ import {getKey, mergeProps} from '../utils';
|
|
|
35
35
|
import {Badge} from '../Badge';
|
|
36
36
|
import {Icon, type IconName} from '../Icon';
|
|
37
37
|
import {Spinner} from '../Spinner';
|
|
38
|
-
import {
|
|
38
|
+
import {themeProps} from '../utils/themeProps';
|
|
39
39
|
|
|
40
40
|
// =============================================================================
|
|
41
41
|
// Types
|
|
@@ -518,7 +518,7 @@ export function ChatToolCalls(props: ChatToolCallsProps) {
|
|
|
518
518
|
<div
|
|
519
519
|
ref={ref}
|
|
520
520
|
{...mergeProps(
|
|
521
|
-
|
|
521
|
+
themeProps('chat-tool-calls'),
|
|
522
522
|
stylex.props(styles.root, xstyle),
|
|
523
523
|
className,
|
|
524
524
|
style,
|
|
@@ -537,7 +537,7 @@ export function ChatToolCalls(props: ChatToolCallsProps) {
|
|
|
537
537
|
<div
|
|
538
538
|
ref={ref}
|
|
539
539
|
{...mergeProps(
|
|
540
|
-
|
|
540
|
+
themeProps('chat-tool-calls'),
|
|
541
541
|
stylex.props(styles.root, xstyle),
|
|
542
542
|
className,
|
|
543
543
|
style,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from '../theme/tokens.stylex';
|
|
40
40
|
import {mergeProps, groupItems} from '../utils';
|
|
41
41
|
import type {SearchableItem} from '../Typeahead/types';
|
|
42
|
-
import {
|
|
42
|
+
import {themeProps} from '../utils/themeProps';
|
|
43
43
|
import type {
|
|
44
44
|
ChatComposerTrigger,
|
|
45
45
|
ChatComposerToken,
|
|
@@ -684,7 +684,7 @@ export function useTriggerMenu(
|
|
|
684
684
|
role="listbox"
|
|
685
685
|
aria-label={trigger?.menuLabel ?? 'Suggestions'}
|
|
686
686
|
{...mergeProps(
|
|
687
|
-
|
|
687
|
+
themeProps('trigger-menu'),
|
|
688
688
|
stylex.props(styles.dropdown),
|
|
689
689
|
)}>
|
|
690
690
|
{listContent}
|
|
@@ -46,7 +46,7 @@ import type {InputStatus} from '../Field/types';
|
|
|
46
46
|
import {Spinner} from '../Spinner';
|
|
47
47
|
import {mergeProps, mergeRefs} from '../utils';
|
|
48
48
|
import {checkboxScope} from './checkbox.markers.stylex';
|
|
49
|
-
import {
|
|
49
|
+
import {themeProps} from '../utils/themeProps';
|
|
50
50
|
|
|
51
51
|
const styles = stylex.create({
|
|
52
52
|
container: {
|
|
@@ -401,7 +401,7 @@ export function CheckboxInput({
|
|
|
401
401
|
return (
|
|
402
402
|
<div
|
|
403
403
|
{...mergeProps(
|
|
404
|
-
|
|
404
|
+
themeProps('checkbox-input', {size}),
|
|
405
405
|
stylex.props(width != null && dynamicWidthStyles.width(width), xstyle),
|
|
406
406
|
className,
|
|
407
407
|
style,
|
|
@@ -450,7 +450,7 @@ export function CheckboxInput({
|
|
|
450
450
|
<div
|
|
451
451
|
aria-hidden="true"
|
|
452
452
|
{...mergeProps(
|
|
453
|
-
|
|
453
|
+
themeProps('checkbox', {
|
|
454
454
|
size,
|
|
455
455
|
checked: isChecked
|
|
456
456
|
? 'checked'
|
|
@@ -31,7 +31,7 @@ import type {InputStatus} from '../Field/types';
|
|
|
31
31
|
import {List} from '../List/List';
|
|
32
32
|
import type {ListDensity} from '../List/ListContext';
|
|
33
33
|
import {mergeProps} from '../utils';
|
|
34
|
-
import {
|
|
34
|
+
import {themeProps} from '../utils/themeProps';
|
|
35
35
|
import {
|
|
36
36
|
CheckboxListContext,
|
|
37
37
|
type CheckboxListContextValue,
|
|
@@ -224,7 +224,7 @@ export function CheckboxList({
|
|
|
224
224
|
statusVariant="detached"
|
|
225
225
|
width={width}
|
|
226
226
|
xstyle={xstyle}
|
|
227
|
-
{...mergeProps(
|
|
227
|
+
{...mergeProps(themeProps('checkbox-list'), {className, style})}>
|
|
228
228
|
<CheckboxListContext value={contextValue}>
|
|
229
229
|
<List density={density} hasDividers={hasDividers}>
|
|
230
230
|
{children}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from '../theme/tokens.stylex';
|
|
28
28
|
import {mergeProps} from '../utils';
|
|
29
29
|
import type {BaseProps} from '../BaseProps';
|
|
30
|
-
import {
|
|
30
|
+
import {themeProps} from '../utils/themeProps';
|
|
31
31
|
|
|
32
32
|
export interface CitationSource {
|
|
33
33
|
title?: string;
|
|
@@ -173,7 +173,7 @@ export function Citation({
|
|
|
173
173
|
data-testid={testId}
|
|
174
174
|
{...linkProps}
|
|
175
175
|
{...mergeProps(
|
|
176
|
-
|
|
176
|
+
themeProps('citation', {variant}),
|
|
177
177
|
stylex.props(
|
|
178
178
|
styles.number,
|
|
179
179
|
href != null && styles.numberHover,
|
|
@@ -196,7 +196,7 @@ export function Citation({
|
|
|
196
196
|
data-testid={testId}
|
|
197
197
|
{...linkProps}
|
|
198
198
|
{...mergeProps(
|
|
199
|
-
|
|
199
|
+
themeProps('citation', {variant}),
|
|
200
200
|
stylex.props(
|
|
201
201
|
styles.label,
|
|
202
202
|
icon != null && styles.labelWithIcon,
|
|
@@ -39,7 +39,7 @@ import type {CardVariant} from '../Card/Card';
|
|
|
39
39
|
import {useClickableContainer} from '../hooks/useClickableContainer';
|
|
40
40
|
import type {BaseProps} from '../BaseProps';
|
|
41
41
|
import {useLinkComponent} from '../Link/useLinkComponent';
|
|
42
|
-
import {
|
|
42
|
+
import {themeProps} from '../utils/themeProps';
|
|
43
43
|
|
|
44
44
|
// =============================================================================
|
|
45
45
|
// Styles — only the interactive layer, Card handles everything else
|
|
@@ -256,7 +256,7 @@ export function ClickableCard({
|
|
|
256
256
|
maxWidth={maxWidth}
|
|
257
257
|
padding={padding}
|
|
258
258
|
variant={variant}
|
|
259
|
-
{...mergeProps(
|
|
259
|
+
{...mergeProps(themeProps('clickable-card', {variant}), {
|
|
260
260
|
className: classNameProp,
|
|
261
261
|
style,
|
|
262
262
|
})}
|
package/src/Code/Code.tsx
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from '../theme/tokens.stylex';
|
|
26
26
|
import {mergeProps} from '../utils';
|
|
27
27
|
import type {BaseProps} from '../BaseProps';
|
|
28
|
-
import {
|
|
28
|
+
import {themeProps} from '../utils/themeProps';
|
|
29
29
|
|
|
30
30
|
const styles = stylex.create({
|
|
31
31
|
base: {
|
|
@@ -74,7 +74,7 @@ export function Code({
|
|
|
74
74
|
<code
|
|
75
75
|
ref={ref}
|
|
76
76
|
{...mergeProps(
|
|
77
|
-
|
|
77
|
+
themeProps('code'),
|
|
78
78
|
stylex.props(styles.base, xstyle),
|
|
79
79
|
className,
|
|
80
80
|
style,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
import type {SyntaxToken, TokenLine} from './tokenizer';
|
|
43
43
|
import {ensureHighlightStyles} from './highlightStyles';
|
|
44
44
|
import {applyHighlightRangesChunked} from './highlightRanges';
|
|
45
|
-
import {
|
|
45
|
+
import {themeProps} from '../utils/themeProps';
|
|
46
46
|
|
|
47
47
|
// ---------------------------------------------------------------------------
|
|
48
48
|
// Styles
|
|
@@ -776,7 +776,7 @@ export function CodeBlock({
|
|
|
776
776
|
<pre
|
|
777
777
|
ref={ref}
|
|
778
778
|
{...mergeProps(
|
|
779
|
-
|
|
779
|
+
themeProps('codeblock', {size, language, container}),
|
|
780
780
|
stylex.props(
|
|
781
781
|
styles.root,
|
|
782
782
|
dynamicStyles.width(widthProp),
|
|
@@ -36,7 +36,7 @@ import {useCollapsible} from './useCollapsible';
|
|
|
36
36
|
import {getIcon} from '../Icon/globalIconRegistry';
|
|
37
37
|
import {mergeProps} from '../utils';
|
|
38
38
|
import type {BaseProps} from '../BaseProps';
|
|
39
|
-
import {
|
|
39
|
+
import {themeProps} from '../utils/themeProps';
|
|
40
40
|
|
|
41
41
|
const styles = stylex.create({
|
|
42
42
|
root: {
|
|
@@ -198,7 +198,7 @@ export function Collapsible({
|
|
|
198
198
|
<div
|
|
199
199
|
ref={ref}
|
|
200
200
|
{...mergeProps(
|
|
201
|
-
|
|
201
|
+
themeProps('collapsible'),
|
|
202
202
|
stylex.props(styles.root, xstyle),
|
|
203
203
|
className,
|
|
204
204
|
style,
|
|
@@ -38,7 +38,7 @@ export const docs = {
|
|
|
38
38
|
usage: {
|
|
39
39
|
description: 'Reusable hook that encapsulates the collapsible state machine. Supports three modes: group-controlled (inside CollapsibleGroup), controlled (isOpen + onOpenChange), and uncontrolled (self-managed with defaultIsOpen). Used internally by Card and Section.',
|
|
40
40
|
bestPractices: [
|
|
41
|
-
{guidance: true, description: 'Use the hook directly when building custom collapsible components that need
|
|
41
|
+
{guidance: true, description: 'Use the hook directly when building custom collapsible components that need Astryx collapsible behavior without Collapsible wrapper.'},
|
|
42
42
|
{guidance: true, description: 'For accordion behavior, wrap items in CollapsibleGroup and pass unique value props.'},
|
|
43
43
|
{guidance: false, description: 'Implement your own open/close state when useCollapsible already provides it; the hook handles group coordination automatically.'},
|
|
44
44
|
],
|
|
@@ -64,7 +64,7 @@ export const docsDense = {
|
|
|
64
64
|
usage: {
|
|
65
65
|
description: 'Encapsulates collapsible state machine. 3 modes: group-controlled (inside CollapsibleGroup), controlled (isOpen + onOpenChange), uncontrolled (self-managed w/ defaultIsOpen). Used internally by Card + Section.',
|
|
66
66
|
bestPractices: [
|
|
67
|
-
{guidance: true, description: 'Use directly when building custom collapsible components needing
|
|
67
|
+
{guidance: true, description: 'Use directly when building custom collapsible components needing Astryx collapsible behavior w/o Collapsible wrapper.'},
|
|
68
68
|
{guidance: true, description: 'For accordion behavior, wrap items in CollapsibleGroup + pass unique value props.'},
|
|
69
69
|
{guidance: false, description: 'Implement your own open/close state when useCollapsible already provides it; hook handles group coordination automatically.'},
|
|
70
70
|
],
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
typographyVars,
|
|
24
24
|
} from '../theme/tokens.stylex';
|
|
25
25
|
import {Kbd} from '../Kbd';
|
|
26
|
-
import {
|
|
26
|
+
import {themeProps} from '../utils/themeProps';
|
|
27
27
|
|
|
28
28
|
const styles = stylex.create({
|
|
29
29
|
footer: {
|
|
@@ -89,7 +89,7 @@ export function CommandPaletteFooter({
|
|
|
89
89
|
<div
|
|
90
90
|
ref={ref}
|
|
91
91
|
{...mergeProps(
|
|
92
|
-
|
|
92
|
+
themeProps('command-palette-footer'),
|
|
93
93
|
stylex.props(styles.footer, xstyle),
|
|
94
94
|
className,
|
|
95
95
|
style,
|
|
@@ -16,7 +16,7 @@ import type {ReactNode} from 'react';
|
|
|
16
16
|
import * as stylex from '@stylexjs/stylex';
|
|
17
17
|
import type {BaseProps} from '../BaseProps';
|
|
18
18
|
import {mergeProps} from '../utils';
|
|
19
|
-
import {
|
|
19
|
+
import {themeProps} from '../utils/themeProps';
|
|
20
20
|
import {
|
|
21
21
|
colorVars,
|
|
22
22
|
spacingVars,
|
|
@@ -84,7 +84,7 @@ export function CommandPaletteGroup({
|
|
|
84
84
|
role="group"
|
|
85
85
|
aria-label={heading}
|
|
86
86
|
{...mergeProps(
|
|
87
|
-
|
|
87
|
+
themeProps('command-palette-group'),
|
|
88
88
|
stylex.props(styles.group, xstyle),
|
|
89
89
|
className,
|
|
90
90
|
style,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {useCommandPaletteContext} from './CommandPaletteContext';
|
|
27
27
|
import {useDialogContext} from '../Dialog/DialogContext';
|
|
28
28
|
import type {BaseProps} from '../BaseProps';
|
|
29
|
-
import {
|
|
29
|
+
import {themeProps} from '../utils/themeProps';
|
|
30
30
|
|
|
31
31
|
const styles = stylex.create({
|
|
32
32
|
wrapper: {
|
|
@@ -193,7 +193,7 @@ export function CommandPaletteInput({
|
|
|
193
193
|
return (
|
|
194
194
|
<div
|
|
195
195
|
{...mergeProps(
|
|
196
|
-
|
|
196
|
+
themeProps('command-palette-input'),
|
|
197
197
|
stylex.props(styles.wrapper, xstyle),
|
|
198
198
|
)}>
|
|
199
199
|
<span {...stylex.props(styles.icon)}>
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from '../theme/tokens.stylex';
|
|
25
25
|
import {useCommandPaletteContext} from './CommandPaletteContext';
|
|
26
26
|
import {useDialogContext} from '../Dialog/DialogContext';
|
|
27
|
-
import {
|
|
27
|
+
import {themeProps} from '../utils/themeProps';
|
|
28
28
|
|
|
29
29
|
const HOVER_HOVER = '@media (hover: hover)';
|
|
30
30
|
|
|
@@ -194,7 +194,7 @@ export function CommandPaletteItem({
|
|
|
194
194
|
onClick={handleClick}
|
|
195
195
|
onMouseEnter={handleMouseEnter}
|
|
196
196
|
{...mergeProps(
|
|
197
|
-
|
|
197
|
+
themeProps('command-palette-item'),
|
|
198
198
|
stylex.props(
|
|
199
199
|
styles.item,
|
|
200
200
|
!isDisabled && styles.itemHover,
|
|
@@ -19,7 +19,7 @@ import type {BaseProps} from '../BaseProps';
|
|
|
19
19
|
import {mergeProps} from '../utils';
|
|
20
20
|
import {spacingVars} from '../theme/tokens.stylex';
|
|
21
21
|
import {useCommandPaletteContext} from './CommandPaletteContext';
|
|
22
|
-
import {
|
|
22
|
+
import {themeProps} from '../utils/themeProps';
|
|
23
23
|
|
|
24
24
|
const styles = stylex.create({
|
|
25
25
|
list: {
|
|
@@ -88,7 +88,7 @@ export function CommandPaletteList({
|
|
|
88
88
|
role="listbox"
|
|
89
89
|
aria-label={label}
|
|
90
90
|
{...mergeProps(
|
|
91
|
-
|
|
91
|
+
themeProps('command-palette-list'),
|
|
92
92
|
stylex.props(styles.list, xstyle),
|
|
93
93
|
className,
|
|
94
94
|
style,
|