@astryxdesign/core 0.7.7-canary.c0929c8 → 0.7.7-canary.c19ca12
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/dist/AlertDialog/AlertDialog.d.ts +4 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +36 -6
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts +13 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts.map +1 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.js +45 -0
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +79 -9
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +23 -4
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +5 -4
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +3 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +2 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +7 -3
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +47 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +13 -2
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +7 -1
- package/dist/CheckboxList/CheckboxListContext.d.ts +6 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +10 -2
- package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +14 -4
- package/dist/ContextMenu/ContextMenu.js +2 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +5 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +13 -27
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +22 -41
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +23 -45
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +15 -11
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +5 -1
- package/dist/Field/Field.js +2 -2
- package/dist/Field/PanelSearchInput.d.ts +9 -1
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +3 -1
- package/dist/HoverCard/HoverCard.d.ts +4 -3
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +27 -2
- package/dist/HoverCard/useHoverCard.d.ts +5 -4
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +17 -31
- package/dist/Icon/Icon.d.ts +5 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +5 -2
- package/dist/InfoTip/InfoTip.d.ts +63 -0
- package/dist/InfoTip/InfoTip.d.ts.map +1 -0
- package/dist/InfoTip/InfoTip.js +126 -0
- package/dist/InfoTip/index.d.ts +10 -0
- package/dist/InfoTip/index.d.ts.map +1 -0
- package/dist/InfoTip/index.js +12 -0
- package/dist/Layer/layerAnimations.stylex.d.ts +7 -8
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +25 -20
- package/dist/Layer/useBackdropPress.d.ts +27 -0
- package/dist/Layer/useBackdropPress.d.ts.map +1 -0
- package/dist/Layer/useBackdropPress.js +53 -0
- package/dist/Layer/usePressPin.d.ts +20 -10
- package/dist/Layer/usePressPin.d.ts.map +1 -1
- package/dist/Layer/usePressPin.js +66 -18
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +18 -0
- package/dist/MobileNav/MobileNav.js +0 -1
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +2 -4
- package/dist/Outline/Outline.d.ts +2 -4
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -52
- package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromMarkdown.js +1 -0
- package/dist/Outline/useScrollSpy.js +3 -3
- package/dist/PowerSearch/PowerSearch.d.ts +36 -3
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +571 -302
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +100 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +1913 -0
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +32 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +17 -6
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +170 -61
- package/dist/PowerSearch/formatFilterValue.d.ts +7 -0
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +11 -1
- package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
- package/dist/PowerSearch/formatTokenValue.js +160 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +8 -2
- package/dist/RadioList/RadioListItem.d.ts +1 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -3
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +118 -260
- package/dist/Resizable/resizeGesture.d.ts +91 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -0
- package/dist/Resizable/resizeGesture.js +251 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +3 -1
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +115 -8
- package/dist/SegmentedControl/SegmentedControlContext.d.ts +6 -0
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -0
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +8 -1
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts +357 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +1349 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +70 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +264 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +96 -67
- package/dist/Selector/optionShape.d.ts +24 -0
- package/dist/Selector/optionShape.d.ts.map +1 -0
- package/dist/Selector/optionShape.js +48 -0
- package/dist/Selector/selectableOptionEntries.d.ts +20 -0
- package/dist/Selector/selectableOptionEntries.d.ts.map +1 -0
- package/dist/Selector/selectableOptionEntries.js +38 -0
- package/dist/Selector/utils.d.ts +2 -17
- package/dist/Selector/utils.d.ts.map +1 -1
- package/dist/Selector/utils.js +3 -51
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -9
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +60 -58
- package/dist/Switch/switchTouch.d.ts +0 -7
- package/dist/Switch/switchTouch.d.ts.map +1 -1
- package/dist/Switch/switchTouch.js +2 -10
- package/dist/Switch/useSwitchTouch.d.ts +2 -11
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +35 -93
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +29 -8
- package/dist/TextInput/TextInput.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +10 -7
- package/dist/Toast/Toast.d.ts +11 -1
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +30 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +94 -34
- package/dist/Toast/types.d.ts +9 -3
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +13 -4
- package/dist/Token/TokenNamingContext.d.ts +14 -0
- package/dist/Token/TokenNamingContext.d.ts.map +1 -0
- package/dist/Token/TokenNamingContext.js +23 -0
- package/dist/Tokenizer/Tokenizer.d.ts +46 -59
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +40 -57
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +25 -28
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +157 -54
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +3 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.js +19 -0
- package/dist/Tooltip/Tooltip.d.ts +25 -30
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +24 -5
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +45 -28
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +52 -59
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +4 -7
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +4 -7
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +4 -7
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/animator/createAnimator.d.ts +98 -0
- package/dist/animator/createAnimator.d.ts.map +1 -0
- package/dist/animator/createAnimator.js +259 -0
- package/dist/astryx.css +96 -7
- package/dist/gestures/GestureHost.d.ts +27 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +157 -21
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +4 -3
- package/dist/hooks/actionGroupTracker.d.ts +7 -4
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +19 -56
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/pressGroupContext.d.ts +6 -0
- package/dist/hooks/pressGroupContext.d.ts.map +1 -0
- package/dist/hooks/pressGroupContext.js +20 -0
- package/dist/hooks/useActionGroupTracking.d.ts +53 -0
- package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
- package/dist/hooks/useActionGroupTracking.js +174 -0
- package/dist/hooks/useAnimator.d.ts +41 -0
- package/dist/hooks/useAnimator.d.ts.map +1 -0
- package/dist/hooks/useAnimator.js +70 -0
- package/dist/hooks/useAttachment.d.ts +1 -1
- package/dist/hooks/useAttachment.js +1 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts +11 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
- package/dist/hooks/useHighlightedOptionScroll.js +112 -11
- package/dist/hooks/useInputStatusIcon.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +2 -2
- package/dist/hooks/useLongPress.d.ts +6 -2
- package/dist/hooks/useLongPress.d.ts.map +1 -1
- package/dist/hooks/useLongPress.js +95 -15
- package/dist/hooks/useMediaQuery.d.ts +2 -1
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +7 -4
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +4 -2
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts +8 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.js +12 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +42 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +7 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +33 -1
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +33 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/internal/SheetConfirmation.d.ts +11 -0
- package/dist/internal/SheetConfirmation.d.ts.map +1 -0
- package/dist/internal/SheetConfirmation.js +92 -0
- package/dist/internal/indicatorPress.stylex.d.ts +20 -0
- package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
- package/dist/internal/indicatorPress.stylex.js +26 -0
- package/dist/internal/sheetDraft.d.ts +35 -0
- package/dist/internal/sheetDraft.d.ts.map +1 -0
- package/dist/internal/sheetDraft.js +65 -0
- package/dist/internal/touch-sheet.d.ts +21 -0
- package/dist/internal/touch-sheet.d.ts.map +1 -0
- package/dist/internal/touch-sheet.js +19 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts +24 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +1 -0
- package/dist/internal/useDismissSearchOnTouchDrag.js +56 -0
- package/dist/motion/animator.d.ts +14 -14
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +41 -18
- package/dist/motion/reducedMotion.d.ts +24 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -1
- package/dist/motion/reducedMotion.js +78 -1
- package/dist/motion/roles.d.ts +7 -1
- package/dist/motion/roles.d.ts.map +1 -1
- package/dist/motion/roles.js +20 -1
- package/dist/motion/uikit/alert.d.ts +41 -0
- package/dist/motion/uikit/alert.d.ts.map +1 -0
- package/dist/motion/uikit/alert.js +43 -0
- package/dist/motion/uikit/index.d.ts +6 -5
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +6 -5
- package/dist/motion/uikit/segmented.d.ts +55 -0
- package/dist/motion/uikit/segmented.d.ts.map +1 -0
- package/dist/motion/uikit/segmented.js +77 -0
- package/dist/motion/uikit/springs.d.ts +0 -18
- package/dist/motion/uikit/springs.d.ts.map +1 -1
- package/dist/motion/uikit/springs.js +5 -21
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +15 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressGroupItem.stylex.js +23 -0
- package/dist/privateAttributes/segmentTitle.stylex.d.ts +5 -0
- package/dist/privateAttributes/segmentTitle.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/segmentTitle.stylex.js +22 -0
- package/dist/utils/browserClickWait.d.ts +35 -0
- package/dist/utils/browserClickWait.d.ts.map +1 -0
- package/dist/utils/browserClickWait.js +123 -0
- package/dist/utils/clickGuard.d.ts +14 -1
- package/dist/utils/clickGuard.d.ts.map +1 -1
- package/dist/utils/clickGuard.js +46 -1
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +12 -0
- package/dist/utils/focusReturn.d.ts +15 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +28 -0
- package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +3 -2
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +19 -6
- package/dist/utils/triggerFocus.d.ts +36 -0
- package/dist/utils/triggerFocus.d.ts.map +1 -0
- package/dist/utils/triggerFocus.js +65 -0
- package/locales/en.json +128 -0
- package/locales/pseudo.json +96 -0
- package/package.json +18 -8
- package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
- package/src/AlertDialog/AlertDialog.tsx +37 -5
- package/src/AppShell/useCloseMobileDrawerOnActivate.ts +52 -0
- package/src/BottomSheet/BottomSheet.tsx +95 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +40 -5
- package/src/BottomSheet/bottomSheetStack.ts +8 -4
- package/src/BottomSheet/useSheetGestures.ts +3 -1
- package/src/Breadcrumbs/BreadcrumbItem.tsx +13 -3
- package/src/Button/Button.tsx +63 -5
- package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
- package/src/CheckboxInput/CheckboxInput.tsx +36 -9
- package/src/CheckboxList/CheckboxList.doc.mjs +4 -2
- package/src/CheckboxList/CheckboxList.tsx +6 -0
- package/src/CheckboxList/CheckboxListContext.tsx +6 -0
- package/src/CheckboxList/CheckboxListItem.tsx +11 -2
- package/src/ComplexSelector/ComplexSelector.tsx +20 -5
- package/src/ContextMenu/ContextMenu.tsx +2 -2
- package/src/DateInput/DateInput.tsx +8 -2
- package/src/DateInput/MonthScroller.tsx +18 -22
- package/src/DateInput/Wheel.tsx +30 -32
- package/src/DateTimeInput/DateTimeInput.tsx +8 -2
- package/src/Dialog/Dialog.tsx +54 -45
- package/src/Drawer/Drawer.tsx +28 -11
- package/src/Drawer/useDrawerDialogPresence.ts +5 -1
- package/src/Field/Field.tsx +2 -2
- package/src/Field/PanelSearchInput.tsx +11 -0
- package/src/HoverCard/HoverCard.doc.mjs +4 -2
- package/src/HoverCard/HoverCard.tsx +35 -4
- package/src/HoverCard/useHoverCard.doc.mjs +178 -36
- package/src/HoverCard/useHoverCard.tsx +46 -52
- package/src/Icon/Icon.doc.mjs +49 -8
- package/src/Icon/Icon.tsx +15 -7
- package/src/InfoTip/InfoTip.doc.mjs +192 -0
- package/src/InfoTip/InfoTip.tsx +186 -0
- package/src/InfoTip/index.ts +14 -0
- package/src/Layer/layerAnimations.stylex.ts +24 -16
- package/src/Layer/useBackdropPress.ts +81 -0
- package/src/Layer/usePressPin.ts +86 -26
- package/src/Lightbox/Lightbox.tsx +18 -0
- package/src/MobileNav/MobileNav.tsx +1 -1
- package/src/MultiSelector/hooks.ts +2 -4
- package/src/Outline/Outline.doc.mjs +177 -51
- package/src/Outline/Outline.tsx +5 -57
- package/src/Outline/useOutlineFromMarkdown.doc.mjs +157 -0
- package/src/Outline/useOutlineFromMarkdown.ts +1 -0
- package/src/Outline/useScrollSpy.ts +3 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +55 -6
- package/src/PowerSearch/PowerSearch.tsx +798 -324
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2515 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +28 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +203 -38
- package/src/PowerSearch/formatFilterValue.ts +18 -1
- package/src/PowerSearch/formatTokenValue.ts +215 -0
- package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
- package/src/RadioList/RadioList.doc.mjs +4 -2
- package/src/RadioList/RadioList.tsx +7 -2
- package/src/RadioList/RadioListItem.tsx +5 -3
- package/src/Resizable/ResizeHandle.tsx +133 -328
- package/src/Resizable/resizeGesture.ts +368 -0
- package/src/SegmentedControl/SegmentedControl.doc.mjs +3 -3
- package/src/SegmentedControl/SegmentedControl.tsx +179 -5
- package/src/SegmentedControl/SegmentedControlContext.ts +6 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +12 -1
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +1640 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +308 -0
- package/src/Selector/Selector.tsx +136 -89
- package/src/Selector/optionShape.ts +64 -0
- package/src/Selector/selectableOptionEntries.ts +39 -0
- package/src/Selector/utils.ts +9 -68
- package/src/SideNav/SideNavItem.tsx +3 -7
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Spinner/Spinner.tsx +77 -63
- package/src/Switch/switchTouch.ts +2 -10
- package/src/Switch/useSwitchTouch.ts +38 -104
- package/src/Table/BaseTable.tsx +46 -12
- package/src/TextInput/TextInput.tsx +11 -10
- package/src/Toast/Toast.doc.mjs +4 -3
- package/src/Toast/Toast.tsx +57 -32
- package/src/Toast/ToastViewport.tsx +121 -35
- package/src/Toast/types.ts +9 -3
- package/src/Token/Token.tsx +15 -4
- package/src/Token/TokenNamingContext.ts +28 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
- package/src/Tokenizer/Tokenizer.tsx +89 -85
- package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
- package/src/Tokenizer/TokenizerItemRemovableContext.ts +24 -0
- package/src/Tooltip/Tooltip.doc.mjs +123 -54
- package/src/Tooltip/Tooltip.tsx +36 -39
- package/src/Tooltip/index.ts +0 -1
- package/src/Tooltip/useTooltip.doc.mjs +171 -33
- package/src/Tooltip/useTooltip.tsx +98 -86
- package/src/TopNav/TopNavItem.tsx +6 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +6 -5
- package/src/TopNav/TopNavMenu.tsx +6 -5
- package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/animator/createAnimator.doc.mjs +153 -0
- package/src/animator/createAnimator.ts +324 -0
- package/src/gestures/GestureHost.ts +198 -20
- package/src/gestures/PressTracker.ts +4 -3
- package/src/gestures/README.md +7 -1
- package/src/hooks/actionGroupTracker.ts +32 -61
- package/src/hooks/index.ts +2 -0
- package/src/hooks/pressGroupContext.ts +21 -0
- package/src/hooks/useActionGroupTracking.ts +224 -0
- package/src/hooks/useAnimator.doc.mjs +109 -0
- package/src/hooks/useAnimator.ts +67 -0
- package/src/hooks/useAttachment.ts +1 -1
- package/src/hooks/useHighlightedOptionScroll.ts +123 -15
- package/src/hooks/useInputStatusIcon.tsx +3 -2
- package/src/hooks/useLongPress.doc.mjs +2 -2
- package/src/hooks/useLongPress.ts +136 -15
- package/src/hooks/useMediaQuery.doc.mjs +2 -2
- package/src/hooks/useMediaQuery.ts +13 -4
- package/src/hooks/useMenuPress.ts +8 -2
- package/src/i18n/generated-english/InfoTip/InfoTip.generated.ts +13 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +1 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
- package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
- package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +7 -1
- package/src/i18n/generated-locales/en.generated.ts +43 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +44 -0
- package/src/index.ts +14 -0
- package/src/internal/SheetConfirmation.tsx +101 -0
- package/src/internal/indicatorPress.stylex.ts +24 -0
- package/src/internal/sheetDraft.ts +80 -0
- package/src/internal/touch-sheet.ts +21 -0
- package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
- package/src/motion/MEASUREMENTS.md +7 -0
- package/src/motion/README.md +9 -5
- package/src/motion/animator.ts +61 -29
- package/src/motion/reducedMotion.ts +79 -1
- package/src/motion/roles.ts +20 -1
- package/src/motion/uikit/alert.ts +43 -0
- package/src/motion/uikit/index.ts +5 -5
- package/src/motion/uikit/segmented.ts +74 -0
- package/src/motion/uikit/springs.ts +5 -21
- package/src/privateAttributes/pressGroupItem.stylex.ts +23 -0
- package/src/privateAttributes/segmentTitle.stylex.ts +22 -0
- package/src/utils/browserClickWait.ts +133 -0
- package/src/utils/clickGuard.ts +64 -1
- package/src/utils/dateParser.ts +16 -0
- package/src/utils/focusReturn.ts +30 -0
- package/src/utils/interactionOverlay.stylex.ts +3 -2
- package/src/utils/pressFeedback.ts +19 -6
- package/src/utils/triggerFocus.ts +80 -0
- package/dist/internal/tokenizer-presentation.d.ts +0 -21
- package/dist/internal/tokenizer-presentation.d.ts.map +0 -1
- package/dist/internal/tokenizer-presentation.js +0 -21
- package/src/internal/tokenizer-presentation.ts +0 -25
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* SYNC: When placement, stacking, hosting, focus, announcement, or safe-area
|
|
14
14
|
* behavior changes, update ToastViewport.test.tsx, Toast.doc.mjs, and Toast.stories.tsx.
|
|
15
15
|
*/
|
|
16
|
-
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
16
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
17
17
|
import { createPortal } from 'react-dom';
|
|
18
18
|
import * as stylex from '@stylexjs/stylex';
|
|
19
19
|
import "../theme/tokens.stylex.js";
|
|
20
20
|
import { spacingVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
21
21
|
import { mergeProps } from "../utils/index.js";
|
|
22
22
|
import { getNodeText } from "../utils/getNodeText.js";
|
|
23
|
+
import { moveFocusLeftBehind, noteFocusWithin } from "../utils/focusReturn.js";
|
|
23
24
|
import { INTERACTIVE_SELECTORS } from "../hooks/useClickableContainer.js";
|
|
24
25
|
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
25
26
|
import { layerTextReset } from "../Layer/layerTextReset.stylex.js";
|
|
@@ -122,7 +123,8 @@ function ToastRow({
|
|
|
122
123
|
isExiting,
|
|
123
124
|
isReversed,
|
|
124
125
|
onExited,
|
|
125
|
-
onDismiss
|
|
126
|
+
onDismiss,
|
|
127
|
+
isLiveRegion
|
|
126
128
|
}) {
|
|
127
129
|
const o = entry.options;
|
|
128
130
|
const type = o.type ?? 'info';
|
|
@@ -194,12 +196,16 @@ function ToastRow({
|
|
|
194
196
|
isExiting: isExiting,
|
|
195
197
|
gestureDirection: isReversed ? -1 : 1,
|
|
196
198
|
onDismiss: reason => onDismiss(entry.id, reason),
|
|
197
|
-
renderContent: o.renderContent
|
|
199
|
+
renderContent: o.renderContent,
|
|
200
|
+
timerKey: entry.id,
|
|
201
|
+
isLiveRegion: isLiveRegion
|
|
198
202
|
})
|
|
199
203
|
})
|
|
200
204
|
});
|
|
201
205
|
}
|
|
202
206
|
ToastRow.displayName = 'ToastRow';
|
|
207
|
+
const hasActiveModalOutlet = () => getActiveModalOutlet() != null;
|
|
208
|
+
const hasNoModalOutlet = () => false;
|
|
203
209
|
|
|
204
210
|
/**
|
|
205
211
|
* Container that renders and manages toast notifications. Place at the root
|
|
@@ -260,6 +266,11 @@ export function ToastViewport({
|
|
|
260
266
|
// The next toast id that should receive focus once the dismissed toast has
|
|
261
267
|
// unmounted, or 'restore' to fall back to the previously-focused element.
|
|
262
268
|
const pendingFocusRef = useRef(null);
|
|
269
|
+
// The id of a toast whose overwrite updated a row that held focus. If the
|
|
270
|
+
// update removed the focused control, the commit hands focus off.
|
|
271
|
+
const overwriteFocusRef = useRef(null);
|
|
272
|
+
// Where focus was inside a toast whose dismissal hands focus off.
|
|
273
|
+
const dismissFocusNoteRef = useRef(null);
|
|
263
274
|
|
|
264
275
|
// Collect a focusable control within a toast node, if any.
|
|
265
276
|
// Reuses the canonical INTERACTIVE_SELECTORS list (native controls plus
|
|
@@ -280,13 +291,9 @@ export function ToastViewport({
|
|
|
280
291
|
return null;
|
|
281
292
|
}, []);
|
|
282
293
|
|
|
283
|
-
// Announce toasts through the persistent singleton live regions.
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
// screen readers do not announce (see useAnnounce.ts); the singleton regions
|
|
287
|
-
// are mounted empty and only mutated afterwards, so they are what actually
|
|
288
|
-
// guarantees the announcement (the per-toast markup is kept for browse-mode
|
|
289
|
-
// discoverability). The announcement happens in addToast — the imperative
|
|
294
|
+
// Announce toasts through the persistent singleton live regions. They are
|
|
295
|
+
// mounted empty and only mutated afterwards, which screen readers announce
|
|
296
|
+
// (see useAnnounce.ts). The announcement happens in addToast — the imperative
|
|
290
297
|
// dispatch path invoked once per useToast() call from an event handler,
|
|
291
298
|
// never from render — so each toast is announced exactly once by
|
|
292
299
|
// construction, independent of the React render lifecycle (StrictMode
|
|
@@ -294,6 +301,12 @@ export function ToastViewport({
|
|
|
294
301
|
// re-renders never re-announce). It is client-only (addToast never runs
|
|
295
302
|
// during SSR), so it is SSR-safe.
|
|
296
303
|
const announce = useAnnounce();
|
|
304
|
+
// An open native modal hides the body-level channel above from assistive
|
|
305
|
+
// technology, so while the viewport is hosted in one, each card announces
|
|
306
|
+
// itself through its own live region instead. Outside a modal the cards
|
|
307
|
+
// carry none, so a card updated in place is announced once.
|
|
308
|
+
const hasModalOutlet = useSyncExternalStore(subscribeModalOutlets, hasActiveModalOutlet, hasNoModalOutlet);
|
|
309
|
+
const isModalHosted = isTopLayer && hasModalOutlet;
|
|
297
310
|
const addToast = useCallback(entry => {
|
|
298
311
|
const {
|
|
299
312
|
uniqueID,
|
|
@@ -326,7 +339,26 @@ export function ToastViewport({
|
|
|
326
339
|
if (overwritten && renderedToastsRef.current.includes(overwritten)) {
|
|
327
340
|
replacedRef.current.set(overwritten.id, overwritten);
|
|
328
341
|
}
|
|
329
|
-
|
|
342
|
+
// An overwrite of a toast that is not leaving keeps its row, so the card
|
|
343
|
+
// updates in place and focus inside it stays. A leaving namesake
|
|
344
|
+
// is replaced by a new row, which enters again.
|
|
345
|
+
const keepsRow = overwritten != null && !exitingIdsRef.current.has(overwritten.id);
|
|
346
|
+
const placed = keepsRow ? {
|
|
347
|
+
...entry,
|
|
348
|
+
rowKey: overwritten.rowKey ?? overwritten.id
|
|
349
|
+
} : entry;
|
|
350
|
+
if (keepsRow) {
|
|
351
|
+
// If the update removes the focused control, the commit hands focus
|
|
352
|
+
// off as a dismissal does.
|
|
353
|
+
const note = noteFocusWithin(viewportRef.current?.querySelector(`[data-toast-id="${overwritten.id}"]`));
|
|
354
|
+
if (note != null) {
|
|
355
|
+
overwriteFocusRef.current = {
|
|
356
|
+
id: placed.id,
|
|
357
|
+
note
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
const projected = overwritten ? committed.map(t => t === overwritten ? placed : t) : [...committed, placed];
|
|
330
362
|
// `maxVisible={0}` shows every toast (FR7): nothing leaves the window.
|
|
331
363
|
const firstVisible = maxVisible > 0 ? projected.length - maxVisible : 0;
|
|
332
364
|
const cutIds = new Set(projected.filter((t, i) => i < firstVisible && exitingIdsRef.current.has(t.id)).map(t => t.id));
|
|
@@ -349,7 +381,7 @@ export function ToastViewport({
|
|
|
349
381
|
}
|
|
350
382
|
}
|
|
351
383
|
}
|
|
352
|
-
pending.set(entry.id,
|
|
384
|
+
pending.set(entry.id, placed);
|
|
353
385
|
// An overwrite swaps a new entry, with a new id, into the replaced
|
|
354
386
|
// toast's place, so the old row leaves the DOM without ever being
|
|
355
387
|
// dismissed. Its settled id is dropped by the prune below, which covers
|
|
@@ -360,7 +392,7 @@ export function ToastViewport({
|
|
|
360
392
|
// replaced namesake as leaving since, which must not turn the
|
|
361
393
|
// overwrite into an append. An ignored collision already returned.
|
|
362
394
|
const kept = prev.filter(t => !cutIds.has(t.id));
|
|
363
|
-
return overwritten && kept.includes(overwritten) ? kept.map(t => t === overwritten ?
|
|
395
|
+
return overwritten && kept.includes(overwritten) ? kept.map(t => t === overwritten ? placed : t) : [...kept, placed];
|
|
364
396
|
});
|
|
365
397
|
}, [announce, maxVisible]);
|
|
366
398
|
const removeToast = useCallback((id, reason) => {
|
|
@@ -383,9 +415,15 @@ export function ToastViewport({
|
|
|
383
415
|
// focused before the user entered the viewport) rather than <body>.
|
|
384
416
|
const el = viewportRef.current;
|
|
385
417
|
const active = document.activeElement;
|
|
386
|
-
|
|
418
|
+
// A toast an overwrite replaced in place no longer owns its row: the
|
|
419
|
+
// replacement does, so dismissing the replaced toast leaves the row, and
|
|
420
|
+
// focus in it, to the replacement.
|
|
421
|
+
const rowKey = entry.rowKey ?? entry.id;
|
|
422
|
+
const isReplacedInPlace = !toastsRef.current.some(t => t.id === id) && toastsRef.current.some(t => t.rowKey === rowKey);
|
|
423
|
+
const dismissedNode = isReplacedInPlace ? null : el?.querySelector(`[data-toast-id="${id}"]`) ?? null;
|
|
387
424
|
if (dismissedNode && active instanceof Node && dismissedNode.contains(active)) {
|
|
388
425
|
focusHandoffIdRef.current = id;
|
|
426
|
+
dismissFocusNoteRef.current = noteFocusWithin(dismissedNode);
|
|
389
427
|
// Pick the toast to receive focus while the DOM is still intact: the
|
|
390
428
|
// nearest one after it, then before it, that shows once it is gone
|
|
391
429
|
// (FR10), else restore. The list may already run ahead of the render
|
|
@@ -441,6 +479,31 @@ export function ToastViewport({
|
|
|
441
479
|
setToasts(prev => prev.filter(t => t.id !== id));
|
|
442
480
|
}, []);
|
|
443
481
|
|
|
482
|
+
// Moves focus to a control in the target toast, else in another toast that
|
|
483
|
+
// shows (newest first), else back to the element focused before focus
|
|
484
|
+
// entered the viewport, so a handoff never drops focus to <body>.
|
|
485
|
+
const handOffFocus = useCallback((note, targetId) => {
|
|
486
|
+
const el = viewportRef.current;
|
|
487
|
+
const rowFor = id => el?.querySelector(`[data-toast-id="${id}"]`) ?? null;
|
|
488
|
+
const shownIds = toastsRef.current.slice(maxVisibleRef.current > 0 ? -maxVisibleRef.current : 0).map(t => t.id).reverse();
|
|
489
|
+
const candidates = targetId == null ? [] : [targetId, ...shownIds.filter(id => id !== targetId)];
|
|
490
|
+
let target = null;
|
|
491
|
+
for (const id of candidates) {
|
|
492
|
+
target = getFocusable(rowFor(id));
|
|
493
|
+
if (target != null) {
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
const prev = prevFocusRef.current;
|
|
498
|
+
const isReturning = target == null && prev != null && prev.isConnected;
|
|
499
|
+
if (target == null) {
|
|
500
|
+
target = isReturning ? prev : el;
|
|
501
|
+
}
|
|
502
|
+
if (moveFocusLeftBehind(note, target) && isReturning) {
|
|
503
|
+
prevFocusRef.current = null;
|
|
504
|
+
}
|
|
505
|
+
}, [getFocusable]);
|
|
506
|
+
|
|
444
507
|
// After a dismissed toast unmounts, hand focus off so it never falls to
|
|
445
508
|
// <body>. Runs in a layout effect once the toast list no longer contains
|
|
446
509
|
// the dismissed toast.
|
|
@@ -456,25 +519,21 @@ export function ToastViewport({
|
|
|
456
519
|
}
|
|
457
520
|
focusHandoffIdRef.current = null;
|
|
458
521
|
pendingFocusRef.current = null;
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
const prev = prevFocusRef.current;
|
|
471
|
-
prevFocusRef.current = null;
|
|
472
|
-
if (prev && prev.isConnected) {
|
|
473
|
-
prev.focus();
|
|
474
|
-
} else if (el) {
|
|
475
|
-
el.focus();
|
|
522
|
+
const note = dismissFocusNoteRef.current;
|
|
523
|
+
dismissFocusNoteRef.current = null;
|
|
524
|
+
handOffFocus(note, target === 'restore' ? null : target);
|
|
525
|
+
}, [toasts, handOffFocus]);
|
|
526
|
+
|
|
527
|
+
// After an overwrite updated a row that held focus: focus stays on the same
|
|
528
|
+
// control, or, if the update removed it, moves as a dismissal hands it off.
|
|
529
|
+
useLayoutEffect(() => {
|
|
530
|
+
const overwrite = overwriteFocusRef.current;
|
|
531
|
+
if (overwrite == null) {
|
|
532
|
+
return;
|
|
476
533
|
}
|
|
477
|
-
|
|
534
|
+
overwriteFocusRef.current = null;
|
|
535
|
+
handOffFocus(overwrite.note, overwrite.id);
|
|
536
|
+
}, [toasts, handOffFocus]);
|
|
478
537
|
const findByUniqueID = useCallback(uid => {
|
|
479
538
|
return toastsRef.current.find(t => t.options.uniqueID === uid);
|
|
480
539
|
}, []);
|
|
@@ -663,8 +722,9 @@ export function ToastViewport({
|
|
|
663
722
|
isExiting: exitingIds.has(entry.id),
|
|
664
723
|
isReversed: isReversed,
|
|
665
724
|
onExited: handleExited,
|
|
666
|
-
onDismiss: removeToast
|
|
667
|
-
|
|
725
|
+
onDismiss: removeToast,
|
|
726
|
+
isLiveRegion: isModalHosted
|
|
727
|
+
}, entry.rowKey ?? entry.id))
|
|
668
728
|
})
|
|
669
729
|
});
|
|
670
730
|
return /*#__PURE__*/_jsxs(ToastContext, {
|
package/dist/Toast/types.d.ts
CHANGED
|
@@ -31,9 +31,10 @@ export interface ToastOptions {
|
|
|
31
31
|
/**
|
|
32
32
|
* Replaces the content of this toast's card with your own layout.
|
|
33
33
|
*
|
|
34
|
-
* Astryx keeps the card
|
|
35
|
-
* the
|
|
36
|
-
*
|
|
34
|
+
* Astryx keeps the card and its auto-hide behavior (inside a
|
|
35
|
+
* `ToastViewport` the viewport announces the toast, and while a modal hosts
|
|
36
|
+
* the viewport the card announces itself), then hands the
|
|
37
|
+
* renderer this toast's content, resolved settings and `dismiss` callback. The renderer owns every control inside its layout; call
|
|
37
38
|
* `dismiss` from the control that should close the toast. Astryx does not
|
|
38
39
|
* inject a fallback control into custom content.
|
|
39
40
|
*
|
|
@@ -85,5 +86,10 @@ export interface ToastEntry {
|
|
|
85
86
|
id: string;
|
|
86
87
|
options: ToastOptions;
|
|
87
88
|
createdAt: number;
|
|
89
|
+
/**
|
|
90
|
+
* The row's identity in the stack. A uniqueID overwrite keeps the replaced
|
|
91
|
+
* toast's, so the card updates in place and focus inside it stays.
|
|
92
|
+
*/
|
|
93
|
+
rowKey?: string;
|
|
88
94
|
}
|
|
89
95
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Toast/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,gDAAgD;AAChD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,6DAA6D;AAC7D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAA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;;OAcG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAErC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAC3C,gDAAgD;IAChD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC/C;AAED,oDAAoD;AACpD,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC;AAExC,wDAAwD;AACxD,MAAM,WAAW,uBAAuB;IACtC,yDAAyD;IACzD,IAAI,EAAE,SAAS,CAAC;IAChB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,4EAA4E;IAC5E,IAAI,EAAE,SAAS,CAAC;IAChB,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,OAAO,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,uBAAuB,KAC3B,SAAS,CAAC;AAEf,oDAAoD;AACpD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,cAAc,CAAC;AAEpE,iDAAiD;AACjD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/Token/Token.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - /apps/storybook/stories/Token.stories.tsx (storybook stories)
|
|
13
13
|
* - /packages/cli/assets/templates/blocks/components/Token/ (showcase blocks)
|
|
14
14
|
*/
|
|
15
|
-
import type
|
|
15
|
+
import { type ReactNode } from 'react';
|
|
16
16
|
import type { BaseProps } from '../BaseProps.js';
|
|
17
17
|
import type { TokenColorMap } from './index.js';
|
|
18
18
|
/**
|
|
@@ -95,7 +95,7 @@ export interface TokenProps extends BaseProps<HTMLElement> {
|
|
|
95
95
|
* <Token label="Link" href="/path" />
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
|
-
export declare function Token({ label, size, color, icon, isDisabled, onRemove, onClick, href, description, endContent, isLabelHidden, xstyle, className, style, 'data-testid': testId, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ref, ...rest }: TokenProps): import("react").JSX.Element;
|
|
98
|
+
export declare function Token({ label, size, color, icon, isDisabled, onRemove, onClick, href, description, endContent, isLabelHidden, xstyle, className, style, 'data-testid': testId, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-haspopup': ariaHasPopup, 'aria-expanded': ariaExpanded, ref, ...rest }: TokenProps): import("react").JSX.Element;
|
|
99
99
|
export declare namespace Token {
|
|
100
100
|
var displayName: string;
|
|
101
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../src/Token/Token.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Token.d.ts","sourceRoot":"","sources":["../../src/Token/Token.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAM,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAiB1C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAe3C;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,WAAW,UAAW,SAAQ,SAAS,CAAC,WAA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|
17
17
|
* - /packages/cli/assets/templates/blocks/components/Token/ (showcase blocks)
|
|
18
18
|
*/
|
|
19
|
+
import { use } from 'react';
|
|
19
20
|
import * as stylex from '@stylexjs/stylex';
|
|
20
21
|
import "../theme/tokens.stylex.js";
|
|
21
22
|
import { colorVars, spacingVars, radiusVars, sizeVars, durationVars, easeVars, fontWeightVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
@@ -29,6 +30,7 @@ import { focusOutlineProps } from "../utils/focusOutline.stylex.js";
|
|
|
29
30
|
import { interactionOverlayStyles } from "../utils/interactionOverlay.stylex.js";
|
|
30
31
|
import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
31
32
|
import { disabledInteractionProps } from "../utils/disabledInteraction.js";
|
|
33
|
+
import { TokenNamingContext } from "./TokenNamingContext.js";
|
|
32
34
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
33
35
|
import english from "../i18n/generated-english/Token/Token.generated.js";
|
|
34
36
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -90,6 +92,7 @@ const styles = {
|
|
|
90
92
|
kaIpWk: "xjspbzw",
|
|
91
93
|
kzqmXN: "x1kky2od",
|
|
92
94
|
kZKoxP: "xlup9mm",
|
|
95
|
+
kmuXW: "x2lah0s",
|
|
93
96
|
kMwMTN: "x1heor9g",
|
|
94
97
|
k5JduY: "x1s928wv",
|
|
95
98
|
kwXMNM: "x1j6awrg",
|
|
@@ -215,6 +218,8 @@ export function Token({
|
|
|
215
218
|
'data-testid': testId,
|
|
216
219
|
'aria-labelledby': ariaLabelledBy,
|
|
217
220
|
'aria-describedby': ariaDescribedBy,
|
|
221
|
+
'aria-haspopup': ariaHasPopup,
|
|
222
|
+
'aria-expanded': ariaExpanded,
|
|
218
223
|
ref,
|
|
219
224
|
...rest
|
|
220
225
|
}) {
|
|
@@ -229,6 +234,7 @@ export function Token({
|
|
|
229
234
|
onClick,
|
|
230
235
|
isDisabled
|
|
231
236
|
});
|
|
237
|
+
const naming = use(TokenNamingContext);
|
|
232
238
|
|
|
233
239
|
// When role is 'button' via context (no explicit onClick), treat as
|
|
234
240
|
// if onClick was provided — the popover attaches its own handler.
|
|
@@ -236,7 +242,7 @@ export function Token({
|
|
|
236
242
|
const removeButton = onRemove != null && /*#__PURE__*/_jsx("button", {
|
|
237
243
|
type: "button",
|
|
238
244
|
"aria-label": t('@astryx.token.remove', {
|
|
239
|
-
label
|
|
245
|
+
label: naming?.removeName ?? label
|
|
240
246
|
}),
|
|
241
247
|
onClick: e => {
|
|
242
248
|
e.stopPropagation();
|
|
@@ -267,12 +273,14 @@ export function Token({
|
|
|
267
273
|
}), endContent, removeButton]
|
|
268
274
|
});
|
|
269
275
|
|
|
270
|
-
// Naming inputs reach the element that owns the token's action:
|
|
271
|
-
// button of a clickable token, otherwise the root
|
|
276
|
+
// Naming and popup inputs reach the element that owns the token's action:
|
|
277
|
+
// the inner button of a clickable token, otherwise the root
|
|
272
278
|
// (architecture:public-component-api INV5).
|
|
273
279
|
const labellingProps = {
|
|
274
280
|
'aria-labelledby': ariaLabelledBy,
|
|
275
|
-
'aria-describedby': ariaDescribedBy
|
|
281
|
+
'aria-describedby': ariaDescribedBy,
|
|
282
|
+
'aria-haspopup': ariaHasPopup,
|
|
283
|
+
'aria-expanded': ariaExpanded
|
|
276
284
|
};
|
|
277
285
|
const sharedProps = {
|
|
278
286
|
'data-testid': testId,
|
|
@@ -397,6 +405,7 @@ export function Token({
|
|
|
397
405
|
children: [icon, /*#__PURE__*/_jsx("button", {
|
|
398
406
|
type: "button",
|
|
399
407
|
onClick: effectiveOnClick,
|
|
408
|
+
"aria-label": ariaLabelledBy == null ? naming?.actionName : undefined,
|
|
400
409
|
...labellingProps,
|
|
401
410
|
"aria-disabled": isDisabled || undefined,
|
|
402
411
|
...(isDisabled ? disabledInteractionProps() : null),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names for a Token whose visible text runs past its label. PowerSearch
|
|
3
|
+
* provides them: its tokens show the value as `endContent`.
|
|
4
|
+
*
|
|
5
|
+
* - `actionName` names a clickable token's inner button in place of `label`.
|
|
6
|
+
* - `removeName` names the remove button in place of `label`. The remove word
|
|
7
|
+
* still comes from the catalog, so each locale keeps its word order.
|
|
8
|
+
*/
|
|
9
|
+
export interface TokenNaming {
|
|
10
|
+
actionName?: string;
|
|
11
|
+
removeName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const TokenNamingContext: import("react").Context<TokenNaming | null>;
|
|
14
|
+
//# sourceMappingURL=TokenNamingContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenNamingContext.d.ts","sourceRoot":"","sources":["../../src/Token/TokenNamingContext.ts"],"names":[],"mappings":"AAaA;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,6CAA0C,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file TokenNamingContext.ts
|
|
7
|
+
* @input Naming parts from a caller whose token value renders outside its label
|
|
8
|
+
* @output Internal context: the names of a token's action and remove button
|
|
9
|
+
* @position Internal to Core; not exported from the Token entry point
|
|
10
|
+
*/
|
|
11
|
+
import { createContext } from 'react';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Names for a Token whose visible text runs past its label. PowerSearch
|
|
15
|
+
* provides them: its tokens show the value as `endContent`.
|
|
16
|
+
*
|
|
17
|
+
* - `actionName` names a clickable token's inner button in place of `label`.
|
|
18
|
+
* - `removeName` names the remove button in place of `label`. The remove word
|
|
19
|
+
* still comes from the catalog, so each locale keeps its word order.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export const TokenNamingContext = /*#__PURE__*/createContext(null);
|
|
23
|
+
TokenNamingContext.displayName = 'TokenNamingContext';
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
* @file Tokenizer.tsx
|
|
3
3
|
* @input Uses React, BaseTypeahead, Field, Token, useAnnounce,
|
|
4
4
|
* useAdaptivePresentation, and TokenizerBottomSheet (lazy)
|
|
5
|
-
* @output Exports Tokenizer multi-select typeahead component
|
|
6
|
-
* internal TokenizerWithPresentation signature the `internal/tokenizer-presentation`
|
|
7
|
-
* entry re-exports
|
|
5
|
+
* @output Exports Tokenizer multi-select typeahead component
|
|
8
6
|
* @position Composed component; forwards DOM ref and exposes focus control via
|
|
9
|
-
* handleRef. The
|
|
10
|
-
*
|
|
11
|
-
* offers no `experimental.presentation` while its user experience is being
|
|
12
|
-
* finished (`component:Tokenizer` DEC-3, implementation gap), and only
|
|
13
|
-
* Astryx's own packages reach it through the internal entry
|
|
14
|
-
* (`architecture:react-component-runtime` INV13).
|
|
7
|
+
* handleRef. The experimental `presentation` option swaps the inline
|
|
8
|
+
* combobox for a trigger that opens TokenizerBottomSheet.
|
|
15
9
|
*
|
|
16
10
|
* SYNC: When modified, update:
|
|
17
11
|
* - /packages/core/src/Tokenizer/index.ts
|
|
@@ -59,35 +53,6 @@ export interface TokenizerHandle {
|
|
|
59
53
|
/** Blur the typeahead input. */
|
|
60
54
|
blur(): void;
|
|
61
55
|
}
|
|
62
|
-
/**
|
|
63
|
-
* The presentation options the sheet-capable signature admits. Not public:
|
|
64
|
-
* `TokenizerProps` has no `experimental` while the sheet's user experience is
|
|
65
|
-
* being finished; Astryx's own packages reach the sheet through
|
|
66
|
-
* `@astryxdesign/core/internal/tokenizer-presentation`.
|
|
67
|
-
*/
|
|
68
|
-
export interface TokenizerPresentationOptions {
|
|
69
|
-
/**
|
|
70
|
-
* How the field presents its choices.
|
|
71
|
-
* - `'popover'`: the inline combobox with its anchored suggestion menu —
|
|
72
|
-
* the stable behavior.
|
|
73
|
-
* - `'bottom-sheet'`: a trigger showing the selected tokens that opens one
|
|
74
|
-
* tall modal sheet: a search row on top, full-width checkbox rows that
|
|
75
|
-
* keep their place while the sheet is open, a create row with
|
|
76
|
-
* `hasCreate`, and a footer with a confirmed Clear all and Done. Suited
|
|
77
|
-
* to compact touch screens, where the inline combobox competes with the
|
|
78
|
-
* software keyboard.
|
|
79
|
-
* - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
|
|
80
|
-
* otherwise the popover — the same resolution Selector uses.
|
|
81
|
-
*
|
|
82
|
-
* In the sheet presentation the trigger is the control: `ref`, `id`,
|
|
83
|
-
* `aria-*`, and `data-*` reach it. `renderItem`, `renderToken`,
|
|
84
|
-
* `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`,
|
|
85
|
-
* `tokenOverflowBehavior`, and `hasAutoFocus` have no surface to act on
|
|
86
|
-
* and warn once in development.
|
|
87
|
-
* @default 'popover'
|
|
88
|
-
*/
|
|
89
|
-
presentation?: 'popover' | 'bottom-sheet' | 'adaptive';
|
|
90
|
-
}
|
|
91
56
|
export interface TokenizerProps<T extends SearchableItem> extends Omit<FieldInputBaseProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown'> {
|
|
92
57
|
/**
|
|
93
58
|
* Key handler. Runs after the built-in key handling, so it observes every key
|
|
@@ -241,38 +206,60 @@ export interface TokenizerProps<T extends SearchableItem> extends Omit<FieldInpu
|
|
|
241
206
|
ref?: React.Ref<HTMLInputElement>;
|
|
242
207
|
/** Imperative handle ref for focus/blur control. */
|
|
243
208
|
handleRef?: React.Ref<TokenizerHandle>;
|
|
209
|
+
/**
|
|
210
|
+
* Experimental options, outside the stable compatibility promise: anything
|
|
211
|
+
* in this object may change or be removed in a patch release. Omit it for
|
|
212
|
+
* the stable behavior.
|
|
213
|
+
* @experimental
|
|
214
|
+
*/
|
|
215
|
+
experimental?: {
|
|
216
|
+
/**
|
|
217
|
+
* How the field presents its choices.
|
|
218
|
+
* - `'popover'`: the inline combobox with its anchored suggestion menu —
|
|
219
|
+
* the stable behavior.
|
|
220
|
+
* - `'bottom-sheet'`: a trigger showing the selected tokens that opens one
|
|
221
|
+
* tall modal sheet: a search row on top, full-width checkbox rows that
|
|
222
|
+
* keep their place while the sheet is open, a create row with
|
|
223
|
+
* `hasCreate`, and a footer pinned in every state with a confirmed Clear
|
|
224
|
+
* all and Save. The sheet edits a draft: `onChange` fires once, when Save
|
|
225
|
+
* commits it, and a swipe, scrim or Escape close of a changed draft asks
|
|
226
|
+
* before discarding. Suited to compact touch screens, where the inline
|
|
227
|
+
* combobox competes with the software keyboard.
|
|
228
|
+
* - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
|
|
229
|
+
* otherwise the popover — the same resolution Selector uses.
|
|
230
|
+
*
|
|
231
|
+
* In the sheet presentation the trigger is the control: `ref`, `id`,
|
|
232
|
+
* `aria-*`, and `data-*` reach it. `renderItem`, `renderToken`,
|
|
233
|
+
* `endContent`, `hasClear`, `hasEntriesOnFocus`, `menuWidth`,
|
|
234
|
+
* `tokenOverflowBehavior`, and `hasAutoFocus` have no surface to act on
|
|
235
|
+
* and warn once in development.
|
|
236
|
+
* @experimental
|
|
237
|
+
* @default 'popover'
|
|
238
|
+
*/
|
|
239
|
+
presentation?: 'popover' | 'bottom-sheet' | 'adaptive';
|
|
240
|
+
};
|
|
244
241
|
}
|
|
245
242
|
/**
|
|
246
|
-
* The props
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* `
|
|
251
|
-
* `
|
|
252
|
-
* their released shapes — names no presentation.
|
|
243
|
+
* The props the experimental opt-in admits. `experimental` is present, and
|
|
244
|
+
* `ref` also accepts the sheet presentation's trigger button, the control it
|
|
245
|
+
* stands for there. Only the overload below reaches this type. `TokenizerProps`
|
|
246
|
+
* stays the component's declared props type: it is an interface, so
|
|
247
|
+
* `interface X extends TokenizerProps<T>`, `Omit<TokenizerProps<T>, …>` and
|
|
248
|
+
* `ComponentProps<typeof Tokenizer>` keep their released shapes.
|
|
253
249
|
*/
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
experimental
|
|
250
|
+
type TokenizerExperimentalProps<T extends SearchableItem> = Omit<TokenizerProps<T>, 'ref' | 'experimental'> & {
|
|
251
|
+
/** @experimental */
|
|
252
|
+
experimental: NonNullable<TokenizerProps<T>['experimental']>;
|
|
257
253
|
/**
|
|
258
254
|
* Ref forwarded to the control: the combobox input in the popover
|
|
259
255
|
* presentation, the trigger button in the sheet presentation.
|
|
256
|
+
* @experimental
|
|
260
257
|
*/
|
|
261
258
|
ref?: React.Ref<HTMLInputElement | HTMLButtonElement>;
|
|
262
259
|
};
|
|
260
|
+
export declare function Tokenizer<T extends SearchableItem>(props: TokenizerExperimentalProps<T>): React.JSX.Element;
|
|
263
261
|
export declare function Tokenizer<T extends SearchableItem>(props: TokenizerProps<T>): React.JSX.Element;
|
|
264
262
|
export declare namespace Tokenizer {
|
|
265
263
|
var displayName: string;
|
|
266
264
|
}
|
|
267
|
-
/**
|
|
268
|
-
* The same component with the sheet presentation reachable: `experimental`
|
|
269
|
-
* (`presentation: 'popover' | 'bottom-sheet' | 'adaptive'`) and a `ref` that
|
|
270
|
-
* also takes the trigger button. Not public — re-exported only by
|
|
271
|
-
* `@astryxdesign/core/internal/tokenizer-presentation`, the entry reserved
|
|
272
|
-
* for Astryx's own packages (`architecture:react-component-runtime` INV13),
|
|
273
|
-
* while the sheet's user experience is being finished (`component:Tokenizer`
|
|
274
|
-
* DEC-3). The public `Tokenizer` renders the popover presentation for every
|
|
275
|
-
* field.
|
|
276
|
-
*/
|
|
277
|
-
export declare const TokenizerWithPresentation: <T extends SearchableItem>(props: TokenizerWithPresentationProps<T>) => React.JSX.Element;
|
|
278
265
|
//# sourceMappingURL=Tokenizer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tokenizer.d.ts","sourceRoot":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