@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectableOptionEntries.d.ts","sourceRoot":"","sources":["../../src/Selector/selectableOptionEntries.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAGpE,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,kBAAkB,EAAE,GAC5B,qBAAqB,EAAE,CAYzB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file selectableOptionEntries.ts
|
|
5
|
+
* @input Selector options, with sections and dividers
|
|
6
|
+
* @output `getSelectableOptionEntries`: each selectable item with the option
|
|
7
|
+
* it was given as
|
|
8
|
+
* @position Internal; the one walk behind utils.ts's `getSelectableOptions`
|
|
9
|
+
* and Selector's rows
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { isOptionData, isSection, normalizeOption } from "./optionShape.js";
|
|
13
|
+
|
|
14
|
+
/** A selectable option as given, and its normalized data. */
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Every selectable option (sections flattened, dividers skipped), each with
|
|
18
|
+
* the option it was given as.
|
|
19
|
+
*/
|
|
20
|
+
export function getSelectableOptionEntries(options) {
|
|
21
|
+
const result = [];
|
|
22
|
+
for (const option of options) {
|
|
23
|
+
if (isOptionData(option)) {
|
|
24
|
+
result.push({
|
|
25
|
+
source: option,
|
|
26
|
+
item: normalizeOption(option)
|
|
27
|
+
});
|
|
28
|
+
} else if (isSection(option)) {
|
|
29
|
+
for (const opt of option.options) {
|
|
30
|
+
result.push({
|
|
31
|
+
source: opt,
|
|
32
|
+
item: normalizeOption(opt)
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
package/dist/Selector/utils.d.ts
CHANGED
|
@@ -3,23 +3,8 @@
|
|
|
3
3
|
* @output Utility functions for Selector
|
|
4
4
|
* @position Utilities; used by Selector.tsx
|
|
5
5
|
*/
|
|
6
|
-
import type { SelectorOptionType, SelectorOptionData
|
|
7
|
-
|
|
8
|
-
* Type guard: check if option is a selectable option (string or OptionData)
|
|
9
|
-
*/
|
|
10
|
-
export declare function isOptionData(option: SelectorOptionType): option is SelectorOptionData | string;
|
|
11
|
-
/**
|
|
12
|
-
* Type guard: check if option is a divider
|
|
13
|
-
*/
|
|
14
|
-
export declare function isDivider(option: SelectorOptionType): option is SelectorDivider;
|
|
15
|
-
/**
|
|
16
|
-
* Type guard: check if option is a section
|
|
17
|
-
*/
|
|
18
|
-
export declare function isSection(option: SelectorOptionType): option is SelectorSection;
|
|
19
|
-
/**
|
|
20
|
-
* Normalize string or option to consistent shape
|
|
21
|
-
*/
|
|
22
|
-
export declare function normalizeOption(option: string | SelectorOptionData): SelectorOptionData;
|
|
6
|
+
import type { SelectorOptionType, SelectorOptionData } from './types.js';
|
|
7
|
+
export { isOptionData, isDivider, isSection, normalizeOption, } from './optionShape.js';
|
|
23
8
|
/**
|
|
24
9
|
* Get all selectable options (flattening sections)
|
|
25
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/Selector/utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/Selector/utils.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAGpE,OAAO,EACL,YAAY,EACZ,SAAS,EACT,SAAS,EACT,eAAe,GAChB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,kBAAkB,EAAE,GAC5B,kBAAkB,EAAE,CAEtB"}
|
package/dist/Selector/utils.js
CHANGED
|
@@ -6,60 +6,12 @@
|
|
|
6
6
|
* @position Utilities; used by Selector.tsx
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export function isOptionData(option) {
|
|
13
|
-
if (typeof option === 'string') {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
return !('type' in option);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Type guard: check if option is a divider
|
|
21
|
-
*/
|
|
22
|
-
export function isDivider(option) {
|
|
23
|
-
return typeof option === 'object' && 'type' in option && option.type === 'divider';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Type guard: check if option is a section
|
|
28
|
-
*/
|
|
29
|
-
export function isSection(option) {
|
|
30
|
-
return typeof option === 'object' && 'type' in option && option.type === 'section';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Normalize string or option to consistent shape
|
|
35
|
-
*/
|
|
36
|
-
export function normalizeOption(option) {
|
|
37
|
-
if (typeof option === 'string') {
|
|
38
|
-
return {
|
|
39
|
-
value: option,
|
|
40
|
-
label: option
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
...option,
|
|
45
|
-
label: option.label ?? option.value
|
|
46
|
-
};
|
|
47
|
-
}
|
|
9
|
+
import { getSelectableOptionEntries } from "./selectableOptionEntries.js";
|
|
10
|
+
export { isOptionData, isDivider, isSection, normalizeOption } from "./optionShape.js";
|
|
48
11
|
|
|
49
12
|
/**
|
|
50
13
|
* Get all selectable options (flattening sections)
|
|
51
14
|
*/
|
|
52
15
|
export function getSelectableOptions(options) {
|
|
53
|
-
|
|
54
|
-
for (const option of options) {
|
|
55
|
-
if (isOptionData(option)) {
|
|
56
|
-
result.push(normalizeOption(option));
|
|
57
|
-
} else if (isSection(option)) {
|
|
58
|
-
for (const opt of option.options) {
|
|
59
|
-
result.push(normalizeOption(opt));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Skip dividers
|
|
63
|
-
}
|
|
64
|
-
return result;
|
|
16
|
+
return getSelectableOptionEntries(options).map(entry => entry.item);
|
|
65
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavItem.d.ts","sourceRoot":"","sources":["../../src/SideNav/SideNavItem.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAYf,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAIrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAgB,KAAK,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAqUhF,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE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IACN;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,UAAkB,EAClB,UAAkB,EAClB,IAAI,EACJ,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EAAE,eAAe,EAC5B,IAAW,EACX,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,MAAM,EACN,GAAG,IAAI,EACR,EAAE,gBAAgB,sCA4clB;yBA9de,WAAW"}
|
|
@@ -50,7 +50,7 @@ import { interactionOverlayStyles } from "../utils/interactionOverlay.stylex.js"
|
|
|
50
50
|
import { usePressFeedback } from "../hooks/usePressFeedback.js";
|
|
51
51
|
import { useSideNavCollapse, SideNavCollapseContext } from "./SideNavCollapseContext.js";
|
|
52
52
|
import { useSideNavRenderMode } from "./SideNavRenderContext.js";
|
|
53
|
-
import {
|
|
53
|
+
import { useCloseMobileDrawerOnActivate } from "../AppShell/useCloseMobileDrawerOnActivate.js";
|
|
54
54
|
import { themeProps } from "../utils/themeProps.js";
|
|
55
55
|
import { disabledInteractionProps } from "../utils/disabledInteraction.js";
|
|
56
56
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
@@ -319,10 +319,8 @@ export function SideNavItem({
|
|
|
319
319
|
isCollapsed
|
|
320
320
|
} = useSideNavCollapse();
|
|
321
321
|
const renderMode = useSideNavRenderMode();
|
|
322
|
-
const {
|
|
323
|
-
closeMobileNav
|
|
324
|
-
} = useAppShellMobile();
|
|
325
322
|
const isInDrawer = renderMode === 'drawer' || renderMode === 'drawer-content';
|
|
323
|
+
const closeDrawerAfter = useCloseMobileDrawerOnActivate(isInDrawer);
|
|
326
324
|
const id = useId();
|
|
327
325
|
const hasChildren = !!children;
|
|
328
326
|
const depth = use(SideNavItemDepthContext);
|
|
@@ -396,11 +394,7 @@ export function SideNavItem({
|
|
|
396
394
|
toggleItemCollapse();
|
|
397
395
|
return;
|
|
398
396
|
}
|
|
399
|
-
onClick?.(e);
|
|
400
|
-
// Close the mobile nav when a nav item is activated inside the drawer
|
|
401
|
-
if (isInDrawer) {
|
|
402
|
-
closeMobileNav();
|
|
403
|
-
}
|
|
397
|
+
closeDrawerAfter(onClick)?.(e);
|
|
404
398
|
};
|
|
405
399
|
const handleToggleClick = e => {
|
|
406
400
|
e.preventDefault();
|
|
@@ -21,7 +21,7 @@ import { PRESS_PROFILES, createPressTracker } from "../gestures/PressTracker.js"
|
|
|
21
21
|
import { lockSelection } from "../gestures/selectionLock.js";
|
|
22
22
|
import { TapGestureRecognizer } from "../gestures/TapGestureRecognizer.js";
|
|
23
23
|
import { isRtlElement } from "../hooks/isRtlElement.js";
|
|
24
|
-
import {
|
|
24
|
+
import { createMotionAnimator } from "../motion/animator.js";
|
|
25
25
|
import { projectDistance } from "../motion/projection.js";
|
|
26
26
|
import { resolveMotion } from "../motion/resolveMotion.js";
|
|
27
27
|
import { solveSpring, toSpring } from "../motion/spring.js";
|
|
@@ -995,7 +995,7 @@ export class SliderTouchController {
|
|
|
995
995
|
animatorFor(element) {
|
|
996
996
|
let animator = this.animators.get(element);
|
|
997
997
|
if (animator == null) {
|
|
998
|
-
animator =
|
|
998
|
+
animator = createMotionAnimator(element);
|
|
999
999
|
this.animators.set(element, animator);
|
|
1000
1000
|
}
|
|
1001
1001
|
return animator;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update these files to stay in sync:
|
|
8
8
|
* - /packages/core/src/Spinner/Spinner.doc.mjs
|
|
9
|
-
* - /packages/core/src/Spinner/Spinner.test.tsx
|
|
9
|
+
* - /packages/core/src/Spinner/Spinner.test.tsx and __tests__/SpinnerMotion.a11y.chromium.spec.ts (rotor timing)
|
|
10
10
|
* - /packages/core/src/Spinner/index.ts
|
|
11
11
|
* - /apps/storybook/stories/Spinner.stories.tsx
|
|
12
12
|
* - /packages/cli/assets/templates/blocks/components/Spinner/ (showcase blocks)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA6B5C,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;CAKV,CAAC;
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AA6B5C,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;CAKV,CAAC;AA8XF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,KAAK,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAW,EACX,KAAiB,EACjB,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,SAAS,EACb,EAAE,YAAY,+BAqId;yBAhJe,OAAO"}
|
package/dist/Spinner/Spinner.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/core/src/Spinner/Spinner.doc.mjs
|
|
13
|
-
* - /packages/core/src/Spinner/Spinner.test.tsx
|
|
13
|
+
* - /packages/core/src/Spinner/Spinner.test.tsx and __tests__/SpinnerMotion.a11y.chromium.spec.ts (rotor timing)
|
|
14
14
|
* - /packages/core/src/Spinner/index.ts
|
|
15
15
|
* - /apps/storybook/stories/Spinner.stories.tsx
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/Spinner/ (showcase blocks)
|
|
@@ -156,59 +156,54 @@ function registerSpinnerVars() {
|
|
|
156
156
|
registerSpinnerVars();
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* Pin every ring's
|
|
160
|
-
*
|
|
159
|
+
* Pin every ring's rotation to the document timeline's origin instead of its
|
|
160
|
+
* own start time, so spinners mounted seconds apart stay in phase.
|
|
161
161
|
*
|
|
162
|
-
* Setting `startTime` is exact where arithmetic on a clock read is not
|
|
162
|
+
* Setting `startTime` is exact where arithmetic on a clock read is not. A
|
|
163
163
|
* negative `animation-delay` computed at mount is only as good as the gap
|
|
164
|
-
* between
|
|
165
|
-
*
|
|
166
|
-
* literal rotation; the same drift risk applies to the dash offset now).
|
|
164
|
+
* between the clock read and the frame the animation starts in. At 10x CPU
|
|
165
|
+
* throttling that gap measured 116 degrees of drift.
|
|
167
166
|
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
167
|
+
* Rotors are collected and pinned in one frame. `getAnimations()` resolves
|
|
168
|
+
* style, and `startTime` dirties it again. So pinning them one at a time makes
|
|
169
|
+
* each mount re-force what the previous one invalidated: 53 style recalcs for
|
|
170
|
+
* 38 spinners, against 19 batched.
|
|
172
171
|
*/
|
|
173
|
-
const
|
|
172
|
+
const pendingRotors = new Set();
|
|
174
173
|
let flushScheduled = false;
|
|
175
|
-
function
|
|
174
|
+
function pinRotorsToTimelineOrigin() {
|
|
176
175
|
flushScheduled = false;
|
|
177
176
|
const animations = [];
|
|
178
|
-
for (const
|
|
179
|
-
|
|
180
|
-
// this ref sits on (#6253), so it needs subtree:true to be found here.
|
|
181
|
-
animations.push(...svg.getAnimations({
|
|
182
|
-
subtree: true
|
|
183
|
-
}));
|
|
177
|
+
for (const rotor of pendingRotors) {
|
|
178
|
+
animations.push(...rotor.getAnimations());
|
|
184
179
|
}
|
|
185
|
-
|
|
180
|
+
pendingRotors.clear();
|
|
186
181
|
for (const animation of animations) {
|
|
187
182
|
animation.startTime = 0;
|
|
188
183
|
}
|
|
189
184
|
}
|
|
190
185
|
|
|
191
186
|
/**
|
|
192
|
-
* Ref callback for the
|
|
187
|
+
* Ref callback for the rotor: the one place a mounted ring touches the DOM.
|
|
193
188
|
*
|
|
194
189
|
* It reads nothing back — the geometry is resolved by the cascade, not in JS.
|
|
195
190
|
*/
|
|
196
|
-
function syncRotationPhase(
|
|
197
|
-
if (
|
|
191
|
+
function syncRotationPhase(rotor) {
|
|
192
|
+
if (rotor == null) {
|
|
198
193
|
return undefined;
|
|
199
194
|
}
|
|
200
195
|
// jsdom implements no Web Animations, and this runs in every consumer's
|
|
201
196
|
// component tests.
|
|
202
|
-
if (typeof
|
|
197
|
+
if (typeof rotor.getAnimations !== 'function') {
|
|
203
198
|
return undefined;
|
|
204
199
|
}
|
|
205
|
-
|
|
200
|
+
pendingRotors.add(rotor);
|
|
206
201
|
if (!flushScheduled) {
|
|
207
202
|
flushScheduled = true;
|
|
208
|
-
requestAnimationFrame(
|
|
203
|
+
requestAnimationFrame(pinRotorsToTimelineOrigin);
|
|
209
204
|
}
|
|
210
205
|
return () => {
|
|
211
|
-
|
|
206
|
+
pendingRotors.delete(rotor);
|
|
212
207
|
};
|
|
213
208
|
}
|
|
214
209
|
|
|
@@ -217,17 +212,11 @@ function syncRotationPhase(svg) {
|
|
|
217
212
|
// =============================================================================
|
|
218
213
|
|
|
219
214
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* angle, which reads as a visible wobble on iOS Safari independent of
|
|
224
|
-
* compositing (#6253) — confirmed by a real-device test against this exact
|
|
225
|
-
* fix, since `willChange`/layer promotion alone (the earlier fix for #3617)
|
|
226
|
-
* only smooths the rotation's motion, not the per-frame stroke rasterization.
|
|
227
|
-
* A static circle with an animated `stroke-dashoffset` never rotates, so
|
|
228
|
-
* WebKit never re-rasterizes the cap at an intermediate angle at all.
|
|
215
|
+
* A `transform` animation runs on the compositor, so the ring keeps turning
|
|
216
|
+
* while a script runs. A `stroke-dashoffset` animation would repaint the arc
|
|
217
|
+
* on the main thread every frame, so it would stop while a script runs.
|
|
229
218
|
*/
|
|
230
|
-
const
|
|
219
|
+
const rotation = "xqng64z-B";
|
|
231
220
|
|
|
232
221
|
// =============================================================================
|
|
233
222
|
// Styles
|
|
@@ -412,7 +401,7 @@ export function Spinner({
|
|
|
412
401
|
// localized default. The fallback is AT-facing text, so it goes through the
|
|
413
402
|
// translation runtime like visible text does.
|
|
414
403
|
const resolvedAriaLabel = ariaLabel ?? (typeof label === 'string' ? label : undefined) ?? t('@astryx.spinner.loading');
|
|
415
|
-
const spinner = /*#__PURE__*/
|
|
404
|
+
const spinner = /*#__PURE__*/_jsxs("span", {
|
|
416
405
|
ref: hasLabel ? undefined : ref,
|
|
417
406
|
role: "status",
|
|
418
407
|
"aria-label": namedByVisibleLabel ? undefined : resolvedAriaLabel,
|
|
@@ -441,35 +430,48 @@ export function Spinner({
|
|
|
441
430
|
width: `var(${BOX_SIZE}, ${frameSize}px)`,
|
|
442
431
|
height: `var(${BOX_SIZE}, ${frameSize}px)`
|
|
443
432
|
}),
|
|
444
|
-
children: /*#__PURE__*/
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
height: frameSize,
|
|
433
|
+
children: [/*#__PURE__*/_jsx("svg", {
|
|
434
|
+
width: 0,
|
|
435
|
+
height: 0,
|
|
448
436
|
"aria-hidden": "true",
|
|
449
437
|
...{
|
|
450
|
-
className: "xlp1x4z x1lliihq x6v0vjy x7yyq19 x1rea2x4"
|
|
438
|
+
className: "xlp1x4z x1lliihq x15r89dc x6v0vjy x7yyq19 x1rea2x4"
|
|
451
439
|
},
|
|
452
|
-
children:
|
|
440
|
+
children: /*#__PURE__*/_jsx("circle", {
|
|
453
441
|
cx: "50%",
|
|
454
442
|
cy: "50%",
|
|
455
443
|
r: diameter / 2,
|
|
456
444
|
strokeWidth: border,
|
|
457
445
|
...stylex.props(styles.circle, styles.track, trackOpacityStyles[shade])
|
|
458
|
-
})
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
,
|
|
467
|
-
|
|
446
|
+
})
|
|
447
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
448
|
+
ref: syncRotationPhase,
|
|
449
|
+
"aria-hidden": "true",
|
|
450
|
+
...{
|
|
451
|
+
className: "x1lliihq x15r89dc x6v0vjy x7yyq19 x1so62im x1qcljrn xnh0sag xa4qsjk x1ka1v4i x1esw782"
|
|
452
|
+
},
|
|
453
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
454
|
+
width: frameSize,
|
|
455
|
+
height: frameSize,
|
|
468
456
|
...{
|
|
469
|
-
className: "
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
457
|
+
className: "xlp1x4z x1lliihq x15r89dc x6v0vjy x7yyq19 x1rea2x4"
|
|
458
|
+
},
|
|
459
|
+
children: /*#__PURE__*/_jsx("circle", {
|
|
460
|
+
cx: "50%",
|
|
461
|
+
cy: "50%",
|
|
462
|
+
r: diameter / 2,
|
|
463
|
+
strokeWidth: border
|
|
464
|
+
// The size's own dash, for the render with no stylesheet. The rule
|
|
465
|
+
// above composes the same lengths from the resolved diameter, so a
|
|
466
|
+
// themed ring keeps this fraction of arc rather than this length.
|
|
467
|
+
,
|
|
468
|
+
strokeDasharray: `${arcLength} ${circumference - arcLength}`,
|
|
469
|
+
...{
|
|
470
|
+
className: "xbh8q5q x1764fhq x1g0ag68 x1owpc8m xio8zfp xgw3ha0 xtve3lm x9tu13d xdv9ggb"
|
|
471
|
+
}
|
|
472
|
+
})
|
|
473
|
+
})
|
|
474
|
+
})]
|
|
473
475
|
});
|
|
474
476
|
if (!hasLabel) {
|
|
475
477
|
return spinner;
|
|
@@ -57,13 +57,6 @@ export declare function startFlip(isOn: boolean): SwitchFlip;
|
|
|
57
57
|
* landed along the writing direction (positive toward the on end).
|
|
58
58
|
*/
|
|
59
59
|
export declare function stepFlip(flip: SwitchFlip, translation: number, geometry: SwitchTouchGeometry): SwitchFlip;
|
|
60
|
-
/**
|
|
61
|
-
* Passive: how long a lift waits for the browser's own click before the
|
|
62
|
-
* switch clicks its input itself, ms. The browser sends that click with the
|
|
63
|
-
* lift's `touchend`. The surface's `touch-action` leaves no double-tap delay.
|
|
64
|
-
* So this only runs out for a lift the browser does not count as a click.
|
|
65
|
-
*/
|
|
66
|
-
export declare const BROWSER_CLICK_WAIT_MS = 300;
|
|
67
60
|
/**
|
|
68
61
|
* What a release commits: the side a drag flipped to; when nothing flipped,
|
|
69
62
|
* the other side of the value, wherever the finger lifts. A press slid off
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchTouch.d.ts","sourceRoot":"","sources":["../../src/Switch/switchTouch.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAA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IAC1C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAEnD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,UAAU,EAChB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,GAC5B,UAAU,CAkBZ;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,GAAG,IAAI,EACvB,IAAI,EAAE,OAAO,GACZ,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,MAAoC,GAClD,MAAM,CAER"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @file switchTouch.ts
|
|
5
5
|
* @input The UIKit switch constants (motion/uikit/switch.ts) and a track size
|
|
6
6
|
* @output The pure model of Switch's touch presentation: thumb geometry, the
|
|
7
|
-
* drag's target, the flip rule, the commit on release and
|
|
8
|
-
*
|
|
7
|
+
* drag's target, the flip rule, the commit on release, and when the lifted
|
|
8
|
+
* thumb may settle
|
|
9
9
|
* @position Pure half of Switch's touch presentation; driven by
|
|
10
10
|
* useSwitchTouch.ts, tested by switchTouch.test.ts without a browser
|
|
11
11
|
*
|
|
@@ -104,14 +104,6 @@ export function stepFlip(flip, translation, geometry) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/**
|
|
108
|
-
* Passive: how long a lift waits for the browser's own click before the
|
|
109
|
-
* switch clicks its input itself, ms. The browser sends that click with the
|
|
110
|
-
* lift's `touchend`. The surface's `touch-action` leaves no double-tap delay.
|
|
111
|
-
* So this only runs out for a lift the browser does not count as a click.
|
|
112
|
-
*/
|
|
113
|
-
export const BROWSER_CLICK_WAIT_MS = 300;
|
|
114
|
-
|
|
115
107
|
/**
|
|
116
108
|
* What a release commits: the side a drag flipped to; when nothing flipped,
|
|
117
109
|
* the other side of the value, wherever the finger lifts. A press slid off
|
|
@@ -152,11 +152,8 @@ export declare class SwitchTouchController {
|
|
|
152
152
|
private isTracking;
|
|
153
153
|
/** Which presentation the switch has: the touch one, or its own. */
|
|
154
154
|
private presentation;
|
|
155
|
-
/**
|
|
156
|
-
private
|
|
157
|
-
private pressListenersTimer;
|
|
158
|
-
/** Passive: a lift is waiting for the browser's own click. */
|
|
159
|
-
private browserClickTimer;
|
|
155
|
+
/** Passive: a lift is waiting for the browser's own click; this ends it. */
|
|
156
|
+
private endBrowserClickWait;
|
|
160
157
|
private reconcileTimer;
|
|
161
158
|
constructor(isOn: boolean, geometry: SwitchTouchGeometry);
|
|
162
159
|
get isAttached(): boolean;
|
|
@@ -169,12 +166,6 @@ export declare class SwitchTouchController {
|
|
|
169
166
|
* takes for its scroll yields with no toggle.
|
|
170
167
|
*/
|
|
171
168
|
private attachPassive;
|
|
172
|
-
/** Under a fine pointer: adds the switch's own listeners for a press. */
|
|
173
|
-
private listenForPress;
|
|
174
|
-
private startPressListeners;
|
|
175
|
-
/** The press's click window is over: its listeners go. */
|
|
176
|
-
private endPressListeners;
|
|
177
|
-
private stopPressListeners;
|
|
178
169
|
/** Undo everything: listeners, timers, animations and inline styles. */
|
|
179
170
|
detach(): void;
|
|
180
171
|
setInteractive(isInteractive: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSwitchTouch.d.ts","sourceRoot":"","sources":["../../src/Switch/useSwitchTouch.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useSwitchTouch.d.ts","sourceRoot":"","sources":["../../src/Switch/useSwitchTouch.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAi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