UNPKG

@wordpress/block-library

Version:
5 lines 60.6 kB
{ "version": 3, "sources": ["../../src/button/deprecated.js"], "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tgetColorClassName,\n\tuseBlockProps,\n\t__experimentalGetGradientClass,\n\t__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n\t__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\t__experimentalGetElementClassName,\n\tgetTypographyClassesAndStyles,\n} from '@wordpress/block-editor';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport migrateFontFamily from '../utils/migrate-font-family';\nimport migrateTextAlign from '../utils/migrate-text-align';\n\nconst migrateBorderRadius = ( attributes ) => {\n\tconst { borderRadius, ...newAttributes } = attributes;\n\t// We have to check old property `borderRadius` and if\n\t// `styles.border.radius` is a `number`\n\tconst oldBorderRadius = [\n\t\tborderRadius,\n\t\tnewAttributes.style?.border?.radius,\n\t].find( ( possibleBorderRadius ) => {\n\t\treturn (\n\t\t\ttypeof possibleBorderRadius === 'number' &&\n\t\t\tpossibleBorderRadius !== 0\n\t\t);\n\t} );\n\tif ( ! oldBorderRadius ) {\n\t\treturn newAttributes;\n\t}\n\n\treturn {\n\t\t...newAttributes,\n\t\tstyle: {\n\t\t\t...newAttributes.style,\n\t\t\tborder: {\n\t\t\t\t...newAttributes.style?.border,\n\t\t\t\tradius: `${ oldBorderRadius }px`,\n\t\t\t},\n\t\t},\n\t};\n};\n\nfunction migrateAlign( attributes ) {\n\tif ( ! attributes.align ) {\n\t\treturn attributes;\n\t}\n\tconst { align, ...otherAttributes } = attributes;\n\treturn {\n\t\t...otherAttributes,\n\t\tclassName: clsx(\n\t\t\totherAttributes.className,\n\t\t\t`align${ attributes.align }`\n\t\t),\n\t};\n}\n\nconst migrateCustomColorsAndGradients = ( attributes ) => {\n\tif (\n\t\t! attributes.customTextColor &&\n\t\t! attributes.customBackgroundColor &&\n\t\t! attributes.customGradient\n\t) {\n\t\treturn attributes;\n\t}\n\tconst style = { color: {} };\n\tif ( attributes.customTextColor ) {\n\t\tstyle.color.text = attributes.customTextColor;\n\t}\n\tif ( attributes.customBackgroundColor ) {\n\t\tstyle.color.background = attributes.customBackgroundColor;\n\t}\n\tif ( attributes.customGradient ) {\n\t\tstyle.color.gradient = attributes.customGradient;\n\t}\n\n\tconst {\n\t\tcustomTextColor,\n\t\tcustomBackgroundColor,\n\t\tcustomGradient,\n\t\t...restAttributes\n\t} = attributes;\n\n\treturn {\n\t\t...restAttributes,\n\t\tstyle,\n\t};\n};\n\nconst oldColorsMigration = ( attributes ) => {\n\tconst { color, textColor, ...restAttributes } = {\n\t\t...attributes,\n\t\tcustomTextColor:\n\t\t\tattributes.textColor && '#' === attributes.textColor[ 0 ]\n\t\t\t\t? attributes.textColor\n\t\t\t\t: undefined,\n\t\tcustomBackgroundColor:\n\t\t\tattributes.color && '#' === attributes.color[ 0 ]\n\t\t\t\t? attributes.color\n\t\t\t\t: undefined,\n\t};\n\treturn migrateCustomColorsAndGradients( restAttributes );\n};\n\nconst blockAttributes = {\n\turl: {\n\t\ttype: 'string',\n\t\tsource: 'attribute',\n\t\tselector: 'a',\n\t\tattribute: 'href',\n\t},\n\ttitle: {\n\t\ttype: 'string',\n\t\tsource: 'attribute',\n\t\tselector: 'a',\n\t\tattribute: 'title',\n\t},\n\ttext: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'a',\n\t},\n};\n\nconst v13 = {\n\tattributes: {\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tenum: [ 'a', 'button' ],\n\t\t\tdefault: 'a',\n\t\t},\n\t\ttype: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'button',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t\trole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a,button',\n\t\t\tattribute: 'title',\n\t\t\trole: 'content',\n\t\t},\n\t\ttext: {\n\t\t\ttype: 'rich-text',\n\t\t\tsource: 'rich-text',\n\t\t\tselector: 'a,button',\n\t\t\trole: 'content',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'target',\n\t\t\trole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'rel',\n\t\t\trole: 'content',\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\ttextColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tgradient: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\talign: true,\n\t\talignWide: false,\n\t\tcolor: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tgradients: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t\ttypography: {\n\t\t\t__experimentalSkipSerialization: [\n\t\t\t\t'fontSize',\n\t\t\t\t'lineHeight',\n\t\t\t\t'fontFamily',\n\t\t\t\t'fontWeight',\n\t\t\t\t'fontStyle',\n\t\t\t\t'textTransform',\n\t\t\t\t'textDecoration',\n\t\t\t\t'letterSpacing',\n\t\t\t],\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalTextDecoration: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalWritingMode: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t},\n\t\t},\n\t\treusable: false,\n\t\tshadow: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t},\n\t\tspacing: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tpadding: [ 'horizontal', 'vertical' ],\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tpadding: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\tstyle: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\tstyle: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t\tinteractivity: {\n\t\t\tclientNavigation: true,\n\t\t},\n\t},\n\tselectors: {\n\t\troot: '.wp-block-button .wp-block-button__link',\n\t\ttypography: {\n\t\t\twritingMode: '.wp-block-button',\n\t\t},\n\t},\n\tsave( { attributes, className } ) {\n\t\tconst {\n\t\t\ttagName,\n\t\t\ttype,\n\t\t\ttextAlign,\n\t\t\tfontSize,\n\t\t\tlinkTarget,\n\t\t\trel,\n\t\t\tstyle,\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\turl,\n\t\t\twidth,\n\t\t} = attributes;\n\n\t\tconst TagName = tagName || 'a';\n\t\tconst isButtonTag = 'button' === TagName;\n\t\tconst buttonType = type || 'button';\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\tconst spacingProps = getSpacingClassesAndStyles( attributes );\n\t\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\t\tconst typographyProps = getTypographyClassesAndStyles( attributes );\n\t\tconst buttonClasses = clsx(\n\t\t\t'wp-block-button__link',\n\t\t\tcolorProps.className,\n\t\t\tborderProps.className,\n\t\t\ttypographyProps.className,\n\t\t\t{\n\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t// For backwards compatibility add style that isn't provided via\n\t\t\t\t// block support.\n\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t\t[ `has-custom-font-size` ]:\n\t\t\t\t\tfontSize || style?.typography?.fontSize,\n\t\t\t},\n\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t);\n\t\tconst buttonStyle = {\n\t\t\t...borderProps.style,\n\t\t\t...colorProps.style,\n\t\t\t...spacingProps.style,\n\t\t\t...shadowProps.style,\n\t\t\t...typographyProps.style,\n\t\t\twritingMode: undefined,\n\t\t};\n\n\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\tconst wrapperClasses = clsx( className, {\n\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t} );\n\n\t\treturn (\n\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName={ TagName }\n\t\t\t\t\ttype={ isButtonTag ? buttonType : null }\n\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\thref={ isButtonTag ? null : url }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\ttarget={ isButtonTag ? null : linkTarget }\n\t\t\t\t\trel={ isButtonTag ? null : rel }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n\tisEligible( attributes ) {\n\t\treturn !! attributes.textAlign;\n\t},\n\tmigrate: migrateTextAlign,\n};\n\nconst v12 = {\n\tattributes: {\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tenum: [ 'a', 'button' ],\n\t\t\tdefault: 'a',\n\t\t},\n\t\ttype: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'button',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a,button',\n\t\t\tattribute: 'title',\n\t\t\trole: 'content',\n\t\t},\n\t\ttext: {\n\t\t\ttype: 'rich-text',\n\t\t\tsource: 'rich-text',\n\t\t\tselector: 'a,button',\n\t\t\trole: 'content',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'target',\n\t\t\trole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'rel',\n\t\t\trole: 'content',\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\ttextColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tgradient: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\talign: true,\n\t\talignWide: false,\n\t\tcolor: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tgradients: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\tlineHeight: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\t__experimentalFontWeight: true,\n\t\t\t__experimentalFontStyle: true,\n\t\t\t__experimentalTextTransform: true,\n\t\t\t__experimentalTextDecoration: true,\n\t\t\t__experimentalLetterSpacing: true,\n\t\t\t__experimentalWritingMode: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t},\n\t\t},\n\t\treusable: false,\n\t\tshadow: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t},\n\t\tspacing: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tpadding: [ 'horizontal', 'vertical' ],\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tpadding: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\tstyle: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\tstyle: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalSelector: '.wp-block-button__link',\n\t\tinteractivity: {\n\t\t\tclientNavigation: true,\n\t\t},\n\t},\n\tsave( { attributes, className } ) {\n\t\tconst {\n\t\t\ttagName,\n\t\t\ttype,\n\t\t\ttextAlign,\n\t\t\tfontSize,\n\t\t\tlinkTarget,\n\t\t\trel,\n\t\t\tstyle,\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\turl,\n\t\t\twidth,\n\t\t} = attributes;\n\n\t\tconst TagName = tagName || 'a';\n\t\tconst isButtonTag = 'button' === TagName;\n\t\tconst buttonType = type || 'button';\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\tconst spacingProps = getSpacingClassesAndStyles( attributes );\n\t\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\t\tconst buttonClasses = clsx(\n\t\t\t'wp-block-button__link',\n\t\t\tcolorProps.className,\n\t\t\tborderProps.className,\n\t\t\t{\n\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t// For backwards compatibility add style that isn't provided via\n\t\t\t\t// block support.\n\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t},\n\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t);\n\t\tconst buttonStyle = {\n\t\t\t...borderProps.style,\n\t\t\t...colorProps.style,\n\t\t\t...spacingProps.style,\n\t\t\t...shadowProps.style,\n\t\t};\n\n\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\tconst wrapperClasses = clsx( className, {\n\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t\t[ `has-custom-font-size` ]: fontSize || style?.typography?.fontSize,\n\t\t} );\n\n\t\treturn (\n\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName={ TagName }\n\t\t\t\t\ttype={ isButtonTag ? buttonType : null }\n\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\thref={ isButtonTag ? null : url }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\ttarget={ isButtonTag ? null : linkTarget }\n\t\t\t\t\trel={ isButtonTag ? null : rel }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n};\n\nconst v11 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'title',\n\t\t},\n\t\ttext: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'a',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'target',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\ttextColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tgradient: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\talign: true,\n\t\talignWide: false,\n\t\tcolor: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tgradients: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t},\n\t\t},\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tfontSize: true,\n\t\t\t},\n\t\t},\n\t\treusable: false,\n\t\tspacing: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tpadding: [ 'horizontal', 'vertical' ],\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tpadding: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tradius: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tradius: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalSelector: '.wp-block-button__link',\n\t},\n\tsave( { attributes, className } ) {\n\t\tconst { fontSize, linkTarget, rel, style, text, title, url, width } =\n\t\t\tattributes;\n\n\t\tif ( ! text ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\tconst spacingProps = getSpacingClassesAndStyles( attributes );\n\t\tconst buttonClasses = clsx(\n\t\t\t'wp-block-button__link',\n\t\t\tcolorProps.className,\n\t\t\tborderProps.className,\n\t\t\t{\n\t\t\t\t// For backwards compatibility add style that isn't provided via\n\t\t\t\t// block support.\n\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t}\n\t\t);\n\t\tconst buttonStyle = {\n\t\t\t...borderProps.style,\n\t\t\t...colorProps.style,\n\t\t\t...spacingProps.style,\n\t\t};\n\n\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\tconst wrapperClasses = clsx( className, {\n\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t\t[ `has-custom-font-size` ]: fontSize || style?.typography?.fontSize,\n\t\t} );\n\n\t\treturn (\n\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\thref={ url }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n};\n\nconst v10 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'title',\n\t\t},\n\t\ttext: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'a',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'target',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\ttextColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tgradient: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\talign: true,\n\t\talignWide: false,\n\t\tcolor: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tgradients: true,\n\t\t},\n\t\ttypography: {\n\t\t\tfontSize: true,\n\t\t\t__experimentalFontFamily: true,\n\t\t},\n\t\treusable: false,\n\t\tspacing: {\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\tpadding: [ 'horizontal', 'vertical' ],\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tpadding: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tradius: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t},\n\t\t__experimentalSelector: '.wp-block-button__link',\n\t},\n\tsave( { attributes, className } ) {\n\t\tconst { fontSize, linkTarget, rel, style, text, title, url, width } =\n\t\t\tattributes;\n\n\t\tif ( ! text ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\tconst spacingProps = getSpacingClassesAndStyles( attributes );\n\t\tconst buttonClasses = clsx(\n\t\t\t'wp-block-button__link',\n\t\t\tcolorProps.className,\n\t\t\tborderProps.className,\n\t\t\t{\n\t\t\t\t// For backwards compatibility add style that isn't provided via\n\t\t\t\t// block support.\n\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t}\n\t\t);\n\t\tconst buttonStyle = {\n\t\t\t...borderProps.style,\n\t\t\t...colorProps.style,\n\t\t\t...spacingProps.style,\n\t\t};\n\n\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\tconst wrapperClasses = clsx( className, {\n\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t\t[ `has-custom-font-size` ]: fontSize || style?.typography?.fontSize,\n\t\t} );\n\n\t\treturn (\n\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\thref={ url }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n\tmigrate: migrateFontFamily,\n\tisEligible( { style } ) {\n\t\treturn style?.typography?.fontFamily;\n\t},\n};\n\nconst deprecated = [\n\tv13,\n\tv12,\n\tv11,\n\tv10,\n\t{\n\t\tsupports: {\n\t\t\tanchor: true,\n\t\t\talign: true,\n\t\t\talignWide: false,\n\t\t\tcolor: {\n\t\t\t\t__experimentalSkipSerialization: true,\n\t\t\t\tgradients: true,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontSize: true,\n\t\t\t\t__experimentalFontFamily: true,\n\t\t\t},\n\t\t\treusable: false,\n\t\t\t__experimentalSelector: '.wp-block-button__link',\n\t\t},\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tlinkTarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'target',\n\t\t\t},\n\t\t\trel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'rel',\n\t\t\t},\n\t\t\tplaceholder: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tgradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tisEligible( { style } ) {\n\t\t\treturn typeof style?.border?.radius === 'number';\n\t\t},\n\t\tsave( { attributes, className } ) {\n\t\t\tconst {\n\t\t\t\tfontSize,\n\t\t\t\tlinkTarget,\n\t\t\t\trel,\n\t\t\t\tstyle,\n\t\t\t\ttext,\n\t\t\t\ttitle,\n\t\t\t\turl,\n\t\t\t\twidth,\n\t\t\t} = attributes;\n\n\t\t\tif ( ! text ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst borderRadius = style?.border?.radius;\n\t\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\t\tconst buttonClasses = clsx(\n\t\t\t\t'wp-block-button__link',\n\t\t\t\tcolorProps.className,\n\t\t\t\t{\n\t\t\t\t\t'no-border-radius': style?.border?.radius === 0,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst buttonStyle = {\n\t\t\t\tborderRadius: borderRadius ? borderRadius : undefined,\n\t\t\t\t...colorProps.style,\n\t\t\t};\n\n\t\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\t\tconst wrapperClasses = clsx( className, {\n\t\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t\t\t[ `has-custom-font-size` ]:\n\t\t\t\t\tfontSize || style?.typography?.fontSize,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tmigrate: compose( migrateFontFamily, migrateBorderRadius ),\n\t},\n\t{\n\t\tsupports: {\n\t\t\tanchor: true,\n\t\t\talign: true,\n\t\t\talignWide: false,\n\t\t\tcolor: {\n\t\t\t\t__experimentalSkipSerialization: true,\n\t\t\t},\n\t\t\treusable: false,\n\t\t\t__experimentalSelector: '.wp-block-button__link',\n\t\t},\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tlinkTarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'target',\n\t\t\t},\n\t\t\trel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'rel',\n\t\t\t},\n\t\t\tplaceholder: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tborderRadius: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tgradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes, className } ) {\n\t\t\tconst { borderRadius, linkTarget, rel, text, title, url, width } =\n\t\t\t\tattributes;\n\t\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\t\tconst buttonClasses = clsx(\n\t\t\t\t'wp-block-button__link',\n\t\t\t\tcolorProps.className,\n\t\t\t\t{\n\t\t\t\t\t'no-border-radius': borderRadius === 0,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst buttonStyle = {\n\t\t\t\tborderRadius: borderRadius ? borderRadius + 'px' : undefined,\n\t\t\t\t...colorProps.style,\n\t\t\t};\n\n\t\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\t\tconst wrapperClasses = clsx( className, {\n\t\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tmigrate: compose( migrateFontFamily, migrateBorderRadius ),\n\t},\n\t{\n\t\tsupports: {\n\t\t\tanchor: true,\n\t\t\talign: true,\n\t\t\talignWide: false,\n\t\t\tcolor: {\n\t\t\t\t__experimentalSkipSerialization: true,\n\t\t\t},\n\t\t\treusable: false,\n\t\t\t__experimentalSelector: '.wp-block-button__link',\n\t\t},\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tlinkTarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'target',\n\t\t\t},\n\t\t\trel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'rel',\n\t\t\t},\n\t\t\tplaceholder: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tborderRadius: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tgradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes, className } ) {\n\t\t\tconst { borderRadius, linkTarget, rel, text, title, url, width } =\n\t\t\t\tattributes;\n\t\t\tconst colorProps = getColorClassesAndStyles( attributes );\n\t\t\tconst buttonClasses = clsx(\n\t\t\t\t'wp-block-button__link',\n\t\t\t\tcolorProps.className,\n\t\t\t\t{\n\t\t\t\t\t'no-border-radius': borderRadius === 0,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst buttonStyle = {\n\t\t\t\tborderRadius: borderRadius ? borderRadius + 'px' : undefined,\n\t\t\t\t...colorProps.style,\n\t\t\t};\n\n\t\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\t\tconst wrapperClasses = clsx( className, {\n\t\t\t\t[ `has-custom-width wp-block-button__width-${ width }` ]: width,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<div { ...useBlockProps.save( { className: wrapperClasses } ) }>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tmigrate: compose( migrateFontFamily, migrateBorderRadius ),\n\t},\n\t{\n\t\tsupports: {\n\t\t\talign: true,\n\t\t\talignWide: false,\n\t\t\tcolor: { gradients: true },\n\t\t},\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tlinkTarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'target',\n\t\t\t},\n\t\t\trel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'rel',\n\t\t\t},\n\t\t\tplaceholder: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tborderRadius: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tgradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { borderRadius, linkTarget, rel, text, title, url } =\n\t\t\t\tattributes;\n\t\t\tconst buttonClasses = clsx( 'wp-block-button__link', {\n\t\t\t\t'no-border-radius': borderRadius === 0,\n\t\t\t} );\n\t\t\tconst buttonStyle = {\n\t\t\t\tborderRadius: borderRadius ? borderRadius + 'px' : undefined,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\thref={ url }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\tvalue={ text }\n\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\trel={ rel }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t\tmigrate: migrateBorderRadius,\n\t},\n\t{\n\t\tsupports: {\n\t\t\talign: true,\n\t\t\talignWide: false,\n\t\t},\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tlinkTarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'target',\n\t\t\t},\n\t\t\trel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'rel',\n\t\t\t},\n\t\t\tplaceholder: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tborderRadius: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomGradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tgradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tisEligible: ( attributes ) =>\n\t\t\t!! attributes.customTextColor ||\n\t\t\t!! attributes.customBackgroundColor ||\n\t\t\t!! attributes.customGradient ||\n\t\t\t!! attributes.align,\n\t\tmigrate: compose(\n\t\t\tmigrateBorderRadius,\n\t\t\tmigrateCustomColorsAndGradients,\n\t\t\tmigrateAlign\n\t\t),\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\tbackgroundColor,\n\t\t\t\tborderRadius,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tcustomGradient,\n\t\t\t\tlinkTarget,\n\t\t\t\tgradient,\n\t\t\t\trel,\n\t\t\t\ttext,\n\t\t\t\ttextColor,\n\t\t\t\ttitle,\n\t\t\t\turl,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass =\n\t\t\t\t! customGradient &&\n\t\t\t\tgetColorClassName( 'background-color', backgroundColor );\n\t\t\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\n\t\t\tconst buttonClasses = clsx( 'wp-block-button__link', {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t'has-background':\n\t\t\t\t\tbackgroundColor ||\n\t\t\t\t\tcustomBackgroundColor ||\n\t\t\t\t\tcustomGradient ||\n\t\t\t\t\tgradient,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t\t'no-border-radius': borderRadius === 0,\n\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t} );\n\n\t\t\tconst buttonStyle = {\n\t\t\t\tbackground: customGradient ? customGradient : undefined,\n\t\t\t\tbackgroundColor:\n\t\t\t\t\tbackgroundClass || customGradient || gradient\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t\tborderRadius: borderRadius ? borderRadius + 'px' : undefined,\n\t\t\t};\n\n\t\t\t// The use of a `title` attribute here is soft-deprecated, but still applied\n\t\t\t// if it had already been assigned, for the sake of backward-compatibility.\n\t\t\t// A title will no longer be assigned for new or updated button block links.\n\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'none',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tlinkTarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'target',\n\t\t\t},\n\t\t\trel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'a',\n\t\t\t\tattribute: 'rel',\n\t\t\t},\n\t\t\tplaceholder: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tisEligible( attribute ) {\n\t\t\treturn (\n\t\t\t\tattribute.className &&\n\t\t\t\tattribute.className.includes( 'is-style-squared' )\n\t\t\t);\n\t\t},\n\t\tmigrate( attributes ) {\n\t\t\tlet newClassName = attributes.className;\n\t\t\tif ( newClassName ) {\n\t\t\t\tnewClassName = newClassName\n\t\t\t\t\t.replace( /is-style-squared[\\s]?/, '' )\n\t\t\t\t\t.trim();\n\t\t\t}\n\t\t\treturn migrateBorderRadius(\n\t\t\t\tmigrateCustomColorsAndGradients( {\n\t\t\t\t\t...attributes,\n\t\t\t\t\tclassName: newClassName ? newClassName : undefined,\n\t\t\t\t\tborderRadius: 0,\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\tbackgroundColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tlinkTarget,\n\t\t\t\trel,\n\t\t\t\ttext,\n\t\t\t\ttextColor,\n\t\t\t\ttitle,\n\t\t\t\turl,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\n\t\t\tconst buttonClasses = clsx( 'wp-block-button__link', {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst buttonStyle = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ rel }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'none',\n\t\t\t},\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomBackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tcustomTextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tmigrate: oldColorsMigration,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\turl,\n\t\t\t\ttext,\n\t\t\t\ttitle,\n\t\t\t\tbackgroundColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomBackgroundColor,\n\t\t\t\tcustomTextColor,\n\t\t\t} = attributes;\n\n\t\t\tconst textClass = getColorClassName( 'color', textColor );\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tbackgroundColor\n\t\t\t);\n\n\t\t\tconst buttonClasses = clsx( 'wp-block-button__link', {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t[ textClass ]: textClass,\n\t\t\t\t'has-background': backgroundColor || customBackgroundColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tconst buttonStyle = {\n\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t? undefined\n\t\t\t\t\t: customBackgroundColor,\n\t\t\t\tcolor: textClass ? undefined : customTextColor,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tcolor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'none',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { url, text, title, align, color, textColor } = attributes;\n\n\t\t\tconst buttonStyle = {\n\t\t\t\tbackgroundColor: color,\n\t\t\t\tcolor: textColor,\n\t\t\t};\n\n\t\t\tconst linkClass = 'wp-block-button__link';\n\n\t\t\treturn (\n\t\t\t\t<div className={ `align${ align }` }>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ buttonStyle }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tmigrate: oldColorsMigration,\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tcolor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'none',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { url, text, title, align, color, textColor } = attributes;\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ `align${ align }` }\n\t\t\t\t\tstyle={ { backgroundColor: color } }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"a\"\n\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tstyle={ { color: textColor } }\n\t\t\t\t\t\tvalue={ text }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tmigrate: oldColorsMigration,\n\t},\n];\n\nexport default deprecated;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,0BAWO;AACP,qBAAwB;AAKxB,iCAA8B;AAC9B,gCAA6B;AA+SzB;AA7SJ,IAAM,sBAAsB,CAAE,eAAgB;AAC7C,QAAM,EAAE,cAAc,GAAG,cAAc,IAAI;AAG3C,QAAM,kBAAkB;AAAA,IACvB;AAAA,IACA,cAAc,OAAO,QAAQ;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