@astral/ui 4.82.0 → 4.83.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/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/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 +46 -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 +46 -0
- package/components/Onboarding/core/ExitController/ExitController.js +56 -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 +101 -0
- package/components/Onboarding/core/OnboardingTour/OnboardingTour.js +262 -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 +22 -0
- package/components/Onboarding/core/ProgressStorage/ProgressStorage.js +58 -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/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/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 +51 -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 +46 -0
- package/node/components/Onboarding/core/ExitController/ExitController.js +60 -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 +101 -0
- package/node/components/Onboarding/core/OnboardingTour/OnboardingTour.js +266 -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 +22 -0
- package/node/components/Onboarding/core/ProgressStorage/ProgressStorage.js +62 -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/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StepStrategy';
|
|
@@ -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("./StepStrategy"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type StepViewProps } from '../types';
|
|
2
|
+
export type HighlightStepProps = StepViewProps;
|
|
3
|
+
/**
|
|
4
|
+
* Шаг с подсветкой: popover рядом с hole.
|
|
5
|
+
*/
|
|
6
|
+
export declare const HighlightStep: ({ activeStep, isClosing, geometry, }: HighlightStepProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightStep = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const CrossOutlineMd_1 = require("../../../../../../icons/CrossOutlineMd");
|
|
6
|
+
const Typography_1 = require("../../../../../Typography");
|
|
7
|
+
const StepFooter_1 = require("../StepFooter");
|
|
8
|
+
const styles_1 = require("./styles");
|
|
9
|
+
const useLogic_1 = require("./useLogic");
|
|
10
|
+
/**
|
|
11
|
+
* Шаг с подсветкой: popover рядом с hole.
|
|
12
|
+
*/
|
|
13
|
+
const HighlightStep = ({ activeStep, isClosing, geometry, }) => {
|
|
14
|
+
const { step } = activeStep;
|
|
15
|
+
const { anchorEl } = geometry;
|
|
16
|
+
const { isOpen, shouldShowPopover, setPopoverNode, handleClose } = (0, useLogic_1.useLogic)(activeStep, isClosing, geometry);
|
|
17
|
+
// Без якоря popover не рисуем.
|
|
18
|
+
if (!anchorEl) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: shouldShowPopover && ((0, jsx_runtime_1.jsx)(styles_1.StepPopover, { isOpen: isOpen, disableAutoFocus: true, hasArrow: true, anchorEl: anchorEl, placement: step.position, children: (0, jsx_runtime_1.jsxs)(styles_1.PopoverBody, { ref: setPopoverNode, tabIndex: -1, children: [(0, jsx_runtime_1.jsx)(styles_1.CloseButton, { variant: "text", onClick: handleClose, "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: (0, jsx_runtime_1.jsx)(CrossOutlineMd_1.CrossOutlineMd, {}) }), (0, jsx_runtime_1.jsxs)(styles_1.Content, { children: [step.title && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { component: "div", variant: "h5", children: step.title })), step.content && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { component: "div", variant: "body1", color: "grey", colorIntensity: "900", children: step.content }))] }), (0, jsx_runtime_1.jsx)(StepFooter_1.StepFooter, { activeStep: activeStep })] }) })) }));
|
|
22
|
+
};
|
|
23
|
+
exports.HighlightStep = HighlightStep;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightStep = void 0;
|
|
4
|
+
var HighlightStep_1 = require("./HighlightStep");
|
|
5
|
+
Object.defineProperty(exports, "HighlightStep", { enumerable: true, get: function () { return HighlightStep_1.HighlightStep; } });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Popover шага, z-index над overlay, быстрое закрытие.
|
|
4
|
+
*/
|
|
5
|
+
export declare const StepPopover: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../../../../NewPopover").NewPopoverProps & {
|
|
6
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
+
}, {}, {}>;
|
|
8
|
+
export declare const PopoverBody: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
11
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
|
+
export declare const CloseButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
13
|
+
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
14
|
+
loading?: boolean | undefined;
|
|
15
|
+
color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
|
|
16
|
+
component?: import("react").ElementType | undefined;
|
|
17
|
+
selected?: boolean | undefined;
|
|
18
|
+
size?: "large" | "medium" | undefined;
|
|
19
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
export declare const Content: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
23
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
25
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Content = exports.CloseButton = exports.PopoverBody = exports.StepPopover = void 0;
|
|
4
|
+
const IconButton_1 = require("../../../../../IconButton");
|
|
5
|
+
const NewPopover_1 = require("../../../../../NewPopover");
|
|
6
|
+
const constants_1 = require("../../../../../NewPopover/constants");
|
|
7
|
+
const styled_1 = require("../../../../../styled");
|
|
8
|
+
const constants_2 = require("../../../../constants");
|
|
9
|
+
/**
|
|
10
|
+
* Popover шага, z-index над overlay, быстрое закрытие.
|
|
11
|
+
*/
|
|
12
|
+
exports.StepPopover = (0, styled_1.styled)(NewPopover_1.NewPopover) `
|
|
13
|
+
&& {
|
|
14
|
+
z-index: ${({ theme }) => theme.zIndex.tooltip + constants_2.ONBOARDING_Z_INDEX_OFFSET.popover};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.${constants_1.popoverClassnames.innerContainer} {
|
|
18
|
+
border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.${constants_1.popoverClassnames.animatedWrapper}:not(.${constants_1.popoverClassnames.animatedWrapperOpen}) {
|
|
22
|
+
animation-duration: ${({ theme }) => theme.transitions.duration.shortest}ms;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
exports.PopoverBody = styled_1.styled.div `
|
|
26
|
+
position: relative;
|
|
27
|
+
|
|
28
|
+
width: 400px;
|
|
29
|
+
padding: ${({ theme }) => theme.spacing(6)};
|
|
30
|
+
|
|
31
|
+
border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
|
|
32
|
+
|
|
33
|
+
/* Фокус-трап ставит фокус на контейнер, браузерную рамку убираем. */
|
|
34
|
+
&:focus {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
exports.CloseButton = (0, styled_1.styled)(IconButton_1.IconButton) `
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: ${({ theme }) => theme.spacing(6)};
|
|
41
|
+
right: ${({ theme }) => theme.spacing(6)};
|
|
42
|
+
`;
|
|
43
|
+
exports.Content = styled_1.styled.div `
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: ${({ theme }) => theme.spacing(4)};
|
|
47
|
+
|
|
48
|
+
margin-bottom: ${({ theme }) => theme.spacing(6)};
|
|
49
|
+
|
|
50
|
+
&:last-child {
|
|
51
|
+
margin-bottom: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Резерв справа под крестик — только у верхнего элемента (заголовок, а если
|
|
55
|
+
его нет — текст) */
|
|
56
|
+
& > *:first-of-type {
|
|
57
|
+
padding-right: ${({ theme }) => theme.spacing(10)};
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useLogic } from './useLogic';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../../../types';
|
|
2
|
+
import { type OverlayGeometry } from '../../../useLogic';
|
|
3
|
+
export type UseLogicResult = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
shouldShowPopover: boolean;
|
|
6
|
+
setPopoverNode: (node: HTMLElement | null) => void;
|
|
7
|
+
handleClose: () => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Логика highlight-шага: задержка popover, фокус-трап, закрытие.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useLogic: (activeStep: ActiveStepState, isClosing: boolean, geometry: OverlayGeometry) => UseLogicResult;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 useFocusTrap_1 = require("../../../../hooks/useFocusTrap");
|
|
7
|
+
/**
|
|
8
|
+
* Логика highlight-шага: задержка popover, фокус-трап, закрытие.
|
|
9
|
+
*/
|
|
10
|
+
const useLogic = (activeStep, isClosing, geometry) => {
|
|
11
|
+
const { isInteractive, isConfirming } = activeStep;
|
|
12
|
+
const { anchorEl, element, isTransitioning } = geometry;
|
|
13
|
+
const theme = (0, useTheme_1.useTheme)();
|
|
14
|
+
const isOpen = !isClosing;
|
|
15
|
+
// Задержка до появления popover после готовности hole.
|
|
16
|
+
const isHoleReady = anchorEl !== null;
|
|
17
|
+
const [isEntered, setIsEntered] = (0, react_1.useState)(false);
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
if (isEntered || !isHoleReady) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const timer = setTimeout(() => setIsEntered(true), theme.transitions.duration.shortest);
|
|
23
|
+
return () => clearTimeout(timer);
|
|
24
|
+
}, [isEntered, isHoleReady]);
|
|
25
|
+
const [popoverNode, setPopoverNode] = (0, react_1.useState)(null);
|
|
26
|
+
const trapNodes = (0, react_1.useMemo)(() => [popoverNode, isInteractive ? element : null], [popoverNode, isInteractive, element]);
|
|
27
|
+
// Трап выключен при закрытии/подтверждении.
|
|
28
|
+
(0, useFocusTrap_1.useFocusTrap)(trapNodes, isOpen && !isConfirming);
|
|
29
|
+
const handleClose = (0, react_1.useCallback)(() => {
|
|
30
|
+
activeStep.requestClose();
|
|
31
|
+
}, [activeStep]);
|
|
32
|
+
// При переходе popover размонтируется; при закрытии — grow-out.
|
|
33
|
+
const shouldShowPopover = !isConfirming && !isTransitioning && isEntered;
|
|
34
|
+
return {
|
|
35
|
+
isOpen,
|
|
36
|
+
shouldShowPopover,
|
|
37
|
+
setPopoverNode,
|
|
38
|
+
handleClose,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StandaloneStep = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const DialogContent_1 = require("../../../../../DialogContent");
|
|
6
|
+
const StepFooter_1 = require("../StepFooter");
|
|
7
|
+
const styles_1 = require("./styles");
|
|
8
|
+
/**
|
|
9
|
+
* Standalone шаг-модалка.
|
|
10
|
+
*/
|
|
11
|
+
const StandaloneStep = ({ activeStep, isClosing, }) => {
|
|
12
|
+
const { step, isConfirming, requestClose } = activeStep;
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.StepDialog, { open: !isConfirming && !isClosing, title: step.title, onClose: requestClose, size: step.dialogSize, disableAutoFocus: true, children: [(0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { children: step.content }), (0, jsx_runtime_1.jsx)(styles_1.Footer, { children: (0, jsx_runtime_1.jsx)(StepFooter_1.StepFooter, { activeStep: activeStep }) })] }));
|
|
14
|
+
};
|
|
15
|
+
exports.StandaloneStep = StandaloneStep;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StandaloneStep = void 0;
|
|
4
|
+
var StandaloneStep_1 = require("./StandaloneStep");
|
|
5
|
+
Object.defineProperty(exports, "StandaloneStep", { enumerable: true, get: function () { return StandaloneStep_1.StandaloneStep; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StepDialog: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../../../..").WithoutEmotionSpecific<Omit<import("@mui/material").DialogProps, "title" | "maxWidth">> & {
|
|
3
|
+
title?: string | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
4
|
+
disableBackdropClick?: boolean | undefined;
|
|
5
|
+
size?: import("../../../../../Dialog").DialogSize | undefined;
|
|
6
|
+
headerContent?: import("react").ReactNode;
|
|
7
|
+
} & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
export declare const Footer: 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>, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Footer = exports.StepDialog = void 0;
|
|
4
|
+
const Dialog_1 = require("../../../../../Dialog");
|
|
5
|
+
const styled_1 = require("../../../../../styled");
|
|
6
|
+
const styles_1 = require("../../../styles");
|
|
7
|
+
exports.StepDialog = (0, styled_1.styled)(Dialog_1.Dialog) `
|
|
8
|
+
${({ theme }) => (0, styles_1.onboardingModalSurface)(theme)};
|
|
9
|
+
`;
|
|
10
|
+
exports.Footer = styled_1.styled.div `
|
|
11
|
+
padding: ${({ theme }) => theme.spacing(0, 6, 6)};
|
|
12
|
+
`;
|
package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ActiveStepState } from '../../../../../types';
|
|
2
|
+
export type ProgressDotsProps = Pick<ActiveStepState, 'position' | 'total' | 'onSelectStep'>;
|
|
3
|
+
/**
|
|
4
|
+
* Индикатор прогресса точками
|
|
5
|
+
*/
|
|
6
|
+
export declare const ProgressDots: ({ position, total, onSelectStep, }: ProgressDotsProps) => import("react/jsx-runtime").JSX.Element;
|
package/node/components/Onboarding/ui/StepStrategy/steps/StepFooter/ProgressDots/ProgressDots.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProgressDots = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const cva_1 = require("../../../../../../utils/cva");
|
|
6
|
+
const constants_1 = require("./constants");
|
|
7
|
+
const styles_1 = require("./styles");
|
|
8
|
+
const dotCva = (0, cva_1.cva)(constants_1.progressDotClassnames.root, {
|
|
9
|
+
variants: {
|
|
10
|
+
isActive: {
|
|
11
|
+
true: constants_1.progressDotClassnames.active,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Индикатор прогресса точками
|
|
17
|
+
*/
|
|
18
|
+
const ProgressDots = ({ position, total, onSelectStep, }) => ((0, jsx_runtime_1.jsx)(styles_1.Dots, { children: Array.from({ length: total }, (_, index) => ((0, jsx_runtime_1.jsx)(styles_1.Dot, { type: "button", className: dotCva({ isActive: index === position }), "aria-label": `Перейти к шагу ${index + 1}`, "aria-current": index === position, onClick: () => onSelectStep(index) }, index))) }));
|
|
19
|
+
exports.ProgressDots = ProgressDots;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.progressDotClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../../../../../utils/createUIKitClassname");
|
|
5
|
+
exports.progressDotClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('onboarding-progress-dot'),
|
|
7
|
+
active: (0, createUIKitClassname_1.createUIKitClassname)('onboarding-progress-dot_active'),
|
|
8
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProgressDots = void 0;
|
|
4
|
+
var ProgressDots_1 = require("./ProgressDots");
|
|
5
|
+
Object.defineProperty(exports, "ProgressDots", { enumerable: true, get: function () { return ProgressDots_1.ProgressDots; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Dots: 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 Dot: 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").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -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';
|