@astryxdesign/core 0.1.5 → 0.1.6-canary.02f2602
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 +24 -0
- package/README.md +2 -0
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +21 -18
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +0 -2
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/useImperativeAlertDialog.js +3 -5
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +55 -53
- package/dist/AspectRatio/AspectRatio.js +5 -5
- package/dist/Avatar/Avatar.js +19 -19
- package/dist/Avatar/AvatarStatusDot.js +5 -5
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +9 -6
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -5
- package/dist/Badge/Badge.js +3 -3
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -30
- package/dist/Blockquote/Blockquote.js +7 -7
- package/dist/Breadcrumbs/BreadcrumbItem.js +17 -17
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +11 -8
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +53 -23
- package/dist/ButtonGroup/ButtonGroup.d.ts +20 -5
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +34 -18
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +51 -48
- package/dist/Card/Card.js +3 -3
- package/dist/Carousel/Carousel.d.ts +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +27 -24
- package/dist/Center/Center.js +3 -3
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +27 -24
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +23 -16
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +20 -16
- package/dist/Chat/ChatDictationButton.js +10 -10
- package/dist/Chat/ChatLayout.d.ts +1 -11
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +23 -21
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +13 -11
- package/dist/Chat/ChatMessage.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +20 -14
- package/dist/Chat/ChatMessageBubble.d.ts +1 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +10 -8
- package/dist/Chat/ChatMessageList.d.ts +1 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +17 -15
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +24 -19
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +16 -14
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +6 -4
- package/dist/Chat/ChatSystemMessage.js +11 -11
- package/dist/Chat/ChatTokenizedText.js +8 -8
- package/dist/Chat/ChatToolCalls.js +73 -73
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +4 -2
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +19 -17
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +26 -24
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +12 -10
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +8 -6
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -12
- package/dist/ClickableCard/ClickableCard.js +6 -6
- package/dist/Code/Code.js +3 -3
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +114 -96
- package/dist/Collapsible/Collapsible.js +11 -11
- package/dist/Collapsible/CollapsibleGroup.js +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +39 -34
- package/dist/CommandPalette/CommandPaletteEmpty.js +3 -3
- package/dist/CommandPalette/CommandPaletteFooter.js +16 -16
- package/dist/CommandPalette/CommandPaletteGroup.js +5 -5
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +17 -14
- package/dist/CommandPalette/CommandPaletteItem.js +3 -3
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +7 -4
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +14 -11
- package/dist/DateInput/DateInput.d.ts +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +28 -23
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +32 -27
- package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +41 -33
- package/dist/Dialog/Dialog.js +9 -9
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +20 -18
- package/dist/Dialog/useImperativeDialog.js +3 -3
- package/dist/Divider/Divider.js +7 -7
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +21 -15
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/renderDropdownItems.js +10 -10
- package/dist/EmptyState/EmptyState.d.ts +4 -1
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +9 -9
- package/dist/Field/Field.js +17 -17
- package/dist/Field/FieldLabel.js +15 -15
- package/dist/Field/InputClearButton.js +5 -5
- package/dist/FieldStatus/FieldStatus.js +3 -3
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +34 -30
- package/dist/FormLayout/FormLayout.js +5 -5
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/GridSpan.js +3 -3
- package/dist/HStack/HStack.js +3 -3
- package/dist/Heading/Heading.js +10 -10
- package/dist/HoverCard/HoverCard.js +9 -9
- package/dist/HoverCard/useHoverCard.js +3 -3
- package/dist/Icon/Icon.js +11 -11
- package/dist/Icon/defaultIcons.js +116 -116
- package/dist/IconButton/IconButton.js +3 -3
- package/dist/InputGroup/InputGroup.js +9 -9
- package/dist/InputGroup/InputGroupText.js +3 -3
- package/dist/Item/Item.js +17 -17
- package/dist/Kbd/Kbd.js +5 -5
- package/dist/Layer/LayerProvider.js +7 -7
- package/dist/Layer/useLayer.js +5 -5
- package/dist/Layout/Layout.js +21 -21
- package/dist/Layout/LayoutContent.js +3 -3
- package/dist/Layout/LayoutFooter.js +5 -5
- package/dist/Layout/LayoutHeader.js +5 -5
- package/dist/Layout/LayoutPanel.js +3 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +35 -33
- package/dist/Lightbox/useLightbox.d.ts +0 -1
- package/dist/Lightbox/useLightbox.d.ts.map +1 -1
- package/dist/Lightbox/useLightbox.js +3 -4
- package/dist/Link/Link.d.ts +5 -3
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +47 -18
- package/dist/Link/LinkProvider.js +3 -3
- package/dist/Link/useLinkify.js +3 -3
- package/dist/List/List.js +11 -11
- package/dist/List/ListItem.js +11 -11
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +111 -109
- package/dist/MetadataList/MetadataList.js +10 -10
- package/dist/MetadataList/MetadataListItem.js +15 -15
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +19 -17
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +9 -6
- package/dist/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +7 -4
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +69 -62
- package/dist/NavIcon/NavIcon.js +3 -3
- package/dist/NavMenu/NavHeadingMenu.js +5 -5
- package/dist/NavMenu/NavHeadingMenuItem.js +8 -8
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +21 -17
- package/dist/Outline/Outline.d.ts +1 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +19 -16
- package/dist/OverflowList/OverflowList.js +8 -8
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/Overlay/OverlayScrim.js +5 -5
- package/dist/Overlay/useOverlay.d.ts +0 -3
- package/dist/Overlay/useOverlay.d.ts.map +1 -1
- package/dist/Overlay/useOverlay.js +3 -6
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +73 -46
- package/dist/Popover/Popover.js +16 -16
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -8
- package/dist/PowerSearch/PowerSearch.d.ts +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +95 -85
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +109 -103
- package/dist/PowerSearch/PowerSearchFilterEditor.js +3 -3
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +12 -8
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +88 -75
- package/dist/PowerSearch/formatFilterValue.d.ts +2 -1
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +19 -9
- package/dist/PowerSearch/index.d.ts +2 -1
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/index.js +1 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +23 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -0
- package/dist/PowerSearch/resolveOperatorLabel.js +28 -0
- package/dist/PowerSearch/types.d.ts +28 -2
- package/dist/PowerSearch/types.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.js +27 -27
- package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchSource.js +15 -8
- package/dist/ProgressBar/ProgressBar.js +13 -13
- package/dist/RadioList/RadioList.js +7 -7
- package/dist/RadioList/RadioListItem.js +18 -18
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +10 -7
- package/dist/Section/Section.js +5 -5
- package/dist/SegmentedControl/SegmentedControl.js +5 -5
- package/dist/SegmentedControl/SegmentedControlItem.js +7 -7
- package/dist/SelectableCard/SelectableCard.js +5 -5
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +57 -51
- package/dist/Selector/SelectorOption.js +3 -3
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +38 -36
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +8 -6
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +92 -90
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +49 -43
- package/dist/SideNav/SideNavSection.js +14 -14
- package/dist/Skeleton/Skeleton.js +3 -3
- package/dist/Slider/Slider.js +23 -23
- package/dist/Spinner/Spinner.js +9 -9
- package/dist/StatusDot/StatusDot.js +5 -5
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +29 -27
- package/dist/TabList/Tab.js +18 -18
- package/dist/TabList/TabList.d.ts +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +9 -6
- package/dist/TabList/TabMenu.js +23 -23
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +39 -37
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +10 -8
- package/dist/Table/TableBody.js +3 -3
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableFooter.js +3 -3
- package/dist/Table/TableHeader.js +3 -3
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/TableRow.js +5 -5
- package/dist/Table/index.d.ts +4 -0
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +2 -0
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +9 -9
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +127 -90
- package/dist/Table/plugins/groupedRows/index.d.ts +3 -0
- package/dist/Table/plugins/groupedRows/index.d.ts.map +1 -0
- package/dist/Table/plugins/groupedRows/index.js +3 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +78 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +257 -0
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +12 -9
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +30 -28
- package/dist/Table/plugins/rowIndex/index.d.ts +3 -0
- package/dist/Table/plugins/rowIndex/index.d.ts.map +1 -0
- package/dist/Table/plugins/rowIndex/index.js +3 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +50 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +91 -0
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +23 -20
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +23 -21
- package/dist/Table/tableContextMenu.js +9 -9
- package/dist/Text/Text.js +10 -10
- package/dist/TextArea/TextArea.js +14 -14
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +20 -16
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +37 -31
- package/dist/TimeInput/TimeInput.d.ts +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +28 -23
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +29 -14
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +17 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +14 -12
- package/dist/Toast/useToast.js +4 -4
- package/dist/ToggleButton/ToggleButton.js +12 -12
- package/dist/ToggleButton/ToggleButtonGroup.js +5 -5
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +29 -23
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +33 -31
- package/dist/Toolbar/Toolbar.js +18 -18
- package/dist/Tooltip/Tooltip.js +11 -11
- package/dist/Tooltip/useTooltip.js +3 -3
- package/dist/TopNav/TopNav.d.ts +2 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +36 -33
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +72 -70
- package/dist/TopNav/TopNavItem.js +5 -5
- package/dist/TopNav/TopNavMegaMenu.js +30 -30
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +10 -10
- package/dist/TopNav/TopNavMegaMenuItem.js +16 -16
- package/dist/TopNav/TopNavMenu.js +32 -32
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +13 -9
- package/dist/TreeList/TreeListBranches.js +11 -11
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +37 -31
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +26 -22
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +15 -13
- package/dist/Typeahead/TypeaheadItem.js +10 -10
- package/dist/VStack/VStack.js +3 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -3
- package/dist/astryx.css +20 -2
- package/dist/astryx.umd.js +66 -64
- package/dist/astryx.umd.js.map +4 -4
- package/dist/authoring/doc.d.ts +145 -0
- package/dist/authoring/doc.d.ts.map +1 -0
- package/dist/authoring/doc.js +100 -0
- package/dist/authoring/index.d.ts +29 -0
- package/dist/authoring/index.d.ts.map +1 -0
- package/dist/authoring/index.js +28 -0
- package/dist/authoring/integration.d.ts +35 -0
- package/dist/authoring/integration.d.ts.map +1 -0
- package/dist/authoring/integration.js +30 -0
- package/dist/authoring/template.d.ts +66 -0
- package/dist/authoring/template.d.ts.map +1 -0
- package/dist/authoring/template.js +55 -0
- package/dist/config.d.ts +80 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +40 -0
- package/dist/hooks/useKeyboardHint.js +9 -9
- package/dist/i18n/InternationalizationContext.d.ts +12 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -0
- package/dist/i18n/InternationalizationContext.js +29 -0
- package/dist/i18n/InternationalizationProvider.d.ts +62 -0
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -0
- package/dist/i18n/InternationalizationProvider.js +44 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +21 -0
- package/dist/i18n/resolve.d.ts +22 -0
- package/dist/i18n/resolve.d.ts.map +1 -0
- package/dist/i18n/resolve.js +141 -0
- package/dist/i18n/translator.d.ts +25 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n/translator.js +1 -0
- package/dist/i18n/types.d.ts +47 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +1 -0
- package/dist/i18n/useTranslator.d.ts +15 -0
- package/dist/i18n/useTranslator.d.ts.map +1 -0
- package/dist/i18n/useTranslator.js +39 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/theme/MediaTheme.js +3 -3
- package/dist/theme/Theme.js +7 -7
- package/dist/theme/syntax/SyntaxTheme.js +5 -5
- package/locales/en.json +746 -0
- package/locales/pseudo.json +560 -0
- package/package.json +24 -3
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -0
- package/src/AlertDialog/AlertDialog.tsx +4 -1
- package/src/AlertDialog/useImperativeAlertDialog.tsx +0 -2
- package/src/AppShell/AppShell.doc.mjs +8 -2
- package/src/AppShell/AppShell.tsx +3 -1
- package/src/AvatarGroup/AvatarGroup.tsx +4 -1
- package/src/Banner/Banner.tsx +10 -5
- package/src/Breadcrumbs/Breadcrumbs.tsx +4 -1
- package/src/Button/Button.tsx +34 -4
- package/src/ButtonGroup/ButtonGroup.test.tsx +386 -2
- package/src/ButtonGroup/ButtonGroup.tsx +27 -11
- package/src/Calendar/Calendar.tsx +8 -5
- package/src/Card/Card.doc.mjs +3 -3
- package/src/Carousel/Carousel.tsx +10 -7
- package/src/Chat/ChatComposer.tsx +5 -1
- package/src/Chat/ChatComposerDrawer.tsx +9 -2
- package/src/Chat/ChatComposerInput.tsx +10 -4
- package/src/Chat/ChatLayout.tsx +5 -12
- package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
- package/src/Chat/ChatMessage.tsx +5 -1
- package/src/Chat/ChatMessageBubble.tsx +2 -0
- package/src/Chat/ChatMessageList.doc.mjs +1 -1
- package/src/Chat/ChatMessageList.tsx +2 -0
- package/src/Chat/ChatMessageMetadata.tsx +15 -9
- package/src/Chat/ChatPastedTextToken.tsx +3 -1
- package/src/Chat/ChatSendButton.tsx +3 -1
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/Chat/useSpeechRecognition.ts +11 -2
- package/src/Chat/useTriggerMenu.tsx +4 -2
- package/src/CheckboxInput/CheckboxInput.test.tsx +16 -0
- package/src/CheckboxInput/CheckboxInput.tsx +4 -2
- package/src/CheckboxList/CheckboxList.doc.mjs +6 -1
- package/src/CheckboxList/CheckboxList.tsx +2 -0
- package/src/CheckboxList/CheckboxListItem.tsx +7 -1
- package/src/Citation/Citation.tsx +4 -2
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
- package/src/CodeBlock/CodeBlock.tsx +91 -40
- package/src/Collapsible/Collapsible.doc.mjs +3 -3
- package/src/CommandPalette/CommandPalette.tsx +10 -3
- package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
- package/src/CommandPalette/CommandPaletteInput.tsx +5 -1
- package/src/CommandPalette/CommandPaletteList.tsx +4 -1
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/DateInput/DateInput.doc.mjs +2 -2
- package/src/DateInput/DateInput.tsx +13 -5
- package/src/DateRangeInput/DateRangeInput.doc.mjs +7 -7
- package/src/DateRangeInput/DateRangeInput.tsx +14 -6
- package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
- package/src/DateTimeInput/DateTimeInput.tsx +17 -7
- package/src/Dialog/DialogHeader.tsx +4 -2
- package/src/DropdownMenu/DropdownMenu.tsx +12 -8
- package/src/EmptyState/EmptyState.doc.mjs +3 -3
- package/src/EmptyState/EmptyState.tsx +4 -1
- package/src/Field/Field.doc.mjs +2 -2
- package/src/FileInput/FileInput.tsx +3 -1
- package/src/Grid/Grid.doc.mjs +5 -5
- package/src/InputGroup/InputGroup.doc.mjs +1 -1
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Lightbox/Lightbox.doc.mjs +7 -2
- package/src/Lightbox/Lightbox.tsx +6 -4
- package/src/Lightbox/useLightbox.tsx +0 -1
- package/src/Link/Link.test.tsx +74 -2
- package/src/Link/Link.tsx +48 -3
- package/src/Markdown/Markdown.tsx +12 -4
- package/src/MobileNav/MobileNav.tsx +4 -2
- package/src/MobileNav/MobileNavToggle.tsx +5 -3
- package/src/MoreMenu/MoreMenu.tsx +4 -1
- package/src/MultiSelector/MultiSelector.tsx +14 -5
- package/src/NumberInput/NumberInput.tsx +3 -1
- package/src/Outline/Outline.tsx +4 -1
- package/src/OverflowList/OverflowList.doc.mjs +2 -2
- package/src/Overlay/useOverlay.tsx +0 -3
- package/src/Pagination/Pagination.tsx +35 -12
- package/src/Popover/usePopover.tsx +6 -1
- package/src/PowerSearch/PowerSearch.doc.mjs +9 -4
- package/src/PowerSearch/PowerSearch.tsx +22 -10
- package/src/PowerSearch/PowerSearchEditPopover.tsx +27 -20
- package/src/PowerSearch/PowerSearchToken.tsx +17 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +34 -21
- package/src/PowerSearch/formatFilterValue.test.ts +282 -0
- package/src/PowerSearch/formatFilterValue.ts +21 -8
- package/src/PowerSearch/index.ts +5 -0
- package/src/PowerSearch/resolveOperatorLabel.ts +34 -0
- package/src/PowerSearch/types.ts +33 -9
- package/src/PowerSearch/usePowerSearchConfig.ts +59 -27
- package/src/PowerSearch/usePowerSearchSource.ts +17 -8
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/Resizable/ResizeHandle.tsx +4 -1
- package/src/Section/Section.doc.mjs +4 -4
- package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
- package/src/Selector/Selector.tsx +11 -6
- package/src/SideNav/SideNav.tsx +4 -2
- package/src/SideNav/SideNavCollapseButton.tsx +3 -1
- package/src/SideNav/SideNavHeading.tsx +5 -3
- package/src/SideNav/SideNavItem.tsx +3 -1
- package/src/Slider/Slider.doc.mjs +2 -2
- package/src/Stack/Stack.doc.mjs +10 -10
- package/src/Switch/Switch.doc.mjs +2 -2
- package/src/Switch/Switch.test.tsx +16 -0
- package/src/Switch/Switch.tsx +4 -2
- package/src/TabList/TabList.tsx +4 -1
- package/src/Table/BaseTable.tsx +8 -1
- package/src/Table/Table.doc.mjs +1 -1
- package/src/Table/Table.tsx +3 -1
- package/src/Table/index.ts +7 -0
- package/src/Table/plugins/filtering/useTableFiltering.tsx +31 -30
- package/src/Table/plugins/groupedRows/index.ts +7 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.test.tsx +231 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +351 -0
- package/src/Table/plugins/pagination/useTablePagination.tsx +4 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -4
- package/src/Table/plugins/rowIndex/index.ts +4 -0
- package/src/Table/plugins/rowIndex/useTableRowIndex.test.tsx +132 -0
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +114 -0
- package/src/Table/plugins/selection/useTableSelection.tsx +6 -7
- package/src/Table/plugins/sortable/useTableSortable.tsx +8 -5
- package/src/Table/useTableFiltering.doc.mjs +2 -2
- package/src/Table/useTableGroupedRows.doc.mjs +71 -0
- package/src/Table/useTableRowIndex.doc.mjs +50 -0
- package/src/Table/useTableSortable.doc.mjs +11 -11
- package/src/Text/Text.doc.mjs +2 -2
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Thumbnail/Thumbnail.tsx +4 -2
- package/src/TimeInput/TimeInput.doc.mjs +2 -2
- package/src/TimeInput/TimeInput.tsx +6 -2
- package/src/Timestamp/Timestamp.doc.mjs +4 -4
- package/src/Timestamp/Timestamp.test.tsx +120 -7
- package/src/Timestamp/Timestamp.tsx +21 -1
- package/src/Toast/Toast.tsx +3 -1
- package/src/Toast/ToastViewport.tsx +3 -1
- package/src/Token/Token.tsx +4 -2
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.tsx +4 -4
- package/src/Toolbar/Toolbar.doc.mjs +1 -1
- package/src/TopNav/TopNav.doc.mjs +1 -0
- package/src/TopNav/TopNav.test.tsx +30 -0
- package/src/TopNav/TopNav.tsx +6 -4
- package/src/TopNav/TopNavHeading.tsx +5 -3
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListItem.tsx +6 -1
- package/src/Typeahead/BaseTypeahead.tsx +11 -4
- package/src/Typeahead/Typeahead.doc.mjs +1 -1
- package/src/Typeahead/Typeahead.tsx +3 -1
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -3
- package/src/authoring/doc.ts +166 -0
- package/src/authoring/index.test.ts +52 -0
- package/src/authoring/index.ts +50 -0
- package/src/authoring/integration.ts +42 -0
- package/src/authoring/template.ts +74 -0
- package/src/config.test.ts +16 -0
- package/src/config.ts +92 -0
- package/src/docPropLiterals.test.ts +902 -0
- package/src/hooks/useHotkeys.doc.mjs +5 -5
- package/src/i18n/InternationalizationContext.ts +39 -0
- package/src/i18n/InternationalizationProvider.doc.mjs +72 -0
- package/src/i18n/InternationalizationProvider.tsx +83 -0
- package/src/i18n/__tests__/e2e-pagination.test.tsx +172 -0
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +130 -0
- package/src/i18n/__tests__/resolve.test.ts +284 -0
- package/src/i18n/index.ts +32 -0
- package/src/i18n/resolve.ts +165 -0
- package/src/i18n/translator.ts +31 -0
- package/src/i18n/types.ts +53 -0
- package/src/i18n/useTranslator.doc.mjs +46 -0
- package/src/i18n/useTranslator.ts +50 -0
- package/src/index.ts +3 -0
- package/dist/NavItem/index.d.ts +0 -9
- package/dist/NavItem/index.d.ts.map +0 -1
- package/dist/NavItem/index.js +0 -10
- package/src/NavItem/index.ts +0 -11
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @output Exports ButtonGroup component, context, and types
|
|
9
9
|
* @position Groups buttons with connected styling; consumed by index.ts
|
|
10
10
|
*
|
|
11
|
-
* Children (Button, IconButton) consume the ButtonGroup context to
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Children (Button, IconButton) consume the ButtonGroup context to apply
|
|
12
|
+
* position-aware styles in pure CSS — no cloneElement or wrapper divs needed.
|
|
13
|
+
* The end-cap radius rules live in Button.tsx; see IS_LAST_ITEM there for why
|
|
14
|
+
* the trailing edge cannot use :last-child (#2508).
|
|
14
15
|
*
|
|
15
16
|
* SYNC: When modified, update these files to stay in sync:
|
|
16
17
|
* - /packages/core/src/ButtonGroup/ButtonGroup.doc.mjs (props table, features)
|
|
@@ -25,7 +26,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
25
26
|
import type {ButtonSize} from '../Button';
|
|
26
27
|
import {SizeProvider, useSize} from '../SizeContext/SizeContext';
|
|
27
28
|
import {useListFocus} from '../hooks/useListFocus';
|
|
28
|
-
import {mergeProps, mergeRefs} from '../utils';
|
|
29
|
+
import {mergeProps, mergeRefs, composeEventHandlers} from '../utils';
|
|
29
30
|
import type {BaseProps} from '../BaseProps';
|
|
30
31
|
import {ButtonGroupContext} from './ButtonGroupContext';
|
|
31
32
|
import type {ButtonGroupOrientation} from './ButtonGroupContext';
|
|
@@ -97,7 +98,10 @@ const styles = stylex.create({
|
|
|
97
98
|
* handling (only on outer edges), and horizontal or vertical orientation.
|
|
98
99
|
*
|
|
99
100
|
* Children automatically detect the group via context and apply position-aware
|
|
100
|
-
* styles
|
|
101
|
+
* styles in pure CSS.
|
|
102
|
+
*
|
|
103
|
+
* Members that render their own layer — a Button with a `tooltip`, or a
|
|
104
|
+
* DropdownMenu — compose correctly, including as the trailing member.
|
|
101
105
|
*
|
|
102
106
|
* @example
|
|
103
107
|
* ```
|
|
@@ -107,6 +111,17 @@ const styles = stylex.create({
|
|
|
107
111
|
* <Button label="Paste" />
|
|
108
112
|
* </ButtonGroup>
|
|
109
113
|
* ```
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```
|
|
117
|
+
* <ButtonGroup label="Approve action">
|
|
118
|
+
* <Button label="Allow once" variant="primary" />
|
|
119
|
+
* <DropdownMenu
|
|
120
|
+
* button={{label: 'Allow options', variant: 'primary', isIconOnly: true, icon: <Icon icon="chevronDown" />}}
|
|
121
|
+
* items={[{label: 'Allow for 30 minutes'}, {label: 'Always allow'}]}
|
|
122
|
+
* />
|
|
123
|
+
* </ButtonGroup>
|
|
124
|
+
* ```
|
|
110
125
|
*/
|
|
111
126
|
export function ButtonGroup({
|
|
112
127
|
children,
|
|
@@ -119,6 +134,7 @@ export function ButtonGroup({
|
|
|
119
134
|
style,
|
|
120
135
|
ref,
|
|
121
136
|
'data-testid': testId,
|
|
137
|
+
onKeyDown,
|
|
122
138
|
...props
|
|
123
139
|
}: ButtonGroupProps): ReactNode {
|
|
124
140
|
const size = useSize(sizeProp, 'md');
|
|
@@ -138,11 +154,7 @@ export function ButtonGroup({
|
|
|
138
154
|
<SizeProvider value={size}>
|
|
139
155
|
<div
|
|
140
156
|
ref={mergeRefs(ref, listRef)}
|
|
141
|
-
|
|
142
|
-
aria-label={label}
|
|
143
|
-
onKeyDown={handleKeyDown}
|
|
144
|
-
aria-disabled={isDisabled || undefined}
|
|
145
|
-
data-testid={testId}
|
|
157
|
+
{...props}
|
|
146
158
|
{...mergeProps(
|
|
147
159
|
themeProps('button-group', {size, orientation}),
|
|
148
160
|
stylex.props(
|
|
@@ -153,7 +165,11 @@ export function ButtonGroup({
|
|
|
153
165
|
className,
|
|
154
166
|
style,
|
|
155
167
|
)}
|
|
156
|
-
|
|
168
|
+
role="group"
|
|
169
|
+
aria-label={label}
|
|
170
|
+
onKeyDown={composeEventHandlers(onKeyDown, handleKeyDown)}
|
|
171
|
+
aria-disabled={isDisabled || undefined}
|
|
172
|
+
data-testid={testId}>
|
|
157
173
|
{children}
|
|
158
174
|
</div>
|
|
159
175
|
</SizeProvider>
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
DATE_FORMAT_WITH_WEEKDAY,
|
|
57
57
|
DATE_FORMAT_MONTH_YEAR,
|
|
58
58
|
} from '../utils/plainDate';
|
|
59
|
-
import {mergeProps} from '../utils';
|
|
59
|
+
import {mergeProps, composeEventHandlers} from '../utils';
|
|
60
60
|
import {
|
|
61
61
|
computeDayCellState,
|
|
62
62
|
computeRangeRounding,
|
|
@@ -84,6 +84,7 @@ import type {
|
|
|
84
84
|
} from '../utils/dateTypes';
|
|
85
85
|
import {normalizeDayOfWeek} from '../utils/dateTypes';
|
|
86
86
|
import {themeProps} from '../utils/themeProps';
|
|
87
|
+
import {useTranslator} from '../i18n';
|
|
87
88
|
|
|
88
89
|
/** Imperative handle for Calendar handleRef */
|
|
89
90
|
|
|
@@ -197,6 +198,7 @@ export type CalendarProps = CalendarSingleProps | CalendarRangeProps;
|
|
|
197
198
|
* ```
|
|
198
199
|
*/
|
|
199
200
|
export function Calendar({ref, ...props}: CalendarProps) {
|
|
201
|
+
const t = useTranslator();
|
|
200
202
|
const {
|
|
201
203
|
handleRef,
|
|
202
204
|
mode = 'single',
|
|
@@ -216,6 +218,7 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
216
218
|
xstyle,
|
|
217
219
|
className,
|
|
218
220
|
style,
|
|
221
|
+
onKeyDown,
|
|
219
222
|
...rest
|
|
220
223
|
} = props;
|
|
221
224
|
|
|
@@ -418,18 +421,18 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
418
421
|
return (
|
|
419
422
|
<div
|
|
420
423
|
ref={ref}
|
|
424
|
+
{...rest}
|
|
421
425
|
{...mergeProps(
|
|
422
426
|
themeProps('calendar', {mode}),
|
|
423
427
|
stylex.props(calendarStyles.calendar, xstyle),
|
|
424
428
|
className,
|
|
425
429
|
style,
|
|
426
430
|
)}
|
|
427
|
-
onKeyDown={handleCalendarKeyDown}
|
|
428
|
-
{...rest}>
|
|
431
|
+
onKeyDown={composeEventHandlers(onKeyDown, handleCalendarKeyDown)}>
|
|
429
432
|
{/* Header with navigation */}
|
|
430
433
|
<div {...stylex.props(calendarStyles.header)}>
|
|
431
434
|
<Button
|
|
432
|
-
label=
|
|
435
|
+
label={t('@astryx.calendar.previousMonth')}
|
|
433
436
|
variant="ghost"
|
|
434
437
|
icon={
|
|
435
438
|
// Wrapper span (not Icon props): Icon's string mode clobbers
|
|
@@ -449,7 +452,7 @@ export function Calendar({ref, ...props}: CalendarProps) {
|
|
|
449
452
|
</span>
|
|
450
453
|
|
|
451
454
|
<Button
|
|
452
|
-
label=
|
|
455
|
+
label={t('@astryx.calendar.nextMonth')}
|
|
453
456
|
variant="ghost"
|
|
454
457
|
icon={
|
|
455
458
|
<span {...stylex.props(calendarStyles.navIcon)}>
|
package/src/Card/Card.doc.mjs
CHANGED
|
@@ -62,9 +62,9 @@ export const docs = {
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
name: 'variant',
|
|
65
|
-
type: "'default' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow'",
|
|
65
|
+
type: "'default' | 'transparent' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow'",
|
|
66
66
|
description:
|
|
67
|
-
'Background color variant. `default` uses the standard card background. `muted` uses the muted background for de-emphasised cards. The non-semantic variants use the corresponding `--color-<name
|
|
67
|
+
'Background color variant. `default` uses the standard card background. `transparent` drops the background entirely. `muted` uses the muted background for de-emphasised cards. The non-semantic variants use the corresponding `--color-background-<name>` token.',
|
|
68
68
|
default: "'default'",
|
|
69
69
|
},
|
|
70
70
|
],
|
|
@@ -169,6 +169,6 @@ export const docsDense = {
|
|
|
169
169
|
minHeight: 'min card height',
|
|
170
170
|
children: 'content inside card',
|
|
171
171
|
padding: 'internal padding via spacing scale',
|
|
172
|
-
variant: 'background color variant; `default` = standard card bg, `muted` = muted bg for de-emphasised cards; non-semantic variants use the corresponding `--color-<name
|
|
172
|
+
variant: 'background color variant; `default` = standard card bg, `transparent` = no background at all, `muted` = muted bg for de-emphasised cards; non-semantic variants use the corresponding `--color-background-<name>` token',
|
|
173
173
|
},
|
|
174
174
|
};
|
|
@@ -34,6 +34,7 @@ import type {BaseProps} from '../BaseProps';
|
|
|
34
34
|
import {mergeProps, mergeRefs} from '../utils';
|
|
35
35
|
import type {SpacingStep} from '../utils/types';
|
|
36
36
|
import {themeProps} from '../utils/themeProps';
|
|
37
|
+
import {useTranslator} from '../i18n';
|
|
37
38
|
|
|
38
39
|
export interface CarouselProps extends BaseProps<HTMLDivElement> {
|
|
39
40
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -256,13 +257,15 @@ export function Carousel({
|
|
|
256
257
|
hasEdgeFade = true,
|
|
257
258
|
hasSnap = false,
|
|
258
259
|
padding,
|
|
259
|
-
'aria-label':
|
|
260
|
+
'aria-label': ariaLabelFromProps,
|
|
260
261
|
xstyle,
|
|
261
262
|
className,
|
|
262
263
|
style,
|
|
263
264
|
'data-testid': testId,
|
|
264
265
|
...htmlProps
|
|
265
266
|
}: CarouselProps) {
|
|
267
|
+
const t = useTranslator();
|
|
268
|
+
const ariaLabel = ariaLabelFromProps ?? t('@astryx.carousel.label');
|
|
266
269
|
const scrollElRef = useRef<HTMLElement | null>(null);
|
|
267
270
|
const {scrollRef, overflowStart, overflowEnd} = useScrollOverflow();
|
|
268
271
|
|
|
@@ -330,16 +333,16 @@ export function Carousel({
|
|
|
330
333
|
<div
|
|
331
334
|
ref={mergeRefs(ref, layer.ref as React.Ref<HTMLDivElement>)}
|
|
332
335
|
data-testid={testId}
|
|
333
|
-
|
|
334
|
-
aria-label={ariaLabel}
|
|
335
|
-
aria-roledescription="carousel"
|
|
336
|
+
{...htmlProps}
|
|
336
337
|
{...mergeProps(
|
|
337
338
|
themeProps('carousel'),
|
|
338
339
|
stylex.props(styles.root, xstyle),
|
|
339
340
|
className,
|
|
340
341
|
style,
|
|
341
342
|
)}
|
|
342
|
-
|
|
343
|
+
role="region"
|
|
344
|
+
aria-label={ariaLabel}
|
|
345
|
+
aria-roledescription="carousel">
|
|
343
346
|
<div
|
|
344
347
|
ref={composedRef}
|
|
345
348
|
tabIndex={0}
|
|
@@ -366,7 +369,7 @@ export function Carousel({
|
|
|
366
369
|
)}>
|
|
367
370
|
<Button
|
|
368
371
|
icon={<Icon icon="chevronLeft" size="xsm" />}
|
|
369
|
-
label=
|
|
372
|
+
label={t('@astryx.carousel.scrollLeft')}
|
|
370
373
|
variant="ghost"
|
|
371
374
|
size="sm"
|
|
372
375
|
isIconOnly
|
|
@@ -387,7 +390,7 @@ export function Carousel({
|
|
|
387
390
|
)}>
|
|
388
391
|
<Button
|
|
389
392
|
icon={<Icon icon="chevronRight" size="xsm" />}
|
|
390
|
-
label=
|
|
393
|
+
label={t('@astryx.carousel.scrollRight')}
|
|
391
394
|
variant="ghost"
|
|
392
395
|
size="sm"
|
|
393
396
|
isIconOnly
|
|
@@ -49,6 +49,7 @@ import {ChatComposerInput} from './ChatComposerInput';
|
|
|
49
49
|
import {ChatComposerContext} from './ChatContext';
|
|
50
50
|
import {ChatSendButton} from './ChatSendButton';
|
|
51
51
|
import {themeProps} from '../utils/themeProps';
|
|
52
|
+
import {useTranslator} from '../i18n';
|
|
52
53
|
|
|
53
54
|
// =============================================================================
|
|
54
55
|
// Types
|
|
@@ -268,6 +269,7 @@ const styles = stylex.create({
|
|
|
268
269
|
* ```
|
|
269
270
|
*/
|
|
270
271
|
export function ChatComposer(props: ChatComposerProps) {
|
|
272
|
+
const t = useTranslator();
|
|
271
273
|
const {
|
|
272
274
|
ref,
|
|
273
275
|
onSubmit,
|
|
@@ -275,7 +277,7 @@ export function ChatComposer(props: ChatComposerProps) {
|
|
|
275
277
|
isStopShown = false,
|
|
276
278
|
value: controlledValue,
|
|
277
279
|
onChange,
|
|
278
|
-
placeholder
|
|
280
|
+
placeholder: placeholderFromProps,
|
|
279
281
|
isDisabled = false,
|
|
280
282
|
density = 'balanced',
|
|
281
283
|
drawer,
|
|
@@ -292,6 +294,8 @@ export function ChatComposer(props: ChatComposerProps) {
|
|
|
292
294
|
style,
|
|
293
295
|
...rest
|
|
294
296
|
} = props;
|
|
297
|
+
const placeholder =
|
|
298
|
+
placeholderFromProps ?? t('@astryx.chat.composer.placeholder');
|
|
295
299
|
|
|
296
300
|
const [internalValue, setInternalValue] = useState('');
|
|
297
301
|
|
|
@@ -30,6 +30,7 @@ import {Badge} from '../Badge';
|
|
|
30
30
|
import {mergeProps} from '../utils';
|
|
31
31
|
import type {BaseProps} from '../BaseProps';
|
|
32
32
|
import {themeProps} from '../utils/themeProps';
|
|
33
|
+
import {useTranslator} from '../i18n';
|
|
33
34
|
|
|
34
35
|
export interface ChatComposerDrawerProps extends BaseProps<HTMLDivElement> {
|
|
35
36
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -220,7 +221,7 @@ export function ChatComposerDrawer({
|
|
|
220
221
|
ref,
|
|
221
222
|
children,
|
|
222
223
|
count,
|
|
223
|
-
label
|
|
224
|
+
label: labelFromProps,
|
|
224
225
|
isCollapsed: controlledCollapsed,
|
|
225
226
|
defaultIsCollapsed = false,
|
|
226
227
|
onCollapsedChange,
|
|
@@ -230,6 +231,8 @@ export function ChatComposerDrawer({
|
|
|
230
231
|
'data-testid': testId,
|
|
231
232
|
...htmlProps
|
|
232
233
|
}: ChatComposerDrawerProps): React.ReactElement {
|
|
234
|
+
const t = useTranslator();
|
|
235
|
+
const label = labelFromProps ?? t('@astryx.chat.composerDrawer.label');
|
|
233
236
|
const [internalCollapsed, setInternalCollapsed] =
|
|
234
237
|
useState(defaultIsCollapsed);
|
|
235
238
|
const isControlled = controlledCollapsed !== undefined;
|
|
@@ -268,7 +271,11 @@ export function ChatComposerDrawer({
|
|
|
268
271
|
role="button"
|
|
269
272
|
tabIndex={0}
|
|
270
273
|
aria-expanded={!isCollapsed}
|
|
271
|
-
aria-label={
|
|
274
|
+
aria-label={
|
|
275
|
+
isCollapsed
|
|
276
|
+
? t('@astryx.chatComposerDrawer.expand', {label})
|
|
277
|
+
: t('@astryx.chatComposerDrawer.collapse', {label})
|
|
278
|
+
}
|
|
272
279
|
onClick={toggle}
|
|
273
280
|
onKeyDown={e => {
|
|
274
281
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
import {Badge, type BadgeProps} from '../Badge';
|
|
54
54
|
import {useChatComposerContext} from './ChatContext';
|
|
55
55
|
import {themeProps} from '../utils/themeProps';
|
|
56
|
+
import {useTranslator} from '../i18n';
|
|
56
57
|
|
|
57
58
|
// =============================================================================
|
|
58
59
|
// Types
|
|
@@ -96,8 +97,7 @@ export type ChatComposerTokenCustom = {
|
|
|
96
97
|
* Use for tooltips, hovercards, or any content beyond a badge.
|
|
97
98
|
*/
|
|
98
99
|
export type ChatComposerToken =
|
|
99
|
-
|
|
|
100
|
-
| ChatComposerTokenCustom;
|
|
100
|
+
ChatComposerTokenBadge | ChatComposerTokenCustom;
|
|
101
101
|
|
|
102
102
|
export type ChatComposerTriggerItem = SearchableItem;
|
|
103
103
|
|
|
@@ -279,6 +279,7 @@ function serialize(node: Node): string {
|
|
|
279
279
|
// =============================================================================
|
|
280
280
|
|
|
281
281
|
export function ChatComposerInput(props: ChatComposerInputProps) {
|
|
282
|
+
const t = useTranslator();
|
|
282
283
|
const composerCtx = useChatComposerContext();
|
|
283
284
|
const hasControlledValueProp = props.value !== undefined;
|
|
284
285
|
|
|
@@ -287,12 +288,12 @@ export function ChatComposerInput(props: ChatComposerInputProps) {
|
|
|
287
288
|
handleRef,
|
|
288
289
|
value: controlledValue = composerCtx?.value,
|
|
289
290
|
onChange: onChangeProp,
|
|
290
|
-
placeholder
|
|
291
|
+
placeholder: placeholderFromProps,
|
|
291
292
|
maxRows = 8,
|
|
292
293
|
triggers,
|
|
293
294
|
debounceMs = 150,
|
|
294
295
|
hasHistory = true,
|
|
295
|
-
label
|
|
296
|
+
label: labelFromProps,
|
|
296
297
|
isDisabled = composerCtx?.isDisabled ?? false,
|
|
297
298
|
onPaste: onPasteProp,
|
|
298
299
|
pasteAsToken: pasteAsTokenProp,
|
|
@@ -303,6 +304,11 @@ export function ChatComposerInput(props: ChatComposerInputProps) {
|
|
|
303
304
|
style,
|
|
304
305
|
...rest
|
|
305
306
|
} = props;
|
|
307
|
+
const label = labelFromProps ?? t('@astryx.chat.composerInput.label');
|
|
308
|
+
const placeholder =
|
|
309
|
+
placeholderFromProps ??
|
|
310
|
+
composerCtx?.placeholder ??
|
|
311
|
+
t('@astryx.chat.composer.placeholder');
|
|
306
312
|
|
|
307
313
|
const composerOnChange = composerCtx?.onChange;
|
|
308
314
|
const onChange = useCallback(
|
package/src/Chat/ChatLayout.tsx
CHANGED
|
@@ -32,6 +32,7 @@ import {useChatNewMessages} from './useChatNewMessages';
|
|
|
32
32
|
import {ChatLayoutScrollButton} from './ChatLayoutScrollButton';
|
|
33
33
|
import {ChatLayoutContext} from './ChatContext';
|
|
34
34
|
import {themeProps} from '../utils/themeProps';
|
|
35
|
+
import {useTranslator} from '../i18n';
|
|
35
36
|
|
|
36
37
|
// =============================================================================
|
|
37
38
|
// Types
|
|
@@ -39,17 +40,6 @@ import {themeProps} from '../utils/themeProps';
|
|
|
39
40
|
|
|
40
41
|
type Density = 'compact' | 'balanced' | 'spacious';
|
|
41
42
|
|
|
42
|
-
/** Imperative handle for ChatLayout scroll controls. */
|
|
43
|
-
export interface ChatLayoutHandle {
|
|
44
|
-
/** Scroll a message to the top and unlock for stream-in. */
|
|
45
|
-
/** Scroll to bottom and re-lock. */
|
|
46
|
-
scrollToBottom: () => void;
|
|
47
|
-
/** Navigate to a message, no lock change. */
|
|
48
|
-
scrollToMessage: (el: HTMLElement) => void;
|
|
49
|
-
/** Scroll to the last message. */
|
|
50
|
-
scrollToLastMessage: () => void;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
43
|
export interface ChatLayoutProps extends BaseProps<HTMLDivElement> {
|
|
54
44
|
/** Ref forwarded to the root element. */
|
|
55
45
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -268,7 +258,9 @@ export function ChatLayout({
|
|
|
268
258
|
style,
|
|
269
259
|
'data-testid': testId,
|
|
270
260
|
ref,
|
|
261
|
+
...rest
|
|
271
262
|
}: ChatLayoutProps) {
|
|
263
|
+
const t = useTranslator();
|
|
272
264
|
const rootRef = useRef<HTMLDivElement>(null);
|
|
273
265
|
|
|
274
266
|
const scrollContainerRef = externalScrollRef ?? rootRef;
|
|
@@ -284,7 +276,7 @@ export function ChatLayout({
|
|
|
284
276
|
const defaultScrollButton = (
|
|
285
277
|
<ChatLayoutScrollButton
|
|
286
278
|
isVisible={scroll.isScrolledUp || newMsgs.hasNewMessages}
|
|
287
|
-
label={newMsgs.hasNewMessages ? '
|
|
279
|
+
label={newMsgs.hasNewMessages ? t('@astryx.chatLayout.newMessages') : undefined}
|
|
288
280
|
onClick={() => {
|
|
289
281
|
newMsgs.dismiss();
|
|
290
282
|
scroll.scrollToBottom();
|
|
@@ -327,6 +319,7 @@ export function ChatLayout({
|
|
|
327
319
|
return (
|
|
328
320
|
<ChatLayoutContext value={layoutContext}>
|
|
329
321
|
<div
|
|
322
|
+
{...rest}
|
|
330
323
|
ref={mergeRefs(ref, rootRef)}
|
|
331
324
|
data-testid={testId}
|
|
332
325
|
{...mergeProps(
|
|
@@ -30,6 +30,7 @@ import {Icon} from '../Icon';
|
|
|
30
30
|
import {Button} from '../Button';
|
|
31
31
|
import type {BaseProps} from '../BaseProps';
|
|
32
32
|
import {mergeProps} from '../utils';
|
|
33
|
+
import {useTranslator} from '../i18n';
|
|
33
34
|
|
|
34
35
|
// =============================================================================
|
|
35
36
|
// Types
|
|
@@ -120,6 +121,7 @@ export function ChatLayoutScrollButton({
|
|
|
120
121
|
style,
|
|
121
122
|
...rest
|
|
122
123
|
}: ChatLayoutScrollButtonProps) {
|
|
124
|
+
const t = useTranslator();
|
|
123
125
|
return (
|
|
124
126
|
<div
|
|
125
127
|
ref={ref}
|
|
@@ -132,8 +134,8 @@ export function ChatLayoutScrollButton({
|
|
|
132
134
|
label ? styles.expanded : styles.collapsed,
|
|
133
135
|
)}>
|
|
134
136
|
<Button
|
|
135
|
-
label={label ?? '
|
|
136
|
-
aria-label={label ?? '
|
|
137
|
+
label={label ?? t('@astryx.chatLayoutScrollButton.scrollToBottom')}
|
|
138
|
+
aria-label={label ?? t('@astryx.chatLayoutScrollButton.scrollToBottom')}
|
|
137
139
|
icon={<Icon icon="chevronDown" size="md" />}
|
|
138
140
|
variant="ghost"
|
|
139
141
|
size="md"
|
package/src/Chat/ChatMessage.tsx
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
import {mergeProps} from '../utils';
|
|
37
37
|
import type {BaseProps} from '../BaseProps';
|
|
38
38
|
import {themeProps} from '../utils/themeProps';
|
|
39
|
+
import {useTranslator} from '../i18n';
|
|
39
40
|
|
|
40
41
|
export interface ChatMessageProps extends BaseProps<HTMLElement> {
|
|
41
42
|
ref?: React.Ref<HTMLElement>;
|
|
@@ -167,7 +168,9 @@ export function ChatMessage({
|
|
|
167
168
|
style: styleProp,
|
|
168
169
|
'data-testid': testId,
|
|
169
170
|
ref,
|
|
171
|
+
...rest
|
|
170
172
|
}: ChatMessageProps) {
|
|
173
|
+
const t = useTranslator();
|
|
171
174
|
const listContext = useChatListContext();
|
|
172
175
|
const density = densityProp ?? listContext?.density ?? 'balanced';
|
|
173
176
|
|
|
@@ -216,9 +219,10 @@ export function ChatMessage({
|
|
|
216
219
|
return (
|
|
217
220
|
<ChatMessageContext value={contextValue}>
|
|
218
221
|
<article
|
|
222
|
+
{...rest}
|
|
219
223
|
ref={ref}
|
|
220
224
|
data-testid={testId}
|
|
221
|
-
aria-label={!hasName ?
|
|
225
|
+
aria-label={!hasName ? t('@astryx.chatMessage.messageFrom', {sender}) : undefined}
|
|
222
226
|
aria-labelledby={hasName ? nameId : undefined}
|
|
223
227
|
{...mergeProps(
|
|
224
228
|
themeProps('chat-message', {sender, density}),
|
|
@@ -216,6 +216,7 @@ export function ChatMessageBubble({
|
|
|
216
216
|
style: styleProp,
|
|
217
217
|
'data-testid': testId,
|
|
218
218
|
ref,
|
|
219
|
+
...rest
|
|
219
220
|
}: ChatMessageBubbleProps) {
|
|
220
221
|
const msgContext = useChatMessageContext();
|
|
221
222
|
const sender = msgContext?.sender ?? 'assistant';
|
|
@@ -274,6 +275,7 @@ export function ChatMessageBubble({
|
|
|
274
275
|
</div>
|
|
275
276
|
)}
|
|
276
277
|
<div
|
|
278
|
+
{...rest}
|
|
277
279
|
ref={ref}
|
|
278
280
|
data-testid={testId}
|
|
279
281
|
{...mergeProps(
|
|
@@ -42,7 +42,7 @@ export const docs = {
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
name: 'gap',
|
|
45
|
-
type: '
|
|
45
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
46
46
|
description: 'Gap between top-level message rows. Defaults to the selected density; override for LLM event streams or independent rows that need different spacing from density.',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
@@ -210,6 +210,7 @@ export function ChatMessageList({
|
|
|
210
210
|
style,
|
|
211
211
|
'data-testid': testId,
|
|
212
212
|
ref,
|
|
213
|
+
...rest
|
|
213
214
|
}: ChatMessageListProps) {
|
|
214
215
|
const layoutContext = useChatLayoutContext();
|
|
215
216
|
const sentinelRef = useRef<HTMLDivElement>(null);
|
|
@@ -264,6 +265,7 @@ export function ChatMessageList({
|
|
|
264
265
|
return (
|
|
265
266
|
<ChatListContext value={contextValue}>
|
|
266
267
|
<div
|
|
268
|
+
{...rest}
|
|
267
269
|
ref={ref}
|
|
268
270
|
role="log"
|
|
269
271
|
aria-live="polite"
|
|
@@ -26,19 +26,20 @@ import type {IconName} from '../Icon/globalIconRegistry';
|
|
|
26
26
|
import {mergeProps} from '../utils';
|
|
27
27
|
import type {BaseProps} from '../BaseProps';
|
|
28
28
|
import {themeProps} from '../utils/themeProps';
|
|
29
|
+
import {useTranslator} from '../i18n';
|
|
29
30
|
|
|
30
31
|
export type ChatMessageStatus =
|
|
31
32
|
'sending' | 'sent' | 'delivered' | 'read' | 'error';
|
|
32
33
|
|
|
33
34
|
const STATUS_CONFIG: Record<
|
|
34
35
|
ChatMessageStatus,
|
|
35
|
-
{icon: IconName;
|
|
36
|
+
{icon: IconName; i18nKey: string}
|
|
36
37
|
> = {
|
|
37
|
-
sending: {icon: 'clock',
|
|
38
|
-
sent: {icon: 'check',
|
|
39
|
-
delivered: {icon: 'checkDouble',
|
|
40
|
-
read: {icon: 'checkDouble',
|
|
41
|
-
error: {icon: 'error',
|
|
38
|
+
sending: {icon: 'clock', i18nKey: '@astryx.chat.status.sending'},
|
|
39
|
+
sent: {icon: 'check', i18nKey: '@astryx.chat.status.sent'},
|
|
40
|
+
delivered: {icon: 'checkDouble', i18nKey: '@astryx.chat.status.delivered'},
|
|
41
|
+
read: {icon: 'checkDouble', i18nKey: '@astryx.chat.status.read'},
|
|
42
|
+
error: {icon: 'error', i18nKey: '@astryx.chat.status.failed'},
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
const pulseKeyframes = stylex.keyframes({
|
|
@@ -116,10 +117,13 @@ export function ChatMessageMetadata({
|
|
|
116
117
|
style,
|
|
117
118
|
...rest
|
|
118
119
|
}: ChatMessageMetadataProps) {
|
|
120
|
+
const t = useTranslator();
|
|
119
121
|
const msgContext = useChatMessageContext();
|
|
120
122
|
const sender = msgContext?.sender ?? 'assistant';
|
|
121
123
|
|
|
122
124
|
const statusConfig = status != null ? STATUS_CONFIG[status] : null;
|
|
125
|
+
const statusLabel =
|
|
126
|
+
statusConfig != null ? t(statusConfig.i18nKey) : '';
|
|
123
127
|
|
|
124
128
|
const hasContent =
|
|
125
129
|
timestamp != null || footer != null || statusConfig != null;
|
|
@@ -149,15 +153,17 @@ export function ChatMessageMetadata({
|
|
|
149
153
|
{footer != null && statusConfig != null && <span>·</span>}
|
|
150
154
|
{statusConfig != null && (
|
|
151
155
|
<span
|
|
152
|
-
title={
|
|
153
|
-
aria-label={'
|
|
156
|
+
title={statusLabel}
|
|
157
|
+
aria-label={t('@astryx.chat.messageAriaLabel', {
|
|
158
|
+
status: statusLabel.toLowerCase(),
|
|
159
|
+
})}
|
|
154
160
|
{...stylex.props(
|
|
155
161
|
styles.statusRow,
|
|
156
162
|
status === 'error' && styles.statusError,
|
|
157
163
|
status === 'sending' && styles.statusPulse,
|
|
158
164
|
)}>
|
|
159
165
|
<Icon icon={statusConfig.icon} size="xsm" color="inherit" />
|
|
160
|
-
<span>{
|
|
166
|
+
<span>{statusLabel}</span>
|
|
161
167
|
</span>
|
|
162
168
|
)}
|
|
163
169
|
</div>
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
import {Badge} from '../Badge';
|
|
26
26
|
import {Button} from '../Button';
|
|
27
27
|
import {HoverCard} from '../HoverCard';
|
|
28
|
+
import {useTranslator} from '../i18n';
|
|
28
29
|
|
|
29
30
|
// =============================================================================
|
|
30
31
|
// Types
|
|
@@ -88,6 +89,7 @@ export function ChatPastedTextToken({
|
|
|
88
89
|
text,
|
|
89
90
|
onExpand,
|
|
90
91
|
}: ChatPastedTextTokenProps) {
|
|
92
|
+
const t = useTranslator();
|
|
91
93
|
const label = formatLabel(text);
|
|
92
94
|
|
|
93
95
|
const cardContent = (
|
|
@@ -97,7 +99,7 @@ export function ChatPastedTextToken({
|
|
|
97
99
|
<span {...stylex.props(styles.meta)}>{label}</span>
|
|
98
100
|
{onExpand && (
|
|
99
101
|
<Button
|
|
100
|
-
label=
|
|
102
|
+
label={t('@astryx.chat.pastedText.expand')}
|
|
101
103
|
variant="ghost"
|
|
102
104
|
size="sm"
|
|
103
105
|
onClick={onExpand}
|
|
@@ -25,6 +25,7 @@ import {useChatComposerContext} from './ChatContext';
|
|
|
25
25
|
|
|
26
26
|
import type {BaseProps} from '../BaseProps';
|
|
27
27
|
import {themeProps} from '../utils/themeProps';
|
|
28
|
+
import {useTranslator} from '../i18n';
|
|
28
29
|
|
|
29
30
|
// =============================================================================
|
|
30
31
|
// Types
|
|
@@ -75,6 +76,7 @@ const styles = stylex.create({
|
|
|
75
76
|
* ```
|
|
76
77
|
*/
|
|
77
78
|
export function ChatSendButton(props: ChatSendButtonProps): ReactNode {
|
|
79
|
+
const t = useTranslator();
|
|
78
80
|
const context = useChatComposerContext();
|
|
79
81
|
|
|
80
82
|
const {
|
|
@@ -94,7 +96,7 @@ export function ChatSendButton(props: ChatSendButtonProps): ReactNode {
|
|
|
94
96
|
return (
|
|
95
97
|
<Button
|
|
96
98
|
ref={ref}
|
|
97
|
-
label={isStopShown ? '
|
|
99
|
+
label={isStopShown ? t('@astryx.chatSendButton.stop') : t('@astryx.chatSendButton.send')}
|
|
98
100
|
variant={isStopShown ? 'secondary' : 'primary'}
|
|
99
101
|
size={size}
|
|
100
102
|
icon={
|
|
@@ -38,7 +38,7 @@ export const docs = {
|
|
|
38
38
|
name: 'calls',
|
|
39
39
|
type: 'ChatToolCallItem[]',
|
|
40
40
|
description:
|
|
41
|
-
|
|
41
|
+
"Array of tool call data. Each item has name, status, target, duration, node, additions, deletions, stats, errorMessage, resultDetail, key, and data. status is one of 'pending', 'running', 'complete', or 'error' (defaults to 'complete').",
|
|
42
42
|
required: true,
|
|
43
43
|
},
|
|
44
44
|
{
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import {useState, useCallback, useEffect, useMemo, useRef} from 'react';
|
|
17
|
+
import {useTranslator} from '../i18n';
|
|
17
18
|
|
|
18
19
|
// =============================================================================
|
|
19
20
|
// Types
|
|
@@ -258,6 +259,7 @@ export function getDefaultAudioContext(): AudioContext {
|
|
|
258
259
|
export function useSpeechRecognition(
|
|
259
260
|
options: UseSpeechRecognitionOptions = {},
|
|
260
261
|
): UseSpeechRecognitionReturn {
|
|
262
|
+
const t = useTranslator();
|
|
261
263
|
const {
|
|
262
264
|
lang,
|
|
263
265
|
continuous = true,
|
|
@@ -408,13 +410,20 @@ export function useSpeechRecognition(
|
|
|
408
410
|
recognition.onnomatch = () => {
|
|
409
411
|
callbacksRef.current.onError?.({
|
|
410
412
|
error: 'no-speech',
|
|
411
|
-
message: '
|
|
413
|
+
message: t('@astryx.chat.speechRecognition.noSpeechDetected'),
|
|
412
414
|
});
|
|
413
415
|
};
|
|
414
416
|
|
|
415
417
|
recognitionRef.current = recognition;
|
|
416
418
|
recognition.start();
|
|
417
|
-
}, [
|
|
419
|
+
}, [
|
|
420
|
+
lang,
|
|
421
|
+
continuous,
|
|
422
|
+
interimResults,
|
|
423
|
+
startVolumePolling,
|
|
424
|
+
stopVolumePolling,
|
|
425
|
+
t,
|
|
426
|
+
]);
|
|
418
427
|
|
|
419
428
|
const stop = useCallback(() => {
|
|
420
429
|
recognitionRef.current?.stop();
|