@astryxdesign/core 0.1.9 → 0.2.0-canary.136a00f
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 +107 -0
- package/dist/Avatar/Avatar.d.ts +42 -3
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +190 -59
- package/dist/Avatar/AvatarStatusDot.d.ts +6 -4
- package/dist/Avatar/AvatarStatusDot.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts +7 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +58 -6
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +7 -2
- package/dist/Banner/Banner.js +2 -2
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +11 -4
- package/dist/Breadcrumbs/index.d.ts +1 -0
- package/dist/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/Breadcrumbs/index.js +2 -1
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +6 -4
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +50 -9
- package/dist/Calendar/dayCellUtils.d.ts +4 -4
- package/dist/Calendar/dayCellUtils.js +2 -2
- package/dist/Calendar/styles.d.ts +30 -31
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +30 -31
- package/dist/Card/Card.js +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +22 -12
- package/dist/Chat/ChatComposerInput.js +1 -1
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +3 -1
- package/dist/Chat/ChatLayout.js +4 -4
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +8 -8
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +10 -3
- package/dist/Chat/useTriggerMenu.js +2 -2
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +6 -6
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +19 -4
- package/dist/Citation/Citation.d.ts +22 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -6
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +16 -10
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +3 -1
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +42 -3
- package/dist/CommandPalette/CommandPaletteItem.js +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +23 -5
- package/dist/ContextMenu/index.d.ts +1 -0
- package/dist/ContextMenu/index.d.ts.map +1 -1
- package/dist/ContextMenu/index.js +3 -1
- package/dist/DateInput/DateInput.d.ts +10 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +33 -19
- package/dist/DateRangeInput/DateRangeInput.d.ts +10 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +23 -20
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +23 -18
- package/dist/Divider/Divider.d.ts +2 -2
- package/dist/Divider/Divider.d.ts.map +1 -1
- package/dist/Divider/Divider.js +13 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +6 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +22 -5
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +5 -2
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts +8 -11
- package/dist/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioGroup.js +3 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +5 -2
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +104 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -0
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +427 -0
- package/dist/DropdownMenu/index.d.ts +10 -0
- package/dist/DropdownMenu/index.d.ts.map +1 -1
- package/dist/DropdownMenu/index.js +13 -0
- package/dist/DropdownMenu/menuItemHover.d.ts +23 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -0
- package/dist/DropdownMenu/menuItemHover.js +33 -0
- package/dist/DropdownMenu/menuItemRoles.d.ts +8 -0
- package/dist/DropdownMenu/menuItemRoles.d.ts.map +1 -1
- package/dist/DropdownMenu/menuItemRoles.js +10 -1
- package/dist/DropdownMenu/renderDropdownItems.d.ts.map +1 -1
- package/dist/DropdownMenu/renderDropdownItems.js +21 -6
- package/dist/Field/Field.d.ts +3 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +4 -1
- package/dist/Field/FieldLabel.d.ts +2 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +9 -5
- package/dist/Field/inputStyles.stylex.d.ts +1 -0
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +1 -0
- package/dist/FieldStatus/FieldStatus.d.ts +10 -0
- package/dist/FieldStatus/FieldStatus.d.ts.map +1 -1
- package/dist/FieldStatus/FieldStatus.js +39 -3
- package/dist/FileInput/FileInput.d.ts +10 -2
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +93 -65
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +10 -4
- package/dist/Icon/Icon.d.ts +15 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +19 -3
- package/dist/Item/Item.d.ts +16 -3
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +31 -6
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +10 -2
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +19 -13
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +6 -3
- package/dist/List/ListItem.d.ts +11 -1
- package/dist/List/ListItem.d.ts.map +1 -1
- package/dist/List/ListItem.js +2 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +7 -0
- package/dist/MetadataList/MetadataList.d.ts +1 -1
- package/dist/MetadataList/MetadataList.d.ts.map +1 -1
- package/dist/MetadataList/MetadataList.js +4 -2
- package/dist/MultiSelector/MultiSelector.d.ts +9 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +80 -42
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -1
- package/dist/NumberInput/NumberInput.d.ts +10 -2
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +22 -17
- package/dist/Outline/Outline.js +2 -2
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +11 -3
- package/dist/PowerSearch/PowerSearch.d.ts +9 -2
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +2 -0
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +6 -1
- package/dist/RadioList/RadioList.d.ts +2 -2
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -5
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +49 -19
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +5 -3
- package/dist/Selector/Selector.d.ts +8 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +66 -17
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +5 -5
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +13 -10
- package/dist/SideNav/SideNavItem.d.ts +1 -1
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +12 -10
- package/dist/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/Skeleton/Skeleton.js +2 -2
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +87 -34
- package/dist/Spinner/Spinner.d.ts +3 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +11 -2
- package/dist/Switch/Switch.d.ts +8 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +171 -91
- package/dist/TabList/Tab.js +2 -2
- package/dist/TabList/TabList.d.ts +2 -11
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +5 -9
- package/dist/TabList/TabListContext.d.ts +0 -5
- package/dist/TabList/TabListContext.d.ts.map +1 -1
- package/dist/TabList/TabListContext.js +0 -5
- package/dist/TabList/TabMenu.js +1 -1
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +30 -4
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +15 -11
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +37 -27
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +3 -0
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +15 -7
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +29 -23
- package/dist/Table/types.d.ts +32 -0
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/TextArea/TextArea.d.ts +10 -1
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +18 -19
- package/dist/TextInput/TextInput.d.ts +10 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +20 -17
- package/dist/Thumbnail/Thumbnail.js +2 -2
- package/dist/TimeInput/TimeInput.d.ts +10 -2
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +17 -17
- package/dist/Timestamp/Timestamp.d.ts +31 -3
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +47 -76
- package/dist/Timestamp/formatInstant.d.ts +41 -0
- package/dist/Timestamp/formatInstant.d.ts.map +1 -0
- package/dist/Timestamp/formatInstant.js +177 -0
- package/dist/Timestamp/index.d.ts +1 -0
- package/dist/Timestamp/index.d.ts.map +1 -1
- package/dist/Timestamp/tooltipEntries.d.ts +56 -0
- package/dist/Timestamp/tooltipEntries.d.ts.map +1 -0
- package/dist/Timestamp/tooltipEntries.js +163 -0
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +61 -9
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +3 -1
- package/dist/Token/Token.d.ts +34 -4
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +85 -45
- package/dist/Token/TokenLink.d.ts +62 -0
- package/dist/Token/TokenLink.d.ts.map +1 -0
- package/dist/Token/TokenLink.js +76 -0
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.d.ts +9 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +4 -2
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +17 -1
- package/dist/TopNav/TopNavItem.d.ts +3 -1
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +30 -3
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -0
- package/dist/TreeList/TreeListBranches.d.ts.map +1 -1
- package/dist/TreeList/TreeListBranches.js +8 -6
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +32 -14
- package/dist/Typeahead/BaseTypeahead.d.ts +9 -0
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +22 -11
- package/dist/Typeahead/Typeahead.d.ts +9 -2
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +11 -2
- package/dist/Typeahead/TypeaheadItem.d.ts +1 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +20 -10
- package/dist/astryx.css +70 -30
- package/dist/astryx.umd.js +51 -51
- package/dist/astryx.umd.js.map +4 -4
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/isRtlElement.d.ts +18 -0
- package/dist/hooks/isRtlElement.d.ts.map +1 -0
- package/dist/hooks/isRtlElement.js +27 -0
- package/dist/hooks/useAnnounce.d.ts +3 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +39 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +52 -11
- package/dist/hooks/useGridFocus.d.ts +6 -1
- package/dist/hooks/useGridFocus.d.ts.map +1 -1
- package/dist/hooks/useGridFocus.js +12 -9
- package/dist/hooks/useHotkeys.d.ts +9 -0
- package/dist/hooks/useHotkeys.d.ts.map +1 -1
- package/dist/hooks/useHotkeys.js +9 -0
- package/dist/hooks/useInputStatusIcon.d.ts +38 -0
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -0
- package/dist/hooks/useInputStatusIcon.js +158 -0
- package/dist/hooks/useKeyboardHint.d.ts +1 -1
- package/dist/hooks/useKeyboardHint.d.ts.map +1 -1
- package/dist/hooks/useKeyboardHint.js +4 -2
- package/dist/hooks/useListFocus.d.ts +39 -1
- package/dist/hooks/useListFocus.d.ts.map +1 -1
- package/dist/hooks/useListFocus.js +54 -9
- package/dist/i18n/InternationalizationContext.d.ts +1 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +3 -0
- package/dist/i18n/InternationalizationProvider.d.ts +8 -1
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +5 -1
- package/dist/i18n/getLocaleDirection.d.ts +18 -0
- package/dist/i18n/getLocaleDirection.d.ts.map +1 -0
- package/dist/i18n/getLocaleDirection.js +29 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +7 -1
- package/dist/i18n/useDirection.d.ts +2 -0
- package/dist/i18n/useDirection.d.ts.map +1 -0
- package/dist/i18n/useDirection.js +27 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/plainDate.d.ts +17 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +23 -4
- package/dist/utils/rtlStyles.d.ts +24 -0
- package/dist/utils/rtlStyles.d.ts.map +1 -0
- package/dist/utils/rtlStyles.js +27 -0
- package/locales/en.json +112 -0
- package/locales/pseudo.json +84 -0
- package/package.json +6 -1
- package/src/Avatar/Avatar.doc.mjs +50 -3
- package/src/Avatar/Avatar.test.tsx +218 -0
- package/src/Avatar/Avatar.tsx +285 -79
- package/src/Avatar/AvatarStatusDot.doc.mjs +4 -4
- package/src/Avatar/AvatarStatusDot.tsx +6 -4
- package/src/AvatarGroup/AvatarGroup.doc.mjs +2 -0
- package/src/AvatarGroup/AvatarGroup.test.tsx +162 -2
- package/src/AvatarGroup/AvatarGroup.tsx +58 -3
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +5 -2
- package/src/Banner/Banner.tsx +6 -6
- package/src/Breadcrumbs/BreadcrumbItem.tsx +10 -10
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +52 -1
- package/src/Breadcrumbs/index.ts +4 -0
- package/src/Button/Button.doc.mjs +0 -4
- package/src/Button/Button.test.tsx +16 -0
- package/src/Button/Button.tsx +6 -4
- package/src/Calendar/Calendar.test.tsx +170 -20
- package/src/Calendar/Calendar.tsx +73 -16
- package/src/Calendar/dayCellUtils.test.ts +18 -18
- package/src/Calendar/dayCellUtils.ts +2 -2
- package/src/Calendar/styles.ts +33 -39
- package/src/Card/Card.tsx +1 -1
- package/src/Carousel/Carousel.tsx +25 -6
- package/src/Chat/ChatComposer.doc.mjs +2 -2
- package/src/Chat/ChatComposerInput.doc.mjs +1 -1
- package/src/Chat/ChatComposerInput.tsx +2 -2
- package/src/Chat/ChatDictationButton.tsx +7 -1
- package/src/Chat/ChatLayout.tsx +4 -4
- package/src/Chat/ChatMessageBubble.tsx +15 -10
- package/src/Chat/ChatSystemMessage.test.tsx +5 -0
- package/src/Chat/ChatToolCalls.tsx +9 -2
- package/src/Chat/useTriggerMenu.tsx +1 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +6 -0
- package/src/CheckboxInput/CheckboxInput.test.tsx +23 -0
- package/src/CheckboxInput/CheckboxInput.tsx +21 -6
- package/src/CheckboxList/CheckboxList.doc.mjs +6 -0
- package/src/CheckboxList/CheckboxList.test.tsx +94 -3
- package/src/CheckboxList/CheckboxListItem.tsx +17 -10
- package/src/Citation/Citation.doc.mjs +4 -3
- package/src/Citation/Citation.test.tsx +97 -0
- package/src/Citation/Citation.tsx +43 -11
- package/src/CodeBlock/CodeBlock.test.tsx +17 -0
- package/src/CodeBlock/CodeBlock.tsx +38 -11
- package/src/Collapsible/Collapsible.doc.mjs +1 -0
- package/src/Collapsible/Collapsible.test.tsx +7 -0
- package/src/Collapsible/Collapsible.tsx +16 -6
- package/src/CommandPalette/CommandPalette.test.tsx +95 -1
- package/src/CommandPalette/CommandPalette.tsx +41 -2
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -1
- package/src/ContextMenu/ContextMenu.test.tsx +59 -2
- package/src/ContextMenu/ContextMenu.tsx +22 -11
- package/src/ContextMenu/index.ts +5 -0
- package/src/DateInput/DateInput.doc.mjs +25 -0
- package/src/DateInput/DateInput.test.tsx +230 -0
- package/src/DateInput/DateInput.tsx +51 -29
- package/src/DateRangeInput/DateRangeInput.doc.mjs +16 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +140 -0
- package/src/DateRangeInput/DateRangeInput.tsx +42 -30
- package/src/DateTimeInput/DateTimeInput.doc.mjs +22 -1
- package/src/DateTimeInput/DateTimeInput.test.tsx +112 -0
- package/src/DateTimeInput/DateTimeInput.tsx +44 -39
- package/src/Divider/Divider.test.tsx +32 -8
- package/src/Divider/Divider.tsx +14 -1
- package/src/DropdownMenu/DropdownMenu.test.tsx +60 -0
- package/src/DropdownMenu/DropdownMenu.tsx +31 -12
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuItem.tsx +9 -3
- package/src/DropdownMenu/DropdownMenuRadioGroup.doc.mjs +4 -12
- package/src/DropdownMenu/DropdownMenuRadioGroup.tsx +9 -10
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +9 -3
- package/src/DropdownMenu/DropdownMenuSelectable.test.tsx +20 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +88 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +635 -0
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +553 -0
- package/src/DropdownMenu/index.ts +16 -0
- package/src/DropdownMenu/menuItemHover.ts +39 -0
- package/src/DropdownMenu/menuItemRoles.ts +9 -0
- package/src/DropdownMenu/renderDropdownItems.tsx +29 -15
- package/src/Field/Field.tsx +14 -9
- package/src/Field/FieldLabel.test.tsx +25 -0
- package/src/Field/FieldLabel.tsx +12 -3
- package/src/Field/inputStyles.stylex.ts +2 -0
- package/src/FieldStatus/FieldStatus.test.tsx +72 -0
- package/src/FieldStatus/FieldStatus.tsx +48 -2
- package/src/FileInput/FileInput.doc.mjs +23 -2
- package/src/FileInput/FileInput.test.tsx +104 -13
- package/src/FileInput/FileInput.tsx +106 -79
- package/src/HoverCard/useHoverCard.tsx +15 -3
- package/src/Icon/Icon.doc.mjs +13 -0
- package/src/Icon/Icon.test.tsx +89 -0
- package/src/Icon/Icon.tsx +51 -3
- package/src/Item/Item.doc.mjs +5 -0
- package/src/Item/Item.test.tsx +88 -0
- package/src/Item/Item.tsx +57 -11
- package/src/Layer/layerAnimations.stylex.ts +23 -0
- package/src/Lightbox/Lightbox.tsx +15 -7
- package/src/List/List.test.tsx +17 -29
- package/src/List/List.tsx +6 -1
- package/src/List/ListItem.doc.mjs +12 -0
- package/src/List/ListItem.tsx +13 -0
- package/src/Markdown/Markdown.test.tsx +21 -0
- package/src/Markdown/Markdown.tsx +4 -0
- package/src/MetadataList/MetadataList.test.tsx +24 -0
- package/src/MetadataList/MetadataList.tsx +6 -2
- package/src/MultiSelector/MultiSelector.doc.mjs +20 -0
- package/src/MultiSelector/MultiSelector.test.tsx +402 -0
- package/src/MultiSelector/MultiSelector.tsx +120 -59
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -1
- package/src/NumberInput/NumberInput.doc.mjs +21 -0
- package/src/NumberInput/NumberInput.test.tsx +71 -0
- package/src/NumberInput/NumberInput.tsx +35 -26
- package/src/Outline/Outline.test.tsx +12 -12
- package/src/Outline/Outline.tsx +2 -2
- package/src/Pagination/Pagination.tsx +11 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +15 -0
- package/src/PowerSearch/PowerSearch.test.tsx +23 -0
- package/src/PowerSearch/PowerSearch.tsx +10 -1
- package/src/ProgressBar/ProgressBar.test.tsx +34 -0
- package/src/ProgressBar/ProgressBar.tsx +16 -1
- package/src/RadioList/RadioList.doc.mjs +6 -0
- package/src/RadioList/RadioList.test.tsx +26 -4
- package/src/RadioList/RadioList.tsx +2 -2
- package/src/RadioList/RadioListItem.tsx +12 -5
- package/src/Resizable/ResizeHandle.test.tsx +94 -0
- package/src/Resizable/ResizeHandle.tsx +70 -20
- package/src/SegmentedControl/SegmentedControl.test.tsx +28 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +22 -2
- package/src/Selector/Selector.doc.mjs +15 -0
- package/src/Selector/Selector.test.tsx +370 -0
- package/src/Selector/Selector.tsx +88 -20
- package/src/SideNav/SideNav.tsx +1 -8
- package/src/SideNav/SideNavCollapseButton.tsx +9 -7
- package/src/SideNav/SideNavItem.tsx +5 -3
- package/src/Skeleton/Skeleton.test.tsx +16 -0
- package/src/Skeleton/Skeleton.tsx +13 -1
- package/src/Slider/Slider.doc.mjs +6 -0
- package/src/Slider/Slider.test.tsx +240 -12
- package/src/Slider/Slider.tsx +96 -23
- package/src/Spinner/Spinner.test.tsx +10 -8
- package/src/Spinner/Spinner.tsx +15 -5
- package/src/Switch/Switch.doc.mjs +142 -42
- package/src/Switch/Switch.test.tsx +111 -0
- package/src/Switch/Switch.tsx +149 -32
- package/src/TabList/Tab.tsx +2 -2
- package/src/TabList/TabList.doc.mjs +0 -6
- package/src/TabList/TabList.test.tsx +3 -15
- package/src/TabList/TabList.tsx +6 -17
- package/src/TabList/TabListContext.ts +0 -6
- package/src/TabList/TabMenu.tsx +2 -2
- package/src/Table/BaseTable.tsx +34 -2
- package/src/Table/Table.doc.mjs +11 -0
- package/src/Table/Table.test.tsx +85 -0
- package/src/Table/TableCell.tsx +3 -3
- package/src/Table/TableHeaderCell.tsx +3 -3
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +9 -6
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.test.tsx +19 -0
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +27 -18
- package/src/Table/plugins/selection/useTableSelection.test.tsx +61 -3
- package/src/Table/plugins/selection/useTableSelection.tsx +3 -0
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +38 -9
- package/src/Table/plugins/tree/useTableTreeData.tsx +17 -13
- package/src/Table/types.ts +33 -0
- package/src/Table/useTableRowStatus.doc.mjs +1 -1
- package/src/TextArea/TextArea.doc.mjs +21 -0
- package/src/TextArea/TextArea.test.tsx +23 -0
- package/src/TextArea/TextArea.tsx +27 -26
- package/src/TextInput/TextInput.doc.mjs +21 -0
- package/src/TextInput/TextInput.test.tsx +150 -0
- package/src/TextInput/TextInput.tsx +28 -25
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -1
- package/src/Thumbnail/Thumbnail.tsx +1 -1
- package/src/TimeInput/TimeInput.doc.mjs +21 -0
- package/src/TimeInput/TimeInput.test.tsx +23 -0
- package/src/TimeInput/TimeInput.tsx +24 -25
- package/src/Timestamp/Timestamp.doc.mjs +32 -6
- package/src/Timestamp/Timestamp.test.tsx +371 -0
- package/src/Timestamp/Timestamp.tsx +96 -93
- package/src/Timestamp/formatInstant.ts +218 -0
- package/src/Timestamp/index.ts +4 -0
- package/src/Timestamp/tooltipEntries.test.ts +552 -0
- package/src/Timestamp/tooltipEntries.ts +210 -0
- package/src/Toast/ToastViewport.test.tsx +218 -8
- package/src/Toast/ToastViewport.tsx +71 -12
- package/src/ToggleButton/ToggleButton.test.tsx +24 -0
- package/src/ToggleButton/ToggleButton.tsx +19 -1
- package/src/Token/Token.test.tsx +166 -15
- package/src/Token/Token.tsx +104 -47
- package/src/Token/TokenLink.tsx +107 -0
- package/src/Token/index.ts +1 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +23 -1
- package/src/Tokenizer/Tokenizer.test.tsx +23 -0
- package/src/Tokenizer/Tokenizer.tsx +14 -2
- package/src/Tooltip/Tooltip.test.tsx +46 -0
- package/src/Tooltip/useTooltip.tsx +20 -0
- package/src/TopNav/TopNav.test.tsx +93 -2
- package/src/TopNav/TopNavItem.doc.mjs +3 -3
- package/src/TopNav/TopNavItem.tsx +35 -6
- package/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs +1 -1
- package/src/TreeList/TreeList.doc.mjs +6 -0
- package/src/TreeList/TreeList.test.tsx +50 -10
- package/src/TreeList/TreeList.tsx +5 -0
- package/src/TreeList/TreeListBranches.tsx +8 -6
- package/src/TreeList/TreeListItem.tsx +33 -11
- package/src/Typeahead/BaseTypeahead.tsx +42 -15
- package/src/Typeahead/Typeahead.doc.mjs +13 -0
- package/src/Typeahead/Typeahead.test.tsx +112 -0
- package/src/Typeahead/Typeahead.tsx +17 -1
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/__tests__/forcedColors.ts +60 -0
- package/src/__tests__/inputWidthContract.test.tsx +62 -0
- package/src/doc-mjs.d.ts +19 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/isRtlElement.ts +27 -0
- package/src/hooks/useAnnounce.test.tsx +75 -2
- package/src/hooks/useAnnounce.ts +47 -1
- package/src/hooks/useFocusTrap.test.tsx +104 -0
- package/src/hooks/useFocusTrap.ts +61 -12
- package/src/hooks/useGridFocus.doc.mjs +3 -3
- package/src/hooks/useGridFocus.test.tsx +41 -0
- package/src/hooks/useGridFocus.ts +21 -10
- package/src/hooks/useHotkeys.ts +9 -0
- package/src/hooks/useInputStatusIcon.test.tsx +162 -0
- package/src/hooks/useInputStatusIcon.tsx +224 -0
- package/src/hooks/useKeyboardHint.test.tsx +22 -0
- package/src/hooks/useKeyboardHint.tsx +6 -2
- package/src/hooks/useListFocus.doc.mjs +25 -3
- package/src/hooks/useListFocus.test.tsx +153 -1
- package/src/hooks/useListFocus.ts +102 -9
- package/src/i18n/InternationalizationContext.ts +4 -0
- package/src/i18n/InternationalizationProvider.tsx +12 -2
- package/src/i18n/__tests__/getLocaleDirection.test.ts +40 -0
- package/src/i18n/__tests__/useDirection.test.tsx +66 -0
- package/src/i18n/getLocaleDirection.ts +29 -0
- package/src/i18n/index.ts +6 -0
- package/src/i18n/useDirection.ts +29 -0
- package/src/reset.css +0 -26
- package/src/reset.test.ts +60 -0
- package/src/theme/derivedVarRegistry.test.ts +1 -0
- package/src/theme/derivedVarRegistry.ts +6 -0
- package/src/theme/generateThemeRules.test.ts +42 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/plainDate.test.ts +24 -6
- package/src/utils/plainDate.ts +18 -4
- package/src/utils/rtlStyles.ts +27 -0
|
@@ -63,6 +63,12 @@ const dynamicStyles = {
|
|
|
63
63
|
"--x---_codeblock-gutter-width": `${digits}ch` != null ? `${digits}ch` : undefined
|
|
64
64
|
}]
|
|
65
65
|
};
|
|
66
|
+
|
|
67
|
+
// Light reveal so the leading chevron eases into view instead of popping in.
|
|
68
|
+
// Growing the chevron's own footprint (width + inline margin) from zero slides
|
|
69
|
+
// the title into place instead of snapping it over, and clipping keeps the
|
|
70
|
+
// glyph from spilling while it's mid-reveal.
|
|
71
|
+
const chevronReveal = "x1xhkexc-B";
|
|
66
72
|
const styles = {
|
|
67
73
|
root: {
|
|
68
74
|
kVAEAm: "x1n2onr6",
|
|
@@ -431,7 +437,7 @@ export function CodeBlock({
|
|
|
431
437
|
setCopied(true);
|
|
432
438
|
// Swapping the button's aria-label alone isn't reliably announced by
|
|
433
439
|
// screen readers, so confirm the copy via a polite live region.
|
|
434
|
-
announce('
|
|
440
|
+
announce(t('@astryx.codeBlock.copied'));
|
|
435
441
|
onCopy?.();
|
|
436
442
|
// Restart the reset timer on every copy — otherwise a rapid re-copy
|
|
437
443
|
// is reverted early by the previous click's timer.
|
|
@@ -445,7 +451,7 @@ export function CodeBlock({
|
|
|
445
451
|
} catch {
|
|
446
452
|
// Clipboard failures leave the copied state unchanged.
|
|
447
453
|
}
|
|
448
|
-
}, [code, onCopy, announce]);
|
|
454
|
+
}, [code, onCopy, announce, t]);
|
|
449
455
|
const sizeStyle = size === 'sm' ? styles.sizeSm : styles.sizeMd;
|
|
450
456
|
// Digits in the largest line number — sizes the gutter column width.
|
|
451
457
|
const maxLineDigits = String(lines.length).length;
|
|
@@ -480,7 +486,7 @@ export function CodeBlock({
|
|
|
480
486
|
className: "x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556"
|
|
481
487
|
},
|
|
482
488
|
1: {
|
|
483
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556 x10l6tqk xctzyg
|
|
489
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556 x10l6tqk xctzyg x72tfeb"
|
|
484
490
|
}
|
|
485
491
|
}[!!!showHeader << 0],
|
|
486
492
|
children: copyIcon
|
|
@@ -516,23 +522,23 @@ export function CodeBlock({
|
|
|
516
522
|
}[!!canCollapse << 0],
|
|
517
523
|
children: /*#__PURE__*/_jsxs("span", {
|
|
518
524
|
...{
|
|
519
|
-
className: "x78zum5 x6s0dn4
|
|
525
|
+
className: "x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j"
|
|
520
526
|
},
|
|
521
|
-
children: [
|
|
527
|
+
children: [canCollapse && /*#__PURE__*/_jsx("span", {
|
|
522
528
|
...{
|
|
523
529
|
0: {
|
|
524
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg x1mjzq1q x11xpdln xuedmi6 xlr8y92"
|
|
530
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92"
|
|
525
531
|
},
|
|
526
532
|
1: {
|
|
527
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg x1mjzq1q x11xpdln xuedmi6 xlr8y92
|
|
533
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92 x1iffjtl"
|
|
528
534
|
}
|
|
529
|
-
}[
|
|
535
|
+
}[!!!isCollapsed << 0],
|
|
530
536
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
531
|
-
icon: "
|
|
537
|
+
icon: "chevronRight",
|
|
532
538
|
size: "xsm",
|
|
533
539
|
color: "inherit"
|
|
534
540
|
})
|
|
535
|
-
})]
|
|
541
|
+
}), title, title && languageLabel ? ' — ' : '', languageLabel]
|
|
536
542
|
})
|
|
537
543
|
}), copyButtonEl]
|
|
538
544
|
}) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAiBjD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAiBjD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAuH5C,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,gBAAgB,EACxB,UAAkB,EAClB,YAAY,EACZ,KAAK,EACL,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,+BAkGlB;yBA/Ge,WAAW"}
|
|
@@ -227,7 +227,9 @@ export function Collapsible({
|
|
|
227
227
|
// would swallow events like a wrapping tooltip's hover).
|
|
228
228
|
,
|
|
229
229
|
tabIndex: isDisabled ? -1 : undefined,
|
|
230
|
-
...
|
|
230
|
+
...mergeProps(themeProps('collapsible-trigger', {
|
|
231
|
+
density: density ?? undefined
|
|
232
|
+
}), stylex.props(styles.trigger, density != null && triggerDensity[density], isDisabled && styles.triggerDisabled)),
|
|
231
233
|
children: [/*#__PURE__*/_jsx("span", {
|
|
232
234
|
...{
|
|
233
235
|
className: "x1b2iylo xwgcxoh"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file CommandPalette.tsx
|
|
3
|
-
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox
|
|
3
|
+
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox, useAnnounce
|
|
4
4
|
* @output Exports CommandPalette root component and props
|
|
5
5
|
* @position Core root component; dialog shell with searchSource-driven items
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../src/CommandPalette/CommandPalette.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,YAAY,EAAE,cAAc,EAAC,MAA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IAAI,CAAC;IAExC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AA6GD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,EACxE,GAAG,EACH,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,UAAU,EACV,eAAe,EAAE,wBAAwB,EACzC,kBAAkB,EAAE,2BAA2B,EAC/C,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,KAAK,EAAE,cAAc,EACrB,KAAW,EACX,SAAe,EACf,GAAG,IAAI,EACR,EAAE,mBAAmB,CAAC,CAAC,CAAC,+BAiUxB;yBAlVe,cAAc"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CommandPalette.tsx
|
|
7
|
-
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox
|
|
7
|
+
* @input Uses React, Dialog, Layout, CommandPaletteContext, SearchSource, useCombobox, useAnnounce
|
|
8
8
|
* @output Exports CommandPalette root component and props
|
|
9
9
|
* @position Core root component; dialog shell with searchSource-driven items
|
|
10
10
|
*
|
|
@@ -23,6 +23,7 @@ import { CommandPaletteGroup } from "./CommandPaletteGroup.js";
|
|
|
23
23
|
import { CommandPaletteInput } from "./CommandPaletteInput.js";
|
|
24
24
|
import { CommandPaletteFooter } from "./CommandPaletteFooter.js";
|
|
25
25
|
import { CommandPaletteEmpty } from "./CommandPaletteEmpty.js";
|
|
26
|
+
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
26
27
|
import { useTranslator } from "../i18n/index.js";
|
|
27
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
29
|
function getGroup(item) {
|
|
@@ -181,6 +182,13 @@ export function CommandPalette({
|
|
|
181
182
|
const [optimisticResults, setOptimisticResults] = useOptimistic(searchResults);
|
|
182
183
|
const isBusy = isPending;
|
|
183
184
|
const searchVersionRef = useRef(0);
|
|
185
|
+
|
|
186
|
+
// Announce search status to screen readers through the shared polite live
|
|
187
|
+
// region (comboboxes-7 announce path, mirroring Selector / BaseTypeahead).
|
|
188
|
+
// The busy spinner and the empty states are otherwise purely visual, so a
|
|
189
|
+
// screen-reader user typing a query would hear nothing when loading starts
|
|
190
|
+
// or results disappear.
|
|
191
|
+
const announce = useAnnounce();
|
|
184
192
|
const value = controlledValue ?? internalValue;
|
|
185
193
|
const setValue = useCallback(newValue => {
|
|
186
194
|
if (controlledValue === undefined) {
|
|
@@ -200,8 +208,12 @@ export function CommandPalette({
|
|
|
200
208
|
setInternalValue('');
|
|
201
209
|
}
|
|
202
210
|
searchSource.cancel?.();
|
|
211
|
+
// Clear any lingering result / loading announcement when the palette
|
|
212
|
+
// closes so stale status text does not linger in the a11y tree
|
|
213
|
+
// (matching Selector's onHide).
|
|
214
|
+
announce('');
|
|
203
215
|
onOpenChange(false);
|
|
204
|
-
}, [onOpenChange, searchSource, controlledValue]);
|
|
216
|
+
}, [onOpenChange, searchSource, controlledValue, announce]);
|
|
205
217
|
const selectItem = useCallback(itemValue => {
|
|
206
218
|
setValue(itemValue);
|
|
207
219
|
}, [setValue]);
|
|
@@ -234,6 +246,14 @@ export function CommandPalette({
|
|
|
234
246
|
startTransition(async () => {
|
|
235
247
|
const isBootstrap = query === '';
|
|
236
248
|
|
|
249
|
+
// Loading started for a user query: tell screen-reader users the
|
|
250
|
+
// spinner appeared. The polite region coalesces rapid updates, so for
|
|
251
|
+
// fast sources the result-count announcement below simply replaces
|
|
252
|
+
// this instead of stacking one "Loading" per keystroke.
|
|
253
|
+
if (!isBootstrap) {
|
|
254
|
+
announce(t('@astryx.commandPalette.loading'));
|
|
255
|
+
}
|
|
256
|
+
|
|
237
257
|
// Client-filter previous results for instant narrowing while fetch is in flight
|
|
238
258
|
if (!isBootstrap && searchResults.length > 0) {
|
|
239
259
|
const lower = query.toLowerCase().trim();
|
|
@@ -247,6 +267,25 @@ export function CommandPalette({
|
|
|
247
267
|
setOptimisticResults(items);
|
|
248
268
|
setSearchResults(items);
|
|
249
269
|
|
|
270
|
+
// Announce the outcome from the search commit (not a reactive
|
|
271
|
+
// effect), matching Selector / BaseTypeahead: exactly one
|
|
272
|
+
// announcement per committed query, and the version check above
|
|
273
|
+
// already discards stale keystrokes. Bootstrap stays silent — the
|
|
274
|
+
// same role PowerSearch's mount guard plays — so opening the
|
|
275
|
+
// palette announces nothing; clearing the query only clears any
|
|
276
|
+
// lingering status text.
|
|
277
|
+
if (isBootstrap) {
|
|
278
|
+
announce('');
|
|
279
|
+
} else if (items.length === 0) {
|
|
280
|
+
announce(t('@astryx.commandPalette.noResultsFor', {
|
|
281
|
+
query
|
|
282
|
+
}));
|
|
283
|
+
} else {
|
|
284
|
+
announce(t('@astryx.commandPalette.resultCount', {
|
|
285
|
+
count: items.length
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
|
|
250
289
|
// When opening with a preselected value, highlight it once
|
|
251
290
|
// bootstrap results arrive. No value → highlight stays at -1
|
|
252
291
|
// and ArrowDown naturally moves to the first item.
|
|
@@ -258,7 +297,7 @@ export function CommandPalette({
|
|
|
258
297
|
}
|
|
259
298
|
}
|
|
260
299
|
});
|
|
261
|
-
}, [searchSource, searchResults, startTransition, value, combobox, setOptimisticResults]);
|
|
300
|
+
}, [searchSource, searchResults, startTransition, value, combobox, setOptimisticResults, announce, t]);
|
|
262
301
|
|
|
263
302
|
// Bootstrap on open. We use a ref to avoid re-triggering when
|
|
264
303
|
// runSearch's identity changes (it depends on searchResults).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/Context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EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,oBAAqB,SAAQ,oBAAoB;IACzD,gDAAgD;IAChD,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,WAAW,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAM/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,IAAW,EACX,KAAK,EAAE,cAAc,EACrB,UAAkB,EAClB,YAAY,EACZ,GAAG,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,aAAa,EACb,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA4RlB;yBA1Se,WAAW"}
|
|
@@ -34,7 +34,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
34
34
|
import { useLayer } from "../Layer/useLayer.js";
|
|
35
35
|
import { renderDropdownItems } from "../DropdownMenu/renderDropdownItems.js";
|
|
36
36
|
import { DropdownMenuContext } from "../DropdownMenu/DropdownMenuContext.js";
|
|
37
|
-
import { MENU_ITEM_ROLES, MENU_ITEM_SELECTOR } from "../DropdownMenu/menuItemRoles.js";
|
|
37
|
+
import { MENU_ITEM_ROLES, MENU_ITEM_SELECTOR, MENU_BOUNDARY_SELECTOR } from "../DropdownMenu/menuItemRoles.js";
|
|
38
38
|
import { useListFocus } from "../hooks/useListFocus.js";
|
|
39
39
|
import { useTypeahead } from "../hooks/useTypeahead.js";
|
|
40
40
|
import { useLongPress } from "../hooks/useLongPress.js";
|
|
@@ -177,15 +177,19 @@ export function ContextMenu({
|
|
|
177
177
|
listRef,
|
|
178
178
|
handleKeyDown: listNavKeyDown,
|
|
179
179
|
focusFirst,
|
|
180
|
-
focusItem
|
|
180
|
+
focusItem,
|
|
181
|
+
ownsEvent,
|
|
182
|
+
getItems: getMenuItems
|
|
181
183
|
} = useListFocus({
|
|
182
184
|
itemSelector: MENU_ITEM_SELECTOR,
|
|
185
|
+
boundarySelector: MENU_BOUNDARY_SELECTOR,
|
|
183
186
|
wrap: false,
|
|
184
187
|
onEscape: closeMenu
|
|
185
188
|
});
|
|
186
189
|
|
|
187
|
-
// First-character typeahead over the enabled menu items (menus-11).
|
|
188
|
-
|
|
190
|
+
// First-character typeahead over the enabled menu items (menus-11). Reuses
|
|
191
|
+
// the hook's scoped item collection so an inline submenu flyout's items
|
|
192
|
+
// aren't swept in.
|
|
189
193
|
const typeahead = useTypeahead({
|
|
190
194
|
getItemLabels: () => getMenuItems().map(el => el.textContent),
|
|
191
195
|
onMatch: focusItem,
|
|
@@ -236,6 +240,11 @@ export function ContextMenu({
|
|
|
236
240
|
};
|
|
237
241
|
}, [isOpen, closeMenu]);
|
|
238
242
|
const listKeyDown = useCallback(e => {
|
|
243
|
+
// A submenu flyout renders inline inside this menu; its key events bubble
|
|
244
|
+
// up here. Let that level own them — only handle events from this level.
|
|
245
|
+
if (!ownsEvent(e)) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
239
248
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
240
249
|
e.preventDefault();
|
|
241
250
|
const focused = document.activeElement;
|
|
@@ -244,12 +253,21 @@ export function ContextMenu({
|
|
|
244
253
|
}
|
|
245
254
|
return;
|
|
246
255
|
}
|
|
256
|
+
// APG menu pattern: Tab closes the menu. Menu items are tabIndex={-1}
|
|
257
|
+
// so Tab would otherwise leak focus into the page while the menu stayed
|
|
258
|
+
// open (menus-5). Do NOT preventDefault — closing restores focus to the
|
|
259
|
+
// previously focused element, and the browser's default Tab then
|
|
260
|
+
// continues from there to the next element.
|
|
261
|
+
if (e.key === 'Tab') {
|
|
262
|
+
closeMenu();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
247
265
|
if (typeahead.onKeyDown(e)) {
|
|
248
266
|
e.preventDefault();
|
|
249
267
|
return;
|
|
250
268
|
}
|
|
251
269
|
listNavKeyDown(e);
|
|
252
|
-
}, [listNavKeyDown, typeahead]);
|
|
270
|
+
}, [listNavKeyDown, closeMenu, typeahead, ownsEvent]);
|
|
253
271
|
|
|
254
272
|
// Place the zero-size cursor anchor at a point in the trigger's local
|
|
255
273
|
// coordinate space and open the menu. Positioning the anchor inside the
|
|
@@ -8,4 +8,5 @@ export { DropdownMenuItem as ContextMenuItem, type DropdownMenuItemProps as Cont
|
|
|
8
8
|
export { DropdownMenuCheckboxItem as ContextMenuCheckboxItem, type DropdownMenuCheckboxItemProps as ContextMenuCheckboxItemProps, } from '../DropdownMenu/DropdownMenuCheckboxItem';
|
|
9
9
|
export { DropdownMenuRadioGroup as ContextMenuRadioGroup, type DropdownMenuRadioGroupProps as ContextMenuRadioGroupProps, } from '../DropdownMenu/DropdownMenuRadioGroup';
|
|
10
10
|
export { DropdownMenuRadioItem as ContextMenuRadioItem, type DropdownMenuRadioItemProps as ContextMenuRadioItemProps, } from '../DropdownMenu/DropdownMenuRadioItem';
|
|
11
|
+
export { DropdownMenuSubMenu as ContextMenuSubMenu, type DropdownMenuSubMenuProps as ContextMenuSubMenuProps, } from '../DropdownMenu/DropdownMenuSubMenu';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ContextMenu/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,k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13,4 +13,6 @@ export { DropdownMenuItem as ContextMenuItem } from "../DropdownMenu/DropdownMen
|
|
|
13
13
|
// ContextMenu name for a coherent API.
|
|
14
14
|
export { DropdownMenuCheckboxItem as ContextMenuCheckboxItem } from "../DropdownMenu/DropdownMenuCheckboxItem.js";
|
|
15
15
|
export { DropdownMenuRadioGroup as ContextMenuRadioGroup } from "../DropdownMenu/DropdownMenuRadioGroup.js";
|
|
16
|
-
export { DropdownMenuRadioItem as ContextMenuRadioItem } from "../DropdownMenu/DropdownMenuRadioItem.js";
|
|
16
|
+
export { DropdownMenuRadioItem as ContextMenuRadioItem } from "../DropdownMenu/DropdownMenuRadioItem.js";
|
|
17
|
+
// Submenus work inside a ContextMenu too (nested flyout of items).
|
|
18
|
+
export { DropdownMenuSubMenu as ContextMenuSubMenu } from "../DropdownMenu/DropdownMenuSubMenu.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as stylex from '@stylexjs/stylex';
|
|
2
|
-
import { type InputStatus } from '../Field';
|
|
2
|
+
import { type InputStatus, type FieldStatusVariant } from '../Field';
|
|
3
3
|
import { type ISODateString } from '../Calendar';
|
|
4
4
|
import type { TimestampFormat } from '../Timestamp';
|
|
5
5
|
declare const sizeStyles: Readonly<{
|
|
@@ -136,6 +136,14 @@ export interface DateInputProps extends Omit<BaseProps, 'onChange' | 'defaultVal
|
|
|
136
136
|
* If message is provided, displays below the input.
|
|
137
137
|
*/
|
|
138
138
|
status?: InputStatus;
|
|
139
|
+
/**
|
|
140
|
+
* How the status message is placed relative to the input.
|
|
141
|
+
* - 'attached': message overlaps directly below the input (bordered treatment)
|
|
142
|
+
* - 'detached': message floats below as a separate element with spacing
|
|
143
|
+
* - 'tooltip': no message box; the status icon becomes a focusable info-tip button that reveals the message on hover, keyboard focus, or tap
|
|
144
|
+
* @default 'attached'
|
|
145
|
+
*/
|
|
146
|
+
statusVariant?: FieldStatusVariant;
|
|
139
147
|
/**
|
|
140
148
|
* Width of the field. Numbers are treated as pixels, strings are used as-is
|
|
141
149
|
* (e.g. `'100%'`). Sizes the whole field (label, control, and status) so they
|
|
@@ -200,7 +208,7 @@ export interface DateInputProps extends Omit<BaseProps, 'onChange' | 'defaultVal
|
|
|
200
208
|
* />
|
|
201
209
|
* ```
|
|
202
210
|
*/
|
|
203
|
-
export declare function DateInput({ label, isLabelHidden, description, isOptional, isRequired, isDisabled, disabledMessage, value, onChange, changeAction, isLoading, min, max, dateConstraints, placeholder: placeholderFromProps, size: sizeProp, status, labelTooltip, hasClear, numberOfMonths, format, width, xstyle, className, style, ref, ...rest }: DateInputProps): import("react").JSX.Element;
|
|
211
|
+
export declare function DateInput({ label, isLabelHidden, description, isOptional, isRequired, isDisabled, disabledMessage, value, onChange, changeAction, isLoading, min, max, dateConstraints, placeholder: placeholderFromProps, size: sizeProp, status, statusVariant, labelTooltip, hasClear, numberOfMonths, format, width, xstyle, className, style, ref, ...rest }: DateInputProps): import("react").JSX.Element;
|
|
204
212
|
export declare namespace DateInput {
|
|
205
213
|
var displayName: string;
|
|
206
214
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/DateInput/DateInput.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/DateInput/DateInput.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAS3C,OAAO,EAEL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAOlB,OAAO,EAAW,KAAK,aAAa,EAAsB,MAAM,aAAa,CAAC;AAW9E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAmDlD,QAAA,MAAM,UAAU;;;;;;;;;;;;;EAad,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,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Spinner } from "../Spinner/index.js";
|
|
29
29
|
import { Calendar } from "../Calendar/index.js";
|
|
30
30
|
import { useCalendarConstraints } from "../Calendar/hooks/index.js";
|
|
31
|
+
import { useInputStatusIcon } from "../hooks/useInputStatusIcon.js";
|
|
31
32
|
import { usePopover } from "../Popover/index.js";
|
|
32
33
|
import { useTooltip } from "../Tooltip/index.js";
|
|
33
34
|
import { getInputARIA, parseDateInput } from "../utils/index.js";
|
|
@@ -101,6 +102,7 @@ export function DateInput({
|
|
|
101
102
|
placeholder: placeholderFromProps,
|
|
102
103
|
size: sizeProp,
|
|
103
104
|
status,
|
|
105
|
+
statusVariant = 'attached',
|
|
104
106
|
labelTooltip,
|
|
105
107
|
hasClear = false,
|
|
106
108
|
numberOfMonths = 1,
|
|
@@ -144,18 +146,6 @@ export function DateInput({
|
|
|
144
146
|
isEnabled: showsDisabledMessage
|
|
145
147
|
});
|
|
146
148
|
|
|
147
|
-
// Status icon mapping
|
|
148
|
-
const statusIconMap = {
|
|
149
|
-
warning: 'warning',
|
|
150
|
-
error: 'error',
|
|
151
|
-
success: 'success'
|
|
152
|
-
};
|
|
153
|
-
const statusIconColorMap = {
|
|
154
|
-
warning: 'warning',
|
|
155
|
-
error: 'error',
|
|
156
|
-
success: 'success'
|
|
157
|
-
};
|
|
158
|
-
|
|
159
149
|
// Constraint checking for text input validation (reuses calendar logic)
|
|
160
150
|
const {
|
|
161
151
|
isDateDisabled
|
|
@@ -164,10 +154,21 @@ export function DateInput({
|
|
|
164
154
|
max,
|
|
165
155
|
dateConstraints
|
|
166
156
|
});
|
|
157
|
+
const {
|
|
158
|
+
statusIcon,
|
|
159
|
+
describedBy: statusTooltipDescribedBy
|
|
160
|
+
} = useInputStatusIcon({
|
|
161
|
+
status,
|
|
162
|
+
statusVariant,
|
|
163
|
+
isInGroup: !!inputGroup
|
|
164
|
+
});
|
|
167
165
|
const {
|
|
168
166
|
ariaLabelledBy,
|
|
169
167
|
ariaDescribedBy
|
|
170
|
-
} = getInputARIA(inputLabelID, [description ? descriptionID : null, status?.message ? statusMessageID : null,
|
|
168
|
+
} = getInputARIA(inputLabelID, [description ? descriptionID : null, statusVariant !== 'tooltip' && status?.message ? statusMessageID : null,
|
|
169
|
+
// The tooltip variant renders no message box; describe the input by the
|
|
170
|
+
// tooltip's content instead so the status is still announced.
|
|
171
|
+
statusTooltipDescribedBy, showsDisabledMessage ? disabledMessageTooltip.describedBy : null], inputGroup);
|
|
171
172
|
|
|
172
173
|
// Pending input while user is typing (null = show formatted value)
|
|
173
174
|
const [pendingInput, setPendingInput] = useState(null);
|
|
@@ -330,7 +331,7 @@ export function DateInput({
|
|
|
330
331
|
...mergeProps(themeProps('date-input', {
|
|
331
332
|
size,
|
|
332
333
|
status: status?.type ?? null
|
|
333
|
-
}), stylex.props(inputWrapperStyles.base, sizeStyles[size], isEffectivelyDisabled && inputWrapperStyles.disabled, status && inputStatusBorderStyles[status.type], status && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], inputGroup && groupStyles.inGroup, xstyle), className, style),
|
|
334
|
+
}), stylex.props(inputWrapperStyles.base, sizeStyles[size], isEffectivelyDisabled && inputWrapperStyles.disabled, status && inputStatusBorderStyles[status.type], status && !isEffectivelyDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], inputGroup && groupStyles.inGroup, xstyle), className, style),
|
|
334
335
|
children: [inputGroup && /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
335
336
|
id: inputLabelID,
|
|
336
337
|
children: label
|
|
@@ -351,6 +352,16 @@ export function DateInput({
|
|
|
351
352
|
icon: "calendar",
|
|
352
353
|
size: "sm",
|
|
353
354
|
color: "secondary"
|
|
355
|
+
// Stable theme target on the toggle glyph itself, so a theme can
|
|
356
|
+
// restyle just this icon (color, size, hover) — and each open/closed
|
|
357
|
+
// state — via `defineTheme`. Same-element rules in @layer astryx-theme
|
|
358
|
+
// win over the icon's own base color/size, which a button-level target
|
|
359
|
+
// could not reach. Reflects the popover's open/closed state as a
|
|
360
|
+
// `data-state` attribute.
|
|
361
|
+
,
|
|
362
|
+
...themeProps('date-input-toggle-icon', {
|
|
363
|
+
state: popover.isOpen ? 'expanded' : 'collapsed'
|
|
364
|
+
})
|
|
354
365
|
})
|
|
355
366
|
}), /*#__PURE__*/_jsx("input", {
|
|
356
367
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -413,14 +424,16 @@ export function DateInput({
|
|
|
413
424
|
icon: "close",
|
|
414
425
|
size: "sm",
|
|
415
426
|
color: "secondary"
|
|
427
|
+
// Stable theme target on the clear glyph itself, so a theme can
|
|
428
|
+
// restyle just this icon (color, size, hover) via `defineTheme`.
|
|
429
|
+
// Same-element rules in @layer astryx-theme win over the icon's own
|
|
430
|
+
// base color/size, which a button-level target could not reach.
|
|
431
|
+
,
|
|
432
|
+
...themeProps('date-input-clear-icon')
|
|
416
433
|
})
|
|
417
434
|
}), isBusy && /*#__PURE__*/_jsx(Spinner, {
|
|
418
435
|
size: "sm"
|
|
419
|
-
}),
|
|
420
|
-
icon: statusIconMap[status.type],
|
|
421
|
-
size: "md",
|
|
422
|
-
color: statusIconColorMap[status.type]
|
|
423
|
-
}), popover.render(/*#__PURE__*/_jsx(Calendar, {
|
|
436
|
+
}), statusIcon, popover.render(/*#__PURE__*/_jsx(Calendar, {
|
|
424
437
|
handleRef: calendarRef,
|
|
425
438
|
mode: "single",
|
|
426
439
|
value: optimisticValue,
|
|
@@ -451,6 +464,7 @@ export function DateInput({
|
|
|
451
464
|
message: status.message,
|
|
452
465
|
messageID: status.message ? statusMessageID : undefined
|
|
453
466
|
} : undefined,
|
|
467
|
+
statusVariant: statusVariant,
|
|
454
468
|
labelTooltip: labelTooltip,
|
|
455
469
|
width: width,
|
|
456
470
|
children: inputWrapper
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type InputStatus } from '../Field';
|
|
1
|
+
import { type InputStatus, type FieldStatusVariant } from '../Field';
|
|
2
2
|
import { type ISODateString, type DateRange } from '../Calendar';
|
|
3
3
|
import type { BaseProps } from '../BaseProps';
|
|
4
4
|
import type { SizeValue } from '../utils/types';
|
|
@@ -116,6 +116,14 @@ export interface DateRangeInputProps extends Omit<BaseProps, 'onChange' | 'defau
|
|
|
116
116
|
* Status indicator for the input.
|
|
117
117
|
*/
|
|
118
118
|
status?: InputStatus;
|
|
119
|
+
/**
|
|
120
|
+
* How the status message is placed relative to the input.
|
|
121
|
+
* - 'attached': message overlaps directly below the input (bordered treatment)
|
|
122
|
+
* - 'detached': message floats below as a separate element with spacing
|
|
123
|
+
* - 'tooltip': no message box; the status icon becomes a focusable info-tip button that reveals the message on hover, keyboard focus, or tap
|
|
124
|
+
* @default 'attached'
|
|
125
|
+
*/
|
|
126
|
+
statusVariant?: FieldStatusVariant;
|
|
119
127
|
/**
|
|
120
128
|
* Width of the field. Numbers are treated as pixels, strings are used as-is
|
|
121
129
|
* (e.g. `'100%'`). Sizes the whole field (label, control, and status) so they
|
|
@@ -148,7 +156,7 @@ export interface DateRangeInputProps extends Omit<BaseProps, 'onChange' | 'defau
|
|
|
148
156
|
* />
|
|
149
157
|
* ```
|
|
150
158
|
*/
|
|
151
|
-
export declare function DateRangeInput({ label, isLabelHidden, description, isOptional, isRequired, isDisabled, disabledMessage, value, onChange, changeAction, isLoading, min, max, dateConstraints, presets, hasClear, placeholder: placeholderFromProps, size: sizeProp, status, labelTooltip, numberOfMonths, width, xstyle, className, style, ref, ...rest }: DateRangeInputProps): import("react").JSX.Element;
|
|
159
|
+
export declare function DateRangeInput({ label, isLabelHidden, description, isOptional, isRequired, isDisabled, disabledMessage, value, onChange, changeAction, isLoading, min, max, dateConstraints, presets, hasClear, placeholder: placeholderFromProps, size: sizeProp, status, statusVariant, labelTooltip, numberOfMonths, width, xstyle, className, style, ref, ...rest }: DateRangeInputProps): import("react").JSX.Element;
|
|
152
160
|
export declare namespace DateRangeInput {
|
|
153
161
|
var displayName: string;
|
|
154
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../src/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../src/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAEL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAW,KAAK,aAAa,EAAE,KAAK,SAAS,EAAC,MAAM,aAAa,CAAC;AAIzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAM9C,YAAY,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD,YAAY,EACV,WAAW,IAAI,oBAAoB,EACnC,eAAe,IAAI,wBAAwB,GAC5C,MAAM,UAAU,CAAC;AAqIlB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,SAAS,EACT,UAAU,GAAG,cAAc,CAC5B;IACC,0CAA0C;IAC1C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;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,EACR,YAAY,EACZ,SAAiB,EACjB,GAAG,EACH,GAAG,EACH,eAAe,EACf,OAAO,EACP,QAAe,EACf,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,QAAQ,EACd,MAAM,EACN,aAA0B,EAC1B,YAAY,EACZ,cAAkB,EAClB,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,mBAAmB,+BAkRrB;yBA/Se,cAAc"}
|
|
@@ -28,6 +28,7 @@ import { usePopover } from "../Popover/index.js";
|
|
|
28
28
|
import { useTooltip } from "../Tooltip/index.js";
|
|
29
29
|
import { mergeProps } from "../utils/index.js";
|
|
30
30
|
import { useSize } from "../SizeContext/SizeContext.js";
|
|
31
|
+
import { useInputStatusIcon } from "../hooks/useInputStatusIcon.js";
|
|
31
32
|
import { themeProps } from "../utils/themeProps.js";
|
|
32
33
|
import { useTranslator } from "../i18n/index.js";
|
|
33
34
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -104,6 +105,7 @@ export function DateRangeInput({
|
|
|
104
105
|
placeholder: placeholderFromProps,
|
|
105
106
|
size: sizeProp,
|
|
106
107
|
status,
|
|
108
|
+
statusVariant = 'attached',
|
|
107
109
|
labelTooltip,
|
|
108
110
|
numberOfMonths = 2,
|
|
109
111
|
width,
|
|
@@ -138,17 +140,17 @@ export function DateRangeInput({
|
|
|
138
140
|
focusTrigger: 'always',
|
|
139
141
|
isEnabled: showsDisabledMessage
|
|
140
142
|
});
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
143
|
+
const {
|
|
144
|
+
statusIcon,
|
|
145
|
+
describedBy: statusTooltipDescribedBy
|
|
146
|
+
} = useInputStatusIcon({
|
|
147
|
+
status,
|
|
148
|
+
statusVariant
|
|
149
|
+
});
|
|
150
|
+
const ariaDescribedBy = [description ? descriptionID : null, statusVariant !== 'tooltip' && status?.message ? statusMessageID : null,
|
|
151
|
+
// The tooltip variant renders no message box; describe the input by the
|
|
152
|
+
// tooltip's content instead so the status is still announced.
|
|
153
|
+
statusTooltipDescribedBy, showsDisabledMessage ? disabledMessageTooltip.describedBy : null].filter(Boolean).join(' ') || undefined;
|
|
152
154
|
const displayValue = useMemo(() => formatRangeDisplay(optimisticValue), [optimisticValue]);
|
|
153
155
|
const popover = usePopover({
|
|
154
156
|
dialogLabel: t('@astryx.dateRangeInput.dialogLabel'),
|
|
@@ -202,6 +204,7 @@ export function DateRangeInput({
|
|
|
202
204
|
message: status.message,
|
|
203
205
|
messageID: status.message ? statusMessageID : undefined
|
|
204
206
|
} : undefined,
|
|
207
|
+
statusVariant: statusVariant,
|
|
205
208
|
labelTooltip: labelTooltip,
|
|
206
209
|
width: width,
|
|
207
210
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
@@ -216,7 +219,7 @@ export function DateRangeInput({
|
|
|
216
219
|
...mergeProps(themeProps('date-range-input', {
|
|
217
220
|
size,
|
|
218
221
|
status: status?.type ?? null
|
|
219
|
-
}), stylex.props(inputWrapperStyles.base, sizeStyles[size], isEffectivelyDisabled && inputWrapperStyles.disabled, status && inputStatusBorderStyles[status.type], status && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], xstyle), className, style),
|
|
222
|
+
}), stylex.props(inputWrapperStyles.base, sizeStyles[size], isEffectivelyDisabled && inputWrapperStyles.disabled, status && inputStatusBorderStyles[status.type], status && !isEffectivelyDisabled && inputStatusHoverShadowStyles[status.type], status && inputStatusFocusWithinStyles[status.type], xstyle), className, style),
|
|
220
223
|
children: [/*#__PURE__*/_jsx("button", {
|
|
221
224
|
type: "button",
|
|
222
225
|
onClick: handleToggle,
|
|
@@ -234,7 +237,10 @@ export function DateRangeInput({
|
|
|
234
237
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
235
238
|
icon: "calendar",
|
|
236
239
|
size: "sm",
|
|
237
|
-
color: "secondary"
|
|
240
|
+
color: "secondary",
|
|
241
|
+
...themeProps('date-range-input-toggle-icon', {
|
|
242
|
+
state: popover.isOpen ? 'expanded' : 'collapsed'
|
|
243
|
+
})
|
|
238
244
|
})
|
|
239
245
|
}), /*#__PURE__*/_jsx("button", {
|
|
240
246
|
ref: ref,
|
|
@@ -282,15 +288,12 @@ export function DateRangeInput({
|
|
|
282
288
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
283
289
|
icon: "close",
|
|
284
290
|
size: "sm",
|
|
285
|
-
color: "secondary"
|
|
291
|
+
color: "secondary",
|
|
292
|
+
...themeProps('date-range-input-clear-icon')
|
|
286
293
|
})
|
|
287
294
|
}), isBusy && /*#__PURE__*/_jsx(Spinner, {
|
|
288
295
|
size: "sm"
|
|
289
|
-
}),
|
|
290
|
-
icon: statusIconMap[status.type],
|
|
291
|
-
size: "md",
|
|
292
|
-
color: statusIconColorMap[status.type]
|
|
293
|
-
})]
|
|
296
|
+
}), statusIcon]
|
|
294
297
|
}), popover.render(/*#__PURE__*/_jsxs("div", {
|
|
295
298
|
...{
|
|
296
299
|
className: "x78zum5"
|
|
@@ -299,7 +302,7 @@ export function DateRangeInput({
|
|
|
299
302
|
role: "group",
|
|
300
303
|
"aria-label": t('@astryx.dateRangeInput.presetDateRanges'),
|
|
301
304
|
...{
|
|
302
|
-
className: "x78zum5 xdt5ytf xzye2dw x1b2ylru
|
|
305
|
+
className: "x78zum5 xdt5ytf xzye2dw x1b2ylru xw8tdv1 x18b5jzi xl0t3rv x1d77m7x"
|
|
303
306
|
},
|
|
304
307
|
children: presets.map(preset => {
|
|
305
308
|
const presetRange = preset.getRange();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeInput.d.ts","sourceRoot":"","sources":["../../src/DateTimeInput/DateTimeInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTimeInput.d.ts","source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