@automattic/onboarding 1.0.0 → 1.0.1
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/.storybook/index.scss +16 -0
- package/.storybook/main.ts +15 -0
- package/.storybook/preview.ts +5 -0
- package/CHANGELOG.md +5 -0
- package/dist/cjs/action-buttons/index.js +1 -13
- package/dist/cjs/action-buttons/index.js.map +1 -1
- package/dist/cjs/action-buttons/style.scss +4 -40
- package/dist/cjs/cart/create-cart-manager-client.js +3 -3
- package/dist/cjs/cart/create-cart-manager-client.js.map +1 -1
- package/dist/cjs/cart/index.js +45 -67
- package/dist/cjs/cart/index.js.map +1 -1
- package/dist/cjs/confetti/index.js +1 -1
- package/dist/cjs/confetti/index.js.map +1 -1
- package/dist/cjs/flow-progress/use-flow-progress.js +0 -57
- package/dist/cjs/flow-progress/use-flow-progress.js.map +1 -1
- package/dist/cjs/hooks/use-persisted-state.js +61 -0
- package/dist/cjs/hooks/use-persisted-state.js.map +1 -0
- package/dist/cjs/hooray/index.js +1 -1
- package/dist/cjs/index.js +11 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mshots-image/index.js +34 -15
- package/dist/cjs/mshots-image/index.js.map +1 -1
- package/dist/cjs/mshots-image/style.scss +1 -0
- package/dist/cjs/navigator/hooks/index.js +2 -1
- package/dist/cjs/navigator/hooks/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-buttons/index.js +2 -2
- package/dist/cjs/navigator/navigator-buttons/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-header/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-screens/hooks/index.js +3 -2
- package/dist/cjs/navigator/navigator-screens/hooks/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-screens/hooks/use-navigator-screens.js +1 -1
- package/dist/cjs/navigator/navigator-screens/hooks/use-navigator-screens.js.map +1 -1
- package/dist/cjs/navigator/navigator-screens/navigator-screens.js +7 -2
- package/dist/cjs/navigator/navigator-screens/navigator-screens.js.map +1 -1
- package/dist/cjs/select-card-checkbox/index.js +4 -3
- package/dist/cjs/select-card-checkbox/index.js.map +1 -1
- package/dist/cjs/select-card-checkbox/style.scss +11 -14
- package/dist/cjs/select-card-checkbox-v2/index.js +15 -0
- package/dist/cjs/select-card-checkbox-v2/index.js.map +1 -0
- package/dist/cjs/select-card-checkbox-v2/style.scss +25 -0
- package/dist/cjs/select-items/index.js +2 -1
- package/dist/cjs/select-items/index.js.map +1 -1
- package/dist/cjs/select-items/style.scss +2 -1
- package/dist/cjs/setup-tailored-site-after-creation.js +9 -37
- package/dist/cjs/setup-tailored-site-after-creation.js.map +1 -1
- package/dist/cjs/step-container/index.js +10 -12
- package/dist/cjs/step-container/index.js.map +1 -1
- package/dist/cjs/step-container/style.scss +35 -77
- package/dist/cjs/step-container-v2/components/ContentRow/ContentRow.js +14 -0
- package/dist/cjs/step-container-v2/components/ContentRow/ContentRow.js.map +1 -0
- package/dist/cjs/step-container-v2/components/ContentRow/style.scss +26 -0
- package/dist/cjs/step-container-v2/components/ContentWrapper/ContentWrapper.js +19 -0
- package/dist/cjs/step-container-v2/components/ContentWrapper/ContentWrapper.js.map +1 -0
- package/dist/cjs/step-container-v2/components/ContentWrapper/style.scss +70 -0
- package/dist/cjs/step-container-v2/components/Heading/Heading.js +17 -0
- package/dist/cjs/step-container-v2/components/Heading/Heading.js.map +1 -0
- package/dist/cjs/step-container-v2/components/Heading/style.scss +47 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/StepContainerV2.js +36 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/StepContainerV2.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/context.js +13 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/context.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/style.scss +21 -0
- package/dist/cjs/step-container-v2/components/StepCounter/StepCounter.js +17 -0
- package/dist/cjs/step-container-v2/components/StepCounter/StepCounter.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StepCounter/style.scss +4 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBar.js +17 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBar.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js +31 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/style.scss +56 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBar.js +55 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBar.js.map +1 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBarRenderer.js +32 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBarRenderer.js.map +1 -0
- package/dist/cjs/step-container-v2/components/TopBar/style.scss +75 -0
- package/dist/cjs/step-container-v2/components/buttons/BackButton/BackButton.js +29 -0
- package/dist/cjs/step-container-v2/components/buttons/BackButton/BackButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/BackButton/style.scss +16 -0
- package/dist/cjs/step-container-v2/components/buttons/LinkButton/LinkButton.js +18 -0
- package/dist/cjs/step-container-v2/components/buttons/LinkButton/LinkButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
- package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js +18 -0
- package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
- package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js +18 -0
- package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
- package/dist/cjs/step-container-v2/components/buttons/SkipButton/SkipButton.js +28 -0
- package/dist/cjs/step-container-v2/components/buttons/SkipButton/SkipButton.js.map +1 -0
- package/dist/cjs/step-container-v2/contexts/StepContainerV2Context.js +17 -0
- package/dist/cjs/step-container-v2/contexts/StepContainerV2Context.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js +18 -0
- package/dist/cjs/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/normalizeButtonProps.js +13 -0
- package/dist/cjs/step-container-v2/helpers/normalizeButtonProps.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/wireframe-placeholder.js +18 -0
- package/dist/cjs/step-container-v2/helpers/wireframe-placeholder.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/withStepContainerV2ContextDecorator.js +15 -0
- package/dist/cjs/step-container-v2/helpers/withStepContainerV2ContextDecorator.js.map +1 -0
- package/dist/cjs/step-container-v2/index.js +41 -0
- package/dist/cjs/step-container-v2/index.js.map +1 -0
- package/dist/cjs/step-container-v2/types.js +3 -0
- package/dist/cjs/step-container-v2/types.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js +26 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js +52 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js +26 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js +25 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.js +30 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.stories.js +29 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/style.scss +22 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js +17 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js +17 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js +38 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js +28 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.js +17 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.stories.js +41 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.stories.js.map +1 -0
- package/dist/cjs/step-navigation-link/index.js +2 -2
- package/dist/cjs/step-navigation-link/index.js.map +1 -1
- package/dist/cjs/step-navigation-link/style.scss +5 -3
- package/dist/cjs/titles/styles.scss +2 -2
- package/dist/cjs/upload-and-set-site-logo.js +4 -5
- package/dist/cjs/upload-and-set-site-logo.js.map +1 -1
- package/dist/cjs/utils/contrastChecker.js +1 -22
- package/dist/cjs/utils/contrastChecker.js.map +1 -1
- package/dist/cjs/utils/flows.js +73 -117
- package/dist/cjs/utils/flows.js.map +1 -1
- package/dist/cjs/utils/is-domain.js +1 -2
- package/dist/cjs/utils/is-domain.js.map +1 -1
- package/dist/cjs/utils/use-data-loss-warning.js +1 -2
- package/dist/cjs/utils/use-data-loss-warning.js.map +1 -1
- package/dist/cjs/wpcom-request.js +24 -0
- package/dist/cjs/wpcom-request.js.map +1 -0
- package/dist/esm/action-buttons/index.js +1 -11
- package/dist/esm/action-buttons/index.js.map +1 -1
- package/dist/esm/action-buttons/style.scss +4 -40
- package/dist/esm/cart/create-cart-manager-client.js +1 -1
- package/dist/esm/cart/create-cart-manager-client.js.map +1 -1
- package/dist/esm/cart/index.js +40 -61
- package/dist/esm/cart/index.js.map +1 -1
- package/dist/esm/confetti/index.js +1 -1
- package/dist/esm/confetti/index.js.map +1 -1
- package/dist/esm/flow-progress/use-flow-progress.js +1 -58
- package/dist/esm/flow-progress/use-flow-progress.js.map +1 -1
- package/dist/esm/hooks/use-persisted-state.js +57 -0
- package/dist/esm/hooks/use-persisted-state.js.map +1 -0
- package/dist/esm/hooray/index.js +1 -1
- package/dist/esm/index.js +6 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/mshots-image/index.js +33 -13
- package/dist/esm/mshots-image/index.js.map +1 -1
- package/dist/esm/mshots-image/style.scss +1 -0
- package/dist/esm/navigator/navigator-buttons/index.js.map +1 -1
- package/dist/esm/navigator/navigator-header/index.js.map +1 -1
- package/dist/esm/navigator/navigator-screens/hooks/use-navigator-screens.js +1 -1
- package/dist/esm/navigator/navigator-screens/hooks/use-navigator-screens.js.map +1 -1
- package/dist/esm/navigator/navigator-screens/navigator-screens.js +8 -3
- package/dist/esm/navigator/navigator-screens/navigator-screens.js.map +1 -1
- package/dist/esm/select-card-checkbox/index.js +4 -3
- package/dist/esm/select-card-checkbox/index.js.map +1 -1
- package/dist/esm/select-card-checkbox/style.scss +11 -14
- package/dist/esm/select-card-checkbox-v2/index.js +12 -0
- package/dist/esm/select-card-checkbox-v2/index.js.map +1 -0
- package/dist/esm/select-card-checkbox-v2/style.scss +25 -0
- package/dist/esm/select-items/index.js +3 -2
- package/dist/esm/select-items/index.js.map +1 -1
- package/dist/esm/select-items/style.scss +2 -1
- package/dist/esm/setup-tailored-site-after-creation.js +9 -37
- package/dist/esm/setup-tailored-site-after-creation.js.map +1 -1
- package/dist/esm/step-container/index.js +11 -13
- package/dist/esm/step-container/index.js.map +1 -1
- package/dist/esm/step-container/style.scss +35 -77
- package/dist/esm/step-container-v2/components/ContentRow/ContentRow.js +9 -0
- package/dist/esm/step-container-v2/components/ContentRow/ContentRow.js.map +1 -0
- package/dist/esm/step-container-v2/components/ContentRow/style.scss +26 -0
- package/dist/esm/step-container-v2/components/ContentWrapper/ContentWrapper.js +14 -0
- package/dist/esm/step-container-v2/components/ContentWrapper/ContentWrapper.js.map +1 -0
- package/dist/esm/step-container-v2/components/ContentWrapper/style.scss +70 -0
- package/dist/esm/step-container-v2/components/Heading/Heading.js +12 -0
- package/dist/esm/step-container-v2/components/Heading/Heading.js.map +1 -0
- package/dist/esm/step-container-v2/components/Heading/style.scss +47 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/StepContainerV2.js +32 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/StepContainerV2.js.map +1 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/context.js +10 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/context.js.map +1 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/style.scss +21 -0
- package/dist/esm/step-container-v2/components/StepCounter/StepCounter.js +13 -0
- package/dist/esm/step-container-v2/components/StepCounter/StepCounter.js.map +1 -0
- package/dist/esm/step-container-v2/components/StepCounter/style.scss +4 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBar.js +12 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBar.js.map +1 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js +27 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js.map +1 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/style.scss +56 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBar.js +49 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBar.js.map +1 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBarRenderer.js +27 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBarRenderer.js.map +1 -0
- package/dist/esm/step-container-v2/components/TopBar/style.scss +75 -0
- package/dist/esm/step-container-v2/components/buttons/BackButton/BackButton.js +25 -0
- package/dist/esm/step-container-v2/components/buttons/BackButton/BackButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/BackButton/style.scss +16 -0
- package/dist/esm/step-container-v2/components/buttons/LinkButton/LinkButton.js +14 -0
- package/dist/esm/step-container-v2/components/buttons/LinkButton/LinkButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
- package/dist/esm/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js +14 -0
- package/dist/esm/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
- package/dist/esm/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js +14 -0
- package/dist/esm/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
- package/dist/esm/step-container-v2/components/buttons/SkipButton/SkipButton.js +24 -0
- package/dist/esm/step-container-v2/components/buttons/SkipButton/SkipButton.js.map +1 -0
- package/dist/esm/step-container-v2/contexts/StepContainerV2Context.js +13 -0
- package/dist/esm/step-container-v2/contexts/StepContainerV2Context.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js +14 -0
- package/dist/esm/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/normalizeButtonProps.js +8 -0
- package/dist/esm/step-container-v2/helpers/normalizeButtonProps.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/wireframe-placeholder.js +15 -0
- package/dist/esm/step-container-v2/helpers/wireframe-placeholder.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/withStepContainerV2ContextDecorator.js +11 -0
- package/dist/esm/step-container-v2/helpers/withStepContainerV2ContextDecorator.js.map +1 -0
- package/dist/esm/step-container-v2/index.js +22 -0
- package/dist/esm/step-container-v2/index.js.map +1 -0
- package/dist/esm/step-container-v2/types.js +2 -0
- package/dist/esm/step-container-v2/types.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js +22 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js +45 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js +23 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js +21 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.js +26 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.stories.js +22 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/Loading/style.scss +22 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js +12 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js +13 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js +33 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js +22 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.js +13 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.stories.js +36 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.stories.js.map +1 -0
- package/dist/esm/step-navigation-link/index.js +2 -2
- package/dist/esm/step-navigation-link/index.js.map +1 -1
- package/dist/esm/step-navigation-link/style.scss +5 -3
- package/dist/esm/titles/styles.scss +2 -2
- package/dist/esm/upload-and-set-site-logo.js +1 -1
- package/dist/esm/upload-and-set-site-logo.js.map +1 -1
- package/dist/esm/utils/contrastChecker.js +0 -20
- package/dist/esm/utils/contrastChecker.js.map +1 -1
- package/dist/esm/utils/flows.js +57 -96
- package/dist/esm/utils/flows.js.map +1 -1
- package/dist/esm/wpcom-request.js +18 -0
- package/dist/esm/wpcom-request.js.map +1 -0
- package/dist/styles/mixins.scss +4 -4
- package/dist/styles/variables.scss +2 -2
- package/dist/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/action-buttons/index.d.ts +0 -4
- package/dist/types/action-buttons/index.d.ts.map +1 -1
- package/dist/types/cart/index.d.ts +7 -4
- package/dist/types/cart/index.d.ts.map +1 -1
- package/dist/types/flow-progress/use-flow-progress.d.ts.map +1 -1
- package/dist/types/hooks/use-persisted-state.d.ts +26 -0
- package/dist/types/hooks/use-persisted-state.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/intent-screen/index.d.ts.map +1 -1
- package/dist/types/mshots-image/index.d.ts +2 -1
- package/dist/types/mshots-image/index.d.ts.map +1 -1
- package/dist/types/navigator/hooks/use-navigator-listener.d.ts.map +1 -1
- package/dist/types/navigator/navigator-buttons/index.d.ts +1 -1
- package/dist/types/navigator/navigator-buttons/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-header/index.d.ts +1 -1
- package/dist/types/navigator/navigator-header/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-item-group/index.d.ts +0 -1
- package/dist/types/navigator/navigator-item-group/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-listener/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screen/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/hooks/use-navigator-buttons.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/hooks/use-navigator-screens.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/navigator-screens.d.ts +4 -2
- package/dist/types/navigator/navigator-screens/navigator-screens.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/types.d.ts +1 -1
- package/dist/types/navigator/navigator-screens/types.d.ts.map +1 -1
- package/dist/types/progress/index.d.ts.map +1 -1
- package/dist/types/select-card-checkbox/index.d.ts +3 -1
- package/dist/types/select-card-checkbox/index.d.ts.map +1 -1
- package/dist/types/select-card-checkbox-v2/index.d.ts +12 -0
- package/dist/types/select-card-checkbox-v2/index.d.ts.map +1 -0
- package/dist/types/select-items/index.d.ts +1 -1
- package/dist/types/select-items/index.d.ts.map +1 -1
- package/dist/types/setup-tailored-site-after-creation.d.ts +1 -1
- package/dist/types/setup-tailored-site-after-creation.d.ts.map +1 -1
- package/dist/types/step-container/index.d.ts +3 -4
- package/dist/types/step-container/index.d.ts.map +1 -1
- package/dist/types/step-container-v2/components/ContentRow/ContentRow.d.ts +9 -0
- package/dist/types/step-container-v2/components/ContentRow/ContentRow.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/ContentWrapper/ContentWrapper.d.ts +15 -0
- package/dist/types/step-container-v2/components/ContentWrapper/ContentWrapper.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/Heading/Heading.d.ts +11 -0
- package/dist/types/step-container-v2/components/Heading/Heading.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StepContainerV2/StepContainerV2.d.ts +7 -0
- package/dist/types/step-container-v2/components/StepContainerV2/StepContainerV2.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StepContainerV2/context.d.ts +12 -0
- package/dist/types/step-container-v2/components/StepContainerV2/context.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StepCounter/StepCounter.d.ts +7 -0
- package/dist/types/step-container-v2/components/StepCounter/StepCounter.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBar.d.ts +14 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBar.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.d.ts +5 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/TopBar/TopBar.d.ts +25 -0
- package/dist/types/step-container-v2/components/TopBar/TopBar.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/TopBar/TopBarRenderer.d.ts +6 -0
- package/dist/types/step-container-v2/components/TopBar/TopBarRenderer.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/BackButton/BackButton.d.ts +6 -0
- package/dist/types/step-container-v2/components/buttons/BackButton/BackButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/LinkButton/LinkButton.d.ts +4 -0
- package/dist/types/step-container-v2/components/buttons/LinkButton/LinkButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.d.ts +4 -0
- package/dist/types/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.d.ts +4 -0
- package/dist/types/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/SkipButton/SkipButton.d.ts +9 -0
- package/dist/types/step-container-v2/components/buttons/SkipButton/SkipButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/contexts/StepContainerV2Context.d.ts +10 -0
- package/dist/types/step-container-v2/contexts/StepContainerV2Context.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/decorateButtonWithTracksEventRecording.d.ts +8 -0
- package/dist/types/step-container-v2/helpers/decorateButtonWithTracksEventRecording.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/normalizeButtonProps.d.ts +5 -0
- package/dist/types/step-container-v2/helpers/normalizeButtonProps.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/wireframe-placeholder.d.ts +7 -0
- package/dist/types/step-container-v2/helpers/wireframe-placeholder.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/withStepContainerV2ContextDecorator.d.ts +2 -0
- package/dist/types/step-container-v2/helpers/withStepContainerV2ContextDecorator.d.ts.map +1 -0
- package/dist/types/step-container-v2/index.d.ts +22 -0
- package/dist/types/step-container-v2/index.d.ts.map +1 -0
- package/dist/types/step-container-v2/types.d.ts +4 -0
- package/dist/types/step-container-v2/types.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.d.ts +16 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.d.ts +9 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.d.ts +18 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.d.ts +6 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.d.ts +12 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.stories.d.ts +9 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.d.ts +10 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.d.ts +6 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.d.ts +20 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.d.ts +8 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.d.ts +13 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.stories.d.ts +9 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.stories.d.ts.map +1 -0
- package/dist/types/step-navigation-link/index.d.ts +1 -1
- package/dist/types/step-navigation-link/index.d.ts.map +1 -1
- package/dist/types/upload-and-set-site-logo.d.ts +1 -1
- package/dist/types/upload-and-set-site-logo.d.ts.map +1 -1
- package/dist/types/utils/contrastChecker.d.ts +0 -10
- package/dist/types/utils/contrastChecker.d.ts.map +1 -1
- package/dist/types/utils/domain-suggester.d.ts.map +1 -1
- package/dist/types/utils/flows.d.ts +37 -46
- package/dist/types/utils/flows.d.ts.map +1 -1
- package/dist/types/wpcom-request.d.ts +7 -0
- package/dist/types/wpcom-request.d.ts.map +1 -0
- package/jest.config.js +0 -1
- package/package.json +44 -23
- package/src/action-buttons/index.tsx +0 -40
- package/src/action-buttons/style.scss +4 -40
- package/src/cart/create-cart-manager-client.ts +1 -1
- package/src/cart/index.tsx +60 -103
- package/src/cart/test/index.ts +14 -14
- package/src/confetti/index.tsx +1 -1
- package/src/flow-progress/use-flow-progress.ts +1 -66
- package/src/hooks/test/index.ts +54 -0
- package/src/hooks/use-persisted-state.ts +85 -0
- package/src/hooray/index.tsx +1 -1
- package/src/index.ts +7 -12
- package/src/intent-screen/test/index.tsx +10 -7
- package/src/mshots-image/index.tsx +52 -21
- package/src/mshots-image/style.scss +1 -0
- package/src/navigator/navigator-buttons/index.tsx +1 -0
- package/src/navigator/navigator-header/index.tsx +1 -0
- package/src/navigator/navigator-screens/hooks/use-navigator-screens.tsx +5 -1
- package/src/navigator/navigator-screens/navigator-screens.tsx +17 -0
- package/src/navigator/navigator-screens/types.ts +1 -0
- package/src/select-card-checkbox/index.tsx +10 -4
- package/src/select-card-checkbox/style.scss +11 -14
- package/src/select-card-checkbox-v2/index.tsx +51 -0
- package/src/select-card-checkbox-v2/style.scss +25 -0
- package/src/select-card-checkbox-v2/test/index.test.tsx +49 -0
- package/src/select-items/index.tsx +10 -4
- package/src/select-items/style.scss +2 -1
- package/src/setup-tailored-site-after-creation.ts +16 -60
- package/src/step-container/index.tsx +21 -42
- package/src/step-container/style.scss +35 -77
- package/src/step-container-v2/README.md +235 -0
- package/src/step-container-v2/components/ContentRow/ContentRow.tsx +27 -0
- package/src/step-container-v2/components/ContentRow/style.scss +26 -0
- package/src/step-container-v2/components/ContentWrapper/ContentWrapper.tsx +41 -0
- package/src/step-container-v2/components/ContentWrapper/style.scss +70 -0
- package/src/step-container-v2/components/Heading/Heading.tsx +31 -0
- package/src/step-container-v2/components/Heading/style.scss +47 -0
- package/src/step-container-v2/components/StepContainerV2/StepContainerV2.tsx +55 -0
- package/src/step-container-v2/components/StepContainerV2/context.ts +25 -0
- package/src/step-container-v2/components/StepContainerV2/style.scss +21 -0
- package/src/step-container-v2/components/StepCounter/StepCounter.tsx +32 -0
- package/src/step-container-v2/components/StepCounter/style.scss +4 -0
- package/src/step-container-v2/components/StickyBottomBar/StickyBottomBar.tsx +46 -0
- package/src/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.tsx +41 -0
- package/src/step-container-v2/components/StickyBottomBar/style.scss +56 -0
- package/src/step-container-v2/components/TopBar/TopBar.tsx +116 -0
- package/src/step-container-v2/components/TopBar/TopBarRenderer.tsx +43 -0
- package/src/step-container-v2/components/TopBar/style.scss +75 -0
- package/src/step-container-v2/components/buttons/BackButton/BackButton.tsx +32 -0
- package/src/step-container-v2/components/buttons/BackButton/style.scss +16 -0
- package/src/step-container-v2/components/buttons/LinkButton/LinkButton.tsx +17 -0
- package/src/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
- package/src/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.tsx +17 -0
- package/src/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
- package/src/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.tsx +17 -0
- package/src/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
- package/src/step-container-v2/components/buttons/SkipButton/SkipButton.tsx +30 -0
- package/src/step-container-v2/contexts/StepContainerV2Context.ts +23 -0
- package/src/step-container-v2/helpers/decorateButtonWithTracksEventRecording.ts +28 -0
- package/src/step-container-v2/helpers/normalizeButtonProps.ts +14 -0
- package/src/step-container-v2/helpers/wireframe-placeholder.tsx +28 -0
- package/src/step-container-v2/helpers/withStepContainerV2ContextDecorator.tsx +16 -0
- package/src/step-container-v2/index.tsx +24 -0
- package/src/step-container-v2/types.ts +4 -0
- package/src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.tsx +122 -0
- package/src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.tsx +66 -0
- package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.tsx +51 -0
- package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.tsx +69 -0
- package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
- package/src/step-container-v2/wireframes/Loading/Loading.stories.tsx +27 -0
- package/src/step-container-v2/wireframes/Loading/Loading.tsx +52 -0
- package/src/step-container-v2/wireframes/Loading/style.scss +22 -0
- package/src/step-container-v2/wireframes/Loading/test/Loading.test.tsx +42 -0
- package/src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.tsx +21 -0
- package/src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.tsx +31 -0
- package/src/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
- package/src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.tsx +93 -0
- package/src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.tsx +93 -0
- package/src/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
- package/src/step-container-v2/wireframes/WideLayout/WideLayout.stories.tsx +83 -0
- package/src/step-container-v2/wireframes/WideLayout/WideLayout.tsx +44 -0
- package/src/step-navigation-link/index.tsx +3 -0
- package/src/step-navigation-link/style.scss +5 -3
- package/src/style-imports.d.ts +3 -0
- package/src/titles/styles.scss +2 -2
- package/src/upload-and-set-site-logo.ts +1 -1
- package/src/utils/contrastChecker.ts +0 -35
- package/src/utils/flows.ts +67 -123
- package/src/wpcom-request.ts +26 -0
- package/styles/mixins.scss +4 -4
- package/styles/variables.scss +2 -2
- package/tsconfig.json +1 -0
- package/dist/cjs/feature-icon/index.js +0 -19
- package/dist/cjs/feature-icon/index.js.map +0 -1
- package/dist/cjs/flow-progress/index.js +0 -14
- package/dist/cjs/flow-progress/index.js.map +0 -1
- package/dist/cjs/flow-progress/style.scss +0 -5
- package/dist/cjs/notice/index.js +0 -12
- package/dist/cjs/notice/index.js.map +0 -1
- package/dist/cjs/notice/style.scss +0 -19
- package/dist/cjs/select-card-radio/index.js +0 -21
- package/dist/cjs/select-card-radio/index.js.map +0 -1
- package/dist/cjs/select-card-radio/style.scss +0 -44
- package/dist/cjs/sensei-logo/index.js +0 -8
- package/dist/cjs/sensei-logo/index.js.map +0 -1
- package/dist/cjs/videopress-logo/index.js +0 -8
- package/dist/cjs/videopress-logo/index.js.map +0 -1
- package/dist/esm/feature-icon/index.js +0 -16
- package/dist/esm/feature-icon/index.js.map +0 -1
- package/dist/esm/flow-progress/index.js +0 -12
- package/dist/esm/flow-progress/index.js.map +0 -1
- package/dist/esm/flow-progress/style.scss +0 -5
- package/dist/esm/notice/index.js +0 -9
- package/dist/esm/notice/index.js.map +0 -1
- package/dist/esm/notice/style.scss +0 -19
- package/dist/esm/select-card-radio/index.js +0 -15
- package/dist/esm/select-card-radio/index.js.map +0 -1
- package/dist/esm/select-card-radio/style.scss +0 -44
- package/dist/esm/sensei-logo/index.js +0 -6
- package/dist/esm/sensei-logo/index.js.map +0 -1
- package/dist/esm/videopress-logo/index.js +0 -6
- package/dist/esm/videopress-logo/index.js.map +0 -1
- package/dist/types/feature-icon/index.d.ts +0 -9
- package/dist/types/feature-icon/index.d.ts.map +0 -1
- package/dist/types/flow-progress/index.d.ts +0 -9
- package/dist/types/flow-progress/index.d.ts.map +0 -1
- package/dist/types/notice/index.d.ts +0 -7
- package/dist/types/notice/index.d.ts.map +0 -1
- package/dist/types/select-card-radio/index.d.ts +0 -22
- package/dist/types/select-card-radio/index.d.ts.map +0 -1
- package/dist/types/sensei-logo/index.d.ts +0 -8
- package/dist/types/sensei-logo/index.d.ts.map +0 -1
- package/dist/types/videopress-logo/index.d.ts +0 -8
- package/dist/types/videopress-logo/index.d.ts.map +0 -1
- package/src/feature-icon/index.tsx +0 -102
- package/src/flow-progress/index.tsx +0 -22
- package/src/flow-progress/style.scss +0 -5
- package/src/notice/index.tsx +0 -16
- package/src/notice/style.scss +0 -19
- package/src/select-card-radio/index.tsx +0 -64
- package/src/select-card-radio/style.scss +0 -44
- package/src/select-card-radio/test/index.tsx +0 -50
- package/src/sensei-logo/index.tsx +0 -30
- package/src/videopress-logo/index.tsx +0 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimaryButton.js","sourceRoot":"","sources":["../../../../../../src/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAE,aAA0B,EAAG,EAAE;IAC7D,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,oBAAoB,CAAE,aAAa,EAAE;QAC/D,QAAQ,EAAE,EAAE,CAAE,MAAM,EAAE,oBAAoB,CAAE;QAC5C,SAAS,EAAE,mCAAmC;KAC9C,CAAE,CAAC;IAEJ,OAAO,KAAC,MAAM,IAAC,qBAAqB,QAAC,OAAO,EAAC,SAAS,KAAM,kBAAkB,GAAK,CAAC;AACrF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@wordpress/components';
|
|
3
|
+
import { useI18n } from '@wordpress/react-i18n';
|
|
4
|
+
import { normalizeButtonProps } from '../../../helpers/normalizeButtonProps';
|
|
5
|
+
import './style.scss';
|
|
6
|
+
export const SecondaryButton = (originalProps) => {
|
|
7
|
+
const { __ } = useI18n();
|
|
8
|
+
const secondaryButtonProps = normalizeButtonProps(originalProps, {
|
|
9
|
+
children: __('Secondary', __i18n_text_domain__),
|
|
10
|
+
className: 'step-container-v2__secondary-button',
|
|
11
|
+
});
|
|
12
|
+
return _jsx(Button, { __next40pxDefaultSize: true, variant: "secondary", ...secondaryButtonProps });
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=SecondaryButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecondaryButton.js","sourceRoot":"","sources":["../../../../../../src/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAG7E,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAE,aAA0B,EAAG,EAAE;IAC/D,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;IAEzB,MAAM,oBAAoB,GAAG,oBAAoB,CAAE,aAAa,EAAE;QACjE,QAAQ,EAAE,EAAE,CAAE,WAAW,EAAE,oBAAoB,CAAE;QACjD,SAAS,EAAE,qCAAqC;KAChD,CAAE,CAAC;IAEJ,OAAO,KAAC,MAAM,IAAC,qBAAqB,QAAC,OAAO,EAAC,WAAW,KAAM,oBAAoB,GAAK,CAAC;AACzF,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useI18n } from '@wordpress/react-i18n';
|
|
3
|
+
import { useStepContainerV2Context } from '../../../contexts/StepContainerV2Context';
|
|
4
|
+
import { decorateButtonWithTracksEventRecording } from '../../../helpers/decorateButtonWithTracksEventRecording';
|
|
5
|
+
import { normalizeButtonProps } from '../../../helpers/normalizeButtonProps';
|
|
6
|
+
import { LinkButton } from '../LinkButton/LinkButton';
|
|
7
|
+
/**
|
|
8
|
+
* Do NOT use this button if you don't intend to skip the step.
|
|
9
|
+
*
|
|
10
|
+
* This button is visually identical to {@link LinkButton}.
|
|
11
|
+
* The difference between them is that this one fires a Tracks event when clicked.
|
|
12
|
+
*/
|
|
13
|
+
export const SkipButton = (originalProps) => {
|
|
14
|
+
const { __ } = useI18n();
|
|
15
|
+
const stepContext = useStepContainerV2Context();
|
|
16
|
+
const skipButtonProps = normalizeButtonProps(originalProps, {
|
|
17
|
+
children: __('Skip', __i18n_text_domain__),
|
|
18
|
+
});
|
|
19
|
+
return (_jsx(LinkButton, { ...decorateButtonWithTracksEventRecording(skipButtonProps, {
|
|
20
|
+
tracksEventName: 'calypso_signup_skip_step',
|
|
21
|
+
stepContext,
|
|
22
|
+
}) }));
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=SkipButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkipButton.js","sourceRoot":"","sources":["../../../../../../src/step-container-v2/components/buttons/SkipButton/SkipButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAE,aAA0B,EAAG,EAAE;IAC1D,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,yBAAyB,EAAE,CAAC;IAEhD,MAAM,eAAe,GAAG,oBAAoB,CAAE,aAAa,EAAE;QAC5D,QAAQ,EAAE,EAAE,CAAE,MAAM,EAAE,oBAAoB,CAAE;KAC5C,CAAE,CAAC;IAEJ,OAAO,CACN,KAAC,UAAU,OACL,sCAAsC,CAAE,eAAe,EAAE;YAC7D,eAAe,EAAE,0BAA0B;YAC3C,WAAW;SACX,CAAE,GACF,CACF,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
const defaultContextValue = {
|
|
3
|
+
flowName: '',
|
|
4
|
+
stepName: '',
|
|
5
|
+
recordTracksEvent: () => { },
|
|
6
|
+
logo: null,
|
|
7
|
+
};
|
|
8
|
+
const StepContainerV2Context = createContext(defaultContextValue);
|
|
9
|
+
export const StepContainerV2Provider = StepContainerV2Context.Provider;
|
|
10
|
+
export const useStepContainerV2Context = () => {
|
|
11
|
+
return useContext(StepContainerV2Context);
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=StepContainerV2Context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepContainerV2Context.js","sourceRoot":"","sources":["../../../../src/step-container-v2/contexts/StepContainerV2Context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AASlE,MAAM,mBAAmB,GAA+B;IACvD,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC3B,IAAI,EAAE,IAAI;CACV,CAAC;AAEF,MAAM,sBAAsB,GAAG,aAAa,CAAgC,mBAAmB,CAAE,CAAC;AAElG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAC,QAAQ,CAAC;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC7C,OAAO,UAAU,CAAE,sBAAsB,CAAE,CAAC;AAC7C,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Onboard } from '@automattic/data-stores';
|
|
2
|
+
import { select } from '@wordpress/data';
|
|
3
|
+
export const decorateButtonWithTracksEventRecording = ({ onClick, ...props }, { tracksEventName, stepContext, }) => {
|
|
4
|
+
const onClickHandler = (event) => {
|
|
5
|
+
onClick?.(event);
|
|
6
|
+
stepContext?.recordTracksEvent?.(tracksEventName, {
|
|
7
|
+
flow: stepContext?.flowName,
|
|
8
|
+
step: stepContext?.stepName,
|
|
9
|
+
intent: select(Onboard.register()).getIntent(),
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
return { ...props, onClick: onClickHandler };
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=decorateButtonWithTracksEventRecording.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorateButtonWithTracksEventRecording.js","sourceRoot":"","sources":["../../../../src/step-container-v2/helpers/decorateButtonWithTracksEventRecording.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAiB,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAIzC,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACrD,EAAE,OAAO,EAAE,GAAG,KAAK,EAAmC,EACtD,EACC,eAAe,EACf,WAAW,GAC2D,EACrC,EAAE;IACpC,MAAM,cAAc,GAAG,CACtB,KACkD,EACjD,EAAE;QACH,OAAO,EAAE,CAAE,KAAK,CAAE,CAAC;QAEnB,WAAW,EAAE,iBAAiB,EAAE,CAAE,eAAe,EAAE;YAClD,IAAI,EAAE,WAAW,EAAE,QAAQ;YAC3B,IAAI,EAAE,WAAW,EAAE,QAAQ;YAC3B,MAAM,EAAI,MAAM,CAAE,OAAO,CAAC,QAAQ,EAAE,CAAgC,CAAC,SAAS,EAAE;SAChF,CAAE,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
export const normalizeButtonProps = (button, standardProps) => ({
|
|
3
|
+
...standardProps,
|
|
4
|
+
...button,
|
|
5
|
+
children: button.children ?? standardProps.children,
|
|
6
|
+
className: clsx(standardProps.className, button.className),
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=normalizeButtonProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeButtonProps.js","sourceRoot":"","sources":["../../../../src/step-container-v2/helpers/normalizeButtonProps.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CACnC,MAAmB,EACnB,aAAgB,EACZ,EAAE,CAAC,CAAE;IACT,GAAG,aAAa;IAChB,GAAG,MAAM;IACT,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,aAAa,CAAC,QAAQ;IACnD,SAAS,EAAE,IAAI,CAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAE;CAC5D,CAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function WireframePlaceholder({ height, children, className, style: additionalStyle, }) {
|
|
3
|
+
const style = {
|
|
4
|
+
background: '#ff80ff',
|
|
5
|
+
borderRadius: 10,
|
|
6
|
+
display: 'flex',
|
|
7
|
+
flexDirection: 'column',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
...(height && { height }),
|
|
11
|
+
...additionalStyle,
|
|
12
|
+
};
|
|
13
|
+
return (_jsx("div", { className: className, style: style, children: children }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=wireframe-placeholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireframe-placeholder.js","sourceRoot":"","sources":["../../../../src/step-container-v2/helpers/wireframe-placeholder.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,oBAAoB,CAAE,EACrC,MAAM,EACN,QAAQ,EACR,SAAS,EACT,KAAK,EAAE,eAAe,GAMtB;IACA,MAAM,KAAK,GAAG;QACb,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,EAAE;QAChB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,GAAG,CAAE,MAAM,IAAI,EAAE,MAAM,EAAE,CAAE;QAC3B,GAAG,eAAe;KACT,CAAC;IAEX,OAAO,CACN,cAAK,SAAS,EAAG,SAAS,EAAG,KAAK,EAAG,KAAK,YACvC,QAAQ,GACL,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StepContainerV2Provider } from '..';
|
|
3
|
+
export const withStepContainerV2ContextDecorator = (Story) => {
|
|
4
|
+
return (_jsx(StepContainerV2Provider, { value: {
|
|
5
|
+
flowName: 'flowName',
|
|
6
|
+
stepName: 'stepName',
|
|
7
|
+
recordTracksEvent: () => { },
|
|
8
|
+
logo: null,
|
|
9
|
+
}, children: _jsx(Story, {}) }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=withStepContainerV2ContextDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withStepContainerV2ContextDecorator.js","sourceRoot":"","sources":["../../../../src/step-container-v2/helpers/withStepContainerV2ContextDecorator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,IAAI,CAAC;AAE7C,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAE,KAA0B,EAAG,EAAE;IACnF,OAAO,CACN,KAAC,uBAAuB,IACvB,KAAK,EAAG;YACP,QAAQ,EAAE,UAAU;YACpB,QAAQ,EAAE,UAAU;YACpB,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;YAC3B,IAAI,EAAE,IAAI;SACV,YAED,KAAC,KAAK,KAAG,GACgB,CAC1B,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NEVER export StepContainerV2 directly.
|
|
3
|
+
*
|
|
4
|
+
* Export only components and wireframes.
|
|
5
|
+
*/
|
|
6
|
+
export { StepContainerV2Provider } from './contexts/StepContainerV2Context';
|
|
7
|
+
export { BackButton } from './components/buttons/BackButton/BackButton';
|
|
8
|
+
export { PrimaryButton } from './components/buttons/PrimaryButton/PrimaryButton';
|
|
9
|
+
export { SecondaryButton } from './components/buttons/SecondaryButton/SecondaryButton';
|
|
10
|
+
export { SkipButton } from './components/buttons/SkipButton/SkipButton';
|
|
11
|
+
export { LinkButton } from './components/buttons/LinkButton/LinkButton';
|
|
12
|
+
export { Heading } from './components/Heading/Heading';
|
|
13
|
+
export { StepCounter } from './components/StepCounter/StepCounter';
|
|
14
|
+
export { TopBar } from './components/TopBar/TopBar';
|
|
15
|
+
export { StickyBottomBar } from './components/StickyBottomBar/StickyBottomBar';
|
|
16
|
+
export { CenteredColumnLayout } from './wireframes/CenteredColumnLayout/CenteredColumnLayout';
|
|
17
|
+
export { TwoColumnLayout } from './wireframes/TwoColumnLayout/TwoColumnLayout';
|
|
18
|
+
export { WideLayout } from './wireframes/WideLayout/WideLayout';
|
|
19
|
+
export { Loading } from './wireframes/Loading/Loading';
|
|
20
|
+
export { PlaygroundLayout } from './wireframes/PlaygroundLayout/PlaygroundLayout';
|
|
21
|
+
export { FixedColumnOnTheLeftLayout } from './wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/step-container-v2/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oEAAoE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/step-container-v2/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ContentRow } from '../../components/ContentRow/ContentRow';
|
|
3
|
+
import { ContentWrapper } from '../../components/ContentWrapper/ContentWrapper';
|
|
4
|
+
import { StepContainerV2 } from '../../components/StepContainerV2/StepContainerV2';
|
|
5
|
+
import { StickyBottomBarRenderer } from '../../components/StickyBottomBar/StickyBottomBarRenderer';
|
|
6
|
+
import { isTopBar } from '../../components/TopBar/TopBar';
|
|
7
|
+
import { renderTopBar, TopBarRenderer } from '../../components/TopBar/TopBarRenderer';
|
|
8
|
+
export const CenteredColumnLayout = ({ columnWidth, topBar, heading, headingColumnWidth = 6, className, children, stickyBottomBar, verticalAlign, noGap, }) => {
|
|
9
|
+
return (_jsx(StepContainerV2, { initialTopBarHeight:
|
|
10
|
+
// Calculate the top bar height on the server side to avoid layout shifts.
|
|
11
|
+
typeof window === 'undefined' &&
|
|
12
|
+
isTopBar(renderTopBar(topBar, {
|
|
13
|
+
isLargeViewport: false,
|
|
14
|
+
isSmallViewport: false,
|
|
15
|
+
}))
|
|
16
|
+
? 'calc( var( --step-container-v2-top-bar-content-height ) + 2 * var( --step-container-v2-top-bar-padding ) )'
|
|
17
|
+
: '0px', children: (context) => {
|
|
18
|
+
const content = typeof children === 'function' ? children(context) : children;
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsx(TopBarRenderer, { topBar: topBar }), _jsxs(ContentWrapper, { centerAligned: verticalAlign === 'center', noGap: noGap, children: [heading && _jsx(ContentRow, { columns: headingColumnWidth, children: heading }), _jsx(ContentRow, { columns: columnWidth, className: className, children: content })] }), _jsx(StickyBottomBarRenderer, { stickyBottomBar: stickyBottomBar })] }));
|
|
20
|
+
} }));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=CenteredColumnLayout.js.map
|
package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CenteredColumnLayout.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AActF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAE,EACrC,WAAW,EACX,MAAM,EACN,OAAO,EACP,kBAAkB,GAAG,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,eAAe,EACf,aAAa,EACb,KAAK,GACsB,EAAG,EAAE;IAChC,OAAO,CACN,KAAC,eAAe,IACf,mBAAmB;QAClB,0EAA0E;QAC1E,OAAO,MAAM,KAAK,WAAW;YAC7B,QAAQ,CACP,YAAY,CAAE,MAAM,EAAE;gBACrB,eAAe,EAAE,KAAK;gBACtB,eAAe,EAAE,KAAK;aACtB,CAAE,CACH;YACA,CAAC,CAAC,4GAA4G;YAC9G,CAAC,CAAC,KAAK,YAGP,CAAE,OAAO,EAAG,EAAE;YACf,MAAM,OAAO,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAE,OAAO,CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YAEhF,OAAO,CACN,8BACC,KAAC,cAAc,IAAC,MAAM,EAAG,MAAM,GAAK,EACpC,MAAC,cAAc,IAAC,aAAa,EAAG,aAAa,KAAK,QAAQ,EAAG,KAAK,EAAG,KAAK,aACvE,OAAO,IAAI,KAAC,UAAU,IAAC,OAAO,EAAG,kBAAkB,YAAK,OAAO,GAAe,EAChF,KAAC,UAAU,IAAC,OAAO,EAAG,WAAW,EAAG,SAAS,EAAG,SAAS,YACtD,OAAO,GACG,IACG,EACjB,KAAC,uBAAuB,IAAC,eAAe,EAAG,eAAe,GAAK,IAC7D,CACH,CAAC;QACH,CAAC,GACgB,CAClB,CAAC;AACH,CAAC,CAAC"}
|
package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
3
|
+
import { Heading, TopBar, BackButton, PrimaryButton, StickyBottomBar, SkipButton } from '../..';
|
|
4
|
+
import { WireframePlaceholder } from '../../helpers/wireframe-placeholder';
|
|
5
|
+
import { withStepContainerV2ContextDecorator } from '../../helpers/withStepContainerV2ContextDecorator';
|
|
6
|
+
import { CenteredColumnLayout } from './CenteredColumnLayout';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Onboarding/StepWireframes/CenteredColumnLayout',
|
|
9
|
+
component: CenteredColumnLayout,
|
|
10
|
+
decorators: [withStepContainerV2ContextDecorator],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const FourColumnsCenteredLayout = () => {
|
|
14
|
+
const backButton = _jsx(BackButton, {});
|
|
15
|
+
const nextButton = _jsx(PrimaryButton, {});
|
|
16
|
+
const skipButton = _jsx(SkipButton, {});
|
|
17
|
+
return (_jsx(CenteredColumnLayout, { columnWidth: 4, topBar: _jsx(TopBar, { leftElement: backButton, rightElement: skipButton }), heading: _jsx(Heading, { text: "Four Columns Centered Layout", subText: createInterpolateElement('An example of the <code>CenteredColumnLayout</code> wireframe layout.', {
|
|
18
|
+
code: _jsx("code", {}),
|
|
19
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: nextButton }), children: _jsx(WireframePlaceholder, { height: 370, children: "Content" }) }));
|
|
20
|
+
};
|
|
21
|
+
export const SixColumnsCenteredLayout = () => {
|
|
22
|
+
const backButton = _jsx(BackButton, {});
|
|
23
|
+
const nextButton = _jsx(PrimaryButton, {});
|
|
24
|
+
const skipButton = _jsx(SkipButton, {});
|
|
25
|
+
return (_jsx(CenteredColumnLayout, { columnWidth: 6, topBar: _jsx(TopBar, { leftElement: backButton, rightElement: skipButton }), heading: _jsx(Heading, { text: "Six Columns Centered Layout", subText: createInterpolateElement('An example of the <code>CenteredColumnLayout</code> wireframe layout.', {
|
|
26
|
+
code: _jsx("code", {}),
|
|
27
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: nextButton }), children: _jsx(WireframePlaceholder, { height: 500, children: "Content" }) }));
|
|
28
|
+
};
|
|
29
|
+
export const EightColumnsCenteredLayout = () => {
|
|
30
|
+
const backButton = _jsx(BackButton, {});
|
|
31
|
+
const nextButton = _jsx(PrimaryButton, {});
|
|
32
|
+
const skipButton = _jsx(SkipButton, {});
|
|
33
|
+
return (_jsx(CenteredColumnLayout, { columnWidth: 8, topBar: _jsx(TopBar, { leftElement: backButton, rightElement: skipButton }), heading: _jsx(Heading, { text: "Six Columns Centered Layout", subText: createInterpolateElement('An example of the <code>CenteredColumnLayout</code> wireframe layout.', {
|
|
34
|
+
code: _jsx("code", {}),
|
|
35
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: nextButton }), children: _jsx(WireframePlaceholder, { height: 500, children: "Content" }) }));
|
|
36
|
+
};
|
|
37
|
+
export const TenColumnsCenteredLayout = () => {
|
|
38
|
+
const backButton = _jsx(BackButton, {});
|
|
39
|
+
const nextButton = _jsx(PrimaryButton, {});
|
|
40
|
+
const skipButton = _jsx(SkipButton, {});
|
|
41
|
+
return (_jsx(CenteredColumnLayout, { columnWidth: 10, topBar: _jsx(TopBar, { leftElement: backButton, rightElement: skipButton }), heading: _jsx(Heading, { text: "Eight Columns Centered Layout", subText: createInterpolateElement('An example of the <code>CenteredColumnLayout</code> wireframe layout.', {
|
|
42
|
+
code: _jsx("code", {}),
|
|
43
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: nextButton }), children: _jsx(WireframePlaceholder, { height: 500, children: "Content" }) }));
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=CenteredColumnLayout.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CenteredColumnLayout.stories.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,MAAM,IAAI,GAAwC;IACjD,KAAK,EAAE,gDAAgD;IACvD,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE,CAAE,mCAAmC,CAAE;CACnD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC7C,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAClC,MAAM,UAAU,GAAG,KAAC,aAAa,KAAG,CAAC;IACrC,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAElC,OAAO,CACN,KAAC,oBAAoB,IACpB,WAAW,EAAG,CAAC,EACf,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,UAAU,EAAG,YAAY,EAAG,UAAU,GAAK,EAC1E,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,8BAA8B,EACnC,OAAO,EAAG,wBAAwB,CACjC,uEAAuE,EACvE;gBACC,IAAI,EAAE,gBAAQ;aACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,UAAU,GAAK,YAEjE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,wBAAiC,GAC7C,CACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC5C,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAClC,MAAM,UAAU,GAAG,KAAC,aAAa,KAAG,CAAC;IACrC,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAElC,OAAO,CACN,KAAC,oBAAoB,IACpB,WAAW,EAAG,CAAC,EACf,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,UAAU,EAAG,YAAY,EAAG,UAAU,GAAK,EAC1E,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,6BAA6B,EAClC,OAAO,EAAG,wBAAwB,CACjC,uEAAuE,EACvE;gBACC,IAAI,EAAE,gBAAQ;aACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,UAAU,GAAK,YAEjE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,wBAAiC,GAC7C,CACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC9C,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAClC,MAAM,UAAU,GAAG,KAAC,aAAa,KAAG,CAAC;IACrC,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAElC,OAAO,CACN,KAAC,oBAAoB,IACpB,WAAW,EAAG,CAAC,EACf,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,UAAU,EAAG,YAAY,EAAG,UAAU,GAAK,EAC1E,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,6BAA6B,EAClC,OAAO,EAAG,wBAAwB,CACjC,uEAAuE,EACvE;gBACC,IAAI,EAAE,gBAAQ;aACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,UAAU,GAAK,YAEjE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,wBAAiC,GAC7C,CACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC5C,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAClC,MAAM,UAAU,GAAG,KAAC,aAAa,KAAG,CAAC;IACrC,MAAM,UAAU,GAAG,KAAC,UAAU,KAAG,CAAC;IAElC,OAAO,CACN,KAAC,oBAAoB,IACpB,WAAW,EAAG,EAAE,EAChB,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,UAAU,EAAG,YAAY,EAAG,UAAU,GAAK,EAC1E,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,+BAA+B,EACpC,OAAO,EAAG,wBAAwB,CACjC,uEAAuE,EACvE;gBACC,IAAI,EAAE,gBAAQ;aACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,UAAU,GAAK,YAEjE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,wBAAiC,GAC7C,CACvB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ContentRow } from '../../components/ContentRow/ContentRow';
|
|
3
|
+
import { ContentWrapper } from '../../components/ContentWrapper/ContentWrapper';
|
|
4
|
+
import { Heading } from '../../components/Heading/Heading';
|
|
5
|
+
import { StepContainerV2 } from '../../components/StepContainerV2/StepContainerV2';
|
|
6
|
+
import { StickyBottomBarRenderer } from '../../components/StickyBottomBar/StickyBottomBarRenderer';
|
|
7
|
+
import { TopBarRenderer } from '../../components/TopBar/TopBarRenderer';
|
|
8
|
+
import './style.scss';
|
|
9
|
+
const FixedColumnOnTheLeftLayout = ({ fixedColumnWidth, children, topBar, heading, footer, stickyBottomBar, }) => {
|
|
10
|
+
return (_jsx(StepContainerV2, { children: (context) => {
|
|
11
|
+
const [fixedColumn, secondColumn] = children.map((child) => {
|
|
12
|
+
if (typeof child === 'function') {
|
|
13
|
+
return child(context);
|
|
14
|
+
}
|
|
15
|
+
return child;
|
|
16
|
+
});
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(TopBarRenderer, { topBar: topBar }), _jsxs(ContentWrapper, { axisDirection: context.isLargeViewport ? 'horizontal' : 'vertical', noTopPadding: context.isLargeViewport, children: [_jsxs(ContentRow, { columns: context.isLargeViewport ? fixedColumnWidth : undefined, stretched: true, className: "step-container-v2--fixed-column-on-the-left-layout__fixed-column", children: [heading, fixedColumn, footer] }), _jsx(ContentRow, { stretched: true, children: secondColumn })] }), _jsx(StickyBottomBarRenderer, { stickyBottomBar: stickyBottomBar })] }));
|
|
18
|
+
} }));
|
|
19
|
+
};
|
|
20
|
+
// eslint-disable-next-line react/display-name
|
|
21
|
+
FixedColumnOnTheLeftLayout.Heading = (props) => (_jsx(Heading, { ...props, align: "left", size: "small" }));
|
|
22
|
+
export { FixedColumnOnTheLeftLayout };
|
|
23
|
+
//# sourceMappingURL=FixedColumnOnTheLeftLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixedColumnOnTheLeftLayout.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,cAAc,CAAC;AAWtB,MAAM,0BAA0B,GAAG,CAAE,EACpC,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,eAAe,GACkB,EAAG,EAAE;IACtC,OAAO,CACN,KAAC,eAAe,cACb,CAAE,OAAO,EAAG,EAAE;YACf,MAAM,CAAE,WAAW,EAAE,YAAY,CAAE,GAAG,QAAQ,CAAC,GAAG,CAAE,CAAE,KAAK,EAAG,EAAE;gBAC/D,IAAK,OAAO,KAAK,KAAK,UAAU,EAAG,CAAC;oBACnC,OAAO,KAAK,CAAE,OAAO,CAAE,CAAC;gBACzB,CAAC;gBACD,OAAO,KAAK,CAAC;YACd,CAAC,CAAE,CAAC;YAEJ,OAAO,CACN,8BACC,KAAC,cAAc,IAAC,MAAM,EAAG,MAAM,GAAK,EACpC,MAAC,cAAc,IACd,aAAa,EAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EACnE,YAAY,EAAG,OAAO,CAAC,eAAe,aAEtC,MAAC,UAAU,IACV,OAAO,EAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EAChE,SAAS,QACT,SAAS,EAAC,kEAAkE,aAE1E,OAAO,EACP,WAAW,EACX,MAAM,IACI,EACb,KAAC,UAAU,IAAC,SAAS,kBAAG,YAAY,GAAe,IACnC,EACjB,KAAC,uBAAuB,IAAC,eAAe,EAAG,eAAe,GAAK,IAC7D,CACH,CAAC;QACH,CAAC,GACgB,CAClB,CAAC;AACH,CAAC,CAAC;AAEF,8CAA8C;AAC9C,0BAA0B,CAAC,OAAO,GAAG,CAAE,KAAuC,EAAG,EAAE,CAAC,CACnF,KAAC,OAAO,OAAM,KAAK,EAAG,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,GAAG,CAClD,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
3
|
+
import { TopBar, BackButton, PrimaryButton, StickyBottomBar, LinkButton } from '../..';
|
|
4
|
+
import { WireframePlaceholder } from '../../helpers/wireframe-placeholder';
|
|
5
|
+
import { withStepContainerV2ContextDecorator } from '../../helpers/withStepContainerV2ContextDecorator';
|
|
6
|
+
import { FixedColumnOnTheLeftLayout } from './FixedColumnOnTheLeftLayout';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Onboarding/StepWireframes/FixedColumnOnTheLeftLayout',
|
|
9
|
+
component: FixedColumnOnTheLeftLayout,
|
|
10
|
+
decorators: [withStepContainerV2ContextDecorator],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const ThreeColumnsOnTheLeft = () => (_jsxs(FixedColumnOnTheLeftLayout, { fixedColumnWidth: 3, topBar: _jsx(TopBar, { leftElement: _jsx(BackButton, {}), rightElement: _jsxs("span", { children: ["Need help? ", _jsx(LinkButton, { children: "Contact us" })] }) }), heading: _jsx(FixedColumnOnTheLeftLayout.Heading, { text: "Fixed Column on the Left", subText: createInterpolateElement('An example of the <code>FixedColumnOnTheLeftLayout</code> wireframe layout.', {
|
|
14
|
+
code: _jsx("code", {}),
|
|
15
|
+
}) }), stickyBottomBar: (context) => {
|
|
16
|
+
if (context.isLargeViewport) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return _jsx(StickyBottomBar, { rightElement: _jsx(PrimaryButton, {}) });
|
|
20
|
+
}, children: [_jsx(WireframePlaceholder, { style: { flex: 1 }, children: "Sidebar" }), _jsx(WireframePlaceholder, { height: "100%", children: "Main" })] }));
|
|
21
|
+
//# sourceMappingURL=FixedColumnOnTheLeftLayout.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixedColumnOnTheLeftLayout.stories.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AACxG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,MAAM,IAAI,GAA8C;IACvD,KAAK,EAAE,sDAAsD;IAC7D,SAAS,EAAE,0BAA0B;IACrC,UAAU,EAAE,CAAE,mCAAmC,CAAE;CACnD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,CAC1C,MAAC,0BAA0B,IAC1B,gBAAgB,EAAG,CAAC,EACpB,MAAM,EACL,KAAC,MAAM,IACN,WAAW,EAAG,KAAC,UAAU,KAAG,EAC5B,YAAY,EACX,0CACY,KAAC,UAAU,6BAAwB,IACxC,GAEP,EAEH,OAAO,EACN,KAAC,0BAA0B,CAAC,OAAO,IAClC,IAAI,EAAC,0BAA0B,EAC/B,OAAO,EAAG,wBAAwB,CACjC,6EAA6E,EAC7E;YACC,IAAI,EAAE,gBAAQ;SACd,CACD,GACA,EAEH,eAAe,EAAG,CAAE,OAAO,EAAG,EAAE;QAC/B,IAAK,OAAO,CAAC,eAAe,EAAG,CAAC;YAC/B,OAAO,IAAI,CAAC;QACb,CAAC;QAED,OAAO,KAAC,eAAe,IAAC,YAAY,EAAG,KAAC,aAAa,KAAG,GAAK,CAAC;IAC/D,CAAC,aAED,KAAC,oBAAoB,IAAC,KAAK,EAAG,EAAE,IAAI,EAAE,CAAC,EAAE,wBAAiC,EAC1E,KAAC,oBAAoB,IAAC,MAAM,EAAC,MAAM,qBAA4B,IACnC,CAC7B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import '@wordpress/base-styles/breakpoints';
|
|
2
|
+
@import '@wordpress/base-styles/mixins';
|
|
3
|
+
|
|
4
|
+
.step-container-v2--fixed-column-on-the-left-layout {
|
|
5
|
+
&__fixed-column {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 2rem;
|
|
9
|
+
|
|
10
|
+
@include break-large {
|
|
11
|
+
padding-top: 1.5rem;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ProgressBar } from '@wordpress/components';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { Heading } from '../../components/Heading/Heading';
|
|
5
|
+
import { StepContainerV2 } from '../../components/StepContainerV2/StepContainerV2';
|
|
6
|
+
import { TopBar } from '../../components/TopBar/TopBar';
|
|
7
|
+
import './style.scss';
|
|
8
|
+
export const Loading = ({ title, progress, delay = 0, compactLogo }) => {
|
|
9
|
+
const [shouldDisplayTitle, setShouldDisplayTitle] = useState(delay === 0);
|
|
10
|
+
const [prevDelay, setPrevDelay] = useState(delay);
|
|
11
|
+
if (delay !== prevDelay) {
|
|
12
|
+
setPrevDelay(delay);
|
|
13
|
+
setShouldDisplayTitle(delay === 0);
|
|
14
|
+
}
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (delay === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const timeout = setTimeout(() => {
|
|
20
|
+
setShouldDisplayTitle(true);
|
|
21
|
+
}, delay);
|
|
22
|
+
return () => clearTimeout(timeout);
|
|
23
|
+
}, [delay]);
|
|
24
|
+
return (_jsxs(StepContainerV2, { children: [_jsx(TopBar, { compactLogo: compactLogo }), _jsxs("div", { className: "step-container-v2--loading", children: [title && shouldDisplayTitle && (_jsx("div", { className: "step-container-v2--loading__heading-wrapper", children: _jsx("div", { className: "step-container-v2--loading__heading", children: _jsx(Heading, { text: title, size: "small", align: "center" }) }) })), _jsx(ProgressBar, { className: "step-container-v2--loading__progress-bar", value: progress })] })] }));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=Loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loading.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/Loading/Loading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,MAAM,EAAoB,MAAM,gCAAgC,CAAC;AAE1E,OAAO,cAAc,CAAC;AAStB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,WAAW,EAAgB,EAAG,EAAE;IACtF,MAAM,CAAE,kBAAkB,EAAE,qBAAqB,CAAE,GAAG,QAAQ,CAAE,KAAK,KAAK,CAAC,CAAE,CAAC;IAE9E,MAAM,CAAE,SAAS,EAAE,YAAY,CAAE,GAAG,QAAQ,CAAE,KAAK,CAAE,CAAC;IACtD,IAAK,KAAK,KAAK,SAAS,EAAG,CAAC;QAC3B,YAAY,CAAE,KAAK,CAAE,CAAC;QACtB,qBAAqB,CAAE,KAAK,KAAK,CAAC,CAAE,CAAC;IACtC,CAAC;IAED,SAAS,CAAE,GAAG,EAAE;QACf,IAAK,KAAK,KAAK,CAAC,EAAG,CAAC;YACnB,OAAO;QACR,CAAC;QAED,MAAM,OAAO,GAAG,UAAU,CAAE,GAAG,EAAE;YAChC,qBAAqB,CAAE,IAAI,CAAE,CAAC;QAC/B,CAAC,EAAE,KAAK,CAAE,CAAC;QAEX,OAAO,GAAG,EAAE,CAAC,YAAY,CAAE,OAAO,CAAE,CAAC;IACtC,CAAC,EAAE,CAAE,KAAK,CAAE,CAAE,CAAC;IAEf,OAAO,CACN,MAAC,eAAe,eACf,KAAC,MAAM,IAAC,WAAW,EAAG,WAAW,GAAK,EACtC,eAAK,SAAS,EAAC,4BAA4B,aACxC,KAAK,IAAI,kBAAkB,IAAI,CAChC,cAAK,SAAS,EAAC,6CAA6C,YAC3D,cAAK,SAAS,EAAC,qCAAqC,YACnD,KAAC,OAAO,IAAC,IAAI,EAAG,KAAK,EAAG,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,QAAQ,GAAG,GACjD,GACD,CACN,EACD,KAAC,WAAW,IAAC,SAAS,EAAC,0CAA0C,EAAC,KAAK,EAAG,QAAQ,GAAK,IAClF,IACW,CAClB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { withStepContainerV2ContextDecorator } from '../../helpers/withStepContainerV2ContextDecorator';
|
|
3
|
+
import { Loading } from './Loading';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Onboarding/StepWireframes/Loading',
|
|
6
|
+
component: Loading,
|
|
7
|
+
decorators: [withStepContainerV2ContextDecorator],
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const Default = () => {
|
|
11
|
+
return _jsx(Loading, { title: "Loading", progress: 0.5 });
|
|
12
|
+
};
|
|
13
|
+
export const Indeterminate = () => {
|
|
14
|
+
return _jsx(Loading, { title: "Loading", progress: undefined });
|
|
15
|
+
};
|
|
16
|
+
export const NoTitle = () => {
|
|
17
|
+
return _jsx(Loading, { progress: undefined });
|
|
18
|
+
};
|
|
19
|
+
export const DelayedTitle = () => {
|
|
20
|
+
return _jsx(Loading, { title: "Reticulating splines", progress: undefined, delay: 2000 });
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Loading.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loading.stories.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/Loading/Loading.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AACxG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,IAAI,GAA2B;IACpC,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE,CAAE,mCAAmC,CAAE;CACnD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC3B,OAAO,KAAC,OAAO,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAG,GAAG,GAAK,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,OAAO,KAAC,OAAO,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAG,SAAS,GAAK,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC3B,OAAO,KAAC,OAAO,IAAC,QAAQ,EAAG,SAAS,GAAK,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAChC,OAAO,KAAC,OAAO,IAAC,KAAK,EAAC,sBAAsB,EAAC,QAAQ,EAAG,SAAS,EAAG,KAAK,EAAG,IAAI,GAAK,CAAC;AACvF,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.step-container-v2--loading {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
position: absolute;
|
|
7
|
+
inset: 0;
|
|
8
|
+
|
|
9
|
+
&__heading-wrapper {
|
|
10
|
+
position: absolute;
|
|
11
|
+
height: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__heading {
|
|
15
|
+
transform: translateY( -100% );
|
|
16
|
+
padding-bottom: 3rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__progress-bar {
|
|
20
|
+
--wp-components-color-foreground: var( --color-accent, #3858e9 );
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { StepContainerV2 } from '../../components/StepContainerV2/StepContainerV2';
|
|
4
|
+
import { TopBarRenderer } from '../../components/TopBar/TopBarRenderer';
|
|
5
|
+
import './style.scss';
|
|
6
|
+
export const PlaygroundLayout = ({ topBar, className, children }) => {
|
|
7
|
+
return (_jsx(StepContainerV2, { children: (context) => {
|
|
8
|
+
const content = typeof children === 'function' ? children(context) : children;
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(TopBarRenderer, { topBar: topBar }), _jsx("div", { className: clsx('step-container-v2__playground-layout', className), children: content })] }));
|
|
10
|
+
} }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=PlaygroundLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundLayout.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,OAAO,cAAc,CAAC;AAQtB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAyB,EAAG,EAAE;IAC5F,OAAO,CACN,KAAC,eAAe,cACb,CAAE,OAAO,EAAG,EAAE;YACf,MAAM,OAAO,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAE,OAAO,CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YAEhF,OAAO,CACN,8BACC,KAAC,cAAc,IAAC,MAAM,EAAG,MAAM,GAAK,EACpC,cAAK,SAAS,EAAG,IAAI,CAAE,sCAAsC,EAAE,SAAS,CAAE,YACvE,OAAO,GACJ,IACJ,CACH,CAAC;QACH,CAAC,GACgB,CAClB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TopBar, BackButton, PrimaryButton } from '../..';
|
|
3
|
+
import { WireframePlaceholder } from '../../helpers/wireframe-placeholder';
|
|
4
|
+
import { withStepContainerV2ContextDecorator } from '../../helpers/withStepContainerV2ContextDecorator';
|
|
5
|
+
import { PlaygroundLayout } from './PlaygroundLayout';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Onboarding/StepWireframes/PlaygroundLayout',
|
|
8
|
+
component: PlaygroundLayout,
|
|
9
|
+
decorators: [withStepContainerV2ContextDecorator],
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Default = () => (_jsx(PlaygroundLayout, { topBar: _jsx(TopBar, { leftElement: _jsx(BackButton, {}), rightElement: _jsx(PrimaryButton, {}) }), children: _jsx(WireframePlaceholder, { height: "100%", children: "Main" }) }));
|
|
13
|
+
//# sourceMappingURL=PlaygroundLayout.stories.js.map
|
package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundLayout.stories.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,IAAI,GAAoC;IAC7C,KAAK,EAAE,4CAA4C;IACnD,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,CAAE,mCAAmC,CAAE;CACnD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CAC5B,KAAC,gBAAgB,IAChB,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,KAAC,UAAU,KAAG,EAAG,YAAY,EAAG,KAAC,aAAa,KAAG,GAAK,YAErF,KAAC,oBAAoB,IAAC,MAAM,EAAC,MAAM,qBAA4B,GAC7C,CACnB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { Children, Fragment, isValidElement } from 'react';
|
|
4
|
+
import { ContentRow } from '../../components/ContentRow/ContentRow';
|
|
5
|
+
import { ContentWrapper } from '../../components/ContentWrapper/ContentWrapper';
|
|
6
|
+
import { StepContainerV2 } from '../../components/StepContainerV2/StepContainerV2';
|
|
7
|
+
import { StickyBottomBarRenderer } from '../../components/StickyBottomBar/StickyBottomBarRenderer';
|
|
8
|
+
import { TopBarRenderer } from '../../components/TopBar/TopBarRenderer';
|
|
9
|
+
import './style.scss';
|
|
10
|
+
export const TwoColumnLayout = ({ firstColumnWidth, secondColumnWidth, children, topBar, heading, className, footer, stickyBottomBar, noBottomPadding = false, columns = 10, isFullWidth = false, noInlinePadding = false, }) => {
|
|
11
|
+
const getChildFlexGrow = (index) => {
|
|
12
|
+
switch (index) {
|
|
13
|
+
case 0:
|
|
14
|
+
return firstColumnWidth;
|
|
15
|
+
case 1:
|
|
16
|
+
return secondColumnWidth;
|
|
17
|
+
default:
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (_jsx(StepContainerV2, { children: (context) => {
|
|
22
|
+
let childElements = typeof children === 'function' ? children(context) : children;
|
|
23
|
+
if (isValidElement(childElements) &&
|
|
24
|
+
childElements.type === Fragment) {
|
|
25
|
+
childElements = childElements.props.children;
|
|
26
|
+
}
|
|
27
|
+
childElements = Children.toArray(childElements)
|
|
28
|
+
.filter(isValidElement)
|
|
29
|
+
.map((child, index) => (_jsx("div", { style: { flex: getChildFlexGrow(index) }, children: child }, index)));
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx(TopBarRenderer, { topBar: topBar }), _jsxs(ContentWrapper, { noBottomPadding: noBottomPadding, noInlinePadding: noInlinePadding, isFullWidth: isFullWidth, children: [heading && _jsx(ContentRow, { columns: 6, children: heading }), _jsx(ContentRow, { columns: columns, className: clsx('step-container-v2__content-row--two-column-layout', className), children: childElements }), footer && _jsx(ContentRow, { columns: 6, children: footer })] }), _jsx(StickyBottomBarRenderer, { stickyBottomBar: stickyBottomBar })] }));
|
|
31
|
+
} }));
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=TwoColumnLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoColumnLayout.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAa,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,cAAc,CAAC;AAiBtB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAE,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,eAAe,EACf,eAAe,GAAG,KAAK,EACvB,OAAO,GAAG,EAAE,EACZ,WAAW,GAAG,KAAK,EACnB,eAAe,GAAG,KAAK,GACD,EAAG,EAAE;IAC3B,MAAM,gBAAgB,GAAG,CAAE,KAAa,EAAG,EAAE;QAC5C,QAAS,KAAK,EAAG,CAAC;YACjB,KAAK,CAAC;gBACL,OAAO,gBAAgB,CAAC;YACzB,KAAK,CAAC;gBACL,OAAO,iBAAiB,CAAC;YAC1B;gBACC,OAAO,SAAS,CAAC;QACnB,CAAC;IACF,CAAC,CAAC;IAEF,OAAO,CACN,KAAC,eAAe,cACb,CAAE,OAAO,EAAG,EAAE;YACf,IAAI,aAAa,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAE,OAAO,CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACpF,IACC,cAAc,CAA8B,aAAa,CAAE;gBAC3D,aAAa,CAAC,IAAI,KAAK,QAAQ,EAC9B,CAAC;gBACF,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC9C,CAAC;YAED,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAE,aAAa,CAAE;iBAC/C,MAAM,CAAE,cAAc,CAAE;iBACxB,GAAG,CAAE,CAAE,KAAK,EAAE,KAAK,EAAG,EAAE,CAAC,CACzB,cAAK,KAAK,EAAG,EAAE,IAAI,EAAE,gBAAgB,CAAE,KAAK,CAAE,EAAE,YAC7C,KAAK,IADiD,KAAK,CAExD,CACN,CAAE,CAAC;YAEL,OAAO,CACN,8BACC,KAAC,cAAc,IAAC,MAAM,EAAG,MAAM,GAAK,EACpC,MAAC,cAAc,IACd,eAAe,EAAG,eAAe,EACjC,eAAe,EAAG,eAAe,EACjC,WAAW,EAAG,WAAW,aAEvB,OAAO,IAAI,KAAC,UAAU,IAAC,OAAO,EAAG,CAAC,YAAK,OAAO,GAAe,EAC/D,KAAC,UAAU,IACV,OAAO,EAAG,OAAO,EACjB,SAAS,EAAG,IAAI,CAAE,mDAAmD,EAAE,SAAS,CAAE,YAEhF,aAAa,GACH,EACX,MAAM,IAAI,KAAC,UAAU,IAAC,OAAO,EAAG,CAAC,YAAK,MAAM,GAAe,IAC7C,EACjB,KAAC,uBAAuB,IAAC,eAAe,EAAG,eAAe,GAAK,IAC7D,CACH,CAAC;QACH,CAAC,GACgB,CAClB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
3
|
+
import { Heading, TopBar, BackButton, PrimaryButton, StickyBottomBar } from '../..';
|
|
4
|
+
import { WireframePlaceholder } from '../../helpers/wireframe-placeholder';
|
|
5
|
+
import { withStepContainerV2ContextDecorator } from '../../helpers/withStepContainerV2ContextDecorator';
|
|
6
|
+
import { TwoColumnLayout } from './TwoColumnLayout';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Onboarding/StepWireframes/TwoColumnLayout',
|
|
9
|
+
component: TwoColumnLayout,
|
|
10
|
+
decorators: [withStepContainerV2ContextDecorator],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const ThreeColumnsOnRightLayout = () => (_jsxs(TwoColumnLayout, { firstColumnWidth: 2, secondColumnWidth: 1, topBar: _jsx(TopBar, { leftElement: _jsx(BackButton, {}) }), heading: _jsx(Heading, { text: "Three Columns on the Right", subText: createInterpolateElement('An example of the <code>TwoColumnLayout</code> wireframe layout.', {
|
|
14
|
+
code: _jsx("code", {}),
|
|
15
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: _jsx(PrimaryButton, {}) }), children: [_jsx(WireframePlaceholder, { height: 616, children: "Main" }), _jsx(WireframePlaceholder, { height: 616, children: "Sidebar" })] }));
|
|
16
|
+
export const EqualTwoColumnLayout = () => (_jsxs(TwoColumnLayout, { firstColumnWidth: 1, secondColumnWidth: 1, topBar: _jsx(TopBar, { leftElement: _jsx(BackButton, {}) }), heading: _jsx(Heading, { text: "Two Equal Columns", subText: createInterpolateElement('An example of the <code>TwoColumnLayout</code> wireframe layout.', {
|
|
17
|
+
code: _jsx("code", {}),
|
|
18
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: _jsx(PrimaryButton, {}) }), children: [_jsx(WireframePlaceholder, { height: 616, children: "Content 1" }), _jsx(WireframePlaceholder, { height: 616, children: "Content 2" })] }));
|
|
19
|
+
export const WithRenderProp = () => (_jsx(TwoColumnLayout, { firstColumnWidth: 1, secondColumnWidth: 1, topBar: _jsx(TopBar, { leftElement: _jsx(BackButton, {}) }), heading: _jsx(Heading, { text: "Columns Rendered with Render Prop", subText: createInterpolateElement('An example of the <code>TwoColumnLayout</code> wireframe layout.', {
|
|
20
|
+
code: _jsx("code", {}),
|
|
21
|
+
}) }), stickyBottomBar: _jsx(StickyBottomBar, { rightElement: _jsx(PrimaryButton, {}) }), children: ({ isSmallViewport, isLargeViewport }) => (_jsxs(_Fragment, { children: [_jsxs(WireframePlaceholder, { height: 616, children: [_jsx("div", { children: "Content 1" }), _jsxs("pre", { children: ["is small viewport: ", isSmallViewport.toString()] })] }), _jsxs(WireframePlaceholder, { height: 616, children: [_jsx("div", { children: "Content 1" }), _jsxs("pre", { children: ["is large viewport: ", isLargeViewport.toString()] })] })] })) }));
|
|
22
|
+
//# sourceMappingURL=TwoColumnLayout.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwoColumnLayout.stories.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,mDAAmD,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,IAAI,GAAmC;IAC5C,KAAK,EAAE,2CAA2C;IAClD,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,CAAE,mCAAmC,CAAE;CACnD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE,CAAC,CAC9C,MAAC,eAAe,IACf,gBAAgB,EAAG,CAAC,EACpB,iBAAiB,EAAG,CAAC,EACrB,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,KAAC,UAAU,KAAG,GAAK,EAClD,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,4BAA4B,EACjC,OAAO,EAAG,wBAAwB,CACjC,kEAAkE,EAClE;YACC,IAAI,EAAE,gBAAQ;SACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,KAAC,aAAa,KAAG,GAAK,aAExE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,qBAA8B,EAChE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,wBAAiC,IAClD,CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CACzC,MAAC,eAAe,IACf,gBAAgB,EAAG,CAAC,EACpB,iBAAiB,EAAG,CAAC,EACrB,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,KAAC,UAAU,KAAG,GAAK,EAClD,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,mBAAmB,EACxB,OAAO,EAAG,wBAAwB,CACjC,kEAAkE,EAClE;YACC,IAAI,EAAE,gBAAQ;SACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,KAAC,aAAa,KAAG,GAAK,aAExE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,0BAAmC,EACrE,KAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,0BAAmC,IACpD,CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CACnC,KAAC,eAAe,IACf,gBAAgB,EAAG,CAAC,EACpB,iBAAiB,EAAG,CAAC,EACrB,MAAM,EAAG,KAAC,MAAM,IAAC,WAAW,EAAG,KAAC,UAAU,KAAG,GAAK,EAClD,OAAO,EACN,KAAC,OAAO,IACP,IAAI,EAAC,mCAAmC,EACxC,OAAO,EAAG,wBAAwB,CACjC,kEAAkE,EAClE;YACC,IAAI,EAAE,gBAAQ;SACd,CACD,GACA,EAEH,eAAe,EAAG,KAAC,eAAe,IAAC,YAAY,EAAG,KAAC,aAAa,KAAG,GAAK,YAEtE,CAAE,EAAE,eAAe,EAAE,eAAe,EAAE,EAAG,EAAE,CAAC,CAC7C,8BACC,MAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,aACjC,sCAAoB,EACpB,iDAA0B,eAAe,CAAC,QAAQ,EAAE,IAAQ,IACtC,EACvB,MAAC,oBAAoB,IAAC,MAAM,EAAG,GAAG,aACjC,sCAAoB,EACpB,iDAA0B,eAAe,CAAC,QAAQ,EAAE,IAAQ,IACtC,IACrB,CACH,GACgB,CAClB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@import '@wordpress/base-styles/breakpoints';
|
|
2
|
+
@import '@wordpress/base-styles/mixins';
|
|
3
|
+
|
|
4
|
+
.step-container-v2__content-row--two-column-layout {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: stretch;
|
|
8
|
+
gap: 3rem;
|
|
9
|
+
|
|
10
|
+
@include break-large {
|
|
11
|
+
gap: 4rem;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ContentRow } from '../../components/ContentRow/ContentRow';
|
|
3
|
+
import { ContentWrapper } from '../../components/ContentWrapper/ContentWrapper';
|
|
4
|
+
import { StepContainerV2 } from '../../components/StepContainerV2/StepContainerV2';
|
|
5
|
+
import { StickyBottomBarRenderer } from '../../components/StickyBottomBar/StickyBottomBarRenderer';
|
|
6
|
+
import { TopBarRenderer } from '../../components/TopBar/TopBarRenderer';
|
|
7
|
+
export const WideLayout = ({ topBar, heading, headingColumnWidth, className, children, stickyBottomBar, }) => {
|
|
8
|
+
return (_jsx(StepContainerV2, { children: (context) => {
|
|
9
|
+
const content = typeof children === 'function' ? children(context) : children;
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(TopBarRenderer, { topBar: topBar }), _jsxs(ContentWrapper, { children: [heading && _jsx(ContentRow, { columns: headingColumnWidth, children: heading }), _jsx(ContentRow, { className: className, children: content })] }), _jsx(StickyBottomBarRenderer, { stickyBottomBar: stickyBottomBar })] }));
|
|
11
|
+
} }));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=WideLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WideLayout.js","sourceRoot":"","sources":["../../../../../src/step-container-v2/wireframes/WideLayout/WideLayout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAWxE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAE,EAC3B,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,eAAe,GACE,EAAG,EAAE;IACtB,OAAO,CACN,KAAC,eAAe,cACb,CAAE,OAAO,EAAG,EAAE;YACf,MAAM,OAAO,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAE,OAAO,CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YAEhF,OAAO,CACN,8BACC,KAAC,cAAc,IAAC,MAAM,EAAG,MAAM,GAAK,EACpC,MAAC,cAAc,eACZ,OAAO,IAAI,KAAC,UAAU,IAAC,OAAO,EAAG,kBAAkB,YAAK,OAAO,GAAe,EAChF,KAAC,UAAU,IAAC,SAAS,EAAG,SAAS,YAAK,OAAO,GAAe,IAC5C,EACjB,KAAC,uBAAuB,IAAC,eAAe,EAAG,eAAe,GAAK,IAC7D,CACH,CAAC;QACH,CAAC,GACgB,CAClB,CAAC;AACH,CAAC,CAAC"}
|