@astryxdesign/core 0.1.6-canary.1a0fef5 → 0.1.6-canary.1b61ba6
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 +2 -0
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +4 -1
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +3 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +4 -1
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +8 -6
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +4 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +34 -4
- package/dist/ButtonGroup/ButtonGroup.d.ts +20 -5
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +27 -11
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +8 -5
- package/dist/Carousel/Carousel.d.ts +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +8 -5
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -1
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +9 -2
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +6 -2
- package/dist/Chat/ChatLayout.d.ts +1 -11
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +6 -4
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +4 -2
- package/dist/Chat/ChatMessage.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +8 -2
- package/dist/Chat/ChatMessageBubble.d.ts +1 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +3 -1
- package/dist/Chat/ChatMessageList.d.ts +1 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +3 -1
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +13 -8
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +3 -1
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.d.ts +12 -1
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +43 -6
- 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 +4 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +4 -2
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +3 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +3 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +10 -2
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +71 -53
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +8 -3
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +4 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +4 -1
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +4 -1
- package/dist/DateInput/DateInput.d.ts +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +10 -5
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +11 -6
- package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +15 -7
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +15 -12
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +7 -3
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +11 -5
- package/dist/EmptyState/EmptyState.d.ts +4 -1
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +11 -1
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +6 -4
- package/dist/Link/Link.d.ts +5 -1
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +32 -1
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +10 -8
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +4 -2
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +4 -1
- package/dist/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +4 -1
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +13 -6
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +5 -1
- package/dist/Outline/Outline.d.ts +1 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -1
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +38 -11
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +4 -1
- package/dist/PowerSearch/PowerSearch.d.ts +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +22 -12
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +26 -20
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +7 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +34 -21
- 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/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +4 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +11 -5
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +4 -2
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +3 -1
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +5 -3
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +7 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +4 -2
- package/dist/TabList/TabList.d.ts +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +4 -1
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +29 -16
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +5 -3
- 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 +56 -19
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +12 -5
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +6 -3
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +8 -6
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +1 -1
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +5 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +6 -4
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -2
- package/dist/Table/types.d.ts +17 -10
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +5 -1
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +8 -2
- package/dist/TimeInput/TimeInput.d.ts +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +7 -2
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +18 -3
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +3 -1
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +3 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +8 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +3 -1
- package/dist/TopNav/TopNav.d.ts +2 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +4 -1
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +5 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +5 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +7 -1
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +8 -4
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +3 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -0
- package/dist/astryx.css +20 -2
- package/dist/astryx.umd.js +62 -60
- 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/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/locales/en.json +746 -0
- package/locales/pseudo.json +560 -0
- package/package.json +23 -2
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -0
- package/src/AlertDialog/AlertDialog.tsx +4 -1
- 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.test.tsx +127 -2
- 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/index.ts +1 -0
- package/src/Chat/useChatStreamScroll.test.tsx +168 -0
- package/src/Chat/useChatStreamScroll.ts +67 -11
- 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/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 +1 -1
- 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/Dialog.tsx +11 -15
- package/src/Dialog/DialogHeader.tsx +7 -3
- 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.test.tsx +40 -1
- package/src/FileInput/FileInput.tsx +12 -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/Link/Link.test.tsx +74 -2
- package/src/Link/Link.tsx +48 -1
- 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/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 +36 -19
- package/src/Table/Table.test.tsx +132 -1
- package/src/Table/Table.tsx +6 -4
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +1 -1
- package/src/Table/plugins/filtering/useTableFiltering.tsx +31 -30
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +7 -5
- package/src/Table/plugins/pagination/useTablePagination.tsx +4 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +9 -8
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -1
- package/src/Table/plugins/selection/useTableSelection.tsx +6 -7
- package/src/Table/plugins/sortable/useTableSortable.tsx +8 -5
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +4 -4
- package/src/Table/types.ts +18 -12
- package/src/Table/useTableFiltering.doc.mjs +2 -2
- package/src/Table/useTableGroupedRows.doc.mjs +3 -3
- 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 -0
- 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 +938 -0
- 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
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Core UI components, theme system, and utilities for the Astryx design system. For project setup, see [Quick Start](#quick-start) below.
|
|
4
4
|
|
|
5
|
+
> **Building with an AI agent?** Run **`npx astryx init`** first. It installs the Astryx CLI's component index into your `AGENTS.md`/`CLAUDE.md` so your agent discovers components, templates, and design tokens instead of guessing. Without it, agents can't see the CLI — see [XDS CLI](#xds-cli).
|
|
6
|
+
|
|
5
7
|
## Component Docs
|
|
6
8
|
|
|
7
9
|
Look up any component's full API (props, types, best practices, and theming):
|
|
@@ -89,7 +89,7 @@ export interface AlertDialogProps extends BaseProps<HTMLDialogElement> {
|
|
|
89
89
|
* />
|
|
90
90
|
* ```
|
|
91
91
|
*/
|
|
92
|
-
export declare function AlertDialog({ ref, isOpen, isInline, onOpenChange, title, description, cancelLabel, actionLabel, actionVariant, isActionLoading, onAction, width, xstyle, className, style, 'data-testid': testId, ...rest }: AlertDialogProps): React.JSX.Element;
|
|
92
|
+
export declare function AlertDialog({ ref, isOpen, isInline, onOpenChange, title, description, cancelLabel: cancelLabelFromProps, actionLabel, actionVariant, isActionLoading, onAction, width, xstyle, className, style, 'data-testid': testId, ...rest }: AlertDialogProps): React.JSX.Element;
|
|
93
93
|
export declare namespace AlertDialog {
|
|
94
94
|
var displayName: string;
|
|
95
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../src/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAA2B,MAAM,OAAO,CAAC;AAQhD,OAAO,EAAS,KAAK,aAAa,EAAC,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../src/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAA2B,MAAM,OAAO,CAAC;AAQhD,OAAO,EAAS,KAAK,aAAa,EAAC,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACpE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IAE3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IAExB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,WAAW,EACX,WAAW,EAAE,oBAAoB,EACjC,WAAW,EACX,aAA6B,EAC7B,eAAe,EACf,QAAQ,EACR,KAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAwDlB;yBA1Ee,WAAW"}
|
|
@@ -26,6 +26,7 @@ import { Text } from "../Text/Text.js";
|
|
|
26
26
|
import { Button } from "../Button/index.js";
|
|
27
27
|
import { mergeProps } from "../utils/index.js";
|
|
28
28
|
import { themeProps } from "../utils/themeProps.js";
|
|
29
|
+
import { useTranslator } from "../i18n/index.js";
|
|
29
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
31
|
/**
|
|
31
32
|
* A confirmation dialog for destructive or irreversible actions.
|
|
@@ -53,7 +54,7 @@ export function AlertDialog({
|
|
|
53
54
|
onOpenChange,
|
|
54
55
|
title,
|
|
55
56
|
description,
|
|
56
|
-
cancelLabel
|
|
57
|
+
cancelLabel: cancelLabelFromProps,
|
|
57
58
|
actionLabel,
|
|
58
59
|
actionVariant = 'destructive',
|
|
59
60
|
isActionLoading,
|
|
@@ -65,6 +66,8 @@ export function AlertDialog({
|
|
|
65
66
|
'data-testid': testId,
|
|
66
67
|
...rest
|
|
67
68
|
}) {
|
|
69
|
+
const t = useTranslator();
|
|
70
|
+
const cancelLabel = cancelLabelFromProps ?? t('@astryx.alertDialog.cancel');
|
|
68
71
|
const titleId = useId();
|
|
69
72
|
const descriptionId = useId();
|
|
70
73
|
const handleCancel = useCallback(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,E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M,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,eAAe,GAAG,SAAS,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAkKD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAoB,EACpB,MAAM,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBAiXf;yBAhYe,QAAQ"}
|
|
@@ -37,6 +37,7 @@ import { mergeProps, mergeRefs, isRenderable } from "../utils/index.js";
|
|
|
37
37
|
import { useMediaQuery } from "../hooks/useMediaQuery.js";
|
|
38
38
|
import { observeResize, unobserveResize } from "../utils/sharedResizeObserver.js";
|
|
39
39
|
import { themeProps } from "../utils/themeProps.js";
|
|
40
|
+
import { useTranslator } from "../i18n/index.js";
|
|
40
41
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
41
42
|
const HasActivity = typeof React.Activity !== 'undefined';
|
|
42
43
|
const ActivityWrapper = HasActivity ? ({
|
|
@@ -221,6 +222,7 @@ export function AppShell({
|
|
|
221
222
|
ref,
|
|
222
223
|
...rest
|
|
223
224
|
}) {
|
|
225
|
+
const t = useTranslator();
|
|
224
226
|
// =========================================================================
|
|
225
227
|
// Parse mobileNav prop — normalize to config, custom element, or disabled
|
|
226
228
|
// =========================================================================
|
|
@@ -436,7 +438,7 @@ export function AppShell({
|
|
|
436
438
|
className: "x78zum5 x6s0dn4 x1k15mir xf314gf"
|
|
437
439
|
},
|
|
438
440
|
role: "navigation",
|
|
439
|
-
"aria-label":
|
|
441
|
+
"aria-label": t('@astryx.appShell.mobileNavigation'),
|
|
440
442
|
children: [/*#__PURE__*/_jsx(SideNavRenderContext, {
|
|
441
443
|
value: "topbar",
|
|
442
444
|
children: sideNav
|
|
@@ -53,7 +53,7 @@ export interface AvatarGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
53
53
|
* </AvatarGroup>
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
export declare function AvatarGroup({ children, size, 'data-testid': testId, 'aria-label':
|
|
56
|
+
export declare function AvatarGroup({ children, size, 'data-testid': testId, 'aria-label': ariaLabelFromProps, xstyle, className, style, ref, ...props }: AvatarGroupProps): ReactNode;
|
|
57
57
|
export declare namespace AvatarGroup {
|
|
58
58
|
var displayName: string;
|
|
59
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAc,KAAK,UAAU,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAc,KAAK,UAAU,EAAC,MAAM,WAAW,CAAC;AASvD,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACjE,yCAAyC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AASD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAc,EACd,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CA6B9B;yBAvCe,WAAW"}
|
|
@@ -23,6 +23,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
23
23
|
import { mergeProps } from "../utils/index.js";
|
|
24
24
|
import { AvatarGroupContext } from "./AvatarGroupContext.js";
|
|
25
25
|
import { themeProps } from "../utils/themeProps.js";
|
|
26
|
+
import { useTranslator } from "../i18n/index.js";
|
|
26
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
28
|
const OVERLAP_RATIO = 0.25;
|
|
28
29
|
const styles = {
|
|
@@ -55,13 +56,15 @@ export function AvatarGroup({
|
|
|
55
56
|
children,
|
|
56
57
|
size = 'small',
|
|
57
58
|
'data-testid': testId,
|
|
58
|
-
'aria-label':
|
|
59
|
+
'aria-label': ariaLabelFromProps,
|
|
59
60
|
xstyle,
|
|
60
61
|
className,
|
|
61
62
|
style,
|
|
62
63
|
ref,
|
|
63
64
|
...props
|
|
64
65
|
}) {
|
|
66
|
+
const t = useTranslator();
|
|
67
|
+
const ariaLabel = ariaLabelFromProps ?? t('@astryx.avatarGroup.label');
|
|
65
68
|
const numericSize = resolveSize(size);
|
|
66
69
|
const overlap = Math.round(numericSize * OVERLAP_RATIO);
|
|
67
70
|
const contextValue = useMemo(() => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/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AAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA8JD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAkB,EAClB,iBAAyB,EACzB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,WAAW,sCAkIb;yBAlJe,MAAM"}
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -39,6 +39,7 @@ import { colorVars, spacingVars, radiusVars, fontWeightVars, typeScaleVars, bord
|
|
|
39
39
|
import { mergeProps } from "../utils/index.js";
|
|
40
40
|
import { edgeCompSlot } from "../Layout/edgeCompensation.stylex.js";
|
|
41
41
|
import { themeProps } from "../utils/themeProps.js";
|
|
42
|
+
import { useTranslator } from "../i18n/index.js";
|
|
42
43
|
|
|
43
44
|
// =============================================================================
|
|
44
45
|
// Types
|
|
@@ -247,6 +248,7 @@ export function Banner({
|
|
|
247
248
|
ref,
|
|
248
249
|
...rest
|
|
249
250
|
}) {
|
|
251
|
+
const t = useTranslator();
|
|
250
252
|
const [isDismissed, setIsDismissed] = useState(false);
|
|
251
253
|
const [isExpanded, setIsExpanded] = useState(defaultIsExpanded);
|
|
252
254
|
// Links the expand/collapse toggle to the content region it shows/hides so
|
|
@@ -319,15 +321,15 @@ export function Banner({
|
|
|
319
321
|
children: [endContent, hasChildren && /*#__PURE__*/_jsx(Button, {
|
|
320
322
|
variant: "ghost",
|
|
321
323
|
size: "sm",
|
|
322
|
-
label: isExpanded ? '
|
|
323
|
-
tooltip: isExpanded ? '
|
|
324
|
+
label: isExpanded ? t('@astryx.banner.collapse') : t('@astryx.banner.expand'),
|
|
325
|
+
tooltip: isExpanded ? t('@astryx.banner.collapse') : t('@astryx.banner.expand'),
|
|
324
326
|
icon: /*#__PURE__*/_jsx("span", {
|
|
325
327
|
...{
|
|
326
328
|
0: {
|
|
327
|
-
className: "x3nfvp2 x11xpdln xuedmi6 xlr8y92"
|
|
329
|
+
className: "x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"
|
|
328
330
|
},
|
|
329
331
|
1: {
|
|
330
|
-
className: "x3nfvp2 x11xpdln xuedmi6 xlr8y92 x19jd1h0"
|
|
332
|
+
className: "x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"
|
|
331
333
|
}
|
|
332
334
|
}[!!isExpanded << 0],
|
|
333
335
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
@@ -343,8 +345,8 @@ export function Banner({
|
|
|
343
345
|
}), isDismissable && /*#__PURE__*/_jsx(Button, {
|
|
344
346
|
variant: "ghost",
|
|
345
347
|
size: "sm",
|
|
346
|
-
label:
|
|
347
|
-
tooltip:
|
|
348
|
+
label: t('@astryx.banner.dismiss'),
|
|
349
|
+
tooltip: t('@astryx.banner.dismiss'),
|
|
348
350
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
349
351
|
icon: "close",
|
|
350
352
|
size: "sm",
|
|
@@ -86,7 +86,7 @@ export interface BreadcrumbsProps extends BaseProps<HTMLElement> {
|
|
|
86
86
|
* </Breadcrumbs>
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
export declare function Breadcrumbs({ children, separator, variant, xstyle, className, style, label, ref, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
|
|
89
|
+
export declare function Breadcrumbs({ children, separator, variant, xstyle, className, style, label: labelFromProps, ref, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
|
|
90
90
|
export declare namespace Breadcrumbs {
|
|
91
91
|
var displayName: string;
|
|
92
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAyB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAyB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ5C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,qBAAqB,CAAC;AAM7D,8FAA8F;AAC9F,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,iDAG5B,CAAC;AAOH,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4BD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAe,EACf,OAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,KAAK,EAAE,cAAc,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAwBlB;yBAlCe,WAAW"}
|
|
@@ -21,6 +21,7 @@ import "../theme/tokens.stylex.js";
|
|
|
21
21
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
22
22
|
import { mergeProps } from "../utils/index.js";
|
|
23
23
|
import { themeProps } from "../utils/themeProps.js";
|
|
24
|
+
import { useTranslator } from "../i18n/index.js";
|
|
24
25
|
|
|
25
26
|
// =============================================================================
|
|
26
27
|
// Variant type
|
|
@@ -102,10 +103,12 @@ export function Breadcrumbs({
|
|
|
102
103
|
xstyle,
|
|
103
104
|
className,
|
|
104
105
|
style,
|
|
105
|
-
label
|
|
106
|
+
label: labelFromProps,
|
|
106
107
|
ref,
|
|
107
108
|
...rest
|
|
108
109
|
}) {
|
|
110
|
+
const t = useTranslator();
|
|
111
|
+
const label = labelFromProps ?? t('@astryx.breadcrumbs.label');
|
|
109
112
|
const ctxValue = useMemo(() => ({
|
|
110
113
|
variant,
|
|
111
114
|
separator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAqB3C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAyFrD,QAAA,MAAM,UAAU;;;;;;;;;;EAUd,CAAC;AAsGH;;;;;;;;;;;;GAY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B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAqJD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAqB,EACrB,IAAI,EAAE,QAAQ,EACd,IAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,eAAuB,EACvB,WAAW,EACX,IAAI,EACJ,UAAkB,EAClB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,SAAS,CAqOzB;yBA5Pe,MAAM"}
|
package/dist/Button/Button.js
CHANGED
|
@@ -228,12 +228,42 @@ const loadingStyles = {
|
|
|
228
228
|
$$css: true
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* "I am the last member of the group" — the trailing end cap.
|
|
234
|
+
*
|
|
235
|
+
* NOT `:last-child`: several members render an invisible layer element AFTER
|
|
236
|
+
* their button (a tooltip'd Button returns button + layer; DropdownMenu returns
|
|
237
|
+
* trigger + popover). `useLayer` renders those inline rather than portaling
|
|
238
|
+
* them, so the layer — not the button — took the `:last-child` slot and the real
|
|
239
|
+
* trailing button silently kept square corners (#2508).
|
|
240
|
+
*
|
|
241
|
+
* Layers always carry the native `popover` attribute (useLayer.tsx), and a
|
|
242
|
+
* popover is never an in-flow member — it is `display: none` until shown, then
|
|
243
|
+
* promoted to the top layer. So "last member" is: no following element sibling
|
|
244
|
+
* that isn't a popover.
|
|
245
|
+
*
|
|
246
|
+
* Reading it the other way round — marking the *buttons* and testing for a
|
|
247
|
+
* marked sibling — is the trap: it silently reclassifies anything it doesn't
|
|
248
|
+
* recognise as "not a member", so a member wrapped in a `display: contents`
|
|
249
|
+
* wrapper (Tooltip, HoverCard) or a raw child would make the button BEFORE it
|
|
250
|
+
* round mid-group. Ignoring known layers keeps the predicate conservative: an
|
|
251
|
+
* unrecognised sibling still counts, exactly as `:last-child` did, so the worst
|
|
252
|
+
* case degrades to the old behaviour instead of a wrong corner.
|
|
253
|
+
*
|
|
254
|
+
* Kept as a same-file const: StyleX only statically evaluates a selector key
|
|
255
|
+
* from a const in the same file.
|
|
256
|
+
*
|
|
257
|
+
* The leading edge still uses `:first-child` — a member's button always precedes
|
|
258
|
+
* its own layer, so the first button is genuinely `:first-child`.
|
|
259
|
+
*/
|
|
260
|
+
const IS_LAST_ITEM = ':not(:has(~ *:not([popover])))';
|
|
231
261
|
const groupStyles = {
|
|
232
262
|
horizontal: {
|
|
233
263
|
krdFHd: "x15mokao x8eehn2",
|
|
234
264
|
kVL7Gh: "xbiv7yw x1xrp5p4",
|
|
235
|
-
kfmiAY: "x1ga7v0g
|
|
236
|
-
kT0f0o: "x16uus16
|
|
265
|
+
kfmiAY: "x1ga7v0g xbfdvlp",
|
|
266
|
+
kT0f0o: "x16uus16 xajhecq",
|
|
237
267
|
k2ei4v: "xgbv0en x1pjv70x",
|
|
238
268
|
kVhnKS: "x1t7ytsu xyf0ibl",
|
|
239
269
|
kGJrpR: "x1j92z86",
|
|
@@ -242,8 +272,8 @@ const groupStyles = {
|
|
|
242
272
|
vertical: {
|
|
243
273
|
krdFHd: "x15mokao x8eehn2",
|
|
244
274
|
kfmiAY: "x1ga7v0g x2qxyot",
|
|
245
|
-
kVL7Gh: "xbiv7yw
|
|
246
|
-
kT0f0o: "x16uus16
|
|
275
|
+
kVL7Gh: "xbiv7yw x12tyzlf",
|
|
276
|
+
kT0f0o: "x16uus16 xajhecq",
|
|
247
277
|
kEafiO: "x11xkdxz x1g31smg",
|
|
248
278
|
kPef9Z: "x13fuv20 x1d9v4yf",
|
|
249
279
|
kLZC3w: "x1pc3f07",
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* @output Exports ButtonGroup component, context, and types
|
|
5
5
|
* @position Groups buttons with connected styling; consumed by index.ts
|
|
6
6
|
*
|
|
7
|
-
* Children (Button, IconButton) consume the ButtonGroup context to
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Children (Button, IconButton) consume the ButtonGroup context to apply
|
|
8
|
+
* position-aware styles in pure CSS — no cloneElement or wrapper divs needed.
|
|
9
|
+
* The end-cap radius rules live in Button.tsx; see IS_LAST_ITEM there for why
|
|
10
|
+
* the trailing edge cannot use :last-child (#2508).
|
|
10
11
|
*
|
|
11
12
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
13
|
* - /packages/core/src/ButtonGroup/ButtonGroup.doc.mjs (props table, features)
|
|
@@ -56,7 +57,10 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
56
57
|
* handling (only on outer edges), and horizontal or vertical orientation.
|
|
57
58
|
*
|
|
58
59
|
* Children automatically detect the group via context and apply position-aware
|
|
59
|
-
* styles
|
|
60
|
+
* styles in pure CSS.
|
|
61
|
+
*
|
|
62
|
+
* Members that render their own layer — a Button with a `tooltip`, or a
|
|
63
|
+
* DropdownMenu — compose correctly, including as the trailing member.
|
|
60
64
|
*
|
|
61
65
|
* @example
|
|
62
66
|
* ```
|
|
@@ -66,8 +70,19 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
66
70
|
* <Button label="Paste" />
|
|
67
71
|
* </ButtonGroup>
|
|
68
72
|
* ```
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```
|
|
76
|
+
* <ButtonGroup label="Approve action">
|
|
77
|
+
* <Button label="Allow once" variant="primary" />
|
|
78
|
+
* <DropdownMenu
|
|
79
|
+
* button={{label: 'Allow options', variant: 'primary', isIconOnly: true, icon: <Icon icon="chevronDown" />}}
|
|
80
|
+
* items={[{label: 'Allow for 30 minutes'}, {label: 'Always allow'}]}
|
|
81
|
+
* />
|
|
82
|
+
* </ButtonGroup>
|
|
83
|
+
* ```
|
|
69
84
|
*/
|
|
70
|
-
export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, xstyle, className, style, ref, 'data-testid': testId, ...props }: ButtonGroupProps): ReactNode;
|
|
85
|
+
export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, xstyle, className, style, ref, 'data-testid': testId, onKeyDown, ...props }: ButtonGroupProps): ReactNode;
|
|
71
86
|
export declare namespace ButtonGroup {
|
|
72
87
|
var displayName: string;
|
|
73
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAI1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,sBAAsB,CAAC;AAOjE,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACjE,yCAAyC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAC;IAErC;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,KAAK,EACL,WAA0B,EAC1B,IAAI,EAAE,QAAQ,EACd,UAAkB,EAClB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,aAAa,EAAE,MAAM,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CAuC9B;yBApDe,WAAW"}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @output Exports ButtonGroup component, context, and types
|
|
9
9
|
* @position Groups buttons with connected styling; consumed by index.ts
|
|
10
10
|
*
|
|
11
|
-
* Children (Button, IconButton) consume the ButtonGroup context to
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Children (Button, IconButton) consume the ButtonGroup context to apply
|
|
12
|
+
* position-aware styles in pure CSS — no cloneElement or wrapper divs needed.
|
|
13
|
+
* The end-cap radius rules live in Button.tsx; see IS_LAST_ITEM there for why
|
|
14
|
+
* the trailing edge cannot use :last-child (#2508).
|
|
14
15
|
*
|
|
15
16
|
* SYNC: When modified, update these files to stay in sync:
|
|
16
17
|
* - /packages/core/src/ButtonGroup/ButtonGroup.doc.mjs (props table, features)
|
|
@@ -23,7 +24,7 @@ import { useMemo } from 'react';
|
|
|
23
24
|
import * as stylex from '@stylexjs/stylex';
|
|
24
25
|
import { SizeProvider, useSize } from "../SizeContext/SizeContext.js";
|
|
25
26
|
import { useListFocus } from "../hooks/useListFocus.js";
|
|
26
|
-
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
27
|
+
import { mergeProps, mergeRefs, composeEventHandlers } from "../utils/index.js";
|
|
27
28
|
import { ButtonGroupContext } from "./ButtonGroupContext.js";
|
|
28
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
29
30
|
|
|
@@ -56,7 +57,10 @@ const styles = {
|
|
|
56
57
|
* handling (only on outer edges), and horizontal or vertical orientation.
|
|
57
58
|
*
|
|
58
59
|
* Children automatically detect the group via context and apply position-aware
|
|
59
|
-
* styles
|
|
60
|
+
* styles in pure CSS.
|
|
61
|
+
*
|
|
62
|
+
* Members that render their own layer — a Button with a `tooltip`, or a
|
|
63
|
+
* DropdownMenu — compose correctly, including as the trailing member.
|
|
60
64
|
*
|
|
61
65
|
* @example
|
|
62
66
|
* ```
|
|
@@ -66,6 +70,17 @@ const styles = {
|
|
|
66
70
|
* <Button label="Paste" />
|
|
67
71
|
* </ButtonGroup>
|
|
68
72
|
* ```
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```
|
|
76
|
+
* <ButtonGroup label="Approve action">
|
|
77
|
+
* <Button label="Allow once" variant="primary" />
|
|
78
|
+
* <DropdownMenu
|
|
79
|
+
* button={{label: 'Allow options', variant: 'primary', isIconOnly: true, icon: <Icon icon="chevronDown" />}}
|
|
80
|
+
* items={[{label: 'Allow for 30 minutes'}, {label: 'Always allow'}]}
|
|
81
|
+
* />
|
|
82
|
+
* </ButtonGroup>
|
|
83
|
+
* ```
|
|
69
84
|
*/
|
|
70
85
|
export function ButtonGroup({
|
|
71
86
|
children,
|
|
@@ -78,6 +93,7 @@ export function ButtonGroup({
|
|
|
78
93
|
style,
|
|
79
94
|
ref,
|
|
80
95
|
'data-testid': testId,
|
|
96
|
+
onKeyDown,
|
|
81
97
|
...props
|
|
82
98
|
}) {
|
|
83
99
|
const size = useSize(sizeProp, 'md');
|
|
@@ -98,16 +114,16 @@ export function ButtonGroup({
|
|
|
98
114
|
value: size,
|
|
99
115
|
children: /*#__PURE__*/_jsx("div", {
|
|
100
116
|
ref: mergeRefs(ref, listRef),
|
|
101
|
-
|
|
102
|
-
"aria-label": label,
|
|
103
|
-
onKeyDown: handleKeyDown,
|
|
104
|
-
"aria-disabled": isDisabled || undefined,
|
|
105
|
-
"data-testid": testId,
|
|
117
|
+
...props,
|
|
106
118
|
...mergeProps(themeProps('button-group', {
|
|
107
119
|
size,
|
|
108
120
|
orientation
|
|
109
121
|
}), stylex.props(styles.group, orientation === 'vertical' && styles.vertical, xstyle), className, style),
|
|
110
|
-
|
|
122
|
+
role: "group",
|
|
123
|
+
"aria-label": label,
|
|
124
|
+
onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown),
|
|
125
|
+
"aria-disabled": isDisabled || undefined,
|
|
126
|
+
"data-testid": testId,
|
|
111
127
|
children: children
|
|
112
128
|
})
|
|
113
129
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA8C5C,YAAY,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACV,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA8C5C,YAAY,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACV,MAAM,oBAAoB,CAAC;AAK5B,+CAA+C;AAE/C,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAID,UAAU,iBAAkB,SAAQ,IAAI,CACtC,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,GAAG,cAAc,CAC5B;IACC,kDAAkD;IAClD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,qDAAqD;IACrD,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAA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GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAMrE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAC,GAAG,EAAE,GAAG,KAAK,EAAC,EAAE,aAAa,+BA8StD;yBA9Se,QAAQ"}
|
|
@@ -24,7 +24,7 @@ import { useGridFocus } from "../hooks/index.js";
|
|
|
24
24
|
import { useCalendarDays, useCalendarConstraints } from "./hooks/index.js";
|
|
25
25
|
import { calendarStyles, monthGridStyles, dayCellStyles, dayCellTheme } from "./styles.js";
|
|
26
26
|
import { plainDateFromISO, plainDateToISO, plainDateToDate, plainDateToday, plainDateSetFirstOfMonth, plainDateAddMonths, plainDateAddDays, plainDateIsBefore, plainDateIsEqual, plainDateGetWeekNumber, plainDateFormat, DATE_FORMAT_WITH_WEEKDAY, DATE_FORMAT_MONTH_YEAR } from "../utils/plainDate.js";
|
|
27
|
-
import { mergeProps } from "../utils/index.js";
|
|
27
|
+
import { mergeProps, composeEventHandlers } from "../utils/index.js";
|
|
28
28
|
import { computeDayCellState, computeRangeRounding, computePreviewRounding, computeDayNeighborContinuity, isEndpoint } from "./dayCellUtils.js";
|
|
29
29
|
|
|
30
30
|
// =============================================================================
|
|
@@ -33,6 +33,7 @@ import { computeDayCellState, computeRangeRounding, computePreviewRounding, comp
|
|
|
33
33
|
|
|
34
34
|
import { normalizeDayOfWeek } from "../utils/dateTypes.js";
|
|
35
35
|
import { themeProps } from "../utils/themeProps.js";
|
|
36
|
+
import { useTranslator } from "../i18n/index.js";
|
|
36
37
|
|
|
37
38
|
/** Imperative handle for Calendar handleRef */
|
|
38
39
|
|
|
@@ -56,6 +57,7 @@ export function Calendar({
|
|
|
56
57
|
ref,
|
|
57
58
|
...props
|
|
58
59
|
}) {
|
|
60
|
+
const t = useTranslator();
|
|
59
61
|
const {
|
|
60
62
|
handleRef,
|
|
61
63
|
mode = 'single',
|
|
@@ -75,6 +77,7 @@ export function Calendar({
|
|
|
75
77
|
xstyle,
|
|
76
78
|
className,
|
|
77
79
|
style,
|
|
80
|
+
onKeyDown,
|
|
78
81
|
...rest
|
|
79
82
|
} = props;
|
|
80
83
|
|
|
@@ -241,15 +244,15 @@ export function Calendar({
|
|
|
241
244
|
}, [mode, onChange, rangeSelectionStart]);
|
|
242
245
|
return /*#__PURE__*/_jsxs("div", {
|
|
243
246
|
ref: ref,
|
|
247
|
+
...rest,
|
|
244
248
|
...mergeProps(themeProps('calendar', {
|
|
245
249
|
mode
|
|
246
250
|
}), stylex.props(calendarStyles.calendar, xstyle), className, style),
|
|
247
|
-
onKeyDown: handleCalendarKeyDown,
|
|
248
|
-
...rest,
|
|
251
|
+
onKeyDown: composeEventHandlers(onKeyDown, handleCalendarKeyDown),
|
|
249
252
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
250
253
|
...stylex.props(calendarStyles.header),
|
|
251
254
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
252
|
-
label:
|
|
255
|
+
label: t('@astryx.calendar.previousMonth'),
|
|
253
256
|
variant: "ghost",
|
|
254
257
|
icon:
|
|
255
258
|
/*#__PURE__*/
|
|
@@ -271,7 +274,7 @@ export function Calendar({
|
|
|
271
274
|
...stylex.props(calendarStyles.monthYearLabel),
|
|
272
275
|
children: monthYearLabel
|
|
273
276
|
}), /*#__PURE__*/_jsx(Button, {
|
|
274
|
-
label:
|
|
277
|
+
label: t('@astryx.calendar.nextMonth'),
|
|
275
278
|
variant: "ghost",
|
|
276
279
|
icon: /*#__PURE__*/_jsx("span", {
|
|
277
280
|
...stylex.props(calendarStyles.navIcon),
|
|
@@ -75,7 +75,7 @@ export interface CarouselProps extends BaseProps<HTMLDivElement> {
|
|
|
75
75
|
* </Carousel>
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
-
export declare function Carousel({ ref, children, gap, hasButtons, hasEdgeFade, hasSnap, padding, 'aria-label':
|
|
78
|
+
export declare function Carousel({ ref, children, gap, hasButtons, hasEdgeFade, hasSnap, padding, 'aria-label': ariaLabelFromProps, xstyle, className, style, 'data-testid': testId, ...htmlProps }: CarouselProps): import("react").JSX.Element;
|
|
79
79
|
export declare namespace Carousel {
|
|
80
80
|
var displayName: string;
|
|
81
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAC,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAc/E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAC,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAC;AAc/E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAyJD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,QAAQ,EACR,GAAO,EACP,UAAiB,EACjB,WAAkB,EAClB,OAAe,EACf,OAAO,EACP,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,aAAa,+BAmJf;yBAjKe,QAAQ"}
|
|
@@ -25,6 +25,7 @@ import { useLayer } from "../Layer/index.js";
|
|
|
25
25
|
import { useScrollOverflow } from "../hooks/useScrollOverflow.js";
|
|
26
26
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
27
27
|
import { themeProps } from "../utils/themeProps.js";
|
|
28
|
+
import { useTranslator } from "../i18n/index.js";
|
|
28
29
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
30
|
// =============================================================================
|
|
30
31
|
// Styles
|
|
@@ -203,13 +204,15 @@ export function Carousel({
|
|
|
203
204
|
hasEdgeFade = true,
|
|
204
205
|
hasSnap = false,
|
|
205
206
|
padding,
|
|
206
|
-
'aria-label':
|
|
207
|
+
'aria-label': ariaLabelFromProps,
|
|
207
208
|
xstyle,
|
|
208
209
|
className,
|
|
209
210
|
style,
|
|
210
211
|
'data-testid': testId,
|
|
211
212
|
...htmlProps
|
|
212
213
|
}) {
|
|
214
|
+
const t = useTranslator();
|
|
215
|
+
const ariaLabel = ariaLabelFromProps ?? t('@astryx.carousel.label');
|
|
213
216
|
const scrollElRef = useRef(null);
|
|
214
217
|
const {
|
|
215
218
|
scrollRef,
|
|
@@ -260,11 +263,11 @@ export function Carousel({
|
|
|
260
263
|
return /*#__PURE__*/_jsxs("div", {
|
|
261
264
|
ref: mergeRefs(ref, layer.ref),
|
|
262
265
|
"data-testid": testId,
|
|
266
|
+
...htmlProps,
|
|
267
|
+
...mergeProps(themeProps('carousel'), stylex.props(styles.root, xstyle), className, style),
|
|
263
268
|
role: "region",
|
|
264
269
|
"aria-label": ariaLabel,
|
|
265
270
|
"aria-roledescription": "carousel",
|
|
266
|
-
...mergeProps(themeProps('carousel'), stylex.props(styles.root, xstyle), className, style),
|
|
267
|
-
...htmlProps,
|
|
268
271
|
children: [/*#__PURE__*/_jsx("div", {
|
|
269
272
|
ref: composedRef,
|
|
270
273
|
tabIndex: 0,
|
|
@@ -290,7 +293,7 @@ export function Carousel({
|
|
|
290
293
|
icon: "chevronLeft",
|
|
291
294
|
size: "xsm"
|
|
292
295
|
}),
|
|
293
|
-
label:
|
|
296
|
+
label: t('@astryx.carousel.scrollLeft'),
|
|
294
297
|
variant: "ghost",
|
|
295
298
|
size: "sm",
|
|
296
299
|
isIconOnly: true
|
|
@@ -317,7 +320,7 @@ export function Carousel({
|
|
|
317
320
|
icon: "chevronRight",
|
|
318
321
|
size: "xsm"
|
|
319
322
|
}),
|
|
320
|
-
label:
|
|
323
|
+
label: t('@astryx.carousel.scrollRight'),
|
|
321
324
|
variant: "ghost",
|
|
322
325
|
size: "sm",
|
|
323
326
|
isIconOnly: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatComposer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,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,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oDAAoD;IACpD,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CACnC;AAwJD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAiKpD;yBAjKe,YAAY"}
|
|
@@ -32,6 +32,7 @@ import { ChatComposerInput } from "./ChatComposerInput.js";
|
|
|
32
32
|
import { ChatComposerContext } from "./ChatContext.js";
|
|
33
33
|
import { ChatSendButton } from "./ChatSendButton.js";
|
|
34
34
|
import { themeProps } from "../utils/themeProps.js";
|
|
35
|
+
import { useTranslator } from "../i18n/index.js";
|
|
35
36
|
|
|
36
37
|
// =============================================================================
|
|
37
38
|
// Types
|
|
@@ -81,6 +82,7 @@ const styles = {
|
|
|
81
82
|
* ```
|
|
82
83
|
*/
|
|
83
84
|
export function ChatComposer(props) {
|
|
85
|
+
const t = useTranslator();
|
|
84
86
|
const {
|
|
85
87
|
ref,
|
|
86
88
|
onSubmit,
|
|
@@ -88,7 +90,7 @@ export function ChatComposer(props) {
|
|
|
88
90
|
isStopShown = false,
|
|
89
91
|
value: controlledValue,
|
|
90
92
|
onChange,
|
|
91
|
-
placeholder
|
|
93
|
+
placeholder: placeholderFromProps,
|
|
92
94
|
isDisabled = false,
|
|
93
95
|
density = 'balanced',
|
|
94
96
|
drawer,
|
|
@@ -105,6 +107,7 @@ export function ChatComposer(props) {
|
|
|
105
107
|
style,
|
|
106
108
|
...rest
|
|
107
109
|
} = props;
|
|
110
|
+
const placeholder = placeholderFromProps ?? t('@astryx.chat.composer.placeholder');
|
|
108
111
|
const [internalValue, setInternalValue] = useState('');
|
|
109
112
|
const isControlled = controlledValue !== undefined;
|
|
110
113
|
const currentValue = isControlled ? controlledValue : internalValue;
|