@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
|
@@ -24,11 +24,12 @@ import { TreeListBranches } from "./TreeListBranches.js";
|
|
|
24
24
|
import "./treeListItem.markers.stylex.js";
|
|
25
25
|
import { treeItemScope } from "./treeListItem.markers.stylex.js";
|
|
26
26
|
import { themeProps } from "../utils/themeProps.js";
|
|
27
|
+
import { useTranslator } from "../i18n/index.js";
|
|
27
28
|
|
|
28
29
|
// =============================================================================
|
|
29
30
|
// Styles
|
|
30
31
|
// =============================================================================
|
|
31
|
-
import {
|
|
32
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
33
|
const styles = {
|
|
33
34
|
wrapper: {
|
|
34
35
|
kH6xsr: "x3ct3a4",
|
|
@@ -149,6 +150,7 @@ export function TreeListItem({
|
|
|
149
150
|
setSize,
|
|
150
151
|
isTabbable
|
|
151
152
|
}) {
|
|
153
|
+
const t = useTranslator();
|
|
152
154
|
const labelId = useId();
|
|
153
155
|
const descriptionId = useId();
|
|
154
156
|
const LinkComponent = useLinkComponent();
|
|
@@ -177,20 +179,20 @@ export function TreeListItem({
|
|
|
177
179
|
return undefined;
|
|
178
180
|
}, [onClick, hasChildren, onToggle, id, isDisabled]);
|
|
179
181
|
const computedMarginLeft = hasChildren ? `calc(${nestedLevel} * ${spacingVars['--spacing-4']})` : `calc(${nestedLevel} * ${spacingVars['--spacing-4']} + ${spacingVars['--spacing-4']} + ${spacingVars['--spacing-2']})`;
|
|
180
|
-
const labelAndDescription = /*#__PURE__*/
|
|
181
|
-
children: [/*#__PURE__*/
|
|
182
|
+
const labelAndDescription = /*#__PURE__*/_jsxs(_Fragment, {
|
|
183
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
182
184
|
id: labelId,
|
|
183
185
|
...{
|
|
184
186
|
className: "x1tgivj0"
|
|
185
187
|
},
|
|
186
188
|
children: label
|
|
187
|
-
}
|
|
189
|
+
}), description != null && /*#__PURE__*/_jsx("span", {
|
|
188
190
|
id: descriptionId,
|
|
189
191
|
...stylex.props(styles.description, descriptionSizeStyles[density]),
|
|
190
192
|
children: description
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
const chevronIcon = /*#__PURE__*/
|
|
193
|
+
})]
|
|
194
|
+
});
|
|
195
|
+
const chevronIcon = /*#__PURE__*/_jsx("span", {
|
|
194
196
|
...{
|
|
195
197
|
0: {
|
|
196
198
|
className: "x78zum5 x11xpdln xuedmi6 xlr8y92 x7p49u4"
|
|
@@ -200,7 +202,7 @@ export function TreeListItem({
|
|
|
200
202
|
}
|
|
201
203
|
}[!!isExpanded << 0],
|
|
202
204
|
children: getIcon('chevronRight')
|
|
203
|
-
}
|
|
205
|
+
});
|
|
204
206
|
const chevron = hasChildren ? handleToggle != null ?
|
|
205
207
|
/*#__PURE__*/
|
|
206
208
|
// Real toggle button whenever expand/collapse is supported, so the row
|
|
@@ -208,10 +210,14 @@ export function TreeListItem({
|
|
|
208
210
|
// (row-level onClick is the only click path in that case, but there is no
|
|
209
211
|
// focusable element to receive Enter/Space). The row's handleClick ignores
|
|
210
212
|
// clicks originating inside a <button>, so this never double-toggles.
|
|
211
|
-
|
|
213
|
+
_jsx("button", {
|
|
212
214
|
type: "button",
|
|
213
215
|
"aria-expanded": isExpanded,
|
|
214
|
-
"aria-label":
|
|
216
|
+
"aria-label": t('@astryx.treeList.toggleChildren')
|
|
217
|
+
// Stable identity for TreeList's activateItem selector — do not
|
|
218
|
+
// remove without also updating TreeList.tsx.
|
|
219
|
+
,
|
|
220
|
+
"data-tree-toggle": "",
|
|
215
221
|
disabled: isDisabled
|
|
216
222
|
// Roving tabindex lives on the treeitem row; the chevron toggle is not
|
|
217
223
|
// a separate tab stop. Row-level Enter/Space forwards to this button.
|
|
@@ -222,22 +228,22 @@ export function TreeListItem({
|
|
|
222
228
|
className: "x78zum5 x6s0dn4 xl56j7k x12xnipv x6b6gus xho7bvi x1ypdohk xv9yike xx3sua9 x11g1kdw xmequkd"
|
|
223
229
|
},
|
|
224
230
|
children: chevronIcon
|
|
225
|
-
}
|
|
231
|
+
}) :
|
|
226
232
|
/*#__PURE__*/
|
|
227
233
|
// Non-interactive chevron only when toggling is not wired up at all
|
|
228
|
-
|
|
234
|
+
_jsx("span", {
|
|
229
235
|
...{
|
|
230
236
|
className: "x2lah0s x78zum5 x6s0dn4 xl56j7k x12xnipv x6b6gus xho7bvi x1ypdohk x1717udv xv9yike xx3sua9 x11g1kdw xmequkd"
|
|
231
237
|
},
|
|
232
238
|
children: chevronIcon
|
|
233
|
-
}
|
|
234
|
-
const innerContent = /*#__PURE__*/
|
|
235
|
-
children: [chevron, startContent != null && /*#__PURE__*/
|
|
239
|
+
}) : null;
|
|
240
|
+
const innerContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
241
|
+
children: [chevron, startContent != null && /*#__PURE__*/_jsx("span", {
|
|
236
242
|
...{
|
|
237
243
|
className: "x2lah0s x78zum5 x6s0dn4"
|
|
238
244
|
},
|
|
239
245
|
children: startContent
|
|
240
|
-
}
|
|
246
|
+
}), href != null ? /*#__PURE__*/_jsx(LinkComponent, {
|
|
241
247
|
href: href,
|
|
242
248
|
target: target,
|
|
243
249
|
"aria-disabled": isDisabled || undefined,
|
|
@@ -251,7 +257,7 @@ export function TreeListItem({
|
|
|
251
257
|
className: "xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz"
|
|
252
258
|
},
|
|
253
259
|
children: labelAndDescription
|
|
254
|
-
}
|
|
260
|
+
}) : onClick != null ? /*#__PURE__*/_jsx("button", {
|
|
255
261
|
type: "button",
|
|
256
262
|
onClick: onClick,
|
|
257
263
|
disabled: isDisabled,
|
|
@@ -265,19 +271,19 @@ export function TreeListItem({
|
|
|
265
271
|
className: "xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz"
|
|
266
272
|
},
|
|
267
273
|
children: labelAndDescription
|
|
268
|
-
}
|
|
274
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
269
275
|
...{
|
|
270
276
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"
|
|
271
277
|
},
|
|
272
278
|
children: labelAndDescription
|
|
273
|
-
}
|
|
279
|
+
}), endContent != null && /*#__PURE__*/_jsx("span", {
|
|
274
280
|
...{
|
|
275
281
|
className: "x2lah0s x78zum5 x6s0dn4 xvc5jky"
|
|
276
282
|
},
|
|
277
283
|
children: endContent
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
return /*#__PURE__*/
|
|
284
|
+
})]
|
|
285
|
+
});
|
|
286
|
+
return /*#__PURE__*/_jsxs("li", {
|
|
281
287
|
role: "treeitem",
|
|
282
288
|
"aria-expanded": hasChildren ? isExpanded : undefined,
|
|
283
289
|
"aria-selected": isSelected || undefined,
|
|
@@ -294,20 +300,20 @@ export function TreeListItem({
|
|
|
294
300
|
"data-tree-level": nestedLevel + 1,
|
|
295
301
|
"data-tree-disabled": isDisabled || undefined,
|
|
296
302
|
...stylex.props(styles.wrapper, treeItemScope),
|
|
297
|
-
children: [/*#__PURE__*/
|
|
303
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
298
304
|
...{
|
|
299
305
|
className: "x12gdq22"
|
|
300
306
|
},
|
|
301
|
-
children: /*#__PURE__*/
|
|
307
|
+
children: /*#__PURE__*/_jsx(TreeListBranches, {
|
|
302
308
|
ancestorsIsLast: ancestorsIsLast,
|
|
303
309
|
isLast: isLast,
|
|
304
310
|
nestedLevel: nestedLevel
|
|
305
|
-
}
|
|
306
|
-
}
|
|
311
|
+
})
|
|
312
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
307
313
|
...{
|
|
308
314
|
className: "x1n2onr6"
|
|
309
315
|
},
|
|
310
|
-
children: /*#__PURE__*/
|
|
316
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
311
317
|
...mergeProps(themeProps('tree-list-item', {
|
|
312
318
|
density,
|
|
313
319
|
selected: isSelected ? 'selected' : null,
|
|
@@ -318,14 +324,14 @@ export function TreeListItem({
|
|
|
318
324
|
},
|
|
319
325
|
onClick: handleClick,
|
|
320
326
|
children: innerContent
|
|
321
|
-
}
|
|
322
|
-
}
|
|
327
|
+
})
|
|
328
|
+
}), isExpanded && renderedChildren != null && /*#__PURE__*/_jsx("ul", {
|
|
323
329
|
role: "group",
|
|
324
330
|
...{
|
|
325
331
|
className: "x1ghz6dp x1717udv x3ct3a4"
|
|
326
332
|
},
|
|
327
333
|
children: renderedChildren
|
|
328
|
-
}
|
|
329
|
-
}
|
|
334
|
+
})]
|
|
335
|
+
});
|
|
330
336
|
}
|
|
331
337
|
TreeListItem.displayName = 'TreeListItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTypeahead.d.ts","sourceRoot":"","sources":["../../src/Typeahead/BaseTypeahead.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAcnD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseTypeahead.d.ts","sourceRoot":"","sources":["../../src/Typeahead/BaseTypeahead.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAcnD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAQ1D,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,IAAI,CACxE,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,CACX;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IAEpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAE3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAE1C;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE/D;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAuGD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAihBrB,CAAC,CAAC,SAAS,cAAc,EAC5B,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KACzB,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -26,11 +26,12 @@ import "../theme/tokens.stylex.js";
|
|
|
26
26
|
import { colorVars, spacingVars, radiusVars, typographyVars, fontWeightVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
27
27
|
import { getKey, mergeProps, mergeRefs } from "../utils/index.js";
|
|
28
28
|
import { themeProps } from "../utils/themeProps.js";
|
|
29
|
+
import { useTranslator } from "../i18n/index.js";
|
|
29
30
|
|
|
30
31
|
// =============================================================================
|
|
31
32
|
// Types
|
|
32
33
|
// =============================================================================
|
|
33
|
-
import {
|
|
34
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
35
|
// =============================================================================
|
|
35
36
|
// Styles
|
|
36
37
|
// =============================================================================
|
|
@@ -137,10 +138,10 @@ export const BaseTypeahead = function BaseTypeahead({
|
|
|
137
138
|
value,
|
|
138
139
|
onChange,
|
|
139
140
|
renderItem,
|
|
140
|
-
placeholder
|
|
141
|
+
placeholder: placeholderFromProps,
|
|
141
142
|
hasEntriesOnFocus = false,
|
|
142
143
|
maxMenuItems = 10,
|
|
143
|
-
emptySearchResultsText
|
|
144
|
+
emptySearchResultsText: emptySearchResultsTextFromProps,
|
|
144
145
|
isDisabled = false,
|
|
145
146
|
isFocusableDisabled = false,
|
|
146
147
|
hasAutoFocus = false,
|
|
@@ -156,6 +157,9 @@ export const BaseTypeahead = function BaseTypeahead({
|
|
|
156
157
|
size = 'md',
|
|
157
158
|
ref
|
|
158
159
|
}) {
|
|
160
|
+
const t = useTranslator();
|
|
161
|
+
const placeholder = placeholderFromProps ?? t('@astryx.typeahead.searchPlaceholder');
|
|
162
|
+
const emptySearchResultsText = emptySearchResultsTextFromProps ?? t('@astryx.typeahead.emptySearchResults');
|
|
159
163
|
const generatedId = useId();
|
|
160
164
|
const inputId = externalInputId ?? generatedId;
|
|
161
165
|
const listboxId = useId();
|
|
@@ -471,8 +475,8 @@ export const BaseTypeahead = function BaseTypeahead({
|
|
|
471
475
|
searchSource.cancel?.();
|
|
472
476
|
};
|
|
473
477
|
}, [searchSource]);
|
|
474
|
-
return /*#__PURE__*/
|
|
475
|
-
children: [/*#__PURE__*/
|
|
478
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
479
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
476
480
|
ref: mergeRefs(ref, inputRef, fallbackAnchorRef),
|
|
477
481
|
id: inputId,
|
|
478
482
|
type: "text",
|
|
@@ -508,33 +512,33 @@ export const BaseTypeahead = function BaseTypeahead({
|
|
|
508
512
|
"data-autofocus": hasAutoFocus || undefined,
|
|
509
513
|
autoComplete: "off",
|
|
510
514
|
...stylex.props(styles.input, isDisabled && styles.inputDisabled, inputXStyle)
|
|
511
|
-
}
|
|
515
|
+
}), isLoading && /*#__PURE__*/_jsx("span", {
|
|
512
516
|
role: "status",
|
|
513
|
-
"aria-label":
|
|
517
|
+
"aria-label": t('@astryx.typeahead.loading'),
|
|
514
518
|
...{
|
|
515
519
|
className: "x3nfvp2 x6s0dn4 xl56j7k x9epnlk"
|
|
516
520
|
},
|
|
517
|
-
children: /*#__PURE__*/
|
|
521
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
518
522
|
icon: "clock",
|
|
519
523
|
size: "sm",
|
|
520
524
|
color: "secondary"
|
|
521
|
-
}
|
|
522
|
-
}
|
|
525
|
+
})
|
|
526
|
+
}), popover.render(/*#__PURE__*/_jsx("div", {
|
|
523
527
|
id: listboxId,
|
|
524
528
|
role: "listbox",
|
|
525
|
-
"aria-label":
|
|
529
|
+
"aria-label": t('@astryx.typeahead.searchResults'),
|
|
526
530
|
...mergeProps(themeProps('typeahead-dropdown'), {
|
|
527
531
|
className: "x9f619 xuyqlj2 x1odjw0f x9epnlk"
|
|
528
532
|
}),
|
|
529
|
-
children: results.length === 0 && hasSearched ? /*#__PURE__*/
|
|
533
|
+
children: results.length === 0 && hasSearched ? /*#__PURE__*/_jsx("div", {
|
|
530
534
|
...{
|
|
531
535
|
className: "x1b2ylru x2b8uid x141an7d xv1l7n4"
|
|
532
536
|
},
|
|
533
537
|
children: emptySearchResultsText
|
|
534
|
-
}
|
|
538
|
+
}) : results.map((item, index) => {
|
|
535
539
|
const itemKey = getKey(item.id, index);
|
|
536
540
|
const isSelected = itemKey === selectedKey;
|
|
537
|
-
return /*#__PURE__*/
|
|
541
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
538
542
|
id: getItemId(index),
|
|
539
543
|
role: "option",
|
|
540
544
|
"aria-selected": isSelected,
|
|
@@ -542,25 +546,25 @@ export const BaseTypeahead = function BaseTypeahead({
|
|
|
542
546
|
onClick: () => handleSelect(item),
|
|
543
547
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
544
548
|
...stylex.props(styles.item, itemSizeStyles[size], index === highlightedIndex && styles.itemHighlighted, isSelected && styles.itemSelected),
|
|
545
|
-
children: [/*#__PURE__*/
|
|
549
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
546
550
|
...{
|
|
547
551
|
className: "x78zum5 x98rzlu xeuugli"
|
|
548
552
|
},
|
|
549
|
-
children: renderItem ? renderItem(item) : /*#__PURE__*/
|
|
553
|
+
children: renderItem ? renderItem(item) : /*#__PURE__*/_jsx(TypeaheadItem, {
|
|
550
554
|
item: item
|
|
551
|
-
}
|
|
552
|
-
}
|
|
555
|
+
})
|
|
556
|
+
}), isSelected && /*#__PURE__*/_jsx(Icon, {
|
|
553
557
|
icon: "check",
|
|
554
558
|
size: "sm",
|
|
555
559
|
color: "primary"
|
|
556
|
-
}
|
|
557
|
-
}, itemKey
|
|
560
|
+
})]
|
|
561
|
+
}, itemKey);
|
|
558
562
|
})
|
|
559
|
-
}
|
|
563
|
+
}), {
|
|
560
564
|
placement: 'below',
|
|
561
565
|
alignment: 'start',
|
|
562
566
|
xstyle: [styles.popover, styles.popoverGap]
|
|
563
567
|
})]
|
|
564
|
-
}
|
|
568
|
+
});
|
|
565
569
|
};
|
|
566
570
|
BaseTypeahead.displayName = 'BaseTypeahead';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/Typeahead/Typeahead.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAKZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAMtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/Typeahead/Typeahead.tsx"],"names":[],"mappings":"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"}
|
|
@@ -32,7 +32,8 @@ import { groupStyles } from "../InputGroup/groupStyles.js";
|
|
|
32
32
|
import { useInputGroup } from "../InputGroup/InputGroupContext.js";
|
|
33
33
|
import { getInputARIA, mergeProps, mergeRefs } from "../utils/index.js";
|
|
34
34
|
import { themeProps } from "../utils/themeProps.js";
|
|
35
|
-
import {
|
|
35
|
+
import { useTranslator } from "../i18n/index.js";
|
|
36
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
36
37
|
// =============================================================================
|
|
37
38
|
// Styles
|
|
38
39
|
// =============================================================================
|
|
@@ -144,6 +145,7 @@ export function Typeahead({
|
|
|
144
145
|
style,
|
|
145
146
|
'data-testid': testId
|
|
146
147
|
}) {
|
|
148
|
+
const t = useTranslator();
|
|
147
149
|
const size = useSize(sizeProp, 'md');
|
|
148
150
|
const inputId = useId();
|
|
149
151
|
const inputLabelId = useId();
|
|
@@ -267,8 +269,8 @@ export function Typeahead({
|
|
|
267
269
|
ariaDescribedBy
|
|
268
270
|
} = getInputARIA(inputLabelId, [description ? descriptionId : null, status?.message ? statusMessageId : null, showsDisabledMessage ? disabledMessageTooltip.describedBy : null], inputGroup);
|
|
269
271
|
const sizeStyle = wrapperSizeStyles[size];
|
|
270
|
-
const typeaheadContent = /*#__PURE__*/
|
|
271
|
-
children: [/*#__PURE__*/
|
|
272
|
+
const typeaheadContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
273
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
272
274
|
ref: mergeRefs(wrapperRef, disabledMessageTooltip.ref, inputGroup ? ref : undefined),
|
|
273
275
|
"data-testid": testId,
|
|
274
276
|
onClick: handleWrapperClick,
|
|
@@ -280,17 +282,17 @@ export function Typeahead({
|
|
|
280
282
|
children: [startIcon && renderIconSlot(startIcon, {
|
|
281
283
|
size: 'sm',
|
|
282
284
|
color: 'secondary'
|
|
283
|
-
}), inputGroup && /*#__PURE__*/
|
|
285
|
+
}), inputGroup && /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
284
286
|
id: inputLabelId,
|
|
285
287
|
children: label
|
|
286
|
-
}
|
|
288
|
+
}), showToken && /*#__PURE__*/_jsx(Token, {
|
|
287
289
|
ref: tokenRef,
|
|
288
290
|
label: value.label,
|
|
289
291
|
size: size,
|
|
290
292
|
onClick: handleEnterEditMode,
|
|
291
293
|
isDisabled: isDisabled,
|
|
292
294
|
xstyle: styles.token
|
|
293
|
-
}
|
|
295
|
+
}), /*#__PURE__*/_jsx(BaseTypeahead, {
|
|
294
296
|
ref: inputRef,
|
|
295
297
|
searchSource: searchSource,
|
|
296
298
|
value: value,
|
|
@@ -313,20 +315,20 @@ export function Typeahead({
|
|
|
313
315
|
onKeyDown: handleKeyDown,
|
|
314
316
|
inputXStyle: showToken ? styles.inputHidden : undefined,
|
|
315
317
|
size: size
|
|
316
|
-
}
|
|
317
|
-
label:
|
|
318
|
+
}), hasClear && value && !isDisabled && /*#__PURE__*/_jsx(InputClearButton, {
|
|
319
|
+
label: t('@astryx.typeahead.clearSelection'),
|
|
318
320
|
onClick: e => {
|
|
319
321
|
e.stopPropagation();
|
|
320
322
|
handleClear();
|
|
321
323
|
},
|
|
322
324
|
xstyle: [styles.clearButton, size === 'sm' && styles.clearButtonSm]
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
325
|
+
})]
|
|
326
|
+
}), showsDisabledMessage && disabledMessageTooltip.renderTooltip(disabledMessage)]
|
|
327
|
+
});
|
|
326
328
|
if (inputGroup) {
|
|
327
329
|
return typeaheadContent;
|
|
328
330
|
}
|
|
329
|
-
return /*#__PURE__*/
|
|
331
|
+
return /*#__PURE__*/_jsx(Field, {
|
|
330
332
|
ref: ref,
|
|
331
333
|
label: label,
|
|
332
334
|
isLabelHidden: isLabelHidden,
|
|
@@ -347,6 +349,6 @@ export function Typeahead({
|
|
|
347
349
|
className: className,
|
|
348
350
|
style: style,
|
|
349
351
|
children: typeaheadContent
|
|
350
|
-
}
|
|
352
|
+
});
|
|
351
353
|
}
|
|
352
354
|
Typeahead.displayName = 'Typeahead';
|
|
@@ -21,7 +21,7 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
21
21
|
// =============================================================================
|
|
22
22
|
// Types
|
|
23
23
|
// =============================================================================
|
|
24
|
-
import { Fragment as _Fragment,
|
|
24
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; // =============================================================================
|
|
25
25
|
// Styles
|
|
26
26
|
// =============================================================================
|
|
27
27
|
// =============================================================================
|
|
@@ -61,11 +61,11 @@ export function TypeaheadItem({
|
|
|
61
61
|
}) {
|
|
62
62
|
// If item has a pre-rendered element, use it
|
|
63
63
|
if (item.element) {
|
|
64
|
-
return /*#__PURE__*/
|
|
64
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
65
65
|
children: item.element
|
|
66
|
-
}
|
|
66
|
+
});
|
|
67
67
|
}
|
|
68
|
-
return /*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
69
69
|
ref: ref,
|
|
70
70
|
...mergeProps(themeProps('typeahead-item'), {
|
|
71
71
|
0: {
|
|
@@ -75,22 +75,22 @@ export function TypeaheadItem({
|
|
|
75
75
|
className: "x78zum5 x6s0dn4 x1txdalj x2lwn1j xbyyjgo"
|
|
76
76
|
}
|
|
77
77
|
}[!!isDisabled << 0]),
|
|
78
|
-
children: [icon, /*#__PURE__*/
|
|
78
|
+
children: [icon, /*#__PURE__*/_jsxs("div", {
|
|
79
79
|
...{
|
|
80
80
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli"
|
|
81
81
|
},
|
|
82
|
-
children: [/*#__PURE__*/
|
|
82
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
83
83
|
...{
|
|
84
84
|
className: "xcr08ib x1kq96og x1sodnla x1tgivj0 xb3r6kr xlyipyv xuxw1ft"
|
|
85
85
|
},
|
|
86
86
|
children: item.label
|
|
87
|
-
}
|
|
87
|
+
}), description && /*#__PURE__*/_jsx("span", {
|
|
88
88
|
...{
|
|
89
89
|
className: "x141an7d x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft"
|
|
90
90
|
},
|
|
91
91
|
children: description
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
92
|
+
})]
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
95
|
}
|
|
96
96
|
TypeaheadItem.displayName = 'TypeaheadItem';
|
package/dist/VStack/VStack.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { Stack } from "../Stack/Stack.js";
|
|
16
|
-
import {
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
/**
|
|
18
18
|
* Vertical stack component for arranging items top-to-bottom.
|
|
19
19
|
* Convenience wrapper around `Stack` with `direction="vertical"`.
|
|
@@ -34,12 +34,12 @@ export function VStack({
|
|
|
34
34
|
vAlign,
|
|
35
35
|
...props
|
|
36
36
|
}) {
|
|
37
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/_jsx(Stack, {
|
|
38
38
|
...props,
|
|
39
39
|
direction: "vertical",
|
|
40
40
|
hAlign: hAlign ?? align,
|
|
41
41
|
vAlign: vAlign ?? justify,
|
|
42
42
|
ref: ref
|
|
43
|
-
}
|
|
43
|
+
});
|
|
44
44
|
}
|
|
45
45
|
VStack.displayName = 'VStack';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* - /packages/core/src/VisuallyHidden/VisuallyHidden.doc.mjs
|
|
10
10
|
* - /packages/core/src/VisuallyHidden/VisuallyHidden.test.tsx
|
|
11
11
|
* - /apps/storybook/stories/VisuallyHidden.stories.tsx
|
|
12
|
+
* - /packages/cli/templates/blocks/components/VisuallyHidden/ (showcase blocks)
|
|
12
13
|
*/
|
|
13
14
|
import { type ElementType, type ReactNode } from 'react';
|
|
14
15
|
import type { BaseProps } from '../BaseProps';
|
|
@@ -43,12 +44,9 @@ export interface VisuallyHiddenProps extends Omit<BaseProps<HTMLElement>, 'class
|
|
|
43
44
|
*
|
|
44
45
|
* @example
|
|
45
46
|
* ```
|
|
46
|
-
* // Accessible name for an icon-only button
|
|
47
47
|
* <IconButton icon="trash" label="">
|
|
48
48
|
* <VisuallyHidden>Delete incident</VisuallyHidden>
|
|
49
49
|
* </IconButton>
|
|
50
|
-
*
|
|
51
|
-
* // Live region for announcements
|
|
52
50
|
* <VisuallyHidden as="div" aria-live="polite">
|
|
53
51
|
* {`Moved ${task} to ${column}`}
|
|
54
52
|
* </VisuallyHidden>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.d.ts","sourceRoot":"","sources":["../../src/VisuallyHidden/VisuallyHidden.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.d.ts","sourceRoot":"","sources":["../../src/VisuallyHidden/VisuallyHidden.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAgB,KAAK,WAAW,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAChF,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,SAAS,CAAC,WAAW,CAAC,EACtB,WAAW,GAAG,OAAO,CACtB;IACC,6CAA6C;IAC7C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE7B,yEAAyE;IACzE,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAyBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,EAAE,EAAE,OAAgB,EACpB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,mBAAmB,0FAarB;yBAlBe,cAAc"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* - /packages/core/src/VisuallyHidden/VisuallyHidden.doc.mjs
|
|
14
14
|
* - /packages/core/src/VisuallyHidden/VisuallyHidden.test.tsx
|
|
15
15
|
* - /apps/storybook/stories/VisuallyHidden.stories.tsx
|
|
16
|
+
* - /packages/cli/templates/blocks/components/VisuallyHidden/ (showcase blocks)
|
|
16
17
|
*/
|
|
17
18
|
import { createElement } from 'react';
|
|
18
19
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -34,12 +35,9 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
34
35
|
*
|
|
35
36
|
* @example
|
|
36
37
|
* ```
|
|
37
|
-
* // Accessible name for an icon-only button
|
|
38
38
|
* <IconButton icon="trash" label="">
|
|
39
39
|
* <VisuallyHidden>Delete incident</VisuallyHidden>
|
|
40
40
|
* </IconButton>
|
|
41
|
-
*
|
|
42
|
-
* // Live region for announcements
|
|
43
41
|
* <VisuallyHidden as="div" aria-live="polite">
|
|
44
42
|
* {`Moved ${task} to ${column}`}
|
|
45
43
|
* </VisuallyHidden>
|