@astryxdesign/core 0.1.9-canary.d2d84f8 → 0.1.9-canary.e00a241
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/dist/Avatar/Avatar.d.ts +6 -1
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +46 -12
- package/dist/Avatar/AvatarStatusDot.d.ts +6 -4
- package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +11 -4
- package/dist/Breadcrumbs/index.d.ts +1 -0
- package/dist/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/Breadcrumbs/index.js +2 -1
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +50 -9
- package/dist/Calendar/dayCellUtils.d.ts +4 -4
- package/dist/Calendar/dayCellUtils.js +2 -2
- package/dist/Calendar/styles.d.ts +30 -31
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +30 -31
- package/dist/Card/Card.js +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +22 -12
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +3 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +8 -8
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +10 -3
- package/dist/CheckboxInput/CheckboxInput.js +4 -4
- package/dist/Citation/Citation.d.ts +22 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -6
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +13 -7
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +3 -1
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +42 -3
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +14 -5
- package/dist/ContextMenu/index.d.ts +1 -0
- package/dist/ContextMenu/index.d.ts.map +1 -1
- package/dist/ContextMenu/index.js +3 -1
- package/dist/DateInput/DateInput.d.ts +1 -0
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +31 -19
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -0
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +20 -19
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +23 -18
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/Divider.d.ts.map +1 -1
- package/dist/Divider/Divider.js +13 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +6 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +22 -5
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +104 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +427 -0
- package/dist/DropdownMenu/index.d.ts +10 -0
- package/dist/DropdownMenu/index.d.ts.map +1 -1
- package/dist/DropdownMenu/index.js +13 -0
- package/dist/DropdownMenu/menuItemHover.d.ts +23 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -0
- package/dist/DropdownMenu/menuItemHover.js +33 -0
- package/dist/DropdownMenu/menuItemRoles.d.ts +8 -0
- package/dist/DropdownMenu/menuItemRoles.d.ts.map +1 -1
- package/dist/DropdownMenu/menuItemRoles.js +10 -1
- package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -1
- package/dist/DropdownMenu/renderDropdownItems.js +21 -6
- package/dist/Field/Field.d.ts +3 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +4 -1
- package/dist/Field/inputStyles.stylex.d.ts +1 -0
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +1 -0
- package/dist/FieldStatus/FieldStatus.d.ts +4 -1
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +4 -2
- package/dist/FileInput/FileInput.d.ts +1 -0
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +91 -65
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +10 -4
- package/dist/Icon/Icon.d.ts +15 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +19 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +15 -9
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +6 -3
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +7 -0
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +65 -40
- package/dist/NumberInput/NumberInput.d.ts +1 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +20 -17
- package/dist/Outline/Outline.js +2 -2
- package/dist/RadioList/RadioList.d.ts +2 -2
- package/dist/RadioList/RadioListItem.js +4 -4
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +49 -19
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +2 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +58 -16
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +5 -5
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +13 -10
- package/dist/SideNav/SideNavItem.d.ts +1 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +12 -10
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +87 -34
- package/dist/Spinner/Spinner.d.ts +3 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +11 -2
- package/dist/Switch/Switch.d.ts +8 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +160 -91
- package/dist/TabList/TabList.d.ts +2 -11
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +5 -9
- package/dist/TabList/TabListContext.d.ts +0 -5
- package/dist/TabList/TabListContext.d.ts.map +1 -1
- package/dist/TabList/TabListContext.js +0 -5
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +30 -4
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +15 -11
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +36 -26
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +3 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +14 -6
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +29 -23
- package/dist/Table/types.d.ts +32 -0
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/TextArea/TextArea.d.ts +1 -0
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +16 -19
- package/dist/TextInput/TextInput.d.ts +1 -0
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +18 -17
- package/dist/TimeInput/TimeInput.d.ts +1 -0
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +15 -17
- package/dist/Timestamp/Timestamp.d.ts +31 -3
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +47 -76
- package/dist/Timestamp/formatInstant.d.ts +41 -0
- package/dist/Timestamp/formatInstant.d.ts.map +1 -0
- package/dist/Timestamp/formatInstant.js +177 -0
- package/dist/Timestamp/index.d.ts +1 -0
- package/dist/Timestamp/index.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.d.ts +56 -0
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -0
- package/dist/Timestamp/tooltipEntries.js +163 -0
- package/dist/Token/Token.d.ts +30 -3
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +17 -2
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +2 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +17 -1
- package/dist/TopNav/TopNavItem.d.ts +3 -1
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +30 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +8 -6
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +32 -14
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +19 -10
- package/dist/Typeahead/Typeahead.js +1 -1
- package/dist/Typeahead/TypeaheadItem.d.ts +1 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +20 -10
- package/dist/astryx.css +38 -14
- package/dist/astryx.umd.js +52 -52
- package/dist/astryx.umd.js.map +4 -4
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/isRtlElement.d.ts +18 -0
- package/dist/hooks/isRtlElement.d.ts.map +1 -0
- package/dist/hooks/isRtlElement.js +27 -0
- package/dist/hooks/useAnnounce.d.ts +3 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +39 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +52 -11
- package/dist/hooks/useGridFocus.d.ts +6 -1
- package/dist/hooks/useGridFocus.d.ts.map +1 -1
- package/dist/hooks/useGridFocus.js +12 -9
- package/dist/hooks/useHotkeys.d.ts +9 -0
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +9 -0
- package/dist/hooks/useInputStatusIcon.d.ts +38 -0
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -0
- package/dist/hooks/useInputStatusIcon.js +158 -0
- package/dist/hooks/useListFocus.d.ts +39 -1
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +54 -9
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/plainDate.d.ts +17 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +23 -4
- package/dist/utils/rtlStyles.d.ts +24 -0
- package/dist/utils/rtlStyles.d.ts.map +1 -0
- package/dist/utils/rtlStyles.js +27 -0
- package/locales/en.json +76 -0
- package/locales/pseudo.json +57 -0
- package/package.json +6 -1
- package/src/Avatar/Avatar.doc.mjs +18 -4
- package/src/Avatar/Avatar.test.tsx +106 -0
- package/src/Avatar/Avatar.tsx +62 -10
- package/src/Avatar/AvatarStatusDot.doc.mjs +4 -4
- package/src/Avatar/AvatarStatusDot.tsx +6 -4
- package/src/AvatarGroup/AvatarGroup.test.tsx +16 -1
- package/src/Breadcrumbs/BreadcrumbItem.tsx +10 -10
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +51 -0
- package/src/Breadcrumbs/index.ts +4 -0
- package/src/Button/Button.doc.mjs +0 -4
- package/src/Calendar/Calendar.test.tsx +170 -20
- package/src/Calendar/Calendar.tsx +73 -16
- package/src/Calendar/dayCellUtils.test.ts +18 -18
- package/src/Calendar/dayCellUtils.ts +2 -2
- package/src/Calendar/styles.ts +33 -39
- package/src/Card/Card.tsx +1 -1
- package/src/Carousel/Carousel.tsx +25 -6
- package/src/Chat/ChatComposer.doc.mjs +2 -2
- package/src/Chat/ChatComposerInput.doc.mjs +1 -1
- package/src/Chat/ChatDictationButton.tsx +7 -1
- package/src/Chat/ChatMessageBubble.tsx +15 -10
- package/src/Chat/ChatSystemMessage.test.tsx +5 -0
- package/src/Chat/ChatToolCalls.tsx +9 -2
- package/src/CheckboxInput/CheckboxInput.doc.mjs +6 -0
- package/src/CheckboxInput/CheckboxInput.tsx +4 -4
- package/src/CheckboxList/CheckboxList.doc.mjs +6 -0
- package/src/Citation/Citation.doc.mjs +4 -3
- package/src/Citation/Citation.test.tsx +97 -0
- package/src/Citation/Citation.tsx +43 -11
- package/src/CodeBlock/CodeBlock.tsx +35 -8
- package/src/Collapsible/Collapsible.doc.mjs +1 -0
- package/src/Collapsible/Collapsible.test.tsx +7 -0
- package/src/Collapsible/Collapsible.tsx +16 -6
- package/src/CommandPalette/CommandPalette.test.tsx +95 -1
- package/src/CommandPalette/CommandPalette.tsx +41 -2
- package/src/ContextMenu/ContextMenu.test.tsx +42 -0
- package/src/ContextMenu/ContextMenu.tsx +13 -11
- package/src/ContextMenu/index.ts +5 -0
- package/src/DateInput/DateInput.doc.mjs +15 -5
- package/src/DateInput/DateInput.test.tsx +210 -3
- package/src/DateInput/DateInput.tsx +41 -29
- package/src/DateRangeInput/DateRangeInput.doc.mjs +11 -3
- package/src/DateRangeInput/DateRangeInput.test.tsx +120 -3
- package/src/DateRangeInput/DateRangeInput.tsx +29 -27
- package/src/DateTimeInput/DateTimeInput.doc.mjs +22 -1
- package/src/DateTimeInput/DateTimeInput.test.tsx +112 -0
- package/src/DateTimeInput/DateTimeInput.tsx +44 -39
- package/src/Divider/Divider.test.tsx +32 -8
- package/src/Divider/Divider.tsx +14 -1
- package/src/DropdownMenu/DropdownMenu.test.tsx +60 -0
- package/src/DropdownMenu/DropdownMenu.tsx +31 -12
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +88 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +635 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +553 -0
- package/src/DropdownMenu/index.ts +16 -0
- package/src/DropdownMenu/menuItemHover.ts +39 -0
- package/src/DropdownMenu/menuItemRoles.ts +9 -0
- package/src/DropdownMenu/renderDropdownItems.tsx +29 -15
- package/src/Field/Field.tsx +14 -9
- package/src/Field/inputStyles.stylex.ts +2 -0
- package/src/FieldStatus/FieldStatus.tsx +10 -4
- package/src/FileInput/FileInput.doc.mjs +13 -7
- package/src/FileInput/FileInput.test.tsx +84 -16
- package/src/FileInput/FileInput.tsx +96 -79
- package/src/HoverCard/useHoverCard.tsx +15 -3
- package/src/Icon/Icon.doc.mjs +13 -0
- package/src/Icon/Icon.test.tsx +89 -0
- package/src/Icon/Icon.tsx +51 -3
- package/src/Lightbox/Lightbox.tsx +11 -3
- package/src/List/List.test.tsx +17 -29
- package/src/List/List.tsx +6 -1
- package/src/Markdown/Markdown.test.tsx +21 -0
- package/src/Markdown/Markdown.tsx +4 -0
- package/src/MultiSelector/MultiSelector.doc.mjs +11 -0
- package/src/MultiSelector/MultiSelector.test.tsx +306 -3
- package/src/MultiSelector/MultiSelector.tsx +88 -57
- package/src/NumberInput/NumberInput.doc.mjs +11 -5
- package/src/NumberInput/NumberInput.test.tsx +48 -0
- package/src/NumberInput/NumberInput.tsx +25 -26
- package/src/Outline/Outline.test.tsx +12 -12
- package/src/Outline/Outline.tsx +2 -2
- package/src/RadioList/RadioList.doc.mjs +6 -0
- package/src/RadioList/RadioList.tsx +2 -2
- package/src/RadioList/RadioListItem.tsx +4 -4
- package/src/Resizable/ResizeHandle.test.tsx +94 -0
- package/src/Resizable/ResizeHandle.tsx +70 -20
- package/src/SegmentedControl/SegmentedControlItem.tsx +2 -0
- package/src/Selector/Selector.doc.mjs +8 -0
- package/src/Selector/Selector.test.tsx +328 -3
- package/src/Selector/Selector.tsx +70 -19
- package/src/SideNav/SideNav.tsx +1 -8
- package/src/SideNav/SideNavCollapseButton.tsx +9 -7
- package/src/SideNav/SideNavItem.tsx +5 -3
- package/src/Slider/Slider.doc.mjs +6 -0
- package/src/Slider/Slider.test.tsx +240 -12
- package/src/Slider/Slider.tsx +96 -23
- package/src/Spinner/Spinner.test.tsx +10 -8
- package/src/Spinner/Spinner.tsx +15 -5
- package/src/Switch/Switch.doc.mjs +142 -42
- package/src/Switch/Switch.test.tsx +22 -0
- package/src/Switch/Switch.tsx +90 -33
- package/src/TabList/TabList.doc.mjs +0 -6
- package/src/TabList/TabList.test.tsx +3 -15
- package/src/TabList/TabList.tsx +6 -17
- package/src/TabList/TabListContext.ts +0 -6
- package/src/Table/BaseTable.tsx +34 -2
- package/src/Table/Table.doc.mjs +11 -0
- package/src/Table/Table.test.tsx +85 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +9 -6
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +24 -17
- package/src/Table/plugins/selection/useTableSelection.test.tsx +61 -3
- package/src/Table/plugins/selection/useTableSelection.tsx +3 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +37 -8
- package/src/Table/plugins/tree/useTableTreeData.tsx +17 -13
- package/src/Table/types.ts +33 -0
- package/src/Table/useTableRowStatus.doc.mjs +1 -1
- package/src/TextArea/TextArea.doc.mjs +11 -5
- package/src/TextArea/TextArea.tsx +17 -26
- package/src/TextInput/TextInput.doc.mjs +11 -5
- package/src/TextInput/TextInput.test.tsx +130 -3
- package/src/TextInput/TextInput.tsx +18 -25
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -1
- package/src/TimeInput/TimeInput.doc.mjs +11 -5
- package/src/TimeInput/TimeInput.tsx +14 -25
- package/src/Timestamp/Timestamp.doc.mjs +32 -6
- package/src/Timestamp/Timestamp.test.tsx +371 -0
- package/src/Timestamp/Timestamp.tsx +96 -93
- package/src/Timestamp/formatInstant.ts +218 -0
- package/src/Timestamp/index.ts +4 -0
- package/src/Timestamp/tooltipEntries.test.ts +552 -0
- package/src/Timestamp/tooltipEntries.ts +210 -0
- package/src/Token/Token.test.tsx +21 -15
- package/src/Token/Token.tsx +31 -14
- package/src/Token/index.ts +1 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +8 -1
- package/src/Tokenizer/Tokenizer.tsx +4 -2
- package/src/Tooltip/Tooltip.test.tsx +46 -0
- package/src/Tooltip/useTooltip.tsx +20 -0
- package/src/TopNav/TopNav.test.tsx +93 -2
- package/src/TopNav/TopNavItem.doc.mjs +3 -3
- package/src/TopNav/TopNavItem.tsx +35 -6
- package/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs +1 -1
- package/src/TreeList/TreeList.doc.mjs +6 -0
- package/src/TreeList/TreeList.test.tsx +50 -10
- package/src/TreeList/TreeList.tsx +5 -0
- package/src/TreeList/TreeListBranches.tsx +8 -6
- package/src/TreeList/TreeListItem.tsx +33 -11
- package/src/Typeahead/BaseTypeahead.tsx +29 -14
- package/src/Typeahead/Typeahead.doc.mjs +6 -0
- package/src/Typeahead/Typeahead.test.tsx +27 -0
- package/src/Typeahead/Typeahead.tsx +1 -1
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/__tests__/inputWidthContract.test.tsx +62 -0
- package/src/doc-mjs.d.ts +19 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/isRtlElement.ts +27 -0
- package/src/hooks/useAnnounce.test.tsx +75 -2
- package/src/hooks/useAnnounce.ts +47 -1
- package/src/hooks/useFocusTrap.test.tsx +104 -0
- package/src/hooks/useFocusTrap.ts +61 -12
- package/src/hooks/useGridFocus.doc.mjs +3 -3
- package/src/hooks/useGridFocus.test.tsx +41 -0
- package/src/hooks/useGridFocus.ts +21 -10
- package/src/hooks/useHotkeys.ts +9 -0
- package/src/hooks/useInputStatusIcon.test.tsx +162 -0
- package/src/hooks/useInputStatusIcon.tsx +224 -0
- package/src/hooks/useListFocus.doc.mjs +25 -3
- package/src/hooks/useListFocus.test.tsx +153 -1
- package/src/hooks/useListFocus.ts +102 -9
- package/src/reset.css +0 -26
- package/src/reset.test.ts +60 -0
- package/src/theme/derivedVarRegistry.test.ts +1 -0
- package/src/theme/derivedVarRegistry.ts +6 -0
- package/src/theme/generateThemeRules.test.ts +42 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/plainDate.test.ts +24 -6
- package/src/utils/plainDate.ts +18 -4
- package/src/utils/rtlStyles.ts +27 -0
package/dist/Calendar/styles.js
CHANGED
|
@@ -63,7 +63,6 @@ export const calendarStyles = {
|
|
|
63
63
|
},
|
|
64
64
|
navIcon: {
|
|
65
65
|
k1xSpc: "x3nfvp2",
|
|
66
|
-
k3aq6I: "xgtlewx",
|
|
67
66
|
$$css: true
|
|
68
67
|
}
|
|
69
68
|
};
|
|
@@ -137,60 +136,60 @@ export const dayCellStyles = {
|
|
|
137
136
|
kVAEAm: "x10l6tqk",
|
|
138
137
|
k87sOh: "xs7f9wi",
|
|
139
138
|
krVfgx: "x1c7jfne",
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
kLqNvP: "x1o0tod",
|
|
140
|
+
kt4wiu: "xtijo5x",
|
|
142
141
|
$$css: true
|
|
143
142
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
rangeBgRadiusStart: {
|
|
144
|
+
kLqNvP: "xaoy8p5",
|
|
145
|
+
krdFHd: "x19415el",
|
|
146
|
+
kVL7Gh: "x1wc3881",
|
|
148
147
|
$$css: true
|
|
149
148
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
rangeBgRadiusEnd: {
|
|
150
|
+
kt4wiu: "xz03a8w",
|
|
151
|
+
kfmiAY: "x8agd5o",
|
|
152
|
+
kT0f0o: "x1dgc8on",
|
|
154
153
|
$$css: true
|
|
155
154
|
},
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
rangeInsetStart: {
|
|
156
|
+
kLqNvP: "xaoy8p5",
|
|
158
157
|
$$css: true
|
|
159
158
|
},
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
rangeInsetEnd: {
|
|
160
|
+
kt4wiu: "xz03a8w",
|
|
162
161
|
$$css: true
|
|
163
162
|
},
|
|
164
163
|
previewBg: {
|
|
165
164
|
kVAEAm: "x10l6tqk",
|
|
166
165
|
k87sOh: "xs7f9wi",
|
|
167
166
|
krVfgx: "x1c7jfne",
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
kLqNvP: "x1o0tod",
|
|
168
|
+
kt4wiu: "xtijo5x",
|
|
170
169
|
$$css: true
|
|
171
170
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
previewBgRadiusStart: {
|
|
172
|
+
kLqNvP: "xaoy8p5",
|
|
173
|
+
krdFHd: "x19415el",
|
|
174
|
+
kVL7Gh: "x1wc3881",
|
|
176
175
|
$$css: true
|
|
177
176
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
previewBgRadiusEnd: {
|
|
178
|
+
kt4wiu: "xz03a8w",
|
|
179
|
+
kfmiAY: "x8agd5o",
|
|
180
|
+
kT0f0o: "x1dgc8on",
|
|
182
181
|
$$css: true
|
|
183
182
|
},
|
|
184
183
|
previewStart: {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
kLqNvP: "xaoy8p5",
|
|
185
|
+
krdFHd: "x19415el",
|
|
186
|
+
kVL7Gh: "x1wc3881",
|
|
188
187
|
$$css: true
|
|
189
188
|
},
|
|
190
189
|
previewEnd: {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
kt4wiu: "xz03a8w",
|
|
191
|
+
kfmiAY: "x8agd5o",
|
|
192
|
+
kT0f0o: "x1dgc8on",
|
|
194
193
|
$$css: true
|
|
195
194
|
},
|
|
196
195
|
day: {
|
package/dist/Card/Card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA+JD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,QAAQ,EACR,GAAO,EACP,UAAiB,EACjB,WAAkB,EAClB,OAAe,EACf,OAAO,EACP,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,aAAa,+BA6Mf;yBA3Ne,QAAQ"}
|
|
@@ -27,7 +27,8 @@ import { Button } from "../Button/index.js";
|
|
|
27
27
|
import { Icon } from "../Icon/index.js";
|
|
28
28
|
import { useLayer } from "../Layer/index.js";
|
|
29
29
|
import { useScrollOverflow } from "../hooks/useScrollOverflow.js";
|
|
30
|
-
import {
|
|
30
|
+
import { isRtlElement } from "../hooks/isRtlElement.js";
|
|
31
|
+
import { mergeProps, mergeRefs, rtlStyles } from "../utils/index.js";
|
|
31
32
|
import { themeProps } from "../utils/themeProps.js";
|
|
32
33
|
import { useTranslator } from "../i18n/index.js";
|
|
33
34
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -284,7 +285,10 @@ export function Carousel({
|
|
|
284
285
|
// for users who opted out of motion.
|
|
285
286
|
const prefersReducedMotion = typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
286
287
|
el.scrollBy({
|
|
287
|
-
|
|
288
|
+
// `direction` is the logical intent (-1 = toward content start, +1 =
|
|
289
|
+
// toward content end). Under RTL the scroll axis is inverted (start is
|
|
290
|
+
// scrollLeft 0, the end is negative), so flip the physical delta sign.
|
|
291
|
+
left: (isRtlElement(el) ? -1 : 1) * direction * Math.max(amount, itemWidth),
|
|
288
292
|
behavior: prefersReducedMotion ? 'auto' : 'smooth'
|
|
289
293
|
});
|
|
290
294
|
}, []);
|
|
@@ -332,16 +336,19 @@ export function Carousel({
|
|
|
332
336
|
children: [/*#__PURE__*/_jsx("div", {
|
|
333
337
|
...{
|
|
334
338
|
0: {
|
|
335
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xuuh30"
|
|
339
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xuuh30 x1nyx83j"
|
|
336
340
|
},
|
|
337
341
|
1: {
|
|
338
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xuuh30 xg01cxk x47corl"
|
|
342
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xuuh30 x1nyx83j xg01cxk x47corl"
|
|
339
343
|
}
|
|
340
344
|
}[!!!overflowStart << 0],
|
|
341
345
|
children: /*#__PURE__*/_jsx(Button, {
|
|
342
|
-
icon: /*#__PURE__*/_jsx(
|
|
343
|
-
|
|
344
|
-
|
|
346
|
+
icon: /*#__PURE__*/_jsx("span", {
|
|
347
|
+
...stylex.props(rtlStyles.mirror),
|
|
348
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
349
|
+
icon: "chevronLeft",
|
|
350
|
+
size: "xsm"
|
|
351
|
+
})
|
|
345
352
|
}),
|
|
346
353
|
label: t('@astryx.carousel.scrollLeft'),
|
|
347
354
|
variant: "ghost",
|
|
@@ -359,16 +366,19 @@ export function Carousel({
|
|
|
359
366
|
}), /*#__PURE__*/_jsx("div", {
|
|
360
367
|
...{
|
|
361
368
|
0: {
|
|
362
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xitnhlw"
|
|
369
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xitnhlw x36dvrd"
|
|
363
370
|
},
|
|
364
371
|
1: {
|
|
365
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xitnhlw xg01cxk x47corl"
|
|
372
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xitnhlw x36dvrd xg01cxk x47corl"
|
|
366
373
|
}
|
|
367
374
|
}[!!!overflowEnd << 0],
|
|
368
375
|
children: /*#__PURE__*/_jsx(Button, {
|
|
369
|
-
icon: /*#__PURE__*/_jsx(
|
|
370
|
-
|
|
371
|
-
|
|
376
|
+
icon: /*#__PURE__*/_jsx("span", {
|
|
377
|
+
...stylex.props(rtlStyles.mirror),
|
|
378
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
379
|
+
icon: "chevronRight",
|
|
380
|
+
size: "xsm"
|
|
381
|
+
})
|
|
372
382
|
}),
|
|
373
383
|
label: t('@astryx.carousel.scrollRight'),
|
|
374
384
|
variant: "ghost",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDictationButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatDictationButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAMvE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatDictationButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatDictationButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAMvE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC1E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC,sEAAsE;IACtE,SAAS,EAAE,0BAA0B,CAAC;IACtC,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiDD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,SAAS,EACT,IAAW,EACX,uBAA8B,EAC9B,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,4BAoE1B;yBA9Ee,mBAAmB"}
|
|
@@ -24,6 +24,7 @@ import { colorVars, radiusVars } from "../theme/tokens.stylex.js";
|
|
|
24
24
|
import { Button } from "../Button/index.js";
|
|
25
25
|
import { Icon } from "../Icon/index.js";
|
|
26
26
|
import { mergeProps } from "../utils/index.js";
|
|
27
|
+
import { useTranslator } from "../i18n/index.js";
|
|
27
28
|
|
|
28
29
|
// =============================================================================
|
|
29
30
|
// Types
|
|
@@ -86,6 +87,7 @@ export function ChatDictationButton({
|
|
|
86
87
|
style,
|
|
87
88
|
...rest
|
|
88
89
|
}) {
|
|
90
|
+
const t = useTranslator();
|
|
89
91
|
if (isHiddenWhenUnsupported && !dictation.isSupported) {
|
|
90
92
|
return null;
|
|
91
93
|
}
|
|
@@ -94,7 +96,7 @@ export function ChatDictationButton({
|
|
|
94
96
|
bands,
|
|
95
97
|
volume: rawVolume
|
|
96
98
|
} = dictation;
|
|
97
|
-
const accessibleLabel = label ?? (isListening ? '
|
|
99
|
+
const accessibleLabel = label ?? (isListening ? t('@astryx.chatDictationButton.stopDictation') : t('@astryx.chatDictationButton.startDictation'));
|
|
98
100
|
|
|
99
101
|
// Boost each band for visibility — quiet speech (0-10%) maps to full visual range
|
|
100
102
|
const boostedBands = bands.map(b => Math.min(Math.pow(b / 0.2, 0.5), 1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessageBubble.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageBubble.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAWrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,sBAAuB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACvE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CACrC;
|
|
1
|
+
{"version":3,"file":"ChatMessageBubble.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatMessageBubble.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAWrC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,sBAAuB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACvE,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CACrC;AA8GD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,sBAAsB,+BAyFxB;yBArGe,iBAAiB"}
|
|
@@ -117,29 +117,29 @@ const styles = {
|
|
|
117
117
|
$$css: true
|
|
118
118
|
},
|
|
119
119
|
groupFirstAssistant: {
|
|
120
|
-
|
|
120
|
+
kVL7Gh: "xrfs2vl",
|
|
121
121
|
$$css: true
|
|
122
122
|
},
|
|
123
123
|
groupMiddleAssistant: {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
krdFHd: "x3qb8m",
|
|
125
|
+
kVL7Gh: "xrfs2vl",
|
|
126
126
|
$$css: true
|
|
127
127
|
},
|
|
128
128
|
groupLastAssistant: {
|
|
129
|
-
|
|
129
|
+
krdFHd: "x3qb8m",
|
|
130
130
|
$$css: true
|
|
131
131
|
},
|
|
132
132
|
groupFirstUser: {
|
|
133
|
-
|
|
133
|
+
kT0f0o: "x1whkvtz",
|
|
134
134
|
$$css: true
|
|
135
135
|
},
|
|
136
136
|
groupMiddleUser: {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
kfmiAY: "x126per9",
|
|
138
|
+
kT0f0o: "x1whkvtz",
|
|
139
139
|
$$css: true
|
|
140
140
|
},
|
|
141
141
|
groupLastUser: {
|
|
142
|
-
|
|
142
|
+
kfmiAY: "x126per9",
|
|
143
143
|
$$css: true
|
|
144
144
|
}
|
|
145
145
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatToolCalls.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatToolCalls.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAA+B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatToolCalls.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatToolCalls.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAA+B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAwB5C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAE9E,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6FAA6F;IAC7F,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACnE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,+BAA+B;IAC/B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AA0YD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,4BAsJtD;yBAtJe,aAAa"}
|
|
@@ -27,6 +27,7 @@ import { Icon } from "../Icon/index.js";
|
|
|
27
27
|
import { Spinner } from "../Spinner/index.js";
|
|
28
28
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
29
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
30
|
+
import { useTranslator } from "../i18n/index.js";
|
|
30
31
|
|
|
31
32
|
// =============================================================================
|
|
32
33
|
// Types
|
|
@@ -104,6 +105,7 @@ function getToolCallKey(call) {
|
|
|
104
105
|
function CallRow({
|
|
105
106
|
call
|
|
106
107
|
}) {
|
|
108
|
+
const t = useTranslator();
|
|
107
109
|
const status = call.status ?? 'complete';
|
|
108
110
|
const hasDetail = call.resultDetail != null;
|
|
109
111
|
const [isDetailOpen, setIsDetailOpen] = useState(false);
|
|
@@ -160,7 +162,9 @@ function CallRow({
|
|
|
160
162
|
// users. Rendering it inside the row also folds it into the
|
|
161
163
|
// accessible name of expandable (role="button") rows.
|
|
162
164
|
_jsx(VisuallyHidden, {
|
|
163
|
-
children:
|
|
165
|
+
children: t('@astryx.chatToolCalls.error', {
|
|
166
|
+
message: call.errorMessage ?? ''
|
|
167
|
+
})
|
|
164
168
|
})]
|
|
165
169
|
}), /*#__PURE__*/_jsx("span", {
|
|
166
170
|
...{
|
|
@@ -252,6 +256,7 @@ function CallRow({
|
|
|
252
256
|
* ```
|
|
253
257
|
*/
|
|
254
258
|
export function ChatToolCalls(props) {
|
|
259
|
+
const t = useTranslator();
|
|
255
260
|
const {
|
|
256
261
|
calls,
|
|
257
262
|
label: _customLabel,
|
|
@@ -324,11 +329,13 @@ export function ChatToolCalls(props) {
|
|
|
324
329
|
size: "sm",
|
|
325
330
|
color: "inherit"
|
|
326
331
|
})
|
|
327
|
-
}), /*#__PURE__*/
|
|
332
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
328
333
|
...{
|
|
329
334
|
className: "x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4"
|
|
330
335
|
},
|
|
331
|
-
children:
|
|
336
|
+
children: t('@astryx.chatToolCalls.groupLabel', {
|
|
337
|
+
count: calls.length
|
|
338
|
+
})
|
|
332
339
|
})]
|
|
333
340
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
334
341
|
children: [/*#__PURE__*/_jsx("span", {
|
|
@@ -134,13 +134,13 @@ const wrapperSizeStyles = {
|
|
|
134
134
|
};
|
|
135
135
|
const checkboxSizeStyles = {
|
|
136
136
|
sm: {
|
|
137
|
-
kzqmXN: "
|
|
138
|
-
kZKoxP: "
|
|
137
|
+
kzqmXN: "xw4jnvo",
|
|
138
|
+
kZKoxP: "x1qx5ct2",
|
|
139
139
|
$$css: true
|
|
140
140
|
},
|
|
141
141
|
md: {
|
|
142
|
-
kzqmXN: "
|
|
143
|
-
kZKoxP: "
|
|
142
|
+
kzqmXN: "xvy4d1p",
|
|
143
|
+
kZKoxP: "xxk0z11",
|
|
144
144
|
$$css: true
|
|
145
145
|
}
|
|
146
146
|
};
|
|
@@ -6,14 +6,35 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update these files to stay in sync:
|
|
8
8
|
* - /packages/core/src/Citation/index.ts (exports if types change)
|
|
9
|
+
* - /packages/core/src/Citation/Citation.doc.mjs (props table, features)
|
|
10
|
+
* - /packages/core/src/Citation/Citation.test.tsx (tests for new/changed behavior)
|
|
11
|
+
* - /apps/storybook/stories/Citation.stories.tsx (storybook stories)
|
|
9
12
|
* - /packages/cli/templates/blocks/components/Citation/ (showcase blocks)
|
|
10
13
|
*/
|
|
11
14
|
import type React from 'react';
|
|
15
|
+
import type { ReactNode } from 'react';
|
|
12
16
|
import type { BaseProps } from '../BaseProps';
|
|
13
17
|
export interface CitationSource {
|
|
14
18
|
title?: string;
|
|
15
19
|
url?: string;
|
|
16
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Image URL for a favicon or source logo, rendered as `<img src>` inside the
|
|
22
|
+
* icon circle. This is the idiomatic field for image sources (mirrors
|
|
23
|
+
* `Avatar`/`Thumbnail` `src`). When both `src` and a non-string `icon` are
|
|
24
|
+
* provided, `icon` wins.
|
|
25
|
+
*/
|
|
26
|
+
src?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Source icon shown before the label text (label variant only). Accepts:
|
|
29
|
+
* - a React node / Astryx `<Icon>` / SVG element — rendered as-is, or
|
|
30
|
+
* - a string image URL — rendered as `<img src>` for backward compatibility
|
|
31
|
+
* with callers that passed a favicon URL here.
|
|
32
|
+
*
|
|
33
|
+
* Note: unlike icon slots elsewhere in the system, a bare string is treated
|
|
34
|
+
* as an image URL (not a semantic icon name) to preserve the original
|
|
35
|
+
* favicon behavior. Pass an Astryx `<Icon>` (or other node) for a real icon.
|
|
36
|
+
*/
|
|
37
|
+
icon?: ReactNode;
|
|
17
38
|
}
|
|
18
39
|
export interface CitationProps extends BaseProps<HTMLElement> {
|
|
19
40
|
ref?: React.Ref<HTMLElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Citation.d.ts","sourceRoot":"","sources":["../../src/Citation/Citation.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"Citation.d.ts","sourceRoot":"","sources":["../../src/Citation/Citation.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAarC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC3D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9B;AA2GD,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,MAAM,EACN,MAAM,EACN,OAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CA2FpC;yBArGe,QAAQ"}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/core/src/Citation/index.ts (exports if types change)
|
|
13
|
+
* - /packages/core/src/Citation/Citation.doc.mjs (props table, features)
|
|
14
|
+
* - /packages/core/src/Citation/Citation.test.tsx (tests for new/changed behavior)
|
|
15
|
+
* - /apps/storybook/stories/Citation.stories.tsx (storybook stories)
|
|
13
16
|
* - /packages/cli/templates/blocks/components/Citation/ (showcase blocks)
|
|
14
17
|
*/
|
|
15
18
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -18,6 +21,7 @@ import { colorVars, spacingVars, radiusVars, typeScaleVars, fontWeightVars, bord
|
|
|
18
21
|
import { mergeProps } from "../utils/index.js";
|
|
19
22
|
import { themeProps } from "../utils/themeProps.js";
|
|
20
23
|
import { useTranslator } from "../i18n/index.js";
|
|
24
|
+
import { renderIconSlot } from "../Icon/index.js";
|
|
21
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
26
|
const styles = {
|
|
23
27
|
label: {
|
|
@@ -100,7 +104,15 @@ export function Citation({
|
|
|
100
104
|
const t = useTranslator();
|
|
101
105
|
const title = source.title ?? String(number);
|
|
102
106
|
const href = source.url;
|
|
103
|
-
|
|
107
|
+
|
|
108
|
+
// Resolve the source icon. A non-string `icon` node renders as-is (an Astryx
|
|
109
|
+
// <Icon>, SVG, avatar, etc.). Otherwise fall back to an image URL: `src`, or
|
|
110
|
+
// a legacy string passed to `icon` (back-compat — favicon URLs still render
|
|
111
|
+
// as <img>). The icon is decorative; the accessible name comes solely from
|
|
112
|
+
// the element's aria-label, so nothing is double-announced.
|
|
113
|
+
const iconNode = source.icon != null && typeof source.icon !== 'string' ? source.icon : null;
|
|
114
|
+
const imageSrc = source.src ?? (typeof source.icon === 'string' ? source.icon : undefined);
|
|
115
|
+
const hasIcon = iconNode != null || imageSrc != null;
|
|
104
116
|
const Tag = href ? 'a' : 'span';
|
|
105
117
|
// `doc-noteref` is a reference role — only appropriate on the interactive
|
|
106
118
|
// link form. On a plain (unlinked) span it is not a permitted role
|
|
@@ -146,15 +158,17 @@ export function Citation({
|
|
|
146
158
|
...linkProps,
|
|
147
159
|
...mergeProps(themeProps('citation', {
|
|
148
160
|
variant
|
|
149
|
-
}), stylex.props(styles.label,
|
|
150
|
-
children: [
|
|
161
|
+
}), stylex.props(styles.label, hasIcon && styles.labelWithIcon, href != null && styles.labelHover, href != null && styles.labelInteractive, xstyle), className, style),
|
|
162
|
+
children: [hasIcon && /*#__PURE__*/_jsx("span", {
|
|
163
|
+
"aria-hidden": "true",
|
|
151
164
|
...{
|
|
152
165
|
className: "x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s"
|
|
153
166
|
},
|
|
154
|
-
children:
|
|
155
|
-
|
|
167
|
+
children: iconNode != null ? renderIconSlot(iconNode, {
|
|
168
|
+
size: 'sm'
|
|
169
|
+
}) : /*#__PURE__*/_jsx("img", {
|
|
170
|
+
src: imageSrc,
|
|
156
171
|
alt: "",
|
|
157
|
-
"aria-hidden": "true",
|
|
158
172
|
...{
|
|
159
173
|
className: "x1ad1g3v x9gl9lo"
|
|
160
174
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2B5C,OAAO,EAAc,KAAK,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2B5C,OAAO,EAAc,KAAK,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AAuXxE,MAAM,WAAW,cAAe,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,KACb;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAClD,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC;AAqPD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAsB,EACtB,KAAK,EACL,gBAAuB,EACvB,cAAsB,EACtB,cAAc,EACd,aAAoB,EACpB,MAAM,EACN,SAAiB,EACjB,SAAS,EACT,aAAqB,EACrB,oBAAyB,EACzB,IAAW,EACX,KAAK,EAAE,SAAyB,EAChC,SAAkB,EAClB,SAAS,EAAE,eAAe,EAC1B,aAAsB,EACtB,WAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,cAAc,qBAuOhB;yBA/Pe,SAAS"}
|
|
@@ -63,6 +63,12 @@ const dynamicStyles = {
|
|
|
63
63
|
"--x---_codeblock-gutter-width": `${digits}ch` != null ? `${digits}ch` : undefined
|
|
64
64
|
}]
|
|
65
65
|
};
|
|
66
|
+
|
|
67
|
+
// Light reveal so the leading chevron eases into view instead of popping in.
|
|
68
|
+
// Growing the chevron's own footprint (width + inline margin) from zero slides
|
|
69
|
+
// the title into place instead of snapping it over, and clipping keeps the
|
|
70
|
+
// glyph from spilling while it's mid-reveal.
|
|
71
|
+
const chevronReveal = "x1xhkexc-B";
|
|
66
72
|
const styles = {
|
|
67
73
|
root: {
|
|
68
74
|
kVAEAm: "x1n2onr6",
|
|
@@ -516,23 +522,23 @@ export function CodeBlock({
|
|
|
516
522
|
}[!!canCollapse << 0],
|
|
517
523
|
children: /*#__PURE__*/_jsxs("span", {
|
|
518
524
|
...{
|
|
519
|
-
className: "x78zum5 x6s0dn4
|
|
525
|
+
className: "x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j"
|
|
520
526
|
},
|
|
521
|
-
children: [
|
|
527
|
+
children: [canCollapse && /*#__PURE__*/_jsx("span", {
|
|
522
528
|
...{
|
|
523
529
|
0: {
|
|
524
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg x1mjzq1q x11xpdln xuedmi6 xlr8y92"
|
|
530
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92"
|
|
525
531
|
},
|
|
526
532
|
1: {
|
|
527
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg x1mjzq1q x11xpdln xuedmi6 xlr8y92
|
|
533
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92 x1iffjtl"
|
|
528
534
|
}
|
|
529
|
-
}[
|
|
535
|
+
}[!!!isCollapsed << 0],
|
|
530
536
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
531
|
-
icon: "
|
|
537
|
+
icon: "chevronRight",
|
|
532
538
|
size: "xsm",
|
|
533
539
|
color: "inherit"
|
|
534
540
|
})
|
|
535
|
-
})]
|
|
541
|
+
}), title, title && languageLabel ? ' — ' : '', languageLabel]
|
|
536
542
|
})
|
|
537
543
|
}), copyButtonEl]
|
|
538
544
|
}) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAiBjD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAiBjD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAuH5C,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,gBAAgB,EACxB,UAAkB,EAClB,YAAY,EACZ,KAAK,EACL,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,+BAkGlB;yBA/Ge,WAAW"}
|
|
@@ -227,7 +227,9 @@ export function Collapsible({
|
|
|
227
227
|
// would swallow events like a wrapping tooltip's hover).
|
|
228
228
|
,
|
|
229
229
|
tabIndex: isDisabled ? -1 : undefined,
|
|
230
|
-
...
|
|
230
|
+
...mergeProps(themeProps('collapsible-trigger', {
|
|
231
|
+
density: density ?? undefined
|
|
232
|
+
}), stylex.props(styles.trigger, density != null && triggerDensity[density], isDisabled && styles.triggerDisabled)),
|
|
231
233
|
children: [/*#__PURE__*/_jsx("span", {
|
|
232
234
|
...{
|
|
233
235
|
className: "x1b2iylo xwgcxoh"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file CommandPalette.tsx
|
|
3
|
-
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox
|
|
3
|
+
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox, useAnnounce
|
|
4
4
|
* @output Exports CommandPalette root component and props
|
|
5
5
|
* @position Core root component; dialog shell with searchSource-driven items
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../src/CommandPalette/CommandPalette.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,YAAY,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAU/D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../src/CommandPalette/CommandPalette.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,YAAY,EAAE,cAAc,EAAC,MAAM,cAAc,CAAC;AAU/D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAI5C,MAAM,WAAW,mBAAmB,CAClC,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACtD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,0DAA0D;IAC1D,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAExC;;;;OAIG;IACH,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAE9B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,KAAK,SAAS,CAAC;IAEzD;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8CAA8C;IAC9C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AA6GD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,EACxE,GAAG,EACH,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,UAAU,EACV,eAAe,EAAE,wBAAwB,EACzC,kBAAkB,EAAE,2BAA2B,EAC/C,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,KAAK,EAAE,cAAc,EACrB,KAAW,EACX,SAAe,EACf,GAAG,IAAI,EACR,EAAE,mBAAmB,CAAC,CAAC,CAAC,+BAiUxB;yBAlVe,cAAc"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CommandPalette.tsx
|
|
7
|
-
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox
|
|
7
|
+
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox, useAnnounce
|
|
8
8
|
* @output Exports CommandPalette root component and props
|
|
9
9
|
* @position Core root component; dialog shell with searchSource-driven items
|
|
10
10
|
*
|
|
@@ -23,6 +23,7 @@ import { CommandPaletteGroup } from "./CommandPaletteGroup.js";
|
|
|
23
23
|
import { CommandPaletteInput } from "./CommandPaletteInput.js";
|
|
24
24
|
import { CommandPaletteFooter } from "./CommandPaletteFooter.js";
|
|
25
25
|
import { CommandPaletteEmpty } from "./CommandPaletteEmpty.js";
|
|
26
|
+
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
26
27
|
import { useTranslator } from "../i18n/index.js";
|
|
27
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
29
|
function getGroup(item) {
|
|
@@ -181,6 +182,13 @@ export function CommandPalette({
|
|
|
181
182
|
const [optimisticResults, setOptimisticResults] = useOptimistic(searchResults);
|
|
182
183
|
const isBusy = isPending;
|
|
183
184
|
const searchVersionRef = useRef(0);
|
|
185
|
+
|
|
186
|
+
// Announce search status to screen readers through the shared polite live
|
|
187
|
+
// region (comboboxes-7 announce path, mirroring Selector / BaseTypeahead).
|
|
188
|
+
// The busy spinner and the empty states are otherwise purely visual, so a
|
|
189
|
+
// screen-reader user typing a query would hear nothing when loading starts
|
|
190
|
+
// or results disappear.
|
|
191
|
+
const announce = useAnnounce();
|
|
184
192
|
const value = controlledValue ?? internalValue;
|
|
185
193
|
const setValue = useCallback(newValue => {
|
|
186
194
|
if (controlledValue === undefined) {
|
|
@@ -200,8 +208,12 @@ export function CommandPalette({
|
|
|
200
208
|
setInternalValue('');
|
|
201
209
|
}
|
|
202
210
|
searchSource.cancel?.();
|
|
211
|
+
// Clear any lingering result / loading announcement when the palette
|
|
212
|
+
// closes so stale status text does not linger in the a11y tree
|
|
213
|
+
// (matching Selector's onHide).
|
|
214
|
+
announce('');
|
|
203
215
|
onOpenChange(false);
|
|
204
|
-
}, [onOpenChange, searchSource, controlledValue]);
|
|
216
|
+
}, [onOpenChange, searchSource, controlledValue, announce]);
|
|
205
217
|
const selectItem = useCallback(itemValue => {
|
|
206
218
|
setValue(itemValue);
|
|
207
219
|
}, [setValue]);
|
|
@@ -234,6 +246,14 @@ export function CommandPalette({
|
|
|
234
246
|
startTransition(async () => {
|
|
235
247
|
const isBootstrap = query === '';
|
|
236
248
|
|
|
249
|
+
// Loading started for a user query: tell screen-reader users the
|
|
250
|
+
// spinner appeared. The polite region coalesces rapid updates, so for
|
|
251
|
+
// fast sources the result-count announcement below simply replaces
|
|
252
|
+
// this instead of stacking one "Loading" per keystroke.
|
|
253
|
+
if (!isBootstrap) {
|
|
254
|
+
announce(t('@astryx.commandPalette.loading'));
|
|
255
|
+
}
|
|
256
|
+
|
|
237
257
|
// Client-filter previous results for instant narrowing while fetch is in flight
|
|
238
258
|
if (!isBootstrap && searchResults.length > 0) {
|
|
239
259
|
const lower = query.toLowerCase().trim();
|
|
@@ -247,6 +267,25 @@ export function CommandPalette({
|
|
|
247
267
|
setOptimisticResults(items);
|
|
248
268
|
setSearchResults(items);
|
|
249
269
|
|
|
270
|
+
// Announce the outcome from the search commit (not a reactive
|
|
271
|
+
// effect), matching Selector / BaseTypeahead: exactly one
|
|
272
|
+
// announcement per committed query, and the version check above
|
|
273
|
+
// already discards stale keystrokes. Bootstrap stays silent — the
|
|
274
|
+
// same role PowerSearch's mount guard plays — so opening the
|
|
275
|
+
// palette announces nothing; clearing the query only clears any
|
|
276
|
+
// lingering status text.
|
|
277
|
+
if (isBootstrap) {
|
|
278
|
+
announce('');
|
|
279
|
+
} else if (items.length === 0) {
|
|
280
|
+
announce(t('@astryx.commandPalette.noResultsFor', {
|
|
281
|
+
query
|
|
282
|
+
}));
|
|
283
|
+
} else {
|
|
284
|
+
announce(t('@astryx.commandPalette.resultCount', {
|
|
285
|
+
count: items.length
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
|
|
250
289
|
// When opening with a preselected value, highlight it once
|
|
251
290
|
// bootstrap results arrive. No value → highlight stays at -1
|
|
252
291
|
// and ArrowDown naturally moves to the first item.
|
|
@@ -258,7 +297,7 @@ export function CommandPalette({
|
|
|
258
297
|
}
|
|
259
298
|
}
|
|
260
299
|
});
|
|
261
|
-
}, [searchSource, searchResults, startTransition, value, combobox, setOptimisticResults]);
|
|
300
|
+
}, [searchSource, searchResults, startTransition, value, combobox, setOptimisticResults, announce, t]);
|
|
262
301
|
|
|
263
302
|
// Bootstrap on open. We use a ref to avoid re-triggering when
|
|
264
303
|
// runSearch's identity changes (it depends on searchResults).
|