diff --git a/plugin/assets/css/src/block-editor.css b/plugin/assets/css/src/block-editor.css index 4f435c4a0..f0622a047 100644 --- a/plugin/assets/css/src/block-editor.css +++ b/plugin/assets/css/src/block-editor.css @@ -26,6 +26,7 @@ @import "./material-components.css"; @import "./tokens/index.css"; @import "./components/datatable-editor.css"; +@import "./components/button.css"; @media (min-width: 600px) { diff --git a/plugin/assets/css/src/components/button.css b/plugin/assets/css/src/components/button.css new file mode 100644 index 000000000..991e5d46f --- /dev/null +++ b/plugin/assets/css/src/components/button.css @@ -0,0 +1,126 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.mdc-button { + align-items: center; + border: 0; + display: flex; + justify-content: center; + letter-spacing: 0.1px; + padding: 10px 24px; + + &:focus, + &:active { + outline: thin dotted; + } + + & .mdc-button__icon ~ .mdc-button__label { + margin-left: 8px; + } + + &.is-large { + height: 50px; + padding: 16px 32px; + } + + &:disabled { + cursor: not-allowed; + } +} + +.mdc-button--raised, +.mdc-button--elevated { + background-color: var(--md-sys-color-surface-variant); + border: 0 !important; /* Use !important to override the default style of the button. */ + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15); + color: var(--md-sys-color-primary); + + &:hover { + background-color: rgba(var(--md-sys-color-primary-rgb), 0.08); + } + + &:focus, + &:active { + background-color: rgba(var(--md-sys-color-primary-rgb), 0.12); + } + + &:disabled { + background-color: rgba(31, 31, 31, 0.12); + color: var(--md-sys-color-on-surface); + } +} + +.mdc-button--outlined, +.mdc-button--outlined:not(:disabled), +.mdc-button--text, +.mdc-button--text:not(:disabled) { + background: transparent; + border: 1px solid var(--md-sys-color-outline) !important; /* Use !important to override the default style of the button. */ + color: var(--md-sys-color-primary); + + &:hover { + background-color: rgba(var(--md-sys-color-primary-rgb), 0.08); + } + + &:focus, + &:active { + background-color: rgba(var(--md-sys-color-primary-rgb), 0.12); + } + + &:disabled { + border: 1px solid rgba(31, 31, 31, 0.12); + color: var(--md-sys-color-on-surface); + } +} + +.mdc-button--text, +.mdc-button--text:not(:disabled) { + border: 0 !important; /* Use !important to override the default style of the button. */ +} + +.mdc-button--text:disabled { + color: var(--md-sys-color-on-surface); +} + +.mdc-button--filled, +.mdc-button--unelevated { + background-color: var(--md-sys-color-primary); + color: var(--md-sys-color-on-primary); + + &:hover { + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15); + } + + &:disabled { + background-color: rgba(31, 31, 31, 0.12); + color: var(--md-sys-color-on-surface); + } +} + +.mdc-button--tonal { + background-color: var(--md-sys-color-secondary-container); + color: var(--md-sys-color-on-secondary-container); + + &:hover { + background-color: rgba(var(--md-sys-color-secondary-container-rgb), 0.8); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15); + } + + &:disabled { + background-color: rgba(31, 31, 31, 0.12); + color: var(--md-sys-color-on-surface); + } +} diff --git a/plugin/assets/css/src/components/card.css b/plugin/assets/css/src/components/card.css index 5ceb478f7..069bd5b60 100644 --- a/plugin/assets/css/src/components/card.css +++ b/plugin/assets/css/src/components/card.css @@ -158,7 +158,7 @@ .mdc-card__link, .single-post-card__title, .material-design-card__title { - color: var(--md-sys-color-on-surface, #000); + text-decoration: none; } diff --git a/plugin/assets/css/src/material-components.css b/plugin/assets/css/src/material-components.css index d787632d7..7259db755 100644 --- a/plugin/assets/css/src/material-components.css +++ b/plugin/assets/css/src/material-components.css @@ -33,3 +33,4 @@ @import "./components/tab-indicator.css"; @import "./components/list.css"; @import "./components/tooltip.css"; +@import "./components/button.css"; diff --git a/plugin/assets/src/block-editor/blocks/button/block.json b/plugin/assets/src/block-editor/blocks/button/block.json index a31451d63..c2afabd4e 100644 --- a/plugin/assets/src/block-editor/blocks/button/block.json +++ b/plugin/assets/src/block-editor/blocks/button/block.json @@ -15,8 +15,8 @@ "default": "text" }, "style": { - "type": "string", - "default": "raised" + "default": "raised", + "type": "string" }, "iconPosition": { "type": "string", @@ -76,6 +76,11 @@ "size": { "type": "string", "default": "normal" + }, + "elevationStyle": { + "default": "elevated", + "enum": [ "text", "outlined", "elevated", "filled", "tonal" ], + "type": "string" } } } diff --git a/plugin/assets/src/block-editor/blocks/button/deprecated.js b/plugin/assets/src/block-editor/blocks/button/deprecated.js new file mode 100644 index 000000000..bbaf3e4b0 --- /dev/null +++ b/plugin/assets/src/block-editor/blocks/button/deprecated.js @@ -0,0 +1,24 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Internal dependencies + */ +import { SaveM2 } from './deprecated/m2/m2-version'; + +const deprecated = [ SaveM2 ]; + +export default deprecated; diff --git a/plugin/assets/src/block-editor/blocks/button/deprecated/m2/m2-version.js b/plugin/assets/src/block-editor/blocks/button/deprecated/m2/m2-version.js new file mode 100644 index 000000000..0d3ed2351 --- /dev/null +++ b/plugin/assets/src/block-editor/blocks/button/deprecated/m2/m2-version.js @@ -0,0 +1,284 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * External dependencies + */ +import classNames from 'classnames'; + +/** + * Internal dependencies + */ +import hasBg from '../../utils/has-bg'; + +/** + * Button Children component. + * + * @param {Object} props - Component props. + * @param {string} props.icon - Button icon name. + * @param {string} props.iconPosition - Button icon position. + * @param {string} props.label - Button label. + * + * @return {JSX.Element} Function returning the HTML markup for the component. + */ +const ButtonChildren = ( { icon, iconPosition, label } ) => ( + <> + { icon && iconPosition === 'leading' && ( + { icon } + ) } +
+ { label } + { icon && iconPosition === 'trailing' && ( + { icon } + ) } + +); + +const attributesM2 = { + label: { + type: 'string', + source: 'html', + selector: '.mdc-button__label', + default: '', + }, + type: { + type: 'string', + default: 'text', + }, + style: { + type: 'string', + default: 'raised', + }, + iconPosition: { + type: 'string', + default: 'leading', + }, + cornerRadius: { + type: 'number', + }, + url: { + type: 'string', + source: 'attribute', + selector: 'a', + attribute: 'href', + default: '', + }, + rel: { + type: 'string', + source: 'attribute', + selector: 'a', + attribute: 'rel', + default: '', + }, + linkTarget: { + type: 'string', + source: 'attribute', + selector: 'a', + attribute: 'target', + }, + icon: { + type: 'string', + default: '', + source: 'text', + selector: '.material-icons', + }, + backgroundColor: { + type: 'string', + }, + textColor: { + type: 'string', + }, + tooltip: { + type: 'string', + default: '', + source: 'text', + selector: '.mdc-tooltip', + }, + id: { + type: 'string', + source: 'attribute', + attribute: 'id', + selector: '*', + }, + isSubmit: { + type: 'boolean', + default: false, + }, + size: { + type: 'string', + default: 'normal', + }, +}; + +const Save = ( { + attributes: { + rel, + url, + icon, + type, + label, + style, + textColor, + linkTarget, + cornerRadius, + iconPosition, + backgroundColor, + isSubmit, + tooltip, + id, + size, + }, + className, +} ) => { + if ( 'icon' === type ) { + const tooltipId = tooltip ? `${ id }-tooltip` : false; + const tooltipProps = tooltipId + ? { + 'aria-describedby': tooltipId, + } + : {}; + + return ( +
+ { url && ! isSubmit ? ( + + { icon } + + ) : ( + + ) } + + { tooltipId && ( + + ) } +
+ ); + } + + return ( +
+ { url && ! isSubmit ? ( + + + + ) : ( + + ) } +
+ ); +}; + +export const SaveM2 = { + attributes: attributesM2, + migrate( attributes ) { + const { style } = attributes; + + let elevationStyle = style; + + if ( 'raised' === style ) { + elevationStyle = 'elevated'; + } else if ( 'unelevated' === style ) { + elevationStyle = 'filled'; + } + + return { + ...attributes, + ...{ + elevationStyle, + }, + }; + }, + isEligible( attr ) { + return 'undefined' === typeof attr.elevationStyle; + }, + save: Save, +}; diff --git a/plugin/assets/src/block-editor/blocks/button/edit.js b/plugin/assets/src/block-editor/blocks/button/edit.js index 570cef86c..003af5187 100644 --- a/plugin/assets/src/block-editor/blocks/button/edit.js +++ b/plugin/assets/src/block-editor/blocks/button/edit.js @@ -59,7 +59,7 @@ import { name as ContactFormBlockName } from '../contact-form'; * * @property {string} type - The type of button. * @property {string} backgroundColor - The background color of the button. - * @property {string} style - The style of the button. + * @property {string} elevationStyle - The style of the button. * @property {string} textColor - The text color of the button. * @property {string} cornerRadius - The corner radius of the button. * @property {string} icon - The icon of the button. @@ -79,7 +79,7 @@ import { name as ContactFormBlockName } from '../contact-form'; const MdcButton = ( { type, backgroundColor, - style, + elevationStyle, textColor, cornerRadius, icon, @@ -104,7 +104,7 @@ const MdcButton = ( { return (
@@ -144,7 +144,7 @@ const MdcButton = ( { * @property {string} icon - The icon of the button. * @property {string} type - Type of button. * @property {string} label - Label of button. - * @property {string} style - Style of button. + * @property {string} elevationStyle - Style of button. * @property {string} textColor - Text color of button. * @property {string} linkTarget - Link target of button. * @property {string} cornerRadius - Corner radius of button. @@ -173,7 +173,6 @@ const ButtonEdit = ( { icon, type, label, - style, textColor, linkTarget, cornerRadius, @@ -182,6 +181,7 @@ const ButtonEdit = ( { isSubmit, tooltip, size, + elevationStyle, }, setAttributes, isSelected, @@ -243,7 +243,7 @@ const ButtonEdit = ( { { ...{ type, backgroundColor, - style, + elevationStyle, textColor, cornerRadius, icon, @@ -294,7 +294,7 @@ const ButtonEdit = ( { @@ -354,13 +354,13 @@ const ButtonEdit = ( { { __( ' to update all buttons.', 'material-design' ) }
- { hasBg( style ) && type === 'text' && ( + { hasBg( elevationStyle ) && type === 'text' && ( - { hasBg( style ) && type === 'text' && ( + { hasBg( elevationStyle ) && type === 'text' && ( - { style !== 'text' ? ( + { elevationStyle !== 'text' ? ( <>
{ __( diff --git a/plugin/assets/src/block-editor/blocks/button/index.js b/plugin/assets/src/block-editor/blocks/button/index.js index b03f79efa..5405b8ad5 100644 --- a/plugin/assets/src/block-editor/blocks/button/index.js +++ b/plugin/assets/src/block-editor/blocks/button/index.js @@ -22,6 +22,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ +import deprecated from './deprecated'; import icon from './components/block-icon'; import edit from './edit'; import save from './save'; @@ -44,4 +45,5 @@ export const settings = { save, example, transforms, + deprecated, }; diff --git a/plugin/assets/src/block-editor/blocks/button/options.js b/plugin/assets/src/block-editor/blocks/button/options.js index c2037f25f..2db01a27c 100644 --- a/plugin/assets/src/block-editor/blocks/button/options.js +++ b/plugin/assets/src/block-editor/blocks/button/options.js @@ -47,12 +47,16 @@ export const BUTTON_STYLES = [ value: 'outlined', }, { - label: __( 'Raised', 'material-design' ), - value: 'raised', + label: __( 'Elevated', 'material-design' ), + value: 'elevated', }, { - label: __( 'Unelevated', 'material-design' ), - value: 'unelevated', + label: __( 'Filled', 'material-design' ), + value: 'filled', + }, + { + label: __( 'Tonal', 'material-design' ), + value: 'tonal', }, ]; diff --git a/plugin/assets/src/block-editor/blocks/button/save.js b/plugin/assets/src/block-editor/blocks/button/save.js index 0dcd30867..313eead62 100644 --- a/plugin/assets/src/block-editor/blocks/button/save.js +++ b/plugin/assets/src/block-editor/blocks/button/save.js @@ -54,7 +54,6 @@ const ButtonSave = ( { icon, type, label, - style, textColor, linkTarget, cornerRadius, @@ -64,6 +63,7 @@ const ButtonSave = ( { tooltip, id, size, + elevationStyle, }, className, } ) => { @@ -134,7 +134,7 @@ const ButtonSave = ( { rel={ rel && ! isSubmit ? rel : undefined } target={ linkTarget && ! isSubmit ? linkTarget : undefined } style={ { - ...( backgroundColor && hasBg( style ) + ...( backgroundColor && hasBg( elevationStyle ) ? { backgroundColor } : {} ), ...( textColor ? { color: textColor } : {} ), @@ -143,7 +143,7 @@ const ButtonSave = ( { : {} ), } } className={ classNames( 'mdc-button', { - [ `mdc-button--${ style }` ]: true, + [ `mdc-button--${ elevationStyle }` ]: true, [ `is-large` ]: size === 'large', } ) } > @@ -155,12 +155,12 @@ const ButtonSave = ( { ) : (
\n\n\n\n\n
\n\n\n\n
\n
\n
  • spaBenefit 1
\n
\n\n\n\n
\n
  • favoriteBenefit 2
\n
\n\n\n\n
\n
  • check_circleBenefit 3
\n
\n
\n\n", + 'content' => "\n
\n

Call to action

\n\n\n\n

Perform this action in no time, satisfaction guaranteed.

\n\n\n\n
\n
\n
\n\n\n\n
\n\n\n\n
\n
\n
  • spaBenefit 1
\n
\n\n\n\n
\n
  • favoriteBenefit 2
\n
\n\n\n\n
\n
  • check_circleBenefit 3
\n
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header' ], 'description' => __( 'Call to action + benefits pattern.', 'material-design' ), diff --git a/plugin/php/block-patterns/call-to-action-features.php b/plugin/php/block-patterns/call-to-action-features.php index 0b7808379..cdeca870b 100644 --- a/plugin/php/block-patterns/call-to-action-features.php +++ b/plugin/php/block-patterns/call-to-action-features.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Features with icon + Call to action (CTA)', 'material-design' ), - 'content' => "\n
\n

Features

\n\n\n\n

Lorem ipsum dolor sit amet consectetur adipiscing

\n\n\n\n
\n
\n
security
\n\n\n\n
Feature 1
\n\n\n\n

Arcu fusce convallis quam pharetra suspendisse porta auctor, fames quis sollicitudin torquent tempus ullamcor.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n\n\n\n
\n
web
\n\n\n\n
Feature 2
\n\n\n\n

Quis eros molestie libero porttitor convallis, integer sed ullamcorper nunc pharetra cras vitae nisl inceptos.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n\n\n\n
\n
offline_bolt
\n\n\n\n
Feature 3
\n\n\n\n

Placerat aptent ullamcorper vestibulum netus magnis eros id mauris, curae rutrum inceptos eleifend.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n
\n
\n", + 'content' => "\n
\n

Features

\n\n\n\n

Lorem ipsum dolor sit amet consectetur adipiscing

\n\n\n\n
\n
\n
security
\n\n\n\n
Feature 1
\n\n\n\n

Arcu fusce convallis quam pharetra suspendisse porta auctor, fames quis sollicitudin torquent tempus ullamcor.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n\n\n\n
\n
web
\n\n\n\n
Feature 2
\n\n\n\n

Quis eros molestie libero porttitor convallis, integer sed ullamcorper nunc pharetra cras vitae nisl inceptos.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n\n\n\n
\n
offline_bolt
\n\n\n\n
Feature 3
\n\n\n\n

Placerat aptent ullamcorper vestibulum netus magnis eros id mauris, curae rutrum inceptos eleifend.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header' ], 'description' => __( '3 features with icon + call to action', 'material-design' ), diff --git a/plugin/php/block-patterns/call-to-action.php b/plugin/php/block-patterns/call-to-action.php index 08b2e5eb6..a7a87b2f9 100644 --- a/plugin/php/block-patterns/call-to-action.php +++ b/plugin/php/block-patterns/call-to-action.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Call to action(CTA)', 'material-design' ), - 'content' => "\n
\n

Call to action

\n\n\n\n

Perform this action in no time, satisfaction guaranteed.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n", + 'content' => "\n
\n

Call to action

\n\n\n\n

Perform this action in no time, satisfaction guaranteed.

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header' ], 'description' => __( 'Call to action pattern.', 'material-design' ), diff --git a/plugin/php/block-patterns/contact-form.php b/plugin/php/block-patterns/contact-form.php index 10d4bcd19..3c81bbb83 100644 --- a/plugin/php/block-patterns/contact-form.php +++ b/plugin/php/block-patterns/contact-form.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Contact Form', 'material-design' ), - 'content' => "\n

Contact us

\n\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

\n\n\n\n
\n\n\n\n
\n
\n\n\n\n
\n\n\n\n
\n\n\n\n
\n
\n", + 'content' => "\n

Contact us

\n\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

\n\n\n\n
\n\n\n\n
\n
\n\n\n\n
\n\n\n\n
\n\n\n\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header' ], 'description' => __( 'Contact Form pattern.', 'material-design' ), diff --git a/plugin/php/block-patterns/hero-section-image.php b/plugin/php/block-patterns/hero-section-image.php index 2c5a2ddac..8ff95e045 100644 --- a/plugin/php/block-patterns/hero-section-image.php +++ b/plugin/php/block-patterns/hero-section-image.php @@ -29,7 +29,7 @@ return [ 'title' => __( 'Hero section + Image', 'material-design' ), - 'content' => "

Landing Page Hero Section

Imperdiet taciti nostra pulvinar bibendum congue varius sapien, diam curae pellentesque quam auctor praesent nullam convallis, tincidunt urna suscipit litora netus dictum.

\"\"
", + 'content' => "

Landing Page Hero Section

Imperdiet taciti nostra pulvinar bibendum congue varius sapien, diam curae pellentesque quam auctor praesent nullam convallis, tincidunt urna suscipit litora netus dictum.

\"\"
", 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header', 'image' ], 'description' => __( 'Hero section with image', 'material-design' ), diff --git a/plugin/php/block-patterns/hero-section.php b/plugin/php/block-patterns/hero-section.php index 5844e2a01..9de36b2c7 100644 --- a/plugin/php/block-patterns/hero-section.php +++ b/plugin/php/block-patterns/hero-section.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Hero section', 'material-design' ), - 'content' => "\n
\n

Enormous Heading

\n\n\n\n

Consectetur adipiscing elit, egestas volutpat fames imperdiet natoque tempor, turpis convallis lectus nascetur primis eget. Lorem ipsum dolor sit amet consectetur adipiscing elit suspendisse purus praesent.

\n\n\n\n
\n
\n
\n
\n", + 'content' => "\n
\n

Enormous Heading

\n\n\n\n

Consectetur adipiscing elit, egestas volutpat fames imperdiet natoque tempor, turpis convallis lectus nascetur primis eget. Lorem ipsum dolor sit amet consectetur adipiscing elit suspendisse purus praesent.

\n\n\n\n
\n
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header' ], 'description' => __( 'Hero section', 'material-design' ), diff --git a/plugin/php/block-patterns/highlights.php b/plugin/php/block-patterns/highlights.php index 2a9e9b71b..a60850a77 100644 --- a/plugin/php/block-patterns/highlights.php +++ b/plugin/php/block-patterns/highlights.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Highlights', 'material-design' ), - 'content' => "\n
\n
\n

Highlights

\n\n\n\n

Amet consectetur adipiscing elit fermentum, quis bibendum pretium sociis eros per habitasse, tempus conubia commodo enim urna malesuada placerat.

\n\n\n\n
\n
\n
\n\n\n\n

\n
\n\n\n\n
\n\n\n\n
\n
\n
\n
\n\n\n\n
lightbulb_outline
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n\n\n\n
\n
\n\n\n\n
lightbulb_outline
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n
\n\n\n\n
\n
\n
\n\n\n\n
spa
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n\n\n\n
\n
\n\n\n\n
spa
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n
\n
\n
\n", + 'content' => "\n
\n
\n

Highlights

\n\n\n\n

Amet consectetur adipiscing elit fermentum, quis bibendum pretium sociis eros per habitasse, tempus conubia commodo enim urna malesuada placerat.

\n\n\n\n
\n
\n
\n\n\n\n

\n
\n\n\n\n
\n\n\n\n
\n
\n
\n
\n\n\n\n
lightbulb_outline
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n\n\n\n
\n
\n\n\n\n
lightbulb_outline
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n
\n\n\n\n
\n
\n
\n\n\n\n
spa
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n\n\n\n
\n
\n\n\n\n
spa
\n\n\n\n
List item
\n\n\n\n

Dolor sit amet consectetur adipiscing elit ullamcorper, dictumst ultrices rutrum malesuada turpis pretium rhoncus vitae tempor.

\n
\n
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material', 'header' ], 'description' => __( 'Highlights with list items with icons.', 'material-design' ), diff --git a/plugin/php/block-patterns/latest-posts.php b/plugin/php/block-patterns/latest-posts.php index e4c529c3f..7f04a9175 100644 --- a/plugin/php/block-patterns/latest-posts.php +++ b/plugin/php/block-patterns/latest-posts.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Latest Posts', 'material-design' ), - 'content' => '

Latest Posts

Perform this action in no time. Satisfaction guaranteed

', + 'content' => '

Latest Posts

Perform this action in no time. Satisfaction guaranteed

', 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header', 'text', 'columns' ], 'description' => __( 'Call to action pattern.', 'material-design' ), diff --git a/plugin/php/block-patterns/media-grid.php b/plugin/php/block-patterns/media-grid.php index 89ebb0aaf..b05d2da21 100644 --- a/plugin/php/block-patterns/media-grid.php +++ b/plugin/php/block-patterns/media-grid.php @@ -29,7 +29,7 @@ return [ 'title' => __( 'Media Grid', 'material-design' ), - 'content' => "\n
\n
\n
\"\"/
\n
\n\n\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
\n
\n
\n
\n
\n\n\n
\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
\n
\n
\n
\n\n\n
\n
\"\"/
\n
\n
\n", + 'content' => "\n
\n
\n
\"\"/
\n
\n\n\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
\n
\n
\n
\n
\n\n\n
\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
\n
\n
\n
\n\n\n
\n
\"\"/
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material' ], 'description' => __( 'Media grid pattern.', 'material-design' ), diff --git a/plugin/php/block-patterns/numbers.php b/plugin/php/block-patterns/numbers.php index bb1ebaf66..ed3c755cd 100644 --- a/plugin/php/block-patterns/numbers.php +++ b/plugin/php/block-patterns/numbers.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Numbers', 'material-design' ), - 'content' => "\n
\n

Numbers

\n\n\n\n

Some count that matters

\n\n\n\n
\n
\n
thumb_up_off_alt
\n\n\n\n

10k+

\n\n\n\n

Sit amet consectetur adipiscing elit dui, diam nam facilisis

\n\n\n\n
\n
\n\n\n\n
\n
monetization_on
\n\n\n\n

200%

\n\n\n\n

Sit amet consectetur adipiscing elit dui, diam nam facilisis

\n\n\n\n
\n
\n\n\n\n
\n
file_download
\n\n\n\n

2.5M

\n\n\n\n

Sit amet consectetur adipiscing elit dui, diam nam facilisis

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n
\n
\n", // phpcs:ignore WordPressVIPMinimum.Security.Mustache.OutputNotation + 'content' => "\n
\n

Numbers

\n\n\n\n

Some count that matters

\n\n\n\n
\n
\n
thumb_up_off_alt
\n\n\n\n

10k+

\n\n\n\n

Sit amet consectetur adipiscing elit dui, diam nam facilisis

\n\n\n\n
\n
\n\n\n\n
\n
monetization_on
\n\n\n\n

200%

\n\n\n\n

Sit amet consectetur adipiscing elit dui, diam nam facilisis

\n\n\n\n
\n
\n\n\n\n
\n
file_download
\n\n\n\n

2.5M

\n\n\n\n

Sit amet consectetur adipiscing elit dui, diam nam facilisis

\n\n\n\n
\n
\n
\n\n\n\n
\n
\n
\n
\n", // phpcs:ignore WordPressVIPMinimum.Security.Mustache.OutputNotation 'viewportWidth' => 800, 'categories' => [ 'material', 'buttons', 'header' ], 'description' => __( 'Numbers with icons for statistic', 'material-design' ), diff --git a/plugin/php/block-patterns/pricing.php b/plugin/php/block-patterns/pricing.php index 1618bf544..d5e4bdd83 100644 --- a/plugin/php/block-patterns/pricing.php +++ b/plugin/php/block-patterns/pricing.php @@ -25,7 +25,7 @@ return [ 'title' => __( 'Pricing', 'material-design' ), - 'content' => "\n
\n

Pricing

\n\n\n\n

Perform this action in no time, Satisfaction guaranteed.

\n\n\n\n
\n
\n
Price title
\n\n\n\n

Price Subtitle Description.

\n\n\n\n

$ 9.99 / mo

\n\n\n\n

First feature included
Second feature included
Third feature included
Fourth feature included
Fifth feature included

\n\n\n\n
\n
\n
\n
\n\n\n\n
\n
Price title
\n\n\n\n

Price Subtitle Description.

\n\n\n\n

$ 9.99 / mo

\n\n\n\n

First feature included
Second feature included
Third feature included
Fourth feature included
Fifth feature included

\n\n\n\n
\n
\n
\n
\n
\n
\n", // phpcs:ignore WordPressVIPMinimum.Security.Mustache.OutputNotation + 'content' => "\n
\n

Pricing

\n\n\n\n

Perform this action in no time, Satisfaction guaranteed.

\n\n\n\n
\n
\n
Price title
\n\n\n\n

Price Subtitle Description.

\n\n\n\n

$ 9.99 / mo

\n\n\n\n

First feature included
Second feature included
Third feature included
Fourth feature included
Fifth feature included

\n\n\n\n
\n
\n
\n
\n\n\n\n
\n
Price title
\n\n\n\n

Price Subtitle Description.

\n\n\n\n

$ 9.99 / mo

\n\n\n\n

First feature included
Second feature included
Third feature included
Fourth feature included
Fifth feature included

\n\n\n\n
\n
\n
\n
\n
\n
\n", // phpcs:ignore WordPressVIPMinimum.Security.Mustache.OutputNotation 'viewportWidth' => 800, 'categories' => [ 'material' ], 'description' => __( 'Pricing pattern with 2 product description.', 'material-design' ), diff --git a/plugin/php/block-patterns/single-feature-extended.php b/plugin/php/block-patterns/single-feature-extended.php index 39934f071..c40ea3740 100644 --- a/plugin/php/block-patterns/single-feature-extended.php +++ b/plugin/php/block-patterns/single-feature-extended.php @@ -29,7 +29,7 @@ return [ 'title' => __( 'Single Feature Extended', 'material-design' ), - 'content' => "\n
\n
\n
  • \"\"
  • \"\"
  • \"\"
  • \"\"
\n
\n\n\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
  • spaHeadlineOne line description
  • spaHeadlineOne line description
  • spaHeadlineOne line description
\n\n\n
\n\n\n
\n
\n
\n
\n
\n", + 'content' => "\n
\n
\n
  • \"\"
  • \"\"
  • \"\"
  • \"\"
\n
\n\n\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
  • spaHeadlineOne line description
  • spaHeadlineOne line description
  • spaHeadlineOne line description
\n\n\n
\n\n\n
\n
\n
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material' ], 'description' => __( 'Single Feature Extended pattern.', 'material-design' ), diff --git a/plugin/php/block-patterns/single-feature.php b/plugin/php/block-patterns/single-feature.php index d8f95c7e8..8462bcd5e 100644 --- a/plugin/php/block-patterns/single-feature.php +++ b/plugin/php/block-patterns/single-feature.php @@ -29,7 +29,7 @@ return [ 'title' => __( 'Single Feature', 'material-design' ), - 'content' => "\n
\n
\n
\"\"
\n
\n\n\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
\n
\n
\n
\n
\n", + 'content' => "\n
\n
\n
\"\"
\n
\n\n\n
\n

Headline

\n\n\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien nunc. Curabitur vestibulum leo vel neque consequat, a dictum nibh lacinia. Suspendisse sit amet enim velit. Suspendisse semper leo nibh, in venenatis orci blandit sagittis.

\n\n\n
\n
\n
\n
\n
\n", 'viewportWidth' => 800, 'categories' => [ 'material' ], 'description' => __( 'Single Feature pattern.', 'material-design' ), diff --git a/plugin/tests/js/block-editor/blocks/button/__snapshots__/edit.test.js.snap b/plugin/tests/js/block-editor/blocks/button/__snapshots__/edit.test.js.snap index 0c86ce8cb..7674a2188 100644 --- a/plugin/tests/js/block-editor/blocks/button/__snapshots__/edit.test.js.snap +++ b/plugin/tests/js/block-editor/blocks/button/__snapshots__/edit.test.js.snap @@ -31,7 +31,7 @@ Object {
- Raised + Elevated
  • - Unelevated + Filled + +
  • +
  • +
  • @@ -706,7 +716,7 @@ Object { "container":
    - Raised + Elevated + + +
  • +
  • - Unelevated + Tonal
  • diff --git a/plugin/tests/js/block-editor/blocks/button/__snapshots__/save.test.js.snap b/plugin/tests/js/block-editor/blocks/button/__snapshots__/save.test.js.snap index 3614b0821..e6746b8ac 100644 --- a/plugin/tests/js/block-editor/blocks/button/__snapshots__/save.test.js.snap +++ b/plugin/tests/js/block-editor/blocks/button/__snapshots__/save.test.js.snap @@ -7,9 +7,9 @@ Object {