@astryxdesign/core 0.1.6-canary.1b61ba6 → 0.1.6-canary.1d64659
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/README.md +0 -2
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +1 -4
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +1 -3
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +1 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +6 -8
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +4 -34
- package/dist/ButtonGroup/ButtonGroup.d.ts +5 -20
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +11 -27
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +5 -8
- package/dist/Carousel/Carousel.d.ts +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +5 -8
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +1 -4
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +2 -9
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +2 -6
- package/dist/Chat/ChatLayout.d.ts +11 -1
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +4 -6
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +2 -4
- package/dist/Chat/ChatMessage.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +2 -8
- package/dist/Chat/ChatMessageBubble.d.ts +1 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +1 -3
- package/dist/Chat/ChatMessageList.d.ts +1 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +1 -3
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +8 -13
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +1 -3
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +1 -3
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.d.ts +1 -12
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +6 -43
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +2 -4
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +2 -4
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +1 -3
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +1 -3
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +2 -10
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +2 -4
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +3 -8
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +1 -4
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +1 -4
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +1 -4
- package/dist/DateInput/DateInput.d.ts +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +5 -10
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +6 -11
- package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +7 -15
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +12 -15
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +3 -7
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +5 -11
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +1 -11
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +4 -6
- package/dist/Link/Link.d.ts +1 -1
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -4
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +8 -10
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +2 -4
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +1 -4
- package/dist/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +1 -4
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +6 -13
- package/dist/NavItem/index.d.ts +9 -0
- package/dist/NavItem/index.d.ts.map +1 -0
- package/dist/NavItem/index.js +10 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +1 -5
- package/dist/Outline/Outline.d.ts +1 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +1 -4
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +11 -38
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +1 -4
- package/dist/PowerSearch/PowerSearch.d.ts +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +12 -22
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +20 -26
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -7
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +21 -34
- package/dist/PowerSearch/formatFilterValue.d.ts +1 -2
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +9 -19
- package/dist/PowerSearch/index.d.ts +1 -2
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/index.js +0 -1
- package/dist/PowerSearch/types.d.ts +2 -28
- 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 +8 -15
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -4
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +5 -11
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +2 -4
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +1 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +3 -5
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +1 -7
- package/dist/TabList/TabList.d.ts +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +1 -4
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +16 -29
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +3 -5
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +19 -56
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +4 -11
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +3 -6
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +6 -8
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +2 -5
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +4 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -2
- package/dist/Table/types.d.ts +10 -17
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +1 -5
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +2 -8
- package/dist/TimeInput/TimeInput.d.ts +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +2 -7
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +1 -3
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +1 -3
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +2 -8
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +1 -3
- package/dist/TopNav/TopNav.d.ts +1 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +1 -4
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +3 -5
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -5
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +1 -7
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +4 -8
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +1 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +0 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +0 -1
- package/dist/astryx.css +1 -3
- package/dist/astryx.umd.js +60 -62
- package/dist/astryx.umd.js.map +4 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/package.json +2 -23
- package/src/AlertDialog/AlertDialog.tsx +1 -4
- package/src/AppShell/AppShell.doc.mjs +2 -8
- package/src/AppShell/AppShell.tsx +1 -3
- package/src/AvatarGroup/AvatarGroup.tsx +1 -4
- package/src/Banner/Banner.tsx +5 -10
- package/src/Breadcrumbs/Breadcrumbs.tsx +1 -4
- package/src/Button/Button.tsx +4 -34
- package/src/ButtonGroup/ButtonGroup.test.tsx +2 -386
- package/src/ButtonGroup/ButtonGroup.tsx +11 -27
- package/src/Calendar/Calendar.tsx +5 -8
- package/src/Card/Card.doc.mjs +3 -3
- package/src/Carousel/Carousel.tsx +7 -10
- package/src/Chat/ChatComposer.tsx +1 -5
- package/src/Chat/ChatComposerDrawer.tsx +2 -9
- package/src/Chat/ChatComposerInput.tsx +4 -10
- package/src/Chat/ChatLayout.test.tsx +2 -127
- package/src/Chat/ChatLayout.tsx +12 -5
- package/src/Chat/ChatLayoutScrollButton.tsx +2 -4
- package/src/Chat/ChatMessage.tsx +1 -5
- package/src/Chat/ChatMessageBubble.tsx +0 -2
- package/src/Chat/ChatMessageList.doc.mjs +1 -1
- package/src/Chat/ChatMessageList.tsx +0 -2
- package/src/Chat/ChatMessageMetadata.tsx +9 -15
- package/src/Chat/ChatPastedTextToken.tsx +1 -3
- package/src/Chat/ChatSendButton.tsx +1 -3
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/Chat/index.ts +0 -1
- package/src/Chat/useChatStreamScroll.ts +11 -67
- package/src/Chat/useSpeechRecognition.ts +2 -11
- package/src/Chat/useTriggerMenu.tsx +2 -4
- package/src/CheckboxList/CheckboxList.doc.mjs +1 -1
- package/src/CheckboxList/CheckboxList.tsx +0 -2
- package/src/CheckboxList/CheckboxListItem.tsx +1 -7
- package/src/Citation/Citation.tsx +2 -4
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
- package/src/CodeBlock/CodeBlock.tsx +2 -4
- package/src/CommandPalette/CommandPalette.tsx +3 -10
- package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
- package/src/CommandPalette/CommandPaletteInput.tsx +1 -5
- package/src/CommandPalette/CommandPaletteList.tsx +1 -4
- package/src/ContextMenu/ContextMenu.tsx +1 -4
- package/src/DateInput/DateInput.doc.mjs +2 -2
- package/src/DateInput/DateInput.tsx +5 -13
- package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
- package/src/DateRangeInput/DateRangeInput.tsx +6 -14
- package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
- package/src/DateTimeInput/DateTimeInput.tsx +7 -17
- package/src/Dialog/Dialog.tsx +15 -11
- package/src/Dialog/DialogHeader.tsx +3 -7
- package/src/DropdownMenu/DropdownMenu.tsx +8 -12
- package/src/Field/Field.doc.mjs +2 -2
- package/src/FileInput/FileInput.test.tsx +1 -40
- package/src/FileInput/FileInput.tsx +1 -12
- package/src/Grid/Grid.doc.mjs +5 -5
- package/src/InputGroup/InputGroup.doc.mjs +1 -1
- package/src/Lightbox/Lightbox.doc.mjs +2 -7
- package/src/Lightbox/Lightbox.tsx +4 -6
- package/src/Link/Link.tsx +1 -4
- package/src/Markdown/Markdown.tsx +4 -12
- package/src/MobileNav/MobileNav.tsx +2 -4
- package/src/MobileNav/MobileNavToggle.tsx +3 -5
- package/src/MoreMenu/MoreMenu.tsx +1 -4
- package/src/MultiSelector/MultiSelector.tsx +5 -14
- package/src/NavItem/index.ts +11 -0
- package/src/NumberInput/NumberInput.tsx +1 -3
- package/src/Outline/Outline.tsx +1 -4
- package/src/OverflowList/OverflowList.doc.mjs +2 -2
- package/src/Pagination/Pagination.tsx +12 -35
- package/src/Popover/usePopover.tsx +1 -6
- package/src/PowerSearch/PowerSearch.doc.mjs +4 -4
- package/src/PowerSearch/PowerSearch.tsx +10 -22
- package/src/PowerSearch/PowerSearchEditPopover.tsx +20 -27
- package/src/PowerSearch/PowerSearchToken.tsx +6 -17
- package/src/PowerSearch/PowerSearchValueEditor.tsx +21 -34
- package/src/PowerSearch/formatFilterValue.ts +8 -21
- package/src/PowerSearch/index.ts +0 -5
- package/src/PowerSearch/types.ts +9 -33
- package/src/PowerSearch/usePowerSearchConfig.ts +27 -59
- package/src/PowerSearch/usePowerSearchSource.ts +8 -17
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/Resizable/ResizeHandle.tsx +1 -4
- package/src/Section/Section.doc.mjs +4 -4
- package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
- package/src/Selector/Selector.tsx +6 -11
- package/src/SideNav/SideNav.tsx +2 -4
- package/src/SideNav/SideNavCollapseButton.tsx +1 -3
- package/src/SideNav/SideNavHeading.tsx +3 -5
- package/src/SideNav/SideNavItem.tsx +1 -3
- 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/TabList/TabList.tsx +1 -4
- package/src/Table/BaseTable.tsx +19 -36
- package/src/Table/Table.test.tsx +1 -132
- package/src/Table/Table.tsx +4 -6
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +1 -1
- package/src/Table/plugins/filtering/useTableFiltering.tsx +30 -31
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +4 -6
- package/src/Table/plugins/pagination/useTablePagination.tsx +1 -4
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -9
- package/src/Table/plugins/selection/useTableSelection.tsx +7 -6
- package/src/Table/plugins/sortable/useTableSortable.tsx +5 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +4 -4
- package/src/Table/types.ts +12 -18
- package/src/Table/useTableFiltering.doc.mjs +2 -2
- package/src/Table/useTableSortable.doc.mjs +11 -11
- package/src/Text/Text.doc.mjs +2 -2
- package/src/TextInput/TextInput.tsx +1 -3
- package/src/Thumbnail/Thumbnail.tsx +2 -4
- package/src/TimeInput/TimeInput.doc.mjs +2 -2
- package/src/TimeInput/TimeInput.tsx +2 -6
- package/src/Timestamp/Timestamp.doc.mjs +4 -4
- package/src/Toast/Toast.tsx +1 -3
- package/src/Toast/ToastViewport.tsx +1 -3
- package/src/Token/Token.tsx +2 -4
- 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.tsx +1 -4
- package/src/TopNav/TopNavHeading.tsx +3 -5
- package/src/TreeList/TreeList.tsx +1 -5
- package/src/TreeList/TreeListItem.tsx +1 -6
- package/src/Typeahead/BaseTypeahead.tsx +4 -11
- package/src/Typeahead/Typeahead.doc.mjs +1 -1
- package/src/Typeahead/Typeahead.tsx +1 -3
- package/src/VisuallyHidden/VisuallyHidden.tsx +0 -1
- package/src/index.ts +0 -3
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +0 -23
- package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +0 -1
- package/dist/PowerSearch/resolveOperatorLabel.js +0 -28
- package/dist/authoring/doc.d.ts +0 -145
- package/dist/authoring/doc.d.ts.map +0 -1
- package/dist/authoring/doc.js +0 -100
- package/dist/authoring/index.d.ts +0 -29
- package/dist/authoring/index.d.ts.map +0 -1
- package/dist/authoring/index.js +0 -28
- package/dist/authoring/integration.d.ts +0 -35
- package/dist/authoring/integration.d.ts.map +0 -1
- package/dist/authoring/integration.js +0 -30
- package/dist/authoring/template.d.ts +0 -66
- package/dist/authoring/template.d.ts.map +0 -1
- package/dist/authoring/template.js +0 -55
- package/dist/config.d.ts +0 -80
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -40
- package/dist/i18n/InternationalizationContext.d.ts +0 -12
- package/dist/i18n/InternationalizationContext.d.ts.map +0 -1
- package/dist/i18n/InternationalizationContext.js +0 -29
- package/dist/i18n/InternationalizationProvider.d.ts +0 -62
- package/dist/i18n/InternationalizationProvider.d.ts.map +0 -1
- package/dist/i18n/InternationalizationProvider.js +0 -44
- package/dist/i18n/index.d.ts +0 -24
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js +0 -21
- package/dist/i18n/resolve.d.ts +0 -22
- package/dist/i18n/resolve.d.ts.map +0 -1
- package/dist/i18n/resolve.js +0 -141
- package/dist/i18n/translator.d.ts +0 -25
- package/dist/i18n/translator.d.ts.map +0 -1
- package/dist/i18n/translator.js +0 -1
- package/dist/i18n/types.d.ts +0 -47
- package/dist/i18n/types.d.ts.map +0 -1
- package/dist/i18n/types.js +0 -1
- package/dist/i18n/useTranslator.d.ts +0 -15
- package/dist/i18n/useTranslator.d.ts.map +0 -1
- package/dist/i18n/useTranslator.js +0 -39
- package/locales/en.json +0 -746
- package/locales/pseudo.json +0 -560
- package/src/Chat/useChatStreamScroll.test.tsx +0 -168
- package/src/PowerSearch/formatFilterValue.test.ts +0 -282
- package/src/PowerSearch/resolveOperatorLabel.ts +0 -34
- package/src/authoring/doc.ts +0 -166
- package/src/authoring/index.test.ts +0 -52
- package/src/authoring/index.ts +0 -50
- package/src/authoring/integration.ts +0 -42
- package/src/authoring/template.ts +0 -74
- package/src/config.test.ts +0 -16
- package/src/config.ts +0 -92
- package/src/docPropLiterals.test.ts +0 -938
- package/src/i18n/InternationalizationContext.ts +0 -39
- package/src/i18n/InternationalizationProvider.doc.mjs +0 -72
- package/src/i18n/InternationalizationProvider.tsx +0 -83
- package/src/i18n/__tests__/e2e-pagination.test.tsx +0 -172
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +0 -130
- package/src/i18n/__tests__/resolve.test.ts +0 -284
- package/src/i18n/index.ts +0 -32
- package/src/i18n/resolve.ts +0 -165
- package/src/i18n/translator.ts +0 -31
- package/src/i18n/types.ts +0 -53
- package/src/i18n/useTranslator.doc.mjs +0 -46
- package/src/i18n/useTranslator.ts +0 -50
|
@@ -22,7 +22,6 @@ import {spacingVars} from '../../../theme/tokens.stylex';
|
|
|
22
22
|
import {Pagination} from '../../../Pagination';
|
|
23
23
|
import type {PaginationProps} from '../../../Pagination';
|
|
24
24
|
import type {TablePlugin} from '../../types';
|
|
25
|
-
import {useTranslator} from '../../../i18n';
|
|
26
25
|
|
|
27
26
|
// =============================================================================
|
|
28
27
|
// Styles
|
|
@@ -194,7 +193,6 @@ export interface UseTablePaginationConfig {
|
|
|
194
193
|
export function useTablePagination<T extends Record<string, unknown>>(
|
|
195
194
|
config: UseTablePaginationConfig,
|
|
196
195
|
): TablePlugin<T> {
|
|
197
|
-
const t = useTranslator();
|
|
198
196
|
const {
|
|
199
197
|
page,
|
|
200
198
|
onPageChange,
|
|
@@ -208,9 +206,8 @@ export function useTablePagination<T extends Record<string, unknown>>(
|
|
|
208
206
|
size = 'md',
|
|
209
207
|
position = 'below',
|
|
210
208
|
align = 'center',
|
|
211
|
-
label
|
|
209
|
+
label = 'Table pagination',
|
|
212
210
|
} = config;
|
|
213
|
-
const label = labelFromProps ?? t('@astryx.table.pagination.label');
|
|
214
211
|
|
|
215
212
|
// Same guard as Pagination itself: 0/NaN/negative pageSize would produce an
|
|
216
213
|
// Infinity/NaN totalPages here, which bypasses Pagination's own coercion
|
|
@@ -17,7 +17,6 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
17
17
|
import {spacingVars, colorVars, radiusVars} from '../../../theme/tokens.stylex';
|
|
18
18
|
import {Icon} from '../../../Icon';
|
|
19
19
|
import {resolveContextActions} from '../../tableContextMenu';
|
|
20
|
-
import {useTranslator} from '../../../i18n';
|
|
21
20
|
import type {
|
|
22
21
|
TablePlugin,
|
|
23
22
|
TableColumn,
|
|
@@ -357,7 +356,6 @@ function ExpansionChevron({
|
|
|
357
356
|
export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
358
357
|
config: UseTableRowExpansionConfig<T>,
|
|
359
358
|
): TablePlugin<T> {
|
|
360
|
-
const t = useTranslator();
|
|
361
359
|
const {
|
|
362
360
|
expandedKeys,
|
|
363
361
|
onToggle,
|
|
@@ -399,7 +397,7 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
399
397
|
<ExpansionChevron
|
|
400
398
|
isExpanded={isExpanded}
|
|
401
399
|
onToggle={() => onToggle(key)}
|
|
402
|
-
ariaLabel={isExpanded ?
|
|
400
|
+
ariaLabel={isExpanded ? 'Collapse row' : 'Expand row'}
|
|
403
401
|
/>
|
|
404
402
|
);
|
|
405
403
|
},
|
|
@@ -411,7 +409,6 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
411
409
|
getChildren,
|
|
412
410
|
getIsItemExpandable,
|
|
413
411
|
getDepth,
|
|
414
|
-
t,
|
|
415
412
|
],
|
|
416
413
|
);
|
|
417
414
|
|
|
@@ -439,7 +436,10 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
439
436
|
? originalRenderCell(item)
|
|
440
437
|
: String(
|
|
441
438
|
((item as Record<string, unknown>)[col.key] as
|
|
442
|
-
|
|
439
|
+
| string
|
|
440
|
+
| number
|
|
441
|
+
| null
|
|
442
|
+
| undefined) ?? '',
|
|
443
443
|
);
|
|
444
444
|
|
|
445
445
|
if (depth === 0) {
|
|
@@ -457,7 +457,7 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
457
457
|
<ExpansionChevron
|
|
458
458
|
isExpanded={isExpanded}
|
|
459
459
|
onToggle={() => onToggle(key)}
|
|
460
|
-
ariaLabel={isExpanded ?
|
|
460
|
+
ariaLabel={isExpanded ? 'Collapse row' : 'Expand row'}
|
|
461
461
|
/>
|
|
462
462
|
) : (
|
|
463
463
|
<span {...stylex.props(expansionStyles.placeholder)} />
|
|
@@ -499,7 +499,7 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
499
499
|
{...stylex.props(expansionStyles.chevronButton)}
|
|
500
500
|
onClick={() => onToggleExpandAll(!allExpanded)}
|
|
501
501
|
aria-label={
|
|
502
|
-
allExpanded ?
|
|
502
|
+
allExpanded ? 'Collapse all rows' : 'Expand all rows'
|
|
503
503
|
}>
|
|
504
504
|
<span
|
|
505
505
|
{...stylex.props(
|
|
@@ -570,7 +570,7 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
570
570
|
...props.htmlProps,
|
|
571
571
|
onClick: () => onToggle(key),
|
|
572
572
|
},
|
|
573
|
-
|
|
573
|
+
styles: [...props.styles, expansionStyles.clickableRow],
|
|
574
574
|
};
|
|
575
575
|
},
|
|
576
576
|
}),
|
|
@@ -585,7 +585,6 @@ export function useTableRowExpansion<T extends Record<string, unknown>>(
|
|
|
585
585
|
isAllExpanded,
|
|
586
586
|
onToggleExpandAll,
|
|
587
587
|
expansionColumn,
|
|
588
|
-
t,
|
|
589
588
|
],
|
|
590
589
|
);
|
|
591
590
|
}
|
|
@@ -45,9 +45,12 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
45
45
|
import {colorVars} from '../../../theme/tokens.stylex';
|
|
46
46
|
import {CheckboxInput} from '../../../CheckboxInput';
|
|
47
47
|
import {mergeRefs} from '../../../utils';
|
|
48
|
-
import type {
|
|
48
|
+
import type {
|
|
49
|
+
TablePlugin,
|
|
50
|
+
TableColumn,
|
|
51
|
+
BodyRowRenderProps,
|
|
52
|
+
} from '../../types';
|
|
49
53
|
import {pixel} from '../../columnUtils';
|
|
50
|
-
import {useTranslator} from '../../../i18n';
|
|
51
54
|
|
|
52
55
|
// =============================================================================
|
|
53
56
|
// Config Type
|
|
@@ -178,7 +181,6 @@ function SelectAllCheckboxInner<T extends Record<string, unknown>>({
|
|
|
178
181
|
}: {
|
|
179
182
|
store: SelectionStore<T>;
|
|
180
183
|
}) {
|
|
181
|
-
const t = useTranslator();
|
|
182
184
|
const getSnapshot = useCallback(() => {
|
|
183
185
|
const config = store.getConfig();
|
|
184
186
|
const allSelected = config.getIsAllSelected();
|
|
@@ -195,7 +197,7 @@ function SelectAllCheckboxInner<T extends Record<string, unknown>>({
|
|
|
195
197
|
|
|
196
198
|
return (
|
|
197
199
|
<CheckboxInput
|
|
198
|
-
label=
|
|
200
|
+
label="Select all rows"
|
|
199
201
|
isLabelHidden
|
|
200
202
|
value={allSelected ? true : indeterminate ? 'indeterminate' : false}
|
|
201
203
|
onChange={() =>
|
|
@@ -230,7 +232,6 @@ function SelectionCellContentInner<T extends Record<string, unknown>>({
|
|
|
230
232
|
store: SelectionStore<T>;
|
|
231
233
|
item: T;
|
|
232
234
|
}) {
|
|
233
|
-
const t = useTranslator();
|
|
234
235
|
const config = store.getConfig();
|
|
235
236
|
const isSelected = useIsItemSelected(store, item);
|
|
236
237
|
const selectable = config.getIsItemSelectable?.(item) ?? true;
|
|
@@ -242,7 +243,7 @@ function SelectionCellContentInner<T extends Record<string, unknown>>({
|
|
|
242
243
|
|
|
243
244
|
return (
|
|
244
245
|
<CheckboxInput
|
|
245
|
-
label=
|
|
246
|
+
label="Select row"
|
|
246
247
|
isLabelHidden
|
|
247
248
|
value={isSelected}
|
|
248
249
|
onChange={() =>
|
|
@@ -18,7 +18,6 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
18
18
|
import {colorVars, spacingVars, radiusVars} from '../../../theme/tokens.stylex';
|
|
19
19
|
import {Icon} from '../../../Icon';
|
|
20
20
|
import {resolveContextActions} from '../../tableContextMenu';
|
|
21
|
-
import {useTranslator} from '../../../i18n';
|
|
22
21
|
import type {
|
|
23
22
|
TablePlugin,
|
|
24
23
|
HeaderCellRenderProps,
|
|
@@ -345,7 +344,6 @@ export function useTableSortable<
|
|
|
345
344
|
T extends Record<string, unknown>,
|
|
346
345
|
TSortKey extends string = string,
|
|
347
346
|
>(config: UseTableSortableConfig<TSortKey>): TablePlugin<T> {
|
|
348
|
-
const t = useTranslator();
|
|
349
347
|
const configRef = useRef(config);
|
|
350
348
|
configRef.current = config;
|
|
351
349
|
|
|
@@ -369,13 +367,12 @@ export function useTableSortable<
|
|
|
369
367
|
// checked/clear state always reflects the latest sort.
|
|
370
368
|
const getSortActions = (): TableContextAction[] => {
|
|
371
369
|
const c = configRef.current;
|
|
372
|
-
const dir =
|
|
373
|
-
c.sort.find(e => e.sortKey === sortKey)?.direction ?? null;
|
|
370
|
+
const dir = c.sort.find(e => e.sortKey === sortKey)?.direction ?? null;
|
|
374
371
|
const actions: TableContextAction[] = [
|
|
375
372
|
{
|
|
376
373
|
id: 'sort-asc',
|
|
377
374
|
group: 'sort',
|
|
378
|
-
label:
|
|
375
|
+
label: 'Sort ascending',
|
|
379
376
|
icon: <Icon icon="arrowUp" size="xsm" aria-hidden />,
|
|
380
377
|
checked: dir === 'ascending',
|
|
381
378
|
onSelect: () =>
|
|
@@ -386,7 +383,7 @@ export function useTableSortable<
|
|
|
386
383
|
{
|
|
387
384
|
id: 'sort-desc',
|
|
388
385
|
group: 'sort',
|
|
389
|
-
label:
|
|
386
|
+
label: 'Sort descending',
|
|
390
387
|
icon: <Icon icon="arrowDown" size="xsm" aria-hidden />,
|
|
391
388
|
checked: dir === 'descending',
|
|
392
389
|
onSelect: () =>
|
|
@@ -399,7 +396,7 @@ export function useTableSortable<
|
|
|
399
396
|
actions.push({
|
|
400
397
|
id: 'sort-clear',
|
|
401
398
|
group: 'sort-clear',
|
|
402
|
-
label:
|
|
399
|
+
label: 'Clear sort',
|
|
403
400
|
icon: <Icon icon="close" size="xsm" aria-hidden />,
|
|
404
401
|
onSelect: () =>
|
|
405
402
|
c.onSortChange(c.sort.filter(e => e.sortKey !== sortKey)),
|
|
@@ -433,6 +430,6 @@ export function useTableSortable<
|
|
|
433
430
|
};
|
|
434
431
|
},
|
|
435
432
|
}),
|
|
436
|
-
[
|
|
433
|
+
[],
|
|
437
434
|
);
|
|
438
435
|
}
|
|
@@ -337,8 +337,8 @@ export function useTableStickyColumns<T extends Record<string, unknown>>(
|
|
|
337
337
|
...props.htmlProps,
|
|
338
338
|
style: {...props.htmlProps.style, ...offsetStyle},
|
|
339
339
|
},
|
|
340
|
-
|
|
341
|
-
...props.
|
|
340
|
+
styles: [
|
|
341
|
+
...props.styles,
|
|
342
342
|
stickyStyles.cell,
|
|
343
343
|
stickyStyles.headerCell,
|
|
344
344
|
side.edge === 'start' ? shadowStyles.start : shadowStyles.end,
|
|
@@ -365,8 +365,8 @@ export function useTableStickyColumns<T extends Record<string, unknown>>(
|
|
|
365
365
|
...props.htmlProps,
|
|
366
366
|
style: {...props.htmlProps.style, ...offsetStyle},
|
|
367
367
|
},
|
|
368
|
-
|
|
369
|
-
...props.
|
|
368
|
+
styles: [
|
|
369
|
+
...props.styles,
|
|
370
370
|
stickyStyles.cell,
|
|
371
371
|
stickyStyles.bodyCell,
|
|
372
372
|
side.edge === 'start' ? shadowStyles.start : shadowStyles.end,
|
package/src/Table/types.ts
CHANGED
|
@@ -223,13 +223,13 @@ export interface TableColumn<T extends Record<string, unknown>> {
|
|
|
223
223
|
/** Props passed through the plugin pipeline for the `<table>` element */
|
|
224
224
|
export interface TableRenderProps {
|
|
225
225
|
htmlProps: HTMLAttributes<HTMLTableElement>;
|
|
226
|
-
|
|
226
|
+
styles: StyleXStyles[];
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
/** Props passed through the plugin pipeline for the header `<tr>` */
|
|
230
230
|
export interface HeaderRowRenderProps {
|
|
231
231
|
htmlProps: HTMLAttributes<HTMLTableRowElement>;
|
|
232
|
-
|
|
232
|
+
styles: StyleXStyles[];
|
|
233
233
|
children: ReactNode;
|
|
234
234
|
}
|
|
235
235
|
|
|
@@ -250,7 +250,7 @@ export interface HeaderRowRenderProps {
|
|
|
250
250
|
*/
|
|
251
251
|
export interface HeaderCellRenderProps {
|
|
252
252
|
htmlProps: ThHTMLAttributes<HTMLTableCellElement>;
|
|
253
|
-
|
|
253
|
+
styles: StyleXStyles[];
|
|
254
254
|
/** Content rendered before the header label. */
|
|
255
255
|
before?: ReactNode;
|
|
256
256
|
/** The header label content. Initialized from `column.header ?? column.key`. Plugins may wrap or replace. */
|
|
@@ -286,7 +286,7 @@ export interface HeaderCellRenderProps {
|
|
|
286
286
|
/** Props passed through the plugin pipeline for each body `<tr>` */
|
|
287
287
|
export interface BodyRowRenderProps {
|
|
288
288
|
htmlProps: HTMLAttributes<HTMLTableRowElement>;
|
|
289
|
-
|
|
289
|
+
styles: StyleXStyles[];
|
|
290
290
|
children: ReactNode;
|
|
291
291
|
/** Ref for the `<tr>` element. Plugins can set this to access the row DOM node. */
|
|
292
292
|
ref?: Ref<HTMLTableRowElement>;
|
|
@@ -295,7 +295,7 @@ export interface BodyRowRenderProps {
|
|
|
295
295
|
/** Props passed through the plugin pipeline for each body `<td>` */
|
|
296
296
|
export interface BodyCellRenderProps {
|
|
297
297
|
htmlProps: TdHTMLAttributes<HTMLTableCellElement>;
|
|
298
|
-
|
|
298
|
+
styles: StyleXStyles[];
|
|
299
299
|
/**
|
|
300
300
|
* Right-click context-menu actions for this body cell. Plugins append their
|
|
301
301
|
* actions in `transformBodyCell`; BaseTable concatenates the arrays across
|
|
@@ -341,7 +341,7 @@ export interface ScrollWrapperRenderProps {
|
|
|
341
341
|
htmlProps: HTMLAttributes<HTMLDivElement> & {
|
|
342
342
|
ref?: Ref<HTMLDivElement>;
|
|
343
343
|
};
|
|
344
|
-
|
|
344
|
+
styles: StyleXStyles[];
|
|
345
345
|
/** Content rendered before the `<table>`, inside the scroll container. */
|
|
346
346
|
beforeTable?: ReactNode;
|
|
347
347
|
/** Content rendered after the `<table>`, inside the scroll container. */
|
|
@@ -389,7 +389,8 @@ export interface TableContextAction {
|
|
|
389
389
|
* every render.
|
|
390
390
|
*/
|
|
391
391
|
export type TableContextActions =
|
|
392
|
-
|
|
392
|
+
| TableContextAction[]
|
|
393
|
+
| (() => TableContextAction[]);
|
|
393
394
|
|
|
394
395
|
// =============================================================================
|
|
395
396
|
// Plugin Interface
|
|
@@ -542,14 +543,7 @@ export interface BaseTableProps<
|
|
|
542
543
|
|
|
543
544
|
/** Children mode — render `<tr>`/`<td>` directly instead of data-driven */
|
|
544
545
|
children?: ReactNode;
|
|
545
|
-
/**
|
|
546
|
-
* Additional HTML attributes for the `<table>` element.
|
|
547
|
-
*
|
|
548
|
-
* @deprecated Pass `className`, `style`, `xstyle`, and other HTML
|
|
549
|
-
* attributes directly on the component instead — they now reach the root
|
|
550
|
-
* `<table>` and win over `tableProps` on conflicts. Migrate with
|
|
551
|
-
* `npx astryx upgrade --codemod migrate-table-tableprops-to-direct-props`.
|
|
552
|
-
*/
|
|
546
|
+
/** Additional HTML attributes for the `<table>` element */
|
|
553
547
|
tableProps?: HTMLAttributes<HTMLTableElement>;
|
|
554
548
|
/**
|
|
555
549
|
* Optional wrapper rendered around the `<table>` element, inside the
|
|
@@ -557,15 +551,15 @@ export interface BaseTableProps<
|
|
|
557
551
|
* horizontal scroll container so plugin chrome (pagination, toolbars)
|
|
558
552
|
* stays outside the scrollable area.
|
|
559
553
|
*
|
|
560
|
-
* Receives `htmlProps` (including an optional `ref`) and `
|
|
554
|
+
* Receives `htmlProps` (including an optional `ref`) and `styles` produced
|
|
561
555
|
* by the plugin `transformScrollWrapper` pipeline, plus `beforeTable`/`afterTable`
|
|
562
|
-
* chrome. The wrapper must spread `htmlProps` (and apply `
|
|
556
|
+
* chrome. The wrapper must spread `htmlProps` (and apply `styles`) onto its
|
|
563
557
|
* scroll-container element so plugins can attach refs / scroll listeners.
|
|
564
558
|
*/
|
|
565
559
|
scrollWrapper?: ComponentType<{
|
|
566
560
|
children: ReactNode;
|
|
567
561
|
htmlProps?: HTMLAttributes<HTMLDivElement> & {ref?: Ref<HTMLDivElement>};
|
|
568
|
-
|
|
562
|
+
styles?: StyleXStyles[];
|
|
569
563
|
beforeTable?: ReactNode;
|
|
570
564
|
afterTable?: ReactNode;
|
|
571
565
|
}>;
|
|
@@ -23,7 +23,7 @@ export const docs = {
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
name: 'variant',
|
|
26
|
-
type: "'popover' | 'inline'
|
|
26
|
+
type: "'popover' | 'inline'",
|
|
27
27
|
description: 'Display variant for filter controls.',
|
|
28
28
|
default: "'popover'",
|
|
29
29
|
},
|
|
@@ -50,7 +50,7 @@ export const docsZh = {
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
name: 'variant',
|
|
53
|
-
type: "'popover' | 'inline'
|
|
53
|
+
type: "'popover' | 'inline'",
|
|
54
54
|
description: '筛选控件的显示变体。',
|
|
55
55
|
default: "'popover'",
|
|
56
56
|
},
|
|
@@ -13,20 +13,20 @@ export const docs = {
|
|
|
13
13
|
props: [
|
|
14
14
|
{
|
|
15
15
|
name: 'sort',
|
|
16
|
-
type:
|
|
17
|
-
description:
|
|
16
|
+
type: 'TableSortState<TSortKey>',
|
|
17
|
+
description: 'Current sort state. Ordered array of {sortKey, direction} entries. First entry is the primary sort.',
|
|
18
18
|
required: true,
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
name: 'onSortChange',
|
|
22
|
-
type:
|
|
23
|
-
description: 'Called when the user clicks a header cell to change sort.
|
|
22
|
+
type: '(sort: TableSortState<TSortKey>) => void',
|
|
23
|
+
description: 'Called when the user clicks a header cell to change sort.',
|
|
24
24
|
required: true,
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
name: 'allowUnsortedState',
|
|
28
28
|
type: 'boolean',
|
|
29
|
-
description:
|
|
29
|
+
description: 'Allow cycling back to unsorted. When true: asc, desc, unsorted. When false: asc, desc, asc.',
|
|
30
30
|
default: 'false',
|
|
31
31
|
},
|
|
32
32
|
{
|
|
@@ -45,20 +45,20 @@ export const docsZh = {
|
|
|
45
45
|
props: [
|
|
46
46
|
{
|
|
47
47
|
name: 'sort',
|
|
48
|
-
type:
|
|
49
|
-
description:
|
|
48
|
+
type: 'TableSortState<TSortKey>',
|
|
49
|
+
description: '当前排序状态。{sortKey, direction} 条目的有序数组。第一个条目是主排序。',
|
|
50
50
|
required: true,
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
name: 'onSortChange',
|
|
54
|
-
type:
|
|
54
|
+
type: '(sort: TableSortState<TSortKey>) => void',
|
|
55
55
|
description: '用户点击表头单元格更改排序时调用。',
|
|
56
56
|
required: true,
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
name: 'allowUnsortedState',
|
|
60
60
|
type: 'boolean',
|
|
61
|
-
description:
|
|
61
|
+
description: '允许循环回到未排序状态。为 true 时:升序、降序、未排序。为 false 时:升序、降序、升序。',
|
|
62
62
|
default: 'false',
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -75,9 +75,9 @@ export const docsDense = {
|
|
|
75
75
|
displayName: 'useTableSortable',
|
|
76
76
|
description: 'Headless multi-sort plugin. Consumer owns sort state + callback. Shift+click for secondary sort. Sort indicators auto-render in header cells.',
|
|
77
77
|
propDescriptions: {
|
|
78
|
-
sort:
|
|
78
|
+
sort: 'Current sort state; ordered array of {sortKey, direction} entries.',
|
|
79
79
|
onSortChange: 'Called on header click to change sort.',
|
|
80
|
-
allowUnsortedState:
|
|
80
|
+
allowUnsortedState: 'Allow cycling to unsorted. true: asc>desc>unsorted. false: asc>desc>asc.',
|
|
81
81
|
isMultiSortEnabled: 'Enable multi-sort via Shift+click. Regular click replaces sort state.',
|
|
82
82
|
},
|
|
83
83
|
};
|
package/src/Text/Text.doc.mjs
CHANGED
|
@@ -23,8 +23,8 @@ export const docs = {
|
|
|
23
23
|
props: [
|
|
24
24
|
{
|
|
25
25
|
name: 'type',
|
|
26
|
-
type: "'body' | 'large' | 'label' | 'supporting' | 'code' | 'display-1' | 'display-2' | 'display-3'
|
|
27
|
-
description:
|
|
26
|
+
type: "'body' | 'large' | 'label' | 'supporting' | 'code' | 'display-1' | 'display-2' | 'display-3'",
|
|
27
|
+
description: 'Semantic text type. Determines size, weight, and line-height from the theme. Note: this prop is called `type`, not `variant`.',
|
|
28
28
|
default: "'body'",
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -123,7 +123,6 @@ import {useInputGroup} from '../InputGroup/InputGroupContext';
|
|
|
123
123
|
import type {BaseProps} from '../BaseProps';
|
|
124
124
|
import type {SizeValue} from '../utils/types';
|
|
125
125
|
import {themeProps} from '../utils/themeProps';
|
|
126
|
-
import {useTranslator} from '../i18n';
|
|
127
126
|
|
|
128
127
|
export type TextInputType = 'text' | 'password' | 'email';
|
|
129
128
|
|
|
@@ -299,7 +298,6 @@ export function TextInput({
|
|
|
299
298
|
ref,
|
|
300
299
|
...rest
|
|
301
300
|
}: TextInputProps) {
|
|
302
|
-
const t = useTranslator();
|
|
303
301
|
const size = useSize(sizeProp, 'md');
|
|
304
302
|
|
|
305
303
|
const id = useId();
|
|
@@ -450,7 +448,7 @@ export function TextInput({
|
|
|
450
448
|
<button
|
|
451
449
|
type="button"
|
|
452
450
|
onClick={handleClear}
|
|
453
|
-
aria-label={
|
|
451
|
+
aria-label={`Clear ${label}`}
|
|
454
452
|
{...stylex.props(styles.clearButton)}>
|
|
455
453
|
<Icon icon="close" size="sm" color="secondary" />
|
|
456
454
|
</button>
|
|
@@ -40,7 +40,6 @@ import {useImageMode} from '../hooks/useImageMode';
|
|
|
40
40
|
import type {BaseProps} from '../BaseProps';
|
|
41
41
|
import {mergeProps} from '../utils';
|
|
42
42
|
import {themeProps} from '../utils/themeProps';
|
|
43
|
-
import {useTranslator} from '../i18n';
|
|
44
43
|
|
|
45
44
|
/** Sample the region behind the remove button (20px button, 4px inset, in 64px container). */
|
|
46
45
|
const BUTTON_REGION = {x: 0.5, y: 0.06, width: 0.44, height: 0.44};
|
|
@@ -253,7 +252,6 @@ export function Thumbnail({
|
|
|
253
252
|
ref,
|
|
254
253
|
...props
|
|
255
254
|
}: ThumbnailProps) {
|
|
256
|
-
const t = useTranslator();
|
|
257
255
|
const imageMode = useImageMode(src, {region: BUTTON_REGION, fallback: null});
|
|
258
256
|
|
|
259
257
|
const hasSrc = src != null;
|
|
@@ -283,7 +281,7 @@ export function Thumbnail({
|
|
|
283
281
|
onRemove != null && !isDisabled ? (
|
|
284
282
|
<Button
|
|
285
283
|
icon={<Icon icon="close" size="xsm" />}
|
|
286
|
-
label={
|
|
284
|
+
label={`Remove ${accessibleName}`}
|
|
287
285
|
variant="secondary"
|
|
288
286
|
size="sm"
|
|
289
287
|
isIconOnly
|
|
@@ -317,7 +315,7 @@ export function Thumbnail({
|
|
|
317
315
|
<button
|
|
318
316
|
type="button"
|
|
319
317
|
onClick={onClick}
|
|
320
|
-
aria-label={
|
|
318
|
+
aria-label={`Open ${accessibleName}`}
|
|
321
319
|
{...stylex.props(styles.interactiveButton)}>
|
|
322
320
|
{imageContent}
|
|
323
321
|
</button>
|
|
@@ -225,7 +225,7 @@ export const docs = {
|
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
name: 'status',
|
|
228
|
-
type:
|
|
228
|
+
type: 'InputStatus',
|
|
229
229
|
description:
|
|
230
230
|
'Status indicator that colors the border and displays an icon. When a message is provided it is rendered below the input.',
|
|
231
231
|
},
|
|
@@ -368,7 +368,7 @@ export const docsZh = {
|
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
name: 'status',
|
|
371
|
-
type:
|
|
371
|
+
type: 'InputStatus',
|
|
372
372
|
description:
|
|
373
373
|
'为边框着色并显示图标的状态指示器。当提供消息时,消息渲染在输入框下方。',
|
|
374
374
|
},
|
|
@@ -69,7 +69,6 @@ import {useInputGroup} from '../InputGroup/InputGroupContext';
|
|
|
69
69
|
import {groupStyles} from '../InputGroup/groupStyles';
|
|
70
70
|
import {useTooltip} from '../Tooltip';
|
|
71
71
|
import {themeProps} from '../utils/themeProps';
|
|
72
|
-
import {useTranslator} from '../i18n';
|
|
73
72
|
|
|
74
73
|
const styles = stylex.create({
|
|
75
74
|
icon: {
|
|
@@ -342,7 +341,7 @@ export function TimeInput({
|
|
|
342
341
|
hasAutoFocus = false,
|
|
343
342
|
hourFormat = '12h',
|
|
344
343
|
increment = 1,
|
|
345
|
-
placeholder
|
|
344
|
+
placeholder = 'Select a time',
|
|
346
345
|
size: sizeProp,
|
|
347
346
|
status,
|
|
348
347
|
labelTooltip,
|
|
@@ -352,9 +351,6 @@ export function TimeInput({
|
|
|
352
351
|
style,
|
|
353
352
|
ref,
|
|
354
353
|
}: TimeInputProps) {
|
|
355
|
-
const t = useTranslator();
|
|
356
|
-
const placeholder =
|
|
357
|
-
placeholderFromProps ?? t('@astryx.timeInput.placeholder');
|
|
358
354
|
const size = useSize(sizeProp, 'md');
|
|
359
355
|
|
|
360
356
|
const id = useId();
|
|
@@ -663,7 +659,7 @@ export function TimeInput({
|
|
|
663
659
|
<button
|
|
664
660
|
type="button"
|
|
665
661
|
onClick={handleClear}
|
|
666
|
-
aria-label={
|
|
662
|
+
aria-label={`Clear ${label}`}
|
|
667
663
|
{...stylex.props(styles.clearButton)}>
|
|
668
664
|
<Icon icon="close" size="sm" color="secondary" />
|
|
669
665
|
</button>
|
|
@@ -61,24 +61,24 @@ export const docs = {
|
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
name: 'type',
|
|
64
|
-
type:
|
|
64
|
+
type: 'TextType',
|
|
65
65
|
description: 'Semantic text type from Text. Determines size, weight, and line-height.',
|
|
66
66
|
default: "'supporting'",
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
name: 'size',
|
|
70
|
-
type:
|
|
70
|
+
type: 'TextSize',
|
|
71
71
|
description: 'Explicit font size override. Overrides the size from type.',
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
name: 'color',
|
|
75
|
-
type:
|
|
75
|
+
type: 'TextColor',
|
|
76
76
|
description: 'Text color.',
|
|
77
77
|
default: "'secondary'",
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
name: 'weight',
|
|
81
|
-
type:
|
|
81
|
+
type: 'TextWeight',
|
|
82
82
|
description: 'Font weight override.',
|
|
83
83
|
},
|
|
84
84
|
],
|
package/src/Toast/Toast.tsx
CHANGED
|
@@ -22,7 +22,6 @@ import {useTheme} from '../theme';
|
|
|
22
22
|
import {MediaTheme} from '../theme/MediaTheme';
|
|
23
23
|
import type {ToastType, ToastDismissReason} from './types';
|
|
24
24
|
import {themeProps} from '../utils/themeProps';
|
|
25
|
-
import {useTranslator} from '../i18n';
|
|
26
25
|
|
|
27
26
|
const styles = stylex.create({
|
|
28
27
|
root: {
|
|
@@ -116,7 +115,6 @@ export function Toast({
|
|
|
116
115
|
isExiting = false,
|
|
117
116
|
onDismiss,
|
|
118
117
|
}: ToastProps) {
|
|
119
|
-
const t = useTranslator();
|
|
120
118
|
const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
121
119
|
const isPausedRef = useRef(false);
|
|
122
120
|
const remainingRef = useRef(autoHideDuration);
|
|
@@ -228,7 +226,7 @@ export function Toast({
|
|
|
228
226
|
variant="ghost"
|
|
229
227
|
size="sm"
|
|
230
228
|
icon={<Icon icon="close" size="sm" color="inherit" />}
|
|
231
|
-
label=
|
|
229
|
+
label="Dismiss notification"
|
|
232
230
|
onClick={handleDismiss}
|
|
233
231
|
isIconOnly
|
|
234
232
|
/>
|
|
@@ -17,7 +17,6 @@ import {INTERACTIVE_SELECTORS} from '../hooks/useClickableContainer';
|
|
|
17
17
|
import {Toast} from './Toast';
|
|
18
18
|
import {ToastContext, type ToastContextValue} from './ToastContext';
|
|
19
19
|
import type {ToastEntry, ToastPosition, ToastDismissReason} from './types';
|
|
20
|
-
import {useTranslator} from '../i18n';
|
|
21
20
|
|
|
22
21
|
const styles = stylex.create({
|
|
23
22
|
viewport: {
|
|
@@ -108,7 +107,6 @@ export function ToastViewport({
|
|
|
108
107
|
isTopLayer = true,
|
|
109
108
|
children,
|
|
110
109
|
}: ToastViewportProps) {
|
|
111
|
-
const t = useTranslator();
|
|
112
110
|
const [toasts, setToasts] = useState<ToastEntry[]>([]);
|
|
113
111
|
const [exitingIds, setExitingIds] = useState<Set<string>>(new Set());
|
|
114
112
|
const toastsRef = useRef(toasts);
|
|
@@ -365,7 +363,7 @@ export function ToastViewport({
|
|
|
365
363
|
<div
|
|
366
364
|
ref={viewportRef}
|
|
367
365
|
role="region"
|
|
368
|
-
aria-label=
|
|
366
|
+
aria-label="Notifications"
|
|
369
367
|
tabIndex={-1}
|
|
370
368
|
// popover="manual" promotes to the top layer (above dialogs).
|
|
371
369
|
// Omitted inside dialogs where the viewport is already in a top layer.
|
package/src/Token/Token.tsx
CHANGED
|
@@ -34,7 +34,6 @@ import {useLinkComponent} from '../Link/useLinkComponent';
|
|
|
34
34
|
import {useInteractiveRole} from '../hooks/useInteractiveRole';
|
|
35
35
|
import type {BaseProps} from '../BaseProps';
|
|
36
36
|
import {themeProps} from '../utils/themeProps';
|
|
37
|
-
import {useTranslator} from '../i18n';
|
|
38
37
|
|
|
39
38
|
// =============================================================================
|
|
40
39
|
// Types
|
|
@@ -325,7 +324,6 @@ export function Token({
|
|
|
325
324
|
'data-testid': testId,
|
|
326
325
|
ref,
|
|
327
326
|
}: TokenProps) {
|
|
328
|
-
const t = useTranslator();
|
|
329
327
|
const LinkComponent = useLinkComponent();
|
|
330
328
|
const role = useInteractiveRole({href, onClick, isDisabled});
|
|
331
329
|
|
|
@@ -344,7 +342,7 @@ export function Token({
|
|
|
344
342
|
{onRemove != null && (
|
|
345
343
|
<button
|
|
346
344
|
type="button"
|
|
347
|
-
aria-label={
|
|
345
|
+
aria-label={`Remove ${label}`}
|
|
348
346
|
onClick={e => {
|
|
349
347
|
e.stopPropagation();
|
|
350
348
|
onRemove(e);
|
|
@@ -434,7 +432,7 @@ export function Token({
|
|
|
434
432
|
{onRemove != null && (
|
|
435
433
|
<button
|
|
436
434
|
type="button"
|
|
437
|
-
aria-label={
|
|
435
|
+
aria-label={`Remove ${label}`}
|
|
438
436
|
onClick={e => {
|
|
439
437
|
e.stopPropagation();
|
|
440
438
|
onRemove(e);
|