diff --git a/modules/ppcp-settings/images/icon-arrow-left.svg b/modules/ppcp-settings/images/icon-arrow-left.svg new file mode 100644 index 000000000..eac560f6e --- /dev/null +++ b/modules/ppcp-settings/images/icon-arrow-left.svg @@ -0,0 +1,3 @@ + diff --git a/modules/ppcp-settings/resources/css/components/reusable-components/_button.scss b/modules/ppcp-settings/resources/css/components/reusable-components/_button.scss index 2f3445abe..dbf41614c 100644 --- a/modules/ppcp-settings/resources/css/components/reusable-components/_button.scss +++ b/modules/ppcp-settings/resources/css/components/reusable-components/_button.scss @@ -17,7 +17,7 @@ button.components-button, a.components-button { } &.is-primary { - @include font(13, 16, 500); + @include font(13, 20, 400); color:$color-white; } diff --git a/modules/ppcp-settings/resources/css/components/reusable-components/_navigation.scss b/modules/ppcp-settings/resources/css/components/reusable-components/_navigation.scss index e7099be46..09be265c1 100644 --- a/modules/ppcp-settings/resources/css/components/reusable-components/_navigation.scss +++ b/modules/ppcp-settings/resources/css/components/reusable-components/_navigation.scss @@ -1,19 +1,65 @@ -.ppcp-r-navigation { - display: flex; - justify-content: flex-end; - align-items: center; - gap: 12px; +.ppcp-r-navigation-container { + padding: 24px 48px; + margin: 0 -20px 48px -20px; + border-bottom: 1px solid $color-gray-300; + position: relative; - .is-primary { - min-width: 196px; - justify-content: center; + .ppcp-r-navigation { + display: flex; + justify-content: space-between; + align-items: center; + + button.is-primary { + padding: 10px 18px; + justify-content: center; + margin: 0 0 0 12px; + &:not(:disabled) { + background-color: $color-blueberry; + } + } + + button.is-tertiary { + @include font(16, 24, 600); + color: $color-gray-900; + &:hover{ + background-color:none; + background:none; + } + } + + &--left { + &__link { + @include font(20, 28, 400); + color: $color-gray-900; + text-decoration: none; + padding: 0 0 0 18px; + } + } + + &--right a{ + @include font(13, 20, 400); + color: $color-blueberry; + text-decoration: none; + } + + &--progress-bar { + position: absolute; + bottom: 0px; + left: 0; + background-color: $color-blueberry; + height: 4px; + } } - .is-tertiary { - padding: 10px 17px; + @media screen and (max-width: 480px) { + padding: 24px 35px; + .ppcp-r-navigation { + flex-wrap: wrap; + row-gap: 8px; - &:hover { - background-color: transparent; + &--progress-bar { + display: none; + } } } } diff --git a/modules/ppcp-settings/resources/css/components/screens/_onboarding-global.scss b/modules/ppcp-settings/resources/css/components/screens/_onboarding-global.scss new file mode 100644 index 000000000..22a2f1260 --- /dev/null +++ b/modules/ppcp-settings/resources/css/components/screens/_onboarding-global.scss @@ -0,0 +1,7 @@ +body:has(.ppcp-r-container--onboarding) { + background-color: #fff !important; + + .notice, .nav-tab-wrapper.woo-nav-tab-wrapper, .woocommerce-layout, .wrap.woocommerce h2:first-of-type { + display: none !important; + } +} diff --git a/modules/ppcp-settings/resources/css/components/screens/onboarding/_step-welcome.scss b/modules/ppcp-settings/resources/css/components/screens/onboarding/_step-welcome.scss index 34c9150d0..8ff8ab4ea 100644 --- a/modules/ppcp-settings/resources/css/components/screens/onboarding/_step-welcome.scss +++ b/modules/ppcp-settings/resources/css/components/screens/onboarding/_step-welcome.scss @@ -109,6 +109,11 @@ justify-content: center; padding: 8px; margin: 0 0 48px 0; + + @media screen and (max-width: 480px) { + flex-wrap: wrap; + row-gap: 8px; + } } &__col { @@ -128,26 +133,21 @@ border-right: 1px solid $color-gray-200; margin-right: 48px; } + + @media screen and (max-width: 480px) { + width: 100%; + text-align: center; + border-right: 0 !important; + padding-right: 0 !important; + + &:not(:last-child) { + padding-bottom: 8px; + } + } } .ppcp-r-page-welcome-mode-separator { margin: 8px 0 16px 0; } - - @media screen and (max-width: 480px) { - flex-wrap: wrap; - row-gap: 8px; - &__col { - width: 100%; - text-align: center; - - &:not(:last-child) { - border-bottom: 1px solid $color-gray-200; - border-right: 0; - padding-right: 0; - padding-bottom: 8px; - } - } - } } diff --git a/modules/ppcp-settings/resources/css/style.scss b/modules/ppcp-settings/resources/css/style.scss index 43685aaaa..0e5de694f 100644 --- a/modules/ppcp-settings/resources/css/style.scss +++ b/modules/ppcp-settings/resources/css/style.scss @@ -23,3 +23,4 @@ } @import './components/reusable-components/payment-method-modal'; +@import './components/screens/onboarding-global'; diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/Navigation.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/Navigation.js index 05950f13d..032d9c5c5 100644 --- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/Navigation.js +++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/Navigation.js @@ -1,13 +1,16 @@ import { Button } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; +import {useOnboardingStepBusiness, useOnboardingStepProducts} from "../../data"; +import data from "../../utils/data"; const Navigation = ( { setStep, setCompleted, currentStep, - stepperOrder, - canProceeedCallback = () => true, + stepperOrder } ) => { + const isLastStep = () => currentStep + 1 === stepperOrder.length; + const isFistStep = () => currentStep === 0; const navigateBy = ( stepDirection ) => { let newStep = currentStep + stepDirection; @@ -23,20 +26,77 @@ const Navigation = ( { } }; + const { products, toggleProduct } = useOnboardingStepProducts(); + const { isCasualSeller, setIsCasualSeller } = useOnboardingStepBusiness(); + + let navigationTitle = ''; + let disabled = false; + + switch ( currentStep ) { + case 1: + navigationTitle = __( 'Set up store type', 'woocommerce-paypal-payments' ); + disabled = isCasualSeller === null + break; + case 2: + navigationTitle = __( 'Select product types', 'woocommerce-paypal-payments' ); + disabled = products.length < 1 + break; + case 3: + navigationTitle = __( 'Choose checkout options', 'woocommerce-paypal-payments' ); + case 4: + navigationTitle = __( 'Connect your PayPal account', 'woocommerce-paypal-payments' ); + break; + default: + navigationTitle = __( 'PayPal Payments', 'woocommerce-paypal-payments' ); + } + return ( -