@astral/ui 4.82.0 → 4.84.0
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/_mocks/LoggerMock/LoggerMock.d.ts +16 -0
- package/_mocks/LoggerMock/LoggerMock.js +18 -0
- package/_mocks/LoggerMock/index.d.ts +1 -0
- package/_mocks/LoggerMock/index.js +1 -0
- package/components/ConfigProvider/ConfigProvider.d.ts +7 -1
- package/components/ConfigProvider/ConfigProvider.js +14 -8
- package/components/ConfirmDialog/ConfirmDialog.js +3 -1
- package/components/ConfirmDialog/constants.d.ts +4 -0
- package/components/ConfirmDialog/constants.js +5 -0
- package/components/ConfirmDialog/index.d.ts +1 -0
- package/components/ConfirmDialog/index.js +1 -0
- package/components/ConfirmDialog/public.d.ts +1 -0
- package/components/ConfirmDialog/public.js +1 -0
- package/components/ConfirmDialog/types.d.ts +1 -1
- package/components/DashboardLayout/Header/useLogic/useLogic.d.ts +1 -1
- package/components/NewPopover/NewPopover.d.ts +1 -1
- package/components/NewPopover/NewPopover.js +14 -5
- package/components/NewPopover/constants.d.ts +7 -0
- package/components/NewPopover/constants.js +11 -0
- package/components/NewPopover/styles.d.ts +4 -0
- package/components/NewPopover/styles.js +100 -4
- package/components/NewPopover/types.d.ts +13 -0
- package/components/NewPopover/useLogic/useLogic.d.ts +7 -3
- package/components/NewPopover/useLogic/useLogic.js +15 -1
- package/components/Onboarding/Onboarding.d.ts +35 -0
- package/components/Onboarding/Onboarding.js +56 -0
- package/components/Onboarding/constants.d.ts +34 -0
- package/components/Onboarding/constants.js +34 -0
- package/components/Onboarding/core/ActiveStepStore/ActiveStepStore.d.ts +50 -0
- package/components/Onboarding/core/ActiveStepStore/ActiveStepStore.js +63 -0
- package/components/Onboarding/core/ActiveStepStore/index.d.ts +1 -0
- package/components/Onboarding/core/ActiveStepStore/index.js +1 -0
- package/components/Onboarding/core/ExitController/ExitController.d.ts +48 -0
- package/components/Onboarding/core/ExitController/ExitController.js +59 -0
- package/components/Onboarding/core/ExitController/index.d.ts +1 -0
- package/components/Onboarding/core/ExitController/index.js +1 -0
- package/components/Onboarding/core/OnboardingTour/OnboardingTour.d.ts +103 -0
- package/components/Onboarding/core/OnboardingTour/OnboardingTour.js +283 -0
- package/components/Onboarding/core/OnboardingTour/index.d.ts +1 -0
- package/components/Onboarding/core/OnboardingTour/index.js +1 -0
- package/components/Onboarding/core/ProgressStorage/ProgressStorage.d.ts +24 -0
- package/components/Onboarding/core/ProgressStorage/ProgressStorage.js +62 -0
- package/components/Onboarding/core/ProgressStorage/index.d.ts +1 -0
- package/components/Onboarding/core/ProgressStorage/index.js +1 -0
- package/components/Onboarding/core/StepNavigator/StepNavigator.d.ts +28 -0
- package/components/Onboarding/core/StepNavigator/StepNavigator.js +73 -0
- package/components/Onboarding/core/StepNavigator/index.d.ts +1 -0
- package/components/Onboarding/core/StepNavigator/index.js +1 -0
- package/components/Onboarding/core/StepResolver/StepResolver.d.ts +19 -0
- package/components/Onboarding/core/StepResolver/StepResolver.js +49 -0
- package/components/Onboarding/core/StepResolver/index.d.ts +1 -0
- package/components/Onboarding/core/StepResolver/index.js +1 -0
- package/components/Onboarding/core/StepsController/StepsController.d.ts +16 -0
- package/components/Onboarding/core/StepsController/StepsController.js +35 -0
- package/components/Onboarding/core/StepsController/index.d.ts +1 -0
- package/components/Onboarding/core/StepsController/index.js +1 -0
- package/components/Onboarding/faker.d.ts +27 -0
- package/components/Onboarding/faker.js +79 -0
- package/components/Onboarding/index.d.ts +5 -0
- package/components/Onboarding/index.js +3 -0
- package/components/Onboarding/public.d.ts +5 -0
- package/components/Onboarding/public.js +3 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.d.ts +20 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.js +24 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/index.d.ts +1 -0
- package/components/Onboarding/services/LocalStorageSaveStrategy/index.js +1 -0
- package/components/Onboarding/types/config.d.ts +18 -0
- package/components/Onboarding/types/config.js +1 -0
- package/components/Onboarding/types/index.d.ts +4 -0
- package/components/Onboarding/types/index.js +4 -0
- package/components/Onboarding/types/progress.d.ts +28 -0
- package/components/Onboarding/types/progress.js +1 -0
- package/components/Onboarding/types/step.d.ts +144 -0
- package/components/Onboarding/types/step.js +1 -0
- package/components/Onboarding/types/tour.d.ts +168 -0
- package/components/Onboarding/types/tour.js +1 -0
- package/components/Onboarding/ui/ConfirmExit/ConfirmExit.d.ts +10 -0
- package/components/Onboarding/ui/ConfirmExit/ConfirmExit.js +6 -0
- package/components/Onboarding/ui/ConfirmExit/index.d.ts +2 -0
- package/components/Onboarding/ui/ConfirmExit/index.js +1 -0
- package/components/Onboarding/ui/ConfirmExit/styles.d.ts +30 -0
- package/components/Onboarding/ui/ConfirmExit/styles.js +11 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.d.ts +12 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.js +15 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.d.ts +22 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.js +20 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.d.ts +2 -0
- package/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.js +1 -0
- package/components/Onboarding/ui/OnboardingContainer/index.d.ts +1 -0
- package/components/Onboarding/ui/OnboardingContainer/index.js +1 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/index.js +1 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.d.ts +10 -0
- package/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.js +14 -0
- package/components/Onboarding/ui/Overlay/Overlay.d.ts +29 -0
- package/components/Onboarding/ui/Overlay/Overlay.js +24 -0
- package/components/Onboarding/ui/Overlay/constants.d.ts +7 -0
- package/components/Onboarding/ui/Overlay/constants.js +8 -0
- package/components/Onboarding/ui/Overlay/index.d.ts +2 -0
- package/components/Onboarding/ui/Overlay/index.js +1 -0
- package/components/Onboarding/ui/Overlay/styles.d.ts +22 -0
- package/components/Onboarding/ui/Overlay/styles.js +57 -0
- package/components/Onboarding/ui/Overlay/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/Overlay/useLogic/index.js +1 -0
- package/components/Onboarding/ui/Overlay/useLogic/useLogic.d.ts +13 -0
- package/components/Onboarding/ui/Overlay/useLogic/useLogic.js +10 -0
- package/components/Onboarding/ui/StepStrategy/StepStrategy.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/StepStrategy.js +17 -0
- package/components/Onboarding/ui/StepStrategy/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.js +19 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +25 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.js +56 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.d.ts +12 -0
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.js +37 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +11 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +13 -0
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.js +9 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.d.ts +6 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.js +15 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.d.ts +4 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.js +5 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.d.ts +9 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.js +34 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.d.ts +9 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.js +18 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.d.ts +4 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.js +4 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.d.ts +2 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.d.ts +21 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.js +28 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.d.ts +16 -0
- package/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.js +22 -0
- package/components/Onboarding/ui/StepStrategy/steps/types.d.ts +16 -0
- package/components/Onboarding/ui/StepStrategy/steps/types.js +1 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/index.d.ts +1 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/index.js +1 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/useLogic.d.ts +47 -0
- package/components/Onboarding/ui/StepStrategy/useLogic/useLogic.js +51 -0
- package/components/Onboarding/ui/hooks/useActiveStep/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useActiveStep/index.js +1 -0
- package/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.d.ts +6 -0
- package/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.js +7 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/index.js +1 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.d.ts +15 -0
- package/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.js +19 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/index.js +1 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.d.ts +6 -0
- package/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.js +33 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/index.js +1 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.d.ts +11 -0
- package/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.js +62 -0
- package/components/Onboarding/ui/hooks/useStepTransition/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useStepTransition/index.js +1 -0
- package/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.d.ts +30 -0
- package/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.js +46 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/index.js +1 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.d.ts +37 -0
- package/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.js +56 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/index.js +1 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.d.ts +5 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +43 -0
- package/components/Onboarding/ui/hooks/useViewportSize/index.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useViewportSize/index.js +1 -0
- package/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.d.ts +5 -0
- package/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.js +14 -0
- package/components/Onboarding/ui/styles.d.ts +5 -0
- package/components/Onboarding/ui/styles.js +15 -0
- package/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.d.ts +12 -0
- package/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.js +6 -0
- package/components/Onboarding/utils/createVirtualAnchor/index.d.ts +1 -0
- package/components/Onboarding/utils/createVirtualAnchor/index.js +1 -0
- package/components/Onboarding/utils/geometry/index.d.ts +4 -0
- package/components/Onboarding/utils/geometry/index.js +4 -0
- package/components/Onboarding/utils/geometry/overlayPath/index.d.ts +1 -0
- package/components/Onboarding/utils/geometry/overlayPath/index.js +1 -0
- package/components/Onboarding/utils/geometry/overlayPath/overlayPath.d.ts +6 -0
- package/components/Onboarding/utils/geometry/overlayPath/overlayPath.js +29 -0
- package/components/Onboarding/utils/geometry/parseOffset/index.d.ts +1 -0
- package/components/Onboarding/utils/geometry/parseOffset/index.js +1 -0
- package/components/Onboarding/utils/geometry/parseOffset/parseOffset.d.ts +4 -0
- package/components/Onboarding/utils/geometry/parseOffset/parseOffset.js +5 -0
- package/components/Onboarding/utils/geometry/rect/index.d.ts +2 -0
- package/components/Onboarding/utils/geometry/rect/index.js +1 -0
- package/components/Onboarding/utils/geometry/rect/rect.d.ts +34 -0
- package/components/Onboarding/utils/geometry/rect/rect.js +60 -0
- package/components/Onboarding/utils/geometry/viewport/index.d.ts +2 -0
- package/components/Onboarding/utils/geometry/viewport/index.js +1 -0
- package/components/Onboarding/utils/geometry/viewport/viewport.d.ts +14 -0
- package/components/Onboarding/utils/geometry/viewport/viewport.js +10 -0
- package/components/Onboarding/utils/getScrollParents/getScrollParents.d.ts +7 -0
- package/components/Onboarding/utils/getScrollParents/getScrollParents.js +24 -0
- package/components/Onboarding/utils/getScrollParents/index.d.ts +1 -0
- package/components/Onboarding/utils/getScrollParents/index.js +1 -0
- package/components/Onboarding/utils/getTargetElement/getTargetElement.d.ts +4 -0
- package/components/Onboarding/utils/getTargetElement/getTargetElement.js +9 -0
- package/components/Onboarding/utils/getTargetElement/index.d.ts +1 -0
- package/components/Onboarding/utils/getTargetElement/index.js +1 -0
- package/components/Onboarding/utils/observeRemoval/index.d.ts +1 -0
- package/components/Onboarding/utils/observeRemoval/index.js +1 -0
- package/components/Onboarding/utils/observeRemoval/observeRemoval.d.ts +4 -0
- package/components/Onboarding/utils/observeRemoval/observeRemoval.js +13 -0
- package/components/Onboarding/utils/scrollIntoView/index.d.ts +1 -0
- package/components/Onboarding/utils/scrollIntoView/index.js +1 -0
- package/components/Onboarding/utils/scrollIntoView/scrollIntoView.d.ts +13 -0
- package/components/Onboarding/utils/scrollIntoView/scrollIntoView.js +85 -0
- package/components/Onboarding/utils/waitForElement/index.d.ts +2 -0
- package/components/Onboarding/utils/waitForElement/index.js +1 -0
- package/components/Onboarding/utils/waitForElement/waitForElement.d.ts +21 -0
- package/components/Onboarding/utils/waitForElement/waitForElement.js +45 -0
- package/components/Onboarding/validation/index.d.ts +1 -0
- package/components/Onboarding/validation/index.js +1 -0
- package/components/Onboarding/validation/validateTourConfig/index.d.ts +1 -0
- package/components/Onboarding/validation/validateTourConfig/index.js +1 -0
- package/components/Onboarding/validation/validateTourConfig/validateTourConfig.d.ts +12 -0
- package/components/Onboarding/validation/validateTourConfig/validateTourConfig.js +52 -0
- package/node/_mocks/LoggerMock/LoggerMock.d.ts +16 -0
- package/node/_mocks/LoggerMock/LoggerMock.js +23 -0
- package/node/_mocks/LoggerMock/index.d.ts +1 -0
- package/node/_mocks/LoggerMock/index.js +17 -0
- package/node/components/ConfigProvider/ConfigProvider.d.ts +7 -1
- package/node/components/ConfigProvider/ConfigProvider.js +13 -7
- package/node/components/ConfirmDialog/ConfirmDialog.js +3 -1
- package/node/components/ConfirmDialog/constants.d.ts +4 -0
- package/node/components/ConfirmDialog/constants.js +8 -0
- package/node/components/ConfirmDialog/index.d.ts +1 -0
- package/node/components/ConfirmDialog/index.js +3 -0
- package/node/components/ConfirmDialog/public.d.ts +1 -0
- package/node/components/ConfirmDialog/public.js +3 -0
- package/node/components/ConfirmDialog/types.d.ts +1 -1
- package/node/components/DashboardLayout/Header/useLogic/useLogic.d.ts +1 -1
- package/node/components/NewPopover/NewPopover.d.ts +1 -1
- package/node/components/NewPopover/NewPopover.js +12 -3
- package/node/components/NewPopover/constants.d.ts +7 -0
- package/node/components/NewPopover/constants.js +12 -1
- package/node/components/NewPopover/styles.d.ts +4 -0
- package/node/components/NewPopover/styles.js +101 -5
- package/node/components/NewPopover/types.d.ts +13 -0
- package/node/components/NewPopover/useLogic/useLogic.d.ts +7 -3
- package/node/components/NewPopover/useLogic/useLogic.js +15 -1
- package/node/components/Onboarding/Onboarding.d.ts +35 -0
- package/node/components/Onboarding/Onboarding.js +61 -0
- package/node/components/Onboarding/constants.d.ts +34 -0
- package/node/components/Onboarding/constants.js +37 -0
- package/node/components/Onboarding/core/ActiveStepStore/ActiveStepStore.d.ts +50 -0
- package/node/components/Onboarding/core/ActiveStepStore/ActiveStepStore.js +67 -0
- package/node/components/Onboarding/core/ActiveStepStore/index.d.ts +1 -0
- package/node/components/Onboarding/core/ActiveStepStore/index.js +17 -0
- package/node/components/Onboarding/core/ExitController/ExitController.d.ts +48 -0
- package/node/components/Onboarding/core/ExitController/ExitController.js +63 -0
- package/node/components/Onboarding/core/ExitController/index.d.ts +1 -0
- package/node/components/Onboarding/core/ExitController/index.js +17 -0
- package/node/components/Onboarding/core/OnboardingTour/OnboardingTour.d.ts +103 -0
- package/node/components/Onboarding/core/OnboardingTour/OnboardingTour.js +287 -0
- package/node/components/Onboarding/core/OnboardingTour/index.d.ts +1 -0
- package/node/components/Onboarding/core/OnboardingTour/index.js +5 -0
- package/node/components/Onboarding/core/ProgressStorage/ProgressStorage.d.ts +24 -0
- package/node/components/Onboarding/core/ProgressStorage/ProgressStorage.js +66 -0
- package/node/components/Onboarding/core/ProgressStorage/index.d.ts +1 -0
- package/node/components/Onboarding/core/ProgressStorage/index.js +17 -0
- package/node/components/Onboarding/core/StepNavigator/StepNavigator.d.ts +28 -0
- package/node/components/Onboarding/core/StepNavigator/StepNavigator.js +77 -0
- package/node/components/Onboarding/core/StepNavigator/index.d.ts +1 -0
- package/node/components/Onboarding/core/StepNavigator/index.js +17 -0
- package/node/components/Onboarding/core/StepResolver/StepResolver.d.ts +19 -0
- package/node/components/Onboarding/core/StepResolver/StepResolver.js +53 -0
- package/node/components/Onboarding/core/StepResolver/index.d.ts +1 -0
- package/node/components/Onboarding/core/StepResolver/index.js +17 -0
- package/node/components/Onboarding/core/StepsController/StepsController.d.ts +16 -0
- package/node/components/Onboarding/core/StepsController/StepsController.js +39 -0
- package/node/components/Onboarding/core/StepsController/index.d.ts +1 -0
- package/node/components/Onboarding/core/StepsController/index.js +17 -0
- package/node/components/Onboarding/faker.d.ts +27 -0
- package/node/components/Onboarding/faker.js +88 -0
- package/node/components/Onboarding/index.d.ts +5 -0
- package/node/components/Onboarding/index.js +9 -0
- package/node/components/Onboarding/public.d.ts +5 -0
- package/node/components/Onboarding/public.js +9 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.d.ts +20 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/LocalStorageSaveStrategy.js +29 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/index.d.ts +1 -0
- package/node/components/Onboarding/services/LocalStorageSaveStrategy/index.js +17 -0
- package/node/components/Onboarding/types/config.d.ts +18 -0
- package/node/components/Onboarding/types/config.js +2 -0
- package/node/components/Onboarding/types/index.d.ts +4 -0
- package/node/components/Onboarding/types/index.js +20 -0
- package/node/components/Onboarding/types/progress.d.ts +28 -0
- package/node/components/Onboarding/types/progress.js +2 -0
- package/node/components/Onboarding/types/step.d.ts +144 -0
- package/node/components/Onboarding/types/step.js +2 -0
- package/node/components/Onboarding/types/tour.d.ts +168 -0
- package/node/components/Onboarding/types/tour.js +2 -0
- package/node/components/Onboarding/ui/ConfirmExit/ConfirmExit.d.ts +10 -0
- package/node/components/Onboarding/ui/ConfirmExit/ConfirmExit.js +10 -0
- package/node/components/Onboarding/ui/ConfirmExit/index.d.ts +2 -0
- package/node/components/Onboarding/ui/ConfirmExit/index.js +5 -0
- package/node/components/Onboarding/ui/ConfirmExit/styles.d.ts +30 -0
- package/node/components/Onboarding/ui/ConfirmExit/styles.js +14 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.d.ts +12 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingContainer.js +19 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.d.ts +22 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/OnboardingErrorBoundary.js +24 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.d.ts +2 -0
- package/node/components/Onboarding/ui/OnboardingContainer/OnboardingErrorBoundary/index.js +5 -0
- package/node/components/Onboarding/ui/OnboardingContainer/index.d.ts +1 -0
- package/node/components/Onboarding/ui/OnboardingContainer/index.js +5 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.d.ts +10 -0
- package/node/components/Onboarding/ui/OnboardingContainer/useLogic/useLogic.js +18 -0
- package/node/components/Onboarding/ui/Overlay/Overlay.d.ts +29 -0
- package/node/components/Onboarding/ui/Overlay/Overlay.js +28 -0
- package/node/components/Onboarding/ui/Overlay/constants.d.ts +7 -0
- package/node/components/Onboarding/ui/Overlay/constants.js +11 -0
- package/node/components/Onboarding/ui/Overlay/index.d.ts +2 -0
- package/node/components/Onboarding/ui/Overlay/index.js +5 -0
- package/node/components/Onboarding/ui/Overlay/styles.d.ts +22 -0
- package/node/components/Onboarding/ui/Overlay/styles.js +60 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/useLogic.d.ts +13 -0
- package/node/components/Onboarding/ui/Overlay/useLogic/useLogic.js +14 -0
- package/node/components/Onboarding/ui/StepStrategy/StepStrategy.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/StepStrategy.js +21 -0
- package/node/components/Onboarding/ui/StepStrategy/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/index.js +17 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/HighlightStep.js +23 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +25 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.js +59 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.d.ts +12 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/useLogic/useLogic.js +41 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +15 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +13 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.js +12 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.d.ts +6 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.js +19 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.d.ts +4 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/constants.js +8 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.d.ts +9 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/styles.js +37 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.d.ts +9 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/StepFooter.js +22 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.d.ts +4 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/constants.js +7 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.d.ts +2 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.d.ts +21 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/styles.js +31 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.d.ts +16 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/useLogic/useLogic.js +26 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/types.d.ts +16 -0
- package/node/components/Onboarding/ui/StepStrategy/steps/types.js +2 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/index.d.ts +1 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/index.js +5 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/useLogic.d.ts +47 -0
- package/node/components/Onboarding/ui/StepStrategy/useLogic/useLogic.js +55 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.d.ts +6 -0
- package/node/components/Onboarding/ui/hooks/useActiveStep/useActiveStep.js +11 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/index.js +17 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.d.ts +15 -0
- package/node/components/Onboarding/ui/hooks/useDelayedActiveStep/useDelayedActiveStep.js +23 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.d.ts +6 -0
- package/node/components/Onboarding/ui/hooks/useFocusTrap/useFocusTrap.js +37 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.d.ts +11 -0
- package/node/components/Onboarding/ui/hooks/useKeyboardNav/useKeyboardNav.js +66 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.d.ts +30 -0
- package/node/components/Onboarding/ui/hooks/useStepTransition/useStepTransition.js +50 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/index.js +17 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.d.ts +37 -0
- package/node/components/Onboarding/ui/hooks/useTargetAnchor/useTargetAnchor.js +60 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.d.ts +5 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +47 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/index.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/index.js +5 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.d.ts +5 -0
- package/node/components/Onboarding/ui/hooks/useViewportSize/useViewportSize.js +18 -0
- package/node/components/Onboarding/ui/styles.d.ts +5 -0
- package/node/components/Onboarding/ui/styles.js +19 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.d.ts +12 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/createVirtualAnchor.js +10 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/index.d.ts +1 -0
- package/node/components/Onboarding/utils/createVirtualAnchor/index.js +17 -0
- package/node/components/Onboarding/utils/geometry/index.d.ts +4 -0
- package/node/components/Onboarding/utils/geometry/index.js +20 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/index.d.ts +1 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/index.js +5 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/overlayPath.d.ts +6 -0
- package/node/components/Onboarding/utils/geometry/overlayPath/overlayPath.js +33 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/index.d.ts +1 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/index.js +5 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/parseOffset.d.ts +4 -0
- package/node/components/Onboarding/utils/geometry/parseOffset/parseOffset.js +9 -0
- package/node/components/Onboarding/utils/geometry/rect/index.d.ts +2 -0
- package/node/components/Onboarding/utils/geometry/rect/index.js +9 -0
- package/node/components/Onboarding/utils/geometry/rect/rect.d.ts +34 -0
- package/node/components/Onboarding/utils/geometry/rect/rect.js +69 -0
- package/node/components/Onboarding/utils/geometry/viewport/index.d.ts +2 -0
- package/node/components/Onboarding/utils/geometry/viewport/index.js +5 -0
- package/node/components/Onboarding/utils/geometry/viewport/viewport.d.ts +14 -0
- package/node/components/Onboarding/utils/geometry/viewport/viewport.js +14 -0
- package/node/components/Onboarding/utils/getScrollParents/getScrollParents.d.ts +7 -0
- package/node/components/Onboarding/utils/getScrollParents/getScrollParents.js +28 -0
- package/node/components/Onboarding/utils/getScrollParents/index.d.ts +1 -0
- package/node/components/Onboarding/utils/getScrollParents/index.js +5 -0
- package/node/components/Onboarding/utils/getTargetElement/getTargetElement.d.ts +4 -0
- package/node/components/Onboarding/utils/getTargetElement/getTargetElement.js +13 -0
- package/node/components/Onboarding/utils/getTargetElement/index.d.ts +1 -0
- package/node/components/Onboarding/utils/getTargetElement/index.js +5 -0
- package/node/components/Onboarding/utils/observeRemoval/index.d.ts +1 -0
- package/node/components/Onboarding/utils/observeRemoval/index.js +17 -0
- package/node/components/Onboarding/utils/observeRemoval/observeRemoval.d.ts +4 -0
- package/node/components/Onboarding/utils/observeRemoval/observeRemoval.js +17 -0
- package/node/components/Onboarding/utils/scrollIntoView/index.d.ts +1 -0
- package/node/components/Onboarding/utils/scrollIntoView/index.js +5 -0
- package/node/components/Onboarding/utils/scrollIntoView/scrollIntoView.d.ts +13 -0
- package/node/components/Onboarding/utils/scrollIntoView/scrollIntoView.js +89 -0
- package/node/components/Onboarding/utils/waitForElement/index.d.ts +2 -0
- package/node/components/Onboarding/utils/waitForElement/index.js +5 -0
- package/node/components/Onboarding/utils/waitForElement/waitForElement.d.ts +21 -0
- package/node/components/Onboarding/utils/waitForElement/waitForElement.js +49 -0
- package/node/components/Onboarding/validation/index.d.ts +1 -0
- package/node/components/Onboarding/validation/index.js +6 -0
- package/node/components/Onboarding/validation/validateTourConfig/index.d.ts +1 -0
- package/node/components/Onboarding/validation/validateTourConfig/index.js +6 -0
- package/node/components/Onboarding/validation/validateTourConfig/validateTourConfig.d.ts +12 -0
- package/node/components/Onboarding/validation/validateTourConfig/validateTourConfig.js +80 -0
- package/node/services/Logger/Logger.d.ts +45 -0
- package/node/services/Logger/Logger.js +72 -0
- package/node/services/Logger/index.d.ts +10 -0
- package/node/services/Logger/index.js +17 -0
- package/package.json +3 -2
- package/services/Logger/Logger.d.ts +45 -0
- package/services/Logger/Logger.js +68 -0
- package/services/Logger/index.d.ts +10 -0
- package/services/Logger/index.js +12 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dot = exports.Dots = void 0;
|
|
4
|
+
const styled_1 = require("../../../../../../styled");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
exports.Dots = styled_1.styled.div `
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: ${({ theme }) => theme.spacing(1)};
|
|
9
|
+
align-items: center;
|
|
10
|
+
`;
|
|
11
|
+
exports.Dot = styled_1.styled.button `
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
|
|
14
|
+
width: 8px;
|
|
15
|
+
height: 8px;
|
|
16
|
+
padding: 0;
|
|
17
|
+
|
|
18
|
+
background-color: ${({ theme }) => theme.palette.grey[200]};
|
|
19
|
+
border: none;
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
|
|
22
|
+
transition: background-color 0.2s;
|
|
23
|
+
|
|
24
|
+
&.${constants_1.progressDotClassnames.active} {
|
|
25
|
+
background-color: ${({ theme }) => theme.palette.grey[600]};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Круглый фокус вместо браузерной рамки. */
|
|
29
|
+
&:focus {
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:focus-visible {
|
|
34
|
+
outline: 2px solid ${({ theme }) => theme.palette.components.focused};
|
|
35
|
+
outline-offset: 2px;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../../types';
|
|
2
|
+
export type StepFooterProps = {
|
|
3
|
+
activeStep: ActiveStepState;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Футер шага: индикатор прогресса и кнопки навигации.
|
|
7
|
+
* Общий для standalone и highlight.
|
|
8
|
+
*/
|
|
9
|
+
export declare const StepFooter: ({ activeStep }: StepFooterProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StepFooter = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Button_1 = require("../../../../../Button");
|
|
6
|
+
const Typography_1 = require("../../../../../Typography");
|
|
7
|
+
const ProgressDots_1 = require("./ProgressDots");
|
|
8
|
+
const styles_1 = require("./styles");
|
|
9
|
+
const useLogic_1 = require("./useLogic");
|
|
10
|
+
/**
|
|
11
|
+
* Футер шага: индикатор прогресса и кнопки навигации.
|
|
12
|
+
* Общий для standalone и highlight.
|
|
13
|
+
*/
|
|
14
|
+
const StepFooter = ({ activeStep }) => {
|
|
15
|
+
const { isPrevVisible, isNextVisible, isDotsVisible, isCounterVisible, position, total, prevButtonText, nextButtonText, nextButtonVariant, onNext, onPrev, onSelectStep, } = (0, useLogic_1.useLogic)(activeStep);
|
|
16
|
+
// Нечего показывать — не отрисовываем пустой футер
|
|
17
|
+
if (!isPrevVisible && !isNextVisible && !isDotsVisible && !isCounterVisible) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Root, { children: (0, jsx_runtime_1.jsxs)(styles_1.NavigationRow, { children: [(0, jsx_runtime_1.jsx)(styles_1.LeftSlot, { children: isPrevVisible && ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "text", onClick: onPrev, children: prevButtonText })) }), (0, jsx_runtime_1.jsxs)(styles_1.CenterSlot, { children: [isDotsVisible && ((0, jsx_runtime_1.jsx)(ProgressDots_1.ProgressDots, { position: position, total: total, onSelectStep: onSelectStep })), isCounterVisible && ((0, jsx_runtime_1.jsxs)(Typography_1.Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: [position + 1, " / ", total] }))] }), (0, jsx_runtime_1.jsx)(styles_1.RightSlot, { children: isNextVisible && ((0, jsx_runtime_1.jsx)(Button_1.Button, { "data-focus": "next", variant: nextButtonVariant, onClick: onNext, children: nextButtonText }, nextButtonVariant)) })] }) }));
|
|
21
|
+
};
|
|
22
|
+
exports.StepFooter = StepFooter;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StepFooter = void 0;
|
|
4
|
+
var StepFooter_1 = require("./StepFooter");
|
|
5
|
+
Object.defineProperty(exports, "StepFooter", { enumerable: true, get: function () { return StepFooter_1.StepFooter; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Root: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const NavigationRow: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const LeftSlot: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
+
export declare const CenterSlot: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
15
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
17
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
export declare const RightSlot: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
21
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RightSlot = exports.CenterSlot = exports.LeftSlot = exports.NavigationRow = exports.Root = void 0;
|
|
4
|
+
const styled_1 = require("../../../../../styled");
|
|
5
|
+
exports.Root = styled_1.styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: ${({ theme }) => theme.spacing(2)};
|
|
9
|
+
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding:0;
|
|
12
|
+
`;
|
|
13
|
+
exports.NavigationRow = styled_1.styled.div `
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: 1fr auto 1fr;
|
|
16
|
+
align-items: center;
|
|
17
|
+
`;
|
|
18
|
+
exports.LeftSlot = styled_1.styled.div `
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
`;
|
|
22
|
+
exports.CenterSlot = styled_1.styled.div `
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: ${({ theme }) => theme.spacing(1)};
|
|
26
|
+
align-items: center;
|
|
27
|
+
`;
|
|
28
|
+
exports.RightSlot = styled_1.styled.div `
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useLogic } from './useLogic';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../../../types';
|
|
2
|
+
export type UseLogicResult = {
|
|
3
|
+
isPrevVisible: boolean;
|
|
4
|
+
isNextVisible: boolean;
|
|
5
|
+
isDotsVisible: boolean;
|
|
6
|
+
isCounterVisible: boolean;
|
|
7
|
+
position: number;
|
|
8
|
+
total: number;
|
|
9
|
+
prevButtonText: string;
|
|
10
|
+
nextButtonText: string;
|
|
11
|
+
nextButtonVariant: 'text' | 'contained';
|
|
12
|
+
onNext: () => void;
|
|
13
|
+
onPrev: () => void;
|
|
14
|
+
onSelectStep: (position: number) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const useLogic: (activeStep: ActiveStepState) => UseLogicResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const useLogic = (activeStep) => {
|
|
6
|
+
const { step, position, total, hasNext, hasPrev, isDotsVisible, isCounterVisible, buttons, onNext, onPrev, onSelectStep, } = activeStep;
|
|
7
|
+
// Прогресс имеет смысл только при total > 1.
|
|
8
|
+
const hasProgress = total > 1;
|
|
9
|
+
// Последний шаг: кнопка «вперёд» превращается в завершающую.
|
|
10
|
+
const isFinishStep = !hasNext;
|
|
11
|
+
return {
|
|
12
|
+
isPrevVisible: step.isPrevButtonVisible && hasPrev,
|
|
13
|
+
isNextVisible: step.isNextButtonVisible,
|
|
14
|
+
isDotsVisible: isDotsVisible && hasProgress && total <= constants_1.MAX_PROGRESS_DOTS,
|
|
15
|
+
isCounterVisible: isCounterVisible && hasProgress,
|
|
16
|
+
position,
|
|
17
|
+
total,
|
|
18
|
+
prevButtonText: buttons.prevLabel,
|
|
19
|
+
nextButtonText: isFinishStep ? buttons.finishLabel : buttons.nextLabel,
|
|
20
|
+
nextButtonVariant: isFinishStep ? buttons.finishVariant : 'contained',
|
|
21
|
+
onNext,
|
|
22
|
+
onPrev,
|
|
23
|
+
onSelectStep,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../types';
|
|
2
|
+
import { type OverlayGeometry } from '../useLogic';
|
|
3
|
+
/**
|
|
4
|
+
* Контракт step-view, передаётся стратегией по типу шага.
|
|
5
|
+
*/
|
|
6
|
+
export type StepViewProps = {
|
|
7
|
+
activeStep: ActiveStepState;
|
|
8
|
+
/**
|
|
9
|
+
* Тур в процессе закрытия
|
|
10
|
+
*/
|
|
11
|
+
isClosing: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Геометрия подсветки (единый источник для overlay и popover).
|
|
14
|
+
*/
|
|
15
|
+
geometry: OverlayGeometry;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useLogic, type OverlayGeometry } from './useLogic';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../types';
|
|
2
|
+
import { type VirtualAnchor } from '../../../utils/createVirtualAnchor';
|
|
3
|
+
import { type Rect } from '../../../utils/geometry';
|
|
4
|
+
/**
|
|
5
|
+
* Геометрия подсветки, общая для overlay и popover.
|
|
6
|
+
*/
|
|
7
|
+
export type OverlayGeometry = {
|
|
8
|
+
/**
|
|
9
|
+
* Область hole (null для standalone или пока элемент не найден).
|
|
10
|
+
*/
|
|
11
|
+
hole: Rect | null;
|
|
12
|
+
/**
|
|
13
|
+
* Якорь popover (null пока нет hole).
|
|
14
|
+
*/
|
|
15
|
+
anchorEl: VirtualAnchor | null;
|
|
16
|
+
/**
|
|
17
|
+
* Подсвечиваемый элемент (null для standalone или пока не найден).
|
|
18
|
+
*/
|
|
19
|
+
element: HTMLElement | null;
|
|
20
|
+
/**
|
|
21
|
+
* Hole движется между элементами.
|
|
22
|
+
*/
|
|
23
|
+
isTransitioning: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type UseLogicResult = {
|
|
26
|
+
geometry: OverlayGeometry;
|
|
27
|
+
/**
|
|
28
|
+
* Показывать ли overlay.
|
|
29
|
+
*/
|
|
30
|
+
shouldShowOverlay: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Overlay виден.
|
|
33
|
+
*/
|
|
34
|
+
isVisible: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Hole анимируется.
|
|
37
|
+
*/
|
|
38
|
+
isHoleMoving: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Клик по overlay — запрос выхода.
|
|
41
|
+
*/
|
|
42
|
+
onOverlayClose: () => void;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Логика стратегии: держит единый overlay на весь тур.
|
|
46
|
+
*/
|
|
47
|
+
export declare const useLogic: (activeStep: ActiveStepState, isClosing: boolean) => UseLogicResult;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useTheme_1 = require("../../../../theme/hooks/useTheme");
|
|
6
|
+
const createVirtualAnchor_1 = require("../../../utils/createVirtualAnchor");
|
|
7
|
+
const geometry_1 = require("../../../utils/geometry");
|
|
8
|
+
const useStepTransition_1 = require("../../hooks/useStepTransition");
|
|
9
|
+
const useTargetAnchor_1 = require("../../hooks/useTargetAnchor");
|
|
10
|
+
/**
|
|
11
|
+
* Логика стратегии: держит единый overlay на весь тур.
|
|
12
|
+
*/
|
|
13
|
+
const useLogic = (activeStep, isClosing) => {
|
|
14
|
+
const { step, onError } = activeStep;
|
|
15
|
+
const theme = (0, useTheme_1.useTheme)();
|
|
16
|
+
const isHighlight = step.type === 'highlight';
|
|
17
|
+
const { element, rect } = (0, useTargetAnchor_1.useTargetAnchor)(step.name, {
|
|
18
|
+
onError,
|
|
19
|
+
// Трекинг только для highlight-шага.
|
|
20
|
+
shouldTrack: isHighlight,
|
|
21
|
+
scrollOnEnter: true,
|
|
22
|
+
timeout: step.waitForTimeout,
|
|
23
|
+
});
|
|
24
|
+
const padding = (0, geometry_1.parseOffset)(step.highlightOffset);
|
|
25
|
+
const hole = (0, react_1.useMemo)(() => (rect ? (0, geometry_1.inflateRect)(rect, padding) : null), [rect, padding]);
|
|
26
|
+
const anchorEl = (0, react_1.useMemo)(() => (hole ? (0, createVirtualAnchor_1.createVirtualAnchor)(hole) : null), [hole]);
|
|
27
|
+
const { isPopoverHidden, isHoleMoving } = (0, useStepTransition_1.useStepTransition)(step.name, {
|
|
28
|
+
// Popover скрыт пока hole движется.
|
|
29
|
+
popoverHiddenMs: theme.transitions.duration.short,
|
|
30
|
+
holeMovingMs: theme.transitions.duration.short,
|
|
31
|
+
hasHole: isHighlight,
|
|
32
|
+
});
|
|
33
|
+
const onOverlayClose = (0, react_1.useCallback)(() => {
|
|
34
|
+
activeStep.requestClose();
|
|
35
|
+
}, [activeStep]);
|
|
36
|
+
// Overlay залипает на весь тур после первого показа (без моргания).
|
|
37
|
+
const wantsOverlay = hole !== null || !isHighlight;
|
|
38
|
+
const hasShownOverlayRef = (0, react_1.useRef)(false);
|
|
39
|
+
if (wantsOverlay) {
|
|
40
|
+
hasShownOverlayRef.current = true;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
geometry: {
|
|
44
|
+
hole,
|
|
45
|
+
anchorEl,
|
|
46
|
+
element,
|
|
47
|
+
isTransitioning: isPopoverHidden,
|
|
48
|
+
},
|
|
49
|
+
shouldShowOverlay: hasShownOverlayRef.current,
|
|
50
|
+
isVisible: !isClosing,
|
|
51
|
+
isHoleMoving,
|
|
52
|
+
onOverlayClose,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useActiveStep } from './useActiveStep';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useActiveStep = void 0;
|
|
4
|
+
var useActiveStep_1 = require("./useActiveStep");
|
|
5
|
+
Object.defineProperty(exports, "useActiveStep", { enumerable: true, get: function () { return useActiveStep_1.useActiveStep; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ActiveStepStore } from '../../../core/ActiveStepStore';
|
|
2
|
+
import { type ActiveStepState } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Подписка на активный шаг из store экземпляра.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useActiveStep: (store: ActiveStepStore) => ActiveStepState | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useActiveStep = void 0;
|
|
4
|
+
// TODO После ухода с React 17 — заменить импорт на `react` и убрать use-sync-external-store.
|
|
5
|
+
// https://track.astral.ru/soft/browse/UIKIT-3285
|
|
6
|
+
const shim_1 = require("use-sync-external-store/shim");
|
|
7
|
+
/**
|
|
8
|
+
* Подписка на активный шаг из store экземпляра.
|
|
9
|
+
*/
|
|
10
|
+
const useActiveStep = (store) => (0, shim_1.useSyncExternalStore)(store.subscribe, store.getActiveStep, store.getActiveStep);
|
|
11
|
+
exports.useActiveStep = useActiveStep;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useDelayedActiveStep';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./useDelayedActiveStep"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../types';
|
|
2
|
+
export type DelayedActiveStep = {
|
|
3
|
+
/**
|
|
4
|
+
* Шаг, удержанный на экране на время закрытия.
|
|
5
|
+
*/
|
|
6
|
+
active: ActiveStepState | null;
|
|
7
|
+
/**
|
|
8
|
+
* Анимация закрытия в процессе.
|
|
9
|
+
*/
|
|
10
|
+
isClosing: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Откладывает обнуление шага на время закрытия анимаций.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useDelayedActiveStep: (active: ActiveStepState | null, exitDurationMs: number) => DelayedActiveStep;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDelayedActiveStep = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Откладывает обнуление шага на время закрытия анимаций.
|
|
7
|
+
*/
|
|
8
|
+
const useDelayedActiveStep = (active, exitDurationMs) => {
|
|
9
|
+
const [displayedStep, setDisplayedStep] = (0, react_1.useState)(active);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
if (active) {
|
|
12
|
+
setDisplayedStep(active);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const timer = setTimeout(() => setDisplayedStep(null), exitDurationMs);
|
|
16
|
+
return () => clearTimeout(timer);
|
|
17
|
+
}, [active, exitDurationMs]);
|
|
18
|
+
return {
|
|
19
|
+
active: displayedStep,
|
|
20
|
+
isClosing: displayedStep !== null && active === null,
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exports.useDelayedActiveStep = useDelayedActiveStep;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFocusTrap } from './useFocusTrap';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFocusTrap = void 0;
|
|
4
|
+
var useFocusTrap_1 = require("./useFocusTrap");
|
|
5
|
+
Object.defineProperty(exports, "useFocusTrap", { enumerable: true, get: function () { return useFocusTrap_1.useFocusTrap; } });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFocusTrap = void 0;
|
|
4
|
+
const focus_trap_1 = require("focus-trap");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
/**
|
|
7
|
+
* Мульти-контейнерный фокус-трап для highlight-шага.
|
|
8
|
+
* @param nodes контейнеры
|
|
9
|
+
* @param isActive включение трапа
|
|
10
|
+
*/
|
|
11
|
+
const useFocusTrap = (nodes, isActive = true) => {
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
const containers = nodes.filter((node) => node !== null);
|
|
14
|
+
if (!isActive || containers.length === 0) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const trap = (0, focus_trap_1.createFocusTrap)(containers, {
|
|
18
|
+
escapeDeactivates: false,
|
|
19
|
+
clickOutsideDeactivates: false,
|
|
20
|
+
allowOutsideClick: true,
|
|
21
|
+
returnFocusOnDeactivate: false,
|
|
22
|
+
fallbackFocus: containers[0],
|
|
23
|
+
initialFocus: () => containers[0],
|
|
24
|
+
});
|
|
25
|
+
try {
|
|
26
|
+
trap.activate();
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
// Нет фокусируемых узлов.
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
return () => {
|
|
33
|
+
trap.deactivate();
|
|
34
|
+
};
|
|
35
|
+
}, [nodes, isActive]);
|
|
36
|
+
};
|
|
37
|
+
exports.useFocusTrap = useFocusTrap;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useKeyboardNav } from './useKeyboardNav';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useKeyboardNav = void 0;
|
|
4
|
+
var useKeyboardNav_1 = require("./useKeyboardNav");
|
|
5
|
+
Object.defineProperty(exports, "useKeyboardNav", { enumerable: true, get: function () { return useKeyboardNav_1.useKeyboardNav; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Клавиатурная навигация по туру.
|
|
4
|
+
*
|
|
5
|
+
* → / ← — next/prev, Esc — единая точка выхода `requestClose()`.
|
|
6
|
+
* Слушатель вешается только при активном туре и снимается при закрытии.
|
|
7
|
+
*
|
|
8
|
+
* Слушаем в capture-фазе на window, чтобы перехватить стрелки/Esc раньше
|
|
9
|
+
* вложенных обработчиков и не зависеть от фокуса.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useKeyboardNav: (activeStep: ActiveStepState | null) => void;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useKeyboardNav = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const isEditableTarget = (target) => {
|
|
6
|
+
if (!(target instanceof HTMLElement)) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
const tag = target.tagName;
|
|
10
|
+
return (tag === 'INPUT' ||
|
|
11
|
+
tag === 'TEXTAREA' ||
|
|
12
|
+
tag === 'SELECT' ||
|
|
13
|
+
target.isContentEditable);
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Стрелки игнорируются при фокусе в поле ввода (чтобы свободно двигать каретку) и при
|
|
17
|
+
* скрытой кнопке навигации.
|
|
18
|
+
*/
|
|
19
|
+
const goNext = (activeStep, event) => {
|
|
20
|
+
if (isEditableTarget(event.target) || !activeStep.step.isNextButtonVisible) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
activeStep.onNext();
|
|
25
|
+
};
|
|
26
|
+
const goPrev = (activeStep, event) => {
|
|
27
|
+
if (isEditableTarget(event.target) || !activeStep.step.isPrevButtonVisible) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
activeStep.onPrev();
|
|
32
|
+
};
|
|
33
|
+
const requestExit = (activeStep, event) => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
activeStep.requestClose();
|
|
36
|
+
};
|
|
37
|
+
const KEY_HANDLERS = {
|
|
38
|
+
ArrowRight: goNext,
|
|
39
|
+
ArrowLeft: goPrev,
|
|
40
|
+
Escape: requestExit,
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Клавиатурная навигация по туру.
|
|
44
|
+
*
|
|
45
|
+
* → / ← — next/prev, Esc — единая точка выхода `requestClose()`.
|
|
46
|
+
* Слушатель вешается только при активном туре и снимается при закрытии.
|
|
47
|
+
*
|
|
48
|
+
* Слушаем в capture-фазе на window, чтобы перехватить стрелки/Esc раньше
|
|
49
|
+
* вложенных обработчиков и не зависеть от фокуса.
|
|
50
|
+
*/
|
|
51
|
+
const useKeyboardNav = (activeStep) => {
|
|
52
|
+
const isActive = Boolean(activeStep) && !activeStep?.isConfirming;
|
|
53
|
+
(0, react_1.useEffect)(() => {
|
|
54
|
+
if (!activeStep || !isActive) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const handleKeyDown = (event) => {
|
|
58
|
+
KEY_HANDLERS[event.key]?.(activeStep, event);
|
|
59
|
+
};
|
|
60
|
+
window.addEventListener('keydown', handleKeyDown, true);
|
|
61
|
+
return () => {
|
|
62
|
+
window.removeEventListener('keydown', handleKeyDown, true);
|
|
63
|
+
};
|
|
64
|
+
}, [activeStep, isActive]);
|
|
65
|
+
};
|
|
66
|
+
exports.useKeyboardNav = useKeyboardNav;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useStepTransition } from './useStepTransition';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStepTransition = void 0;
|
|
4
|
+
var useStepTransition_1 = require("./useStepTransition");
|
|
5
|
+
Object.defineProperty(exports, "useStepTransition", { enumerable: true, get: function () { return useStepTransition_1.useStepTransition; } });
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type StepTransitionDurations = {
|
|
2
|
+
/**
|
|
3
|
+
* Время скрытия popover при смене шага (не меньше `holeMovingMs`).
|
|
4
|
+
*/
|
|
5
|
+
popoverHiddenMs: number;
|
|
6
|
+
/**
|
|
7
|
+
* Время движения hole к новому элементу.
|
|
8
|
+
*/
|
|
9
|
+
holeMovingMs: number;
|
|
10
|
+
/**
|
|
11
|
+
* Есть ли hole в текущем шаге (highlight). Скрытие popover нужно только для
|
|
12
|
+
* переезда hole (highlight → highlight).
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
hasHole?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type StepTransitionPhase = {
|
|
18
|
+
/**
|
|
19
|
+
* Popover скрыт, пока hole движется.
|
|
20
|
+
*/
|
|
21
|
+
isPopoverHidden: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Идёт анимированный переезд hole.
|
|
24
|
+
*/
|
|
25
|
+
isHoleMoving: boolean;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Координирует скрытие popover и движение hole при переходе между highlight-шагами.
|
|
29
|
+
*/
|
|
30
|
+
export declare const useStepTransition: (stepKey: string, { popoverHiddenMs, holeMovingMs, hasHole }: StepTransitionDurations) => StepTransitionPhase;
|