@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
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
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
|
-
|
|
7
5
|
## Component Docs
|
|
8
6
|
|
|
9
7
|
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
|
|
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;
|
|
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,CA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AM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,gBAAgB,qBAsDlB;yBAxEe,WAAW"}
|
|
@@ -26,7 +26,6 @@ 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";
|
|
30
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
30
|
/**
|
|
32
31
|
* A confirmation dialog for destructive or irreversible actions.
|
|
@@ -54,7 +53,7 @@ export function AlertDialog({
|
|
|
54
53
|
onOpenChange,
|
|
55
54
|
title,
|
|
56
55
|
description,
|
|
57
|
-
cancelLabel
|
|
56
|
+
cancelLabel = 'Cancel',
|
|
58
57
|
actionLabel,
|
|
59
58
|
actionVariant = 'destructive',
|
|
60
59
|
isActionLoading,
|
|
@@ -66,8 +65,6 @@ export function AlertDialog({
|
|
|
66
65
|
'data-testid': testId,
|
|
67
66
|
...rest
|
|
68
67
|
}) {
|
|
69
|
-
const t = useTranslator();
|
|
70
|
-
const cancelLabel = cancelLabelFromProps ?? t('@astryx.alertDialog.cancel');
|
|
71
68
|
const titleId = useId();
|
|
72
69
|
const descriptionId = useId();
|
|
73
70
|
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
|
+
{"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AAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,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,qBAgXf;yBA/Xe,QAAQ"}
|
|
@@ -37,7 +37,6 @@ 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";
|
|
41
40
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
42
41
|
const HasActivity = typeof React.Activity !== 'undefined';
|
|
43
42
|
const ActivityWrapper = HasActivity ? ({
|
|
@@ -222,7 +221,6 @@ export function AppShell({
|
|
|
222
221
|
ref,
|
|
223
222
|
...rest
|
|
224
223
|
}) {
|
|
225
|
-
const t = useTranslator();
|
|
226
224
|
// =========================================================================
|
|
227
225
|
// Parse mobileNav prop — normalize to config, custom element, or disabled
|
|
228
226
|
// =========================================================================
|
|
@@ -438,7 +436,7 @@ export function AppShell({
|
|
|
438
436
|
className: "x78zum5 x6s0dn4 x1k15mir xf314gf"
|
|
439
437
|
},
|
|
440
438
|
role: "navigation",
|
|
441
|
-
"aria-label":
|
|
439
|
+
"aria-label": "Mobile navigation",
|
|
442
440
|
children: [/*#__PURE__*/_jsx(SideNavRenderContext, {
|
|
443
441
|
value: "topbar",
|
|
444
442
|
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': ariaLabel, 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;AAQvD,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,SAAqB,EACnC,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CA2B9B;yBArCe,WAAW"}
|
|
@@ -23,7 +23,6 @@ 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";
|
|
27
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
27
|
const OVERLAP_RATIO = 0.25;
|
|
29
28
|
const styles = {
|
|
@@ -56,15 +55,13 @@ export function AvatarGroup({
|
|
|
56
55
|
children,
|
|
57
56
|
size = 'small',
|
|
58
57
|
'data-testid': testId,
|
|
59
|
-
'aria-label':
|
|
58
|
+
'aria-label': ariaLabel = 'Avatars',
|
|
60
59
|
xstyle,
|
|
61
60
|
className,
|
|
62
61
|
style,
|
|
63
62
|
ref,
|
|
64
63
|
...props
|
|
65
64
|
}) {
|
|
66
|
-
const t = useTranslator();
|
|
67
|
-
const ariaLabel = ariaLabelFromProps ?? t('@astryx.avatarGroup.label');
|
|
68
65
|
const numericSize = resolveSize(size);
|
|
69
66
|
const overlap = Math.round(numericSize * OVERLAP_RATIO);
|
|
70
67
|
const contextValue = useMemo(() => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAsB5C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC5D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,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;AA2JD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,sCAiIb;yBAjJe,MAAM"}
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -39,7 +39,6 @@ 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";
|
|
43
42
|
|
|
44
43
|
// =============================================================================
|
|
45
44
|
// Types
|
|
@@ -248,7 +247,6 @@ export function Banner({
|
|
|
248
247
|
ref,
|
|
249
248
|
...rest
|
|
250
249
|
}) {
|
|
251
|
-
const t = useTranslator();
|
|
252
250
|
const [isDismissed, setIsDismissed] = useState(false);
|
|
253
251
|
const [isExpanded, setIsExpanded] = useState(defaultIsExpanded);
|
|
254
252
|
// Links the expand/collapse toggle to the content region it shows/hides so
|
|
@@ -321,15 +319,15 @@ export function Banner({
|
|
|
321
319
|
children: [endContent, hasChildren && /*#__PURE__*/_jsx(Button, {
|
|
322
320
|
variant: "ghost",
|
|
323
321
|
size: "sm",
|
|
324
|
-
label: isExpanded ?
|
|
325
|
-
tooltip: isExpanded ?
|
|
322
|
+
label: isExpanded ? 'Collapse' : 'Expand',
|
|
323
|
+
tooltip: isExpanded ? 'Collapse' : 'Expand',
|
|
326
324
|
icon: /*#__PURE__*/_jsx("span", {
|
|
327
325
|
...{
|
|
328
326
|
0: {
|
|
329
|
-
className: "x3nfvp2 x11xpdln xuedmi6
|
|
327
|
+
className: "x3nfvp2 x11xpdln xuedmi6 xlr8y92"
|
|
330
328
|
},
|
|
331
329
|
1: {
|
|
332
|
-
className: "x3nfvp2 x11xpdln xuedmi6
|
|
330
|
+
className: "x3nfvp2 x11xpdln xuedmi6 xlr8y92 x19jd1h0"
|
|
333
331
|
}
|
|
334
332
|
}[!!isExpanded << 0],
|
|
335
333
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
@@ -345,8 +343,8 @@ export function Banner({
|
|
|
345
343
|
}), isDismissable && /*#__PURE__*/_jsx(Button, {
|
|
346
344
|
variant: "ghost",
|
|
347
345
|
size: "sm",
|
|
348
|
-
label:
|
|
349
|
-
tooltip:
|
|
346
|
+
label: "Dismiss",
|
|
347
|
+
tooltip: "Dismiss",
|
|
350
348
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
351
349
|
icon: "close",
|
|
352
350
|
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
|
|
89
|
+
export declare function Breadcrumbs({ children, separator, variant, xstyle, className, style, label, 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;AAO5C;;;;;;;;;;;;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,KAAoB,EACpB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAsBlB;yBAhCe,WAAW"}
|
|
@@ -21,7 +21,6 @@ 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";
|
|
25
24
|
|
|
26
25
|
// =============================================================================
|
|
27
26
|
// Variant type
|
|
@@ -103,12 +102,10 @@ export function Breadcrumbs({
|
|
|
103
102
|
xstyle,
|
|
104
103
|
className,
|
|
105
104
|
style,
|
|
106
|
-
label
|
|
105
|
+
label = 'Breadcrumb',
|
|
107
106
|
ref,
|
|
108
107
|
...rest
|
|
109
108
|
}) {
|
|
110
|
-
const t = useTranslator();
|
|
111
|
-
const label = labelFromProps ?? t('@astryx.breadcrumbs.label');
|
|
112
109
|
const ctxValue = useMemo(() => ({
|
|
113
110
|
variant,
|
|
114
111
|
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;;;;;;;;;;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H,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAuHD;;;;;;;;;;;;;;;;;;;;;;;;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,42 +228,12 @@ 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])))';
|
|
261
231
|
const groupStyles = {
|
|
262
232
|
horizontal: {
|
|
263
233
|
krdFHd: "x15mokao x8eehn2",
|
|
264
234
|
kVL7Gh: "xbiv7yw x1xrp5p4",
|
|
265
|
-
kfmiAY: "x1ga7v0g
|
|
266
|
-
kT0f0o: "x16uus16
|
|
235
|
+
kfmiAY: "x1ga7v0g x11xp8u1",
|
|
236
|
+
kT0f0o: "x16uus16 x747jw7",
|
|
267
237
|
k2ei4v: "xgbv0en x1pjv70x",
|
|
268
238
|
kVhnKS: "x1t7ytsu xyf0ibl",
|
|
269
239
|
kGJrpR: "x1j92z86",
|
|
@@ -272,8 +242,8 @@ const groupStyles = {
|
|
|
272
242
|
vertical: {
|
|
273
243
|
krdFHd: "x15mokao x8eehn2",
|
|
274
244
|
kfmiAY: "x1ga7v0g x2qxyot",
|
|
275
|
-
kVL7Gh: "xbiv7yw
|
|
276
|
-
kT0f0o: "x16uus16
|
|
245
|
+
kVL7Gh: "xbiv7yw x1yp72r9",
|
|
246
|
+
kT0f0o: "x16uus16 x747jw7",
|
|
277
247
|
kEafiO: "x11xkdxz x1g31smg",
|
|
278
248
|
kPef9Z: "x13fuv20 x1d9v4yf",
|
|
279
249
|
kLZC3w: "x1pc3f07",
|
|
@@ -4,10 +4,9 @@
|
|
|
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
|
-
* position-aware styles
|
|
9
|
-
*
|
|
10
|
-
* the trailing edge cannot use :last-child (#2508).
|
|
7
|
+
* Children (Button, IconButton) consume the ButtonGroup context to
|
|
8
|
+
* apply position-aware styles using CSS :first-child / :last-child
|
|
9
|
+
* pseudo-classes — no cloneElement or wrapper divs needed.
|
|
11
10
|
*
|
|
12
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
13
12
|
* - /packages/core/src/ButtonGroup/ButtonGroup.doc.mjs (props table, features)
|
|
@@ -57,10 +56,7 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
57
56
|
* handling (only on outer edges), and horizontal or vertical orientation.
|
|
58
57
|
*
|
|
59
58
|
* Children automatically detect the group via context and apply position-aware
|
|
60
|
-
* styles
|
|
61
|
-
*
|
|
62
|
-
* Members that render their own layer — a Button with a `tooltip`, or a
|
|
63
|
-
* DropdownMenu — compose correctly, including as the trailing member.
|
|
59
|
+
* styles using CSS :first-child / :last-child pseudo-classes.
|
|
64
60
|
*
|
|
65
61
|
* @example
|
|
66
62
|
* ```
|
|
@@ -70,19 +66,8 @@ export interface ButtonGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
70
66
|
* <Button label="Paste" />
|
|
71
67
|
* </ButtonGroup>
|
|
72
68
|
* ```
|
|
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
|
-
* ```
|
|
84
69
|
*/
|
|
85
|
-
export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, xstyle, className, style, ref, 'data-testid': testId,
|
|
70
|
+
export declare function ButtonGroup({ children, label, orientation, size: sizeProp, isDisabled, xstyle, className, style, ref, 'data-testid': testId, ...props }: ButtonGroupProps): ReactNode;
|
|
86
71
|
export declare namespace ButtonGroup {
|
|
87
72
|
var displayName: string;
|
|
88
73
|
}
|
|
@@ -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;;;;;;;;;;;;;;;;GAgBG;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;;;;;;;;;;;;;;;GAeG;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,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CAuC9B;yBAnDe,WAAW"}
|
|
@@ -8,10 +8,9 @@
|
|
|
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
|
-
* position-aware styles
|
|
13
|
-
*
|
|
14
|
-
* the trailing edge cannot use :last-child (#2508).
|
|
11
|
+
* Children (Button, IconButton) consume the ButtonGroup context to
|
|
12
|
+
* apply position-aware styles using CSS :first-child / :last-child
|
|
13
|
+
* pseudo-classes — no cloneElement or wrapper divs needed.
|
|
15
14
|
*
|
|
16
15
|
* SYNC: When modified, update these files to stay in sync:
|
|
17
16
|
* - /packages/core/src/ButtonGroup/ButtonGroup.doc.mjs (props table, features)
|
|
@@ -24,7 +23,7 @@ import { useMemo } from 'react';
|
|
|
24
23
|
import * as stylex from '@stylexjs/stylex';
|
|
25
24
|
import { SizeProvider, useSize } from "../SizeContext/SizeContext.js";
|
|
26
25
|
import { useListFocus } from "../hooks/useListFocus.js";
|
|
27
|
-
import { mergeProps, mergeRefs
|
|
26
|
+
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
28
27
|
import { ButtonGroupContext } from "./ButtonGroupContext.js";
|
|
29
28
|
import { themeProps } from "../utils/themeProps.js";
|
|
30
29
|
|
|
@@ -57,10 +56,7 @@ const styles = {
|
|
|
57
56
|
* handling (only on outer edges), and horizontal or vertical orientation.
|
|
58
57
|
*
|
|
59
58
|
* Children automatically detect the group via context and apply position-aware
|
|
60
|
-
* styles
|
|
61
|
-
*
|
|
62
|
-
* Members that render their own layer — a Button with a `tooltip`, or a
|
|
63
|
-
* DropdownMenu — compose correctly, including as the trailing member.
|
|
59
|
+
* styles using CSS :first-child / :last-child pseudo-classes.
|
|
64
60
|
*
|
|
65
61
|
* @example
|
|
66
62
|
* ```
|
|
@@ -70,17 +66,6 @@ const styles = {
|
|
|
70
66
|
* <Button label="Paste" />
|
|
71
67
|
* </ButtonGroup>
|
|
72
68
|
* ```
|
|
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
|
-
* ```
|
|
84
69
|
*/
|
|
85
70
|
export function ButtonGroup({
|
|
86
71
|
children,
|
|
@@ -93,7 +78,6 @@ export function ButtonGroup({
|
|
|
93
78
|
style,
|
|
94
79
|
ref,
|
|
95
80
|
'data-testid': testId,
|
|
96
|
-
onKeyDown,
|
|
97
81
|
...props
|
|
98
82
|
}) {
|
|
99
83
|
const size = useSize(sizeProp, 'md');
|
|
@@ -114,16 +98,16 @@ export function ButtonGroup({
|
|
|
114
98
|
value: size,
|
|
115
99
|
children: /*#__PURE__*/_jsx("div", {
|
|
116
100
|
ref: mergeRefs(ref, listRef),
|
|
117
|
-
...props,
|
|
118
|
-
...mergeProps(themeProps('button-group', {
|
|
119
|
-
size,
|
|
120
|
-
orientation
|
|
121
|
-
}), stylex.props(styles.group, orientation === 'vertical' && styles.vertical, xstyle), className, style),
|
|
122
101
|
role: "group",
|
|
123
102
|
"aria-label": label,
|
|
124
|
-
onKeyDown:
|
|
103
|
+
onKeyDown: handleKeyDown,
|
|
125
104
|
"aria-disabled": isDisabled || undefined,
|
|
126
105
|
"data-testid": testId,
|
|
106
|
+
...mergeProps(themeProps('button-group', {
|
|
107
|
+
size,
|
|
108
|
+
orientation
|
|
109
|
+
}), stylex.props(styles.group, orientation === 'vertical' && styles.vertical, xstyle), className, style),
|
|
110
|
+
...props,
|
|
127
111
|
children: children
|
|
128
112
|
})
|
|
129
113
|
})
|
|
@@ -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;AAI5B,+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,CAAC;IACtC,+CAA+C;IAC/C,cAAc,CAAC,EA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rE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAC,GAAG,EAAE,GAAG,KAAK,EAAC,EAAE,aAAa,+BA4StD;yBA5Se,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
|
|
27
|
+
import { mergeProps } from "../utils/index.js";
|
|
28
28
|
import { computeDayCellState, computeRangeRounding, computePreviewRounding, computeDayNeighborContinuity, isEndpoint } from "./dayCellUtils.js";
|
|
29
29
|
|
|
30
30
|
// =============================================================================
|
|
@@ -33,7 +33,6 @@ 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";
|
|
37
36
|
|
|
38
37
|
/** Imperative handle for Calendar handleRef */
|
|
39
38
|
|
|
@@ -57,7 +56,6 @@ export function Calendar({
|
|
|
57
56
|
ref,
|
|
58
57
|
...props
|
|
59
58
|
}) {
|
|
60
|
-
const t = useTranslator();
|
|
61
59
|
const {
|
|
62
60
|
handleRef,
|
|
63
61
|
mode = 'single',
|
|
@@ -77,7 +75,6 @@ export function Calendar({
|
|
|
77
75
|
xstyle,
|
|
78
76
|
className,
|
|
79
77
|
style,
|
|
80
|
-
onKeyDown,
|
|
81
78
|
...rest
|
|
82
79
|
} = props;
|
|
83
80
|
|
|
@@ -244,15 +241,15 @@ export function Calendar({
|
|
|
244
241
|
}, [mode, onChange, rangeSelectionStart]);
|
|
245
242
|
return /*#__PURE__*/_jsxs("div", {
|
|
246
243
|
ref: ref,
|
|
247
|
-
...rest,
|
|
248
244
|
...mergeProps(themeProps('calendar', {
|
|
249
245
|
mode
|
|
250
246
|
}), stylex.props(calendarStyles.calendar, xstyle), className, style),
|
|
251
|
-
onKeyDown:
|
|
247
|
+
onKeyDown: handleCalendarKeyDown,
|
|
248
|
+
...rest,
|
|
252
249
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
253
250
|
...stylex.props(calendarStyles.header),
|
|
254
251
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
255
|
-
label:
|
|
252
|
+
label: "Previous month",
|
|
256
253
|
variant: "ghost",
|
|
257
254
|
icon:
|
|
258
255
|
/*#__PURE__*/
|
|
@@ -274,7 +271,7 @@ export function Calendar({
|
|
|
274
271
|
...stylex.props(calendarStyles.monthYearLabel),
|
|
275
272
|
children: monthYearLabel
|
|
276
273
|
}), /*#__PURE__*/_jsx(Button, {
|
|
277
|
-
label:
|
|
274
|
+
label: "Next month",
|
|
278
275
|
variant: "ghost",
|
|
279
276
|
icon: /*#__PURE__*/_jsx("span", {
|
|
280
277
|
...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': ariaLabel, 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;AAGhD,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,SAAsB,EACpC,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,aAAa,+BAiJf;yBA/Je,QAAQ"}
|
|
@@ -25,7 +25,6 @@ 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";
|
|
29
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
29
|
// =============================================================================
|
|
31
30
|
// Styles
|
|
@@ -204,15 +203,13 @@ export function Carousel({
|
|
|
204
203
|
hasEdgeFade = true,
|
|
205
204
|
hasSnap = false,
|
|
206
205
|
padding,
|
|
207
|
-
'aria-label':
|
|
206
|
+
'aria-label': ariaLabel = 'Carousel',
|
|
208
207
|
xstyle,
|
|
209
208
|
className,
|
|
210
209
|
style,
|
|
211
210
|
'data-testid': testId,
|
|
212
211
|
...htmlProps
|
|
213
212
|
}) {
|
|
214
|
-
const t = useTranslator();
|
|
215
|
-
const ariaLabel = ariaLabelFromProps ?? t('@astryx.carousel.label');
|
|
216
213
|
const scrollElRef = useRef(null);
|
|
217
214
|
const {
|
|
218
215
|
scrollRef,
|
|
@@ -263,11 +260,11 @@ export function Carousel({
|
|
|
263
260
|
return /*#__PURE__*/_jsxs("div", {
|
|
264
261
|
ref: mergeRefs(ref, layer.ref),
|
|
265
262
|
"data-testid": testId,
|
|
266
|
-
...htmlProps,
|
|
267
|
-
...mergeProps(themeProps('carousel'), stylex.props(styles.root, xstyle), className, style),
|
|
268
263
|
role: "region",
|
|
269
264
|
"aria-label": ariaLabel,
|
|
270
265
|
"aria-roledescription": "carousel",
|
|
266
|
+
...mergeProps(themeProps('carousel'), stylex.props(styles.root, xstyle), className, style),
|
|
267
|
+
...htmlProps,
|
|
271
268
|
children: [/*#__PURE__*/_jsx("div", {
|
|
272
269
|
ref: composedRef,
|
|
273
270
|
tabIndex: 0,
|
|
@@ -293,7 +290,7 @@ export function Carousel({
|
|
|
293
290
|
icon: "chevronLeft",
|
|
294
291
|
size: "xsm"
|
|
295
292
|
}),
|
|
296
|
-
label:
|
|
293
|
+
label: "Scroll left",
|
|
297
294
|
variant: "ghost",
|
|
298
295
|
size: "sm",
|
|
299
296
|
isIconOnly: true
|
|
@@ -320,7 +317,7 @@ export function Carousel({
|
|
|
320
317
|
icon: "chevronRight",
|
|
321
318
|
size: "xsm"
|
|
322
319
|
}),
|
|
323
|
-
label:
|
|
320
|
+
label: "Scroll right",
|
|
324
321
|
variant: "ghost",
|
|
325
322
|
size: "sm",
|
|
326
323
|
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,MAAM,cAAc,CAAC;AAuB5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM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AAK,EAAE,iBAAiB,qBA8JpD;yBA9Je,YAAY"}
|
|
@@ -32,7 +32,6 @@ 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";
|
|
36
35
|
|
|
37
36
|
// =============================================================================
|
|
38
37
|
// Types
|
|
@@ -82,7 +81,6 @@ const styles = {
|
|
|
82
81
|
* ```
|
|
83
82
|
*/
|
|
84
83
|
export function ChatComposer(props) {
|
|
85
|
-
const t = useTranslator();
|
|
86
84
|
const {
|
|
87
85
|
ref,
|
|
88
86
|
onSubmit,
|
|
@@ -90,7 +88,7 @@ export function ChatComposer(props) {
|
|
|
90
88
|
isStopShown = false,
|
|
91
89
|
value: controlledValue,
|
|
92
90
|
onChange,
|
|
93
|
-
placeholder
|
|
91
|
+
placeholder = 'Type a message\u2026',
|
|
94
92
|
isDisabled = false,
|
|
95
93
|
density = 'balanced',
|
|
96
94
|
drawer,
|
|
@@ -107,7 +105,6 @@ export function ChatComposer(props) {
|
|
|
107
105
|
style,
|
|
108
106
|
...rest
|
|
109
107
|
} = props;
|
|
110
|
-
const placeholder = placeholderFromProps ?? t('@astryx.chat.composer.placeholder');
|
|
111
108
|
const [internalValue, setInternalValue] = useState('');
|
|
112
109
|
const isControlled = controlledValue !== undefined;
|
|
113
110
|
const currentValue = isControlled ? controlledValue : internalValue;
|