@astryxdesign/core 0.1.5 → 0.1.6-canary.02f2602
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +2 -0
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +21 -18
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +0 -2
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/useImperativeAlertDialog.js +3 -5
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +55 -53
- package/dist/AspectRatio/AspectRatio.js +5 -5
- package/dist/Avatar/Avatar.js +19 -19
- package/dist/Avatar/AvatarStatusDot.js +5 -5
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +9 -6
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -5
- package/dist/Badge/Badge.js +3 -3
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -30
- package/dist/Blockquote/Blockquote.js +7 -7
- package/dist/Breadcrumbs/BreadcrumbItem.js +17 -17
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +11 -8
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +53 -23
- package/dist/ButtonGroup/ButtonGroup.d.ts +20 -5
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +34 -18
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +51 -48
- package/dist/Card/Card.js +3 -3
- package/dist/Carousel/Carousel.d.ts +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +27 -24
- package/dist/Center/Center.js +3 -3
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +27 -24
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +23 -16
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +20 -16
- package/dist/Chat/ChatDictationButton.js +10 -10
- package/dist/Chat/ChatLayout.d.ts +1 -11
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +23 -21
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +13 -11
- package/dist/Chat/ChatMessage.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +20 -14
- package/dist/Chat/ChatMessageBubble.d.ts +1 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +10 -8
- package/dist/Chat/ChatMessageList.d.ts +1 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +17 -15
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +24 -19
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +16 -14
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +6 -4
- package/dist/Chat/ChatSystemMessage.js +11 -11
- package/dist/Chat/ChatTokenizedText.js +8 -8
- package/dist/Chat/ChatToolCalls.js +73 -73
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +4 -2
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +19 -17
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +26 -24
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +12 -10
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +8 -6
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -12
- package/dist/ClickableCard/ClickableCard.js +6 -6
- package/dist/Code/Code.js +3 -3
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +114 -96
- package/dist/Collapsible/Collapsible.js +11 -11
- package/dist/Collapsible/CollapsibleGroup.js +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +39 -34
- package/dist/CommandPalette/CommandPaletteEmpty.js +3 -3
- package/dist/CommandPalette/CommandPaletteFooter.js +16 -16
- package/dist/CommandPalette/CommandPaletteGroup.js +5 -5
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +17 -14
- package/dist/CommandPalette/CommandPaletteItem.js +3 -3
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +7 -4
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +14 -11
- package/dist/DateInput/DateInput.d.ts +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +28 -23
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +32 -27
- package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +41 -33
- package/dist/Dialog/Dialog.js +9 -9
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +20 -18
- package/dist/Dialog/useImperativeDialog.js +3 -3
- package/dist/Divider/Divider.js +7 -7
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +21 -15
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/renderDropdownItems.js +10 -10
- package/dist/EmptyState/EmptyState.d.ts +4 -1
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +9 -9
- package/dist/Field/Field.js +17 -17
- package/dist/Field/FieldLabel.js +15 -15
- package/dist/Field/InputClearButton.js +5 -5
- package/dist/FieldStatus/FieldStatus.js +3 -3
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +34 -30
- package/dist/FormLayout/FormLayout.js +5 -5
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/GridSpan.js +3 -3
- package/dist/HStack/HStack.js +3 -3
- package/dist/Heading/Heading.js +10 -10
- package/dist/HoverCard/HoverCard.js +9 -9
- package/dist/HoverCard/useHoverCard.js +3 -3
- package/dist/Icon/Icon.js +11 -11
- package/dist/Icon/defaultIcons.js +116 -116
- package/dist/IconButton/IconButton.js +3 -3
- package/dist/InputGroup/InputGroup.js +9 -9
- package/dist/InputGroup/InputGroupText.js +3 -3
- package/dist/Item/Item.js +17 -17
- package/dist/Kbd/Kbd.js +5 -5
- package/dist/Layer/LayerProvider.js +7 -7
- package/dist/Layer/useLayer.js +5 -5
- package/dist/Layout/Layout.js +21 -21
- package/dist/Layout/LayoutContent.js +3 -3
- package/dist/Layout/LayoutFooter.js +5 -5
- package/dist/Layout/LayoutHeader.js +5 -5
- package/dist/Layout/LayoutPanel.js +3 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +35 -33
- package/dist/Lightbox/useLightbox.d.ts +0 -1
- package/dist/Lightbox/useLightbox.d.ts.map +1 -1
- package/dist/Lightbox/useLightbox.js +3 -4
- package/dist/Link/Link.d.ts +5 -3
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +47 -18
- package/dist/Link/LinkProvider.js +3 -3
- package/dist/Link/useLinkify.js +3 -3
- package/dist/List/List.js +11 -11
- package/dist/List/ListItem.js +11 -11
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +111 -109
- package/dist/MetadataList/MetadataList.js +10 -10
- package/dist/MetadataList/MetadataListItem.js +15 -15
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +19 -17
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +9 -6
- package/dist/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +7 -4
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +69 -62
- package/dist/NavIcon/NavIcon.js +3 -3
- package/dist/NavMenu/NavHeadingMenu.js +5 -5
- package/dist/NavMenu/NavHeadingMenuItem.js +8 -8
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +21 -17
- package/dist/Outline/Outline.d.ts +1 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +19 -16
- package/dist/OverflowList/OverflowList.js +8 -8
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/Overlay/OverlayScrim.js +5 -5
- package/dist/Overlay/useOverlay.d.ts +0 -3
- package/dist/Overlay/useOverlay.d.ts.map +1 -1
- package/dist/Overlay/useOverlay.js +3 -6
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +73 -46
- package/dist/Popover/Popover.js +16 -16
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -8
- package/dist/PowerSearch/PowerSearch.d.ts +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +95 -85
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +109 -103
- package/dist/PowerSearch/PowerSearchFilterEditor.js +3 -3
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +12 -8
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +88 -75
- package/dist/PowerSearch/formatFilterValue.d.ts +2 -1
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +19 -9
- package/dist/PowerSearch/index.d.ts +2 -1
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/index.js +1 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +23 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -0
- package/dist/PowerSearch/resolveOperatorLabel.js +28 -0
- package/dist/PowerSearch/types.d.ts +28 -2
- package/dist/PowerSearch/types.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.js +27 -27
- package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchSource.js +15 -8
- package/dist/ProgressBar/ProgressBar.js +13 -13
- package/dist/RadioList/RadioList.js +7 -7
- package/dist/RadioList/RadioListItem.js +18 -18
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +10 -7
- package/dist/Section/Section.js +5 -5
- package/dist/SegmentedControl/SegmentedControl.js +5 -5
- package/dist/SegmentedControl/SegmentedControlItem.js +7 -7
- package/dist/SelectableCard/SelectableCard.js +5 -5
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +57 -51
- package/dist/Selector/SelectorOption.js +3 -3
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +38 -36
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +8 -6
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +92 -90
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +49 -43
- package/dist/SideNav/SideNavSection.js +14 -14
- package/dist/Skeleton/Skeleton.js +3 -3
- package/dist/Slider/Slider.js +23 -23
- package/dist/Spinner/Spinner.js +9 -9
- package/dist/StatusDot/StatusDot.js +5 -5
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +29 -27
- package/dist/TabList/Tab.js +18 -18
- package/dist/TabList/TabList.d.ts +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +9 -6
- package/dist/TabList/TabMenu.js +23 -23
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +39 -37
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +10 -8
- package/dist/Table/TableBody.js +3 -3
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableFooter.js +3 -3
- package/dist/Table/TableHeader.js +3 -3
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/TableRow.js +5 -5
- package/dist/Table/index.d.ts +4 -0
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +2 -0
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +9 -9
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +127 -90
- package/dist/Table/plugins/groupedRows/index.d.ts +3 -0
- package/dist/Table/plugins/groupedRows/index.d.ts.map +1 -0
- package/dist/Table/plugins/groupedRows/index.js +3 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +78 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +257 -0
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +12 -9
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +30 -28
- package/dist/Table/plugins/rowIndex/index.d.ts +3 -0
- package/dist/Table/plugins/rowIndex/index.d.ts.map +1 -0
- package/dist/Table/plugins/rowIndex/index.js +3 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +50 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +91 -0
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +23 -20
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +23 -21
- package/dist/Table/tableContextMenu.js +9 -9
- package/dist/Text/Text.js +10 -10
- package/dist/TextArea/TextArea.js +14 -14
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +20 -16
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +37 -31
- package/dist/TimeInput/TimeInput.d.ts +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +28 -23
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +29 -14
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +17 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +14 -12
- package/dist/Toast/useToast.js +4 -4
- package/dist/ToggleButton/ToggleButton.js +12 -12
- package/dist/ToggleButton/ToggleButtonGroup.js +5 -5
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +29 -23
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +33 -31
- package/dist/Toolbar/Toolbar.js +18 -18
- package/dist/Tooltip/Tooltip.js +11 -11
- package/dist/Tooltip/useTooltip.js +3 -3
- package/dist/TopNav/TopNav.d.ts +2 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +36 -33
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +72 -70
- package/dist/TopNav/TopNavItem.js +5 -5
- package/dist/TopNav/TopNavMegaMenu.js +30 -30
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +10 -10
- package/dist/TopNav/TopNavMegaMenuItem.js +16 -16
- package/dist/TopNav/TopNavMenu.js +32 -32
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +13 -9
- package/dist/TreeList/TreeListBranches.js +11 -11
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +37 -31
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +26 -22
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +15 -13
- package/dist/Typeahead/TypeaheadItem.js +10 -10
- package/dist/VStack/VStack.js +3 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -3
- package/dist/astryx.css +20 -2
- package/dist/astryx.umd.js +66 -64
- package/dist/astryx.umd.js.map +4 -4
- package/dist/authoring/doc.d.ts +145 -0
- package/dist/authoring/doc.d.ts.map +1 -0
- package/dist/authoring/doc.js +100 -0
- package/dist/authoring/index.d.ts +29 -0
- package/dist/authoring/index.d.ts.map +1 -0
- package/dist/authoring/index.js +28 -0
- package/dist/authoring/integration.d.ts +35 -0
- package/dist/authoring/integration.d.ts.map +1 -0
- package/dist/authoring/integration.js +30 -0
- package/dist/authoring/template.d.ts +66 -0
- package/dist/authoring/template.d.ts.map +1 -0
- package/dist/authoring/template.js +55 -0
- package/dist/config.d.ts +80 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +40 -0
- package/dist/hooks/useKeyboardHint.js +9 -9
- package/dist/i18n/InternationalizationContext.d.ts +12 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -0
- package/dist/i18n/InternationalizationContext.js +29 -0
- package/dist/i18n/InternationalizationProvider.d.ts +62 -0
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -0
- package/dist/i18n/InternationalizationProvider.js +44 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +21 -0
- package/dist/i18n/resolve.d.ts +22 -0
- package/dist/i18n/resolve.d.ts.map +1 -0
- package/dist/i18n/resolve.js +141 -0
- package/dist/i18n/translator.d.ts +25 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n/translator.js +1 -0
- package/dist/i18n/types.d.ts +47 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +1 -0
- package/dist/i18n/useTranslator.d.ts +15 -0
- package/dist/i18n/useTranslator.d.ts.map +1 -0
- package/dist/i18n/useTranslator.js +39 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/theme/MediaTheme.js +3 -3
- package/dist/theme/Theme.js +7 -7
- package/dist/theme/syntax/SyntaxTheme.js +5 -5
- package/locales/en.json +746 -0
- package/locales/pseudo.json +560 -0
- package/package.json +24 -3
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -0
- package/src/AlertDialog/AlertDialog.tsx +4 -1
- package/src/AlertDialog/useImperativeAlertDialog.tsx +0 -2
- package/src/AppShell/AppShell.doc.mjs +8 -2
- package/src/AppShell/AppShell.tsx +3 -1
- package/src/AvatarGroup/AvatarGroup.tsx +4 -1
- package/src/Banner/Banner.tsx +10 -5
- package/src/Breadcrumbs/Breadcrumbs.tsx +4 -1
- package/src/Button/Button.tsx +34 -4
- package/src/ButtonGroup/ButtonGroup.test.tsx +386 -2
- package/src/ButtonGroup/ButtonGroup.tsx +27 -11
- package/src/Calendar/Calendar.tsx +8 -5
- package/src/Card/Card.doc.mjs +3 -3
- package/src/Carousel/Carousel.tsx +10 -7
- package/src/Chat/ChatComposer.tsx +5 -1
- package/src/Chat/ChatComposerDrawer.tsx +9 -2
- package/src/Chat/ChatComposerInput.tsx +10 -4
- package/src/Chat/ChatLayout.tsx +5 -12
- package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
- package/src/Chat/ChatMessage.tsx +5 -1
- package/src/Chat/ChatMessageBubble.tsx +2 -0
- package/src/Chat/ChatMessageList.doc.mjs +1 -1
- package/src/Chat/ChatMessageList.tsx +2 -0
- package/src/Chat/ChatMessageMetadata.tsx +15 -9
- package/src/Chat/ChatPastedTextToken.tsx +3 -1
- package/src/Chat/ChatSendButton.tsx +3 -1
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/Chat/useSpeechRecognition.ts +11 -2
- package/src/Chat/useTriggerMenu.tsx +4 -2
- package/src/CheckboxInput/CheckboxInput.test.tsx +16 -0
- package/src/CheckboxInput/CheckboxInput.tsx +4 -2
- package/src/CheckboxList/CheckboxList.doc.mjs +6 -1
- package/src/CheckboxList/CheckboxList.tsx +2 -0
- package/src/CheckboxList/CheckboxListItem.tsx +7 -1
- package/src/Citation/Citation.tsx +4 -2
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
- package/src/CodeBlock/CodeBlock.tsx +91 -40
- package/src/Collapsible/Collapsible.doc.mjs +3 -3
- package/src/CommandPalette/CommandPalette.tsx +10 -3
- package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
- package/src/CommandPalette/CommandPaletteInput.tsx +5 -1
- package/src/CommandPalette/CommandPaletteList.tsx +4 -1
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/DateInput/DateInput.doc.mjs +2 -2
- package/src/DateInput/DateInput.tsx +13 -5
- package/src/DateRangeInput/DateRangeInput.doc.mjs +7 -7
- package/src/DateRangeInput/DateRangeInput.tsx +14 -6
- package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
- package/src/DateTimeInput/DateTimeInput.tsx +17 -7
- package/src/Dialog/DialogHeader.tsx +4 -2
- package/src/DropdownMenu/DropdownMenu.tsx +12 -8
- package/src/EmptyState/EmptyState.doc.mjs +3 -3
- package/src/EmptyState/EmptyState.tsx +4 -1
- package/src/Field/Field.doc.mjs +2 -2
- package/src/FileInput/FileInput.tsx +3 -1
- package/src/Grid/Grid.doc.mjs +5 -5
- package/src/InputGroup/InputGroup.doc.mjs +1 -1
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Lightbox/Lightbox.doc.mjs +7 -2
- package/src/Lightbox/Lightbox.tsx +6 -4
- package/src/Lightbox/useLightbox.tsx +0 -1
- package/src/Link/Link.test.tsx +74 -2
- package/src/Link/Link.tsx +48 -3
- package/src/Markdown/Markdown.tsx +12 -4
- package/src/MobileNav/MobileNav.tsx +4 -2
- package/src/MobileNav/MobileNavToggle.tsx +5 -3
- package/src/MoreMenu/MoreMenu.tsx +4 -1
- package/src/MultiSelector/MultiSelector.tsx +14 -5
- package/src/NumberInput/NumberInput.tsx +3 -1
- package/src/Outline/Outline.tsx +4 -1
- package/src/OverflowList/OverflowList.doc.mjs +2 -2
- package/src/Overlay/useOverlay.tsx +0 -3
- package/src/Pagination/Pagination.tsx +35 -12
- package/src/Popover/usePopover.tsx +6 -1
- package/src/PowerSearch/PowerSearch.doc.mjs +9 -4
- package/src/PowerSearch/PowerSearch.tsx +22 -10
- package/src/PowerSearch/PowerSearchEditPopover.tsx +27 -20
- package/src/PowerSearch/PowerSearchToken.tsx +17 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +34 -21
- package/src/PowerSearch/formatFilterValue.test.ts +282 -0
- package/src/PowerSearch/formatFilterValue.ts +21 -8
- package/src/PowerSearch/index.ts +5 -0
- package/src/PowerSearch/resolveOperatorLabel.ts +34 -0
- package/src/PowerSearch/types.ts +33 -9
- package/src/PowerSearch/usePowerSearchConfig.ts +59 -27
- package/src/PowerSearch/usePowerSearchSource.ts +17 -8
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/Resizable/ResizeHandle.tsx +4 -1
- package/src/Section/Section.doc.mjs +4 -4
- package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
- package/src/Selector/Selector.tsx +11 -6
- package/src/SideNav/SideNav.tsx +4 -2
- package/src/SideNav/SideNavCollapseButton.tsx +3 -1
- package/src/SideNav/SideNavHeading.tsx +5 -3
- package/src/SideNav/SideNavItem.tsx +3 -1
- package/src/Slider/Slider.doc.mjs +2 -2
- package/src/Stack/Stack.doc.mjs +10 -10
- package/src/Switch/Switch.doc.mjs +2 -2
- package/src/Switch/Switch.test.tsx +16 -0
- package/src/Switch/Switch.tsx +4 -2
- package/src/TabList/TabList.tsx +4 -1
- package/src/Table/BaseTable.tsx +8 -1
- package/src/Table/Table.doc.mjs +1 -1
- package/src/Table/Table.tsx +3 -1
- package/src/Table/index.ts +7 -0
- package/src/Table/plugins/filtering/useTableFiltering.tsx +31 -30
- package/src/Table/plugins/groupedRows/index.ts +7 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.test.tsx +231 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +351 -0
- package/src/Table/plugins/pagination/useTablePagination.tsx +4 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -4
- package/src/Table/plugins/rowIndex/index.ts +4 -0
- package/src/Table/plugins/rowIndex/useTableRowIndex.test.tsx +132 -0
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +114 -0
- package/src/Table/plugins/selection/useTableSelection.tsx +6 -7
- package/src/Table/plugins/sortable/useTableSortable.tsx +8 -5
- package/src/Table/useTableFiltering.doc.mjs +2 -2
- package/src/Table/useTableGroupedRows.doc.mjs +71 -0
- package/src/Table/useTableRowIndex.doc.mjs +50 -0
- package/src/Table/useTableSortable.doc.mjs +11 -11
- package/src/Text/Text.doc.mjs +2 -2
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Thumbnail/Thumbnail.tsx +4 -2
- package/src/TimeInput/TimeInput.doc.mjs +2 -2
- package/src/TimeInput/TimeInput.tsx +6 -2
- package/src/Timestamp/Timestamp.doc.mjs +4 -4
- package/src/Timestamp/Timestamp.test.tsx +120 -7
- package/src/Timestamp/Timestamp.tsx +21 -1
- package/src/Toast/Toast.tsx +3 -1
- package/src/Toast/ToastViewport.tsx +3 -1
- package/src/Token/Token.tsx +4 -2
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.tsx +4 -4
- package/src/Toolbar/Toolbar.doc.mjs +1 -1
- package/src/TopNav/TopNav.doc.mjs +1 -0
- package/src/TopNav/TopNav.test.tsx +30 -0
- package/src/TopNav/TopNav.tsx +6 -4
- package/src/TopNav/TopNavHeading.tsx +5 -3
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListItem.tsx +6 -1
- package/src/Typeahead/BaseTypeahead.tsx +11 -4
- package/src/Typeahead/Typeahead.doc.mjs +1 -1
- package/src/Typeahead/Typeahead.tsx +3 -1
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -3
- package/src/authoring/doc.ts +166 -0
- package/src/authoring/index.test.ts +52 -0
- package/src/authoring/index.ts +50 -0
- package/src/authoring/integration.ts +42 -0
- package/src/authoring/template.ts +74 -0
- package/src/config.test.ts +16 -0
- package/src/config.ts +92 -0
- package/src/docPropLiterals.test.ts +902 -0
- package/src/hooks/useHotkeys.doc.mjs +5 -5
- package/src/i18n/InternationalizationContext.ts +39 -0
- package/src/i18n/InternationalizationProvider.doc.mjs +72 -0
- package/src/i18n/InternationalizationProvider.tsx +83 -0
- package/src/i18n/__tests__/e2e-pagination.test.tsx +172 -0
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +130 -0
- package/src/i18n/__tests__/resolve.test.ts +284 -0
- package/src/i18n/index.ts +32 -0
- package/src/i18n/resolve.ts +165 -0
- package/src/i18n/translator.ts +31 -0
- package/src/i18n/types.ts +53 -0
- package/src/i18n/useTranslator.doc.mjs +46 -0
- package/src/i18n/useTranslator.ts +50 -0
- package/src/index.ts +3 -0
- package/dist/NavItem/index.d.ts +0 -9
- package/dist/NavItem/index.d.ts.map +0 -1
- package/dist/NavItem/index.js +0 -10
- package/src/NavItem/index.ts +0 -11
|
@@ -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,14 +24,14 @@ 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
|
|
|
30
31
|
// =============================================================================
|
|
31
32
|
// Props
|
|
32
33
|
// =============================================================================
|
|
33
|
-
import {
|
|
34
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
35
|
// =============================================================================
|
|
35
36
|
// Styles
|
|
36
37
|
// =============================================================================
|
|
@@ -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');
|
|
@@ -92,25 +108,25 @@ export function ButtonGroup({
|
|
|
92
108
|
orientation,
|
|
93
109
|
isDisabled
|
|
94
110
|
}), [orientation, isDisabled]);
|
|
95
|
-
return /*#__PURE__*/
|
|
111
|
+
return /*#__PURE__*/_jsx(ButtonGroupContext, {
|
|
96
112
|
value: contextValue,
|
|
97
|
-
children: /*#__PURE__*/
|
|
113
|
+
children: /*#__PURE__*/_jsx(SizeProvider, {
|
|
98
114
|
value: size,
|
|
99
|
-
children: /*#__PURE__*/
|
|
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
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
});
|
|
115
131
|
}
|
|
116
132
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
@@ -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,CAAC;IACtC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAEvB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,aAAa,CAAC;IAEpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,aAAa,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC;IAEzD;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAEvD;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CAC1C;AAID,UAAU,mBAAoB,SAAQ,iBAAiB;IACrD,qBAAqB;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,KAAK,IAAI,CAAC;CAC9D;AAED,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IAEd,0BAA0B;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,MAAM,aAAa,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,13 +33,14 @@ 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
|
|
|
39
40
|
// ─── Base Props (shared across all modes) ─────────────────────
|
|
40
41
|
|
|
41
42
|
// ─── Mode-specific Props (discriminated union) ────────────────
|
|
42
|
-
import {
|
|
43
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
43
44
|
// =============================================================================
|
|
44
45
|
// Main Component
|
|
45
46
|
// =============================================================================
|
|
@@ -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
|
|
|
@@ -239,55 +242,55 @@ export function Calendar({
|
|
|
239
242
|
}
|
|
240
243
|
}
|
|
241
244
|
}, [mode, onChange, rangeSelectionStart]);
|
|
242
|
-
return /*#__PURE__*/
|
|
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
|
-
|
|
249
|
-
children: [/*#__PURE__*/_jsxDEV("div", {
|
|
251
|
+
onKeyDown: composeEventHandlers(onKeyDown, handleCalendarKeyDown),
|
|
252
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
250
253
|
...stylex.props(calendarStyles.header),
|
|
251
|
-
children: [/*#__PURE__*/
|
|
252
|
-
label:
|
|
254
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
255
|
+
label: t('@astryx.calendar.previousMonth'),
|
|
253
256
|
variant: "ghost",
|
|
254
257
|
icon:
|
|
255
258
|
/*#__PURE__*/
|
|
256
259
|
// Wrapper span (not Icon props): Icon's string mode clobbers
|
|
257
260
|
// caller classNames, so the RTL mirror must live on its own
|
|
258
261
|
// element.
|
|
259
|
-
|
|
262
|
+
_jsx("span", {
|
|
260
263
|
...stylex.props(calendarStyles.navIcon),
|
|
261
|
-
children: /*#__PURE__*/
|
|
264
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
262
265
|
icon: "chevronLeft",
|
|
263
266
|
size: "sm",
|
|
264
267
|
color: "inherit"
|
|
265
|
-
}
|
|
266
|
-
}
|
|
268
|
+
})
|
|
269
|
+
}),
|
|
267
270
|
onClick: () => navigateMonth(-1),
|
|
268
271
|
isDisabled: !canNavigatePrevious,
|
|
269
272
|
isIconOnly: true
|
|
270
|
-
}
|
|
273
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
271
274
|
...stylex.props(calendarStyles.monthYearLabel),
|
|
272
275
|
children: monthYearLabel
|
|
273
|
-
}
|
|
274
|
-
label:
|
|
276
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
277
|
+
label: t('@astryx.calendar.nextMonth'),
|
|
275
278
|
variant: "ghost",
|
|
276
|
-
icon: /*#__PURE__*/
|
|
279
|
+
icon: /*#__PURE__*/_jsx("span", {
|
|
277
280
|
...stylex.props(calendarStyles.navIcon),
|
|
278
|
-
children: /*#__PURE__*/
|
|
281
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
279
282
|
icon: "chevronRight",
|
|
280
283
|
size: "sm",
|
|
281
284
|
color: "inherit"
|
|
282
|
-
}
|
|
283
|
-
}
|
|
285
|
+
})
|
|
286
|
+
}),
|
|
284
287
|
onClick: () => navigateMonth(1),
|
|
285
288
|
isDisabled: !canNavigateNext,
|
|
286
289
|
isIconOnly: true
|
|
287
|
-
}
|
|
288
|
-
}
|
|
290
|
+
})]
|
|
291
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
289
292
|
...stylex.props(calendarStyles.monthsContainer),
|
|
290
|
-
children: visibleMonths.map(month => /*#__PURE__*/
|
|
293
|
+
children: visibleMonths.map(month => /*#__PURE__*/_jsx(MonthGrid, {
|
|
291
294
|
month: month,
|
|
292
295
|
value: effectiveValue,
|
|
293
296
|
mode: mode,
|
|
@@ -307,9 +310,9 @@ export function Calendar({
|
|
|
307
310
|
onNavigateNext: (focusedDate, offset) => navigateMonth(1, focusedDate, offset),
|
|
308
311
|
pendingFocus: pendingFocus,
|
|
309
312
|
onPendingFocusHandled: () => setPendingFocus(null)
|
|
310
|
-
}, `${month.year}-${month.month}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
+
}, `${month.year}-${month.month}`))
|
|
314
|
+
})]
|
|
315
|
+
});
|
|
313
316
|
}
|
|
314
317
|
Calendar.displayName = 'Calendar';
|
|
315
318
|
|
|
@@ -524,36 +527,36 @@ function MonthGrid({
|
|
|
524
527
|
const monthLabel = useMemo(() => {
|
|
525
528
|
return plainDateFormat(month, DATE_FORMAT_MONTH_YEAR);
|
|
526
529
|
}, [month]);
|
|
527
|
-
return /*#__PURE__*/
|
|
530
|
+
return /*#__PURE__*/_jsx("div", {
|
|
528
531
|
...stylex.props(monthGridStyles.monthGrid),
|
|
529
|
-
children: /*#__PURE__*/
|
|
532
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
530
533
|
ref: gridRef,
|
|
531
534
|
role: "grid",
|
|
532
535
|
"aria-label": monthLabel,
|
|
533
536
|
onKeyDown: handleGridKeyDown,
|
|
534
537
|
onFocus: handleGridFocus,
|
|
535
538
|
...stylex.props(monthGridStyles.daysGrid, hasWeekNumbers && monthGridStyles.daysGridWithNumbers),
|
|
536
|
-
children: [/*#__PURE__*/
|
|
539
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
537
540
|
role: "row",
|
|
538
541
|
...stylex.props(monthGridStyles.weekRow),
|
|
539
|
-
children: [hasWeekNumbers && /*#__PURE__*/
|
|
542
|
+
children: [hasWeekNumbers && /*#__PURE__*/_jsx("div", {
|
|
540
543
|
...stylex.props(monthGridStyles.dayName, monthGridStyles.weekNumberHeader)
|
|
541
|
-
}
|
|
544
|
+
}), dayNames.map(name => /*#__PURE__*/_jsx("div", {
|
|
542
545
|
role: "columnheader",
|
|
543
546
|
...stylex.props(monthGridStyles.dayName),
|
|
544
547
|
children: name
|
|
545
|
-
}, name
|
|
546
|
-
}
|
|
548
|
+
}, name))]
|
|
549
|
+
}), weeks.map(week => {
|
|
547
550
|
const weekDate = week.find(d => !d.isOutside)?.date || week[0].date;
|
|
548
551
|
const weekNum = plainDateGetWeekNumber(weekDate);
|
|
549
|
-
return /*#__PURE__*/
|
|
552
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
550
553
|
role: "row",
|
|
551
554
|
...stylex.props(monthGridStyles.weekRow),
|
|
552
|
-
children: [hasWeekNumbers && /*#__PURE__*/
|
|
555
|
+
children: [hasWeekNumbers && /*#__PURE__*/_jsx("div", {
|
|
553
556
|
role: "rowheader",
|
|
554
557
|
...stylex.props(monthGridStyles.weekNumber),
|
|
555
558
|
children: weekNum
|
|
556
|
-
}
|
|
559
|
+
}), week.map((day, dayIndex) => {
|
|
557
560
|
// Whether the previous/next day in this week row continues the
|
|
558
561
|
// highlighted run (range and preview). A disabled or
|
|
559
562
|
// adjacent-month neighbour breaks continuity, so this day gets
|
|
@@ -568,7 +571,7 @@ function MonthGrid({
|
|
|
568
571
|
previewEnd,
|
|
569
572
|
isDisabled: isDateDisabled
|
|
570
573
|
});
|
|
571
|
-
return /*#__PURE__*/
|
|
574
|
+
return /*#__PURE__*/_jsx(DayCell, {
|
|
572
575
|
day: day,
|
|
573
576
|
dayIndex: dayIndex,
|
|
574
577
|
mode: mode,
|
|
@@ -584,12 +587,12 @@ function MonthGrid({
|
|
|
584
587
|
isTabbable: day.iso === seedTabbableIso,
|
|
585
588
|
onDayClick: onDayClick,
|
|
586
589
|
onDayHover: onDayHover
|
|
587
|
-
}, day.iso
|
|
590
|
+
}, day.iso);
|
|
588
591
|
})]
|
|
589
|
-
}, plainDateToISO(weekDate)
|
|
592
|
+
}, plainDateToISO(weekDate));
|
|
590
593
|
})]
|
|
591
|
-
}
|
|
592
|
-
}
|
|
594
|
+
})
|
|
595
|
+
});
|
|
593
596
|
}
|
|
594
597
|
|
|
595
598
|
// =============================================================================
|
|
@@ -621,10 +624,10 @@ function DayCell({
|
|
|
621
624
|
if (isOutside && !hasOutsideDays) {
|
|
622
625
|
// Empty placeholder cell — still a gridcell so the grid geometry stays a
|
|
623
626
|
// clean 7-per-row set for keyboard navigation.
|
|
624
|
-
return /*#__PURE__*/
|
|
627
|
+
return /*#__PURE__*/_jsx("div", {
|
|
625
628
|
role: "gridcell",
|
|
626
629
|
...stylex.props(dayCellStyles.cell)
|
|
627
|
-
}
|
|
630
|
+
});
|
|
628
631
|
}
|
|
629
632
|
const state = computeDayCellState({
|
|
630
633
|
date,
|
|
@@ -648,15 +651,15 @@ function DayCell({
|
|
|
648
651
|
prevInPreview: neighbors.prevInPreview,
|
|
649
652
|
nextInPreview: neighbors.nextInPreview
|
|
650
653
|
});
|
|
651
|
-
return /*#__PURE__*/
|
|
654
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
652
655
|
role: "gridcell",
|
|
653
656
|
"aria-selected": state.isSelected || state.isInRange || undefined,
|
|
654
657
|
...stylex.props(dayCellStyles.cell),
|
|
655
|
-
children: [state.isInRange && /*#__PURE__*/
|
|
658
|
+
children: [state.isInRange && /*#__PURE__*/_jsx("div", {
|
|
656
659
|
...stylex.props(dayCellStyles.rangeBg, dayCellTheme.rangeBg, rangeRounding.roundLeft && dayCellStyles.rangeBgRadiusLeft, rangeRounding.roundRight && dayCellStyles.rangeBgRadiusRight, state.isRangeStart && dayCellStyles.rangeInsetLeft, state.isRangeStart && rangeRounding.roundRight && dayCellStyles.rangeInsetRight, state.isRangeEnd && dayCellStyles.rangeInsetRight, state.isRangeStart && rangeRounding.roundLeft && dayCellStyles.rangeInsetLeft)
|
|
657
|
-
}
|
|
660
|
+
}), state.isInPreview && /*#__PURE__*/_jsx("div", {
|
|
658
661
|
...stylex.props(dayCellStyles.previewBg, dayCellTheme.previewBg, previewRounding.roundLeft && dayCellStyles.previewBgRadiusLeft, previewRounding.roundRight && dayCellStyles.previewBgRadiusRight, state.isPreviewStart && dayCellStyles.previewStart, state.isPreviewEnd && dayCellStyles.previewEnd)
|
|
659
|
-
}
|
|
662
|
+
}), /*#__PURE__*/_jsx("button", {
|
|
660
663
|
type: "button",
|
|
661
664
|
"data-date": day.iso,
|
|
662
665
|
"aria-label": plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY),
|
|
@@ -679,6 +682,6 @@ function DayCell({
|
|
|
679
682
|
'in-range': state.isInRange ? 'in-range' : null
|
|
680
683
|
}), stylex.props(dayCellStyles.day, dayCellTheme.day, isOutside && dayCellStyles.dayOutside, isOutside && dayCellTheme.dayOutside, state.isToday && !state.isSelected && !state.isInRange && dayCellStyles.dayToday, state.isToday && !state.isSelected && !state.isInRange && dayCellTheme.dayToday, state.isToday && !state.isSelected && state.isInRange && dayCellStyles.dayTodayInRange, state.isToday && !state.isSelected && state.isInRange && dayCellTheme.dayTodayInRange, endpoint && dayCellStyles.daySelected, endpoint && dayCellTheme.daySelected, state.effectivelyDisabled && dayCellStyles.dayDisabled, state.effectivelyDisabled && dayCellTheme.dayDisabled)),
|
|
681
684
|
children: dayNumber
|
|
682
|
-
}
|
|
683
|
-
}
|
|
685
|
+
})]
|
|
686
|
+
});
|
|
684
687
|
}
|
package/dist/Card/Card.js
CHANGED
|
@@ -39,7 +39,7 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
39
39
|
* keeping content geometry faithful to the spacing scale and identical to the
|
|
40
40
|
* borderless variants. Themes can override borderWidth/borderColor.
|
|
41
41
|
*/
|
|
42
|
-
import {
|
|
42
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
43
43
|
// =============================================================================
|
|
44
44
|
// Styles
|
|
45
45
|
// =============================================================================
|
|
@@ -193,7 +193,7 @@ export function Card({
|
|
|
193
193
|
const useThemeDefault = padding == null;
|
|
194
194
|
const effectivePadding = padding ?? 4;
|
|
195
195
|
const paddingToken = spacingStepToToken[effectivePadding];
|
|
196
|
-
return /*#__PURE__*/
|
|
196
|
+
return /*#__PURE__*/_jsx("div", {
|
|
197
197
|
ref: ref,
|
|
198
198
|
...mergeProps(themeProps('card', {
|
|
199
199
|
variant
|
|
@@ -210,6 +210,6 @@ export function Card({
|
|
|
210
210
|
variant === 'default' && styles.withBorder, xstyle), className, style),
|
|
211
211
|
...props,
|
|
212
212
|
children: children
|
|
213
|
-
}
|
|
213
|
+
});
|
|
214
214
|
}
|
|
215
215
|
Card.displayName = 'Card';
|
|
@@ -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,7 +25,8 @@ 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 {
|
|
28
|
+
import { useTranslator } from "../i18n/index.js";
|
|
29
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
30
|
// =============================================================================
|
|
30
31
|
// Styles
|
|
31
32
|
// =============================================================================
|
|
@@ -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,
|
|
@@ -257,26 +260,26 @@ export function Carousel({
|
|
|
257
260
|
width: 'anchor-size(width)',
|
|
258
261
|
height: 'anchor-size(height)'
|
|
259
262
|
};
|
|
260
|
-
return /*#__PURE__*/
|
|
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
|
-
|
|
267
|
-
...htmlProps,
|
|
268
|
-
children: [/*#__PURE__*/_jsxDEV("div", {
|
|
271
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
269
272
|
ref: composedRef,
|
|
270
273
|
tabIndex: 0,
|
|
271
274
|
...stylex.props(styles.scroller, gapStyles[gap], padding != null && paddingStyles[padding], hasSnap && styles.snap, fadeStyle),
|
|
272
|
-
children: Children.map(children, child => /*#__PURE__*/
|
|
275
|
+
children: Children.map(children, child => /*#__PURE__*/_jsx("div", {
|
|
273
276
|
...{
|
|
274
277
|
className: "x1bhewko x78zum5 x2lah0s"
|
|
275
278
|
},
|
|
276
279
|
children: child
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
children: [/*#__PURE__*/
|
|
280
|
+
}))
|
|
281
|
+
}), hasButtons && layer.render(/*#__PURE__*/_jsxs(_Fragment, {
|
|
282
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
280
283
|
...{
|
|
281
284
|
0: {
|
|
282
285
|
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xuuh30"
|
|
@@ -285,12 +288,12 @@ export function Carousel({
|
|
|
285
288
|
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xuuh30 xg01cxk x47corl"
|
|
286
289
|
}
|
|
287
290
|
}[!!!overflowStart << 0],
|
|
288
|
-
children: /*#__PURE__*/
|
|
289
|
-
icon: /*#__PURE__*/
|
|
291
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
292
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
290
293
|
icon: "chevronLeft",
|
|
291
294
|
size: "xsm"
|
|
292
|
-
}
|
|
293
|
-
label:
|
|
295
|
+
}),
|
|
296
|
+
label: t('@astryx.carousel.scrollLeft'),
|
|
294
297
|
variant: "ghost",
|
|
295
298
|
size: "sm",
|
|
296
299
|
isIconOnly: true
|
|
@@ -302,8 +305,8 @@ export function Carousel({
|
|
|
302
305
|
isDisabled: !overflowStart,
|
|
303
306
|
onClick: () => scrollBy(-1),
|
|
304
307
|
xstyle: styles.buttonRadiusOverride
|
|
305
|
-
}
|
|
306
|
-
}
|
|
308
|
+
})
|
|
309
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
307
310
|
...{
|
|
308
311
|
0: {
|
|
309
312
|
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xitnhlw"
|
|
@@ -312,12 +315,12 @@ export function Carousel({
|
|
|
312
315
|
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xitnhlw xg01cxk x47corl"
|
|
313
316
|
}
|
|
314
317
|
}[!!!overflowEnd << 0],
|
|
315
|
-
children: /*#__PURE__*/
|
|
316
|
-
icon: /*#__PURE__*/
|
|
318
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
319
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
317
320
|
icon: "chevronRight",
|
|
318
321
|
size: "xsm"
|
|
319
|
-
}
|
|
320
|
-
label:
|
|
322
|
+
}),
|
|
323
|
+
label: t('@astryx.carousel.scrollRight'),
|
|
321
324
|
variant: "ghost",
|
|
322
325
|
size: "sm",
|
|
323
326
|
isIconOnly: true
|
|
@@ -327,13 +330,13 @@ export function Carousel({
|
|
|
327
330
|
isDisabled: !overflowEnd,
|
|
328
331
|
onClick: () => scrollBy(1),
|
|
329
332
|
xstyle: styles.buttonRadiusOverride
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
+
})
|
|
334
|
+
})]
|
|
335
|
+
}), {
|
|
333
336
|
positioning: 'custom',
|
|
334
337
|
style: coverStyle,
|
|
335
338
|
xstyle: styles.buttonOverlay
|
|
336
339
|
})]
|
|
337
|
-
}
|
|
340
|
+
});
|
|
338
341
|
}
|
|
339
342
|
Carousel.displayName = 'Carousel';
|
package/dist/Center/Center.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import * as stylex from '@stylexjs/stylex';
|
|
18
18
|
import { mergeProps } from "../utils/index.js";
|
|
19
19
|
import { themeProps } from "../utils/themeProps.js";
|
|
20
|
-
import {
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const styles = {
|
|
22
22
|
base: {
|
|
23
23
|
k1xSpc: "x78zum5",
|
|
@@ -82,11 +82,11 @@ export function Center({
|
|
|
82
82
|
const stylexProps = mergeProps(themeProps('center', {
|
|
83
83
|
axis
|
|
84
84
|
}), stylex.props(isInline ? styles.inline : styles.base, (axis === 'both' || axis === 'vertical') && styles.alignItemsCenter, (axis === 'both' || axis === 'horizontal') && styles.justifyContentCenter, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), xstyle), className, style);
|
|
85
|
-
return /*#__PURE__*/
|
|
85
|
+
return /*#__PURE__*/_jsx("div", {
|
|
86
86
|
ref: ref,
|
|
87
87
|
...stylexProps,
|
|
88
88
|
...props,
|
|
89
89
|
children: children
|
|
90
|
-
}
|
|
90
|
+
});
|
|
91
91
|
}
|
|
92
92
|
Center.displayName = 'Center';
|
|
@@ -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;AAwB5C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,SAAS,CAAC,cAAc,CAAC,EACzB,UAAU,GAAG,UAAU,CACxB;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAI9B,6GAA6G;IAC7G,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,yHAAyH;IACzH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,yGAAyG;IACzG,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gHAAgH;IAChH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,gHAAgH;IAChH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gDAAgD;IAChD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iEAAiE;IACjE,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"}
|