@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,87 @@
|
|
|
1
|
+
import { DecorativeCard } from '@automattic/jetpack-components';
|
|
2
|
+
import { Button } from '@wordpress/components';
|
|
3
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import disconnectImage from '../images/disconnect-confirm.jpg';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Shows the step that confirms the site has been disconnected, asks if user would like to provide feedback.
|
|
11
|
+
* Will only show option to provide feedback if the canProvideFeedback prop is true.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} props - The properties.
|
|
14
|
+
* @returns {React.Component} - StepDisconnectConfirm Component
|
|
15
|
+
*/
|
|
16
|
+
const StepDisconnectConfirm = props => {
|
|
17
|
+
const { onExit, canProvideFeedback, onProvideFeedback } = props;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className="jp-connection__disconnect-dialog__content">
|
|
21
|
+
<DecorativeCard icon="unlink" imageUrl={ disconnectImage } />
|
|
22
|
+
|
|
23
|
+
<div className="jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow">
|
|
24
|
+
<h1>
|
|
25
|
+
{ createInterpolateElement(
|
|
26
|
+
__( 'Jetpack has been <br/>successfully disconnected.', 'jetpack' ),
|
|
27
|
+
{
|
|
28
|
+
br: <br />,
|
|
29
|
+
}
|
|
30
|
+
) }
|
|
31
|
+
</h1>
|
|
32
|
+
|
|
33
|
+
{ canProvideFeedback && (
|
|
34
|
+
<>
|
|
35
|
+
<p>
|
|
36
|
+
{ __(
|
|
37
|
+
'We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).',
|
|
38
|
+
'jetpack'
|
|
39
|
+
) }
|
|
40
|
+
</p>
|
|
41
|
+
<p>
|
|
42
|
+
<Button
|
|
43
|
+
variant="primary"
|
|
44
|
+
onClick={ onProvideFeedback }
|
|
45
|
+
className="jp-connection__disconnect-dialog__btn-back-to-wp"
|
|
46
|
+
>
|
|
47
|
+
{ __( 'Help us improve', 'jetpack' ) }
|
|
48
|
+
</Button>
|
|
49
|
+
</p>
|
|
50
|
+
<a
|
|
51
|
+
className="jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold"
|
|
52
|
+
href="#"
|
|
53
|
+
onClick={ onExit }
|
|
54
|
+
>
|
|
55
|
+
{ __( 'No thank you', 'jetpack' ) }
|
|
56
|
+
</a>
|
|
57
|
+
</>
|
|
58
|
+
) }
|
|
59
|
+
|
|
60
|
+
{ ! canProvideFeedback && (
|
|
61
|
+
<>
|
|
62
|
+
<p>
|
|
63
|
+
<Button
|
|
64
|
+
variant="primary"
|
|
65
|
+
onClick={ onExit }
|
|
66
|
+
className="jp-connection__disconnect-dialog__btn-back-to-wp"
|
|
67
|
+
>
|
|
68
|
+
{ __( 'Back to my website', 'jetpack' ) }
|
|
69
|
+
</Button>
|
|
70
|
+
</p>
|
|
71
|
+
</>
|
|
72
|
+
) }
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
StepDisconnectConfirm.propTypes = {
|
|
79
|
+
/** Callback used to close the modal. */
|
|
80
|
+
onExit: PropTypes.func,
|
|
81
|
+
/** Callback used to change the state if user would like to provide feedback. */
|
|
82
|
+
onProvideFeedback: PropTypes.func,
|
|
83
|
+
/** Does the app have the necessary information to collect a survey response? */
|
|
84
|
+
canProvideFeedback: PropTypes.bool,
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default StepDisconnectConfirm;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { getRedirectUrl } from '@automattic/jetpack-components';
|
|
2
|
+
import { Button, ExternalLink } from '@wordpress/components';
|
|
3
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import React, { useCallback, useEffect } from 'react';
|
|
7
|
+
import ConnectedPlugins from '../../connected-plugins';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Disconnect step in disconnection flow.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props - The properties.
|
|
13
|
+
* @returns {React.Component} - The StepDisconnect component
|
|
14
|
+
*/
|
|
15
|
+
const StepDisconnect = props => {
|
|
16
|
+
const {
|
|
17
|
+
title,
|
|
18
|
+
isDisconnecting,
|
|
19
|
+
onDisconnect,
|
|
20
|
+
disconnectError,
|
|
21
|
+
disconnectStepComponent,
|
|
22
|
+
connectedPlugins,
|
|
23
|
+
disconnectingPlugin,
|
|
24
|
+
closeModal,
|
|
25
|
+
context,
|
|
26
|
+
trackModalClick,
|
|
27
|
+
} = props;
|
|
28
|
+
|
|
29
|
+
const trackLearnClick = useCallback(
|
|
30
|
+
() => trackModalClick( 'jetpack_disconnect_dialog_click_learn_about' ),
|
|
31
|
+
[ trackModalClick ]
|
|
32
|
+
);
|
|
33
|
+
const trackSupportClick = useCallback(
|
|
34
|
+
() => trackModalClick( 'jetpack_disconnect_dialog_click_support' ),
|
|
35
|
+
[ trackModalClick ]
|
|
36
|
+
);
|
|
37
|
+
const handleStayConnectedClick = useCallback( () => {
|
|
38
|
+
trackModalClick( 'jetpack_disconnect_dialog_click_stay_connected' );
|
|
39
|
+
closeModal();
|
|
40
|
+
}, [ trackModalClick, closeModal ] );
|
|
41
|
+
const handleDisconnectClick = useCallback(
|
|
42
|
+
e => {
|
|
43
|
+
trackModalClick( 'jetpack_disconnect_dialog_click_disconnect' );
|
|
44
|
+
onDisconnect( e );
|
|
45
|
+
},
|
|
46
|
+
[ trackModalClick, onDisconnect ]
|
|
47
|
+
);
|
|
48
|
+
const handleEscapePress = useCallback(
|
|
49
|
+
event => {
|
|
50
|
+
if ( event.key === 'Escape' && ! isDisconnecting ) {
|
|
51
|
+
handleStayConnectedClick();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
[ handleStayConnectedClick, isDisconnecting ]
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
useEffect( () => {
|
|
58
|
+
document.addEventListener( 'keydown', handleEscapePress, false );
|
|
59
|
+
|
|
60
|
+
return () => {
|
|
61
|
+
document.removeEventListener( 'keydown', handleEscapePress, false );
|
|
62
|
+
};
|
|
63
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
+
}, [] );
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Render the disconnect button, allows for some variance based on context.
|
|
68
|
+
*
|
|
69
|
+
* @returns {React.Component} - Button used for disconnect.
|
|
70
|
+
*/
|
|
71
|
+
const renderDisconnectButton = () => {
|
|
72
|
+
let buttonText = __( 'Disconnect', 'jetpack' );
|
|
73
|
+
// When showing on the plugins page, this button should deactivate the plugin as well.
|
|
74
|
+
if ( isDisconnecting ) {
|
|
75
|
+
buttonText = __( 'Disconnecting…', 'jetpack' );
|
|
76
|
+
} else if ( context === 'plugins' ) {
|
|
77
|
+
buttonText = __( 'Deactivate', 'jetpack' );
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<Button
|
|
82
|
+
variant="primary"
|
|
83
|
+
disabled={ isDisconnecting }
|
|
84
|
+
onClick={ handleDisconnectClick }
|
|
85
|
+
className="jp-connection__disconnect-dialog__btn-disconnect"
|
|
86
|
+
>
|
|
87
|
+
{ buttonText }
|
|
88
|
+
</Button>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Show some fallback output if there are no connected plugins to show and no passed disconnect component.
|
|
94
|
+
* This is a more generic message about disconnecting Jetpack.
|
|
95
|
+
*
|
|
96
|
+
* @returns {React.ElementType|undefined} - Fallback message for when there are no connected plugins or passed components to show.
|
|
97
|
+
*/
|
|
98
|
+
const renderFallbackOutput = () => {
|
|
99
|
+
const hasOtherConnectedPlugins =
|
|
100
|
+
connectedPlugins &&
|
|
101
|
+
Object.keys( connectedPlugins ).filter( key => key !== disconnectingPlugin ).length;
|
|
102
|
+
|
|
103
|
+
if ( ! hasOtherConnectedPlugins && ! disconnectStepComponent ) {
|
|
104
|
+
return (
|
|
105
|
+
<div className="jp-connection__disconnect-dialog__step-copy">
|
|
106
|
+
<p className="jp-connection__disconnect-dialog__large-text">
|
|
107
|
+
{ __( 'Jetpack is currently powering multiple products on your site.', 'jetpack' ) }
|
|
108
|
+
<br />
|
|
109
|
+
{ __( 'Once you disconnect Jetpack, these will no longer work.', 'jetpack' ) }
|
|
110
|
+
</p>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return undefined;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<React.Fragment>
|
|
120
|
+
<div className="jp-connection__disconnect-dialog__content">
|
|
121
|
+
<h1 id="jp-connection__disconnect-dialog__heading">{ title }</h1>
|
|
122
|
+
<ConnectedPlugins
|
|
123
|
+
connectedPlugins={ connectedPlugins }
|
|
124
|
+
disconnectingPlugin={ disconnectingPlugin }
|
|
125
|
+
/>
|
|
126
|
+
{ disconnectStepComponent }
|
|
127
|
+
{ renderFallbackOutput() }
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div className="jp-connection__disconnect-dialog__actions">
|
|
131
|
+
<div className="jp-row">
|
|
132
|
+
<div className="lg-col-span-8 md-col-span-9 sm-col-span-4">
|
|
133
|
+
<p>
|
|
134
|
+
{ createInterpolateElement(
|
|
135
|
+
__(
|
|
136
|
+
'<strong>Need help?</strong> Learn more about the <jpConnectionInfoLink>Jetpack connection</jpConnectionInfoLink> or <jpSupportLink>contact Jetpack support</jpSupportLink>.',
|
|
137
|
+
'jetpack'
|
|
138
|
+
),
|
|
139
|
+
{
|
|
140
|
+
strong: <strong></strong>,
|
|
141
|
+
jpConnectionInfoLink: (
|
|
142
|
+
<ExternalLink
|
|
143
|
+
href={ getRedirectUrl(
|
|
144
|
+
'why-the-wordpress-com-connection-is-important-for-jetpack'
|
|
145
|
+
) }
|
|
146
|
+
className="jp-connection__disconnect-dialog__link"
|
|
147
|
+
onClick={ trackLearnClick }
|
|
148
|
+
/>
|
|
149
|
+
),
|
|
150
|
+
jpSupportLink: (
|
|
151
|
+
<ExternalLink
|
|
152
|
+
href={ getRedirectUrl( 'jetpack-support' ) }
|
|
153
|
+
className="jp-connection__disconnect-dialog__link"
|
|
154
|
+
onClick={ trackSupportClick }
|
|
155
|
+
/>
|
|
156
|
+
),
|
|
157
|
+
}
|
|
158
|
+
) }
|
|
159
|
+
</p>
|
|
160
|
+
</div>
|
|
161
|
+
<div className="jp-connection__disconnect-dialog__button-wrap lg-col-span-4 md-col-span-7 sm-col-span-4">
|
|
162
|
+
<Button
|
|
163
|
+
variant="primary"
|
|
164
|
+
disabled={ isDisconnecting }
|
|
165
|
+
onClick={ handleStayConnectedClick }
|
|
166
|
+
className="jp-connection__disconnect-dialog__btn-dismiss"
|
|
167
|
+
>
|
|
168
|
+
{ context === 'plugins'
|
|
169
|
+
? __( 'Cancel', 'jetpack' )
|
|
170
|
+
: __( 'Stay connected', 'jetpack', /* dummy arg to avoid bad minification */ 0 ) }
|
|
171
|
+
</Button>
|
|
172
|
+
{ renderDisconnectButton() }
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
{ disconnectError && (
|
|
176
|
+
<p className="jp-connection__disconnect-dialog__error">{ disconnectError }</p>
|
|
177
|
+
) }
|
|
178
|
+
</div>
|
|
179
|
+
</React.Fragment>
|
|
180
|
+
);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
StepDisconnect.propTypes = {
|
|
184
|
+
/** The title to show for this section. */
|
|
185
|
+
title: PropTypes.string,
|
|
186
|
+
/** Whether or not a request to disconnect is in progress. */
|
|
187
|
+
isDisconnecting: PropTypes.bool,
|
|
188
|
+
/** Callback function that is triggered by clicking the "Disconnect" button. */
|
|
189
|
+
onDisconnect: PropTypes.func,
|
|
190
|
+
/** An error that occurred during a request to disconnect. */
|
|
191
|
+
disconnectError: PropTypes.bool,
|
|
192
|
+
/** A component to be rendered as part of this step */
|
|
193
|
+
disconnectStepComponent: PropTypes.element,
|
|
194
|
+
/** Plugins that are using the Jetpack connection. */
|
|
195
|
+
connectedPlugins: PropTypes.array,
|
|
196
|
+
/** The slug of the plugin that is initiating the disconnection. */
|
|
197
|
+
disconnectingPlugin: PropTypes.string,
|
|
198
|
+
/** Callback function that closes the modal. */
|
|
199
|
+
closeModal: PropTypes.func,
|
|
200
|
+
/** Where this modal is being rendered. */
|
|
201
|
+
context: PropTypes.string,
|
|
202
|
+
/** Callback tracks link/btn clicks */
|
|
203
|
+
trackModalClick: PropTypes.func,
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export default StepDisconnect;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
|
|
2
|
+
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import '../../disconnect-survey/_jp-connect_disconnect-survey-card.scss';
|
|
7
|
+
import DisconnectSurvey from '../../disconnect-survey';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Show the survey step and allow the user to select a response.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props - The properties.
|
|
13
|
+
* @returns {React.Component} The StepSurvey Component
|
|
14
|
+
*/
|
|
15
|
+
const StepSurvey = props => {
|
|
16
|
+
const { onExit, onFeedBackProvided, isSubmittingFeedback } = props;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="jp-connection__disconnect-dialog__content">
|
|
20
|
+
<h1>{ __( 'Before you go, help us improve Jetpack', 'jetpack' ) }</h1>
|
|
21
|
+
<p className="jp-connection__disconnect-dialog__large-text">
|
|
22
|
+
{ __( 'Let us know what didn‘t work for you', 'jetpack' ) }
|
|
23
|
+
</p>
|
|
24
|
+
<DisconnectSurvey
|
|
25
|
+
onSubmit={ onFeedBackProvided }
|
|
26
|
+
isSubmittingFeedback={ isSubmittingFeedback }
|
|
27
|
+
/>
|
|
28
|
+
<a
|
|
29
|
+
className="jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold"
|
|
30
|
+
href="#"
|
|
31
|
+
onClick={ onExit }
|
|
32
|
+
>
|
|
33
|
+
{ __( 'Skip for now', 'jetpack' ) }
|
|
34
|
+
</a>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
StepSurvey.PropTypes = {
|
|
40
|
+
/** Callback function used to close the modal and leave the disconnect flow. */
|
|
41
|
+
onExit: PropTypes.func,
|
|
42
|
+
/** Callback function to handle submission of survey response. */
|
|
43
|
+
onFeedBackProvided: PropTypes.func,
|
|
44
|
+
/** If the survey feedback is currently being saved/ submitted */
|
|
45
|
+
isSubmittingFeedback: PropTypes.bool,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default StepSurvey;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { DecorativeCard } from '@automattic/jetpack-components';
|
|
2
|
+
import { Button } from '@wordpress/components';
|
|
3
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import disconnectImage from '../images/disconnect-thanks.jpg';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Show the "thank you" step following survey submission
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props - The properties.
|
|
13
|
+
* @returns {React.Component} - The StepThankYou Component
|
|
14
|
+
*/
|
|
15
|
+
const StepThankYou = props => {
|
|
16
|
+
const { onExit } = props;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="jp-connection__disconnect-dialog__content">
|
|
20
|
+
<DecorativeCard format="vertical" imageUrl={ disconnectImage } />
|
|
21
|
+
|
|
22
|
+
<div className="jp-connection__disconnect-dialog__copy">
|
|
23
|
+
<h1>{ __( 'Thank you!', 'jetpack' ) }</h1>
|
|
24
|
+
<p className="jp-connection__disconnect-dialog__large-text">
|
|
25
|
+
{ createInterpolateElement(
|
|
26
|
+
__(
|
|
27
|
+
'Your answer has been submitted. <br/>Thanks for your input on how we can improve Jetpack.',
|
|
28
|
+
'jetpack'
|
|
29
|
+
),
|
|
30
|
+
{
|
|
31
|
+
br: <br />,
|
|
32
|
+
}
|
|
33
|
+
) }
|
|
34
|
+
</p>
|
|
35
|
+
<Button
|
|
36
|
+
variant="primary"
|
|
37
|
+
onClick={ onExit }
|
|
38
|
+
className="jp-connection__disconnect-dialog__btn-back-to-wp"
|
|
39
|
+
>
|
|
40
|
+
{ __( 'Back to my website', 'jetpack' ) }
|
|
41
|
+
</Button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
StepThankYou.PropTypes = {
|
|
48
|
+
/** Callback function to close the disconnect modal. */
|
|
49
|
+
onExit: PropTypes.func,
|
|
50
|
+
/** Base URL for where webpack-ed images will be stored for the consumer of this component. */
|
|
51
|
+
assetBaseUrl: PropTypes.string,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default StepThankYou;
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
@import '@automattic/jetpack-base-styles/style';
|
|
2
|
+
|
|
3
|
+
.jp-connection__disconnect-dialog {
|
|
4
|
+
h1 {
|
|
5
|
+
margin-top: 0;
|
|
6
|
+
line-height: 1.2;
|
|
7
|
+
font-size: var( --font-title-small );
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
h2 {
|
|
12
|
+
margin: 0;
|
|
13
|
+
line-height: 1.2;
|
|
14
|
+
font-size: var( --font-title-small );
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
p {
|
|
19
|
+
margin-top: 0;
|
|
20
|
+
font-size: var( --font-body );
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__large-text,
|
|
24
|
+
p.jp-connection__disconnect-dialog__large-text {
|
|
25
|
+
font-size: 1.25rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__link,
|
|
29
|
+
.jp-connection__disconnect-dialog__link {
|
|
30
|
+
font-size: var( --font-body );
|
|
31
|
+
color: var( --jp-black );
|
|
32
|
+
text-decoration: underline;
|
|
33
|
+
height: auto;
|
|
34
|
+
font: inherit;
|
|
35
|
+
padding: 0;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
color: var( --jp-black );
|
|
39
|
+
text-decoration-thickness: var( --jp-underline-thickness );
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:focus {
|
|
43
|
+
color: var( --jp-black );
|
|
44
|
+
box-shadow: none !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&--bold {
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.components-button{
|
|
53
|
+
height: 40px;
|
|
54
|
+
font-size: var( --font-body-small );
|
|
55
|
+
border-radius: 4px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.components-modal{
|
|
59
|
+
&__content{
|
|
60
|
+
padding: 0;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
flex-grow: 1;
|
|
64
|
+
margin: 0;
|
|
65
|
+
|
|
66
|
+
&::before {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__header{
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.jp-row {
|
|
77
|
+
align-items: center;
|
|
78
|
+
width: calc(100% - 48px); // Help with the margin on the row.
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__content{
|
|
82
|
+
background: var( --jp-white-off );
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 2rem 1rem;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
text-align: center;
|
|
87
|
+
flex-grow: 1;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
align-items: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__actions{
|
|
95
|
+
background: var( --jp-white );
|
|
96
|
+
padding: 2rem 0;
|
|
97
|
+
position: sticky;
|
|
98
|
+
bottom: 0;
|
|
99
|
+
border-top: 1px solid var( --jp-gray );
|
|
100
|
+
|
|
101
|
+
p {
|
|
102
|
+
margin-bottom: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&::before {
|
|
106
|
+
content: '';
|
|
107
|
+
display: block;
|
|
108
|
+
width: 100%;
|
|
109
|
+
position: absolute;
|
|
110
|
+
height: 80px;
|
|
111
|
+
background: linear-gradient(to bottom, rgba( 0,0,0,0 ), var( --jp-white-off ));
|
|
112
|
+
bottom: calc( 100% + 1px );
|
|
113
|
+
left: 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&__btn-dismiss,
|
|
118
|
+
&__btn-dismiss.components-button{ // override the components-button class
|
|
119
|
+
background: var( --jp-black ) !important;
|
|
120
|
+
margin-right: 10px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__btn-disconnect{
|
|
124
|
+
background: var( --jp-red ) !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__btn-back-to-wp{
|
|
128
|
+
background: var( --jp-black ) !important;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&__button-wrap{
|
|
132
|
+
text-align: left;
|
|
133
|
+
|
|
134
|
+
@media (min-width: 960px) {
|
|
135
|
+
text-align: center;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__error{
|
|
140
|
+
color: var( --jp-red );
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&__survey {
|
|
144
|
+
margin-bottom: 1.5rem;
|
|
145
|
+
max-width: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Limit the copy width on the steps.
|
|
149
|
+
&__step-copy {
|
|
150
|
+
max-width: 800px;
|
|
151
|
+
margin: 0 auto;
|
|
152
|
+
|
|
153
|
+
&--narrow {
|
|
154
|
+
max-width: 600px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// When the screen height is shorter, hide the decorative cards to show the text and controls without scrolling.
|
|
160
|
+
.jp-connection__disconnect-dialog__content {
|
|
161
|
+
@media (max-height: 900px) {
|
|
162
|
+
.jp-components__decorative-card {
|
|
163
|
+
display: none;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@media (min-width: 600px){
|
|
169
|
+
.jp-connection__disconnect-dialog,
|
|
170
|
+
.jp-connection__disconnect-dialog.components-modal__frame {
|
|
171
|
+
width: 100%;
|
|
172
|
+
max-width: calc( 100% - 32px );
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.jp-connection__disconnect-dialog {
|
|
176
|
+
&__content {
|
|
177
|
+
padding: 2rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__actions {
|
|
181
|
+
padding: 2rem;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@media (min-width: 960px){
|
|
188
|
+
.jp-connection__disconnect-dialog,
|
|
189
|
+
.jp-connection__disconnect-dialog.components-modal__frame {
|
|
190
|
+
width: 1200px;
|
|
191
|
+
height: 900px;
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.jp-connection__disconnect-dialog {
|
|
197
|
+
h1 {
|
|
198
|
+
font-size: var( --font-title-large );
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&__large-text,
|
|
202
|
+
p.jp-connection__disconnect-dialog__large-text {
|
|
203
|
+
font-size: 1.5rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&__content {
|
|
207
|
+
padding: 80px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&__actions {
|
|
211
|
+
padding: 2rem 3rem;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.jp-row {
|
|
216
|
+
margin-left: 0px;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import '@automattic/jetpack-base-styles/style';
|
|
2
|
+
|
|
3
|
+
.jp-connect__disconnect-survey-card {
|
|
4
|
+
border: 2px solid transparent;
|
|
5
|
+
width: 800px;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
margin-left: auto;
|
|
8
|
+
margin-right: auto;
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
text-align: left;
|
|
11
|
+
padding: 1rem;
|
|
12
|
+
position: relative;
|
|
13
|
+
box-shadow: 0 0 15px var( --jp-gray-off );
|
|
14
|
+
|
|
15
|
+
&--selected {
|
|
16
|
+
border-color: var( --jp-black );
|
|
17
|
+
background: var( --jp-gray-off );
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&::after {
|
|
21
|
+
content: '';
|
|
22
|
+
display: block;
|
|
23
|
+
width: 5px;
|
|
24
|
+
height: 5px;
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 50%;
|
|
27
|
+
right: 1.5rem;
|
|
28
|
+
border-top: 2px solid var( --jp-black );
|
|
29
|
+
border-right: 2px solid var( --jp-black );
|
|
30
|
+
transform: translateY( -50% ) rotate( 45deg );
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:hover,
|
|
38
|
+
&:focus {
|
|
39
|
+
&:not( .jp-disconnect-survey-card--selected ) {
|
|
40
|
+
border-color: var( --jp-black-80 )
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__answer {
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
margin: 0;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
input.jp-connect__disconnect-survey-card__input {
|
|
53
|
+
-webkit-appearance: none;
|
|
54
|
+
border: none;
|
|
55
|
+
background-color: transparent;
|
|
56
|
+
color: var( --jp-black-80 );
|
|
57
|
+
flex-grow: 1;
|
|
58
|
+
padding-right: 40px;
|
|
59
|
+
max-width: calc( 100% - 40px );
|
|
60
|
+
}
|