@astryxdesign/core 0.7.7-canary.550ff21 → 0.7.7-canary.58c5b8a
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/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +1 -1
- 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 +9 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +50 -5
- 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/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 +17 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +161 -20
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +63 -49
- 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 +53 -15
- 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 +9 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +20 -4
- 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.map +1 -1
- package/dist/HoverCard/HoverCard.js +27 -2
- 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/layerClickBoundary.d.ts +7 -1
- package/dist/Layer/layerClickBoundary.d.ts.map +1 -1
- package/dist/Layer/layerClickBoundary.js +2 -2
- 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 +105 -0
- package/dist/Layer/usePressPin.d.ts.map +1 -0
- package/dist/Layer/usePressPin.js +413 -0
- package/dist/Layer/useTouchTrigger.d.ts +23 -1
- package/dist/Layer/useTouchTrigger.d.ts.map +1 -1
- package/dist/Layer/useTouchTrigger.js +45 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +2 -1
- 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/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +56 -7
- 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/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +33 -6
- 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 +10 -2
- 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/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +200 -46
- package/dist/Switch/switchFill.d.ts +31 -0
- package/dist/Switch/switchFill.d.ts.map +1 -0
- package/dist/Switch/switchFill.js +88 -0
- package/dist/Switch/switchTouch.d.ts +74 -0
- package/dist/Switch/switchTouch.d.ts.map +1 -0
- package/dist/Switch/switchTouch.js +125 -0
- package/dist/Switch/useSwitchTouch.d.ts +276 -0
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -0
- package/dist/Switch/useSwitchTouch.js +939 -0
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +4 -3
- 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.map +1 -1
- package/dist/Toast/Toast.js +5 -0
- 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 +44 -60
- 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 +24 -5
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +29 -5
- package/dist/Tooltip/useTooltip.d.ts +48 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +90 -20
- 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/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +26 -15
- 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 +142 -7
- package/dist/gestures/GestureHost.d.ts +27 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +161 -22
- package/dist/gestures/PressTracker.d.ts +6 -0
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +3 -0
- package/dist/gestures/types.d.ts +6 -0
- package/dist/gestures/types.d.ts.map +1 -1
- package/dist/gestures/usePressTracker.d.ts.map +1 -1
- package/dist/gestures/usePressTracker.js +1 -0
- package/dist/gestures/wheelSegmenter.d.ts +14 -3
- package/dist/gestures/wheelSegmenter.d.ts.map +1 -1
- package/dist/gestures/wheelSegmenter.js +32 -8
- 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 +16 -8
- package/dist/hooks/useAttachment.d.ts.map +1 -1
- package/dist/hooks/useAttachment.js +35 -15
- package/dist/hooks/useFocusTrap.d.ts +15 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +13 -2
- 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/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/hooks/usePager.d.ts +261 -0
- package/dist/hooks/usePager.d.ts.map +1 -0
- package/dist/hooks/usePager.js +1169 -0
- 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/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/paging.d.ts +16 -5
- package/dist/motion/paging.d.ts.map +1 -1
- package/dist/motion/paging.js +34 -14
- 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 +7 -4
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +7 -4
- package/dist/motion/uikit/paging.d.ts +31 -20
- package/dist/motion/uikit/paging.d.ts.map +1 -1
- package/dist/motion/uikit/paging.js +41 -11
- package/dist/motion/uikit/progressBar.d.ts +27 -7
- package/dist/motion/uikit/progressBar.d.ts.map +1 -1
- package/dist/motion/uikit/progressBar.js +31 -11
- 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 +8 -42
- package/dist/motion/uikit/springs.d.ts.map +1 -1
- package/dist/motion/uikit/springs.js +12 -42
- package/dist/motion/uikit/switch.d.ts +166 -0
- package/dist/motion/uikit/switch.d.ts.map +1 -0
- package/dist/motion/uikit/switch.js +186 -0
- 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/pressHoldsDrag.stylex.d.ts +18 -0
- package/dist/privateAttributes/pressHoldsDrag.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressHoldsDrag.stylex.js +28 -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/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 +24 -6
- package/locales/en.json +128 -0
- package/locales/pseudo.json +96 -0
- package/package.json +13 -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/Avatar/Avatar.tsx +3 -1
- 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 +17 -4
- package/src/Button/Button.tsx +66 -7
- 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/DateInput/DateInput.tsx +8 -2
- package/src/DateInput/MonthScroller.tsx +18 -22
- package/src/DateInput/Wheel.tsx +172 -14
- package/src/DateRangeInput/DateRangeInput.doc.mjs +3 -2
- package/src/DateRangeInput/DateRangeInput.tsx +117 -71
- package/src/DateTimeInput/DateTimeInput.tsx +8 -2
- package/src/Dialog/Dialog.tsx +81 -15
- package/src/Drawer/Drawer.tsx +28 -11
- package/src/Drawer/useDrawerDialogPresence.ts +9 -1
- package/src/DropdownMenu/DropdownMenu.tsx +28 -6
- package/src/Field/Field.tsx +2 -2
- package/src/Field/PanelSearchInput.tsx +11 -0
- package/src/HoverCard/HoverCard.tsx +31 -1
- 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/layerClickBoundary.ts +2 -2
- package/src/Layer/useBackdropPress.ts +81 -0
- package/src/Layer/usePressPin.ts +576 -0
- package/src/Layer/useTouchTrigger.ts +56 -6
- package/src/Lightbox/Lightbox.tsx +2 -1
- 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/Popover/usePopover.tsx +71 -9
- 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/ProgressBar/ProgressBar.doc.mjs +4 -2
- package/src/ProgressBar/ProgressBar.tsx +67 -7
- 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 +14 -2
- 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/Switch/Switch.doc.mjs +3 -3
- package/src/Switch/Switch.tsx +412 -86
- package/src/Switch/switchFill.ts +106 -0
- package/src/Switch/switchTouch.ts +186 -0
- package/src/Switch/useSwitchTouch.ts +1051 -0
- package/src/TabList/Tab.tsx +5 -3
- package/src/Table/BaseTable.tsx +46 -12
- package/src/TextInput/TextInput.tsx +11 -10
- package/src/Toast/Toast.tsx +5 -0
- 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 +93 -88
- package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
- package/src/Tokenizer/TokenizerItemRemovableContext.ts +24 -0
- package/src/Tooltip/Tooltip.doc.mjs +123 -39
- package/src/Tooltip/Tooltip.tsx +43 -9
- package/src/Tooltip/useTooltip.doc.mjs +171 -31
- package/src/Tooltip/useTooltip.tsx +137 -22
- package/src/TopNav/TopNavItem.tsx +6 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +6 -5
- package/src/TopNav/TopNavMenu.tsx +6 -5
- package/src/Typeahead/Typeahead.tsx +29 -15
- package/src/animator/createAnimator.doc.mjs +153 -0
- package/src/animator/createAnimator.ts +324 -0
- package/src/gestures/GestureHost.ts +205 -21
- package/src/gestures/PressTracker.ts +10 -0
- package/src/gestures/types.ts +6 -0
- package/src/gestures/usePressTracker.ts +2 -0
- package/src/gestures/wheelSegmenter.ts +36 -7
- 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 +56 -14
- package/src/hooks/useFocusTrap.ts +26 -2
- package/src/hooks/useHighlightedOptionScroll.ts +123 -15
- package/src/hooks/useInputStatusIcon.tsx +3 -2
- package/src/hooks/useMediaQuery.doc.mjs +2 -2
- package/src/hooks/useMediaQuery.ts +13 -4
- package/src/hooks/useMenuPress.ts +8 -2
- package/src/hooks/usePager.ts +1446 -0
- 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/sheetDraft.ts +80 -0
- package/src/internal/touch-sheet.ts +21 -0
- package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
- package/src/motion/MEASUREMENTS.md +36 -27
- package/src/motion/README.md +11 -6
- package/src/motion/animator.ts +61 -29
- package/src/motion/paging.ts +37 -14
- 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 +6 -5
- package/src/motion/uikit/paging.ts +41 -10
- package/src/motion/uikit/progressBar.ts +31 -11
- package/src/motion/uikit/segmented.ts +74 -0
- package/src/motion/uikit/springs.ts +12 -42
- package/src/motion/uikit/switch.ts +174 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +23 -0
- package/src/privateAttributes/pressHoldsDrag.stylex.ts +28 -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/interactionOverlay.stylex.ts +3 -2
- package/src/utils/pressFeedback.ts +24 -6
- 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
package/dist/Drawer/Drawer.js
CHANGED
|
@@ -70,13 +70,15 @@ import { layerTextReset } from "../Layer/layerTextReset.stylex.js";
|
|
|
70
70
|
import { layerStructureReset } from "../Layer/layerStructureReset.stylex.js";
|
|
71
71
|
import { LayerContentBoundary } from "../Layer/layerScopedContext.js";
|
|
72
72
|
import { useModalOutlet } from "../Layer/modalOutlet.js";
|
|
73
|
+
import { useBackdropPress } from "../Layer/useBackdropPress.js";
|
|
73
74
|
import { layerClickBoundary } from "../Layer/layerClickBoundary.js";
|
|
74
75
|
import { ModalAnnounceProvider } from "../hooks/ModalAnnounceProvider.js";
|
|
75
76
|
import { composeEventHandlers, mergeProps, themeProps } from "../utils/index.js";
|
|
77
|
+
import { chainEventHandlers } from "../utils/chainEventHandlers.js";
|
|
76
78
|
import { container, overlayPaddingReset } from "../Layout/index.js";
|
|
77
79
|
import { containerPaddingBlockEndVarStyles, containerPaddingBlockStartVarStyles, containerPaddingInlineVarStyles, paddingStyles, spacingStepToToken } from "../Layout/padding.stylex.js";
|
|
78
80
|
import { useDrawerDialogPresence } from "./useDrawerDialogPresence.js";
|
|
79
|
-
|
|
81
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
80
82
|
// =============================================================================
|
|
81
83
|
// Styles
|
|
82
84
|
// =============================================================================
|
|
@@ -84,7 +86,6 @@ import { useDrawerDialogPresence } from "./useDrawerDialogPresence.js";
|
|
|
84
86
|
// Below this viewport width the drawer preserves a fixed reveal of the page
|
|
85
87
|
// behind instead of growing proportionally with the viewport. 640px is the
|
|
86
88
|
// repo's mobile breakpoint.
|
|
87
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
88
89
|
const MOBILE_BREAKPOINT = 640;
|
|
89
90
|
|
|
90
91
|
// Material's established mobile drawer pattern leaves a 56dp reveal. Using
|
|
@@ -155,7 +156,6 @@ const styles = {
|
|
|
155
156
|
},
|
|
156
157
|
scrim: {
|
|
157
158
|
kGyWv1: "xnixb3f",
|
|
158
|
-
kba3nw: "x1abwkk1",
|
|
159
159
|
k5sjJv: "xph5o2a",
|
|
160
160
|
kND0Po: "x167zut7",
|
|
161
161
|
k9an0g: "xft5bk6",
|
|
@@ -347,13 +347,12 @@ export function Drawer({
|
|
|
347
347
|
}
|
|
348
348
|
}, [allowEscape, handleDismiss, shouldDismissOnCloseRequest]);
|
|
349
349
|
|
|
350
|
-
//
|
|
351
|
-
//
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}, [allowScrimClick, hasScrim, onOpenChange]);
|
|
350
|
+
// A press on the ::backdrop targets the <dialog> itself (the content area
|
|
351
|
+
// fills the panel). The press must start and end there.
|
|
352
|
+
const handleScrimPress = useCallback(() => {
|
|
353
|
+
onOpenChange(false);
|
|
354
|
+
}, [onOpenChange]);
|
|
355
|
+
const scrimPress = useBackdropPress(handleScrimPress, hasScrim && allowScrimClick);
|
|
357
356
|
const widthValue = typeof width === 'number' ? `${width}px` : width;
|
|
358
357
|
const isFullWidthOnMobile = experimental?.isFullWidthOnMobile ?? false;
|
|
359
358
|
const mobileWidth = isFullWidthOnMobile ? MOBILE_WIDTH_FULL : `min(${widthValue}, calc(100dvw - ${MOBILE_PAGE_REVEAL}px))`;
|
|
@@ -391,8 +390,13 @@ export function Drawer({
|
|
|
391
390
|
} : undefined),
|
|
392
391
|
...layerClickBoundary({
|
|
393
392
|
...safeProps,
|
|
394
|
-
onClick: composeEventHandlers(onClickProp,
|
|
393
|
+
onClick: composeEventHandlers(onClickProp, scrimPress.onClick)
|
|
395
394
|
}),
|
|
395
|
+
// The hook records where the press started first. The caller's capture
|
|
396
|
+
// handler then runs, also when a child prevented default.
|
|
397
|
+
onPointerDownCapture: chainEventHandlers(scrimPress.onPointerDownCapture, safeProps.onPointerDownCapture),
|
|
398
|
+
onPointerUpCapture: chainEventHandlers(scrimPress.onPointerUpCapture, safeProps.onPointerUpCapture),
|
|
399
|
+
onPointerCancelCapture: chainEventHandlers(scrimPress.onPointerCancelCapture, safeProps.onPointerCancelCapture),
|
|
396
400
|
onKeyDown: onKeyDownProp,
|
|
397
401
|
onCancel: handleCancel,
|
|
398
402
|
children: /*#__PURE__*/_jsx(ModalAnnounceProvider, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDrawerDialogPresence.d.ts","sourceRoot":"","sources":["../../src/Drawer/useDrawerDialogPresence.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useDrawerDialogPresence.d.ts","sourceRoot":"","sources":["../../src/Drawer/useDrawerDialogPresence.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAef,KAAK,8BAA8B,GAAG;IACpC,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAClD,CAAC;AA6DF;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,MAAM,EACN,OAAO,EACP,aAAa,GACd,EAAE,8BAA8B,GAAG,IAAI,CAoEvC"}
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import { useEffect, useRef } from 'react';
|
|
27
27
|
import { flushSync } from 'react-dom';
|
|
28
|
+
import { notifyTopLayerEntry } from "../Layer/modalOutlet.js";
|
|
29
|
+
import { runPopoverOperation } from "../Layer/popoverOperations.js";
|
|
28
30
|
|
|
29
31
|
/** Slack past the computed transition before the backstop gives up waiting. */
|
|
30
32
|
const EXIT_BACKSTOP_BUFFER_MS = 50;
|
|
@@ -50,7 +52,13 @@ function showDrawerHost(dialog, isModal) {
|
|
|
50
52
|
if (isModal) {
|
|
51
53
|
dialog.showModal();
|
|
52
54
|
} else if (typeof dialog.showPopover === 'function') {
|
|
53
|
-
dialog.
|
|
55
|
+
// The dialog's show focuses its first control. A tooltip on that control
|
|
56
|
+
// then asks to show. The browser refuses a show inside another show.
|
|
57
|
+
// Counting this show makes the tooltip wait until it ends.
|
|
58
|
+
runPopoverOperation(dialog.ownerDocument, () => dialog.showPopover());
|
|
59
|
+
// The drawer is now the newest top-layer entry: global hosts shown before
|
|
60
|
+
// it (the toast viewport) re-enter above it, as they do above a modal.
|
|
61
|
+
notifyTopLayerEntry();
|
|
54
62
|
} else {
|
|
55
63
|
// Reduced fallback for browsers below the Popover API support floor.
|
|
56
64
|
dialog.show();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAS,KAAK,WAAW,EAAC,MAAM,WAAW,CAAC;AAKnD,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AA+B9D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAS1C,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAStE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA2L5C;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,qBAAqB,EACnB,MAAM,GACN,SAAS,GACT,YAAY,GACZ,SAAS,GACT,aAAa,GACb,YAAY,GACZ,kBAAkB,GAClB,MAAM,GACN,QAAQ,GACR,KAAK,CAC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AC;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,qBAAsB,SAAQ,qBAAqB;IAC3D;;;;;OAKG;IACH,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,yBAA0B,SAAQ,qBAAqB;IAC/D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAC3B,qBAAqB,GAAG,yBAAyB,CAAC;AAqvCpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBA4CpD;yBA5Ce,YAAY"}
|
|
@@ -279,6 +279,15 @@ function holdInvokerThroughPress(control, popoverId) {
|
|
|
279
279
|
doc.addEventListener('pointerup', onPressEnd, true);
|
|
280
280
|
doc.addEventListener('pointercancel', onPressEnd, true);
|
|
281
281
|
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The name of a menu opened from a custom trigger: the caller's `aria-label`
|
|
285
|
+
* when it is a non-empty string, else the trigger's own accessible name. The
|
|
286
|
+
* popover and the bottom sheet both name the menu through this.
|
|
287
|
+
*/
|
|
288
|
+
function resolveCustomTriggerMenuName(callerLabel, triggerName) {
|
|
289
|
+
return typeof callerLabel === 'string' && callerLabel.trim() !== '' ? callerLabel : triggerName;
|
|
290
|
+
}
|
|
282
291
|
function DropdownMenuBottomSheet({
|
|
283
292
|
button: buttonFromProps,
|
|
284
293
|
renderTrigger,
|
|
@@ -340,10 +349,18 @@ function DropdownMenuBottomSheet({
|
|
|
340
349
|
useEffect(() => {
|
|
341
350
|
void preloadMenuBottomSheetActionList();
|
|
342
351
|
}, []);
|
|
352
|
+
// The control's name is only readable from the DOM once it is rendered.
|
|
353
|
+
const [triggerName, setTriggerName] = useState(undefined);
|
|
354
|
+
useIsomorphicLayoutEffect(() => {
|
|
355
|
+
if (renderTrigger != null && isOpen) {
|
|
356
|
+
setTriggerName(readAccessibleName(buttonRef.current));
|
|
357
|
+
}
|
|
358
|
+
}, [renderTrigger, isOpen]);
|
|
359
|
+
const rootTitle = (renderTrigger != null ? resolveCustomTriggerMenuName(rest['aria-label'], triggerName) : undefined) ?? button.label;
|
|
343
360
|
const currentSubmenu = submenuPath.at(-1);
|
|
344
361
|
const currentItems = currentSubmenu?.items ?? items;
|
|
345
|
-
const currentTitle = currentSubmenu?.label ??
|
|
346
|
-
const sheetLabel = typeof currentTitle === 'string' ? currentTitle :
|
|
362
|
+
const currentTitle = currentSubmenu?.label ?? rootTitle;
|
|
363
|
+
const sheetLabel = typeof currentTitle === 'string' ? currentTitle : rootTitle;
|
|
347
364
|
const setOpen = useCallback(nextIsOpen => {
|
|
348
365
|
if (!nextIsOpen) {
|
|
349
366
|
setSubmenuPath([]);
|
|
@@ -734,8 +751,7 @@ function DropdownMenuPopover({
|
|
|
734
751
|
// The design system's button names the menu by its label. A custom trigger
|
|
735
752
|
// names it by reference (or the caller's `aria-label` does), so that name
|
|
736
753
|
// is read off the control as the menu opens.
|
|
737
|
-
const
|
|
738
|
-
const menuLabel = renderTrigger != null ? typeof callerMenuLabel === 'string' && callerMenuLabel.trim() !== '' ? callerMenuLabel : triggerName : typeof button.label === 'string' ? button.label : undefined;
|
|
754
|
+
const menuLabel = renderTrigger != null ? resolveCustomTriggerMenuName(rest['aria-label'], triggerName) : typeof button.label === 'string' ? button.label : undefined;
|
|
739
755
|
const popover = usePopover({
|
|
740
756
|
onHide: handleLayerHide,
|
|
741
757
|
onShow: handleLayerShow,
|
package/dist/Field/Field.js
CHANGED
|
@@ -22,11 +22,11 @@ import { FieldStatus } from "../FieldStatus/FieldStatus.js";
|
|
|
22
22
|
import { useFieldStatusAnnouncement } from "../FieldStatus/useFieldStatusAnnouncement.js";
|
|
23
23
|
import "../theme/tokens.stylex.js";
|
|
24
24
|
import { spacingVars, borderVars, sizeVars } from "../theme/tokens.stylex.js";
|
|
25
|
-
import { mergeProps } from "../utils/
|
|
25
|
+
import { mergeProps } from "../utils/mergeProps.js";
|
|
26
26
|
import { useDevWarning } from "../hooks/useDevWarning.js";
|
|
27
27
|
import { FormLayoutContext } from "../FormLayout/FormLayoutContext.js";
|
|
28
28
|
import { Text } from "../Text/Text.js";
|
|
29
|
-
import { VisuallyHidden } from "../VisuallyHidden/
|
|
29
|
+
import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
|
|
30
30
|
import { themeProps } from "../utils/themeProps.js";
|
|
31
31
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
32
32
|
const styles = {
|
|
@@ -72,6 +72,14 @@ export interface PanelSearchInputProps extends Omit<BaseProps<HTMLInputElement>,
|
|
|
72
72
|
* the field to the same height as its rows.
|
|
73
73
|
*/
|
|
74
74
|
fieldXstyle?: StyleXStyles;
|
|
75
|
+
/**
|
|
76
|
+
* Draw the field as the shared input box — the input border, accent while
|
|
77
|
+
* focused, surface and radius — instead of the borderless panel row. A
|
|
78
|
+
* touch sheet is a full-width surface, not a bordered panel, so its field
|
|
79
|
+
* reads as a form input.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
hasInputBox?: boolean;
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* Search row for the top of a dropdown panel: magnifier, borderless input, and
|
|
@@ -82,7 +90,7 @@ export interface PanelSearchInputProps extends Omit<BaseProps<HTMLInputElement>,
|
|
|
82
90
|
* option list's inline padding); every other prop (`role`, `aria-*`, `id`, …)
|
|
83
91
|
* passes through to the `<input>`, so the caller owns the combobox wiring.
|
|
84
92
|
*/
|
|
85
|
-
export declare function PanelSearchInput({ ref, label, clearLabel, placeholder, value, onValueChange, onKeyDown, onFocus, onBlur, onContainerKeyDown, fieldXstyle, xstyle, className, style, ...props }: PanelSearchInputProps): import("react").JSX.Element;
|
|
93
|
+
export declare function PanelSearchInput({ ref, label, clearLabel, placeholder, value, onValueChange, onKeyDown, onFocus, onBlur, onContainerKeyDown, fieldXstyle, hasInputBox, xstyle, className, style, ...props }: PanelSearchInputProps): import("react").JSX.Element;
|
|
86
94
|
export declare namespace PanelSearchInput {
|
|
87
95
|
var displayName: string;
|
|
88
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelSearchInput.d.ts","sourceRoot":"","sources":["../../src/Field/PanelSearchInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAwB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAenD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PanelSearchInput.d.ts","sourceRoot":"","sources":["../../src/Field/PanelSearchInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAwB,KAAK,GA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ACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,qBAAqB,+BAoFvB;yBArGe,gBAAgB"}
|
|
@@ -48,6 +48,7 @@ import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
|
48
48
|
import "../theme/tokens.stylex.js";
|
|
49
49
|
import { colorVars, durationVars, easeVars, radiusVars, spacingVars, typeScaleVars, typographyVars } from "../theme/tokens.stylex.js";
|
|
50
50
|
import { textEntryTraitAttributes } from "./textEntryTraits.js";
|
|
51
|
+
import { inputWrapperStyles } from "./inputStyles.stylex.js";
|
|
51
52
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
52
53
|
const styles = {
|
|
53
54
|
wrapper: {
|
|
@@ -101,6 +102,7 @@ export function PanelSearchInput({
|
|
|
101
102
|
onBlur,
|
|
102
103
|
onContainerKeyDown,
|
|
103
104
|
fieldXstyle,
|
|
105
|
+
hasInputBox = false,
|
|
104
106
|
xstyle,
|
|
105
107
|
className,
|
|
106
108
|
style,
|
|
@@ -146,7 +148,7 @@ export function PanelSearchInput({
|
|
|
146
148
|
...mergeProps(stylex.props(styles.wrapper, xstyle), className, style),
|
|
147
149
|
children: /*#__PURE__*/_jsxs("div", {
|
|
148
150
|
"data-keyboard-focus": isKeyboardFocus ? 'true' : undefined,
|
|
149
|
-
...stylex.props(styles.field, isKeyboardFocus && styles.fieldKeyboardFocus, fieldXstyle),
|
|
151
|
+
...stylex.props(styles.field, isKeyboardFocus && styles.fieldKeyboardFocus, hasInputBox && inputWrapperStyles.base, fieldXstyle),
|
|
150
152
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
151
153
|
icon: "search",
|
|
152
154
|
size: "sm",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoverCard.d.ts","sourceRoot":"","sources":["../../src/HoverCard/HoverCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"HoverCard.d.ts","sourceRo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AEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAiBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,OAAO,EACP,SAAmB,EACnB,SAAoB,EACpB,KAAW,EACX,SAAe,EACf,YAAqB,EACrB,YAAqB,EACrB,SAAgB,EAChB,KAAK,EACL,YAAY,EACZ,kBAA2B,EAC3B,MAAM,EACN,aAAa,EACb,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,cAAc,GAAG,YAAY,CA2M/B;yBA7Ne,SAAS"}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* - /apps/storybook/stories/HoverCard.stories.tsx
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/HoverCard/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
|
-
import { useCallback, useRef } from 'react';
|
|
18
|
+
import { useCallback, useRef, useState } from 'react';
|
|
19
|
+
import { observeMutations } from "../utils/sharedMutationObserver.js";
|
|
19
20
|
import { useIsomorphicLayoutEffect } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
20
21
|
import * as stylex from '@stylexjs/stylex';
|
|
21
22
|
import { useHoverCard } from "./useHoverCard.js";
|
|
@@ -138,6 +139,30 @@ export function HoverCard({
|
|
|
138
139
|
onHide: handleHide
|
|
139
140
|
});
|
|
140
141
|
|
|
142
|
+
// The wrapper's first element is the trigger, and it can be replaced after
|
|
143
|
+
// mount: by new children, or by a child component that swaps its own root
|
|
144
|
+
// without a render here. Syncs with the DOM: on a replacement the wiring
|
|
145
|
+
// below re-runs, so the old element is released before the new one is wired.
|
|
146
|
+
const [triggerReplacements, setTriggerReplacements] = useState(0);
|
|
147
|
+
const observedTriggerRef = useRef(null);
|
|
148
|
+
useIsomorphicLayoutEffect(() => {
|
|
149
|
+
const wrapper = wrapperRef.current;
|
|
150
|
+
if (textOnly || wrapper == null) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
observedTriggerRef.current = wrapper.firstElementChild;
|
|
154
|
+
return observeMutations(wrapper, {
|
|
155
|
+
childList: true
|
|
156
|
+
}, () => {
|
|
157
|
+
const trigger = wrapper.firstElementChild;
|
|
158
|
+
if (trigger === observedTriggerRef.current) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
observedTriggerRef.current = trigger;
|
|
162
|
+
setTriggerReplacements(count => count + 1);
|
|
163
|
+
});
|
|
164
|
+
}, [textOnly]);
|
|
165
|
+
|
|
141
166
|
// For element children with display:contents, attach ref to first child
|
|
142
167
|
useIsomorphicLayoutEffect(() => {
|
|
143
168
|
if (textOnly) {
|
|
@@ -224,7 +249,7 @@ export function HoverCard({
|
|
|
224
249
|
firstChild.removeAttribute('aria-describedby');
|
|
225
250
|
}
|
|
226
251
|
};
|
|
227
|
-
}, [textOnly, label, hoverCard.ref, hoverCard.id, hoverCard.isOpen, hoverCard.describedBy]);
|
|
252
|
+
}, [textOnly, label, hoverCard.ref, hoverCard.id, hoverCard.isOpen, hoverCard.describedBy, triggerReplacements]);
|
|
228
253
|
|
|
229
254
|
// While closed, useLayer leaves only an inert <template> marker at this JSX
|
|
230
255
|
// position. When the card needs to open, it uses that marker to keep the
|
package/dist/Icon/Icon.d.ts
CHANGED
|
@@ -105,7 +105,11 @@ export type IconType = ComponentType<SVGProps<SVGSVGElement>>;
|
|
|
105
105
|
* Extends SVGProps to allow passing additional SVG attributes (used when icon is a component).
|
|
106
106
|
*/
|
|
107
107
|
export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref' | 'color'> {
|
|
108
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Ref to the rendered SVG element when `icon` is an icon component. A
|
|
110
|
+
* semantic or namespaced name renders inside an internal wrapper, and the
|
|
111
|
+
* ref is not attached.
|
|
112
|
+
*/
|
|
109
113
|
ref?: React.Ref<SVGSVGElement>;
|
|
110
114
|
/**
|
|
111
115
|
* Icon to render. Can be:
|
package/dist/Icon/Icon.d.ts.map
CHAN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,OAAO,EACP,KAAK,EACL,GAAG,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,qBAoDX;yBA/De,IAAI;;;AA2IpB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,EAChC,KAAK,CAAC,EAAE;IAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAC,GAC3C,KAAK,CAAC,SAAS,CAYjB"}
|
package/dist/Icon/Icon.js
CHANGED
|
@@ -193,7 +193,9 @@ const colorStyles = {
|
|
|
193
193
|
*
|
|
194
194
|
* - Non-empty `label` → meaningful image: `role="img"` + `aria-label`, and no
|
|
195
195
|
* `aria-hidden` (an `aria-hidden` element is removed from the accessibility
|
|
196
|
-
* tree, so its accessible name would be ignored).
|
|
196
|
+
* tree, so its accessible name would be ignored). Icon passes
|
|
197
|
+
* `aria-hidden: undefined`. Many icon components, such as Heroicons, write
|
|
198
|
+
* `aria-hidden="true"` unless a prop replaces it.
|
|
197
199
|
* - Omitted or empty `label` → decorative default: `aria-hidden="true"`.
|
|
198
200
|
*
|
|
199
201
|
* The result is spread BEFORE `{...props}` in both render modes so an explicit
|
|
@@ -202,7 +204,8 @@ const colorStyles = {
|
|
|
202
204
|
function getIconA11yProps(label) {
|
|
203
205
|
return label != null && label !== '' ? {
|
|
204
206
|
role: 'img',
|
|
205
|
-
'aria-label': label
|
|
207
|
+
'aria-label': label,
|
|
208
|
+
'aria-hidden': undefined
|
|
206
209
|
} : {
|
|
207
210
|
'aria-hidden': 'true'
|
|
208
211
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file InfoTip.tsx
|
|
3
|
+
* @input Uses React, StyleX, Tooltip, Icon, useComponentTranslator, the shared
|
|
4
|
+
* touch hit area, color/spacing/radius/duration/ease tokens
|
|
5
|
+
* @output Exports InfoTip component, InfoTipProps, InfoTipSize types
|
|
6
|
+
* @position Core implementation; consumed by index.ts, tested by
|
|
7
|
+
* InfoTip.test.tsx; `@astryxdesign/lab` re-exports it, deprecated
|
|
8
|
+
*
|
|
9
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
10
|
+
* - /packages/core/src/InfoTip/InfoTip.doc.mjs (props table, features)
|
|
11
|
+
* - /docs/specs/components/InfoTip/InfoTip.spec.md (contract)
|
|
12
|
+
* - /packages/core/src/InfoTip/InfoTip.test.tsx (tests for new/changed behavior)
|
|
13
|
+
* - /packages/core/src/InfoTip/index.ts (exports if types change)
|
|
14
|
+
*/
|
|
15
|
+
import { type ReactNode, type Ref } from 'react';
|
|
16
|
+
import type { BaseProps } from '../BaseProps.js';
|
|
17
|
+
import { type IconSize } from '../Icon/Icon.js';
|
|
18
|
+
/**
|
|
19
|
+
* Size of the info icon. Maps 1:1 to Icon sizes
|
|
20
|
+
* (xsm: 12px, sm: 16px, md: 20px, lg: 24px).
|
|
21
|
+
*/
|
|
22
|
+
export type InfoTipSize = IconSize;
|
|
23
|
+
export interface InfoTipProps extends Pick<BaseProps, 'xstyle' | 'className' | 'style'> {
|
|
24
|
+
/** Ref forwarded to the info button. */
|
|
25
|
+
ref?: Ref<HTMLButtonElement>;
|
|
26
|
+
/**
|
|
27
|
+
* The help the button reveals. Short, noninteractive text; for links or
|
|
28
|
+
* buttons, use HoverCard.
|
|
29
|
+
*/
|
|
30
|
+
content: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Accessible name of the button.
|
|
33
|
+
* @default A translated "More information"
|
|
34
|
+
*/
|
|
35
|
+
label?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Size of the info icon.
|
|
38
|
+
* @default 'sm'
|
|
39
|
+
*/
|
|
40
|
+
size?: InfoTipSize;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An info icon that reveals help: a small "i" button. Hover and keyboard
|
|
44
|
+
* focus preview the help. A click, tap, Enter, or Space pins it open until
|
|
45
|
+
* Escape, a second press, a press outside, or focus leaving. Use it next to
|
|
46
|
+
* labels, values, and metrics for permission notes, metric definitions, and
|
|
47
|
+
* field help.
|
|
48
|
+
*
|
|
49
|
+
* InfoTip is a press-to-pin Tooltip on a named button: Tooltip opens, pins,
|
|
50
|
+
* announces, and closes the help. The info icon resolves from
|
|
51
|
+
* the icon registry, so themes can replace it.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```
|
|
55
|
+
* <InfoTip content="Editors can change this field; viewers cannot." />
|
|
56
|
+
* <InfoTip content="30-day rolling average." label="About this metric" />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function InfoTip({ content, label, size, ref, xstyle, className, style, }: InfoTipProps): ReactNode;
|
|
60
|
+
export declare namespace InfoTip {
|
|
61
|
+
var displayName: string;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=InfoTip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoTip.d.ts","sourceRoot":"","sources":["../../src/InfoTip/InfoTip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAO,KAAK,QAAQ,EAAC,MAAM,cAAc,CAAC;AAoBjD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;AAEnC,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,SAAS,EACT,QAAQ,GAAG,WAAW,GAAG,OAAO,CACjC;IACC,wCAAwC;IACxC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC7B;;;OAGG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AA8CD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,KAAK,EACL,IAAW,EACX,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,YAAY,GAAG,SAAS,CAyC1B;yBAjDe,OAAO"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file InfoTip.tsx
|
|
7
|
+
* @input Uses React, StyleX, Tooltip, Icon, useComponentTranslator, the shared
|
|
8
|
+
* touch hit area, color/spacing/radius/duration/ease tokens
|
|
9
|
+
* @output Exports InfoTip component, InfoTipProps, InfoTipSize types
|
|
10
|
+
* @position Core implementation; consumed by index.ts, tested by
|
|
11
|
+
* InfoTip.test.tsx; `@astryxdesign/lab` re-exports it, deprecated
|
|
12
|
+
*
|
|
13
|
+
* SYNC: When modified, update these files to stay in sync:
|
|
14
|
+
* - /packages/core/src/InfoTip/InfoTip.doc.mjs (props table, features)
|
|
15
|
+
* - /docs/specs/components/InfoTip/InfoTip.spec.md (contract)
|
|
16
|
+
* - /packages/core/src/InfoTip/InfoTip.test.tsx (tests for new/changed behavior)
|
|
17
|
+
* - /packages/core/src/InfoTip/index.ts (exports if types change)
|
|
18
|
+
*/
|
|
19
|
+
import { useCallback } from 'react';
|
|
20
|
+
import * as stylex from '@stylexjs/stylex';
|
|
21
|
+
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
22
|
+
import { Icon } from "../Icon/Icon.js";
|
|
23
|
+
import { TooltipWithTriggerBehavior } from "../Tooltip/Tooltip.js";
|
|
24
|
+
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
25
|
+
import english from "../i18n/generated-english/InfoTip/InfoTip.generated.js";
|
|
26
|
+
import "../theme/tokens.stylex.js";
|
|
27
|
+
import { colorVars, durationVars, easeVars, radiusVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
28
|
+
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
29
|
+
import { mergeProps } from "../utils/mergeProps.js";
|
|
30
|
+
import { watchHitArea, writeHitInsets } from "../utils/hitArea.js";
|
|
31
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
|
+
registerEnglishFallback(english);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Size of the info icon. Maps 1:1 to Icon sizes
|
|
36
|
+
* (xsm: 12px, sm: 16px, md: 20px, lg: 24px).
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
const styles = {
|
|
40
|
+
trigger: {
|
|
41
|
+
kVAEAm: "x1n2onr6",
|
|
42
|
+
k1xSpc: "x3nfvp2",
|
|
43
|
+
kGNEyG: "x6s0dn4",
|
|
44
|
+
kjj79g: "xl56j7k",
|
|
45
|
+
kXLuUW: "xxymvpz",
|
|
46
|
+
kmVPX3: "x12nba7r",
|
|
47
|
+
kogj98: "x1ghz6dp",
|
|
48
|
+
ksu8eU: "xng3xce",
|
|
49
|
+
kWkggS: "xjbqb8w",
|
|
50
|
+
kaIpWk: "xjspbzw",
|
|
51
|
+
kkrTdU: "x1ypdohk x16khyan",
|
|
52
|
+
kMwMTN: "xv9yike x10ue8fs",
|
|
53
|
+
k1ekBW: "xt3l3uh",
|
|
54
|
+
kIyJzY: "xuedmi6",
|
|
55
|
+
kAMwcw: "xlr8y92",
|
|
56
|
+
$$css: true
|
|
57
|
+
},
|
|
58
|
+
hitArea: {
|
|
59
|
+
k5JduY: "x1s928wv",
|
|
60
|
+
kwXMNM: "x1j6awrg",
|
|
61
|
+
kv0HGH: "xzdy5ak",
|
|
62
|
+
$$css: true
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* An info icon that reveals help: a small "i" button. Hover and keyboard
|
|
68
|
+
* focus preview the help. A click, tap, Enter, or Space pins it open until
|
|
69
|
+
* Escape, a second press, a press outside, or focus leaving. Use it next to
|
|
70
|
+
* labels, values, and metrics for permission notes, metric definitions, and
|
|
71
|
+
* field help.
|
|
72
|
+
*
|
|
73
|
+
* InfoTip is a press-to-pin Tooltip on a named button: Tooltip opens, pins,
|
|
74
|
+
* announces, and closes the help. The info icon resolves from
|
|
75
|
+
* the icon registry, so themes can replace it.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```
|
|
79
|
+
* <InfoTip content="Editors can change this field; viewers cannot." />
|
|
80
|
+
* <InfoTip content="30-day rolling average." label="About this metric" />
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export function InfoTip({
|
|
84
|
+
content,
|
|
85
|
+
label,
|
|
86
|
+
size = 'sm',
|
|
87
|
+
ref,
|
|
88
|
+
xstyle,
|
|
89
|
+
className,
|
|
90
|
+
style
|
|
91
|
+
}) {
|
|
92
|
+
const t = useComponentTranslator();
|
|
93
|
+
// Under a coarse pointer the button takes taps out toward 44 px. The watch
|
|
94
|
+
// lives as long as the button is attached: the ref's cleanup stops it, and a
|
|
95
|
+
// replaced button starts its own.
|
|
96
|
+
const watchButtonHitArea = useCallback(button => {
|
|
97
|
+
if (button == null) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
return watchHitArea(button, insets => writeHitInsets(button, insets));
|
|
101
|
+
}, []);
|
|
102
|
+
const mergedRef = useMergedRefs(ref, watchButtonHitArea);
|
|
103
|
+
|
|
104
|
+
// No Escape handler of its own. Tooltip's entry in the shared dismissal
|
|
105
|
+
// stack takes Escape, so one press never closes both the help and an
|
|
106
|
+
// enclosing Dialog.
|
|
107
|
+
return /*#__PURE__*/_jsx(TooltipWithTriggerBehavior, {
|
|
108
|
+
content: content
|
|
109
|
+
// The tooltip is the button's only purpose. A click, a tap, Enter, or
|
|
110
|
+
// Space pins it open, and the press stops at the button. So an InfoTip's
|
|
111
|
+
// content is reachable on a phone and from the keyboard alike.
|
|
112
|
+
,
|
|
113
|
+
triggerBehavior: "toggle",
|
|
114
|
+
children: /*#__PURE__*/_jsx("button", {
|
|
115
|
+
ref: mergedRef,
|
|
116
|
+
type: "button",
|
|
117
|
+
"aria-label": label ?? t('@astryx.infoTip.label'),
|
|
118
|
+
...mergeProps(stylex.props(focusOutlineStyles.focusVisible, styles.trigger, styles.hitArea, xstyle), className, style),
|
|
119
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
120
|
+
icon: "info",
|
|
121
|
+
size: size
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
InfoTip.displayName = 'InfoTip';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file InfoTip component barrel export
|
|
3
|
+
* @input InfoTip.tsx
|
|
4
|
+
* @output Exports InfoTip, InfoTipProps, InfoTipSize
|
|
5
|
+
* @position Barrel; consumed by packages/core/src/index.ts and the
|
|
6
|
+
* `@astryxdesign/core/InfoTip` entry
|
|
7
|
+
*/
|
|
8
|
+
export { InfoTip } from './InfoTip.js';
|
|
9
|
+
export type { InfoTipProps, InfoTipSize } from './InfoTip.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InfoTip/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,YAAY,EAAC,YAAY,EAAE,WAAW,EAAC,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @file InfoTip component barrel export
|
|
7
|
+
* @input InfoTip.tsx
|
|
8
|
+
* @output Exports InfoTip, InfoTipProps, InfoTipSize
|
|
9
|
+
* @position Barrel; consumed by packages/core/src/index.ts and the
|
|
10
|
+
* `@astryxdesign/core/InfoTip` entry
|
|
11
|
+
*/
|
|
12
|
+
export { InfoTip } from "./InfoTip.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file layerAnimations.stylex.ts
|
|
3
|
-
* @input Uses StyleX, theme duration/easing tokens
|
|
3
|
+
* @input Uses StyleX, theme duration/easing tokens, the Reduce Motion fade
|
|
4
|
+
* constants
|
|
4
5
|
* @output Exports shared entry animation styles for layer-based components
|
|
5
6
|
* @position Shared animation primitives; consumed by DropdownMenu, Popover,
|
|
6
7
|
* HoverCard, Tooltip, Selector, and any component using useLayer
|
|
@@ -30,13 +31,11 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
30
31
|
* Keyed by LayerPlacement ('above' | 'below' | 'start' | 'end')
|
|
31
32
|
* for easy lookup: `layerAnimations[placement]`.
|
|
32
33
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* (design:reduced-motion DR2, DR3), as iOS does for its menus, popovers and
|
|
39
|
-
* tips.
|
|
34
|
+
* Under `prefers-reduced-motion: reduce` each entry drops its travel and
|
|
35
|
+
* scale. Under a finger (the primary pointer is coarse) the layer fades in,
|
|
36
|
+
* opacity only, in 200 ms on easeInOut: on a touch screen Reduce Motion
|
|
37
|
+
* replaces motion with a cross-fade rather than a jump; under any other
|
|
38
|
+
* pointer it appears at once.
|
|
40
39
|
*/
|
|
41
40
|
export declare const layerAnimations: Readonly<{
|
|
42
41
|
readonly below: Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layerAnimations.stylex.d.ts","sourceRoot":"","sources":["../../src/Layer/layerAnimations.stylex.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"layerAnimations.stylex.d.ts","sourceRoot":"","sources":["../../src/Layer/layerAnimations.stylex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AA+E3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;EAuC1B,CAAC"}
|