@automattic/jetpack-connection 0.29.8
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/.gitattributes +12 -0
- package/CHANGELOG.md +622 -0
- package/LICENSE.txt +357 -0
- package/README.md +284 -0
- package/SECURITY.md +38 -0
- package/components/connect-button/index.jsx +70 -0
- package/components/connect-screen/basic/index.jsx +104 -0
- package/components/connect-screen/basic/style.scss +46 -0
- package/components/connect-screen/basic/visual.jsx +109 -0
- package/components/connect-screen/layout/image-slider.jsx +37 -0
- package/components/connect-screen/layout/index.jsx +65 -0
- package/components/connect-screen/layout/style.scss +238 -0
- package/components/connect-screen/required-plan/index.jsx +127 -0
- package/components/connect-screen/required-plan/style.scss +109 -0
- package/components/connect-screen/required-plan/visual.jsx +151 -0
- package/components/connect-user/index.jsx +64 -0
- package/components/connected-plugins/index.jsx +67 -0
- package/components/connection-error-notice/index.jsx +110 -0
- package/components/connection-error-notice/styles.module.scss +97 -0
- package/components/disconnect-card/index.jsx +40 -0
- package/components/disconnect-card/style.scss +85 -0
- package/components/disconnect-dialog/images/disconnect-confirm.jpg +0 -0
- package/components/disconnect-dialog/images/disconnect-thanks.jpg +0 -0
- package/components/disconnect-dialog/index.jsx +409 -0
- package/components/disconnect-dialog/steps/step-disconnect-confirm.jsx +87 -0
- package/components/disconnect-dialog/steps/step-disconnect.jsx +206 -0
- package/components/disconnect-dialog/steps/step-survey.jsx +48 -0
- package/components/disconnect-dialog/steps/step-thank-you.jsx +54 -0
- package/components/disconnect-dialog/style.scss +218 -0
- package/components/disconnect-survey/_jp-connect_disconnect-survey-card.scss +60 -0
- package/components/disconnect-survey/index.jsx +181 -0
- package/components/disconnect-survey/survey-choice.jsx +43 -0
- package/components/in-place-connection/index.jsx +140 -0
- package/components/in-place-connection/style.scss +35 -0
- package/components/manage-connection-dialog/index.jsx +219 -0
- package/components/manage-connection-dialog/style.scss +106 -0
- package/components/use-connection/index.jsx +112 -0
- package/helpers/third-party-cookies-fallback.jsx +10 -0
- package/hooks/use-connection-error-notice/index.jsx +38 -0
- package/hooks/use-product-checkout-workflow/Readme.md +61 -0
- package/hooks/use-product-checkout-workflow/index.jsx +103 -0
- package/hooks/use-restore-connection/index.jsx +64 -0
- package/index.jsx +48 -0
- package/index.native.js +1 -0
- package/package.json +62 -0
- package/state/actions.jsx +166 -0
- package/state/controls.jsx +40 -0
- package/state/reducers.jsx +121 -0
- package/state/resolvers.jsx +32 -0
- package/state/selectors.jsx +35 -0
- package/state/store-holder.jsx +14 -0
- package/state/store-id.jsx +3 -0
- package/state/store.jsx +29 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ActionButton } from '@automattic/jetpack-components';
|
|
2
|
+
import { __ } from '@wordpress/i18n';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import useConnection from '../use-connection';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The RNA connection component.
|
|
9
|
+
*
|
|
10
|
+
* @param {object} props -- The properties.
|
|
11
|
+
* @returns {React.Component} The RNA connection component.
|
|
12
|
+
*/
|
|
13
|
+
const ConnectButton = props => {
|
|
14
|
+
const { apiRoot, apiNonce, connectLabel, registrationNonce, redirectUri, from, autoTrigger } =
|
|
15
|
+
props;
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
handleRegisterSite,
|
|
19
|
+
isRegistered,
|
|
20
|
+
isUserConnected,
|
|
21
|
+
siteIsRegistering,
|
|
22
|
+
userIsConnecting,
|
|
23
|
+
registrationError,
|
|
24
|
+
} = useConnection( {
|
|
25
|
+
registrationNonce,
|
|
26
|
+
redirectUri,
|
|
27
|
+
apiRoot,
|
|
28
|
+
apiNonce,
|
|
29
|
+
autoTrigger,
|
|
30
|
+
from,
|
|
31
|
+
} );
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
{ ( ! isRegistered || ! isUserConnected ) && (
|
|
36
|
+
<ActionButton
|
|
37
|
+
label={ connectLabel }
|
|
38
|
+
onClick={ handleRegisterSite }
|
|
39
|
+
displayError={ registrationError ? true : false }
|
|
40
|
+
isLoading={ siteIsRegistering || userIsConnecting }
|
|
41
|
+
/>
|
|
42
|
+
) }
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
ConnectButton.propTypes = {
|
|
48
|
+
/** The "Connect" button label. */
|
|
49
|
+
connectLabel: PropTypes.string,
|
|
50
|
+
/** API root URL. */
|
|
51
|
+
apiRoot: PropTypes.string.isRequired,
|
|
52
|
+
/** API Nonce. */
|
|
53
|
+
apiNonce: PropTypes.string.isRequired,
|
|
54
|
+
/** Where the connection request is coming from. */
|
|
55
|
+
from: PropTypes.string,
|
|
56
|
+
/** The redirect admin URI. */
|
|
57
|
+
redirectUri: PropTypes.string.isRequired,
|
|
58
|
+
/** Registration nonce. */
|
|
59
|
+
registrationNonce: PropTypes.string.isRequired,
|
|
60
|
+
/** Whether to initiate the connection process automatically upon rendering the component. */
|
|
61
|
+
autoTrigger: PropTypes.bool,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
ConnectButton.defaultProps = {
|
|
65
|
+
connectLabel: __( 'Connect', 'jetpack' ),
|
|
66
|
+
redirectUri: null,
|
|
67
|
+
autoTrigger: false,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default ConnectButton;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { __ } from '@wordpress/i18n';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import useConnection from '../../use-connection';
|
|
5
|
+
import ConnectScreenVisual from './visual';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The Connection Screen component.
|
|
9
|
+
*
|
|
10
|
+
* @param {object} props -- The properties.
|
|
11
|
+
* @param {string?} props.title -- The Title.
|
|
12
|
+
* @param {string?} props.buttonLabel -- The Connect Button label.
|
|
13
|
+
* @param {string} props.apiRoot -- API root.
|
|
14
|
+
* @param {string} props.apiNonce -- API nonce.
|
|
15
|
+
* @param {string} props.registrationNonce -- Registration nonce.
|
|
16
|
+
* @param {string?} props.from -- Where the connection request is coming from.
|
|
17
|
+
* @param {string} props.redirectUri -- The redirect admin URI.
|
|
18
|
+
* @param {string[]?} props.images -- Images to display on the right side.
|
|
19
|
+
* @param {object[]} props.children -- Additional page elements to show before the call to action.
|
|
20
|
+
* @param {string?} props.assetBaseUrl -- The assets base URL.
|
|
21
|
+
* @param {object?} props.footer -- Additional page elements to show after the call to action.
|
|
22
|
+
* @param {boolean?} props.skipUserConnection -- Whether to not require a user connection and just redirect after site connection.
|
|
23
|
+
* @param {boolean?} props.autoTrigger -- Whether to initiate the connection process automatically upon rendering the component.
|
|
24
|
+
* @param {object?} props.logo -- The logo to display at the top of the component.
|
|
25
|
+
* @returns {React.Component} The `ConnectScreen` component.
|
|
26
|
+
*/
|
|
27
|
+
const ConnectScreen = ( {
|
|
28
|
+
title,
|
|
29
|
+
buttonLabel,
|
|
30
|
+
apiRoot,
|
|
31
|
+
apiNonce,
|
|
32
|
+
registrationNonce,
|
|
33
|
+
from,
|
|
34
|
+
redirectUri,
|
|
35
|
+
images,
|
|
36
|
+
children,
|
|
37
|
+
assetBaseUrl,
|
|
38
|
+
autoTrigger,
|
|
39
|
+
footer,
|
|
40
|
+
skipUserConnection,
|
|
41
|
+
logo,
|
|
42
|
+
} ) => {
|
|
43
|
+
const {
|
|
44
|
+
handleRegisterSite,
|
|
45
|
+
siteIsRegistering,
|
|
46
|
+
userIsConnecting,
|
|
47
|
+
registrationError,
|
|
48
|
+
isOfflineMode,
|
|
49
|
+
} = useConnection( {
|
|
50
|
+
registrationNonce,
|
|
51
|
+
redirectUri,
|
|
52
|
+
apiRoot,
|
|
53
|
+
apiNonce,
|
|
54
|
+
autoTrigger,
|
|
55
|
+
from,
|
|
56
|
+
skipUserConnection,
|
|
57
|
+
} );
|
|
58
|
+
|
|
59
|
+
const displayButtonError = Boolean( registrationError );
|
|
60
|
+
const buttonIsLoading = siteIsRegistering || userIsConnecting;
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<ConnectScreenVisual
|
|
64
|
+
title={ title }
|
|
65
|
+
images={ images }
|
|
66
|
+
assetBaseUrl={ assetBaseUrl }
|
|
67
|
+
buttonLabel={ buttonLabel }
|
|
68
|
+
handleButtonClick={ handleRegisterSite }
|
|
69
|
+
displayButtonError={ displayButtonError }
|
|
70
|
+
buttonIsLoading={ buttonIsLoading }
|
|
71
|
+
footer={ footer }
|
|
72
|
+
isOfflineMode={ isOfflineMode }
|
|
73
|
+
logo={ logo }
|
|
74
|
+
>
|
|
75
|
+
{ children }
|
|
76
|
+
</ConnectScreenVisual>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
ConnectScreen.propTypes = {
|
|
81
|
+
title: PropTypes.string,
|
|
82
|
+
buttonLabel: PropTypes.string,
|
|
83
|
+
apiRoot: PropTypes.string.isRequired,
|
|
84
|
+
apiNonce: PropTypes.string.isRequired,
|
|
85
|
+
registrationNonce: PropTypes.string.isRequired,
|
|
86
|
+
from: PropTypes.string,
|
|
87
|
+
redirectUri: PropTypes.string.isRequired,
|
|
88
|
+
autoTrigger: PropTypes.bool,
|
|
89
|
+
images: PropTypes.arrayOf( PropTypes.string ),
|
|
90
|
+
assetBaseUrl: PropTypes.string,
|
|
91
|
+
skipUserConnection: PropTypes.bool,
|
|
92
|
+
logo: PropTypes.element,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
ConnectScreen.defaultProps = {
|
|
96
|
+
title: __( 'Over 5 million WordPress sites are faster and more secure', 'jetpack' ),
|
|
97
|
+
buttonLabel: __( 'Set up Jetpack', 'jetpack' ),
|
|
98
|
+
images: [],
|
|
99
|
+
redirectUri: null,
|
|
100
|
+
autoTrigger: false,
|
|
101
|
+
skipUserConnection: false,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export default ConnectScreen;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@import '@wordpress/base-styles/breakpoints';
|
|
2
|
+
@import '@wordpress/base-styles/mixins';
|
|
3
|
+
|
|
4
|
+
.jp-connection__connect-screen {
|
|
5
|
+
--spacing-base: 8px;
|
|
6
|
+
|
|
7
|
+
&__loading {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.terms-of-service {
|
|
12
|
+
margin-top: calc(var(--spacing-base) * 4);
|
|
13
|
+
margin-bottom: calc(var(--spacing-base) * 3);
|
|
14
|
+
max-width: 360px;
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
text-decoration: underline;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.jp-action-button {
|
|
22
|
+
margin-top: 40px;
|
|
23
|
+
|
|
24
|
+
&--button {
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
button {
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
|
|
32
|
+
&:disabled {
|
|
33
|
+
color: hsla( 0, 0%, 100%, 0.4 );
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media ( max-width: $break-medium ) {
|
|
37
|
+
max-width: none;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__footer {
|
|
44
|
+
margin-top: 32px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ActionButton, getRedirectUrl, TermsOfService } from '@automattic/jetpack-components';
|
|
2
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import ConnectScreenLayout from '../layout';
|
|
7
|
+
import './style.scss';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The Connection Screen Visual component..
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props -- The properties.
|
|
13
|
+
* @returns {React.Component} The `ConnectScreenRequiredPlanVisual` component.
|
|
14
|
+
*/
|
|
15
|
+
const ConnectScreenVisual = props => {
|
|
16
|
+
const {
|
|
17
|
+
title,
|
|
18
|
+
images,
|
|
19
|
+
children,
|
|
20
|
+
assetBaseUrl,
|
|
21
|
+
isLoading,
|
|
22
|
+
buttonLabel,
|
|
23
|
+
handleButtonClick,
|
|
24
|
+
displayButtonError,
|
|
25
|
+
buttonIsLoading,
|
|
26
|
+
footer,
|
|
27
|
+
isOfflineMode,
|
|
28
|
+
logo,
|
|
29
|
+
} = props;
|
|
30
|
+
|
|
31
|
+
const errorMessage = isOfflineMode
|
|
32
|
+
? createInterpolateElement( __( 'Unavailable in <a>Offline Mode</a>', 'jetpack' ), {
|
|
33
|
+
a: (
|
|
34
|
+
<a
|
|
35
|
+
href={ getRedirectUrl( 'jetpack-support-development-mode' ) }
|
|
36
|
+
target="_blank"
|
|
37
|
+
rel="noopener noreferrer"
|
|
38
|
+
/>
|
|
39
|
+
),
|
|
40
|
+
} )
|
|
41
|
+
: undefined;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<ConnectScreenLayout
|
|
45
|
+
title={ title }
|
|
46
|
+
assetBaseUrl={ assetBaseUrl }
|
|
47
|
+
images={ images }
|
|
48
|
+
className={
|
|
49
|
+
'jp-connection__connect-screen' +
|
|
50
|
+
( isLoading ? ' jp-connection__connect-screen__loading' : '' )
|
|
51
|
+
}
|
|
52
|
+
logo={ logo }
|
|
53
|
+
>
|
|
54
|
+
<div className="jp-connection__connect-screen__content">
|
|
55
|
+
{ children }
|
|
56
|
+
|
|
57
|
+
<div className="jp-connection__connect-screen__tos">
|
|
58
|
+
<TermsOfService agreeButtonLabel={ buttonLabel } />
|
|
59
|
+
</div>
|
|
60
|
+
<ActionButton
|
|
61
|
+
label={ buttonLabel }
|
|
62
|
+
onClick={ handleButtonClick }
|
|
63
|
+
displayError={ displayButtonError || isOfflineMode }
|
|
64
|
+
errorMessage={ errorMessage }
|
|
65
|
+
isLoading={ buttonIsLoading }
|
|
66
|
+
isDisabled={ isOfflineMode }
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
{ footer && <div className="jp-connection__connect-screen__footer">{ footer }</div> }
|
|
70
|
+
</div>
|
|
71
|
+
</ConnectScreenLayout>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
ConnectScreenVisual.propTypes = {
|
|
76
|
+
/** The Title. */
|
|
77
|
+
title: PropTypes.string,
|
|
78
|
+
/** Images to display on the right side. */
|
|
79
|
+
images: PropTypes.arrayOf( PropTypes.string ),
|
|
80
|
+
/** The assets base URL. */
|
|
81
|
+
assetBaseUrl: PropTypes.string,
|
|
82
|
+
/** Whether the connection status is still loading. */
|
|
83
|
+
isLoading: PropTypes.bool,
|
|
84
|
+
/** Text label to be used into button. */
|
|
85
|
+
buttonLabel: PropTypes.string.isRequired,
|
|
86
|
+
/** Callback to be called on button click. */
|
|
87
|
+
handleButtonClick: PropTypes.func,
|
|
88
|
+
/** Whether the error message appears or not. */
|
|
89
|
+
displayButtonError: PropTypes.bool,
|
|
90
|
+
/** Whether the button is loading or not. */
|
|
91
|
+
buttonIsLoading: PropTypes.bool,
|
|
92
|
+
/** Node that will be rendered after ToS */
|
|
93
|
+
footer: PropTypes.node,
|
|
94
|
+
/** Whether the site is in offline mode. */
|
|
95
|
+
isOfflineMode: PropTypes.bool,
|
|
96
|
+
/** The logo to display at the top of the component. */
|
|
97
|
+
logo: PropTypes.element,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
ConnectScreenVisual.defaultProps = {
|
|
101
|
+
isLoading: false,
|
|
102
|
+
buttonIsLoading: false,
|
|
103
|
+
displayButtonError: false,
|
|
104
|
+
handleButtonClick: () => {},
|
|
105
|
+
footer: null,
|
|
106
|
+
isOfflineMode: false,
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default ConnectScreenVisual;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The ImageSlider component.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props -- The properties.
|
|
8
|
+
* @param {Array} props.images -- Images to display on the right side.
|
|
9
|
+
* @param {string} props.assetBaseUrl -- The assets base URL
|
|
10
|
+
* @returns {React.Component} The `ImageSlider` component.
|
|
11
|
+
*/
|
|
12
|
+
const ImageSlider = props => {
|
|
13
|
+
const { images, assetBaseUrl } = props;
|
|
14
|
+
|
|
15
|
+
if ( ! images.length ) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const imagesHTML = images.map( ( image, index ) => (
|
|
20
|
+
<React.Fragment key={ index }>
|
|
21
|
+
<img src={ assetBaseUrl + image } alt="" />
|
|
22
|
+
</React.Fragment>
|
|
23
|
+
) );
|
|
24
|
+
|
|
25
|
+
return <div className="jp-connection__connect-screen__image-slider">{ imagesHTML }</div>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
ImageSlider.propTypes = {
|
|
29
|
+
images: PropTypes.arrayOf( PropTypes.string ).isRequired,
|
|
30
|
+
assetBaseUrl: PropTypes.string,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
ImageSlider.defaultProps = {
|
|
34
|
+
assetBaseUrl: '',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default ImageSlider;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { JetpackLogo } from '@automattic/jetpack-components';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ImageSlider from './image-slider';
|
|
6
|
+
import './style.scss';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The Connection Screen Layout component.
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props -- The properties.
|
|
12
|
+
* @returns {React.Component} The `ConnectScreenLayout` component.
|
|
13
|
+
*/
|
|
14
|
+
const ConnectScreenLayout = props => {
|
|
15
|
+
const { title, children, className, assetBaseUrl, images, logo, rna = false } = props;
|
|
16
|
+
|
|
17
|
+
const showImageSlider = images?.length;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
className={ classNames(
|
|
22
|
+
'jp-connection__connect-screen-layout',
|
|
23
|
+
showImageSlider ? 'jp-connection__connect-screen-layout__two-columns' : '',
|
|
24
|
+
className ? ' ' + className : ''
|
|
25
|
+
) }
|
|
26
|
+
>
|
|
27
|
+
{ rna && (
|
|
28
|
+
<div className="jp-connection__connect-screen-layout__color-blobs">
|
|
29
|
+
<div className="jp-connection__connect-screen-layout__color-blobs__green"></div>
|
|
30
|
+
<div className="jp-connection__connect-screen-layout__color-blobs__yellow"></div>
|
|
31
|
+
<div className="jp-connection__connect-screen-layout__color-blobs__blue"></div>
|
|
32
|
+
</div>
|
|
33
|
+
) }
|
|
34
|
+
|
|
35
|
+
<div className="jp-connection__connect-screen-layout__left">
|
|
36
|
+
{ logo || <JetpackLogo /> }
|
|
37
|
+
|
|
38
|
+
<h2>{ title }</h2>
|
|
39
|
+
|
|
40
|
+
{ children }
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
{ showImageSlider ? (
|
|
44
|
+
<div className="jp-connection__connect-screen-layout__right">
|
|
45
|
+
<ImageSlider images={ images } assetBaseUrl={ assetBaseUrl } />
|
|
46
|
+
</div>
|
|
47
|
+
) : null }
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
ConnectScreenLayout.propTypes = {
|
|
53
|
+
/** The Title. */
|
|
54
|
+
title: PropTypes.string,
|
|
55
|
+
/** Class to be added to component. */
|
|
56
|
+
className: PropTypes.string,
|
|
57
|
+
/** Images to display on the right side. */
|
|
58
|
+
images: PropTypes.arrayOf( PropTypes.string ),
|
|
59
|
+
/** The assets base URL. */
|
|
60
|
+
assetBaseUrl: PropTypes.string,
|
|
61
|
+
/** The logo to display at the top of the component. */
|
|
62
|
+
logo: PropTypes.element,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default ConnectScreenLayout;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
@import '@wordpress/base-styles/breakpoints';
|
|
2
|
+
@import '@wordpress/base-styles/mixins';
|
|
3
|
+
@import '@automattic/jetpack-base-styles/style';
|
|
4
|
+
|
|
5
|
+
.jp-connection__connect-screen-layout {
|
|
6
|
+
background: var( --jp-white );
|
|
7
|
+
box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
|
|
10
|
+
&__loading {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__left, &__right {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__left {
|
|
19
|
+
padding: calc(var(--spacing-base) * 3);
|
|
20
|
+
|
|
21
|
+
@include break-small {
|
|
22
|
+
padding: 64px 96px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.jetpack-logo {
|
|
26
|
+
margin-bottom: 24px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h2 {
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
font-size: 36px;
|
|
33
|
+
line-height: 40px;
|
|
34
|
+
color: var( --jp-black );
|
|
35
|
+
margin-top: 32px;
|
|
36
|
+
margin-bottom: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
h3 {
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
font-size: 24px;
|
|
43
|
+
line-height: 32px;
|
|
44
|
+
color: var( --jp-black );
|
|
45
|
+
margin-top: 32px;
|
|
46
|
+
margin-bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
p, li {
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: normal;
|
|
52
|
+
font-size: 16px;
|
|
53
|
+
line-height: 24px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
p {
|
|
57
|
+
color: #101517;
|
|
58
|
+
margin: 16px 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
a {
|
|
62
|
+
font-size: var( --font-body );
|
|
63
|
+
color: var( --jp-black );
|
|
64
|
+
text-decoration: underline;
|
|
65
|
+
height: auto;
|
|
66
|
+
font: inherit;
|
|
67
|
+
padding: 0;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
color: var( --jp-black );
|
|
71
|
+
text-decoration-thickness: var( --jp-underline-thickness );
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:focus {
|
|
75
|
+
color: var( --jp-black );
|
|
76
|
+
box-shadow: none !important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
ul {
|
|
81
|
+
list-style-type: none;
|
|
82
|
+
padding: 0;
|
|
83
|
+
|
|
84
|
+
li {
|
|
85
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;
|
|
86
|
+
background-size: 24px;
|
|
87
|
+
padding-left: 30px;
|
|
88
|
+
margin-bottom: 9px;
|
|
89
|
+
color: var( --jp-black );
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__right {
|
|
95
|
+
padding: 64px 0;
|
|
96
|
+
|
|
97
|
+
img {
|
|
98
|
+
max-width: 100%;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__two-columns {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-wrap: wrap;
|
|
105
|
+
|
|
106
|
+
.jp-connection__connect-screen-layout__left {
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
flex-basis: 100%;
|
|
109
|
+
|
|
110
|
+
@include break-xlarge {
|
|
111
|
+
flex-basis: 52%;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.jp-connection__connect-screen-layout__right {
|
|
116
|
+
flex-grow: 1;
|
|
117
|
+
flex-basis: 47%;
|
|
118
|
+
background: #F9F9F6;
|
|
119
|
+
display: none;
|
|
120
|
+
|
|
121
|
+
@include break-xlarge {
|
|
122
|
+
display: block;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.rna {
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
|
|
131
|
+
.jp-connection__connect-screen-layout__left {
|
|
132
|
+
position: relative;
|
|
133
|
+
z-index: 2;
|
|
134
|
+
|
|
135
|
+
h2 {
|
|
136
|
+
margin-top: 0;
|
|
137
|
+
font-weight: 700;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
h3 {
|
|
141
|
+
margin-top: 24px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include break-small {
|
|
145
|
+
padding: 4rem 6rem 4rem 4rem;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.jp-connection__connect-screen-required-plan__pricing-card {
|
|
150
|
+
/** Line up with the top of the product logo,
|
|
151
|
+
* and mirror 96px horizontal padding seen in
|
|
152
|
+
* .jp-connection__connect-screen-layout__left
|
|
153
|
+
*/
|
|
154
|
+
@include break-xlarge {
|
|
155
|
+
position: absolute;
|
|
156
|
+
top: calc(var(--spacing-base) * 9.25);
|
|
157
|
+
right: calc(var(--spacing-base) * -45);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.jp-components__pricing-card {
|
|
161
|
+
border-radius: var(--jp-border-radius-rna);
|
|
162
|
+
width: 425px;
|
|
163
|
+
max-width: 100%;
|
|
164
|
+
|
|
165
|
+
&__title {
|
|
166
|
+
margin-top: 0.625rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@include break-large {
|
|
170
|
+
padding: 3rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.components-button {
|
|
175
|
+
margin-bottom: 0;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.jp-backup-dashboard-promotion {
|
|
180
|
+
ul.jp-product-promote li {
|
|
181
|
+
margin-bottom: 0.75rem;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.jp-connection__connect-screen-layout__color-blobs {
|
|
186
|
+
display: none;
|
|
187
|
+
position: absolute;
|
|
188
|
+
top: 0;
|
|
189
|
+
right: 0;
|
|
190
|
+
width: 363px;
|
|
191
|
+
height: 677px;
|
|
192
|
+
z-index: 1;
|
|
193
|
+
|
|
194
|
+
clip-path: polygon( 100% 0, 100% 100%, 0 0, 0 0 );
|
|
195
|
+
|
|
196
|
+
&__blue,
|
|
197
|
+
&__yellow,
|
|
198
|
+
&__green {
|
|
199
|
+
position: absolute;
|
|
200
|
+
filter: blur(50px);
|
|
201
|
+
border-radius: 50%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&__blue {
|
|
205
|
+
width: 400px;
|
|
206
|
+
height: 400px;
|
|
207
|
+
right: -100px;
|
|
208
|
+
top: -275px;
|
|
209
|
+
z-index: 3;
|
|
210
|
+
|
|
211
|
+
background-color: var(--jp-blue-5);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&__yellow {
|
|
215
|
+
width: 250px;
|
|
216
|
+
height: 250px;
|
|
217
|
+
right: -25px;
|
|
218
|
+
top: 10px;
|
|
219
|
+
z-index: 2;
|
|
220
|
+
|
|
221
|
+
background-color: var(--jp-yellow-5);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&__green {
|
|
225
|
+
width: 300px;
|
|
226
|
+
height: 300px;
|
|
227
|
+
right: 0;
|
|
228
|
+
top: 175px;
|
|
229
|
+
z-index: 1;
|
|
230
|
+
|
|
231
|
+
background-color: var(--jp-green-5);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@media ( min-width: 1080px ) {
|
|
235
|
+
display: initial;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|