-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add/boost-e2e-tests
* master: (22 commits) Update storybook monorepo to v6.4.0 (#21897) Refresh the site's modules and settings after successful product activation (#21886) Plugin Install: Bump MC stat on success or fail. (#21893) Nav Unification: Use correct user capability for the Inbox menu item (#21882) Jetpack: Extend disconnection dialog component to handle multiple steps and accept more props (#21048) Disable CSSTidy property shorthand optimization in the editor or headstart (#21891) Connection UI: Update Composer instructions in README.md (#21890) Partner Compatibility: Adding a unique connection screen for customers who receive a coupon from a Jetpack partner (#21813) Search package: move search dashboard to package - the base (#21865) JITM: wrap CTA below text on small viewports (#21688) Licensing JS Package – fix icon positioning and width (#21878) JITM: new JS and CSS builder (#21874) Support site_intent for `/me/sites` endpoint (#21880) Don't render Critical CSS while generating CritCSS. (#21879) ConnectScreen: make button full width on small screens (#21683) Improve the copy of the license activation banner (#21876) Rename Webpack-built files back from `.min.js` and remove hashes (#21748) Search: Migrate more helper classes to package (#21751) Search: migrate/add search rest API (#21584) Add initial state to the connection package (#21864) ...
- Loading branch information
Showing
329 changed files
with
9,014 additions
and
2,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
projects/js-packages/api/changelog/add-feature-dashboard-new-state-store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
Search: Added search REST API |
4 changes: 4 additions & 0 deletions
4
projects/js-packages/api/changelog/update-extend-disconnect-dialog-component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Updated package version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/js-packages/components/changelog/add-decorative-card-component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: changed | ||
|
||
Add a new DecorativeCard component to the components package. |
68 changes: 68 additions & 0 deletions
68
projects/js-packages/components/components/decorative-card/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* External Dependencies | ||
*/ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
/** | ||
* Internal Dependencies | ||
*/ | ||
import './style.scss'; | ||
|
||
/** | ||
* A decorative card used in the disconnection flow. | ||
* | ||
* @param {object} props - The properties. | ||
* @returns {React.Component} - The DecorativeCard component. | ||
*/ | ||
|
||
const DecorativeCard = props => { | ||
const { format, icon, imageUrl } = props; | ||
|
||
const renderIcon = () => { | ||
if ( icon ) { | ||
return ( | ||
<div className="jp-components__decorative-card__icon-container"> | ||
<span | ||
className={ | ||
'jp-components__decorative-card__icon jp-components__decorative-card__icon--' + icon | ||
} | ||
></span> | ||
</div> | ||
); | ||
} | ||
}; | ||
|
||
return ( | ||
<div | ||
className={ | ||
'jp-components__decorative-card ' + | ||
( format ? 'jp-components__decorative-card--' + format : '' ) | ||
} | ||
> | ||
<div | ||
className="jp-components__decorative-card__image" | ||
style={ { backgroundImage: imageUrl ? `url( ${ imageUrl } )` : '' } } | ||
></div> | ||
<div className="jp-components__decorative-card__content"> | ||
<div className="jp-components__decorative-card__lines"></div> | ||
</div> | ||
{ renderIcon() } | ||
</div> | ||
); | ||
}; | ||
|
||
DecorativeCard.propTypes = { | ||
/** The format of the card (horizontal or vertical) */ | ||
format: PropTypes.oneOf( [ 'horizontal', 'vertical' ] ), | ||
/** An icon slug that can be used to show an icon (options are limited to what is in the stylesheet) */ | ||
icon: PropTypes.oneOf( [ 'unlink' ] ), | ||
/** URL for an image to show in the card. */ | ||
imageUrl: PropTypes.string, | ||
}; | ||
|
||
DecorativeCard.defaultProps = { | ||
format: 'horizontal', | ||
}; | ||
|
||
export default DecorativeCard; |
21 changes: 21 additions & 0 deletions
21
projects/js-packages/components/components/decorative-card/stories/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import DecorativeCard from '../index.jsx'; | ||
|
||
export default { | ||
title: 'Playground/Decorative Card', | ||
component: DecorativeCard, | ||
}; | ||
|
||
// Export additional stories using pre-defined values | ||
const Template = args => <DecorativeCard { ...args } />; | ||
|
||
// Export Default story | ||
export const _default = Template.bind( {} ); | ||
|
||
export const Unlink = Template.bind( {} ); | ||
Unlink.args = { | ||
icon: 'unlink', | ||
}; |
116 changes: 116 additions & 0 deletions
116
projects/js-packages/components/components/decorative-card/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
@import '~@automattic/jetpack-base-styles/style'; | ||
|
||
.jp-components__decorative-card { | ||
display: flex; | ||
border-radius: 8px; | ||
overflow: hidden; | ||
box-shadow: 0 0 15px var( --jp-gray ); | ||
position: relative; | ||
width: 360px; | ||
max-width: 100%; | ||
height: 280px; | ||
margin: 0 auto; | ||
margin-bottom: 3rem; | ||
|
||
&__image, | ||
&__content { | ||
width: 50%; | ||
} | ||
|
||
&__image { | ||
background: var( --jp-gray ); | ||
background-size: cover; | ||
position: relative; | ||
|
||
&:before { | ||
content: ''; | ||
display: block; | ||
position: absolute; | ||
top: 24px; | ||
left: 24px; | ||
width: 38px; | ||
height: 8px; | ||
background-image: url('data:image/svg+xml;uf8,<svg width="38" height="8" viewBox="0 0 38 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 7C1 7 2.37087 1 6.89831 1C11.4257 1 14.3709 7 18.8983 7C23.4257 7 26.7777 1 31.3051 1C35.912 1 37 7 37 7" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>'); | ||
} | ||
} | ||
|
||
&__content { | ||
background: #FFFFFF; | ||
padding: 2rem; | ||
} | ||
|
||
&__icon-container { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
width: 80px; | ||
height: 80px; | ||
background: var(--jp-red); | ||
border-radius: 50px; | ||
} | ||
|
||
&__icon { | ||
width: 40px; | ||
height: 40px; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate( -50%, -50% ); | ||
background-position: center, center; | ||
background-repeat: no-repeat; | ||
|
||
&--unlink { | ||
background-image: url('data:image/svg+xml;uf8,<svg width="34" height="37" viewBox="0 0 34 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.3335 10.001H25.0002C29.4184 10.001 33.0002 13.5827 33.0002 18.001V19.7788C33.0002 24.197 29.4184 27.7788 25.0002 27.7788H22.3335" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M11.6675 27.7783L9.00082 27.7783C4.58254 27.7783 1.00081 24.1966 1.00081 19.7783L1.00081 18.0005C1.00081 13.5823 4.58253 10.0005 9.00081 10.0005L11.6675 10.0005" stroke="white" stroke-width="1.5" stroke-linecap="square"/> <path d="M10.9998 19.167L16.9998 19.167" stroke="white" stroke-width="1.5"/> <path d="M8.99951 35.998L24.9995 0.998048" stroke="white"/> </svg>') | ||
} | ||
} | ||
|
||
&__lines { | ||
display: block; | ||
width: 100%; | ||
height: 12px; | ||
border-radius: 6px; | ||
background: #E9EFF5; | ||
position: relative; | ||
|
||
&::before, | ||
&::after { | ||
content: ''; | ||
display: block; | ||
width: 100%; | ||
height: 12px; | ||
border-radius: 6px; | ||
background: #E9EFF5; | ||
position: relative; | ||
top: calc(100% + 16px); | ||
} | ||
|
||
&:after { | ||
top: calc(100% + 32px); | ||
width: 75%; | ||
} | ||
} | ||
|
||
// Variants | ||
&--vertical { | ||
flex-direction: column; | ||
|
||
.jp-components__decorative-card__image, | ||
.jp-components__decorative-card__content { | ||
width: 100%; | ||
height: 50%; | ||
} | ||
|
||
.jp-components__decorative-card__lines { | ||
max-width: 135px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
|
||
&::before, | ||
&::after { | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/js-packages/connection/changelog/add-feature-dashboard-new-state-store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Updated package dependencies. |
4 changes: 4 additions & 0 deletions
4
projects/js-packages/connection/changelog/add-initial-state-to-connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
Fetches the initial state from the global variable provided by the connection package |
4 changes: 4 additions & 0 deletions
4
projects/js-packages/connection/changelog/feature-move-search-dashboard-to-package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Updated package dependencies. |
4 changes: 4 additions & 0 deletions
4
projects/js-packages/connection/changelog/fix-connection-screen-cta-width
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fixed | ||
|
||
ConnectScreen: make button full width on small viewports |
4 changes: 4 additions & 0 deletions
4
projects/js-packages/connection/changelog/update-connect-screen-component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fixed | ||
|
||
ConnectScreen: Fix custom grid and background color. |
4 changes: 4 additions & 0 deletions
4
projects/js-packages/connection/changelog/update-extend-disconnect-dialog-component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: changed | ||
|
||
Extend functionality of the disconnect modal to allow it to be used in more contexts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.