@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
|
@@ -14,14 +14,22 @@
|
|
|
14
14
|
|
|
15
15
|
import {useMemo} from 'react';
|
|
16
16
|
import type {SearchSource} from '../Typeahead/types';
|
|
17
|
+
import {useTranslator} from '../i18n';
|
|
18
|
+
import {resolveOperatorLabel} from './resolveOperatorLabel';
|
|
17
19
|
import type {InternalConfig} from './useInternalConfig';
|
|
18
20
|
import type {PowerSearchItem, PowerSearchOperator, FilterValue} from './types';
|
|
19
21
|
|
|
20
22
|
export function usePowerSearchSource(
|
|
21
23
|
config: InternalConfig,
|
|
22
24
|
): SearchSource<PowerSearchItem> {
|
|
25
|
+
const t = useTranslator();
|
|
23
26
|
return useMemo(() => {
|
|
24
27
|
const allItems = buildFieldItems(config);
|
|
28
|
+
// Resolver stays inline — `t()` internally memoizes both catalog
|
|
29
|
+
// lookups and parsed IntlMessageFormat instances, so calling it
|
|
30
|
+
// per keystroke is already O(1).
|
|
31
|
+
const opLabel = (op: PowerSearchOperator): string =>
|
|
32
|
+
resolveOperatorLabel(op, t);
|
|
25
33
|
|
|
26
34
|
return {
|
|
27
35
|
search(query: string): PowerSearchItem[] {
|
|
@@ -68,14 +76,15 @@ export function usePowerSearchSource(
|
|
|
68
76
|
|
|
69
77
|
// Check each field+operator combo against the query
|
|
70
78
|
for (const op of field.operators) {
|
|
71
|
-
const combinedLabel =
|
|
79
|
+
const combinedLabel =
|
|
80
|
+
`${field.label} ${opLabel(op)}`.toLowerCase();
|
|
72
81
|
if (combinedLabel.includes(lower)) {
|
|
73
82
|
const id = `${field.key}:${op.key}`;
|
|
74
83
|
if (!seen.has(id)) {
|
|
75
84
|
seen.add(id);
|
|
76
85
|
results.push({
|
|
77
86
|
id,
|
|
78
|
-
label: `${field.label} ${op
|
|
87
|
+
label: `${field.label} ${opLabel(op)}`,
|
|
79
88
|
auxiliaryData: {
|
|
80
89
|
fieldKey: field.key,
|
|
81
90
|
operatorKey: op.key,
|
|
@@ -100,7 +109,7 @@ export function usePowerSearchSource(
|
|
|
100
109
|
// Try "<field> <operator> <value>" first (longer match wins)
|
|
101
110
|
let hasExactOperatorMatch = false;
|
|
102
111
|
for (const op of field.operators) {
|
|
103
|
-
const prefix = `${fieldLabel} ${op.
|
|
112
|
+
const prefix = `${fieldLabel} ${opLabel(op).toLowerCase()} `;
|
|
104
113
|
if (lower.startsWith(prefix) && lower.length > prefix.length) {
|
|
105
114
|
const rawValue = query.slice(prefix.length);
|
|
106
115
|
const matches = resolveValueMatches(op, rawValue);
|
|
@@ -113,7 +122,7 @@ export function usePowerSearchSource(
|
|
|
113
122
|
seen.add(id);
|
|
114
123
|
results.push({
|
|
115
124
|
id,
|
|
116
|
-
label: `${field.label} ${op
|
|
125
|
+
label: `${field.label} ${opLabel(op)} ${match.quoted ? `"${match.displayValue}"` : match.displayValue}`,
|
|
117
126
|
auxiliaryData: {
|
|
118
127
|
fieldKey: field.key,
|
|
119
128
|
operatorKey: op.key,
|
|
@@ -136,7 +145,7 @@ export function usePowerSearchSource(
|
|
|
136
145
|
// Check the remainder isn't the start of an operator name
|
|
137
146
|
const remainder = lower.slice(fieldPrefix.length);
|
|
138
147
|
const isOperatorPrefix = field.operators.some(op =>
|
|
139
|
-
op.
|
|
148
|
+
opLabel(op).toLowerCase().startsWith(remainder),
|
|
140
149
|
);
|
|
141
150
|
if (!isOperatorPrefix) {
|
|
142
151
|
const rawValue = query.slice(fieldPrefix.length);
|
|
@@ -148,7 +157,7 @@ export function usePowerSearchSource(
|
|
|
148
157
|
seen.add(id);
|
|
149
158
|
results.push({
|
|
150
159
|
id,
|
|
151
|
-
label: `${field.label} ${op
|
|
160
|
+
label: `${field.label} ${opLabel(op)} ${match.quoted ? `"${match.displayValue}"` : match.displayValue}`,
|
|
152
161
|
auxiliaryData: {
|
|
153
162
|
fieldKey: field.key,
|
|
154
163
|
operatorKey: op.key,
|
|
@@ -171,7 +180,7 @@ export function usePowerSearchSource(
|
|
|
171
180
|
f =>
|
|
172
181
|
f.label.toLowerCase() === lower ||
|
|
173
182
|
f.operators.some(
|
|
174
|
-
op => `${f.label} ${op
|
|
183
|
+
op => `${f.label} ${opLabel(op)}`.toLowerCase() === lower,
|
|
175
184
|
),
|
|
176
185
|
);
|
|
177
186
|
if (contentFieldKey && !hasExactMatch) {
|
|
@@ -197,7 +206,7 @@ export function usePowerSearchSource(
|
|
|
197
206
|
return allItems;
|
|
198
207
|
},
|
|
199
208
|
};
|
|
200
|
-
}, [config]);
|
|
209
|
+
}, [config, t]);
|
|
201
210
|
}
|
|
202
211
|
|
|
203
212
|
interface ValueMatch {
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
import {mergeProps, mergeRefs} from '../utils';
|
|
34
34
|
import type {ResizableProps} from './useResizable';
|
|
35
35
|
import {themeProps} from '../utils/themeProps';
|
|
36
|
+
import {useTranslator} from '../i18n';
|
|
36
37
|
|
|
37
38
|
const KEYBOARD_STEP = 10;
|
|
38
39
|
const KEYBOARD_LARGE_STEP = 50;
|
|
@@ -307,7 +308,7 @@ export function ResizeHandle({
|
|
|
307
308
|
hasDivider = false,
|
|
308
309
|
isAlwaysVisible = true,
|
|
309
310
|
pillPlacement = 'auto',
|
|
310
|
-
label
|
|
311
|
+
label: labelFromProps,
|
|
311
312
|
resizable,
|
|
312
313
|
children,
|
|
313
314
|
xstyle,
|
|
@@ -315,6 +316,8 @@ export function ResizeHandle({
|
|
|
315
316
|
ref,
|
|
316
317
|
...props
|
|
317
318
|
}: ResizeHandleProps) {
|
|
319
|
+
const t = useTranslator();
|
|
320
|
+
const label = labelFromProps ?? t('@astryx.resizable.handle.label');
|
|
318
321
|
const handleRef = useRef<HTMLDivElement>(null);
|
|
319
322
|
// Removes the in-flight drag's window listeners (and resets body styles).
|
|
320
323
|
// Held in a ref so unmount can tear down a drag that never got a pointerup.
|
|
@@ -49,13 +49,13 @@ export const docs = {
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: 'padding',
|
|
52
|
-
type: '
|
|
52
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
53
53
|
description: 'Internal padding using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Use padding={0} for edge-to-edge content.',
|
|
54
54
|
default: '4',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
name: 'paddingBlock',
|
|
58
|
-
type: '
|
|
58
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
59
59
|
description: 'Block (vertical) padding override. Overrides only the block-axis padding while preserving inline padding from `padding` or the container theme default. Accepts the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10).',
|
|
60
60
|
},
|
|
61
61
|
{
|
|
@@ -131,13 +131,13 @@ export const docsZh = {
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
name: 'padding',
|
|
134
|
-
type: '
|
|
134
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
135
135
|
description: '使用间距比例的内部内边距(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。使用 padding={0} 实现全宽内容。',
|
|
136
136
|
default: '4',
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
name: 'paddingBlock',
|
|
140
|
-
type: '
|
|
140
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
141
141
|
description: '块(垂直)方向内边距覆盖。仅覆盖块轴内边距,同时保留来自 padding 或容器主题默认值的行内内边距。使用间距比例(0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10)。',
|
|
142
142
|
},
|
|
143
143
|
{
|
|
@@ -25,7 +25,7 @@ export const docs = {
|
|
|
25
25
|
{name: 'onChange', type: '(isSelected: boolean) => void', description: 'Called when toggled.', required: true},
|
|
26
26
|
{name: 'isDisabled', type: 'boolean', description: 'Disables the card.', default: 'false'},
|
|
27
27
|
{name: 'children', type: 'ReactNode', description: 'Card content.'},
|
|
28
|
-
{name: 'padding', type:
|
|
28
|
+
{name: 'padding', type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10', description: 'Inner padding.', default: '4'},
|
|
29
29
|
{name: 'variant', type: "'default' | 'transparent' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow'", description: 'Background color variant.', default: "'default'"},
|
|
30
30
|
{name: 'width', type: 'SizeValue', description: 'Card width.'},
|
|
31
31
|
{name: 'height', type: 'SizeValue', description: 'Card height.'},
|
|
@@ -72,6 +72,7 @@ import {themeProps} from '../utils/themeProps';
|
|
|
72
72
|
import {groupStyles} from '../InputGroup/groupStyles';
|
|
73
73
|
import {useInputGroup} from '../InputGroup/InputGroupContext';
|
|
74
74
|
import {VisuallyHidden} from '../VisuallyHidden';
|
|
75
|
+
import {useTranslator} from '../i18n';
|
|
75
76
|
|
|
76
77
|
const styles = stylex.create({
|
|
77
78
|
// Trigger container — the enhanced click target wrapping the combobox button and clear button as siblings
|
|
@@ -524,8 +525,7 @@ type SelectorPropsClearable<T extends SelectorOptionType = SelectorOptionType> =
|
|
|
524
525
|
};
|
|
525
526
|
|
|
526
527
|
export type SelectorProps<T extends SelectorOptionType = SelectorOptionType> =
|
|
527
|
-
|
|
|
528
|
-
| SelectorPropsClearable<T>;
|
|
528
|
+
SelectorPropsNonClearable<T> | SelectorPropsClearable<T>;
|
|
529
529
|
|
|
530
530
|
/**
|
|
531
531
|
* Default option renderer
|
|
@@ -553,6 +553,7 @@ function DefaultOption({option}: {option: SelectorOptionData}) {
|
|
|
553
553
|
export function Selector<T extends SelectorOptionType>(
|
|
554
554
|
props: SelectorProps<T>,
|
|
555
555
|
) {
|
|
556
|
+
const t = useTranslator();
|
|
556
557
|
const {
|
|
557
558
|
label,
|
|
558
559
|
isLabelHidden = false,
|
|
@@ -566,7 +567,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
566
567
|
onChange,
|
|
567
568
|
changeAction,
|
|
568
569
|
isLoading = false,
|
|
569
|
-
placeholder
|
|
570
|
+
placeholder: placeholderFromProps,
|
|
570
571
|
size: sizeProp,
|
|
571
572
|
status,
|
|
572
573
|
labelTooltip,
|
|
@@ -574,7 +575,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
574
575
|
htmlName,
|
|
575
576
|
renderOption,
|
|
576
577
|
hasSearch = false,
|
|
577
|
-
searchPlaceholder
|
|
578
|
+
searchPlaceholder: searchPlaceholderFromProps,
|
|
578
579
|
placement,
|
|
579
580
|
isDefaultOpen = false,
|
|
580
581
|
'data-testid': testId,
|
|
@@ -585,6 +586,9 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
585
586
|
hasClear: hasClearProp,
|
|
586
587
|
...rest
|
|
587
588
|
} = props as SelectorPropsClearable<T>;
|
|
589
|
+
const placeholder = placeholderFromProps ?? t('@astryx.selector.placeholder');
|
|
590
|
+
const searchPlaceholder =
|
|
591
|
+
searchPlaceholderFromProps ?? t('@astryx.selector.searchPlaceholder');
|
|
588
592
|
const hasClear = hasClearProp === true;
|
|
589
593
|
const size = useSize(sizeProp, 'md');
|
|
590
594
|
|
|
@@ -803,7 +807,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
803
807
|
? getItemId(highlightedIndex)
|
|
804
808
|
: undefined
|
|
805
809
|
}
|
|
806
|
-
aria-label=
|
|
810
|
+
aria-label={t('@astryx.selector.searchOptions')}
|
|
807
811
|
type="text"
|
|
808
812
|
value={searchQuery}
|
|
809
813
|
onChange={e => setSearchQuery(e.target.value)}
|
|
@@ -835,6 +839,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
835
839
|
popover.isOpen,
|
|
836
840
|
highlightedIndex,
|
|
837
841
|
getItemId,
|
|
842
|
+
t,
|
|
838
843
|
]);
|
|
839
844
|
|
|
840
845
|
// Render an individual item
|
|
@@ -1014,7 +1019,7 @@ export function Selector<T extends SelectorOptionType>(
|
|
|
1014
1019
|
<button
|
|
1015
1020
|
type="button"
|
|
1016
1021
|
onClick={handleClear}
|
|
1017
|
-
aria-label={
|
|
1022
|
+
aria-label={t('@astryx.selector.clearLabel', {label})}
|
|
1018
1023
|
{...stylex.props(styles.clearButton)}>
|
|
1019
1024
|
<Icon icon="close" size="sm" color="secondary" />
|
|
1020
1025
|
</button>
|
package/src/SideNav/SideNav.tsx
CHANGED
|
@@ -45,6 +45,7 @@ import {useResizable} from '../Resizable/useResizable';
|
|
|
45
45
|
import type {ResizableConfig} from '../Resizable/useResizable';
|
|
46
46
|
import {ResizeHandle} from '../Resizable/ResizeHandle';
|
|
47
47
|
import {themeProps} from '../utils/themeProps';
|
|
48
|
+
import {useTranslator} from '../i18n';
|
|
48
49
|
|
|
49
50
|
// =============================================================================
|
|
50
51
|
// Constants
|
|
@@ -330,6 +331,7 @@ export function SideNav({
|
|
|
330
331
|
handleRef,
|
|
331
332
|
...props
|
|
332
333
|
}: SideNavProps) {
|
|
334
|
+
const t = useTranslator();
|
|
333
335
|
// Parse collapsible prop
|
|
334
336
|
const collapsibleConfig = typeof collapsible === 'object' ? collapsible : {};
|
|
335
337
|
const isCollapsible = !!collapsible;
|
|
@@ -504,7 +506,7 @@ export function SideNav({
|
|
|
504
506
|
<nav
|
|
505
507
|
ref={mergeRefs(ref, navRef)}
|
|
506
508
|
role="navigation"
|
|
507
|
-
aria-label=
|
|
509
|
+
aria-label={t('@astryx.sideNav.label')}
|
|
508
510
|
data-testid={testId}
|
|
509
511
|
{...mergeProps(
|
|
510
512
|
themeProps('side-nav'),
|
|
@@ -569,7 +571,7 @@ export function SideNav({
|
|
|
569
571
|
pillPlacement="end"
|
|
570
572
|
isAlwaysVisible={false}
|
|
571
573
|
resizable={resizableHook.props}
|
|
572
|
-
label=
|
|
574
|
+
label={t('@astryx.sideNav.resizeSidebar')}
|
|
573
575
|
/>
|
|
574
576
|
</div>
|
|
575
577
|
) : (
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
type SideNavImperativeCollapseHandle,
|
|
31
31
|
} from './SideNavCollapseContext';
|
|
32
32
|
import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
|
|
33
|
+
import {useTranslator} from '../i18n';
|
|
33
34
|
|
|
34
35
|
// =============================================================================
|
|
35
36
|
// Styles
|
|
@@ -105,6 +106,7 @@ export function SideNavCollapseButton({
|
|
|
105
106
|
onClick: onClickProp,
|
|
106
107
|
...props
|
|
107
108
|
}: SideNavCollapseButtonProps) {
|
|
109
|
+
const t = useTranslator();
|
|
108
110
|
const {isCollapsed, toggle, isCollapsible} =
|
|
109
111
|
useSideNavCollapseState(handleRef);
|
|
110
112
|
const {isMobile} = useAppShellMobile();
|
|
@@ -118,7 +120,7 @@ export function SideNavCollapseButton({
|
|
|
118
120
|
return (
|
|
119
121
|
<Button
|
|
120
122
|
ref={ref}
|
|
121
|
-
label={label ?? (isCollapsed ? '
|
|
123
|
+
label={label ?? (isCollapsed ? t('@astryx.sideNavCollapseButton.expandSidebar') : t('@astryx.sideNavCollapseButton.collapseSidebar'))}
|
|
122
124
|
variant="ghost"
|
|
123
125
|
{...props}
|
|
124
126
|
onClick={composeEventHandlers(onClickProp, toggle)}
|
|
@@ -44,6 +44,7 @@ import type {BaseProps} from '../BaseProps';
|
|
|
44
44
|
import {useMenuHover} from '../hooks/useMenuHover';
|
|
45
45
|
import {NavHeadingCloseContext} from '../NavMenu/NavMenuContext';
|
|
46
46
|
import {themeProps} from '../utils/themeProps';
|
|
47
|
+
import {useTranslator} from '../i18n';
|
|
47
48
|
|
|
48
49
|
// =============================================================================
|
|
49
50
|
// Styles
|
|
@@ -342,13 +343,14 @@ export function SideNavHeading({
|
|
|
342
343
|
ref,
|
|
343
344
|
...props
|
|
344
345
|
}: SideNavHeadingProps) {
|
|
346
|
+
const t = useTranslator();
|
|
345
347
|
const LinkComponent = useLinkComponent(as);
|
|
346
348
|
const {isCollapsed} = useSideNavCollapse();
|
|
347
349
|
const rootRef = useRef<HTMLDivElement>(null);
|
|
348
350
|
const collapsedItemRef = useRef<HTMLElement>(null);
|
|
349
351
|
|
|
350
352
|
const popover = usePopover({
|
|
351
|
-
dialogLabel: '
|
|
353
|
+
dialogLabel: t('@astryx.sideNav.heading.dialogLabel'),
|
|
352
354
|
hasCloseButton: false,
|
|
353
355
|
});
|
|
354
356
|
|
|
@@ -603,7 +605,7 @@ export function SideNavHeading({
|
|
|
603
605
|
{renderTextContent(
|
|
604
606
|
<button
|
|
605
607
|
type="button"
|
|
606
|
-
aria-label=
|
|
608
|
+
aria-label={t('@astryx.sideNav.heading.openMenu')}
|
|
607
609
|
onClick={e => {
|
|
608
610
|
e.stopPropagation();
|
|
609
611
|
triggerProps.onClick();
|
|
@@ -665,7 +667,7 @@ export function SideNavHeading({
|
|
|
665
667
|
showChevron ? (
|
|
666
668
|
<button
|
|
667
669
|
type="button"
|
|
668
|
-
aria-label=
|
|
670
|
+
aria-label={t('@astryx.sideNav.heading.openMenu')}
|
|
669
671
|
onClick={e => {
|
|
670
672
|
e.stopPropagation();
|
|
671
673
|
triggerProps.onClick();
|
|
@@ -54,6 +54,7 @@ import {getIcon} from '../Icon/globalIconRegistry';
|
|
|
54
54
|
import {useSideNavRenderMode} from './SideNavRenderContext';
|
|
55
55
|
import {useAppShellMobile} from '../AppShell/AppShellMobileContext';
|
|
56
56
|
import {themeProps} from '../utils/themeProps';
|
|
57
|
+
import {useTranslator} from '../i18n';
|
|
57
58
|
|
|
58
59
|
// =============================================================================
|
|
59
60
|
// Styles
|
|
@@ -356,6 +357,7 @@ export function SideNavItem({
|
|
|
356
357
|
'data-testid': testId,
|
|
357
358
|
ref,
|
|
358
359
|
}: SideNavItemProps) {
|
|
360
|
+
const t = useTranslator();
|
|
359
361
|
const {isCollapsed} = useSideNavCollapse();
|
|
360
362
|
const renderMode = useSideNavRenderMode();
|
|
361
363
|
const {closeMobileNav} = useAppShellMobile();
|
|
@@ -626,7 +628,7 @@ export function SideNavItem({
|
|
|
626
628
|
<button
|
|
627
629
|
type="button"
|
|
628
630
|
onClick={handleToggleClick}
|
|
629
|
-
aria-label={isItemCollapsed ?
|
|
631
|
+
aria-label={isItemCollapsed ? t('@astryx.sideNavItem.expand', {label}) : t('@astryx.sideNavItem.collapse', {label})}
|
|
630
632
|
aria-expanded={!isItemCollapsed}
|
|
631
633
|
aria-controls={`${id}-children`}
|
|
632
634
|
{...stylex.props(styles.expandToggle)}>
|
|
@@ -132,7 +132,7 @@ export const docs = {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
name: 'status',
|
|
135
|
-
type: '
|
|
135
|
+
type: "{type: 'warning' | 'error' | 'success', message?: string}",
|
|
136
136
|
description:
|
|
137
137
|
'Status indicator object (`{ type, message }`) for validation feedback.',
|
|
138
138
|
},
|
|
@@ -286,7 +286,7 @@ export const docsZh = {
|
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
name: 'status',
|
|
289
|
-
type: '
|
|
289
|
+
type: "{type: 'warning' | 'error' | 'success', message?: string}",
|
|
290
290
|
description:
|
|
291
291
|
'验证反馈的状态指示器对象(`{ type, message }`)。',
|
|
292
292
|
},
|
package/src/Stack/Stack.doc.mjs
CHANGED
|
@@ -24,25 +24,25 @@ export const docs = {
|
|
|
24
24
|
props: [
|
|
25
25
|
{
|
|
26
26
|
name: 'gap',
|
|
27
|
-
type: '
|
|
27
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
28
28
|
description:
|
|
29
29
|
'Spacing step (number literal): 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10. Pass as a JSX number expression e.g. gap={4}, NOT a string like gap="4".',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
name: 'padding',
|
|
33
|
-
type: '
|
|
33
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
34
34
|
description:
|
|
35
35
|
'Inner padding on all sides, using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Matches the padding prop on Card, LayoutContent, and LayoutPanel. Pass as a JSX number expression e.g. padding={3}.',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
name: 'paddingInline',
|
|
39
|
-
type: '
|
|
39
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
40
40
|
description:
|
|
41
41
|
'Inline (horizontal) padding, using the spacing scale. Overrides padding on the inline axis when both are set.',
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
name: 'paddingBlock',
|
|
45
|
-
type: '
|
|
45
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
46
46
|
description:
|
|
47
47
|
'Block (vertical) padding, using the spacing scale. Overrides padding on the block axis when both are set.',
|
|
48
48
|
},
|
|
@@ -127,25 +127,25 @@ export const docs = {
|
|
|
127
127
|
props: [
|
|
128
128
|
{
|
|
129
129
|
name: 'gap',
|
|
130
|
-
type: '
|
|
130
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
131
131
|
description:
|
|
132
132
|
'Spacing step (number literal): 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10. Pass as a JSX number expression e.g. gap={4}, NOT a string like gap="4".',
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
name: 'padding',
|
|
136
|
-
type: '
|
|
136
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
137
137
|
description:
|
|
138
138
|
'Inner padding on all sides, using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Matches the padding prop on Card, LayoutContent, and LayoutPanel. Pass as a JSX number expression e.g. padding={3}.',
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
name: 'paddingInline',
|
|
142
|
-
type: '
|
|
142
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
143
143
|
description:
|
|
144
144
|
'Inline (horizontal) padding, using the spacing scale. Overrides padding on the inline axis when both are set.',
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
name: 'paddingBlock',
|
|
148
|
-
type: '
|
|
148
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
149
149
|
description:
|
|
150
150
|
'Block (vertical) padding, using the spacing scale. Overrides padding on the block axis when both are set.',
|
|
151
151
|
},
|
|
@@ -289,7 +289,7 @@ export const docsZh = {
|
|
|
289
289
|
props: [
|
|
290
290
|
{
|
|
291
291
|
name: 'gap',
|
|
292
|
-
type: '
|
|
292
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
293
293
|
description:
|
|
294
294
|
'间距步进(数字字面量):0、0.5、1、1.5、2、3、4、5、6、8、10。在 JSX 中使用数字表达式 e.g. gap={4},不要使用字符串 gap="4"。',
|
|
295
295
|
},
|
|
@@ -358,7 +358,7 @@ export const docsZh = {
|
|
|
358
358
|
props: [
|
|
359
359
|
{
|
|
360
360
|
name: 'gap',
|
|
361
|
-
type: '
|
|
361
|
+
type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10',
|
|
362
362
|
description:
|
|
363
363
|
'间距步进(数字字面量):0、0.5、1、1.5、2、3、4、5、6、8、10。在 JSX 中使用数字表达式 e.g. gap={4},不要使用字符串 gap="4"。',
|
|
364
364
|
},
|
|
@@ -90,7 +90,7 @@ export const docs = {
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
name: 'status',
|
|
93
|
-
type: '
|
|
93
|
+
type: "{type: 'warning' | 'error' | 'success', message?: string}",
|
|
94
94
|
description:
|
|
95
95
|
'Status indicator with type and message. Displays a colored message box below the switch and sets aria-invalid when type is "error".',
|
|
96
96
|
},
|
|
@@ -236,7 +236,7 @@ export const docsZh = {
|
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
name: 'status',
|
|
239
|
-
type: '
|
|
239
|
+
type: "{type: 'warning' | 'error' | 'success', message?: string}",
|
|
240
240
|
description:
|
|
241
241
|
'带类型和消息的状态指示器。在开关下方显示彩色消息框,当类型为 "error" 时设置 aria-invalid。',
|
|
242
242
|
},
|
|
@@ -197,6 +197,22 @@ describe('Switch', () => {
|
|
|
197
197
|
expect(screen.getByLabelText('Toggle row')).toBeInTheDocument();
|
|
198
198
|
});
|
|
199
199
|
|
|
200
|
+
it('keeps description linked via aria-describedby when isLabelHidden', () => {
|
|
201
|
+
render(
|
|
202
|
+
<Switch
|
|
203
|
+
label="Toggle row"
|
|
204
|
+
isLabelHidden
|
|
205
|
+
description="Enables sync for this row"
|
|
206
|
+
value={false}
|
|
207
|
+
onChange={() => {}}
|
|
208
|
+
/>,
|
|
209
|
+
);
|
|
210
|
+
const switchEl = screen.getByRole('switch');
|
|
211
|
+
const description = screen.getByText('Enables sync for this row');
|
|
212
|
+
expect(description.id).not.toBe('');
|
|
213
|
+
expect(switchEl.getAttribute('aria-describedby')).toContain(description.id);
|
|
214
|
+
});
|
|
215
|
+
|
|
200
216
|
it('shows label visually by default', () => {
|
|
201
217
|
render(
|
|
202
218
|
<Switch label="Enable notifications" value={false} onChange={() => {}} />,
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -393,9 +393,11 @@ export function Switch({
|
|
|
393
393
|
});
|
|
394
394
|
|
|
395
395
|
// Build aria-describedby from description and status message
|
|
396
|
-
// Only include descriptionID when the element actually renders
|
|
396
|
+
// Only include descriptionID when the element actually renders.
|
|
397
|
+
// FieldLabel renders the description (with descriptionID) even when the
|
|
398
|
+
// label is visually hidden — it's sr-only, so keep it linked.
|
|
397
399
|
const describedByParts: string[] = [];
|
|
398
|
-
if (description
|
|
400
|
+
if (description) {
|
|
399
401
|
describedByParts.push(descriptionID);
|
|
400
402
|
}
|
|
401
403
|
if (status?.message) {
|
package/src/TabList/TabList.tsx
CHANGED
|
@@ -29,6 +29,7 @@ import {useListFocus} from '../hooks/useListFocus';
|
|
|
29
29
|
import {useKeyboardHint} from '../hooks/useKeyboardHint';
|
|
30
30
|
import {EDGE_COMP_ATTR} from '../Layout/edgeCompensation.stylex';
|
|
31
31
|
import {themeProps} from '../utils/themeProps';
|
|
32
|
+
import {useTranslator} from '../i18n';
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
35
|
* Selector matching the focusable stops in the tab strip: every Tab
|
|
@@ -129,11 +130,13 @@ export function TabList({
|
|
|
129
130
|
onKeyDown: onKeyDownProp,
|
|
130
131
|
onFocus: onFocusProp,
|
|
131
132
|
onBlur: onBlurProp,
|
|
132
|
-
'aria-label':
|
|
133
|
+
'aria-label': ariaLabelFromProps,
|
|
133
134
|
'aria-orientation': _ariaOrientation,
|
|
134
135
|
[EDGE_COMP_ATTR]: _edgeCompAttr,
|
|
135
136
|
...restProps
|
|
136
137
|
}: TabListProps) {
|
|
138
|
+
const t = useTranslator();
|
|
139
|
+
const ariaLabel = ariaLabelFromProps ?? t('@astryx.tabList.label');
|
|
137
140
|
const size = useSize(sizeProp, 'md');
|
|
138
141
|
|
|
139
142
|
// Roving-tabindex keyboard navigation across the tab strip via the shared
|
package/src/Table/BaseTable.tsx
CHANGED
|
@@ -45,6 +45,7 @@ import {mergeProps} from '../utils';
|
|
|
45
45
|
import {EmptyState} from '../EmptyState';
|
|
46
46
|
import {Text} from '../Text';
|
|
47
47
|
import {themeProps} from '../utils/themeProps';
|
|
48
|
+
import {useTranslator} from '../i18n';
|
|
48
49
|
|
|
49
50
|
const styles = stylex.create({
|
|
50
51
|
table: {
|
|
@@ -326,6 +327,7 @@ function BaseTableInner<T extends Record<string, unknown>>({
|
|
|
326
327
|
emptyState,
|
|
327
328
|
ref,
|
|
328
329
|
}: BaseTableProps<T> & {ref?: Ref<HTMLTableElement>}): ReactElement {
|
|
330
|
+
const t = useTranslator();
|
|
329
331
|
// Use stable empty array when no plugins provided
|
|
330
332
|
const plugins = pluginsProp ?? (EMPTY_PLUGINS as TablePlugin<T>[]);
|
|
331
333
|
|
|
@@ -527,7 +529,12 @@ function BaseTableInner<T extends Record<string, unknown>>({
|
|
|
527
529
|
emptyState !== false && (
|
|
528
530
|
<tr>
|
|
529
531
|
<td colSpan={resolvedColumns.length}>
|
|
530
|
-
{emptyState ??
|
|
532
|
+
{emptyState ?? (
|
|
533
|
+
<EmptyState
|
|
534
|
+
title={t('@astryx.table.noData')}
|
|
535
|
+
isCompact
|
|
536
|
+
/>
|
|
537
|
+
)}
|
|
531
538
|
</td>
|
|
532
539
|
</tr>
|
|
533
540
|
)}
|
package/src/Table/Table.doc.mjs
CHANGED
|
@@ -45,7 +45,7 @@ export const docs = {
|
|
|
45
45
|
{
|
|
46
46
|
name: 'columns',
|
|
47
47
|
type: 'TableColumn<T>[]',
|
|
48
|
-
description: 'Column definitions: each column has {key, header, width?, align?, renderCell?}. The `header` field sets the column heading text. If omitted, columns are auto-generated from data object keys. The `width` field is typed as `ColumnWidth` (not a number)
|
|
48
|
+
description: 'Column definitions: each column has {key, header, width?, align?, renderCell?}. The `header` field sets the column heading text. If omitted, columns are auto-generated from data object keys. The `width` field is typed as `ColumnWidth` (not a number); use `proportional(n)` or `pixel(n)` helpers imported from `@astryxdesign/core/Table`. Example: `width: pixel(120)` for 120px fixed, `width: proportional(1)` for flex distribution.',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
name: 'idKey',
|
package/src/Table/Table.tsx
CHANGED
|
@@ -31,6 +31,7 @@ import type {
|
|
|
31
31
|
TableRenderProps,
|
|
32
32
|
} from './types';
|
|
33
33
|
import type {StyleXStyles} from '../theme/types';
|
|
34
|
+
import {useTranslator} from '../i18n';
|
|
34
35
|
|
|
35
36
|
// =============================================================================
|
|
36
37
|
// Table Types
|
|
@@ -147,6 +148,7 @@ function TableScrollWrapper({
|
|
|
147
148
|
beforeTable?: React.ReactNode;
|
|
148
149
|
afterTable?: React.ReactNode;
|
|
149
150
|
}) {
|
|
151
|
+
const t = useTranslator();
|
|
150
152
|
const {ref, ...restHtmlProps} = htmlProps ?? {};
|
|
151
153
|
return (
|
|
152
154
|
<div
|
|
@@ -158,7 +160,7 @@ function TableScrollWrapper({
|
|
|
158
160
|
// htmlProps.
|
|
159
161
|
tabIndex={0}
|
|
160
162
|
role="group"
|
|
161
|
-
aria-label=
|
|
163
|
+
aria-label={t('@astryx.table.label')}
|
|
162
164
|
{...restHtmlProps}
|
|
163
165
|
{...mergeProps(
|
|
164
166
|
themeProps('table-scroll-wrapper'),
|
package/src/Table/index.ts
CHANGED
|
@@ -26,6 +26,8 @@ export {useTableColumnSettings} from './plugins/columnSettings';
|
|
|
26
26
|
export {useTableColumnSettingsState} from './plugins/columnSettings';
|
|
27
27
|
export {useTableColumnResize} from './plugins/columnResize';
|
|
28
28
|
export {useTableStickyColumns} from './plugins/stickyColumns';
|
|
29
|
+
export {useTableGroupedRows} from './plugins/groupedRows';
|
|
30
|
+
export {useTableRowIndex} from './plugins/rowIndex';
|
|
29
31
|
export {
|
|
30
32
|
useTableRowExpansion,
|
|
31
33
|
useTableRowExpansionState,
|
|
@@ -102,6 +104,11 @@ export type {
|
|
|
102
104
|
export type {UseTableColumnResizeConfig} from './plugins/columnResize';
|
|
103
105
|
export type {UseTableStickyColumnsConfig} from './plugins/stickyColumns';
|
|
104
106
|
export type {UseTableRowExpansionConfig} from './plugins/rowExpansion';
|
|
107
|
+
export type {UseTableRowIndexConfig} from './plugins/rowIndex';
|
|
108
|
+
export type {
|
|
109
|
+
UseTableGroupedRowsConfig,
|
|
110
|
+
UseTableGroupedRowsResult,
|
|
111
|
+
} from './plugins/groupedRows';
|
|
105
112
|
export type {
|
|
106
113
|
UseTableFilteringConfig,
|
|
107
114
|
TableFilterState,
|